Skip to content

Commit

Permalink
refactor: set default for 'update_billed_amount_in_delivery_note'
Browse files Browse the repository at this point in the history
(cherry picked from commit ee0c642)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Nov 20, 2023
1 parent e272041 commit 5da9a22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,7 @@
"label": "Use Company default Cost Center for Round off"
},
{
"default": "0",
"default": "1",
"depends_on": "eval: doc.is_return",
"fieldname": "update_billed_amount_in_delivery_note",
"fieldtype": "Check",
Expand All @@ -2173,7 +2173,7 @@
"link_fieldname": "consolidated_invoice"
}
],
"modified": "2023-11-03 14:39:38.012346",
"modified": "2023-11-20 11:51:43.555197",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
Expand Down
1 change: 1 addition & 0 deletions erpnext/controllers/sales_and_purchase_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def set_missing_values(source, target):
if doc.doctype == "Sales Invoice" or doc.doctype == "POS Invoice":
doc.consolidated_invoice = ""
doc.set("payments", [])
doc.update_billed_amount_in_delivery_note = True
for data in source.payments:
paid_amount = 0.00
base_paid_amount = 0.00
Expand Down

0 comments on commit 5da9a22

Please sign in to comment.