add payment type in order reservation

This commit is contained in:
phyusin
2018-06-11 16:19:59 +06:30
parent 859794e291
commit 425e72afe7
5 changed files with 24 additions and 12 deletions

View File

@@ -48,6 +48,7 @@
<th><%= t("views.right_panel.detail.requested_time") %></th>
<th><%= t("views.right_panel.detail.cooking_time") %></th>
<th><%= t("views.right_panel.detail.status") %></th>
<th><%= t :payment %> <%= t("views.right_panel.detail.type") %></th>
<th><%= t("views.right_panel.detail.remark") %></th>
</tr>
</thead>
@@ -58,6 +59,7 @@
<td><%= @order_reservation.requested_time.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %></td>
<td><%= @order_reservation.expected_waiting_time rescue '-' %></td>
<td><%= @order_reservation.status %></td>
<td><%= @order_reservation.payment_type %></td>
<td><%= @order_reservation.order_remark ? @order_reservation.order_remark : @order_reservation.reservation_remark %></td>
</tr>
<tr style="border-top:2px solid #000">
@@ -67,6 +69,7 @@
<th><%= t("views.right_panel.detail.total_price") %></th>
<th><%= t("views.right_panel.detail.created_at") %></th>
<th></th>
<th></th>
</tr>
<% @order_reservation.order_reservation_items.each do |item| %>
<tr>
@@ -76,6 +79,7 @@
<td><%= number_with_precision(item.price > 0 ? item.qty * item.price : item.qty * item.unit_price, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td><%=l item.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
<td></td>
<td></td>
</tr>
<% end %>
<%
@@ -123,27 +127,27 @@
<tr style="border-top:2px solid #000">
<td colspan=2 style="text-align:center"></td>
<td><%= t("views.right_panel.detail.sub_total") %></td>
<td colspan="3"><%= number_with_precision(total_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td colspan="4"><%= number_with_precision(total_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
</tr>
<% if total_discount_amount > 0 %>
<tr style="border-top:2px solid #000">
<td colspan=2 style="text-align:center"></td>
<td><%= t("views.right_panel.detail.discount_amount") %></td>
<td colspan="3"><%= number_with_precision(total_discount_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td colspan="4"><%= number_with_precision(total_discount_amount, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
</tr>
<% end %>
<% if total_delivery_fee > 0 %>
<tr style="border-top:2px solid #000">
<td colspan=2 style="text-align:center"></td>
<td><%= t("views.right_panel.detail.delivery_fee") %></td>
<td colspan="3"><%= number_with_precision(total_delivery_fee, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td colspan="4"><%= number_with_precision(total_delivery_fee, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
</tr>
<% end %>
<% if total_convenience_charge > 0 %>
<tr style="border-top:2px solid #000">
<td colspan=2 style="text-align:center"></td>
<td><%= t("views.right_panel.detail.convenience_charge") %></td>
<td colspan="3"><%= number_with_precision(total_convenience_charge, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td colspan="4"><%= number_with_precision(total_convenience_charge, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
</tr>
<% end %>
<!-- <% if total_delivery_tax > 0 %>
@@ -171,14 +175,14 @@
<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.tax") %></td>
<td colspan="3"><%= number_with_precision(total_tax, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td colspan="4"><%= number_with_precision(total_tax, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
</tr>
<% end %>
<% if grand_total > 0 %>
<tr style="border-top:2px solid #000">
<td colspan=2 style="text-align:center"></td>
<td colspan="2" style="text-align:center"></td>
<td><%= t("views.right_panel.detail.grand_total") %> </td>
<td colspan="3"><%= number_with_precision(grand_total, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
<td colspan="4"><%= number_with_precision(grand_total, precision:precision.to_i, delimiter:delimiter) rescue ' '%></td>
</tr>
<% end %>
</tbody>