From 7d8aa469d78560fb5f11f7370db74c517d0d0c00 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 22 Jan 2024 22:46:03 +0100 Subject: [PATCH] fix: align with 'Partly/Fully X' nomenclature in so & po --- erpnext/buying/doctype/purchase_order/purchase_order.json | 2 +- erpnext/controllers/accounts_controller.py | 2 +- erpnext/patches/v15_0/create_advance_payment_status.py | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 97f2310c1a..9da49a79ee 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -1280,7 +1280,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "Not Initiated\nInitiated\nPartially Paid\nPaid", + "options": "Not Initiated\nInitiated\nPartially Paid\nFully Paid", "print_hide": 1 } ], diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 159e217e4b..7cc4bfe2c9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1806,7 +1806,7 @@ class AccountsController(TransactionBase): new_status = None # if money is paid set the paid states 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: prs = frappe.db.count( diff --git a/erpnext/patches/v15_0/create_advance_payment_status.py b/erpnext/patches/v15_0/create_advance_payment_status.py index ff5ba8f2d5..18ab9fa88c 100644 --- a/erpnext/patches/v15_0/create_advance_payment_status.py +++ b/erpnext/patches/v15_0/create_advance_payment_status.py @@ -19,7 +19,7 @@ def execute(): so.advance_paid < (so.rounded_total or so.grand_total) ).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() ).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) ).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() ).where(po.advance_paid == (po.rounded_total or po.grand_total)).run() diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 5b80dfd4d4..3c516d0ea3 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -1649,7 +1649,7 @@ "in_standard_filter": 1, "label": "Advance Payment Status", "no_copy": 1, - "options": "Not Requested\nRequested\nPartially Paid\nPaid", + "options": "Not Requested\nRequested\nPartially Paid\nFully Paid", "print_hide": 1 } ],