KVSKBAGenPriceCalcLinePrice#
Procedures#
GetTableNo() : Integer#
Summary: Gets the table number associated with this price calculation line.
procedure GetTableNo(): Integer
Returns: Database table number for KVSKBAGeneralPriceCalcLine
SetLine(Enum Price Type, Variant) :#
procedure SetLine(PriceType: Enum "Price Type"; Line: Variant):
SetLine(Enum Price Type, Variant, Variant) :#
procedure SetLine(PriceType: Enum "Price Type"; Header: Variant; Line: Variant):
SetSources(Codeunit Price Source List) :#
procedure SetSources(var NewPriceSourceList: Codeunit "Price Source List"):
GetLine(Variant) :#
Summary: Gets the current line data.
procedure GetLine(var Line: Variant):
Parameters:
Line: Variable to store the current line data
GetLine(Variant, Variant) :#
Summary: Gets the current header and line data.
procedure GetLine(var Header: Variant; var Line: Variant):
Parameters:
Header: Variable to store the header data (always cleared)Line: Variable to store the current line data
GetPriceType() : Enum#
Summary: Gets the current price type.
procedure GetPriceType(): Enum Price Type
Returns: The current price type (Sale or Purchase)
IsPriceUpdateNeeded(Enum Price Amount Type, Boolean, Integer) : Boolean#
procedure IsPriceUpdateNeeded(AmountType: Enum "Price Amount Type"; FoundPrice: Boolean; CalledByFieldNo: Integer): Boolean
IsDiscountAllowed() : Boolean#
Summary: Checks if discount is allowed for the current line.
procedure IsDiscountAllowed(): Boolean
Returns: Boolean indicating whether discount is allowed
Remarks: Returns true if discount is explicitly allowed or if price has not been calculated yet
Verify() :#
Summary: Verifies that required fields on the line are populated.
procedure Verify():
Remarks: Tests that "Qty. per Unit of Measure" field is not empty
SetAssetSourceForSetup(Record Dtld. Price Calculation Setup) : Boolean#
Summary: Sets up the asset source for detailed price calculation setup.
procedure SetAssetSourceForSetup(var DtldPriceCalculationSetup: Record "Dtld. Price Calculation Setup"): Boolean
Parameters:
DtldPriceCalculationSetup: Detailed price calculation setup record to initialize
Returns: Boolean indicating whether the source group was successfully retrieved
GetAssetType() : Enum#
Summary: Gets the asset type for price calculations.
procedure GetAssetType(): Enum Price Asset Type
Returns: Always returns Item as the asset type
CopyToBuffer(Codeunit Price Calculation Buffer Mgt.) : Boolean#
procedure CopyToBuffer(var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."): Boolean
ValidatePrice(Enum Price Amount Type) :#
procedure ValidatePrice(AmountType: Enum "Price Amount Type"):
SetPrice(Enum Price Amount Type, Record Price List Line) :#
procedure SetPrice(AmountType: Enum "Price Amount Type"; PriceListLine: Record "Price List Line"):
Update(Enum Price Amount Type) :#
procedure Update(AmountType: Enum "Price Amount Type"):
Events#
OnAfterAddSources(Record KVSKBAGeneralPriceCalcLine, Enum Price Type, Codeunit Price Source List) :#
[IntegrationEvent(false, false)]
local procedure OnAfterAddSources(KVSKBAGeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; PriceType: Enum "Price Type"; var PriceSourceList: Codeunit "Price Source List"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAGenPriceCalcLinePrice", 'OnAfterAddSources', '', false, false)]
local procedure DoSomethingOnAfterAddSources(KVSKBAGeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; PriceType: Enum "Price Type"; var PriceSourceList: Codeunit "Price Source List")
begin
end;
OnAfterIsPriceUpdateNeeded(Enum Price Amount Type, Boolean, Integer, Record KVSKBAGeneralPriceCalcLine, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnAfterIsPriceUpdateNeeded(AmountType: Enum "Price Amount Type"; FoundPrice: Boolean; CalledByFieldNo: Integer; GeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; var Result: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAGenPriceCalcLinePrice", 'OnAfterIsPriceUpdateNeeded', '', false, false)]
local procedure DoSomethingOnAfterIsPriceUpdateNeeded(AmountType: Enum "Price Amount Type"; FoundPrice: Boolean; CalledByFieldNo: Integer; GeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; var Result: Boolean)
begin
end;
OnAfterFillBuffer(Record Price Calculation Buffer, Record KVSKBAGeneralPriceCalcLine) :#
Summary: Integration event that fires after filling the price calculation buffer.
[IntegrationEvent(false, false)]
local procedure OnAfterFillBuffer(var PriceCalculationBuffer: Record "Price Calculation Buffer"; KVSKBAGeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAGenPriceCalcLinePrice", 'OnAfterFillBuffer', '', false, false)]
local procedure DoSomethingOnAfterFillBuffer(var PriceCalculationBuffer: Record "Price Calculation Buffer"; KVSKBAGeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine")
begin
end;
Parameters:
PriceCalculationBuffer: The price calculation buffer that was filledKVSKBAGeneralPriceCalcLine: The source general price calculation line record
Remarks: Use this event to add additional data to the price calculation buffer or modify existing values
OnAfterSetPrice(Record KVSKBAGeneralPriceCalcLine, Record Price List Line, Enum Price Amount Type) :#
[IntegrationEvent(false, false)]
local procedure OnAfterSetPrice(var KVSKBAGeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAGenPriceCalcLinePrice", 'OnAfterSetPrice', '', false, false)]
local procedure DoSomethingOnAfterSetPrice(var KVSKBAGeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type")
begin
end;
OnBeforeSetPrice(Record KVSKBAGeneralPriceCalcLine, Record Price List Line, Enum Price Amount Type, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeSetPrice(var GeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAGenPriceCalcLinePrice", 'OnBeforeSetPrice', '', false, false)]
local procedure DoSomethingOnBeforeSetPrice(var GeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; var IsHandled: Boolean)
begin
end;
OnAfterGetDocumentDate(Date, Record KVSKBAGeneralPriceCalcLine) :#
Summary: Integration event that fires after getting the document date for calculations.
[IntegrationEvent(false, false)]
local procedure OnAfterGetDocumentDate(var DocumentDate: Date; GeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAGenPriceCalcLinePrice", 'OnAfterGetDocumentDate', '', false, false)]
local procedure DoSomethingOnAfterGetDocumentDate(var DocumentDate: Date; GeneralPriceCalcLine: Record "KVSKBAGeneralPriceCalcLine")
begin
end;
Parameters:
DocumentDate: The document date that was determined (can be modified by subscribers)GeneralPriceCalcLine: The general price calculation line record
Remarks: Use this event to override or modify the document date used for price calculations