[IMP]: issues:104:Incorrect layout for billing orders and divide by zero issues
This commit is contained in:
parent
b3776bf2b0
commit
ca04a370e5
@ -54,6 +54,7 @@ class AccountInvoice(models.Model):
|
||||
discount_value_ratio = \
|
||||
(self.discount_amount * line.price_subtotal) / \
|
||||
gross_amount
|
||||
if discount_value_ratio:
|
||||
discount_per_ratio = \
|
||||
(discount_value_ratio * 100) / line.price_subtotal
|
||||
line.write({'discount': discount_per_ratio})
|
||||
|
@ -23,6 +23,7 @@
|
||||
<th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
||||
<th class="text-right">Taxes</th>
|
||||
<th class="text-right">Amount</th>
|
||||
<th class="text-right">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="invoice_tbody">
|
||||
|
@ -54,6 +54,7 @@ class SaleOrder(models.Model):
|
||||
discount_value_ratio = \
|
||||
(self.discount_amount *
|
||||
line.price_subtotal) / gross_amount
|
||||
if discount_value_ratio:
|
||||
discount_per_ratio = \
|
||||
(discount_value_ratio * 100) / line.price_subtotal
|
||||
line.write({'discount': discount_per_ratio})
|
||||
|
Loading…
Reference in New Issue
Block a user