From 406d449e1254e424bec244f0c3935b9c7c14807b Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Mon, 29 Jan 2018 18:01:21 +0530 Subject: [PATCH 1/3] fix posting date in journal entry on load (#12694) --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 48062a3dc7..60c974f262 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -82,8 +82,8 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({ $.each(this.frm.doc.accounts || [], function(i, jvd) { frappe.model.set_default_values(jvd); }); - - if(!this.frm.doc.amended_from) this.frm.doc.posting_date = this.frm.posting_date || frappe.datetime.get_today(); + var posting_date = this.frm.posting_date; + if(!this.frm.doc.amended_from) this.frm.set_value('posting_date', posting_date || frappe.datetime.get_today()); } }, From f7a4d4221bc007c3d0b89d92d305cef1f5d15bb0 Mon Sep 17 00:00:00 2001 From: Zlash65 Date: Mon, 29 Jan 2018 18:47:21 +0530 Subject: [PATCH 2/3] check precision with qty --- erpnext/stock/doctype/batch/batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 8c8b986ec7..1c66ea6443 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -115,7 +115,7 @@ def set_batch_nos(doc, warehouse_field, throw = False): d.batch_no = get_batch_no(d.item_code, warehouse, qty, throw) else: batch_qty = get_batch_qty(batch_no=d.batch_no, warehouse=warehouse) - if flt(batch_qty, d.precision("stock_qty")) < flt(qty, d.precision("stock_qty")): + if flt(batch_qty, d.precision("qty")) < flt(qty, d.precision("qty")): frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, d.stock_qty)) @frappe.whitelist() From f3d30c5bb9a087f35cf1991e432e0ed67841410f Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 29 Jan 2018 19:23:53 +0600 Subject: [PATCH 3/3] bumped to version 10.0.17 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b052d09515..1b88bdc5b9 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.0.16' +__version__ = '10.0.17' def get_default_company(user=None): '''Get default company for user'''