po_from_csv
Generates read-only purchase-order drafts from an approved MRP worksheet CSV, validating each vendor and product against EBMS to prevent duplicate orders.
Instructions
Turn an approved MRP worksheet into purchase-order drafts, read-only. Reads the CSV mrp_plan produced, after the planner set Approve to Y on BUY rows (and perhaps changed Order Qty or Vendor); checks every vendor and product against EBMS; and returns one draft per vendor with the exact body to POST to APINV with ebms_write. It creates nothing. A worksheet handed in twice cannot order twice: ebms_write refuses the duplicate EXTERNALID. Show the drafts and get a clear yes per purchase order before writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | The worksheet's CSV text, exactly as the user attached or pasted it. | |
| path | No | Path of the worksheet CSV on this computer. Give this or csv. | |
| company | Yes | Required. Company, by ID or name. Must match the worksheet's company. |