From 095d99dbd254adf677d1aac6c73c19e496d0f84f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:09:00 +0530 Subject: [PATCH 1/2] fix: patch - Duplicate entry quality inspection parameter (backport #38262) (#38265) fix: patch - Duplicate entry quality inspection parameter (#38262) (cherry picked from commit 0ca7527f7abddcab59edce434d0e68e1deebfc33) Co-authored-by: rohitwaghchaure --- erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py index e53bdf8f19e..08ddbbf3375 100644 --- a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py +++ b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py @@ -21,6 +21,9 @@ def execute(): params = set({x.casefold(): x for x in params}.values()) for parameter in params: + if frappe.db.exists("Quality Inspection Parameter", parameter): + continue + frappe.get_doc( {"doctype": "Quality Inspection Parameter", "parameter": parameter, "description": parameter} ).insert(ignore_permissions=True) From 190f77abffeca7bbc5983806caebce656a040035 Mon Sep 17 00:00:00 2001 From: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com> Date: Sun, 26 Nov 2023 18:56:34 +0530 Subject: [PATCH 2/2] fix: precision for invoice outstandings (#38323) fix: precision while setting inv outstanding --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 8a3f9341182..fb2f001cf12 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -358,6 +358,7 @@ def update_outstanding_amt( if against_voucher_type in ["Sales Invoice", "Purchase Invoice", "Fees"]: ref_doc = frappe.get_doc(against_voucher_type, against_voucher) + bal = flt(bal, frappe.get_precision(against_voucher_type, "outstanding_amount")) # Didn't use db_set for optimization purpose ref_doc.outstanding_amount = bal frappe.db.set_value(against_voucher_type, against_voucher, "outstanding_amount", bal)