Skip to content

KVSKBAItemPostLib#

Procedures#

CheckDimItemJnlLine(Integer, Record Item Journal Line, Integer, Code[20]) :#

procedure CheckDimItemJnlLine(NextIndexNo: Integer; ItemJnlLine: Record "Item Journal Line"; var TableIDArr: Integer; var NoArr: Code[20]): 

TransHeaderTransferToCode(Record Transfer Header, Record Location) :#

Summary: This procedure sets the 'Shipment post's Receive' Flag in the Transfer Header.

procedure TransHeaderTransferToCode(var TransferHeader: Record "Transfer Header"; Location: Record "Location"): 

Parameters:

  • TransferHeader: Record in which the flag is set
  • Location: Location from which the setting is taken

TransHeaderCheckToRelease(Record Transfer Header) :#

Summary: This procedure checks if there are lines with quantities in the Transfer Order.

procedure TransHeaderCheckToRelease(TransferHeader: Record "Transfer Header"): 

Parameters:

  • TransferHeader: Record to check

CalculateValidationType(Code[10]) : Integer#

Summary: Returns the 'Validation Type' from a Posting Code

procedure CalculateValidationType(PostingCode: Code[10]): Integer

Parameters:

  • PostingCode: The Posting Code from which the data is read

Returns: 'Validation Type' as Integer

GetPostingCodeFromValidType(Integer, Record KVSKBAPostingCode) :#

Summary: Get the Posting Code from a Validation Type, if none is found a new one is created

procedure GetPostingCodeFromValidType(ValidationType: Integer; var PostingCode: Record "KVSKBAPostingCode"): 

Parameters:

  • ValidationType: Validation Type to get the data from
  • PostingCode: Returned posting code record

GetLastDirectCost(Code[20], Code[10], Code[10], Date, Boolean, Boolean) : Decimal#

Summary: Get the Direct Cost from a Value entry for the Specified Parameter

procedure GetLastDirectCost(ItemNo: Code[20]; LocationCode: Code[10]; VariantCode: Code[10]; LastDate: Date; ByLocation: Boolean; ByVariant: Boolean): Decimal

Parameters:

  • ItemNo: Item No. to Search
  • LocationCode: Location Code to Search
  • VariantCode: Variant Code to Search
  • LastDate: Posting Date Filter to Search
  • ByLocation: Set if you want to filter by Location
  • ByVariant: Set if you want to filter by Variant

Returns: Direct Cost as Decimal

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 No. to search
  • LocationCode: Location Code to search
  • VariantCode: Variant Code to search
  • LastDate: Filter for Posting Date
  • ByLocation: Set if you want to search by Location Code
  • ByVariant: Set if you want to serach by Variant
  • CalcOriginal: Set of you want to Calculate the Original Unit Cost

Returns: Average Unit Cost as Decimal

GetLowestValue(Record Item Journal Line) : Decimal#

Summary: Get Lowest Unit Cost from a Item Journal Line

procedure GetLowestValue(var ItemJournalLine: Record "Item Journal Line"): Decimal

Parameters:

  • ItemJournalLine: Record to get the lowest Unit Cost

Returns: Lowest Value as Decimal

GlobalCheckItemLedgEntriesSingle(Record Item Ledger Entry, Integer) :#

Summary: Checks a Single Item Leder Entry if the qty to Cancel is set correctly

procedure GlobalCheckItemLedgEntriesSingle(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; LineRef: Integer): 

Parameters:

  • TempItemLedgerEntry: Record to Check
  • LineRef: Sets Line No. in Error Message

Events#

OnAfterTransHeaderCheckToRelease(Record Transfer Header) :#

[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;

OnAfterTransHeaderTransferToCode(Record Transfer Header, Record Location) :#

[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;

OnBeforeTransHeaderAutoPostRcpt(Record Transfer Header, Boolean) :#

[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;

OnBeforeCheckItemLedgEntriesSingle(Record Item Ledger Entry, Integer, Boolean) :#

[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;