Why do you need this change?
#30007
Why do you need this change?
Purch.-Post publishes two integration events bracketing the warehouse journal posting step:
OnBeforePostItemJnlLineWhseLine
OnAfterPostItemJnlLineWhseLine
For warehouse-enabled purchase posting we need to move register state around the warehouse posting call:
before warehouse posting: Item Jnl.-Post Line.GetRegisters->Whse. Jnl.-Register Line.SetRegisters`
after warehouse posting: Whse. Jnl.-Register Line.GetRegisters -> Item Jnl.-Post Line.SetRegisters
The required procedures are not available in the BC 28 base application.
We subscribe to OnBeforePostItemJnlLineWhseLine on Purch.-Post and need to read the current register state from Item Jnl.-Post Line before the warehouse posting starts.
Current flow:
OnBeforePostItemJnlLineWhseLine:
→ ItemJnlPostLine.GetRegisters(ItemReg2, ItemApplnEntryNo2, WhseReg2, GLReg2,
NextVATEntryNo2, NextTransactionNo2) // Read from `Item Jnl.-Post Line`
→ WhseJnlPostLine.SetRegisters(...) // Seed into `Whse. Jnl.-Register Line`
[BC standard warehouse posting]
Item Jnl.-Post Line has no public procedure to read its register state (ItemReg, ItemLedgEntryNo, PhysInvtEntryNo, ValueEntryNo, CapLedgEntryNo, ItemApplnEntryNo).
OnAfterPostItemJnlLine is not enough here because it fires after Item Jnl.-Post Line has already finished posting. We need a direct read at the point where Purch.-Post is about to hand off to warehouse posting.
Describe the request
Please Add this procedure to codeunit 22 "Item Jnl.-Post Line":
public procedure GetRegisters(
var ItemReg2: Record "Item Register";
var ItemApplnEntryNo2: Integer;
var WhseReg2: Record "Warehouse Register";
var GLReg2: Record "G/L Register";
var NextVATEntryNo2: Integer;
var NextTransactionNo2: Integer)
begin
ItemReg2 := ItemReg;
ItemApplnEntryNo2 := ItemApplnEntryNo;
end;
Internal work item: AB#635917
Why do you need this change?
#30007
Why do you need this change?
Purch.-Post publishes two integration events bracketing the warehouse journal posting step:
OnBeforePostItemJnlLineWhseLine
OnAfterPostItemJnlLineWhseLine
For warehouse-enabled purchase posting we need to move register state around the warehouse posting call:
before warehouse posting: Item Jnl.-Post Line.GetRegisters->Whse. Jnl.-Register Line.SetRegisters`
after warehouse posting: Whse. Jnl.-Register Line.GetRegisters -> Item Jnl.-Post Line.SetRegisters
The required procedures are not available in the BC 28 base application.
We subscribe to OnBeforePostItemJnlLineWhseLine on Purch.-Post and need to read the current register state from Item Jnl.-Post Line before the warehouse posting starts.
Current flow:
Item Jnl.-Post Line has no public procedure to read its register state (ItemReg, ItemLedgEntryNo, PhysInvtEntryNo, ValueEntryNo, CapLedgEntryNo, ItemApplnEntryNo).
OnAfterPostItemJnlLine is not enough here because it fires after Item Jnl.-Post Line has already finished posting. We need a direct read at the point where Purch.-Post is about to hand off to warehouse posting.
Describe the request
Please Add this procedure to codeunit 22 "Item Jnl.-Post Line":
Internal work item: AB#635917