fix: validation message for work order
This commit is contained in:
parent
1a7e438fb2
commit
e0412a177c
@ -293,8 +293,9 @@ class StockEntry(StockController):
|
|||||||
total_completed_qty = flt(self.fg_completed_qty) + flt(prod_order.produced_qty)
|
total_completed_qty = flt(self.fg_completed_qty) + flt(prod_order.produced_qty)
|
||||||
completed_qty = d.completed_qty + (allowance_percentage/100 * d.completed_qty)
|
completed_qty = d.completed_qty + (allowance_percentage/100 * d.completed_qty)
|
||||||
if total_completed_qty > flt(completed_qty):
|
if total_completed_qty > flt(completed_qty):
|
||||||
frappe.throw(_("Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order # {3}. Please update operation status via Time Logs")
|
job_card = frappe.db.get_value('Job Card', {'operation_id': d.name}, 'name')
|
||||||
.format(d.idx, d.operation, total_completed_qty, self.work_order), OperationsNotCompleteError)
|
frappe.throw(_("Row #{0}: Operation {1} is not completed for {2} qty of finished goods in Work Order # {3}. Please update operation status via Job Card # {4}")
|
||||||
|
.format(d.idx, d.operation, total_completed_qty, self.work_order, job_card), OperationsNotCompleteError)
|
||||||
|
|
||||||
def check_duplicate_entry_for_work_order(self):
|
def check_duplicate_entry_for_work_order(self):
|
||||||
other_ste = [t[0] for t in frappe.db.get_values("Stock Entry", {
|
other_ste = [t[0] for t in frappe.db.get_values("Stock Entry", {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user