KVSKBAItemPostLib#
Procedures#
CheckDimItemJnlLine(Integer, Record Item Journal Line, Integer, Code[20]) :#
Summary: Gets the KUMAVISION Order Type of a Production Order or Transfer Order from an Item Journal Line and saves it in arrays.
procedure CheckDimItemJnlLine(NextIndexNo: Integer; ItemJnlLine: Record "Item Journal Line"; var TableIDArr: Integer; var NoArr: Code[20]):
Parameters:
NextIndexNo: Position in the array, set to next free index positionItemJnlLine: Source record from which the data is retrievedTableIDArr: Array of Table IDs that contains the retrieved informationNoArr: Array of Order Types that contains the retrieved information
Remarks: Extracts production order type or transfer order type information and stores it in the provided arrays for dimension processing
TransHeaderTransferToCode(Record Transfer Header, Record Location) :#
Summary: Sets the 'Shipment post's Receive' flag in the Transfer Header based on location settings.
procedure TransHeaderTransferToCode(var TransferHeader: Record "Transfer Header"; Location: Record "Location"):
Parameters:
TransferHeader: Record in which the flag is setLocation: Location from which the setting is taken
Remarks: Configures automatic receipt posting for direct transfers based on location warehouse requirements
TransHeaderCheckToRelease(Record Transfer Header) :#
Summary: Checks if there are lines with quantities in the Transfer Order before release.
procedure TransHeaderCheckToRelease(TransferHeader: Record "Transfer Header"):
Parameters:
TransferHeader: Transfer header record to check
Remarks: Validates that the transfer order has lines with non-zero quantities before it can be released
CalculateValidationType(Code[10]) : Integer#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Returns the validation type from a posting code.
[Obsolete('The table KVSKBAPostingCode will no longer be used', '25.3')]
procedure CalculateValidationType(PostingCode: Code[10]): Integer
Parameters:
PostingCode: The posting code from which the data is read
Returns: Validation type as integer
Remarks: This procedure is obsolete and will be removed. The KVSKBAPostingCode table will no longer be used.
GetPostingCodeFromValidType(Integer, Record KVSKBAPostingCode) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Gets the posting code from a validation type, creating a new one if none is found.
[Obsolete('The table KVSKBAPostingCode will no longer be used', '25.3')]
procedure GetPostingCodeFromValidType(ValidationType: Integer; var PostingCode: Record "KVSKBAPostingCode"):
Parameters:
ValidationType: Validation type to get the data fromPostingCode: Returned posting code record
Remarks: This procedure is obsolete and will be removed. The KVSKBAPostingCode table will no longer be used.
GetLastDirectCost(Code[20], Code[10], Code[10], Date, Boolean, Boolean) : Decimal#
Summary: Gets the direct cost from a value entry for the specified parameters.
procedure GetLastDirectCost(ItemNo: Code[20]; LocationCode: Code[10]; VariantCode: Code[10]; LastDate: Date; ByLocation: Boolean; ByVariant: Boolean): Decimal
Parameters:
ItemNo: Item number to searchLocationCode: Location code to searchVariantCode: Variant code to searchLastDate: Posting date filter to searchByLocation: Set if you want to filter by locationByVariant: Set if you want to filter by variant
Returns: Direct cost as decimal
Remarks: Retrieves the last direct cost from purchase entries based on the specified filters and date range
CalculateAverageUnitCost(Code[20], Code[10], Code[10], Date, Boolean, Boolean, Boolean) : Decimal#
Summary: Calculates the average unit cost for the specified parameters.
procedure CalculateAverageUnitCost(ItemNo: Code[20]; LocationCode: Code[10]; VariantCode: Code[10]; LastDate: Date; ByLocation: Boolean; ByVariant: Boolean; CalcOriginal: Boolean): Decimal
Parameters:
ItemNo: Item number to searchLocationCode: Location code to searchVariantCode: Variant code to searchLastDate: Filter for posting dateByLocation: Set if you want to search by location codeByVariant: Set if you want to search by variantCalcOriginal: Set if you want to calculate the original unit cost
Returns: Average unit cost as decimal
Remarks: Uses average cost calculation overview to determine the weighted average cost based on closing entries and cost adjustments
GetLowestValue(Record Item Journal Line) : Decimal#
Summary: Gets the lowest unit cost from an item journal line.
procedure GetLowestValue(var ItemJournalLine: Record "Item Journal Line"): Decimal
Parameters:
ItemJournalLine: Record to get the lowest unit cost from
Returns: Lowest value as decimal
Remarks: Compares different cost values (average, direct, standard) to determine the lowest cost, considering costing method and revaluation limits
Events#
OnAfterTransHeaderCheckToRelease(Record Transfer Header) :#
Summary: Integration event that allows customization after checking transfer header for release.
[IntegrationEvent(false, false)]
local procedure OnAfterTransHeaderCheckToRelease(TransferHeader: Record "Transfer Header"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAItemPostLib", 'OnAfterTransHeaderCheckToRelease', '', false, false)]
local procedure DoSomethingOnAfterTransHeaderCheckToRelease(TransferHeader: Record "Transfer Header")
begin
end;
Parameters:
TransferHeader: Transfer header that was checked for release
Remarks: Use this event to perform additional validations or actions after the standard transfer header release checks
OnAfterTransHeaderTransferToCode(Record Transfer Header, Record Location) :#
Summary: Integration event that allows customization after setting transfer-to code on transfer header.
[IntegrationEvent(false, false)]
local procedure OnAfterTransHeaderTransferToCode(var TransferHeader: Record "Transfer Header"; Location: Record "Location"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAItemPostLib", 'OnAfterTransHeaderTransferToCode', '', false, false)]
local procedure DoSomethingOnAfterTransHeaderTransferToCode(var TransferHeader: Record "Transfer Header"; Location: Record "Location")
begin
end;
Parameters:
TransferHeader: Transfer header that was updatedLocation: Location record used for the update
Remarks: Use this event to perform additional setup or validation after transfer-to code configuration
OnBeforeTransHeaderAutoPostRcpt(Record Transfer Header, Boolean) :#
Summary: Integration event that allows customization before configuring automatic receipt posting on transfer header.
[IntegrationEvent(false, false)]
local procedure OnBeforeTransHeaderAutoPostRcpt(var TransHeader: Record "Transfer Header"; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAItemPostLib", 'OnBeforeTransHeaderAutoPostRcpt', '', false, false)]
local procedure DoSomethingOnBeforeTransHeaderAutoPostRcpt(var TransHeader: Record "Transfer Header"; var Handled: Boolean)
begin
end;
Parameters:
TransHeader: Transfer header being configuredHandled: Variable indicating whether a subscriber has handled the configuration
Remarks: Set Handled to true to skip standard automatic receipt posting configuration and implement custom logic
OnBeforeCheckItemLedgEntriesSingle(Record Item Ledger Entry, Integer, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Integration event for checking item ledger entries before extended undo operations.
[Obsolete('The KVSKBAExtendedUndoLines is be replaced by the Microsoft standard. The Event is no longer used', '27.0')]
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckItemLedgEntriesSingle(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; LineRefPar: Integer; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAItemPostLib", 'OnBeforeCheckItemLedgEntriesSingle', '', false, false)]
local procedure DoSomethingOnBeforeCheckItemLedgEntriesSingle(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; LineRefPar: Integer; var IsHandled: Boolean)
begin
end;
Parameters:
TempItemLedgerEntry: Temporary item ledger entry record being checkedLineRefPar: Line reference parameterIsHandled: Variable indicating whether a subscriber has handled the check
Remarks: This event is obsolete and will be removed. The KVSKBAExtendedUndoLines functionality has been replaced by Microsoft standard functionality.