change some func:
This commit is contained in:
@@ -109,6 +109,7 @@
|
||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||
<th> <%= t :cashier %> <%= t("views.right_panel.detail.name") %></th>
|
||||
<th> <%= t :payment_method %></th>
|
||||
<th> <%= t :customer %></th>
|
||||
<th> <%= t("views.right_panel.detail.amount") %> </th>
|
||||
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
||||
</tr>
|
||||
@@ -129,8 +130,8 @@
|
||||
<% end %>
|
||||
<td><%= payment.receipt_no rescue '-' %></td>
|
||||
<td><%= payment.cashier_name rescue '-' %></td>
|
||||
<!--<td><%= payment.sale.customer.name rescue '-' %></td>-->
|
||||
<td><%= payment.payment_method rescue '-' %></td>
|
||||
<td><%= payment.sale.customer.name rescue '-' %></td>
|
||||
<% if payment.payment_method === 'cash' %>
|
||||
<td><%= number_with_precision(payment.payment_amount - payment.change_amount , precision: precision.to_i ,delimiter: delimiter) rescue '-' %> </td>
|
||||
<%else%>
|
||||
@@ -143,7 +144,7 @@
|
||||
<% end %>
|
||||
<%if total>0%>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: right;"><strong >Total </strong></td>
|
||||
<td colspan="5" style="text-align: right;"><strong >Total </strong></td>
|
||||
<td colspan="2"><strong><%=number_with_precision(total , precision: precision.to_i ,delimiter: delimiter) rescue '-' %></strong></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||
<th> <%= t :cashier %> <%= t("views.right_panel.detail.name") %></th>
|
||||
<th> <%= t :payment_method %></th>
|
||||
<th> <%= t :customer %></th>
|
||||
<th> <%= t("views.right_panel.detail.amount") %> </th>
|
||||
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
||||
</tr>
|
||||
@@ -116,8 +117,8 @@
|
||||
<% end %>
|
||||
<td><%= payment.receipt_no rescue '-' %></td>
|
||||
<td><%= payment.cashier_name rescue '-' %></td>
|
||||
<!--<td><%= payment.sale.customer.name rescue '-' %></td>-->
|
||||
<td><%= payment.payment_method rescue '-' %></td>
|
||||
<td><%= payment.sale.customer.name rescue '-' %></td>
|
||||
<% if payment.payment_method === 'cash' %>
|
||||
<td><%= number_with_precision(payment.payment_amount - payment.change_amount , precision: precision.to_i ,delimiter: delimiter) rescue '-' %> </td>
|
||||
<%else%>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||
<th><%= t("views.right_panel.detail.checked_by") %></th>
|
||||
<th><%= t("views.right_panel.detail.stock_check") %> <%= t("views.right_panel.detail.reason") %></th>
|
||||
<th><%= t :date_time %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -87,6 +88,7 @@
|
||||
<td><%= result.remark rescue '-' %></td>
|
||||
<td><%= Employee.find(result.stock_check.check_by).name rescue '-' %></td>
|
||||
<td><%= result.stock_check.reason rescue '-' %></td>
|
||||
<td><%= result.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
|
||||
</tr>
|
||||
<% !result.stock_count.nil? ? total_stock_count += result.stock_count : total_stock_count += 0 %>
|
||||
<% !result.stock_balance.nil? ? total_stock_balance += result.stock_balance : total_stock_balance += 0 %>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||
<th><%= t("views.right_panel.detail.checked_by") %></th>
|
||||
<th><%= t("views.right_panel.detail.stock_check") %> <%= t("views.right_panel.detail.reason") %></th>
|
||||
<th><%= t :date_time %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -55,6 +56,7 @@
|
||||
<td><%= result.remark rescue '-' %></td>
|
||||
<td><%= Employee.find(result.stock_check.check_by).name rescue '-' %></td>
|
||||
<td><%= result.stock_check.reason rescue '-' %></td>
|
||||
<td><%= result.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
|
||||
</tr>
|
||||
<% !result.stock_count.nil? ? total_stock_count += result.stock_count : total_stock_count += 0 %>
|
||||
<% !result.stock_balance.nil? ? total_stock_balance += result.stock_balance : total_stock_balance += 0 %>
|
||||
|
||||
Reference in New Issue
Block a user