From b866fcf14f46b0053bc20bb943e1dc3ced8ab35a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 8 Jul 2017 12:57:13 +0530 Subject: [PATCH 1/4] Finish prod order when skipped material transfer --- .../doctype/production_order/production_order.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index a988112bed..f6d9eafdab 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.js +++ b/erpnext/manufacturing/doctype/production_order/production_order.js @@ -265,7 +265,7 @@ erpnext.production_order = { erpnext.production_order.stop_production_order(frm, "Resumed"); }, __("Status")); } - + if(!frm.doc.skip_transfer){ if ((flt(doc.material_transferred_for_manufacturing) < flt(doc.qty)) && frm.doc.status != 'Stopped') { @@ -274,7 +274,7 @@ erpnext.production_order = { erpnext.production_order.make_se(frm, 'Material Transfer for Manufacture'); }); start_btn.addClass('btn-primary'); - } + } } if(!frm.doc.skip_transfer){ @@ -293,8 +293,9 @@ erpnext.production_order = { } else { if ((flt(doc.produced_qty) < flt(doc.qty)) && frm.doc.status != 'Stopped') { frm.has_finish_btn = true; - var finish_btn = frm.add_custom_button(__('Finish'), - cur_frm.cscript['Update Finished Goods']); + var finish_btn = frm.add_custom_button(__('Finish'), function() { + erpnext.production_order.make_se(frm, 'Manufacture'); + }); finish_btn.addClass('btn-primary'); } } From 0e285265b1f4ad3d83d734596afe38bedfc00085 Mon Sep 17 00:00:00 2001 From: Aditya Duggal Date: Sat, 8 Jul 2017 13:35:01 +0530 Subject: [PATCH 2/4] First 2 digit validation would disregard NA values --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 62de7a9897..0bf1af5cd8 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -17,7 +17,7 @@ def validate_gstin_for_india(doc, method): if doc.state in states: doc.gst_state = doc.state - if doc.gst_state: + if doc.gst_state and doc.gstin != "NA": doc.gst_state_number = state_numbers[doc.gst_state] if doc.gst_state_number != doc.gstin[:2]: frappe.throw(_("First 2 digits of GSTIN should match with State number {0}") From cd61a20fb4c9f1a6dbdab7e74e0ef84f97050cbe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 8 Jul 2017 13:52:13 +0530 Subject: [PATCH 3/4] Update utils.py --- erpnext/regional/india/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 0bf1af5cd8..84e5f3ea50 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -17,8 +17,8 @@ def validate_gstin_for_india(doc, method): if doc.state in states: doc.gst_state = doc.state - if doc.gst_state and doc.gstin != "NA": + if doc.gst_state: doc.gst_state_number = state_numbers[doc.gst_state] - if doc.gst_state_number != doc.gstin[:2]: + if doc.gstin != "NA" and doc.gst_state_number != doc.gstin[:2]: frappe.throw(_("First 2 digits of GSTIN should match with State number {0}") - .format(doc.gst_state_number)) \ No newline at end of file + .format(doc.gst_state_number)) From 097da8cc898d53d7d1897dd5018b13df876c2fa4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 8 Jul 2017 14:25:41 +0600 Subject: [PATCH 4/4] bumped to version 8.3.5 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7a36695a47..a8a8055ce8 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '8.3.4' +__version__ = '8.3.5' def get_default_company(user=None): '''Get default company for user'''