From 9a19e06856798ce3b225ea9df974d136e746953a Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 18 Feb 2019 18:42:15 +0530 Subject: [PATCH] fix: Change Received qty to accepted qty and validation for indicators --- .../doctype/purchase_invoice/purchase_invoice.js | 9 ++++++--- .../purchase_invoice_item/purchase_invoice_item.json | 6 +++--- .../purchase_receipt_item/purchase_receipt_item.json | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 263b5bb75e..b4fd91f6e4 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -9,9 +9,12 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ this.setup_posting_date_time_check(); this._super(doc); - // formatter for material request item - this.frm.set_indicator_formatter('item_code', - function(doc) { return (doc.qty<=doc.received_qty) ? "green" : "orange" }) + // formatter for purchase invoice item + if(this.frm.doc.update_stock) { + this.frm.set_indicator_formatter('item_code', function(doc) { + return (doc.qty<=doc.received_qty) ? "green" : "orange"; + }); + } }, onload: function() { this._super(); diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index c2309b264a..7734163f3a 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -293,7 +293,7 @@ "length": 0, "no_copy": 0, "permlevel": 0, - "precision": "2", + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -321,7 +321,7 @@ "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 0, - "label": "Qty", + "label": "Accepted Qty", "length": 0, "no_copy": 0, "oldfieldname": "qty", @@ -2626,7 +2626,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:52:00.749414", + "modified": "2019-02-18 18:13:40.390806", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index 3746dfb223..528f799aa7 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -417,7 +417,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Recd Quantity", + "label": "Received Quantity", "length": 0, "no_copy": 0, "oldfieldname": "received_qty", @@ -2608,7 +2608,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2019-01-07 16:51:59.002215", + "modified": "2019-02-18 16:04:36.138776", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt Item",