diff --git a/src/Layers/APAC/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al b/src/Layers/APAC/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al index 4302a209ae..e9f113edd5 100644 --- a/src/Layers/APAC/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al +++ b/src/Layers/APAC/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al @@ -212,7 +212,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo); + OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -351,7 +351,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine); + OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -1923,7 +1923,7 @@ codeunit 22 "Item Jnl.-Post Line" InsertItemLedgEntry(NewItemLedgEntry, true); IsHandled := false; - OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled); + OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled, ItemJnlLine); if not IsHandled then begin InsertValueEntry(NewValueEntry, NewItemLedgEntry, true); UpdateUnitCost(NewValueEntry); @@ -3082,7 +3082,7 @@ codeunit 22 "Item Jnl.-Post Line" CalcCostPerUnit(ValueEntry."Cost Amount (Actual) (ACY)", ValueEntry."Valued Quantity", true); IsHandled := false; - OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled); + OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled, ItemJnlLine); if IsHandled then exit; @@ -4681,7 +4681,7 @@ codeunit 22 "Item Jnl.-Post Line" NewValueEntry."Item Register No." := ItemReg."No."; ShouldInsertValueEntry := true; - OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry); + OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry, ItemJnlLine); if not ShouldInsertValueEntry then exit; @@ -6302,7 +6302,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer) + local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -6312,7 +6312,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(true, false)] - local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line") + local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -8861,17 +8861,17 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean) + local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean) + local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean) + local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; diff --git a/src/Layers/CH/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al b/src/Layers/CH/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al index cc5905f866..f18f197401 100644 --- a/src/Layers/CH/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al +++ b/src/Layers/CH/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al @@ -212,7 +212,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo); + OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -351,7 +351,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine); + OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -1921,7 +1921,7 @@ codeunit 22 "Item Jnl.-Post Line" InsertItemLedgEntry(NewItemLedgEntry, true); IsHandled := false; - OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled); + OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled, ItemJnlLine); if not IsHandled then begin InsertValueEntry(NewValueEntry, NewItemLedgEntry, true); UpdateUnitCost(NewValueEntry); @@ -3072,7 +3072,7 @@ codeunit 22 "Item Jnl.-Post Line" CalcCostPerUnit(ValueEntry."Cost Amount (Actual) (ACY)", ValueEntry."Valued Quantity", true); IsHandled := false; - OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled); + OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled, ItemJnlLine); if IsHandled then exit; @@ -4653,7 +4653,7 @@ codeunit 22 "Item Jnl.-Post Line" NewValueEntry."Item Register No." := ItemReg."No."; ShouldInsertValueEntry := true; - OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry); + OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry, ItemJnlLine); if not ShouldInsertValueEntry then exit; @@ -6273,7 +6273,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer) + local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -6283,7 +6283,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(true, false)] - local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line") + local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -8832,17 +8832,17 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean) + local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean) + local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean) + local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; diff --git a/src/Layers/ES/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al b/src/Layers/ES/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al index e7eda4fa2f..b3a6897d82 100644 --- a/src/Layers/ES/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al +++ b/src/Layers/ES/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al @@ -212,7 +212,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo); + OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -351,7 +351,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine); + OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -1921,7 +1921,7 @@ codeunit 22 "Item Jnl.-Post Line" InsertItemLedgEntry(NewItemLedgEntry, true); IsHandled := false; - OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled); + OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled, ItemJnlLine); if not IsHandled then begin InsertValueEntry(NewValueEntry, NewItemLedgEntry, true); UpdateUnitCost(NewValueEntry); @@ -3081,7 +3081,7 @@ codeunit 22 "Item Jnl.-Post Line" CalcCostPerUnit(ValueEntry."Cost Amount (Actual) (ACY)", ValueEntry."Valued Quantity", true); IsHandled := false; - OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled); + OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled, ItemJnlLine); if IsHandled then exit; @@ -4662,7 +4662,7 @@ codeunit 22 "Item Jnl.-Post Line" NewValueEntry."Item Register No." := ItemReg."No."; ShouldInsertValueEntry := true; - OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry); + OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry, ItemJnlLine); if not ShouldInsertValueEntry then exit; @@ -6283,7 +6283,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer) + local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -6293,7 +6293,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(true, false)] - local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line") + local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -8842,17 +8842,17 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean) + local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean) + local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean) + local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; diff --git a/src/Layers/IT/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al b/src/Layers/IT/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al index 367f70b51a..84d30eca37 100644 --- a/src/Layers/IT/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al +++ b/src/Layers/IT/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al @@ -215,7 +215,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo); + OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -354,7 +354,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine); + OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -1936,7 +1936,7 @@ codeunit 22 "Item Jnl.-Post Line" InsertItemLedgEntry(NewItemLedgEntry, true); IsHandled := false; - OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled); + OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled, ItemJnlLine); if not IsHandled then begin InsertValueEntry(NewValueEntry, NewItemLedgEntry, true); UpdateUnitCost(NewValueEntry); @@ -3099,7 +3099,7 @@ codeunit 22 "Item Jnl.-Post Line" CalcCostPerUnit(ValueEntry."Cost Amount (Actual) (ACY)", ValueEntry."Valued Quantity", true); IsHandled := false; - OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled); + OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled, ItemJnlLine); if IsHandled then exit; @@ -4680,7 +4680,7 @@ codeunit 22 "Item Jnl.-Post Line" NewValueEntry."Item Register No." := ItemReg."No."; ShouldInsertValueEntry := true; - OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry); + OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry, ItemJnlLine); if not ShouldInsertValueEntry then exit; @@ -6300,7 +6300,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer) + local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -6310,7 +6310,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(true, false)] - local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line") + local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -8859,17 +8859,17 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean) + local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean) + local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean) + local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; diff --git a/src/Layers/RU/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al b/src/Layers/RU/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al index dcd14584c0..0159ef0f5a 100644 --- a/src/Layers/RU/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al +++ b/src/Layers/RU/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al @@ -222,7 +222,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo); + OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -361,7 +361,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine); + OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -1939,7 +1939,7 @@ codeunit 22 "Item Jnl.-Post Line" InsertItemLedgEntry(NewItemLedgEntry, true); IsHandled := false; - OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled); + OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled, ItemJnlLine); if not IsHandled then begin InsertValueEntry(NewValueEntry, NewItemLedgEntry, true); UpdateUnitCost(NewValueEntry); @@ -3111,7 +3111,7 @@ codeunit 22 "Item Jnl.-Post Line" CalcCostPerUnit(ValueEntry."Cost Amount (Actual) (ACY)", ValueEntry."Valued Quantity", true); IsHandled := false; - OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled); + OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled, ItemJnlLine); if IsHandled then exit; @@ -4696,7 +4696,7 @@ codeunit 22 "Item Jnl.-Post Line" NewValueEntry."Item Register No." := ItemReg."No."; ShouldInsertValueEntry := true; - OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry); + OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry, ItemJnlLine); if not ShouldInsertValueEntry then exit; @@ -6618,7 +6618,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer) + local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -6628,7 +6628,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(true, false)] - local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line") + local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -9177,17 +9177,17 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean) + local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean) + local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean) + local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; diff --git a/src/Layers/W1/BaseApp/Assembly/Document/AssemblyLine.Table.al b/src/Layers/W1/BaseApp/Assembly/Document/AssemblyLine.Table.al index 3539fd7174..6479970d34 100644 --- a/src/Layers/W1/BaseApp/Assembly/Document/AssemblyLine.Table.al +++ b/src/Layers/W1/BaseApp/Assembly/Document/AssemblyLine.Table.al @@ -898,13 +898,21 @@ table 901 "Assembly Line" end; procedure MaxQtyToConsume(): Decimal + var + NewMaxQtyToConsume: Decimal; begin - exit("Remaining Quantity"); + NewMaxQtyToConsume := "Remaining Quantity"; + OnAfterMaxQtyToConsume(Rec, NewMaxQtyToConsume); + exit(NewMaxQtyToConsume); end; local procedure MaxQtyToConsumeBase(): Decimal + var + NewMaxQtyToConsumeBase: Decimal; begin - exit("Remaining Quantity (Base)"); + NewMaxQtyToConsumeBase := "Remaining Quantity (Base)"; + OnAfterMaxQtyToConsumeBase(Rec, NewMaxQtyToConsumeBase); + exit(NewMaxQtyToConsumeBase); end; local procedure GetSKU() @@ -2289,6 +2297,16 @@ table 901 "Assembly Line" begin end; + [IntegrationEvent(false, false)] + local procedure OnAfterMaxQtyToConsume(var AssemblyLine: Record "Assembly Line"; var MaxQuantityToConsume: Decimal) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterMaxQtyToConsumeBase(var AssemblyLine: Record "Assembly Line"; var MaxQuantityToConsumeBase: Decimal) + begin + end; + [IntegrationEvent(false, false)] local procedure OnAfterSetReservationFilters(var ReservEntry: Record "Reservation Entry"; AssemblyLine: Record "Assembly Line"); begin diff --git a/src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al b/src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al index 3ec23a8f0d..a6bbf7d626 100644 --- a/src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al +++ b/src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al @@ -212,7 +212,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo); + OnBeforePostItemJnlLine(ItemJnlLine, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ValueEntryNo, ItemApplnEntryNo, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -351,7 +351,7 @@ codeunit 22 "Item Jnl.-Post Line" xItemLedgEntryNo := ItemLedgEntryNo; xItemApplnEntryNo := ItemApplnEntryNo; xValueEntryNo := ValueEntryNo; - OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine); + OnAfterPostItemJnlLine(ItemJnlLine, GlobalItemLedgEntry, ValueEntryNo, InventoryPostingToGL, CalledFromAdjustment, CalledFromInvtPutawayPick, ItemReg, ItemLedgEntryNo, ItemApplnEntryNo, WhseJnlRegisterLine, PhysInvtEntryNo, CapLedgEntryNo); ValidateSequenceNo(ItemLedgEntryNo, xItemLedgEntryNo, Database::"Item Ledger Entry"); ValidateSequenceNo(ItemApplnEntryNo, xItemApplnEntryNo, Database::"Item Application Entry"); ValidateSequenceNo(ValueEntryNo, xValueEntryNo, Database::"Value Entry"); @@ -1921,7 +1921,7 @@ codeunit 22 "Item Jnl.-Post Line" InsertItemLedgEntry(NewItemLedgEntry, true); IsHandled := false; - OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled); + OnInsertTransferEntryOnBeforeInsertValueEntry(NewValueEntry, NewItemLedgEntry, ValueEntryNo, IsHandled, ItemJnlLine); if not IsHandled then begin InsertValueEntry(NewValueEntry, NewItemLedgEntry, true); UpdateUnitCost(NewValueEntry); @@ -3068,7 +3068,7 @@ codeunit 22 "Item Jnl.-Post Line" CalcCostPerUnit(ValueEntry."Cost Amount (Actual) (ACY)", ValueEntry."Valued Quantity", true); IsHandled := false; - OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled); + OnInsertVarValueEntryOnBeforeInsertValueEntry(ValueEntry, GlobalItemLedgEntry, IsHandled, ItemJnlLine); if IsHandled then exit; @@ -4649,7 +4649,7 @@ codeunit 22 "Item Jnl.-Post Line" NewValueEntry."Item Register No." := ItemReg."No."; ShouldInsertValueEntry := true; - OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry); + OnInsertCorrValueEntryOnBeforeInsert(NewValueEntry, ItemLedgEntry, ShouldInsertValueEntry, ItemJnlLine); if not ShouldInsertValueEntry then exit; @@ -6269,7 +6269,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer) + local procedure OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ValueEntryNo: Integer; var ItemApplnEntryNo: Integer; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -6279,7 +6279,7 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(true, false)] - local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line") + local procedure OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var InventoryPostingToGL: Codeunit "Inventory Posting To G/L"; CalledFromAdjustment: Boolean; CalledFromInvtPutawayPick: Boolean; var ItemRegister: Record "Item Register"; var ItemLedgEntryNo: Integer; var ItemApplnEntryNo: Integer; var WhseJnlRegisterLine: Codeunit "Whse. Jnl.-Register Line"; var PhysicalInventoryEntryNo: Integer; var CapacityLedgerEntryNo: Integer) begin end; @@ -8828,17 +8828,17 @@ codeunit 22 "Item Jnl.-Post Line" end; [IntegrationEvent(false, false)] - local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean) + local procedure OnInsertVarValueEntryOnBeforeInsertValueEntry(var ValueEntry: Record "Value Entry"; var GlobalItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean) + local procedure OnInsertTransferEntryOnBeforeInsertValueEntry(var NewValueEntry: Record "Value Entry"; var NewItemLedgerEntry: Record "Item Ledger Entry"; var ValueEntryNo: Integer; var IsHandled: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; [IntegrationEvent(false, false)] - local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean) + local procedure OnInsertCorrValueEntryOnBeforeInsert(var NewValueEntry: Record "Value Entry"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ShouldInsertValueEntry: Boolean; ItemJournalLine: Record "Item Journal Line") begin end; diff --git a/src/Layers/W1/BaseApp/Manufacturing/Routing/CalculateRoutingLine.Codeunit.al b/src/Layers/W1/BaseApp/Manufacturing/Routing/CalculateRoutingLine.Codeunit.al index badc11e4c6..ea55e2e741 100644 --- a/src/Layers/W1/BaseApp/Manufacturing/Routing/CalculateRoutingLine.Codeunit.al +++ b/src/Layers/W1/BaseApp/Manufacturing/Routing/CalculateRoutingLine.Codeunit.al @@ -185,7 +185,7 @@ codeunit 99000774 "Calculate Routing Line" IsHandled: Boolean; begin IsHandled := false; - OnBeforeCreateLoadBack(RemainNeedQty, CalendarEntry, TimeType, Write, FirstEntry, WaitTimeOnly, CurrentWorkCenterNo, ProdStartingDate, ProdStartingTime, ProdEndingDate, ProdEndingTime, IsHandled, RemainNeedQtyBase); + OnBeforeCreateLoadBack(RemainNeedQty, CalendarEntry, TimeType, Write, FirstEntry, WaitTimeOnly, CurrentWorkCenterNo, ProdStartingDate, ProdStartingTime, ProdEndingDate, ProdEndingTime, IsHandled, RemainNeedQtyBase, CurrentTimeFactor); if IsHandled then exit; @@ -286,7 +286,7 @@ codeunit 99000774 "Calculate Routing Line" IsHandled: Boolean; begin IsHandled := false; - OnBeforeCreateLoadForward(RemainNeedQty, CalendarEntry, TimeType, Write, LoadFactor, FirstEntry, WaitTimeOnly, CurrentWorkCenterNo, ProdStartingDate, ProdStartingTime, ProdEndingDate, ProdEndingTime, IsHandled, RemainNeedQtyBase); + OnBeforeCreateLoadForward(RemainNeedQty, CalendarEntry, TimeType, Write, LoadFactor, FirstEntry, WaitTimeOnly, CurrentWorkCenterNo, ProdStartingDate, ProdStartingTime, ProdEndingDate, ProdEndingTime, IsHandled, RemainNeedQtyBase, CurrentTimeFactor); if IsHandled then exit; @@ -2393,7 +2393,7 @@ codeunit 99000774 "Calculate Routing Line" end; [IntegrationEvent(false, false)] - local procedure OnCreateLoadForwardOnBeforeEndStopLoop(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; TimeType: Enum "Routing Time Type"; var StopLoop: Boolean; FirstEntry: Boolean; WaitTimeOnly: Boolean; ProdStartingDate: Date; ProdStartingTime: Time; ProdEndingDate: Date; ProdEndingTime: Time; var RemainNeedQty: Decimal; var RemainNeedQtyBase: Decimal; var Write: Boolean; LoadFactor: Decimal; CurrentWorkCenterNo: Code[20]; var CurrentTimeFactor: Decimal; var CurrentRounding: Decimal; var CalendarEntry: Record "Calendar Entry") + local procedure OnCreateLoadForwardOnBeforeEndStopLoop(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var TimeType: Enum "Routing Time Type"; var StopLoop: Boolean; FirstEntry: Boolean; WaitTimeOnly: Boolean; ProdStartingDate: Date; ProdStartingTime: Time; ProdEndingDate: Date; ProdEndingTime: Time; var RemainNeedQty: Decimal; var RemainNeedQtyBase: Decimal; var Write: Boolean; var LoadFactor: Decimal; var CurrentWorkCenterNo: Code[20]; var CurrentTimeFactor: Decimal; var CurrentRounding: Decimal; var CalendarEntry: Record "Calendar Entry") begin end; @@ -2558,12 +2558,12 @@ codeunit 99000774 "Calculate Routing Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforeCreateLoadBack(var RemainNeedQty: Decimal; CalendarEntry: Record "Calendar Entry"; TimeType: Enum "Routing Time Type"; Write: Boolean; FirstEntry: Boolean; WaitTimeOnly: Boolean; CurrentWorkCenterNo: Code[20]; ProdStartingDate: Date; ProdStartingTime: Time; ProdEndingDate: Date; ProdEndingTime: Time; var IsHandled: Boolean; var RemainNeedQtyBase: Decimal) + local procedure OnBeforeCreateLoadBack(var RemainNeedQty: Decimal; CalendarEntry: Record "Calendar Entry"; var TimeType: Enum "Routing Time Type"; var Write: Boolean; FirstEntry: Boolean; WaitTimeOnly: Boolean; var CurrentWorkCenterNo: Code[20]; ProdStartingDate: Date; ProdStartingTime: Time; ProdEndingDate: Date; ProdEndingTime: Time; var IsHandled: Boolean; var RemainNeedQtyBase: Decimal; var CurrentTimeFactor: Decimal) begin end; [IntegrationEvent(false, false)] - local procedure OnBeforeCreateLoadForward(var RemainNeedQty: Decimal; CalendarEntry: Record "Calendar Entry"; TimeType: Enum "Routing Time Type"; Write: Boolean; LoadFactor: Decimal; FirstEntry: Boolean; WaitTimeOnly: Boolean; CurrentWorkCenterNo: Code[20]; ProdStartingDate: Date; ProdStartingTime: Time; ProdEndingDate: Date; ProdEndingTime: Time; var IsHandled: Boolean; var RemainNeedQtyBase: Decimal) + local procedure OnBeforeCreateLoadForward(var RemainNeedQty: Decimal; CalendarEntry: Record "Calendar Entry"; var TimeType: Enum "Routing Time Type"; var Write: Boolean; var LoadFactor: Decimal; FirstEntry: Boolean; WaitTimeOnly: Boolean; var CurrentWorkCenterNo: Code[20]; ProdStartingDate: Date; ProdStartingTime: Time; ProdEndingDate: Date; ProdEndingTime: Time; var IsHandled: Boolean; var RemainNeedQtyBase: Decimal; var CurrentTimeFactor: Decimal) begin end; diff --git a/src/Layers/W1/BaseApp/Purchases/History/UndoPurchaseReceiptLine.Codeunit.al b/src/Layers/W1/BaseApp/Purchases/History/UndoPurchaseReceiptLine.Codeunit.al index cdead00a2b..821c533574 100644 --- a/src/Layers/W1/BaseApp/Purchases/History/UndoPurchaseReceiptLine.Codeunit.al +++ b/src/Layers/W1/BaseApp/Purchases/History/UndoPurchaseReceiptLine.Codeunit.al @@ -85,6 +85,7 @@ codeunit 5813 "Undo Purchase Receipt Line" ItemRcptEntryNo: Integer; DocLineNo: Integer; PostedWhseRcptLineFound: Boolean; + ShouldFindPostedWhseRcptLine: Boolean; begin OnBeforeCode(PurchRcptLine, UndoPostingMgt); @@ -106,7 +107,9 @@ codeunit 5813 "Undo Purchase Receipt Line" UndoDropShipmentPurchRcptLine(PurchRcptLine); - if PurchRcptLine.Type = PurchRcptLine.Type::Item then begin + ShouldFindPostedWhseRcptLine := PurchRcptLine.Type = PurchRcptLine.Type::Item; + OnCodeOnBeforeFindPostedWhseRcptLine(PurchRcptLine, ShouldFindPostedWhseRcptLine); + if ShouldFindPostedWhseRcptLine then begin PostedWhseRcptLineFound := WhseUndoQty.FindPostedWhseRcptLine( PostedWhseRcptLine, @@ -651,6 +654,11 @@ codeunit 5813 "Undo Purchase Receipt Line" begin end; + [IntegrationEvent(false, false)] + local procedure OnCodeOnBeforeFindPostedWhseRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var ShouldFindPostedWhseRcptLine: Boolean) + begin + end; + [IntegrationEvent(false, false)] local procedure OnAfterNewPurchRcptLineInsert(var NewPurchRcptLine: Record "Purch. Rcpt. Line"; OldPurchRcptLine: Record "Purch. Rcpt. Line"; var TempGlobalItemEntryRelation: Record "Item Entry Relation" temporary; var SkipInsertItemEntryRelation: Boolean) begin diff --git a/src/Layers/W1/BaseApp/Warehouse/Availability/WarehouseAvailabilityMgt.Codeunit.al b/src/Layers/W1/BaseApp/Warehouse/Availability/WarehouseAvailabilityMgt.Codeunit.al index 26a4f4bcaa..e55cf7dd8c 100644 --- a/src/Layers/W1/BaseApp/Warehouse/Availability/WarehouseAvailabilityMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Warehouse/Availability/WarehouseAvailabilityMgt.Codeunit.al @@ -906,7 +906,13 @@ codeunit 7314 "Warehouse Availability Mgt." Location: Record Location; ItemTrackingSetup: Record "Item Tracking Setup"; QtyOnShipmentBin: Decimal; + IsHandled: Boolean; begin + IsHandled := false; + OnBeforeValidateQtyPickedInShipmentBin(QtyPicked, LocationCode, ItemNo, VariantCode, TrackingSpecification, SourceType, IsHandled); + if IsHandled then + exit; + if not (Location.RequireShipment(LocationCode) and (QtyPicked <> 0)) then exit; @@ -927,6 +933,11 @@ codeunit 7314 "Warehouse Availability Mgt." begin end; + [IntegrationEvent(false, false)] + local procedure OnBeforeValidateQtyPickedInShipmentBin(var QtyPicked: Decimal; LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; TrackingSpecification: Record "Tracking Specification"; SourceType: Integer; var IsHandled: Boolean) + begin + end; + [IntegrationEvent(false, false)] local procedure OnAfterCalcReservedQtyOnInventory(var Item: Record Item; var ReservedQtyOnInventory: Decimal; Location: Record Location) begin diff --git a/src/Layers/W1/BaseApp/Warehouse/Journal/WhseJnlRegisterLine.Codeunit.al b/src/Layers/W1/BaseApp/Warehouse/Journal/WhseJnlRegisterLine.Codeunit.al index 231015e2c6..0a5f732197 100644 --- a/src/Layers/W1/BaseApp/Warehouse/Journal/WhseJnlRegisterLine.Codeunit.al +++ b/src/Layers/W1/BaseApp/Warehouse/Journal/WhseJnlRegisterLine.Codeunit.al @@ -49,7 +49,7 @@ codeunit 7301 "Whse. Jnl.-Register Line" IsHandled: Boolean; begin xGlobalWhseEntryNo := GlobalWhseEntryNo; - OnBeforeCode(WhseJnlLine, GlobalWhseEntryNo, IsHandled); + OnBeforeCode(WhseJnlLine, GlobalWhseEntryNo, IsHandled, WhseReg); ValidateSequenceNo(GlobalWhseEntryNo, xGlobalWhseEntryNo, Database::"Warehouse Entry"); if IsHandled then exit; @@ -653,7 +653,7 @@ codeunit 7301 "Whse. Jnl.-Register Line" end; [IntegrationEvent(false, false)] - local procedure OnBeforeCode(var WarehouseJournalLine: Record "Warehouse Journal Line"; var WhseEntryNo: Integer; var IsHandled: Boolean) + local procedure OnBeforeCode(var WarehouseJournalLine: Record "Warehouse Journal Line"; var WhseEntryNo: Integer; var IsHandled: Boolean; var WarehouseRegister: Record "Warehouse Register") begin end;