Compare commits

...

8 Commits

Author SHA1 Message Date
Saurabh
e2021252d9 Merge branch 'hotfix' 2018-01-29 17:42:37 +05:30
Saurabh
373066e0ca bumped to version 10.0.16 2018-01-29 18:12:37 +06:00
rohitwaghchaure
52beb77539 Don't validate payment terms for POS (#12692) 2018-01-29 17:40:44 +05:30
Saurabh
e1e690541c set payment term name in payment_terms (#12693) 2018-01-29 17:39:56 +05:30
rohitwaghchaure
86c7ede321 Merge pull request #12690 from rohitwaghchaure/subscription_sent_email_issue
[Fix] Subscription send notification issue
2018-01-29 17:01:00 +05:30
Rohit Waghchaure
7e033aae11 [Fix] Subscription send notification issue 2018-01-29 16:53:37 +05:30
Zarrar
5bf77beb83 precision while checking qty (#12688) 2018-01-29 16:47:52 +05:30
Nabin Hait
1e1b2364ab Optimization: don't update outstanding amount while cancelling payment entry for advance adjustment (#12689) 2018-01-29 16:45:43 +05:30
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)
validate_expense_against_budget(entry)
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):