mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-29 14:48:26 +00:00
Extends row level close to Sales Order. Closing a row releases its reserved qty from Bin, settles its delivery and billing progress, and skips it when creating a Delivery Note, Sales Invoice, Pick List, Material Request or drop ship Purchase Order. A row holding Stock Reservation Entries cannot be closed. Releasing physical stock is a deliberate act, so the row has to be unreserved first rather than having its reservations cancelled as a side effect. Packed Items have no flag of their own and follow the Sales Order Item row that bundles them, both in the mappers and in the reserved qty rollup. Closed rows count as picked in the picking percentage, so the Pick List button stops offering a list that would map no rows. The close dialog moves to erpnext/public/js/utils/item_close.js and is shared with Purchase Order, with each doctype supplying its own eligibility rule, help text and columns. REOPEN_STATUS now records why the per doctype value matters: Sales Order re-checks the credit limit only on the literal "Draft", so each doctype reuses whatever its own Re-open button passes.