fixed conflit
This commit is contained in:
@@ -30,9 +30,6 @@ class Origami::SalesController < BaseOrigamiController
|
|||||||
table = DiningFacility.find(dining)
|
table = DiningFacility.find(dining)
|
||||||
existing_booking = Booking.find_by_sale_id(sale_id)
|
existing_booking = Booking.find_by_sale_id(sale_id)
|
||||||
table.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ").each do |booking|
|
table.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ").each do |booking|
|
||||||
# if !booking.checkout_at.nil?
|
|
||||||
# existing_booking.update_attributes(checkout_at: checkout_at)
|
|
||||||
# end
|
|
||||||
if booking.sale_id.nil?
|
if booking.sale_id.nil?
|
||||||
order_array = []
|
order_array = []
|
||||||
booking.booking_orders.each do |booking_order|
|
booking.booking_orders.each do |booking_order|
|
||||||
@@ -60,7 +57,6 @@ class Origami::SalesController < BaseOrigamiController
|
|||||||
booking.save
|
booking.save
|
||||||
|
|
||||||
order_array.push(order.order_id)
|
order_array.push(order.order_id)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
receipt_no = Sale.find(sale_id).receipt_no
|
receipt_no = Sale.find(sale_id).receipt_no
|
||||||
@@ -77,10 +73,6 @@ class Origami::SalesController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# if !sale_data.empty?
|
|
||||||
# InventoryJob.perform_now(self.id)
|
|
||||||
# InventoryDefinition.calculate_product_count(nil,sale_data)
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th><%= t("views.right_panel.header.account_name") %></th>
|
||||||
<th><%= t("views.right_panel.header.menu_category") %></th>
|
<th><%= t("views.right_panel.header.menu_category") %></th>
|
||||||
<th><%= t("views.right_panel.detail.code") %></th>
|
<th><%= t("views.right_panel.detail.code") %></th>
|
||||||
<th><%= t("views.right_panel.detail.product") %></th>
|
<th><%= t("views.right_panel.detail.product") %></th>
|
||||||
@@ -89,25 +89,18 @@
|
|||||||
<% if sale.status_type == "Discount" && sale.grand_total < 0
|
<% if sale.status_type == "Discount" && sale.grand_total < 0
|
||||||
total_item_dis += sale.grand_total*(-1)
|
total_item_dis += sale.grand_total*(-1)
|
||||||
end %>
|
end %>
|
||||||
|
|
||||||
<% if !acc_arr.include?(sale.account_id) %>
|
<% if !acc_arr.include?(sale.account_id) %>
|
||||||
<tr>
|
|
||||||
<td><b><%= sale.account_name %></b></td>
|
|
||||||
<td colspan="4"> </td>
|
|
||||||
<td><%= t("views.right_panel.detail.total_price_by") %> <%= sale.account_name %></td>
|
|
||||||
<td>
|
|
||||||
<% @totalByAccount.each do |account, total| %>
|
<% @totalByAccount.each do |account, total| %>
|
||||||
<% if sale.account_id == account %>
|
<% if sale.account_id == account %>
|
||||||
<b><%= number_with_precision(total, precision:precision.to_i,delimiter:delimiter) %></b>
|
|
||||||
<% grand_total += total %>
|
<% grand_total += total %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% acc_arr.push(sale.account_id) %>
|
<% acc_arr.push(sale.account_id) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td><%= sale.account_name %></td>
|
||||||
<td><%= sale.menu_category_name %></td>
|
<td><%= sale.menu_category_name %></td>
|
||||||
<td><%= sale.item_code rescue '-' %></td>
|
<td><%= sale.item_code rescue '-' %></td>
|
||||||
<td><%= sale.product_name rescue '-' %></td>
|
<td><%= sale.product_name rescue '-' %></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user