KVSKBAJobPlanningLinePrice#
Procedures#
GetTableNo() : Integer#
Summary: Gets the table number for the Job Planning Line table.
procedure GetTableNo(): Integer
Returns: Table number of the Job Planning Line table
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 Job Planning Line record.
procedure GetLine(var Line: Variant):
Parameters:
Line: Variable to store the Job Planning Line record
GetLine(Variant, Variant) :#
Summary: Gets the current header and line records.
procedure GetLine(var Header: Variant; var Line: Variant):
Parameters:
Header: Variable to store the header record (always cleared for Job Planning Lines)Line: Variable to store the Job Planning Line record
GetPriceType() : Enum#
Summary: Gets the current price type being used for calculations.
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 discounts are allowed for the current line.
procedure IsDiscountAllowed(): Boolean
Returns: Boolean indicating whether discounts are allowed
Verify() :#
Summary: Verifies that required fields are filled for price calculation.
procedure Verify():
Remarks: Tests that Qty. per Unit of Measure and Currency Factor (if currency is used) are properly set
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: Record to populate with setup information
Returns: Boolean indicating whether the source group was successfully retrieved
GetAssetType() : Enum#
Summary: Gets the asset type for price calculation based on job planning line type.
procedure GetAssetType(): Enum Price Asset Type
Returns: The asset type (Item, Resource, G/L Account, or blank)
Remarks: Maps job planning line type to corresponding price asset type for price calculations
CopyToBuffer(Codeunit Price Calculation Buffer Mgt.) : Boolean#
procedure CopyToBuffer(var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."): Boolean
SetPrice(Enum Price Amount Type, Record Price List Line) :#
procedure SetPrice(AmountType: Enum "Price Amount Type"; PriceListLine: Record "Price List Line"):
ValidatePrice(Enum Price Amount Type) :#
procedure ValidatePrice(AmountType: Enum "Price Amount Type"):
Update(Enum Price Amount Type) :#
procedure Update(AmountType: Enum "Price Amount Type"):
Events#
OnAfterFillBuffer(Record Price Calculation Buffer, Record Job Planning Line) :#
Summary: Integration event that allows customization of price calculation buffer.
[IntegrationEvent(false, false)]
local procedure OnAfterFillBuffer(var PriceCalculationBuffer: Record "Price Calculation Buffer"; JobPlanningLine: Record "Job Planning Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAJobPlanningLinePrice", 'OnAfterFillBuffer', '', false, false)]
local procedure DoSomethingOnAfterFillBuffer(var PriceCalculationBuffer: Record "Price Calculation Buffer"; JobPlanningLine: Record "Job Planning Line")
begin
end;
Parameters:
PriceCalculationBuffer: Price calculation buffer that can be modified by subscribersJobPlanningLine: Job Planning Line record being processed
Remarks: Use this event to add custom fields or modify buffer data for price calculations
OnAfterGetAssetType(Record Job Planning Line, Enum Price Asset Type) :#
[IntegrationEvent(false, false)]
local procedure OnAfterGetAssetType(JobPlanningLine: Record "Job Planning Line"; var AssetType: Enum "Price Asset Type"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAJobPlanningLinePrice", 'OnAfterGetAssetType', '', false, false)]
local procedure DoSomethingOnAfterGetAssetType(JobPlanningLine: Record "Job Planning Line"; var AssetType: Enum "Price Asset Type")
begin
end;
OnAfterIsPriceUpdateNeeded(Enum Price Amount Type, Boolean, Integer, Record Job Planning Line, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnAfterIsPriceUpdateNeeded(AmountType: Enum "Price Amount Type"; FoundPrice: Boolean; CalledByFieldNo: Integer; JobPlanningLine: Record "Job Planning Line"; var Result: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAJobPlanningLinePrice", 'OnAfterIsPriceUpdateNeeded', '', false, false)]
local procedure DoSomethingOnAfterIsPriceUpdateNeeded(AmountType: Enum "Price Amount Type"; FoundPrice: Boolean; CalledByFieldNo: Integer; JobPlanningLine: Record "Job Planning Line"; var Result: Boolean)
begin
end;
OnAfterSetPrice(Record Job Planning Line, Record Price List Line, Enum Price Amount Type) :#
[IntegrationEvent(false, false)]
local procedure OnAfterSetPrice(var JobPlanningLine: Record "Job Planning Line"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAJobPlanningLinePrice", 'OnAfterSetPrice', '', false, false)]
local procedure DoSomethingOnAfterSetPrice(var JobPlanningLine: Record "Job Planning Line"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type")
begin
end;
OnBeforeSetPrice(Record Job Planning Line, Record Price List Line, Enum Price Amount Type, Boolean, Enum Price Type) :#
[IntegrationEvent(false, false)]
local procedure OnBeforeSetPrice(var JobPlanningLine: Record "Job Planning Line"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; var IsHandled: Boolean; CurrPriceType: Enum "Price Type"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAJobPlanningLinePrice", 'OnBeforeSetPrice', '', false, false)]
local procedure DoSomethingOnBeforeSetPrice(var JobPlanningLine: Record "Job Planning Line"; PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; var IsHandled: Boolean; CurrPriceType: Enum "Price Type")
begin
end;
OnAfterAddSources(Record Job Planning Line, Enum Price Type, Codeunit Price Source List, Record Job) :#
[IntegrationEvent(false, false)]
local procedure OnAfterAddSources(var JobPlanningLine: Record "Job Planning Line"; CurrPriceType: Enum "Price Type"; var PriceSourceList: Codeunit "Price Source List"; Job: Record "Job"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAJobPlanningLinePrice", 'OnAfterAddSources', '', false, false)]
local procedure DoSomethingOnAfterAddSources(var JobPlanningLine: Record "Job Planning Line"; CurrPriceType: Enum "Price Type"; var PriceSourceList: Codeunit "Price Source List"; Job: Record "Job")
begin
end;