Merge pull request #19835 from deepeshgarg007/accounts_payable_terms_v12

feat: Accounts Payable report based on payment terms
This commit is contained in:
Deepesh Garg
2019-12-06 19:41:27 +05:30
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -100,6 +100,11 @@ frappe.query_reports["Accounts Payable"] = {
"fieldtype": "Link",
"options": "Supplier Group"
},
{
"fieldname":"based_on_payment_terms",
"label": __("Based On Payment Terms"),
"fieldtype": "Check",
},
{
"fieldname":"tax_id",
"label": __("Tax Id"),

View File

@@ -330,7 +330,7 @@ class ReceivablePayableReport(object):
self.append_payment_term(row, d, term)
def append_payment_term(self, row, d, term):
if self.filters.get("customer") and d.currency == d.party_account_currency:
if (self.filters.get("customer") or self.filters.get("supplier")) and d.currency == d.party_account_currency:
invoiced = d.payment_amount
else:
invoiced = flt(flt(d.payment_amount) * flt(d.conversion_rate), self.currency_precision)