Skip to content

KVSKBAMinimumProfitManagement#

Summary: Comprehensive minimum profit management system for sales documents and lines.

Remarks: This codeunit provides complete functionality for minimum profit validation in sales processes: - Document-level and line-level profit calculations with currency/VAT handling - Hierarchical minimum profit configuration (Customer → Sales Order Type → Sales Setup for documents, Item → Item Category for lines) - Real-time validation during data entry and release processes - User permission handling and approval workflow integration - Audit trail maintenance for profit deviation approvals Supports quotes, orders, and blanket orders with comprehensive profit compliance checking.

Procedures#

CalcProfitValuesOfSalesLines(Record Sales Header, Record Sales Line, Decimal, Decimal, Decimal, Decimal, Decimal) :#

Summary: Calculates comprehensive profit values for a sales line including currency conversion and VAT handling.

procedure CalcProfitValuesOfSalesLines(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var LineAmountLCY: Decimal; var LineAmountLCYExclVAT: Decimal; var UnitCostAmountLCY: Decimal; var ProfitAmountLCY: Decimal; var ProfitPerCent: Decimal): 

Parameters:

  • SalesHeader: The sales document header containing currency and VAT settings.
  • SalesLine: The specific sales line to analyze for profit calculation.
  • LineAmountLCY: Returns the line amount converted to local currency (LCY).
  • LineAmountLCYExclVAT: Returns the line amount in LCY excluding VAT for profit calculation.
  • UnitCostAmountLCY: Returns the total unit cost amount in LCY (quantity × unit cost).
  • ProfitAmountLCY: Returns the calculated profit amount in LCY (sales - cost).
  • ProfitPerCent: Returns the profit percentage based on sales amount excluding VAT.

Remarks: This function performs currency conversion, handles VAT calculations, and computes profit values. It considers document currency factors, posting dates, and VAT inclusion settings for accurate profit analysis.

IsMinimumProfitEndPagePopupCase(Record Sales Header) : Boolean#

Summary: Determines if minimum profit validation popup should be displayed for sales document processing.

procedure IsMinimumProfitEndPagePopupCase(var SalesHeader: Record "Sales Header"): Boolean

Parameters:

  • SalesHeader: The sales document to evaluate for minimum profit popup requirements.

Returns: True if popup should be shown for lines below minimum profit, false otherwise.

Remarks: Evaluates whether the minimum profit validation page should be displayed by checking for lines below minimum profit thresholds. Returns true if user has deviation permissions or document is in approval state, and there are lines requiring minimum profit validation. Used to determine UI flow for minimum profit compliance checking.

Events#

OnBeforeCalcProfitValuesOfSalesLines(Record Sales Header, Record Sales Line, Decimal, Decimal, Decimal, Decimal, Decimal, Boolean) :#

Summary: Integration event that allows customization of profit calculation logic before standard processing.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcProfitValuesOfSalesLines(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var LineAmountLCY: Decimal; var LineAmountLCYExclVAT: Decimal; var UnitCostAmountLCY: Decimal; var ProfitAmountLCY: Decimal; var ProfitPerCent: Decimal; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeCalcProfitValuesOfSalesLines', '', false, false)]
local procedure DoSomethingOnBeforeCalcProfitValuesOfSalesLines(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var LineAmountLCY: Decimal; var LineAmountLCYExclVAT: Decimal; var UnitCostAmountLCY: Decimal; var ProfitAmountLCY: Decimal; var ProfitPerCent: Decimal; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document header providing context for the calculation.
  • SalesLine: The sales line for which profit values are being calculated.
  • LineAmountLCY: Line amount in local currency (can be modified by subscriber).
  • LineAmountLCYExclVAT: Line amount in LCY excluding VAT (can be modified by subscriber).
  • UnitCostAmountLCY: Unit cost amount in LCY (can be modified by subscriber).
  • ProfitAmountLCY: Profit amount in LCY (can be modified by subscriber).
  • ProfitPerCent: Profit percentage (can be modified by subscriber).
  • Handled: Set to true by subscriber to skip standard profit calculation logic.

Remarks: Allows complete override of profit calculation logic for specific scenarios or custom business rules. When Handled is set to true, all output parameters should be populated by the subscriber.

OnAfterCalculatedSalesAmountCalcProfitValuesOfSalesLine(Record Sales Header, Record Sales Line, Decimal, Decimal) :#

Summary: Integration event triggered after sales amount calculation allowing adjustment of calculated values.

[IntegrationEvent(false, false)]
local procedure OnAfterCalculatedSalesAmountCalcProfitValuesOfSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var LineAmountLCY: Decimal; var LineAmountLCYExclVAT: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnAfterCalculatedSalesAmountCalcProfitValuesOfSalesLine', '', false, false)]
local procedure DoSomethingOnAfterCalculatedSalesAmountCalcProfitValuesOfSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var LineAmountLCY: Decimal; var LineAmountLCYExclVAT: Decimal)
begin
end;

Parameters:

  • SalesHeader: The sales document header that was used for calculation context.
  • SalesLine: The sales line that was processed for sales amount calculation.
  • LineAmountLCY: Calculated line amount in LCY (can be adjusted by subscriber).
  • LineAmountLCYExclVAT: Calculated line amount in LCY excluding VAT (can be adjusted by subscriber).

Remarks: Allows fine-tuning of sales amounts after currency conversion and VAT calculations but before cost and profit calculations. Useful for applying additional adjustments or corrections to sales values.

OnAfterCalculatedCostCalcProfitValuesOfSalesLine(Record Sales Header, Record Sales Line, Decimal) :#

Summary: Integration event triggered after cost calculation allowing adjustment of calculated cost values.

[IntegrationEvent(false, false)]
local procedure OnAfterCalculatedCostCalcProfitValuesOfSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var UnitCostAmountLCY: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnAfterCalculatedCostCalcProfitValuesOfSalesLine', '', false, false)]
local procedure DoSomethingOnAfterCalculatedCostCalcProfitValuesOfSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var UnitCostAmountLCY: Decimal)
begin
end;

Parameters:

  • SalesHeader: The sales document header that was used for calculation context.
  • SalesLine: The sales line that was processed for cost calculation.
  • UnitCostAmountLCY: Calculated unit cost amount in LCY (can be adjusted by subscriber).

Remarks: Allows modification of cost amounts after standard calculation but before profit calculation. Useful for applying custom costing logic, additional cost factors, or overhead allocations that affect minimum profit compliance calculations.

OnAfterCalculatedProfitCalcProfitValuesOfSalesLine(Record Sales Header, Record Sales Line, Decimal, Decimal) :#

Summary: Integration event triggered after final profit calculation allowing adjustment of profit values.

[IntegrationEvent(false, false)]
local procedure OnAfterCalculatedProfitCalcProfitValuesOfSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ProfitAmountLCY: Decimal; var ProfitPerCent: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnAfterCalculatedProfitCalcProfitValuesOfSalesLine', '', false, false)]
local procedure DoSomethingOnAfterCalculatedProfitCalcProfitValuesOfSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var ProfitAmountLCY: Decimal; var ProfitPerCent: Decimal)
begin
end;

Parameters:

  • SalesHeader: The sales document header that was used for calculation context.
  • SalesLine: The sales line that was processed for profit calculation.
  • ProfitAmountLCY: Final calculated profit amount in LCY (can be adjusted by subscriber).
  • ProfitPerCent: Final calculated profit percentage (can be adjusted by subscriber).

Remarks: Provides final opportunity to modify profit values after all standard calculations are complete. These adjusted values will be used for minimum profit validation and compliance checking. Use carefully as changes here directly impact minimum profit enforcement.

OnBeforeCalcMinProfitSourceOfSalesDoc(Record Sales Header, Text[80], Boolean) :#

Summary: Integration event allowing custom logic for determining minimum profit source description.

[IntegrationEvent(false, false)]
local procedure OnBeforeCalcMinProfitSourceOfSalesDoc(SalesHeader: Record "Sales Header"; var MinimumProfitSourceDocumentText: Text[80]; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeCalcMinProfitSourceOfSalesDoc', '', false, false)]
local procedure DoSomethingOnBeforeCalcMinProfitSourceOfSalesDoc(SalesHeader: Record "Sales Header"; var MinimumProfitSourceDocumentText: Text[80]; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document for which minimum profit source text is being determined.
  • MinimumProfitSourceDocumentText: Custom source description text (set by subscriber).
  • Handled: Set to true by subscriber to skip standard source text determination.

Remarks: Allows customization of how minimum profit source information is displayed to users. Useful for implementing custom minimum profit hierarchies or providing more detailed source descriptions for specific business scenarios.

OnBeforeShowPageDrillDownMinimumProfit(Record Sales Header, Decimal, Enum KVSKBAMinimumProfitSource, Boolean) :#

Summary: Integration event allowing custom drill-down behavior for minimum profit source navigation.

[IntegrationEvent(false, false)]
local procedure OnBeforeShowPageDrillDownMinimumProfit(SalesHeader: Record "Sales Header"; MinimumProfitPercentage: Decimal; MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeShowPageDrillDownMinimumProfit', '', false, false)]
local procedure DoSomethingOnBeforeShowPageDrillDownMinimumProfit(SalesHeader: Record "Sales Header"; MinimumProfitPercentage: Decimal; MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document for which drill-down navigation is being performed.
  • MinimumProfitPercentage: The minimum profit percentage value that applies to this document.
  • MinimumProfitSource: The source type (Customer, Sales Order Type, Sales Setup) of the minimum profit.
  • Handled: Set to true by subscriber to skip standard drill-down page opening.

Remarks: Enables customization of drill-down navigation behavior when users click on minimum profit source information. Allows opening custom pages, providing additional information, or implementing alternative navigation patterns for minimum profit configuration access.

OnBeforeHandleDocumentProfitBelowMinimumProfit(Record Sales Header, Decimal, Decimal, Enum KVSKBAMinimumProfitSource, Boolean) :#

Summary: Integration event allowing custom handling when document overall profit falls below minimum threshold.

[IntegrationEvent(false, false)]
local procedure OnBeforeHandleDocumentProfitBelowMinimumProfit(SalesHeader: Record "Sales Header"; DocumentProfitPercentage: Decimal; MinimumProfitPercentage: Decimal; MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeHandleDocumentProfitBelowMinimumProfit', '', false, false)]
local procedure DoSomethingOnBeforeHandleDocumentProfitBelowMinimumProfit(SalesHeader: Record "Sales Header"; DocumentProfitPercentage: Decimal; MinimumProfitPercentage: Decimal; MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document that has overall profit below minimum threshold.
  • DocumentProfitPercentage: The actual calculated overall document profit percentage.
  • MinimumProfitPercentage: The required minimum profit percentage for this document.
  • MinimumProfitSource: The source (Customer, Sales Order Type, Sales Setup) of the minimum profit requirement.
  • Handled: Set to true by subscriber to completely override standard document-level profit handling.

Remarks: Enables complete customization of document-level minimum profit violation handling including custom user interactions, approval workflows, automatic corrections, or alternative business logic. When handled, subscriber takes full responsibility for all document-level profit compliance processing.

OnBeforeHandleDocumentLineProfitBelowMinimumProfit(Record Sales Header, Record Sales Line, Decimal, Decimal, Enum KVSKBAMinimumProfitSource, Boolean) :#

Summary: Integration event allowing custom handling when individual sales lines have profit below minimum thresholds.

[IntegrationEvent(false, false)]
local procedure OnBeforeHandleDocumentLineProfitBelowMinimumProfit(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; DocumentProfitPercentage: Decimal; MinimumProfitPercentage: Decimal; MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeHandleDocumentLineProfitBelowMinimumProfit', '', false, false)]
local procedure DoSomethingOnBeforeHandleDocumentLineProfitBelowMinimumProfit(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; DocumentProfitPercentage: Decimal; MinimumProfitPercentage: Decimal; MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document containing lines that have profit below minimum thresholds.
  • TempSalesLine: Temporary buffer containing all sales lines that failed minimum profit validation.
  • DocumentProfitPercentage: The overall document profit percentage (for context).
  • MinimumProfitPercentage: The document-level minimum profit percentage (for context).
  • MinimumProfitSource: The document-level minimum profit source (for context).
  • Handled: Set to true by subscriber to completely override standard line-level profit handling.

Remarks: Enables complete customization of line-level minimum profit violation handling including custom validation pages, bulk approval processes, automatic corrections, or alternative business workflows. The TempSalesLine buffer contains all lines requiring attention and can be modified by the subscriber. When handled, subscriber takes full responsibility for all line-level profit compliance processing.

OnBeforeGetMinimumProfitBaseForSalesLine(Record Sales Line, Decimal, Text[100], Boolean) :#

Summary: Integration event allowing custom minimum profit determination logic for sales lines.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetMinimumProfitBaseForSalesLine(SalesLine: Record "Sales Line"; var MinimumProfitPercentage: Decimal; var DeviationSourceText: Text[100]; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeGetMinimumProfitBaseForSalesLine', '', false, false)]
local procedure DoSomethingOnBeforeGetMinimumProfitBaseForSalesLine(SalesLine: Record "Sales Line"; var MinimumProfitPercentage: Decimal; var DeviationSourceText: Text[100]; var Handled: Boolean)
begin
end;

Parameters:

  • SalesLine: The sales line for which minimum profit base is being determined.
  • MinimumProfitPercentage: Custom minimum profit percentage (set by subscriber).
  • DeviationSourceText: Custom source description text (set by subscriber).
  • Handled: Set to true by subscriber to skip standard Item → Item Category hierarchy.

Remarks: Enables implementation of custom minimum profit hierarchies or business rules for line-level validation. When handled, subscriber must provide both the percentage value and descriptive source text. Allows integration with custom pricing engines or specialized minimum profit logic.

OnBeforeGetMinimumProfitBaseForSalesDocument(Record Sales Header, Decimal, Enum KVSKBAMinimumProfitSource, Boolean) :#

Summary: Integration event allowing custom minimum profit determination logic for sales documents.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetMinimumProfitBaseForSalesDocument(SalesHeader: Record "Sales Header"; var MinimumProfitPercentage: Decimal; var MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeGetMinimumProfitBaseForSalesDocument', '', false, false)]
local procedure DoSomethingOnBeforeGetMinimumProfitBaseForSalesDocument(SalesHeader: Record "Sales Header"; var MinimumProfitPercentage: Decimal; var MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document for which minimum profit base is being determined.
  • MinimumProfitPercentage: Custom minimum profit percentage (set by subscriber).
  • MinimumProfitSource: Custom minimum profit source type (set by subscriber).
  • Handled: Set to true by subscriber to skip standard Customer → Sales Order Type → Sales Setup hierarchy.

Remarks: Enables implementation of custom minimum profit hierarchies or business rules for document-level validation. When handled, subscriber must provide both the percentage value and appropriate source enum value. Allows integration with external systems or complex business rules for minimum profit determination.

OnAfterGetMinimumProfitBaseForSalesDocument(Record Sales Header, Decimal, Enum KVSKBAMinimumProfitSource) :#

Summary: Integration event triggered after minimum profit base determination allowing final adjustments.

[IntegrationEvent(false, false)]
local procedure OnAfterGetMinimumProfitBaseForSalesDocument(SalesHeader: Record "Sales Header"; var MinimumProfitPercentage: Decimal; var MinimumProfitSource: Enum "KVSKBAMinimumProfitSource"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnAfterGetMinimumProfitBaseForSalesDocument', '', false, false)]
local procedure DoSomethingOnAfterGetMinimumProfitBaseForSalesDocument(SalesHeader: Record "Sales Header"; var MinimumProfitPercentage: Decimal; var MinimumProfitSource: Enum "KVSKBAMinimumProfitSource")
begin
end;

Parameters:

  • SalesHeader: The sales document for which minimum profit base was determined.
  • MinimumProfitPercentage: Determined minimum profit percentage (can be adjusted by subscriber).
  • MinimumProfitSource: Determined minimum profit source type (can be adjusted by subscriber).

Remarks: Provides opportunity to modify or override minimum profit values after standard hierarchy processing. Useful for applying conditional adjustments, seasonal modifications, or special business rules based on document characteristics or external factors.

OnBeforeClearMinimumProfitReleasedByInSalesLine(Record Sales Line, Integer, Boolean) :#

Summary: Integration event allowing custom logic for clearing minimum profit approval tracking.

[IntegrationEvent(false, false)]
local procedure OnBeforeClearMinimumProfitReleasedByInSalesLine(var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeClearMinimumProfitReleasedByInSalesLine', '', false, false)]
local procedure DoSomethingOnBeforeClearMinimumProfitReleasedByInSalesLine(var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; var Handled: Boolean)
begin
end;

Parameters:

  • SalesLine: The sales line potentially requiring approval tracking clearance (passed by reference).
  • CalledByFieldNo: The field number that triggered the clearance check (Unit Cost LCY or Line Amount).
  • Handled: Set to true by subscriber to skip standard clearance logic.

Remarks: Enables customization of when minimum profit approval tracking should be reset. Allows implementation of custom business rules for determining when re-validation is required based on field changes or other conditions.

OnBeforeCheckSalesLineMinProfitManual(Record Sales Header, Record Sales Line, Boolean) :#

Summary: Integration event allowing custom handling of real-time minimum profit validation during data entry.

[IntegrationEvent(false, false)]
local procedure OnBeforeCheckSalesLineMinProfitManual(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeCheckSalesLineMinProfitManual', '', false, false)]
local procedure DoSomethingOnBeforeCheckSalesLineMinProfitManual(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document header providing context for the validation.
  • SalesLine: The sales line being validated during manual data entry.
  • Handled: Set to true by subscriber to skip standard manual validation logic.

Remarks: Enables custom validation behavior during manual entry of price-related fields. Allows implementation of alternative validation rules, warning systems, or approval processes for minimum profit compliance during real-time data entry.

OnBeforeConfirmMinimumProfitCheckCheckSalesLineMinProfitManual(Record Sales Header, Record Sales Line, Decimal, Decimal, Boolean) :#

Summary: Integration event allowing custom confirmation handling when profit falls below minimum threshold.

[IntegrationEvent(false, false)]
local procedure OnBeforeConfirmMinimumProfitCheckCheckSalesLineMinProfitManual(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; CurrentSalesLineProfit: Decimal; MinimumProfit: Decimal; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnBeforeConfirmMinimumProfitCheckCheckSalesLineMinProfitManual', '', false, false)]
local procedure DoSomethingOnBeforeConfirmMinimumProfitCheckCheckSalesLineMinProfitManual(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; CurrentSalesLineProfit: Decimal; MinimumProfit: Decimal; var Handled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales document header providing context for the validation.
  • SalesLine: The sales line that has profit below minimum threshold.
  • CurrentSalesLineProfit: The actual calculated profit percentage for the line.
  • MinimumProfit: The required minimum profit percentage for the line.
  • Handled: Set to true by subscriber to skip standard confirmation dialog.

Remarks: Enables customization of user interaction when minimum profit validation fails during manual entry. Allows implementation of custom confirmation dialogs, automatic approvals, or alternative workflows for handling profit deviations in real-time data entry scenarios.

OnAfterCalcProfitValuesOfSalesDoc(Record Sales Header, Option, Decimal, Decimal, Decimal) :#

Summary: Integration event triggered after document-level profit calculation allowing final adjustments.

[IntegrationEvent(false, false)]
local procedure OnAfterCalcProfitValuesOfSalesDoc(SalesHeader: Record "Sales Header"; QtyType: Option; var SalesLCY: Decimal; var ProfitLCY: Decimal; var ProfitPct: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAMinimumProfitManagement", 'OnAfterCalcProfitValuesOfSalesDoc', '', false, false)]
local procedure DoSomethingOnAfterCalcProfitValuesOfSalesDoc(SalesHeader: Record "Sales Header"; QtyType: Option; var SalesLCY: Decimal; var ProfitLCY: Decimal; var ProfitPct: Decimal)
begin
end;

Parameters:

  • SalesHeader: The sales document for which overall profit values were calculated.
  • QtyType: The quantity type used for calculation (General=0, Invoicing=1, Shipping=2).
  • SalesLCY: Calculated total sales amount in LCY (can be adjusted by subscriber).
  • ProfitLCY: Calculated total profit amount in LCY (can be adjusted by subscriber).
  • ProfitPct: Calculated overall profit percentage (can be adjusted by subscriber).

Remarks: Provides final opportunity to modify document-level profit metrics after aggregation of all lines. These values are used for overall document minimum profit validation, so adjustments here directly impact document release and approval processes.