mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
update the adjustments rows
This commit is contained in:
@@ -12,8 +12,12 @@ class Invoice
|
||||
:included_tax_total
|
||||
invoice_update_attributes :label
|
||||
|
||||
def display_amount
|
||||
Spree::Money.new(amount, currency:)
|
||||
def display_amount_with_taxes
|
||||
Spree::Money.new(amount + additional_tax_total, currency:)
|
||||
end
|
||||
|
||||
def display_amount_without_taxes
|
||||
Spree::Money.new(amount - included_tax_total, currency:)
|
||||
end
|
||||
|
||||
def display_taxes(display_zero: false)
|
||||
|
||||
@@ -43,10 +43,12 @@
|
||||
%td{:align => "right"}
|
||||
%td{:align => "right"}
|
||||
%td{:align => "right"}
|
||||
= adjustment.display_amount
|
||||
- if @order.total_tax > 0
|
||||
%td{:align => "right"}
|
||||
= adjustment.display_adjustment_tax_rates
|
||||
%td{:align => "right"}
|
||||
= adjustment.display_amount_without_taxes
|
||||
%td{:align => "right"}
|
||||
= adjustment.display_adjustment_tax_rates
|
||||
%td{:align => "right"}
|
||||
= adjustment.display_amount_with_taxes
|
||||
%tfoot
|
||||
%tr
|
||||
%td{:align => "right", :colspan => "5"}
|
||||
|
||||
Reference in New Issue
Block a user