Skip to content

KVSPSAPriceCalcPricePrio#

Implements [#437dbf0e84ff417a965ded2bb9650972#Work Type ](https://github.com/search?q=Table+%23437dbf0e84ff417a965ded2bb9650972%23Work+Type+repo%3AStefanMaron%2FMSDyn365BC.Code.History&type=Code) .

Procedures#

ApplyDiscount() :#

Summary: This procedure applies a discount fields to the GlobalCurrLineWithPrice

procedure ApplyDiscount(): 

ApplyPrice(Integer) :#

Summary: This procedure applies a price fields to the GlobalCurrLineWithPrice

procedure ApplyPrice(CalledByFieldNo: Integer): 

Parameters:

  • CalledByFieldNo: Integer used for determining if the price should be updated.

CalcBestAmount(Enum Price Amount Type, Codeunit Price Calculation Buffer Mgt., Record Price List Line) : Boolean#

procedure CalcBestAmount(AmountType: Enum "Price Amount Type"; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."; var PriceListLine: Record "Price List Line"): Boolean

CopyLinesBySource(Record Price List Line, Record Price Source, Codeunit Price Asset List, Record Price List Line) : Boolean#

procedure CopyLinesBySource(var PriceListLine: Record "Price List Line"; PriceSource: Record "Price Source"; var PriceAssetList: Codeunit "Price Asset List"; var TempPriceListLine: Record "Price List Line" temporary): Boolean

CopyLinesBySource(Record Price List Line, Record Price Source, Record Price Asset, Record Price List Line) : Boolean#

Summary: this procedure filters the PriceListLine based on the PriceSource and PriceAsset then copies lines to TempPriceListLine.

procedure CopyLinesBySource(var PriceListLine: Record "Price List Line"; PriceSource: Record "Price Source"; PriceAsset: Record "Price Asset"; var TempPriceListLine: Record "Price List Line" temporary): Boolean

Parameters:

  • PriceListLine: Record used for copying lines.
  • PriceSource: Record used for filtering lines.
  • PriceAsset: Record used for filtering lines.
  • TempPriceListLine: Record used for temporary storage of copied lines.

Returns: Returns true if lines were copied, otherwise false.

CountDiscount(Boolean) : Integer#

Summary: This procedure counts the number of Price List Line records with a discount amount type.

procedure CountDiscount(ShowAll: Boolean): Integer

Parameters:

  • ShowAll: Boolean used for filter in later procedure.

Returns: Returns the count of discount lines.

CountPrice(Boolean) : Integer#

Summary: This procedure counts the number of Price List Line records with a price amount type.

procedure CountPrice(ShowAll: Boolean): Integer

Parameters:

  • ShowAll: Boolean used for filter in later procedure.

Returns: Returns the count of price lines.

FindDiscount(Record Price List Line, Boolean) : Boolean#

Summary: This procedure finds Price List Line based on the AmountType Discount and ShowAll parameters.

procedure FindDiscount(var TempPriceListLine: Record "Price List Line"; ShowAll: Boolean): Boolean

Parameters:

  • TempPriceListLine: Record used for temporary storage of found discount lines.
  • ShowAll: Boolean used for filtering lines.

Returns: Return result if lines were found or not.

FindLines(Enum Price Amount Type, Record Price List Line, Codeunit Price Calculation Buffer Mgt., Boolean) : Boolean#

procedure FindLines(AmountType: Enum "Price Amount Type"; var TempPriceListLine: Record "Price List Line" temporary; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."; ShowAll: Boolean): Boolean

FindPrice(Record Price List Line, Boolean) : Boolean#

Summary: This procedure finds Price List Line based on the AmountType Price and ShowAll parameters.

procedure FindPrice(var TempPriceListLine: Record "Price List Line"; ShowAll: Boolean): Boolean

Parameters:

  • TempPriceListLine: Record used for temporary storage of found discount lines.
  • ShowAll: Boolean used for filtering lines.

Returns: Return result if lines were found or not.

GetLine(Variant) :#

Summary: This procedure use to get GlobalCurrLineWithPrice and send back

procedure GetLine(var LineVariant: Variant): 

Parameters:

  • LineVariant: Variant used for returning the GlobalCurrLineWithPrice.

Init(Interface Line With Price, Record Price Calculation Setup) :#

procedure Init(NewLineWithPrice: Interface "Line With Price"; PriceCalculationSetup: Record "Price Calculation Setup"): 

IsBetterLine(Record Price List Line, Enum Price Amount Type, Record Price List Line) : Boolean#

procedure IsBetterLine(var PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; BestPriceListLine: Record "Price List Line"): Boolean

IsDiscountExists(Boolean) : Boolean#

Summary: This procedure checks if a discount exists based on the ShowAll parameter.

procedure IsDiscountExists(ShowAll: Boolean): Boolean

Parameters:

  • ShowAll: Boolean used for filtering lines.

Returns: Return result if a discount exists or not.

IsPriceExists(Boolean) : Boolean#

Summary: This procedure checks if a price exists based on the ShowAll parameter.

procedure IsPriceExists(ShowAll: Boolean): Boolean

Parameters:

  • ShowAll: Boolean used for filtering lines.

Returns: Return result if a price exists or not.

PickDiscount() :#

Summary: This procedure find discount lines and opens a page for user to pick a discount.

procedure PickDiscount(): 

PickPrice() :#

Summary: This procedure find price lines and opens a page for user to pick a price.

procedure PickPrice(): 

ShowPrices(Record Price List Line) :#

Summary: This procedure open page and show prices based on the TempPriceListLine.

procedure ShowPrices(var TempPriceListLine: Record "Price List Line"): 

Parameters:

  • TempPriceListLine: Record used for showing prices.

Events#

KVSPSAOnAfterCheckJobUseResPricesInFindResJobPSPPrice(Record Price List Line, Interface Line With Price, Record Job, Code[20], Code[20], Code[20], Code[20], Code[20], Code[10], Code[10], Integer, Boolean, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCheckJobUseResPricesInFindResJobPSPPrice(var TempPriceListLine: Record "Price List Line" temporary; GlobalCurrLineWithPrice: Interface "Line With Price"; Job: Record "Job"; AssetNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; WorkTypeCode: Code[10]; InvoiceUnitOfMeasureCode: Code[10]; BudgetLineNo: Integer; var ReturnValue: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnAfterCheckJobUseResPricesInFindResJobPSPPrice', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCheckJobUseResPricesInFindResJobPSPPrice(var TempPriceListLine: Record "Price List Line" temporary; GlobalCurrLineWithPrice: Interface "Line With Price"; Job: Record "Job"; AssetNo: Code[20]; WorkPackageCode: Code[20]; PhaseCode: Code[20]; TaskCode: Code[20]; StepCode: Code[20]; WorkTypeCode: Code[10]; InvoiceUnitOfMeasureCode: Code[10]; BudgetLineNo: Integer; var ReturnValue: Boolean; var IsHandled: Boolean)
begin
end;

KVSPSAOnAfterFilterPriceListLinesByOrderTypeInFindLines(Record Price List Line, Codeunit Price Calculation Buffer Mgt.) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterFilterPriceListLinesByOrderTypeInFindLines(var TempPriceListLine: Record "Price List Line" temporary; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnAfterFilterPriceListLinesByOrderTypeInFindLines', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterFilterPriceListLinesByOrderTypeInFindLines(var TempPriceListLine: Record "Price List Line" temporary; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.")
begin
end;

KVSPSAOnAfterIsBetterLine(Record Price List Line, Enum Price Amount Type, Record Price List Line, Boolean) :#

[IntegrationEvent(true, false)]
local procedure KVSPSAOnAfterIsBetterLine(PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; BestPriceListLine: Record "Price List Line"; var Result: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnAfterIsBetterLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterIsBetterLine(PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; BestPriceListLine: Record "Price List Line"; var Result: Boolean)
begin
end;

KVSPSAOnAfterIsDegradedLine(Record Price List Line, Record Price List Line, Boolean) :#

[IntegrationEvent(true, false)]
local procedure KVSPSAOnAfterIsDegradedLine(PriceListLine: Record "Price List Line"; BestPriceListLine: Record "Price List Line"; var Result: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnAfterIsDegradedLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterIsDegradedLine(PriceListLine: Record "Price List Line"; BestPriceListLine: Record "Price List Line"; var Result: Boolean)
begin
end;

KVSPSAOnAfterIsImprovedLine(Record Price List Line, Record Price List Line, Boolean) :#

[IntegrationEvent(true, false)]
local procedure KVSPSAOnAfterIsImprovedLine(PriceListLine: Record "Price List Line"; BestPriceListLine: Record "Price List Line"; var Result: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnAfterIsImprovedLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterIsImprovedLine(PriceListLine: Record "Price List Line"; BestPriceListLine: Record "Price List Line"; var Result: Boolean)
begin
end;

KVSPSAOnAfterPickBestLine(Enum Price Amount Type, Record Price List Line, Record Price List Line, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterPickBestLine(AmountType: Enum "Price Amount Type"; PriceListLine: Record "Price List Line"; var BestPriceListLine: Record "Price List Line"; var FoundBestLine: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnAfterPickBestLine', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterPickBestLine(AmountType: Enum "Price Amount Type"; PriceListLine: Record "Price List Line"; var BestPriceListLine: Record "Price List Line"; var FoundBestLine: Boolean)
begin
end;

KVSPSAOnBeforeCalcBestAmount(Enum Price Amount Type, Codeunit Price Calculation Buffer Mgt., Record Price List Line) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCalcBestAmount(AmountType: Enum "Price Amount Type"; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."; var PriceListLine: Record "Price List Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnBeforeCalcBestAmount', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCalcBestAmount(AmountType: Enum "Price Amount Type"; var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt."; var PriceListLine: Record "Price List Line")
begin
end;

KVSPSAOnBeforeIsNotFindBestPrice(Record Price List Line, Boolean, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeIsNotFindBestPrice(PriceListLine: Record "Price List Line"; var Result: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnBeforeIsNotFindBestPrice', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeIsNotFindBestPrice(PriceListLine: Record "Price List Line"; var Result: Boolean; var IsHandled: Boolean)
begin
end;

KVSPSAOnIsDisabled(Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnIsDisabled(var Disabled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAPriceCalcPricePrio", 'KVSPSAOnIsDisabled', '', false, false)]
local procedure DoSomethingKVSPSAOnIsDisabled(var Disabled: Boolean)
begin
end;