Files
erpnext/erpnext/controllers/tests
Mihir Kandoi 1e5cc08b1d refactor: share the row close plumbing across doctypes
Removes the duplication left over from adding the doctypes one at a time.

`is_bundle_of_closed_row` was copied between the Sales Order and Delivery Note
mappers, differing only in a doctype name; it now derives that from the packed
item's parenttype. `is_item_closable` was identical on Delivery Note and
Purchase Receipt and repeated the billing clause on the order doctypes; billing
is now the default on AccountsController and the orders add their own
fulfilment axis. The close dialog config was written out per doctype, differing
by a qty field, a column label and a sentence, and is now two builders in
erpnext/public/js/utils/item_close.js.

Also stops counting closed rows as committed spend in the budget's ordered
amount, which sums per row but only guarded the parent status.

When every row is closed there is nothing left to measure against, so the
percentage falls back to the whole table and reports what actually happened.
Writing off two unbilled rows leaves per_billed at 0; writing off two rows that
were fully received leaves per_received at 100 and per_billed at 0. A constant
would have been wrong in one direction or the other.
2026-07-29 15:56:04 +05:30
..
2016-06-09 16:56:54 +05:30