removed paid styling and added currency formatter to payment_total

This commit is contained in:
lauriejefferson
2023-10-04 09:30:05 -04:00
parent 7320bb5af1
commit 0cda8d7d4c
3 changed files with 8 additions and 5 deletions

View File

@@ -188,6 +188,9 @@ module Spree
Spree::Money.new(total, currency: currency)
end
def display_payment_total
Spree::Money.new(self.payment_total, currency: currency)
end
def to_param
number.to_s.parameterize.upcase
end

View File

@@ -25,18 +25,18 @@
%h5#order_total= order.display_total.to_html
%tr.total
%td.text-right{colspan: "3"}
%h5
%strong
= t :order_amount_paid
%td.text-right.total
%h5
= order.payment_total
%strong
= order.display_payment_total.to_html
- if order.outstanding_balance?
%tr.total
%td.text-right{colspan: "3"}
%h5.not-paid
= t :order_balance_due
%td.text-right.total.not-paid
%h5.not-paid#balance_due
%h5.not-paid
= order.display_outstanding_balance.to_html

View File

@@ -2,7 +2,7 @@
.columns.large-6
.order-summary.text-small
- if order.paid?
.right.paid
.right
= t :order_paid
- else
.right.not-paid