fix: Error when no data is present in AR/AP reeport
This commit is contained in:
parent
ef436fa3c2
commit
7135a75e5e
@ -169,9 +169,11 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
def append_subtotal_row(self, party):
|
def append_subtotal_row(self, party):
|
||||||
sub_total_row = self.total_row_map.get(party)
|
sub_total_row = self.total_row_map.get(party)
|
||||||
self.data.append(sub_total_row)
|
|
||||||
self.data.append({})
|
if sub_total_row:
|
||||||
self.update_sub_total_row(sub_total_row, 'Total')
|
self.data.append(sub_total_row)
|
||||||
|
self.data.append({})
|
||||||
|
self.update_sub_total_row(sub_total_row, 'Total')
|
||||||
|
|
||||||
def get_voucher_balance(self, gle):
|
def get_voucher_balance(self, gle):
|
||||||
if self.filters.get("sales_person"):
|
if self.filters.get("sales_person"):
|
||||||
@ -232,7 +234,8 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
if self.filters.get('group_by_party'):
|
if self.filters.get('group_by_party'):
|
||||||
self.append_subtotal_row(self.previous_party)
|
self.append_subtotal_row(self.previous_party)
|
||||||
self.data.append(self.total_row_map.get('Total'))
|
if self.data:
|
||||||
|
self.data.append(self.total_row_map.get('Total'))
|
||||||
|
|
||||||
def append_row(self, row):
|
def append_row(self, row):
|
||||||
self.allocate_future_payments(row)
|
self.allocate_future_payments(row)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user