Merge branch 'version-13-hotfix' of https://github.com/frappe/erpnext into tds_advance_payment_v13

This commit is contained in:
Deepesh Garg
2021-06-06 19:31:50 +05:30
128 changed files with 3342 additions and 4197 deletions

View File

@@ -225,7 +225,7 @@ class AccountsController(TransactionBase):
def validate_date_with_fiscal_year(self):
if self.meta.get_field("fiscal_year"):
date_field = ""
date_field = None
if self.meta.get_field("posting_date"):
date_field = "posting_date"
elif self.meta.get_field("transaction_date"):
@@ -1092,7 +1092,6 @@ class AccountsController(TransactionBase):
else:
grand_total -= self.get("total_advance")
base_grand_total = flt(grand_total * self.get("conversion_rate"), self.precision("base_grand_total"))
if total != flt(grand_total, self.precision("grand_total")) or \
base_total != flt(base_grand_total, self.precision("base_grand_total")):
frappe.throw(_("Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total"))
@@ -1530,6 +1529,7 @@ def validate_and_delete_children(parent, data):
for d in deleted_children:
update_bin_on_delete(d, parent.doctype)
@frappe.whitelist()
def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, child_docname="items"):
def check_doc_permissions(doc, perm_type='create'):