sub total fixed in origami shows
This commit is contained in:
@@ -27,7 +27,7 @@ class Order < ApplicationRecord
|
||||
if self.new_booking
|
||||
|
||||
booking = Booking.create({:dining_facility_id => self.table_id,:type => "TableBooking",
|
||||
:checkin_at => Time.now.utc, :checkin_by => self.employee_name,
|
||||
:checkin_at => Time.now.utc.getlocal, :checkin_by => self.employee_name,
|
||||
:booking_status => "assign" })
|
||||
table = DiningFacility.find(self.table_id)
|
||||
table.status = "occupied"
|
||||
|
||||
@@ -40,6 +40,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
# end
|
||||
|
||||
# Auto Printing
|
||||
# ToDo per item per printer
|
||||
if oqs.auto_print && is_auto_printed == false
|
||||
print_slip(oqs, order, order_items)
|
||||
is_auto_printed = true
|
||||
|
||||
@@ -98,7 +98,7 @@ class Sale < ApplicationRecord
|
||||
order.save
|
||||
|
||||
booking.sale_id = self.id
|
||||
booking.checkout_at = Time.now.utc
|
||||
booking.checkout_at = Time.now.utc.getlocal
|
||||
booking.checkout_by = requested_by.name
|
||||
booking.save
|
||||
|
||||
@@ -115,7 +115,7 @@ class Sale < ApplicationRecord
|
||||
def generate_invoice_by_items (items, requested_by)
|
||||
taxable = true
|
||||
self.requested_by = requested_by
|
||||
self.requested_at = DateTime.now.utc
|
||||
self.requested_at = DateTime.now.utc.getlocal
|
||||
|
||||
items.each do |item|
|
||||
add_item(item)
|
||||
@@ -185,7 +185,7 @@ class Sale < ApplicationRecord
|
||||
sales_items.each do |item|
|
||||
#compute each item and added to total
|
||||
subtotal_price = subtotal_price + item.price
|
||||
total_taxable = total_taxable + item.taxable_price
|
||||
total_taxable = total_taxable + (item.taxable_price * item.qty)
|
||||
end
|
||||
|
||||
apply_tax (total_taxable)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
count = 0
|
||||
@order_items.each do |order_item |
|
||||
count += 1
|
||||
sub_total = sub_total + order_item.price
|
||||
sub_total = sub_total + (order_item.price * order_item.qty)
|
||||
|
||||
unless order_item.price == 0 %>
|
||||
<tr>
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
sub_total = 0
|
||||
if @status == "sale"
|
||||
@obj.sale_items.each do |sale_item|
|
||||
sub_total = sub_total + sale_item.price
|
||||
sub_total = sub_total + sale_item.price
|
||||
%>
|
||||
<input type="hidden" id="sale_id" value="<%= @obj.sale_id %>">
|
||||
<% unless sale_item.price == 0 %>
|
||||
@@ -165,7 +165,7 @@
|
||||
if @status == 'order'
|
||||
unless @order_items.nil?
|
||||
@order_items.each do |order_item |
|
||||
sub_total = sub_total + order_item.price
|
||||
sub_total = sub_total + (order_item.price * order_item.qty)
|
||||
|
||||
unless order_item.price == 0 %>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user