KVSKBAPriceAssetItemPriceGroup#
Procedures#
GetNo(Record Price Asset) :#
Summary: Retrieves the asset number from the asset ID and populates the price asset record.
procedure GetNo(var PriceAsset: Record "Price Asset"):
Parameters:
PriceAsset: The price asset record to populate (modified by reference).
Remarks: Resolves the SystemId stored in "Asset ID" to find the corresponding Item Price Group. If the Item Price Group is found, sets the "Asset No." and fills additional fields. If not found, initializes the asset to default values. Sets "Table Id" to the Item Price Group table.
GetId(Record Price Asset) :#
Summary: Retrieves the asset ID from the asset number and populates the price asset record.
procedure GetId(var PriceAsset: Record "Price Asset"):
Parameters:
PriceAsset: The price asset record to populate (modified by reference).
Remarks: Resolves the "Asset No." to find the corresponding Item Price Group. If the Item Price Group is found, sets the "Asset ID" (SystemId) and fills additional fields. If not found, initializes the asset to default values. Sets "Table Id" to the Item Price Group table.
IsLookupOK(Record Price Asset) : Boolean#
Summary: Opens a lookup page for selecting an item price group.
procedure IsLookupOK(var PriceAsset: Record "Price Asset"): Boolean
Parameters:
PriceAsset: The price asset record to update with the selected value (modified by reference).
Returns: True if a value was selected, false if cancelled.
Remarks: Displays the Item Price Groups page in lookup mode. If a selection is made, validates and updates the Asset No. in the price asset. Preserves the original record state if the lookup is cancelled.
ValidateUnitOfMeasure(Record Price Asset) : Boolean#
Summary: Validates that the unit of measure exists in the system.
procedure ValidateUnitOfMeasure(var PriceAsset: Record "Price Asset"): Boolean
Parameters:
PriceAsset: The price asset containing the unit of measure code to validate.
Returns: True if the unit of measure exists, otherwise throws an error.
Remarks: Attempts to retrieve the unit of measure record. Throws a standard error if the unit of measure code is not found.
IsLookupUnitOfMeasureOK(Record Price Asset) : Boolean#
Summary: Opens a lookup page for selecting a unit of measure.
procedure IsLookupUnitOfMeasureOK(var PriceAsset: Record "Price Asset"): Boolean
Parameters:
PriceAsset: The price asset record to update with the selected unit of measure (modified by reference).
Returns: True if a value was selected, false if cancelled.
Remarks: Displays the Units of Measure page in lookup mode. If a selection is made, validates and updates the Unit of Measure Code in the price asset. Attempts to position on the current unit of measure if one is already set.
IsLookupVariantOK(Record Price Asset) : Boolean#
Summary: Opens a lookup page for selecting a variant.
procedure IsLookupVariantOK(var PriceAsset: Record "Price Asset"): Boolean
Parameters:
PriceAsset: The price asset record (not modified for item price groups).
Returns: Always returns false as variants are not supported for item price groups.
Remarks: Item price groups do not support variants, so this method always returns false. This implements the required interface method but provides no functionality.
IsAssetNoRequired() : Boolean#
Summary: Indicates whether an asset number is required for this asset type.
procedure IsAssetNoRequired(): Boolean
Returns: Always returns true as item price groups require an asset number.
Remarks: Item price groups must have a valid code (asset number) to be used in price calculations. This enforces that the Asset No. field must be populated.
FillBestLine(Record Price Calculation Buffer, Enum Price Amount Type, Record Price List Line) :#
procedure FillBestLine(PriceCalculationBuffer: Record "Price Calculation Buffer"; AmountType: Enum "Price Amount Type"; var PriceListLine: Record "Price List Line"):
FilterPriceLines(Record Price Asset, Record Price List Line) : Boolean#
Summary: Applies filters to price list lines based on the price asset.
procedure FilterPriceLines(PriceAsset: Record "Price Asset"; var PriceListLine: Record "Price List Line"): Boolean
Parameters:
PriceAsset: The price asset containing filter criteria.PriceListLine: The price list line record to filter (modified by reference).
Returns: The result of the filter operation (currently not explicitly set).
Remarks: Filters by Asset Type and Asset No. to find matching price list lines. Clears any existing Variant Code filter as variants are not supported for price groups. Used by the price calculation engine to find applicable price list lines.
PutRelatedAssetsToList(Record Price Asset, Codeunit Price Asset List) :#
procedure PutRelatedAssetsToList(PriceAsset: Record "Price Asset"; var PriceAssetList: Codeunit "Price Asset List"):
FillFromBuffer(Record Price Asset, Record Price Calculation Buffer) :#
Summary: Fills a price asset from a price calculation buffer.
procedure FillFromBuffer(var PriceAsset: Record "Price Asset"; PriceCalculationBuffer: Record "Price Calculation Buffer"):
Parameters:
PriceAsset: The price asset record to populate (modified by reference).PriceCalculationBuffer: The source price calculation buffer containing asset information.
Remarks: Creates a new entry with the asset type and level from the buffer. Validates and sets the Asset No. from the buffer. Copies the Unit of Measure Code from the buffer. Used to convert price calculation buffer data into a price asset for processing.