fix: discount and test added

only report net rate if discount is less than 0 and added test.
This commit is contained in:
Maharshi Patel
2022-07-26 17:40:59 +05:30
parent b97d30aad0
commit a843e784e6
2 changed files with 27 additions and 1 deletions

View File

@@ -285,7 +285,7 @@ def get_item_list(invoice):
if invoice.get("is_return") or invoice.get("is_debit_note"):
item_qty = item_qty or 1
if hide_discount_in_einvoice or invoice.is_internal_customer or (item.discount_amount <= 0):
if hide_discount_in_einvoice or invoice.is_internal_customer or item.discount_amount < 0:
item.unit_rate = item.taxable_value / item_qty
item.gross_amount = item.taxable_value
item.discount_amount = 0