fix: Set due date in accounts receivable based on payment terms (#19563)

This commit is contained in:
Nabin Hait 2019-11-13 17:58:10 +05:30 committed by GitHub
parent 082bfb8cb3
commit 3a72cb46bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,7 +188,11 @@ class ReceivablePayableReport(object):
self.data.append(row)
def set_invoice_details(self, row):
row.update(self.invoice_details.get(row.voucher_no, {}))
invoice_details = self.invoice_details.get(row.voucher_no, {})
if row.due_date:
invoice_details.pop("due_date", None)
row.update(invoice_details)
if row.voucher_type == 'Sales Invoice':
if self.filters.show_delivery_notes:
self.set_delivery_notes(row)