From 78a17355be79c73aeed125d8e6fcff32f6aac74c Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 15 Dec 2017 15:38:12 +0530 Subject: [PATCH 1/8] [fix] Item search in POS (#12037) --- erpnext/selling/page/point_of_sale/point_of_sale.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 6ac0a5fe8a..6c6be0a9f5 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -980,7 +980,7 @@ class POSItems { } curr_row += all_items[i]; - if(i == all_items.length - 1 && all_items.length % 4 !== 0) { + if(i == all_items.length - 1) { row_items.push(curr_row); } } From 84da00da2fd5d84c0c5843dbe4b66180c17df867 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 20 Dec 2017 12:06:09 +0530 Subject: [PATCH 2/8] Allow to add items in manufacturing process which are not part of bom items (#12110) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 4d79e13d74..18f1178489 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -49,6 +49,9 @@ class StockEntry(StockController): self.validate_with_material_request() self.validate_batch() + if not self.from_bom: + self.fg_completed_qty = 0.0 + if self._action == 'submit': self.make_batches('t_warehouse') else: From 174900506e6906bd19d482ac772245c76cfb17c7 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 21 Dec 2017 11:28:02 +0530 Subject: [PATCH 3/8] [HotFix] Validation issue for subcontract stock entry (#12127) * [Fix] Validation issue for subcontract stock entry * Update stock_entry.py --- erpnext/stock/doctype/stock_entry/stock_entry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 18f1178489..a0103eda7e 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -354,6 +354,7 @@ class StockEntry(StockController): if self.purpose == "Subcontract" and self.purchase_order: purchase_order = frappe.get_doc("Purchase Order", self.purchase_order) for se_item in self.items: + precision = cint(frappe.db.get_default("float_precision")) or 3 total_allowed = sum([flt(d.required_qty) for d in purchase_order.supplied_items \ if d.rm_item_code == se_item.item_code]) if not total_allowed: @@ -367,8 +368,8 @@ class StockEntry(StockController): and `tabStock Entry Detail`.parent = `tabStock Entry`.name""", (self.purchase_order, se_item.item_code))[0][0] - if total_supplied > total_allowed: - frappe.throw(_("Not allowed to tranfer more {0} than {1} against Purchase Order {2}").format(se_item.item_code, + if flt(total_supplied, precision) > flt(total_allowed, precision): + frappe.throw(_("Not allowed to transfer more {0} than {1} against Purchase Order {2}").format(se_item.item_code, total_allowed, self.purchase_order)) def validate_bom(self): From 443691aaf8c7bc7d090dba36e4521de9aa300339 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 22 Dec 2017 10:59:01 +0530 Subject: [PATCH 4/8] [Fix] Allow to change exchange rate in the payment entry if allow stale is enabled (#12128) --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index d8995a9d98..c5018e2d9d 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -408,7 +408,7 @@ frappe.ui.form.on('Payment Entry', { } // Make read only if Accounts Settings doesn't allow stale rates - frm.set_df_property("source_exchange_rate", "read_only", erpnext.stale_rate_allowed()); + frm.set_df_property("source_exchange_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1); }, target_exchange_rate: function(frm) { @@ -429,7 +429,7 @@ frappe.ui.form.on('Payment Entry', { frm.set_paid_amount_based_on_received_amount = false; // Make read only if Accounts Settings doesn't allow stale rates - frm.set_df_property("target_exchange_rate", "read_only", erpnext.stale_rate_allowed()); + frm.set_df_property("target_exchange_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1); }, paid_amount: function(frm) { From 75789b65c2466292ccd4ef66e9017651570156d3 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 25 Dec 2017 11:26:15 +0530 Subject: [PATCH 5/8] [Fix] Sales payment summary report (#12151) --- .../report/sales_payment_summary/sales_payment_summary.js | 2 ++ .../report/sales_payment_summary/sales_payment_summary.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js index a01cc0f943..a0e56ded96 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js @@ -7,12 +7,14 @@ frappe.query_reports["Sales Payment Summary"] = { "label": __("From Date"), "fieldtype": "Date", "default": frappe.datetime.get_today(), + "reqd": 1, "width": "80" }, { "fieldname":"to_date", "label": __("To Date"), "fieldtype": "Date", + "reqd": 1, "default": frappe.datetime.get_today() }, { diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py index b46f1bea0f..3fcc1d3170 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -37,11 +37,11 @@ def get_sales_payment_data(filters, columns): def get_conditions(filters): conditions = "" - if filters.get("company"): conditions += " a.company=%(company)s" + if filters.get("from_date"): conditions += "a.posting_date >= %(from_date)s" + if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s" + if filters.get("company"): conditions += " and a.company=%(company)s" if filters.get("customer"): conditions += " and a.customer = %(customer)s" if filters.get("owner"): conditions += " and a.owner = %(owner)s" - if filters.get("from_date"): conditions += " and a.posting_date >= %(from_date)s" - if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s" if filters.get("is_pos"): conditions += " and a.is_pos = %(is_pos)s" return conditions From d8c6449f3a173212889658c40f34a8bd26630c73 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 25 Dec 2017 11:26:40 +0530 Subject: [PATCH 6/8] [Fix] Bom raw materials not in order in the stock entry (#12149) --- erpnext/manufacturing/doctype/bom/bom.py | 1 + erpnext/stock/doctype/stock_entry/stock_entry.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index b140bf591e..4b67d016c6 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -519,6 +519,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite # Did not use qty_consumed_per_unit in the query, as it leads to rounding loss query = """select bom_item.item_code, + bom_item.idx, item.item_name, sum(bom_item.stock_qty/ifnull(bom.quantity, 1)) * %(qty)s as qty, item.description, diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index a0103eda7e..6a0853c2e1 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -775,6 +775,9 @@ class StockEntry(StockController): se_child.expense_account = item_dict[d].get("expense_account") or expense_account se_child.cost_center = item_dict[d].get("cost_center") or cost_center + if item_dict[d].get("idx"): + se_child.idx = item_dict[d].get("idx") + if se_child.s_warehouse==None: se_child.s_warehouse = self.from_warehouse if se_child.t_warehouse==None: From bd5e01b09bf00bd21c1106c8f41ac63d4ae7f8a7 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 25 Dec 2017 11:28:07 +0530 Subject: [PATCH 7/8] [fix] Shipping address not fetch from purchase order in to purchase invoice & receipt. (#12134) --- erpnext/public/js/utils/party.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js index 5e1bd8bc0f..75d5ce9e21 100644 --- a/erpnext/public/js/utils/party.js +++ b/erpnext/public/js/utils/party.js @@ -171,7 +171,10 @@ erpnext.utils.validate_mandatory = function(frm, label, value, trigger_on) { erpnext.utils.get_shipping_address = function(frm, callback){ frappe.call({ method: "frappe.contacts.doctype.address.address.get_shipping_address", - args: {company: frm.doc.company}, + args: { + company: frm.doc.company, + address: frm.doc.shipping_address + }, callback: function(r){ if(r.message){ frm.set_value("shipping_address", r.message[0]) //Address title or name From f4c5cf5bd03fd87b0056f7abcd45a4214a5ca8ef Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 25 Dec 2017 14:08:05 +0600 Subject: [PATCH 8/8] bumped to version 9.2.24 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d8ee999a74..ae43d556bc 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.23' +__version__ = '9.2.24' def get_default_company(user=None): '''Get default company for user'''