Merge branch 'hotfix'

This commit is contained in:
Saurabh 2018-01-29 17:42:37 +05:30
commit e2021252d9
6 changed files with 10 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '10.0.15'
__version__ = '10.0.16'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -232,6 +232,8 @@ def get_next_date(dt, mcount, day=None):
def send_notification(new_rv, subscription_doc, print_format='Standard'):
"""Notify concerned persons about recurring document generation"""
print_format = print_format
subject = subscription_doc.subject or ''
message = subscription_doc.message or ''
if not subscription_doc.subject:
subject = _("New {0}: #{1}").format(new_rv.doctype, new_rv.name)

View File

@ -191,8 +191,9 @@ def delete_gl_entries(gl_entries=None, voucher_type=None, voucher_no=None,
for entry in gl_entries:
validate_frozen_account(entry["account"], adv_adj)
validate_balance_type(entry["account"], adv_adj)
if not adv_adj:
validate_expense_against_budget(entry)
if entry.get("against_voucher") and update_outstanding == 'Yes':
if entry.get("against_voucher") and update_outstanding == 'Yes' and not adv_adj:
update_outstanding_amt(entry["account"], entry.get("party_type"), entry.get("party"), entry.get("against_voucher_type"),
entry.get("against_voucher"), on_cancel=True)

View File

@ -21,7 +21,7 @@ def execute():
update `tab{0}`
set `payment_terms` = %s
where name = %s
""".format(dt), (template, d.name))
""".format(dt), (template.name, d.name))
def create_payment_terms_template(data):
if data.credit_days_based_on == "Fixed Days":

View File

@ -539,7 +539,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
due_date: function() {
// due_date is to be changed, payment terms template and/or payment schedule must
// be removed as due_date is automatically changed based on payment terms
if (this.frm.doc.due_date && !this.frm.updating_party_details) {
if (this.frm.doc.due_date && !this.frm.updating_party_details && !this.frm.doc.is_pos) {
if (this.frm.doc.payment_terms_template ||
(this.frm.doc.payment_schedule && this.frm.doc.payment_schedule.length)) {
var message1 = "";

View File

@ -115,8 +115,8 @@ 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) < flt(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.qty))
if flt(batch_qty, d.precision("stock_qty")) < flt(qty, d.precision("stock_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()
def get_batch_no(item_code, warehouse, qty=1, throw=False):