Nav buttons in Operations section now in alphabetical order across all 11 pages: Engineering Holds, External Process, Job Drawing Status, Unused Items, WO Shortages. Fixed Awaiting Shipment query: - Primary focus on manufactured part (the item in stockroom), not finished part - Added wm_op.womatl_qtyiss < wm_op.womatl_qtyreq filter to exclude completed external process cycles (was showing 10-year-old data) - Removed unreliable date_in_stockroom/days_waiting columns - Added WO number and manufactured part description columns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
3.3 KiB
JSON
30 lines
3.3 KiB
JSON
{
|
|
"gitSyncId": "92766f0f754242df9f949173_a94ef679-7680-4d06-bcfa-21cdbdf67af6",
|
|
"id": "Operations - External Process_awaiting_shipment",
|
|
"pluginId": "postgres-plugin",
|
|
"pluginType": "DB",
|
|
"unpublishedAction": {
|
|
"actionConfiguration": {
|
|
"body": "-- Manufactured parts awaiting shipment to external vendor\n-- The manufactured part has been produced (womatl issued) but the\n-- outside process (EXTLAB) has not been completed yet and no open PO exists.\nSELECT\n mi.item_number AS manufactured_pn,\n mi.item_descrip1 AS manufactured_desc,\n fi.item_number AS finished_pn,\n opi.item_number AS ext_labor_pn,\n wm_mfg.womatl_qtyiss AS qty_ready,\n formatwonumber(parent_wo.wo_id) AS wo_number,\n COALESCE(dv.vend_name, '') AS expected_vendor,\n COALESCE((\n SELECT SUM(w2.wo_qtyord - w2.wo_qtyrcv)\n FROM wo w2\n JOIN itemsite is2 ON w2.wo_itemsite_id = is2.itemsite_id\n WHERE is2.itemsite_item_id = fi.item_id\n AND w2.wo_status IN ('R','E','I')\n ), 0) AS wo_demand\nFROM wo parent_wo\nJOIN itemsite fis ON parent_wo.wo_itemsite_id = fis.itemsite_id\nJOIN item fi ON fis.itemsite_item_id = fi.item_id\n-- Find the outside process material on this WO\nJOIN womatl wm_op ON parent_wo.wo_id = wm_op.womatl_wo_id\nJOIN itemsite opis ON wm_op.womatl_itemsite_id = opis.itemsite_id\nJOIN item opi ON opis.itemsite_item_id = opi.item_id\nJOIN classcode cc ON opi.item_classcode_id = cc.classcode_id\n-- Find the manufactured part material on this WO\nJOIN womatl wm_mfg ON parent_wo.wo_id = wm_mfg.womatl_wo_id\n AND wm_mfg.womatl_id != wm_op.womatl_id\nJOIN itemsite mis ON wm_mfg.womatl_itemsite_id = mis.itemsite_id\nJOIN item mi ON mis.itemsite_item_id = mi.item_id\nJOIN classcode cc_mfg ON mi.item_classcode_id = cc_mfg.classcode_id\n-- Default vendor for the outside process item\nLEFT JOIN itemsrc isrc ON isrc.itemsrc_item_id = opi.item_id AND isrc.itemsrc_active\nLEFT JOIN vendinfo dv ON isrc.itemsrc_vend_id = dv.vend_id\nWHERE cc.classcode_code = 'EXTLAB'\n AND opi.item_type = 'O'\n AND cc_mfg.classcode_code != 'EXTLAB'\n AND mi.item_type != 'O'\n AND parent_wo.wo_status IN ('R','E','I')\n -- Manufactured material has been issued (machining complete)\n AND wm_mfg.womatl_qtyiss > 0\n -- Outside process NOT yet completed (material not fully issued/received)\n AND wm_op.womatl_qtyiss < wm_op.womatl_qtyreq\n -- No open PO exists for the outside process item\n AND NOT EXISTS (\n SELECT 1 FROM poitem pi2\n JOIN pohead ph2 ON pi2.poitem_pohead_id = ph2.pohead_id\n WHERE pi2.poitem_itemsite_id = opis.itemsite_id\n AND ph2.pohead_status = 'O'\n AND pi2.poitem_status = 'O'\n AND pi2.poitem_qty_received < pi2.poitem_qty_ordered\n )\nORDER BY manufactured_pn, fi.item_number;\n",
|
|
"encodeParamsToggle": true,
|
|
"paginationType": "NONE",
|
|
"pluginSpecifiedTemplates": [
|
|
{"value": true}
|
|
],
|
|
"timeoutInMillisecond": 30000
|
|
},
|
|
"confirmBeforeExecute": false,
|
|
"datasource": {
|
|
"id": "xTuple_GoLive",
|
|
"isAutoGenerated": false,
|
|
"name": "xTuple_GoLive",
|
|
"pluginId": "postgres-plugin"
|
|
},
|
|
"dynamicBindingPathList": [],
|
|
"name": "awaiting_shipment",
|
|
"pageId": "Operations - External Process",
|
|
"runBehaviour": "AUTOMATIC",
|
|
"userSetOnLoad": false
|
|
}
|
|
}
|