Merge pull request #16644 from rohitwaghchaure/fix_work_order_time_log_msg

fix: validation message for work order
This commit is contained in:
rohitwaghchaure 2019-02-13 09:49:25 +05:30 committed by GitHub
commit a0aaeafae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,8 +293,9 @@ class StockEntry(StockController):
total_completed_qty = flt(self.fg_completed_qty) + flt(prod_order.produced_qty)
completed_qty = d.completed_qty + (allowance_percentage/100 * d.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")
.format(d.idx, d.operation, total_completed_qty, self.work_order), OperationsNotCompleteError)
job_card = frappe.db.get_value('Job Card', {'operation_id': d.name}, 'name')
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):
other_ste = [t[0] for t in frappe.db.get_values("Stock Entry", {