Codeunit "Price Calculation - V16"

ID 7002
Namespace: Microsoft.Pricing.Calculation

Implements

Methods

GetLine

procedure GetLine(var Line: Variant)

Parameters

Name Type Description
Line Variant

Init

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

Parameters

Name Type Description
NewLineWithPrice Interface Microsoft.Pricing.PriceList."Line With Price"
PriceCalculationSetup Table Microsoft.Pricing.Calculation."Price Calculation Setup"

ApplyDiscount

procedure ApplyDiscount()

ApplyPrice

procedure ApplyPrice(CalledByFieldNo: Integer)

Parameters

Name Type Description
CalledByFieldNo Integer

CountDiscount

procedure CountDiscount(ShowAll: Boolean): Integer

Parameters

Name Type Description
ShowAll Boolean

Returns

Type Description
Integer

CountPrice

procedure CountPrice(ShowAll: Boolean): Integer

Parameters

Name Type Description
ShowAll Boolean

Returns

Type Description
Integer

FindDiscount

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

Parameters

Name Type Description
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
ShowAll Boolean

Returns

Type Description
Boolean

FindPrice

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

Parameters

Name Type Description
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
ShowAll Boolean

Returns

Type Description
Boolean

IsDiscountExists

procedure IsDiscountExists(ShowAll: Boolean): Boolean

Parameters

Name Type Description
ShowAll Boolean

Returns

Type Description
Boolean

IsPriceExists

procedure IsPriceExists(ShowAll: Boolean): Boolean

Parameters

Name Type Description
ShowAll Boolean

Returns

Type Description
Boolean

PickDiscount

procedure PickDiscount()

PickPrice

procedure PickPrice()

ShowPrices

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

Parameters

Name Type Description
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

IsDegradedLine

procedure IsDegradedLine(PriceListLine: Record "Price List Line", BestPriceListLine: Record "Price List Line"): Boolean

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

Returns

Type Description
Boolean

IsImprovedLine

procedure IsImprovedLine(PriceListLine: Record "Price List Line", BestPriceListLine: Record "Price List Line"): Boolean

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

Returns

Type Description
Boolean

IsBetterLine

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

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

Returns

Type Description
Boolean

FindLines

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

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
ShowAll Boolean

Returns

Type Description
Boolean

CopyLinesBySource

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

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
PriceSource Table Microsoft.Pricing.Source."Price Source"
PriceAssetList Codeunit Microsoft.Pricing.Asset."Price Asset List"
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

Returns

Type Description
Boolean

CopyLinesBySource

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

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
PriceSource Table Microsoft.Pricing.Source."Price Source"
PriceAsset Table Microsoft.Pricing.Asset."Price Asset"
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

Returns

Type Description
Boolean

CalcBestAmount

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

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

Returns

Type Description
Boolean

Events

OnAfterIsBetterLine

[IntegrationEvent(True,False)]
local procedure OnAfterIsBetterLine(PriceListLine: Record "Price List Line", AmountType: Enum "Price Amount Type", BestPriceListLine: Record "Price List Line", var Result: Boolean)

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
Result Boolean

OnAfterIsDegradedLine

[IntegrationEvent(True,False)]
local procedure OnAfterIsDegradedLine(PriceListLine: Record "Price List Line", BestPriceListLine: Record "Price List Line", var Result: Boolean)

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
Result Boolean

OnAfterIsImprovedLine

[IntegrationEvent(True,False)]
local procedure OnAfterIsImprovedLine(PriceListLine: Record "Price List Line", BestPriceListLine: Record "Price List Line", var Result: Boolean)

Parameters

Name Type Description
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
Result Boolean

OnAfterPickBestLine

[IntegrationEvent(False,False)]
local procedure OnAfterPickBestLine(AmountType: Enum "Price Amount Type", PriceListLine: Record "Price List Line", var BestPriceListLine: Record "Price List Line", var FoundBestLine: Boolean)

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
FoundBestLine Boolean

OnBeforeFindLines

[IntegrationEvent(False,False)]
local procedure OnBeforeFindLines(AmountType: Enum "Price Amount Type", var TempPriceListLine: Record "Price List Line" temporary, var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.", ShowAll: Boolean, var FoundLines: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
ShowAll Boolean
FoundLines Boolean
IsHandled Boolean

OnBeforePickBestLine

[IntegrationEvent(False,False)]
local procedure OnBeforePickBestLine(AmountType: Enum "Price Amount Type", PriceListLine: Record "Price List Line", var BestPriceListLine: Record "Price List Line", var FoundBestLine: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
BestPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
FoundBestLine Boolean
IsHandled Boolean

OnBeforeCalcBestAmount

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcBestAmount(AmountType: Enum "Price Amount Type", var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.", var PriceListLine: Record "Price List Line")

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"

OnIsDisabled

[IntegrationEvent(False,False)]
local procedure OnIsDisabled(var Disabled: Boolean)

Parameters

Name Type Description
Disabled Boolean

OnFindLinesOnBefoerPriceSourceListGetMinMaxLevel

[IntegrationEvent(False,False)]
local procedure OnFindLinesOnBefoerPriceSourceListGetMinMaxLevel(var PriceAssetList: Codeunit "Price Asset List", var PriceSourceList: Codeunit "Price Source List", AmountType: Enum "Price Amount Type", var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.", ShowAll: Boolean)

Parameters

Name Type Description
PriceAssetList Codeunit Microsoft.Pricing.Asset."Price Asset List"
PriceSourceList Codeunit Microsoft.Pricing.Source."Price Source List"
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
ShowAll Boolean

OnAfterCalcBestAmount

[IntegrationEvent(True,False)]
local procedure OnAfterCalcBestAmount(AmountType: Enum "Price Amount Type", var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.", var PriceListLine: Record "Price List Line", var FoundBestPrice: Boolean)

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
PriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
FoundBestPrice Boolean

OnAfterFindLines

[IntegrationEvent(False,False)]
local procedure OnAfterFindLines(AmountType: Enum "Price Amount Type", var TempPriceListLine: Record "Price List Line" temporary, var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.", ShowAll: Boolean, var FoundLines: Boolean)

Parameters

Name Type Description
AmountType Enum Microsoft.Pricing.PriceList."Price Amount Type"
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."
ShowAll Boolean
FoundLines Boolean

OnBeforeShowPrices

[IntegrationEvent(False,False)]
local procedure OnBeforeShowPrices(var TempPriceListLine: Record "Price List Line", LineWithPrice: Interface "Line With Price")

Parameters

Name Type Description
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
LineWithPrice Interface Microsoft.Pricing.PriceList."Line With Price"

OnApplyDiscountOnBeforeFillBestLine

[IntegrationEvent(False,False)]
local procedure OnApplyDiscountOnBeforeFillBestLine(var TempPriceListLine: Record "Price List Line" temporary, var PriceCalculationBufferMgt: Codeunit "Price Calculation Buffer Mgt.")

Parameters

Name Type Description
TempPriceListLine Table Microsoft.Pricing.PriceList."Price List Line"
PriceCalculationBufferMgt Codeunit Microsoft.Pricing.Calculation."Price Calculation Buffer Mgt."

See also