Skip to content

Commit

Permalink
Merge pull request #33710 from openrefactory/patch-2
Browse files Browse the repository at this point in the history
Removed an unnecessary check in code which always evaluates to true
  • Loading branch information
ruthra-kumar authored Jan 21, 2023
2 parents e4bceaa + 49aed7f commit 4cbd63e
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,14 @@ def generate_report_data(self):
ret += [{}]

# add total row
if ret is not []:
if self.filters.type == "Revenue":
total_row = frappe._dict({"name": "Total Deferred Income"})
elif self.filters.type == "Expense":
total_row = frappe._dict({"name": "Total Deferred Expense"})
if self.filters.type == "Revenue":
total_row = frappe._dict({"name": "Total Deferred Income"})
elif self.filters.type == "Expense":
total_row = frappe._dict({"name": "Total Deferred Expense"})

for idx, period in enumerate(self.period_list, 0):
total_row[period.key] = self.period_total[idx].total
ret.append(total_row)
for idx, period in enumerate(self.period_list, 0):
total_row[period.key] = self.period_total[idx].total
ret.append(total_row)

return ret

Expand Down

0 comments on commit 4cbd63e

Please sign in to comment.