Promotion Index View Change

This commit is contained in:
Phyo
2017-08-31 14:03:43 +06:30
parent 012b771435
commit dd19b52ebd

View File

@@ -39,7 +39,13 @@
<td><%= pro.promo_end_hour.utc.strftime("%I:%M %P") rescue "-" %></td>
<td><%= pro.promo_day %></td>
<td>
<%= MenuItem.find_by_item_code(pro.original_product).name rescue "-"%>
<% item = MenuItemInstance.find_by_item_instance_code(pro.original_product)%>
<% if item.nil? %>
<%= Product.find_by_item_code(pro.original_product).name rescue "-" %>
<% else %>
<%= item.menu_item.name rescue "-" %>
- <%= item.item_instance_name rescue "-" %>
<% end %>
</td>
<% if Employee.exists?(pro.created_by) %>
<td><%= Employee.find(pro.created_by).name %></td>