Interface "Price Asset"
Methods
GetNo
The method fills the Price Asset parameter with "Asset No." and other data from the asset defined in the implementation codeunit.
procedure GetNo(var PriceAsset: Record "Price Asset" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
the record gets filled with data |
GetId
The method fills the Price Asset parameter with "Asset ID" and other data from the asset defined in the implementation codeunit.
procedure GetId(var PriceAsset: Record "Price Asset" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
the record gets filled with data |
IsLookupOK
The method runs the modal page for looking up for an asset.
procedure IsLookupOK(var PriceAsset: Record "Price Asset" temporary): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
Defines the default asset to be shown on opening of the lookup page |
Returns
| Type | Description |
|---|---|
| Boolean |
true if the lookup is completed |
ValidateUnitOfMeasure
The method validates if the unit of measure exists for the asset. Not used. This validation should happen in IsLookupUnitOfMeasureOK.
procedure ValidateUnitOfMeasure(var PriceAsset: Record "Price Asset" temporary): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
The asset with "Unit of Measure Code" that should be validated |
Returns
| Type | Description |
|---|---|
| Boolean |
IsLookupUnitOfMeasureOK
The method runs the modal page for looking up for a unit of measure.
procedure IsLookupUnitOfMeasureOK(var PriceAsset: Record "Price Asset" temporary): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
Defines the default unit of measure to be shown on opening of the lookup page |
Returns
| Type | Description |
|---|---|
| Boolean |
true if the lookup is completed |
IsLookupVariantOK
The method runs the modal page for looking up for an item variant.
procedure IsLookupVariantOK(var PriceAsset: Record "Price Asset" temporary): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
Defines the default item variant to be shown on opening of the lookup page |
Returns
| Type | Description |
|---|---|
| Boolean |
true if the lookup is completed |
IsAssetNoRequired
The method should return true for an asset that requires "Asset No." to be filled. In W1 returns false just for one asset type - All.
procedure IsAssetNoRequired(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
true if "Asset No." must be filled |
FillBestLine
The method is called in case there is no a price list line that matches all filters defined by the document/journal line. As a result, the PriceListLine parameter gets pricing data from an asset card or another source.
procedure FillBestLine(PriceCalculationBuffer: Record "Price Calculation Buffer" temporary, AmountType: Enum "Price Amount Type", var PriceListLine: Record "Price List Line")
Parameters
| Name | Type | Description |
|---|---|---|
| PriceCalculationBuffer | Table Microsoft.Pricing.Calculation."Price Calculation Buffer" |
Contains data from a document/journal line |
| AmountType | Enum Microsoft.Pricing.PriceList."Price Amount Type" |
Price or Discount |
| PriceListLine | Table Microsoft.Pricing.PriceList."Price List Line" |
gets filled with default data from an asset card or another source |
FilterPriceLines
The method should add the filters for PriceListLine related to the PriceAsset, e.g., besides "Asset Type" and "Asset No." Item adds "Varian Code", Resource adds "Work Type Code"
procedure FilterPriceLines(PriceAsset: Record "Price Asset" temporary, var PriceListLine: Record "Price List Line"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
current price asset |
| PriceListLine | Table Microsoft.Pricing.PriceList."Price List Line" |
the variable that gets additional filters |
Returns
| Type | Description |
|---|---|
| Boolean |
not used |
PutRelatedAssetsToList
The method should add assets related to the current one to build the multi-level PriceAssetList. E.g., a resource asset can add up to two levels: "Resource Group" and "All resources" to setup the hierarchical search, while an item asset adds "Item Discount Group" at the same level as "Item" is, so both participate in search simultaneously.
procedure PutRelatedAssetsToList(PriceAsset: Record "Price Asset" temporary, var PriceAssetList: Codeunit "Price Asset List")
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
the current asset |
| PriceAssetList | Codeunit Microsoft.Pricing.Asset."Price Asset List" |
the list gets filled with one or more assets |
FillFromBuffer
The method should fill the PriceAsset with asset related data from the PriceCalculationBuffer. Used in Add() method of the "Price Asset List" codeunit.
procedure FillFromBuffer(var PriceAsset: Record "Price Asset" temporary, PriceCalculationBuffer: Record "Price Calculation Buffer" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| PriceAsset | Table Microsoft.Pricing.Asset."Price Asset" |
the asset to be added to the list |
| PriceCalculationBuffer | Table Microsoft.Pricing.Calculation."Price Calculation Buffer" |
the buffer containing asset's data |