fix: align with 'Partly/Fully X' nomenclature in so & po

This commit is contained in:
David Arnold 2024-01-22 22:46:03 +01:00
parent b1aef01a1f
commit 7d8aa469d7
No known key found for this signature in database
GPG Key ID: AB15A6AF1101390D
4 changed files with 5 additions and 5 deletions

View File

@ -1280,7 +1280,7 @@
"no_copy": 1, "no_copy": 1,
"oldfieldname": "status", "oldfieldname": "status",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Not Initiated\nInitiated\nPartially Paid\nPaid", "options": "Not Initiated\nInitiated\nPartially Paid\nFully Paid",
"print_hide": 1 "print_hide": 1
} }
], ],

View File

@ -1806,7 +1806,7 @@ class AccountsController(TransactionBase):
new_status = None new_status = None
# if money is paid set the paid states # if money is paid set the paid states
if advance_paid: if advance_paid:
new_status = "Partially Paid" if advance_paid < order_total else "Paid" new_status = "Partially Paid" if advance_paid < order_total else "Fully Paid"
if not new_status: if not new_status:
prs = frappe.db.count( prs = frappe.db.count(

View File

@ -19,7 +19,7 @@ def execute():
so.advance_paid < (so.rounded_total or so.grand_total) so.advance_paid < (so.rounded_total or so.grand_total)
).run() ).run()
frappe.qb.update(so).set(so.advance_payment_status, "Paid").where(so.docstatus == 1).where( frappe.qb.update(so).set(so.advance_payment_status, "Fully Paid").where(so.docstatus == 1).where(
so.advance_payment_status.isnull() so.advance_payment_status.isnull()
).where(so.advance_paid == (so.rounded_total or so.grand_total)).run() ).where(so.advance_paid == (so.rounded_total or so.grand_total)).run()
@ -42,7 +42,7 @@ def execute():
po.advance_paid < (po.rounded_total or po.grand_total) po.advance_paid < (po.rounded_total or po.grand_total)
).run() ).run()
frappe.qb.update(po).set(po.advance_payment_status, "Paid").where(po.docstatus == 1).where( frappe.qb.update(po).set(po.advance_payment_status, "Fully Paid").where(po.docstatus == 1).where(
po.advance_payment_status.isnull() po.advance_payment_status.isnull()
).where(po.advance_paid == (po.rounded_total or po.grand_total)).run() ).where(po.advance_paid == (po.rounded_total or po.grand_total)).run()

View File

@ -1649,7 +1649,7 @@
"in_standard_filter": 1, "in_standard_filter": 1,
"label": "Advance Payment Status", "label": "Advance Payment Status",
"no_copy": 1, "no_copy": 1,
"options": "Not Requested\nRequested\nPartially Paid\nPaid", "options": "Not Requested\nRequested\nPartially Paid\nFully Paid",
"print_hide": 1 "print_hide": 1
} }
], ],