[Subcontracting] Fix Subcontracting item charge posting for last operation#8570
Conversation
- Add logic to handle item charge assignment for last operation in subcontracting receipts. - Introduce new test codeunit for validating item charge posting scenarios. - Ensure correct linking of value entries to item ledger entries during posting.
Agentic PR Review - Round 1Recommendation: Accept with SuggestionsWhat this PR doesThis PR changes subcontracting item-charge posting so charges assigned to a receipt for the last routing operation stay on the item-ledger-entry posting path, while intermediate operations keep the existing capacity/output posting path. The change looks targeted: SuggestionsS1 - Add a non-last regression test Risk assessment and necessityRisk: The regression surface is limited to subcontracting item-charge invoice posting for posted purchase receipt lines in Necessity: The change is necessary for a valid costing scenario: posting item charges after receiving the last subcontracting operation should apply cost to the produced item ledger entry, not fail through capacity-ledger posting. The scope is appropriately narrow and includes a test for the failing path.
|
What & why
Discovered during Subcontracting Tests:
Linked work
Fixes AB#632496
How I validated this
What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)