(Bug 633226): [Subcontracting] Standard Task not propagated from Routing to Prod. Order Routing or Subcontracting Worksheet; prices not picked up#8049
Conversation
…633226-Subcon_StandardTaskInRoutingNotHandled
There was a problem hiding this comment.
AL Documentation Audit
Documentation gaps were detected in the following apps:
- Subcontracting-Test: 7% documentation coverage
- Subcontracting: 25% documentation coverage
To generate documentation, run /al-docs init or /al-docs update using GitHub Copilot CLI or Claude Code.
This review is for awareness to help keep documentation in sync with code changes. It is okay to dismiss this request.
|
|
@ChethanT: |
ChethanT
left a comment
There was a problem hiding this comment.
We will wait for WIP Item work to be done before merging this
Summary
The Subcontracting Worksheet flow was dropping
Standard Task Codebetween the Prod. Order Routing Line and the Requisition Line, the field on the worksheet was read-only, and Subcontractor Prices keyed on a Standard Task were therefore never applied. This change:Standard Task CodefromProd. Order Routing LinetoRequisition Linein both worksheet-population paths (Calculate Subcontracts… on the worksheet, and direct PO creation from a Prod. Order Routing line).Standard Task Codefield editable on the Subcontracting Worksheet so users can override it.Direct Unit Cost.The bug enumerated four symptoms (Routing → Prod. Order Routing, Prod. Order Routing → Worksheet, field not editable, prices not picked up). Routing → Prod. Order Routing was already handled by
Prod. Order Routing Line.CopyFromRoutingLine; no change there. The remaining three are addressed below.Changes
SubcCalcSubcontractsExt.Codeunit.alExtended the existing
OnAfterTransferProdOrderRoutingLinesubscriber on reportSubc. Calculate Subcontractsto alsoValidate("Standard Task Code", ProdOrderRoutingLine."Standard Task Code")on the new requisition line. UsingValidate(not direct assignment) fires the field's OnValidate trigger inSubc. RequisitionLine, which callsUpdateSubcontractorPrice→Subc. Price Management.GetSubcPriceForReqLine. The price lookup already filtersSubcontractor PricebyRequisitionLine."Standard Task Code"exactly, so the standard-task-bound price is applied immediately.SubcPurchaseOrderCreator.Codeunit.alSame fix in
InsertReqWkshLine, which is the alternate worksheet-line builder used when a Subcontracting PO is created directly from a Prod. Order Routing Line (bypassing the worksheet UI).SubcSubcontractingWorksheet.Page.alRemoved
Editable = falsefrom theStandard Task Codefield and added a tooltip clarifying that editing the value re-applies the matching subcontractor price. The field's OnValidate already triggers price re-lookup, so manual edits/clears on the worksheet immediately updateDirect Unit Cost.Fixes AB#633226