Table of Contents

KVSKBAPostedSalesPriceDiscCalc

Procedures

Set(Record Sales Header, Record Sales Line, Option, Code[20], Integer, Option) :

Summary: Initializes the page with the relevant data to show the calculation of sales price or line discount for a posted sales document line.

procedure Set(NewPostedSalesHeader: Record "Sales Header"; NewPostedSalesLine: Record "Sales Line"; DocumentType: Option; DocumentNo: Code[20]; DocumentLineNo: Integer; NewLineType: Option): 

Parameters:

  • NewPostedSalesHeader: The record of the posted sales document header.
  • NewPostedSalesLine: The record of the posted sales document line.
  • DocumentType: The type of the posted sales document, which can be a shipment, invoice, credit memo, or return receipt.
  • DocumentNo: The number of the posted sales document.
  • DocumentLineNo: The line number of the posted sales document line.
  • NewLineType: The type of calculation to be shown, which can be either price or line discount.

Events

OnCalculateTextGlobalsOnSetTextBaseOfInitialPriceCaseElse(Record KVSKBASalesConditionHeader, Text[50]) :

Summary: Integration event that allows subscribers to customize the behavior when setting the text base of the initial price in the CalculateTextGlobals procedure.

[IntegrationEvent(false, false)]
local procedure OnCalculateTextGlobalsOnSetTextBaseOfInitialPriceCaseElse(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; var TextBaseOfInitialPrice: Text[50]): 

Parameters:

  • SalesConditionHeader: System.Object[]
  • TextBaseOfInitialPrice: The text base of the initial price that can be modified by subscribers.

Remarks: This event is raised when the CalculateTextGlobals procedure encounters a case that is not explicitly handled. Subscribers can use this event to provide custom logic for determining the text base of the initial price based on the sales condition header.