change format
This commit is contained in:
@@ -99,12 +99,13 @@
|
||||
total_tax = 0.0
|
||||
total_amount = 0.0
|
||||
grand_total = 0.0
|
||||
total_transaction_fee = 0.0
|
||||
%>
|
||||
<%
|
||||
discount_amount = @order_reservation.discount_amount
|
||||
delivery_fee = @order_reservation.delivery_fee ? @order_reservation.delivery_fee : 0.0
|
||||
convenience_charge = @order_reservation.convenience_charge
|
||||
if !JSON.parse(order_reservation.taxes).empty?
|
||||
if !JSON.parse(@order_reservation.taxes).empty?
|
||||
JSON.parse(@order_reservation.taxes).each do |tax_data|
|
||||
if tax_data[0] == "delivery_tax"
|
||||
delivery_tax = tax_data[1]
|
||||
@@ -124,6 +125,7 @@
|
||||
total_tax += @order_reservation.total_tax.to_f
|
||||
total_amount += @order_reservation.total_amount.to_f
|
||||
grand_total += @order_reservation.grand_total.to_f
|
||||
total_transaction_fee += @order_reservation.transaction_fee.to_f
|
||||
%>
|
||||
|
||||
<tr style="border-top:2px solid #000">
|
||||
@@ -187,6 +189,13 @@
|
||||
<td colspan="4"><%= number_with_precision(grand_total, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if total_transaction_fee > 0 %>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan="2" style="text-align:center"></td>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.transaction_fee") %></td>
|
||||
<td colspan="4"><%= number_with_precision(total_transaction_fee, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user