change some func:

This commit is contained in:
phyusin
2018-08-23 14:23:08 +06:30
parent 7e353915e3
commit e820f564ea
7 changed files with 22 additions and 4 deletions

View File

@@ -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 %>