KVSMEDPricingGeneralLib
Procedures
GetNetValue(Decimal, Boolean, Code[20], Code[20]) : Decimal
procedure GetNetValue(ValuePar: Decimal; InclVATPar: Boolean; VatBusinessPostingGroupPar: Code[20]; VatProductPostingGroupPar: Code[20]): Decimal
GetGrossValue(Decimal, Boolean, Code[20], Code[20]) : Decimal
procedure GetGrossValue(ValuePar: Decimal; InclVATPar: Boolean; VatBusinessPostingGroupPar: Code[20]; VatProductPostingGroupPar: Code[20]): Decimal
GetCurrencyValue(Decimal, Date, Code[10], Code[10], Decimal) : Decimal
procedure GetCurrencyValue(ValuePar: Decimal; DatePar: Date; FromCurrencyCodePar: Code[10]; ToCurrencyCodePar: Code[10]; ToCurrencyFactorPar: Decimal): Decimal
GetCalculationPrintValues(Integer, Code[20], BigInteger, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Boolean, Record Currency, Enum KVSMEDPrintCalculation) :
Summary: Calculates the price per unit and discount percent for print output based on the pricing calculation lines. If a manual calculation change exists, the last calculated unit price is used as base price; otherwise the first one. Depending on the calculation type, discounts may be hidden or negative discounts suppressed.
procedure GetCalculationPrintValues(TableID: Integer; DocumentNo: Code[20]; DocumentLineNo: BigInteger; Quantity: Decimal; QuantityUOM: Decimal; QuantityPriceUnit: Decimal; var PricePerUnit: Decimal; var DiscountPercent: Decimal; Amount: Decimal; PricesIncludingVAT: Boolean; Currency: Record "Currency"; KVSMEDPrintCalculation: Enum "KVSMEDPrintCalculation"):
Parameters:
TableID: The database table ID of the document header (e.g. Sales Invoice Header, Sales Shipment Header).DocumentNo: The document number.DocumentLineNo: The document line number.Quantity: The quantity on the document line.QuantityUOM: The quantity per unit of measure.QuantityPriceUnit: The price unit quantity.PricePerUnit: The price per unit; may be updated to the base price from the calculation.DiscountPercent: The discount percent; may be recalculated based on the base price and effective amount.Amount: The line amount.PricesIncludingVAT: Specifies whether prices include VAT.Currency: The currency record used for rounding precision.KVSMEDPrintCalculation: The print calculation type that controls how discounts are displayed.