Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-05-29 13:32:16 +06:30
23 changed files with 724 additions and 508 deletions

View File

@@ -26,11 +26,12 @@
<th colspan="7"><%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th><b><%= t("views.right_panel.detail.shift_name") %></b></th>
<th><b><%= t("views.right_panel.detail.table") %></b></th>
<th><b><%= t("views.right_panel.detail.receipt_no") %></b></th>
<tr>
<th><b><%= t("views.right_panel.detail.receipt_no") %></b></th>
<th><b><%= t("views.right_panel.detail.receipt_date") %></b></th>
<th><b><%= t("views.right_panel.detail.shift_name") %></b></th>
<th><b><%= t :cashier %> <%= t("views.right_panel.detail.name") %></b></th>
<th><b><%= t("views.right_panel.detail.table") %></b></th>
<th><b><%= t("views.right_panel.detail.revenue") %></b></th>
<th>&nbsp;</th>
</tr>
@@ -46,24 +47,25 @@
end %>
<% grand_total = grand_total + result.grand_total %>
<tr style="border-top:4px double #666;">
<td><%= @shift_from %> - <%= @shift_to %></td>
<td><%= table_type %> - <%= table_name %></td>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%=l result.receipt_date.getlocal, :format => :short rescue '-' %> </td>
<td><%= @shift_from %> - <%= @shift_to %></td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= table_type %> - <%= table_name %></td>
<td><%= number_format(result.grand_total, precision: precision, delimiter: delimiter) %></td>
<!-- <td>&nbsp;</td> -->
</tr>
<tr>
<th>&nbsp;</th>
<th><b><%= t("views.right_panel.detail.product") %></b></th>
<th><b><%= t("views.right_panel.detail.qty") %></b></th>
<th><b><%= t("views.right_panel.detail.unit_price") %></b></th>
<th><b><%= t("views.right_panel.detail.total_price") %></b></th>
<th><b><%= t("views.right_panel.detail.created_at") %></b></th>
<th colspan="2"><b><%= t("views.right_panel.detail.total_price") %></b></th>
</tr>
<% result.sale_items.each do |item|%>
<tr>
<td>&nbsp;</td>
<td>
<% if item.price < 0 %>
<% if item.qty < 0 %>
@@ -77,18 +79,18 @@
</td>
<td><%= item.qty rescue '-' %></td>
<td><%= number_format(item.unit_price, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) rescue '-' %></td>
<td><%= number_format(item.price, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) rescue '-' %></td>
<td><%=l item.created_at.getlocal, :format => :short rescue '-' %> </td>
<td colspan="2"><%= number_format(item.price, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) rescue '-' %></td>
</tr>
<% end %>
<tr><td colspan="5">&nbsp;</td></tr>
<tr><td colspan="6">&nbsp;</td></tr>
<%survey = result.survey%>
<% if !survey.nil?%>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>No. of Guest</td>
<td><%= survey.total_customer rescue '-' %></td>
<td>&nbsp;</td>
@@ -97,6 +99,7 @@
<% if !result.total_amount.nil?%>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
@@ -107,6 +110,7 @@
<% if result.total_discount > 0 %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %>
@@ -119,6 +123,7 @@
<% if !result.total_tax.nil? %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Tax Amount </td>
@@ -133,13 +138,15 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment <%= rec.payment_method.upcase %></td>
<td><%= number_format(rec.payment_amount, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) %> ( <%= rec.payment_status %> )</td>
<td>&nbsp;</td>
<td>Payment <%= rec.payment_method.upcase %> ( <%= rec.payment_status %> )</td>
<td><%= number_format(rec.payment_amount, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) %></td>
<td>&nbsp;</td>
</tr>
<% if !rec.payment_reference.nil? %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment Ref.</td>
@@ -151,6 +158,7 @@
<% end %>
<% if result.amount_changed != 0 %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.change") %> <%= t("views.right_panel.detail.amount") %></td>
@@ -160,6 +168,7 @@
<% end %>
<% if !result.customer_id.nil?%>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Customer</td>
@@ -176,6 +185,7 @@
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><b>Total Nett</b> - <b><%= number_format(grand_total, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) %></b></td>
<td>&nbsp;</td>
</tr>

View File

@@ -24,12 +24,13 @@
<th colspan="7"><%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th><b><%= t("views.right_panel.detail.shift_name") %></b></th>
<th><b><%= t("views.right_panel.detail.table") %></b></th>
<th><b><%= t("views.right_panel.detail.receipt_no") %></b></th>
<th><b><%= t :cashier %> <%= t("views.right_panel.detail.name") %></b></th>
<th><b><%= t("views.right_panel.detail.revenue") %></b></th>
<tr>
<th><b><%= t("views.right_panel.detail.receipt_no") %></b></th>
<th><b><%= t("views.right_panel.detail.receipt_date") %></b></th>
<th><b><%= t("views.right_panel.detail.shift_name") %></b></th>
<th><b><%= t :cashier %> <%= t("views.right_panel.detail.name") %></b></th>
<th><b><%= t("views.right_panel.detail.table") %></b></th>
<th><b><%= t("views.right_panel.detail.revenue") %></b></th>
<th>&nbsp;</th>
</tr>
</thead>
@@ -43,25 +44,26 @@
table_type = table.type
table_name = table.name
end %>
<tr style="border-top:4px double #666;">
<td><%= @shift_from %> - <%= @shift_to %></td>
<td><%= table_type %> - <%= table_name %></td>
<tr style="border-top:4px double #666;">
<td><%= result.receipt_no rescue '-' %> </td>
<td><%=l result.receipt_date.getlocal, :format => :short rescue '-' %> </td>
<td><%= @shift_from %> - <%= @shift_to %></td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%=result.grand_total%></td>
<!-- <td>&nbsp;</td> -->
<td><%= table_type %> - <%= table_name %></td>
<td><%= number_format(result.grand_total, precision: precision, delimiter: delimiter) %></td>
</tr>
<tr>
<tr>
<th>&nbsp;</th>
<th><b><%= t("views.right_panel.detail.product") %></b></th>
<th><b><%= t("views.right_panel.detail.qty") %></b></th>
<th><b><%= t("views.right_panel.detail.unit_price") %></b></th>
<th><b><%= t("views.right_panel.detail.total_price") %></b></th>
<th><b><%= t("views.right_panel.detail.created_at") %></b></th>
</tr>
<% result.sale_items.each do |item|%>
<tr>
<td>&nbsp;</td>
<td>
<% if item.price.to_i < 0.to_i %>
<% if item.qty.to_i < 0.to_i%>
@@ -76,7 +78,6 @@
<td><%= item.qty rescue '-' %></td>
<td><%= item.unit_price rescue '-' %></td>
<td><%= item.price rescue '-' %></td>
<td><%=l item.created_at.utc.getlocal, :format => :short rescue '-' %> </td>
</tr>
<% end %>
@@ -87,6 +88,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>No. of Guest</td>
<td><%= survey.total_customer rescue '-' %></td>
<td>&nbsp;</td>
@@ -97,6 +99,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
<td><%= result.total_amount %></td>
<td>&nbsp;</td>
@@ -107,6 +110,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %>
<%= t("views.right_panel.detail.discount") %>
<%= t("views.right_panel.detail.amount") %></td>
@@ -119,6 +123,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Tax Amount </td>
<td><%= result.total_tax %> </td>
<td>&nbsp;</td>
@@ -132,8 +137,9 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment <%= rec.payment_method.upcase %></td>
<td><%= rec.payment_amount %> ( <%= rec.payment_status %> )</td>
<td>&nbsp;</td>
<td>Payment <%= rec.payment_method.upcase %>( <%= rec.payment_status %> )</td>
<td><%= rec.payment_amount %></td>
<td>&nbsp;</td>
</tr>
@@ -141,6 +147,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment Ref.</td>
<td><%= rec.payment_reference %></td>
<td>&nbsp;</td>
@@ -152,6 +159,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.change") %> <%= t("views.right_panel.detail.amount") %></td>
<td><%= result.amount_changed %></td>
<td>&nbsp;</td>
@@ -161,6 +169,7 @@
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Customer</td>
<td><%= result.customer.name rescue '-'%>
(<%= result.customer.company rescue '-' %>)
@@ -175,6 +184,7 @@
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><b>Total Nett</b> - <b><%= grand_total %></b></td>
<td>&nbsp;</td>
</tr>