Browse Source

feat: make combined_income nil safe

pull/1518/head
natdeanlewissoftwire 3 years ago
parent
commit
b2714cd75b
  1. 5
      app/models/sales_log.rb

5
app/models/sales_log.rb

@ -358,6 +358,9 @@ class SalesLog < Log
end
def combined_income
income1 + income2
buyer_1_income = income1 || 0
buyer_2_income = income2 || 0
buyer_1_income + buyer_2_income
end
end

Loading…
Cancel
Save