From 7b3bcd3bc4933513daa05b2edad667f1bc30abf7 Mon Sep 17 00:00:00 2001 From: ramonalmato Date: Fri, 28 Jul 2023 10:57:31 +0200 Subject: [PATCH] fix: Job Card validation fixed when displaying total completed quantity (cherry picked from commit 49981fecc72acb387642689a47a2813d72543bc7) --- erpnext/manufacturing/doctype/job_card/job_card.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 2c17568d1b4f..d26006f8ce89 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -498,12 +498,12 @@ def validate_job_card(self): if self.for_quantity and flt(total_completed_qty, precision) != flt( self.for_quantity, precision ): - total_completed_qty = bold(_("Total Completed Qty")) + total_completed_qty_label = bold(_("Total Completed Qty")) qty_to_manufacture = bold(_("Qty to Manufacture")) frappe.throw( _("The {0} ({1}) must be equal to {2} ({3})").format( - total_completed_qty, + total_completed_qty_label, bold(flt(total_completed_qty, precision)), qty_to_manufacture, bold(self.for_quantity),