Table of Contents

KVSKBAGeneralPriceCalcLine

Fields

Name Type Note
Entry No. Integer
Price Calculation Method Enum Price Calculation Method
Cost Calculation Method Enum Price Calculation Method
Asset Type Enum Price Asset Type
Asset No. Code[20]
Variant Code Code[10]
Item Disc. Group Code[20]
Location Code Code[10]
Work Type Code Code[10]
Currency Code Code[10]
Currency Factor Decimal
Document Date Date
Prices Including Tax Boolean
Tax % Decimal
VAT Calculation Type Integer
VAT Bus. Posting Group Code[20]
VAT Prod. Posting Group Code[20]
Quantity Decimal
Unit of Measure Code Code[10]
Qty. per Unit of Measure Decimal
Line Discount % Decimal
Allow Line Disc. Boolean
Allow Invoice Disc. Boolean
Unit Price Decimal
Price Type Enum Price Type
Is SKU Boolean
Responsibility Center Code[10]
Order Type Code[10]
Do not Find Best Price Boolean
Result Unit Price Decimal
Result Line Discount % Decimal
Result Direct Unit Cost Decimal
Result Currency Code Code[10]
Result Unit of Measure Code Code[10]
CalcWithoutPriceConditionNo Boolean
CalcConditionSalesPrice Boolean
Source Type Enum Price Source Type
Source No. Code[20]
Customer Price Group Code[10]
Item Price Group Quantity Decimal
Item Discount Group Quantity Decimal
Calc. Customer/ Vendor No. Code[20]
Item Category Code Code[20]
Initial Price Decimal
KVSKBAItemDiscGroup Code[20]
Price Source Document Line Enum (KVSKBAPriceSourceDocLine)
Item Price Group Code[10]

Procedures

ApplyDiscount(Enum Price Type, Integer) :

procedure ApplyDiscount(PriceType: Enum "Price Type"; CalledByFieldNo: Integer): 

ApplyPrice(Enum Price Type, Integer) :

procedure ApplyPrice(PriceType: Enum "Price Type"; CalledByFieldNo: Integer): 

GetLineWithPrice(Interface Line With Price) :

procedure GetLineWithPrice(var LineWithPrice: Interface "Line With Price"): 

FindGenerallyPurchasePrice(Record Vendor, Code[10], Code[10], Decimal, Date, Code[10], Record Item, Code[10], Decimal, Code[10], Decimal, Code[10], Decimal) : Decimal

Summary: Finds the generally applicable purchase price for the specified parameters and returns the direct unit cost resulting from the price calculation.

procedure FindGenerallyPurchasePrice(PayToVendor: Record "Vendor"; ResponsibilityCenterCode: Code[10]; CurrencyCode: Code[10]; CurrencyFactor: Decimal; DocumentDate: Date; LocationCode: Code[10]; Item: Record "Item"; VariantCode: Code[10]; Qty: Decimal; UnitOfMeasureCode: Code[10]; QtyPerUnitOfMeasure: Decimal; ItemPriceGroup: Code[10]; QtyItemPriceGrp: Decimal): Decimal

Parameters:

  • PayToVendor: The vendor record for which to find the purchase price.
  • ResponsibilityCenterCode: The responsibility center code to use in the price calculation.
  • CurrencyCode: The currency code to use in the price calculation.
  • CurrencyFactor: The currency factor to use in the price calculation.
  • DocumentDate: The document date to use in the price calculation.
  • LocationCode: The location code to use in the price calculation.
  • Item: The item record for which to find the purchase price.
  • VariantCode: The variant code to use in the price calculation.
  • Qty: The quantity to use in the price calculation.
  • UnitOfMeasureCode: The unit of measure code to use in the price calculation.
  • QtyPerUnitOfMeasure: The quantity per unit of measure to use in the price calculation.
  • ItemPriceGroup: The item price group to use in the price calculation.
  • QtyItemPriceGrp: The quantity item price group to use in the price calculation.

Returns: The direct unit cost resulting from the price calculation.

Remarks: This procedure initializes the record with the provided parameters, sets the price type to Purchase and asset type to Item, and then calls the ApplyPrice procedure to perform the price calculation. After the calculation, it returns the resulting direct unit cost.

FindGenerallyPurchaseDiscount(Record Vendor, Code[10], Code[10], Decimal, Date, Code[10], Record Item, Code[10], Decimal, Code[10], Decimal, Decimal) : Decimal

Summary: Finds the generally applicable purchase discount for a given set of parameters.

procedure FindGenerallyPurchaseDiscount(PayToVendor: Record "Vendor"; ResponsibilityCenterPar: Code[10]; CurrencyCode: Code[10]; CurrencyFactor: Decimal; DocumentDate: Date; LocationCode: Code[10]; Item: Record "Item"; VariantCode: Code[10]; Qty: Decimal; UnitOfMeasureCode: Code[10]; QtyPerUnitOfMeasure: Decimal; InitialPrice: Decimal): Decimal

Parameters:

  • PayToVendor: The vendor record for which to find the purchase discount.
  • ResponsibilityCenterPar: The responsibility center code to use in the discount calculation.
  • CurrencyCode: The currency code to use in the discount calculation.
  • CurrencyFactor: The currency factor to use in the discount calculation.
  • DocumentDate: The document date to use in the discount calculation.
  • LocationCode: The location code to use in the discount calculation.
  • Item: The item record for which to find the purchase discount.
  • VariantCode: The variant code to use in the discount calculation.
  • Qty: The quantity to use in the discount calculation.
  • UnitOfMeasureCode: The unit of measure code to use in the discount calculation.
  • QtyPerUnitOfMeasure: The quantity per unit of measure to use in the discount calculation.
  • InitialPrice: The initial price to use in the discount calculation.

Returns: The line discount percentage resulting from the discount calculation.

Remarks: This procedure initializes the record with the provided parameters, sets the price type to Purchase and asset type to Item, and then calls the ApplyDiscount procedure to perform the discount calculation. After the calculation, it returns the resulting line discount percentage.

Events

OnAfterGetLineWithPrice(Interface Line With Price) :

[IntegrationEvent(true, false)]
local procedure OnAfterGetLineWithPrice(var LineWithPrice: Interface "Line With Price"):