diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b052d095153..1b88bdc5b9b 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''' diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 48062a3dc7b..60c974f2623 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()); } }, diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index dff25dfb138..bcbc35ee7ec 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -202,7 +202,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))