Skip to content

Commit

Permalink
[Customer account & order] Change order totals to account for refunds (
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoboludo authored Jan 30, 2023
1 parent 9517698 commit 8544049
Show file tree
Hide file tree
Showing 33 changed files with 78 additions and 32 deletions.
3 changes: 2 additions & 1 deletion locales/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Превозвач",
"tracking_number": "Номер за проследяване",
"subtotal": "Междинна сума",
"total_duties": "Мито"
"total_duties": "Мито",
"total_refunded": "Възстановени"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@
"tracking_company": "Dopravce",
"tracking_number": "Číslo pro sledování",
"subtotal": "Mezisoučet",
"total_duties": "Cla"
"total_duties": "Cla",
"total_refunded": "Vrácená částka"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Fragtfirma",
"tracking_number": "Trackingnummer",
"subtotal": "Subtotal",
"total_duties": "Told"
"total_duties": "Told",
"total_refunded": "Refunderet"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Versanddienstleister",
"tracking_number": "Trackingnummer",
"subtotal": "Zwischensumme",
"total_duties": "Zollgebühren"
"total_duties": "Zollgebühren",
"total_refunded": "Zurückerstattet"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Εταιρεία ταχυμεταφοράς",
"tracking_number": "Αριθμός παρακολούθησης",
"subtotal": "Υποσύνολο",
"total_duties": "Δασμοί"
"total_duties": "Δασμοί",
"total_refunded": "Τα χρήματα επιστράφηκαν"
}
},
"gift_cards": {
Expand Down
1 change: 1 addition & 0 deletions locales/en.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@
"price": "Price",
"quantity": "Quantity",
"total": "Total",
"total_refunded": "Refunded",
"fulfilled_at_html": "Fulfilled {{ date }}",
"track_shipment": "Track shipment",
"tracking_url": "Tracking link",
Expand Down
3 changes: 2 additions & 1 deletion locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@
"tracking_company": "Empresa de transporte",
"tracking_number": "Número de seguimiento",
"subtotal": "Subtotal",
"total_duties": "Aranceles"
"total_duties": "Aranceles",
"total_refunded": "Reembolsado"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Kuljetuspalvelu",
"tracking_number": "Seurantanumero",
"subtotal": "Välisumma",
"total_duties": "Tullit"
"total_duties": "Tullit",
"total_refunded": "Maksu palautettu"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@
"tracking_company": "Transporteur",
"tracking_number": "Numéro de suivi",
"subtotal": "Sous-total",
"total_duties": "Frais de douane"
"total_duties": "Frais de douane",
"total_refunded": "Remboursé"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/hr-HR.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@
"tracking_company": "Dostavna služba",
"tracking_number": "Broj za praćenje",
"subtotal": "Podzbroj",
"total_duties": "Carina"
"total_duties": "Carina",
"total_refunded": "Povrat je izvršen"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Futárszolgálat",
"tracking_number": "Fuvarlevélszám",
"subtotal": "Részösszeg",
"total_duties": "Vámok"
"total_duties": "Vámok",
"total_refunded": "Visszatérítve"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Kurir",
"tracking_number": "Nomor pelacakan",
"subtotal": "Subtotal",
"total_duties": "Bea cukai"
"total_duties": "Bea cukai",
"total_refunded": "Dana dikembalikan"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@
"tracking_company": "Corriere",
"tracking_number": "Numero di tracking",
"subtotal": "Subtotale",
"total_duties": "Dazi"
"total_duties": "Dazi",
"total_refunded": "Rimborsato"
},
"orders": {
"title": "Cronologia ordini",
Expand Down
3 changes: 2 additions & 1 deletion locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "配送業者",
"tracking_number": "追跡番号",
"subtotal": "小計",
"total_duties": "関税"
"total_duties": "関税",
"total_refunded": "返金済"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "배송업체",
"tracking_number": "추적 번호",
"subtotal": "소계",
"total_duties": "관세"
"total_duties": "관세",
"total_refunded": "환불됨"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/lt-LT.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@
"tracking_company": "Vežėjas",
"tracking_number": "Sekimo numeris",
"subtotal": "Tarpinė suma",
"total_duties": "Muito mokesčiai"
"total_duties": "Muito mokesčiai",
"total_refunded": "Kompensuota"
},
"orders": {
"title": "Užsakymų istorija",
Expand Down
3 changes: 2 additions & 1 deletion locales/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@
"tracking_company": "Transportør",
"tracking_number": "Sporingsnummer",
"subtotal": "Delsum",
"total_duties": "Tollplikter"
"total_duties": "Tollplikter",
"total_refunded": "Refundert"
},
"orders": {
"title": "Bestillingshistorikk",
Expand Down
3 changes: 2 additions & 1 deletion locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Vervoerder",
"tracking_number": "Trackingnummer",
"subtotal": "Subtotaal",
"total_duties": "Douanerechten"
"total_duties": "Douanerechten",
"total_refunded": "Terugbetaald"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@
"tracking_company": "Przewoźnik",
"tracking_number": "Numer śledzenia",
"subtotal": "Suma częściowa",
"total_duties": "Cła"
"total_duties": "Cła",
"total_refunded": "Zwrócono koszty"
},
"orders": {
"title": "Historia zamówień",
Expand Down
3 changes: 2 additions & 1 deletion locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@
"tracking_company": "Transportadora",
"tracking_number": "Número de rastreamento",
"subtotal": "Subtotal",
"total_duties": "Tributos de importação"
"total_duties": "Tributos de importação",
"total_refunded": "Reembolsado"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@
"tracking_company": "Transportadora",
"tracking_number": "Número de rastreio",
"subtotal": "Subtotal",
"total_duties": "Encargos"
"total_duties": "Encargos",
"total_refunded": "Reembolsado"
},
"orders": {
"title": "Histórico de encomendas",
Expand Down
3 changes: 2 additions & 1 deletion locales/ro-RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@
"tracking_company": "Serviciu de curierat",
"tracking_number": "Număr de urmărire",
"subtotal": "Subtotal",
"total_duties": "Taxe vamale"
"total_duties": "Taxe vamale",
"total_refunded": "Rambursată"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@
"tracking_company": "Перевозчик",
"tracking_number": "Номер для отслеживания",
"subtotal": "Промежуточный итог",
"total_duties": "Пошлины"
"total_duties": "Пошлины",
"total_refunded": "Средства возвращены"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/sk-SK.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@
"tracking_company": "Dopravca",
"tracking_number": "Sledovacie číslo",
"subtotal": "Medzisúčet",
"total_duties": "Clá"
"total_duties": "Clá",
"total_refunded": "Refundovaná suma"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/sl-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@
"tracking_company": "Dostavno podjetje",
"tracking_number": "Številka za sledenje",
"subtotal": "Vmesna vsota",
"total_duties": "Carinske dajatve"
"total_duties": "Carinske dajatve",
"total_refunded": "Povrnjeno"
},
"orders": {
"title": "Zgodovina naročil",
Expand Down
3 changes: 2 additions & 1 deletion locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Transportör",
"tracking_number": "Spårningsnummer",
"subtotal": "Delsumma",
"total_duties": "Tullavgifter"
"total_duties": "Tullavgifter",
"total_refunded": "Återbetald"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "ผู้ให้บริการขนส่ง",
"tracking_number": "หมายเลขติดตามพัสดุ",
"subtotal": "ยอดรวม",
"total_duties": "อากร"
"total_duties": "อากร",
"total_refunded": "คืนเงินแล้ว"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Kargo Şirketi",
"tracking_number": "Takip numarası",
"subtotal": "Alt toplam",
"total_duties": "Gümrük vergileri"
"total_duties": "Gümrük vergileri",
"total_refunded": "Para iadesi yapıldı"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "Hãng vận chuyển",
"tracking_number": "Mã theo dõi",
"subtotal": "Tổng phụ",
"total_duties": "Thuế hải quan"
"total_duties": "Thuế hải quan",
"total_refunded": "Đã hoàn tiền"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "承运商",
"tracking_number": "跟踪编号",
"subtotal": "小计",
"total_duties": "关税"
"total_duties": "关税",
"total_refunded": "已退款"
}
},
"gift_cards": {
Expand Down
3 changes: 2 additions & 1 deletion locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
"tracking_company": "貨運業者",
"tracking_number": "追蹤編號",
"subtotal": "小計",
"total_duties": "關稅"
"total_duties": "關稅",
"total_refunded": "已退款"
}
},
"gift_cards": {
Expand Down
2 changes: 1 addition & 1 deletion sections/main-account.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
{{ order.fulfillment_status_label }}
</td>
<td headers="RowOrder ColumnTotal" role="cell" data-label="{{ 'customer.orders.total' | t }}">
{{ order.total_price | money_with_currency }}
{{ order.total_net_amount | money_with_currency }}
</td>
</tr>
{%- endfor -%}
Expand Down
17 changes: 16 additions & 1 deletion sections/main-order.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,25 @@
</td>
</tr>
{%- endif -%}
{%- if order.total_refunded_amount > 0 -%}
<tr role="row">
<td id="RowTotalRefund" role="rowheader" scope="row" colspan="3">
{{ 'customer.order.total_refunded' | t }}
</td>
<td
headers="RowTotalRefund"
role="cell"
colspan="2"
data-label="{{ 'customer.order.total_refunded' | t }}"
>
-{{ order.total_refunded_amount | money_with_currency }}
</td>
</tr>
{%- endif -%}
<tr role="row">
<td id="RowTotal" role="rowheader" scope="row" colspan="3">{{ 'customer.order.total' | t }}</td>
<td headers="RowTotal" role="cell" colspan="2" data-label="{{ 'customer.order.total' | t }}">
{{ order.total_price | money_with_currency }}
{{ order.total_net_amount | money_with_currency }}
</td>
</tr>
</tfoot>
Expand Down

0 comments on commit 8544049

Please sign in to comment.