receipt no detail

This commit is contained in:
Myat Zin Wai Maw
2020-01-15 14:15:11 +06:30
parent 2d57faf7cf
commit 08cc58682d
4 changed files with 53 additions and 33 deletions

View File

@@ -33,11 +33,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>
@@ -53,24 +54,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 %>
@@ -84,18 +86,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>
@@ -104,6 +106,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>
@@ -114,6 +117,7 @@
<% if result.total_discount > 0 %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %>
@@ -126,6 +130,7 @@
<% if !result.total_tax.nil? %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Tax Amount </td>
@@ -140,13 +145,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>
@@ -158,6 +165,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>
@@ -167,6 +175,7 @@
<% end %>
<% if !result.customer_id.nil?%>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Customer</td>
@@ -183,6 +192,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>