% var total_qty = 0; %> <% var grand_total = 0; %> <% function formatToCurrency(amount,decimal_num = 2,decimal_sig= '.',thousand_sig= ','){ amount = amount.toFixed(decimal_num); let format_amount = (1 * amount).toLocaleString('en-US',{minimumFractionDigits: decimal_num}); let result = format_amount.replace('.','d'); result = result.replace(',','e'); return result.replace('d',decimal_sig).replace('e',thousand_sig); } %>
<%= table.name %> | ||
|---|---|---|
| <%= lang.label_item %> | <%= lang.label_qty %> | <%= lang.label_total %> |
|
<%= item.name %> |
<%- item.qty %> |
<%- formatToCurrency(item.total,currency.currency_decimal,currency.currency_decimal_separator,currency.currency_thousand_separator) %> |
| <%= lang.label_total %> | <%- total_qty %> |
<%- formatToCurrency(grand_total,currency.currency_decimal,currency.currency_decimal_separator,currency.currency_thousand_separator) %> |
| <%= lang.msg_table_empty %> | ||
<%= lang.msg_table_confirm %>
<% } %>