Skip to content

Commit

Permalink
Merge PR #1485 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by AaronHForgeFlow
  • Loading branch information
OCA-git-bot committed Jan 10, 2024
2 parents 28807e9 + 13fd4a7 commit eedb213
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions account_invoice_pricelist/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def _compute_price_unit(self):
return res

def _calculate_discount(self, base_price, final_price):
if base_price == 0.0:
return 0.0
discount = (base_price - final_price) / base_price * 100
if (discount < 0 and base_price > 0) or (discount > 0 and base_price < 0):
discount = 0.0
Expand Down

0 comments on commit eedb213

Please sign in to comment.