Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rmax_custom/api/delivery_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,11 @@ def unmark_consolidated_dns_billed(si_name):
):
try:
dn = frappe.get_doc("Delivery Note", dn_name)
# update_billing_status recomputes per_billed (→ 0 for a pure net-off
# DN) but does NOT re-derive the status field; set_status must run
# after it or the DN stays stuck on "Completed".
dn.update_billing_status(update_modified=False)
dn.set_status(update=True, update_modified=False)
except Exception:
frappe.db.set_value(
"Delivery Note", dn_name,
Expand Down
Loading