update pull master
This commit is contained in:
1262
.idea/workspace.xml
generated
Normal file
1262
.idea/workspace.xml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@ class Api::BillController < Api::ApiController
|
|||||||
@sale_id = booking.sale_id
|
@sale_id = booking.sale_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif (params[:order_id])
|
elsif (params[:order_id])
|
||||||
@sale = Sale.new
|
@sale = Sale.new
|
||||||
@status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee)
|
@status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee)
|
||||||
@@ -43,7 +43,7 @@ class Api::BillController < Api::ApiController
|
|||||||
item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items)
|
item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items)
|
||||||
|
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts, member_info, shop_details)
|
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class Oqs::HomeController < BaseOqsController
|
|||||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||||
.where("assigned_order_items.delivery_status = #{status}")
|
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0")
|
||||||
.group("assigned_order_items.assigned_order_item_id")
|
.group("assigned_order_items.assigned_order_item_id")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ class Origami::OrdersController < BaseOrigamiController
|
|||||||
@order = Order.find(params[:order_id])
|
@order = Order.find(params[:order_id])
|
||||||
sale_order = SaleOrder.find_by_order_id(@order.order_id)
|
sale_order = SaleOrder.find_by_order_id(@order.order_id)
|
||||||
if sale_order
|
if sale_order
|
||||||
sale = Sale.find(sale_order.sale_id)
|
unless sale_order.sale_id.nil?
|
||||||
@sale_status = sale.sale_status
|
sale = Sale.find(sale_order.sale_id)
|
||||||
|
@sale_status = sale.sale_status
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
|
|||||||
else
|
else
|
||||||
sale = Sale.find(booking.sale_id)
|
sale = Sale.find(booking.sale_id)
|
||||||
|
|
||||||
if sale.sale_status != "completed"
|
if sale.sale_status != "completed" && sale.sale_status != 'void'
|
||||||
@sale_array.push(sale)
|
@sale_array.push(sale)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ class Origami::VoidController < BaseOrigamiController
|
|||||||
sale.sale_status = 'void'
|
sale.sale_status = 'void'
|
||||||
sale.save
|
sale.save
|
||||||
|
|
||||||
|
bookings = sale.bookings
|
||||||
|
bookings.each do |booking|
|
||||||
|
orders = booking.orders
|
||||||
|
orders.each do |order|
|
||||||
|
# order.status = 'void'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
table_avaliable = true
|
table_avaliable = true
|
||||||
table = sale.bookings[0].dining_facility
|
table = sale.bookings[0].dining_facility
|
||||||
table.bookings.each do |booking|
|
table.bookings.each do |booking|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
class Reports::SaleItemsController < BaseReportController
|
|
||||||
authorize_resource :class => false
|
|
||||||
def index
|
|
||||||
|
|
||||||
from, to, report_type = get_date_range_from_params
|
|
||||||
|
|
||||||
@sale_data = Sale.get_by_range_by_saleitems(from,to,Sale::SALE_STATUS_COMPLETED,report_type)
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html
|
|
||||||
format.xls
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
class Reports::DailySalesController < BaseReportController
|
|
||||||
authorize_resource :class => false
|
|
||||||
def index
|
|
||||||
from, to ,report_type = get_date_range_from_params
|
|
||||||
@sale_data = Sale.daily_sales_list(from,to)
|
|
||||||
@tax = SaleTax.get_tax(from,to)
|
|
||||||
respond_to do |format|
|
|
||||||
format.html
|
|
||||||
format.xls
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -82,6 +82,15 @@ class Order < ApplicationRecord
|
|||||||
set_order_items
|
set_order_items
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# not insert with price 0
|
||||||
|
# puts item[:price]
|
||||||
|
# puts item
|
||||||
|
# if(item[:price] != 0 )
|
||||||
|
# OrderItem.processs_item(menu_item[:item_code], menu_item[:name], menu_item[:account_id],
|
||||||
|
# item[:quantity],menu_item[:price], item[:options], set_order_items, self.id,
|
||||||
|
# self.employee_name)
|
||||||
|
# end
|
||||||
|
|
||||||
OrderItem.processs_item(menu_item[:item_code], menu_item[:name], menu_item[:account_id],
|
OrderItem.processs_item(menu_item[:item_code], menu_item[:name], menu_item[:account_id],
|
||||||
item[:quantity],menu_item[:price], item[:options], set_order_items, self.id,
|
item[:quantity],menu_item[:price], item[:options], set_order_items, self.id,
|
||||||
self.employee_name)
|
self.employee_name)
|
||||||
|
|||||||
@@ -36,9 +36,11 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
# #Same Order_items can appear in two location.
|
# #Same Order_items can appear in two location.
|
||||||
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||||
# else
|
# else
|
||||||
|
|
||||||
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
if (order_item.price != 0)
|
||||||
oqs_order_items.push(order_item)
|
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||||
|
oqs_order_items.push(order_item)
|
||||||
|
end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,19 +6,23 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
#Print
|
#Print
|
||||||
order_item = print_query('order_item', item_code) #OrderItem.find_by_item_code(item_code)
|
order_item = print_query('order_item', item_code) #OrderItem.find_by_item_code(item_code)
|
||||||
|
|
||||||
filename = "tmp/order_item_#{order_item[0].item_name}" + ".pdf"
|
filename = "tmp/order_item_#{order_item[0].item_name}" + ".pdf"
|
||||||
pdf = OrderItemPdf.new(order_item[0], print_status, options)
|
|
||||||
pdf.render_file filename
|
|
||||||
|
|
||||||
if oqs.print_copy
|
# check for item not to show
|
||||||
self.print(filename, oqs.printer_name)
|
if order_item[0].price != 0
|
||||||
|
pdf = OrderItemPdf.new(order_item[0], print_status, options)
|
||||||
|
pdf.render_file filename
|
||||||
|
|
||||||
#For print copy
|
if oqs.print_copy
|
||||||
pdf.render_file filename.gsub(".","-copy.")
|
self.print(filename, oqs.printer_name)
|
||||||
self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
|
||||||
else
|
#For print copy
|
||||||
self.print(filename, oqs.printer_name)
|
pdf.render_file filename.gsub(".","-copy.")
|
||||||
end
|
self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
|
else
|
||||||
|
self.print(filename, oqs.printer_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Query for per order
|
# Query for per order
|
||||||
@@ -33,14 +37,18 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
||||||
# For Item Options
|
# For Item Options
|
||||||
options = odi.options == "[]"? "" : odi.options
|
options = odi.options == "[]"? "" : odi.options
|
||||||
pdf = OrderItemPdf.new(odi, print_status, options)
|
|
||||||
# pdf.render_file "tmp/order_item.pdf"
|
# check for item not to show
|
||||||
pdf.render_file filename
|
if odi.price != 0 || odi.price != 10
|
||||||
if oqs.print_copy
|
pdf = OrderItemPdf.new(odi, print_status, options)
|
||||||
self.print(filename, oqs.printer_name)
|
# pdf.render_file "tmp/order_item.pdf"
|
||||||
self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
pdf.render_file filename
|
||||||
else
|
if oqs.print_copy
|
||||||
self.print(filename, oqs.printer_name)
|
self.print(filename, oqs.printer_name)
|
||||||
|
self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
|
else
|
||||||
|
self.print(filename, oqs.printer_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# For Print Order Summary
|
# For Print Order Summary
|
||||||
@@ -69,19 +77,22 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
||||||
# For Item Options
|
# For Item Options
|
||||||
options = odi.options == "[]"? "" : odi.options
|
options = odi.options == "[]"? "" : odi.options
|
||||||
pdf = OrderItemPdf.new(odi, print_status, options)
|
|
||||||
|
|
||||||
pdf.render_file filename
|
|
||||||
|
|
||||||
if oqs.print_copy
|
# check for item not to show
|
||||||
self.print(filename, oqs.printer_name)
|
if odi.price != 0
|
||||||
|
pdf = OrderItemPdf.new(odi, print_status, options)
|
||||||
|
pdf.render_file filename
|
||||||
|
|
||||||
#For print copy
|
if oqs.print_copy
|
||||||
pdf.render_file filename.gsub(".","-copy.")
|
self.print(filename, oqs.printer_name)
|
||||||
self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
|
||||||
else
|
#For print copy
|
||||||
self.print(filename, oqs.printer_name)
|
pdf.render_file filename.gsub(".","-copy.")
|
||||||
end
|
self.print(filename.gsub(".","-copy."), oqs.printer_name)
|
||||||
|
else
|
||||||
|
self.print(filename, oqs.printer_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# For Print Order Summary
|
# For Print Order Summary
|
||||||
else
|
else
|
||||||
@@ -109,7 +120,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||||
left join customers as cus ON cus.customer_id = orders.customer_id")
|
left join customers as cus ON cus.customer_id = orders.customer_id")
|
||||||
.where("order_items.item_code = '#{ id }'")
|
.where("order_items.item_code = '#{ id }' AND order_items.price != 0")
|
||||||
.group("order_items.item_code")
|
.group("order_items.item_code")
|
||||||
elsif type == "order_summary"
|
elsif type == "order_summary"
|
||||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, cus.name as customer, df.type, df.name as dining")
|
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, cus.name as customer, df.type, df.name as dining")
|
||||||
@@ -118,7 +129,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||||
left join customers as cus ON cus.customer_id = orders.customer_id")
|
left join customers as cus ON cus.customer_id = orders.customer_id")
|
||||||
.where("orders.order_id = '#{ id }'")
|
.where("orders.order_id = '#{ id }' AND order_items.price != 0")
|
||||||
.group("order_items.order_items_id")
|
.group("order_items.order_items_id")
|
||||||
else
|
else
|
||||||
# order summary for booking
|
# order summary for booking
|
||||||
@@ -128,7 +139,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||||
left join customers as cus ON cus.customer_id = orders.customer_id")
|
left join customers as cus ON cus.customer_id = orders.customer_id")
|
||||||
.where("b.booking_id = '#{ id }'")
|
.where("b.booking_id = '#{ id }' AND order_items.price != 0")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class SalePayment < ApplicationRecord
|
|||||||
sale_data.sale_payments.each do |sale_payment|
|
sale_data.sale_payments.each do |sale_payment|
|
||||||
others = others + sale_payment.payment_amount
|
others = others + sale_payment.payment_amount
|
||||||
end
|
end
|
||||||
redeem_prices = sale_data.grand_total -others
|
redeem_prices = sale_data.grand_total - others
|
||||||
# Control for Paypar Cloud
|
# Control for Paypar Cloud
|
||||||
begin
|
begin
|
||||||
response = HTTParty.post(url,
|
response = HTTParty.post(url,
|
||||||
@@ -232,11 +232,19 @@ class SalePayment < ApplicationRecord
|
|||||||
self.sale.amount_changed = self.sale.amount_received.to_f - self.sale.grand_total.to_f
|
self.sale.amount_changed = self.sale.amount_received.to_f - self.sale.grand_total.to_f
|
||||||
all_received_amount = 0.0
|
all_received_amount = 0.0
|
||||||
sObj = Sale.find(self.sale_id)
|
sObj = Sale.find(self.sale_id)
|
||||||
|
is_credit = 0
|
||||||
sObj.sale_payments.each do |spay|
|
sObj.sale_payments.each do |spay|
|
||||||
all_received_amount += spay.payment_amount.to_f
|
all_received_amount += spay.payment_amount.to_f
|
||||||
|
if spay.payment_method == "creditnote"
|
||||||
|
is_credit = 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if (self.sale.grand_total <= all_received_amount)
|
if (self.sale.grand_total <= all_received_amount)
|
||||||
self.sale.payment_status = "paid"
|
if is_credit == 0
|
||||||
|
self.sale.payment_status = "paid"
|
||||||
|
else
|
||||||
|
self.sale.payment_status = "outstanding"
|
||||||
|
end
|
||||||
self.sale.sale_status = "completed"
|
self.sale.sale_status = "completed"
|
||||||
self.sale.save!
|
self.sale.save!
|
||||||
table_update_status(sObj)
|
table_update_status(sObj)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class OrderItemPdf < Prawn::Document
|
|||||||
def order_items(order_item, options)
|
def order_items(order_item, options)
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
|
|
||||||
#Add Order Item
|
#Add Order Item
|
||||||
add_order_items(order_item, options)
|
add_order_items(order_item, options)
|
||||||
|
|
||||||
dash(1, :space => 1, :phase => 1)
|
dash(1, :space => 1, :phase => 1)
|
||||||
|
|||||||
@@ -86,38 +86,38 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
move_down 5
|
move_down 5
|
||||||
|
|
||||||
order_item.each do|odi|
|
order_item.each do|odi|
|
||||||
y_position = cursor
|
# check for item not to show
|
||||||
|
if odi.price != 0
|
||||||
# pad_top(15) {
|
|
||||||
# text_box "#{odi.item_name}", :at =>[0,y_position], :width => self.item_width, :height =>self.item_height, :size => self.item_font_size, :overflow => :shrink_to_fix
|
|
||||||
# text_box "#{odi.qty}", :at =>[self.item_width,y_position], :width => self.qty_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
|
|
||||||
# }
|
|
||||||
bounding_box([0,y_position], :width => self.item_width) do
|
|
||||||
text "#{odi.item_name}", :size => self.item_font_size,:align => :left
|
|
||||||
end
|
|
||||||
|
|
||||||
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
|
||||||
text "#{odi.qty}", :size => self.item_font_size,:align => :left
|
|
||||||
end
|
|
||||||
|
|
||||||
move_down 5
|
|
||||||
|
|
||||||
# add option
|
|
||||||
options = odi.options == "[]"? "" : odi.options
|
|
||||||
|
|
||||||
if options != ""
|
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
|
|
||||||
text "#{options}", :size => self.item_font_size,:align => :left
|
bounding_box([0,y_position], :width => self.item_width) do
|
||||||
|
text "#{odi.item_name}", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
|
|
||||||
|
bounding_box([self.item_width,y_position], :width => self.qty_width) do
|
||||||
|
text "#{odi.qty}", :size => self.item_font_size,:align => :left
|
||||||
end
|
end
|
||||||
|
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|
||||||
|
# add option
|
||||||
|
options = odi.options == "[]"? "" : odi.options
|
||||||
|
|
||||||
|
if options != ""
|
||||||
|
y_position = cursor
|
||||||
|
bounding_box([0,y_position], :width => self.item_width) do
|
||||||
|
text "#{options}", :size => self.item_font_size,:align => :left
|
||||||
|
end
|
||||||
|
|
||||||
|
move_down 5
|
||||||
|
end
|
||||||
|
|
||||||
|
move_down 5
|
||||||
|
|
||||||
|
dash(1, :space => 1, :phase => 1)
|
||||||
|
stroke_horizontal_line 0, (self.page_width - self.margin)
|
||||||
|
move_down 5
|
||||||
end
|
end
|
||||||
|
|
||||||
dash(1, :space => 1, :phase => 1)
|
|
||||||
stroke_horizontal_line 0, (self.page_width - self.margin)
|
|
||||||
move_down 5
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
|
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
|
||||||
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details)
|
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details)
|
||||||
self.page_width = 210
|
self.page_width = 210
|
||||||
self.page_height = 2500
|
self.page_height = 7000
|
||||||
self.margin = 5
|
self.margin = 5
|
||||||
self.price_width = 40
|
self.price_width = 40
|
||||||
self.qty_width = 20
|
self.qty_width = 20
|
||||||
@@ -119,22 +119,25 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
move_down 5
|
move_down 5
|
||||||
sub_total = 0.0
|
sub_total = 0.0
|
||||||
sale_items.each do |item|
|
sale_items.each do |item|
|
||||||
sub_total += (item.qty*item.unit_price)
|
# check for item not to show
|
||||||
qty = item.qty
|
if item.price != 0
|
||||||
total_price = item.qty*item.unit_price
|
sub_total += (item.qty*item.unit_price)
|
||||||
price = item.unit_price
|
qty = item.qty
|
||||||
product_name = item.product_name
|
total_price = item.qty*item.unit_price
|
||||||
|
price = item.unit_price
|
||||||
|
product_name = item.product_name
|
||||||
|
|
||||||
|
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
|
|
||||||
pad_top(15) {
|
pad_top(15) {
|
||||||
text_box "#{product_name}", :at =>[0,y_position], :width => self.item_width, :height =>self.item_height, :size => self.item_font_size, :overflow => :shrink_to_fix
|
text_box "#{product_name}", :at =>[0,y_position], :width => self.item_width, :height =>self.item_height, :size => self.item_font_size, :overflow => :shrink_to_fix
|
||||||
text_box "#{price}", :at =>[self.item_width,y_position], :width => self.price_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
|
text_box "#{price}", :at =>[self.item_width,y_position], :width => self.price_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
|
||||||
text_box "#{qty}", :at =>[item_name_width,y_position], :width => self.qty_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
|
text_box "#{qty}", :at =>[item_name_width,y_position], :width => self.qty_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
|
||||||
text_box "#{total_price}", :at =>[(item_name_width+4),y_position], :width =>self.total_width+3, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
|
text_box "#{total_price}", :at =>[(item_name_width+4),y_position], :width =>self.total_width+3, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
|
||||||
}
|
}
|
||||||
move_down 1
|
move_down 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
||||||
<%= current_login_employee.name %>
|
|
||||||
<% if current_login_employee.role = "admin" %>
|
<% if current_login_employee.role = "admin" %>
|
||||||
<% elsif current_login_employee.role = "cashier" %>
|
<% elsif current_login_employee.role = "cashier" %>
|
||||||
<%= link_to "Cashier Station", origami_path %>
|
<%= link_to "Cashier Station", origami_path %>
|
||||||
@@ -13,7 +13,23 @@
|
|||||||
<%= link_to "Cashier Station", oishi_path %>
|
<%= link_to "Cashier Station", oishi_path %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% shop = Shop.first %>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="page-header" style="width:100%;text-align:center;background-color:#ddd;">
|
||||||
|
<h4 style="color : #ef404a;font-weight:bold;font-style:italic;"><%= shop.name %></h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
<%= shop.address %>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
<%= shop.phone_no %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,7 +34,8 @@
|
|||||||
<div class="tab-pane active" id="completed" role="tabpanel">
|
<div class="tab-pane active" id="completed" role="tabpanel">
|
||||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
<%
|
<%
|
||||||
@queue_completed_item.each do |qid|
|
@queue_completed_item.each do |qid|
|
||||||
|
if qid.price != 0
|
||||||
%>
|
%>
|
||||||
<div class="card queue_station">
|
<div class="card queue_station">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
@@ -69,7 +70,8 @@
|
|||||||
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
|
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
|
end
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,8 +87,9 @@
|
|||||||
<!--- Order Items -->
|
<!--- Order Items -->
|
||||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
<%
|
<%
|
||||||
@queue_items_details.each do |qid|
|
@queue_items_details.each do |qid|
|
||||||
if qid.station_name == qsi[:station_name]
|
if qid.price != 0
|
||||||
|
if qid.station_name == qsi[:station_name]
|
||||||
%>
|
%>
|
||||||
<div class="card queue_station">
|
<div class="card queue_station">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
@@ -121,7 +124,8 @@
|
|||||||
<button id=<%= 'assigned_queue_' + qid.assigned_order_item_id.to_s %> class="btn btn-primary order-item order-complete">COMPLETE</button>
|
<button id=<%= 'assigned_queue_' + qid.assigned_order_item_id.to_s %> class="btn btn-primary order-item order-complete">COMPLETE</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
|
|||||||
@@ -29,7 +29,10 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<% sub_total = 0 %>
|
<% sub_total = 0 %>
|
||||||
<% @sale_data.sale_items.each do |sale_item| %>
|
<% @sale_data.sale_items.each do |sale_item| %>
|
||||||
<% sub_total += sale_item.qty*sale_item.unit_price%>
|
<%
|
||||||
|
sub_total += sale_item.qty*sale_item.unit_price
|
||||||
|
unless sale_item.price == 0
|
||||||
|
%>
|
||||||
<tr class="item-row" id=<%= sale_item.sale_item_id %> >
|
<tr class="item-row" id=<%= sale_item.sale_item_id %> >
|
||||||
<td style="width:60%; text-align:left">
|
<td style="width:60%; text-align:left">
|
||||||
<span id="item-account-type" class="hidden"><%=sale_item.account_id%></span>
|
<span id="item-account-type" class="hidden"><%=sale_item.account_id%></span>
|
||||||
@@ -42,7 +45,10 @@
|
|||||||
<span id="item-total-price"><%=(sale_item.qty*sale_item.unit_price)%></span>
|
<span id="item-total-price"><%=(sale_item.qty*sale_item.unit_price)%></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<%end %>
|
<%
|
||||||
|
end
|
||||||
|
end
|
||||||
|
%>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -166,7 +172,7 @@
|
|||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button id="net" class="btn btn-warning fluid action-btn">Net</button>
|
<button id="net" class="btn btn-warning fluid action-btn">Nett</button>
|
||||||
<button id="percentage" class="btn btn-primary fluid action-btn">Percentage</button>
|
<button id="percentage" class="btn btn-primary fluid action-btn">Percentage</button>
|
||||||
<button id="remove-item" class="btn btn-default fluid action-btn">Remove</button>
|
<button id="remove-item" class="btn btn-default fluid action-btn">Remove</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= sale.receipt_no %>
|
<%= sale.receipt_no %>
|
||||||
|
<span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= sale.receipt_no %>
|
<%= sale.receipt_no %>
|
||||||
|
<span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
<%if @customer %>
|
<%if @customer %>
|
||||||
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||||
<p>Customer : <%= @customer.name rescue "" %></p>
|
<p>Customer : <%= @customer.name rescue "" %></p>
|
||||||
<%end%>
|
<%end%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
@@ -249,8 +250,10 @@
|
|||||||
</table>
|
</table>
|
||||||
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if @sale_array.size > 1 %>
|
||||||
<br><br>
|
<br><br>
|
||||||
Pending Payment
|
Pending Payment
|
||||||
|
<% end %>
|
||||||
<% @sale_array.each do |sale|
|
<% @sale_array.each do |sale|
|
||||||
if @sale_array.size > 1
|
if @sale_array.size > 1
|
||||||
unless sale.receipt_no == @sale_array[0].receipt_no
|
unless sale.receipt_no == @sale_array[0].receipt_no
|
||||||
@@ -287,7 +290,7 @@
|
|||||||
<button type="button" class="btn btn-primary btn-block" id='move'>Move</button>
|
<button type="button" class="btn btn-primary btn-block" id='move'>Move</button>
|
||||||
<button type="button" id="request_bills" class="btn btn-primary btn-block">Req.Bill</button>
|
<button type="button" id="request_bills" class="btn btn-primary btn-block">Req.Bill</button>
|
||||||
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
|
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
|
||||||
<button type="button" class="btn btn-primary btn-block" disabled=""> Void </button>
|
<button type="button" class="btn btn-primary btn-block" disabled> Void </button>
|
||||||
<% else %>
|
<% else %>
|
||||||
<button type="button" class="btn btn-primary btn-block" disabled>Add Order</button>
|
<button type="button" class="btn btn-primary btn-block" disabled>Add Order</button>
|
||||||
<button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button>
|
<button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button>
|
||||||
@@ -473,7 +476,7 @@ $('#edit').on('click',function(){
|
|||||||
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
|
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
|
||||||
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
|
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#void').on('click',function () {
|
$('#void').on('click',function () {
|
||||||
var sure = confirm("Are you sure want to Void");
|
var sure = confirm("Are you sure want to Void");
|
||||||
if (sure == true) {
|
if (sure == true) {
|
||||||
@@ -488,9 +491,9 @@ $('#edit').on('click',function(){
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<% @complete.each do |sale| %>
|
<% @complete.each do |sale| %>
|
||||||
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= sale.receipt_no %>
|
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -95,10 +95,12 @@
|
|||||||
order_status = ""
|
order_status = ""
|
||||||
sale_order = SaleOrder.find_by_order_id(order)
|
sale_order = SaleOrder.find_by_order_id(order)
|
||||||
if sale_order
|
if sale_order
|
||||||
sale = Sale.find(sale_order.sale_id)
|
unless sale_order.sale_id.nil?
|
||||||
order_status = sale.sale_status
|
sale = Sale.find(sale_order.sale_id)
|
||||||
if order_status == 'new'
|
order_status = sale.sale_status
|
||||||
order_status = order.status
|
if order_status == 'new'
|
||||||
|
order_status = order.status
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
order_status = order.status
|
order_status = order.status
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>Table No</strong> <% if @sale_data%>- <%=@sale_data.receipt_no%><% end %></td>
|
<td><strong>Table No</strong> <% if @sale_data%>- <%=@sale_data.receipt_no%><% end %></td>
|
||||||
<td><strong>Sale Id</strong> </span><span id="sale_id"><% if @sale_data %><%=@sale_data.sale_id %><% end %></td>
|
<td><strong>Sale Id</strong> <span id="sale_id"><% if @sale_data %><%=@sale_data.sale_id %><% end %></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>Customer :</strong> <%= @sale_data.customer.name%></td>
|
<td><strong>Customer :</strong> <%= @sale_data.customer.name%></td>
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
|
|
||||||
<button type="button" class="btn btn-primary btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
|
<button type="button" class="btn btn-primary btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
|
||||||
<button type="button" class="btn btn-primary btn-block"> FOC </button>
|
<button type="button" class="btn btn-primary btn-block"> FOC </button>
|
||||||
<button type="button" class="btn btn-primary btn-block"> Void </button>
|
<button type="button" class="btn btn-primary btn-block" id="void"> Void </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -354,6 +354,23 @@ $( document ).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#void').on('click',function () {
|
||||||
|
var sure = confirm("Are you sure want to Void");
|
||||||
|
if (sure == true) {
|
||||||
|
var sale_id = $('#sale_id').text();
|
||||||
|
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: ajax_url,
|
||||||
|
success: function () {
|
||||||
|
window.location.href = '/origami/';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function update_balance(){
|
function update_balance(){
|
||||||
@@ -369,4 +386,5 @@ function update_balance(){
|
|||||||
var result = amount_due - total;
|
var result = amount_due - total;
|
||||||
$('#balance').text(result.toFixed(2));
|
$('#balance').text(result.toFixed(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<% @complete.each do |sale| %>
|
<% @complete.each do |sale| %>
|
||||||
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= sale.receipt_no %>
|
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
sub_total = 0
|
sub_total = 0
|
||||||
if @status == "sale"
|
if @status == "sale"
|
||||||
@obj.sale_items.each do |sale_item|
|
@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 %>">
|
<input type="hidden" id="sale_id" value="<%= @obj.sale_id %>">
|
||||||
<% unless sale_item.price == 0 %>
|
<% unless sale_item.price == 0 %>
|
||||||
@@ -213,32 +213,52 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
<%
|
||||||
|
if @status_sale == 'sale'
|
||||||
|
unless @order_items.nil?
|
||||||
|
%>
|
||||||
|
Pending New Order
|
||||||
|
<table class="table table-striped">
|
||||||
|
<%
|
||||||
|
count = 0
|
||||||
|
@order_items.each do |order_item |
|
||||||
|
count += 1
|
||||||
|
%>
|
||||||
|
|
||||||
<%
|
<tr>
|
||||||
if @status == 'sale'
|
<td><%= count %>
|
||||||
unless @order_items.nil?
|
<td class='item-name'><%= order_item.item_name %></td>
|
||||||
%>
|
<td class='item-attr'><%= order_item.qty %></td>
|
||||||
Added New Order
|
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
||||||
<table class="table table-striped">
|
</tr>
|
||||||
<%
|
|
||||||
@order_items.each do |order_item |
|
<%
|
||||||
|
end
|
||||||
%>
|
%>
|
||||||
|
</table>
|
||||||
|
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
||||||
|
<% end %>
|
||||||
|
<% if @sale_array.size > 1 %>
|
||||||
|
<br><br>
|
||||||
|
Pending Payment
|
||||||
|
<% end %>
|
||||||
|
<% @sale_array.each do |sale|
|
||||||
|
if @sale_array.size > 1
|
||||||
|
unless sale.receipt_no == @sale_array[0].receipt_no
|
||||||
|
%>
|
||||||
|
|
||||||
<tr>
|
<table class="table table-striped">
|
||||||
<td class='item-name'><%= order_item.item_name %></td>
|
<tr>
|
||||||
<td class='item-attr'><%= order_item.qty %></td>
|
<td>Receipt No - <%= sale.receipt_no %></td>
|
||||||
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
<%
|
<%
|
||||||
end
|
end
|
||||||
%>
|
end
|
||||||
</table>
|
end
|
||||||
<button class='btn btn-primary'> Add to existing invoice </button>
|
end
|
||||||
<%
|
%>
|
||||||
end
|
|
||||||
end
|
|
||||||
%>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<% @complete.each do |sale| %>
|
<% @complete.each do |sale| %>
|
||||||
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<%= sale.receipt_no %>
|
<%= sale.receipt_no %><span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -185,7 +185,9 @@
|
|||||||
<!-- Column Three -->
|
<!-- Column Three -->
|
||||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
<button type="button" id="void" class="btn btn-primary btn-block">VOID</button>
|
<% if @sale.sale_status != 'void' %>
|
||||||
|
<button type="button" id="void" class="btn btn-primary btn-block">VOID</button>
|
||||||
|
<% end %>
|
||||||
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
|
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -128,6 +128,7 @@
|
|||||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
|
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
|
||||||
|
<button type="button" id="void" class="btn btn-primary btn-block"> Void </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
@@ -143,5 +144,21 @@ $('#pay').on('click',function() {
|
|||||||
});
|
});
|
||||||
$('#back').on('click',function(){
|
$('#back').on('click',function(){
|
||||||
window.location.href = '/origami/table/<%= @table.id %>';
|
window.location.href = '/origami/table/<%= @table.id %>';
|
||||||
})
|
});
|
||||||
|
$('#void').on('click',function () {
|
||||||
|
var sure = confirm("Are you sure want to Void");
|
||||||
|
if (sure == true) {
|
||||||
|
var sale_id = $('#sale_id').val();
|
||||||
|
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: ajax_url,
|
||||||
|
success: function () {
|
||||||
|
window.location.href = '/origami/';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -117,23 +117,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--
|
|
||||||
<div class = "row">
|
|
||||||
|
|
||||||
<div class = "span3">
|
|
||||||
<input type="button" value="Filter by Shift" class='btn' onclick = "select_shift(this)">
|
|
||||||
</div>
|
|
||||||
<div class = "span3">
|
|
||||||
<select name="shift" id="shift">
|
|
||||||
<option value="">All Shift</option>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class = "span3">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
$('#custom_excel').hide();
|
$('#custom_excel').hide();
|
||||||
@@ -145,7 +128,68 @@ $(function(){
|
|||||||
// window.location = url;
|
// window.location = url;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var item = $('#item').val();
|
||||||
|
var payment_type = $('#payment_type');
|
||||||
|
|
||||||
|
if(item == 'order'){
|
||||||
|
$('#cashier').hide();
|
||||||
|
$('#waiter').show();
|
||||||
|
if(payment_type){
|
||||||
|
$('#payment_type').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(item == 'sale'){
|
||||||
|
$('#waiter').hide();
|
||||||
|
$('#cashier').show();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#waiter').hide();
|
||||||
|
$('#cashier').show();
|
||||||
|
$("#item").val('sale');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Reset the form to pervious values
|
||||||
|
$("#branch").val(<%=params[:branch]%>);
|
||||||
|
$("#waiter").val("<%=params[:waiter]%>");
|
||||||
|
$("#cashier").val(<%=params[:cashier]%>);
|
||||||
|
$("#product").val(<%=params[:product]%>);
|
||||||
|
$("#singer").val(<%=params[:singer]%>);
|
||||||
|
$("#item").val('<%=params[:item]%>');
|
||||||
|
$("#guest_role").val('<%=params[:guest_role]%>');
|
||||||
|
|
||||||
|
|
||||||
|
$("#from").val("<%=params[:from]%>");
|
||||||
|
$("#to").val("<%=params[:to]%>");
|
||||||
|
$("#sel_period").val(<%=params[:period]%>);
|
||||||
|
$("#sel_sale_type").val(<%=params[:sale_type]%>);
|
||||||
|
|
||||||
|
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
|
||||||
|
$("#rd_period_type_1").attr("checked","checked");
|
||||||
|
<% else %>
|
||||||
|
$("#rd_period_type_0").attr("checked","checked");
|
||||||
|
<% end %>
|
||||||
|
$(".btn-group button").removeClass("active");
|
||||||
|
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
|
||||||
|
$("#btn_report_type_<%= report_type %>").addClass("active");
|
||||||
|
|
||||||
|
$('#item').change(function(){
|
||||||
|
var item = $('#item').val();
|
||||||
|
var payment_type = $('#payment_type');
|
||||||
|
|
||||||
|
if(item == 'sale'){
|
||||||
|
$('#waiter').hide();
|
||||||
|
$('#cashier').show();
|
||||||
|
if(payment_type){
|
||||||
|
$('#payment_type').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#cashier').hide();
|
||||||
|
$('#waiter').show();
|
||||||
|
if(payment_type){
|
||||||
|
$('#payment_type').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -1,135 +1,43 @@
|
|||||||
<div class="span12">
|
<div class="span12">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|
||||||
<% unless @sale_data.empty? %>
|
<table class="table table-striped">
|
||||||
<h3 align="center"><%=current_active_location.name%></h3>
|
<thead>
|
||||||
<h3 align="center">Sales Summary Report (BreadTalk)</h3>
|
<tr>
|
||||||
<% if params[:from]%>
|
<th style='text-align:center;'>Date</th>
|
||||||
<h4>From Date : <%= params[:from] %> , To Date : <%= params[:to] %></h4>
|
<th style='text-align:center;'>Receipt No</th>
|
||||||
<% end %>
|
<th style='text-align:center;'>Cashier Name</th>
|
||||||
<table class="table table-bordered" border="1">
|
<th style='text-align:center;'>Gross Sales</th>
|
||||||
<thead>
|
<th style='text-align:center;'>Discount</th>
|
||||||
<tr>
|
<th style='text-align:center;'>Total Sales</th>
|
||||||
<!-- <th style='text-align:center;'>Sr.no</th> -->
|
<% TaxProfile.all.each do |r|%>
|
||||||
<th style='text-align:center;'>Location Name</th>
|
<th style='text-align:center;'><%=r.name%></th>
|
||||||
<th style='text-align:center;'>Date</th>
|
<% end %>
|
||||||
<th style='text-align:center;'>Cash Sales</th>
|
<th style='text-align:center;'>Nett Sales</th>
|
||||||
<th style='text-align:center;'>Credit Sales</th>
|
</tr>
|
||||||
<th style='text-align:center;'>Credit Received</th>
|
</thead>
|
||||||
<!-- <th style='text-align:center;'>Other Payment</th> -->
|
|
||||||
<th style='text-align:center;'>Card Payment</th>
|
|
||||||
<th style='text-align:center;'>Total Discount</th>
|
|
||||||
<th style='text-align:center;'>Total Taxes</th>
|
|
||||||
<th style='text-align:center;'>Total Other Charges</th>
|
|
||||||
<th style='text-align:center;'>FOC Sales</th>
|
|
||||||
<th style='text-align:center;'>Void Sales</th>
|
|
||||||
<th style='text-align:center;'>Grand Total</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<% void = 0 %>
|
|
||||||
<% card = 0 %>
|
|
||||||
<% credit_payment = 0 %>
|
|
||||||
<% cash = 0 %>
|
|
||||||
<% credit = 0 %>
|
|
||||||
<% foc = 0 %>
|
|
||||||
<% discount = 0 %>
|
|
||||||
<% total = 0 %>
|
|
||||||
<% count = 1 %>
|
|
||||||
<% discount_rev = 0 %>
|
|
||||||
<% total_rev = 0 %>
|
|
||||||
<% grand_rev = 0 %>
|
|
||||||
<% total_other_charges=0 %>
|
|
||||||
<% total_tax=0 %>
|
|
||||||
<% cash_received = 0 %>
|
|
||||||
<% total_cash_received = 0 %>
|
|
||||||
<% today_credit_payment_amount = 0 %>
|
|
||||||
<% old_location_id = 0%>
|
|
||||||
<% sub_total = 0 %>
|
|
||||||
<% count_of_void = 0 %>
|
|
||||||
<% flag = false %>
|
|
||||||
<% @sale_data.each do |sale| %>
|
|
||||||
<% credit_payment += sale[:credit_payment].to_f %>
|
|
||||||
<% card += sale[:card_amount].to_f %>
|
|
||||||
<% cash += sale[:cash_amount].to_f %>
|
|
||||||
<% credit += sale[:credit_amount].to_f %>
|
|
||||||
<% foc += sale[:foc_amount].to_f %>
|
|
||||||
<% discount += sale[:total_discount].to_f %>
|
|
||||||
<% total += sale[:grand_total].to_f %>
|
|
||||||
<% total_other_charges +=sale[:other_charges].to_f %>
|
|
||||||
<% total_tax +=sale[:total_tax].to_f %>
|
|
||||||
|
|
||||||
<% cash_received = sale[:cash_amount].to_f + sale[:credit_payment].to_f%>
|
<tbody>
|
||||||
<% total_cash_received = cash.to_f + credit_payment.to_f%>
|
<% total_sales = 0 %>
|
||||||
<% today_credit_payment_amount += sale[:today_credit_payment].to_f %>
|
<% net_sales = 0 %>
|
||||||
|
<% @sale_data.each do |sale| %>
|
||||||
<tr>
|
<% total_sales = sale.total_amount.to_f - sale.total_discount.to_f%>
|
||||||
<!-- <td style='text-align:right;'><%= count %></td> -->
|
<% net_sales = total_sales.to_f + sale.total_tax.to_f%>
|
||||||
|
<tr>
|
||||||
<td style='text-align:right;'><%= sale[:location].to_s rescue '-' %></td>
|
<td style='text-align:center;'><%= sale.receipt_date.strftime("#{sale.receipt_date.day.ordinalize} %b") rescue '-' %></td>
|
||||||
<td><%= sale[:sale_date].strftime("#{sale[:sale_date].day.ordinalize} %b") rescue '-' %></td>
|
<td style='text-align:center;'><%=sale.receipt_no.to_s rescue ''%></td>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:cash_amount].to_f), :delimiter => ',') %></td>
|
<td style='text-align:center;'><%=Employee.find(sale.cashier_id).name rescue ''%></td>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:credit_amount].to_f), :delimiter => ',') %></td>
|
<td style='text-align:center;'><%= number_with_delimiter(sprintf("%.2f",sale.total_amount.to_f), :delimiter => ',') %></td>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:credit_payment].to_f), :delimiter => ',') %></td>
|
<td style='text-align:center;'><%= number_with_delimiter(sprintf("%.2f",sale.total_discount.to_f), :delimiter => ',') %></td>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:card_amount].to_f), :delimiter => ',') %></td>
|
<td style='text-align:center;'><%= number_with_delimiter(sprintf("%.2f",total_sales.to_f), :delimiter => ',') %></td>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:total_discount].to_f), :delimiter => ',') %></td>
|
<% sale.sale_taxes.each do |sale|%>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:total_tax].to_f), :delimiter => ',') %></td>
|
<td style='text-align:center;'><%= number_with_delimiter(sprintf("%.2f",sale.tax_payable_amount.to_f), :delimiter => ',') %></td>
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:other_charges].to_f), :delimiter => ',') %></td>
|
<% end %>
|
||||||
<td style='text-align:right;color: pink;'><%= number_with_delimiter(sprintf("%.2f",sale[:foc_amount].to_f), :delimiter => ',') %></td>
|
|
||||||
<% total_void_amount = 0 %>
|
<td style='text-align:center;'><%= number_with_delimiter(sprintf("%.2f",net_sales.to_f), :delimiter => ',') %></td>
|
||||||
<% if !@daily_void.nil? %>
|
</tr>
|
||||||
<% @daily_void.each do |d_v|%>
|
<% end %>
|
||||||
|
</tbody>
|
||||||
<% if d_v[:daily_void_amt].to_i > 0 %>
|
</table>
|
||||||
<% if d_v[:location_id] == sale[:location_id] %>
|
|
||||||
<% if d_v[:date].utc.getlocal.strftime("%Y-%m-%d").to_s == sale[:sale_date].to_s%>
|
|
||||||
<%count_of_void+=1%>
|
|
||||||
|
|
||||||
<%total_void_amount += d_v[:daily_void_amt].to_f%>
|
|
||||||
<% flag = true %>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%end %>
|
|
||||||
<% end%>
|
|
||||||
<% end%>
|
|
||||||
<% end%>
|
|
||||||
<% end%>
|
|
||||||
<% if flag == true%>
|
|
||||||
<% void += total_void_amount.to_f %>
|
|
||||||
<td style='color:red;text-align:right;'> <%= number_with_delimiter(sprintf("%.2f",total_void_amount.to_f), :delimiter => ',') %></td>
|
|
||||||
<% flag = false %>
|
|
||||||
<% end%>
|
|
||||||
<%if count_of_void == 0%>
|
|
||||||
<td style='color:red;text-align:right;'> <%= number_with_delimiter(sprintf("%.2f",0.to_f), :delimiter => ',') %></td>
|
|
||||||
<%end %>
|
|
||||||
<td style='text-align:right;'>
|
|
||||||
<%= number_with_delimiter(sprintf("%.2f",((sale[:cash_amount].to_f + sale[:credit_amount].to_f + sale[:card_amount].to_f + sale[:credit_payment].to_f) - sale[:today_credit_payment].to_f) ).to_f, :delimiter => ',') %>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<%count_of_void= 0%>
|
|
||||||
<% count = count + 1 %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<tr style="font-weight:600;">
|
|
||||||
<td colspan="2" style='text-align:center;'>Grand Total</td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",cash), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",credit ), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",credit_payment ), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",card ), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",discount ), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",total_tax ), :delimiter => ',') %></td>
|
|
||||||
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",total_other_charges ), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;color: pink;'><%= number_with_delimiter(sprintf("%.2f",foc ), :delimiter => ',') %></td>
|
|
||||||
<td style='color:red;text-align:right;'><%= number_with_delimiter(sprintf("%.2f",void ), :delimiter => ',') %></td>
|
|
||||||
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f", (cash.to_f + credit.to_f + card.to_f + credit_payment.to_f) - today_credit_payment_amount.to_f ).to_f, :delimiter => ',') %></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ menu_category1 = MenuCategory.create({menu: menu, code:"C001", name: "Soup Base"
|
|||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"VIP Room Individual Pot",item_instance_code:"II0031", menu_item: menu_category1_menu_item2, price:10.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"VIP Room Individual Pot",item_instance_code:"II0031", menu_item: menu_category1_menu_item2, price:10.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Beauty Collagen Broth",item_instance_code:"II0053", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Beauty Collagen Broth",item_instance_code:"II0053", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Spicy Nourishing Broth ",item_instance_code:"II0063", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Spicy Nourishing Broth ",item_instance_code:"II0063", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Herbal Drunken Chicken Broth",item_instance_code:"II0073", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Herbal Drunken Chicken Broth",item_instance_code:"II0073", menu_item: menu_category1_menu_item2, price:8000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cooling Coconut Broth",item_instance_code:"II0083", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cooling Coconut Broth",item_instance_code:"II0083", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Lonevity Wild Pine Mushroom Broth",item_instance_code:"II0093", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Lonevity Wild Pine Mushroom Broth",item_instance_code:"II0093", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Vitamin C Tomato Sweet Corn Broth",item_instance_code:"II0103", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Vitamin C Tomato Sweet Corn Broth",item_instance_code:"II0103", menu_item: menu_category1_menu_item2, price:6000.00, is_on_promotion:false}])
|
||||||
@@ -39,8 +39,8 @@ menu_category1 = MenuCategory.create({menu: menu, code:"C001", name: "Soup Base"
|
|||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Quart Pot",item_instance_code:"II0041", menu_item: menu_category1_menu_item3, price:10.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Quart Pot",item_instance_code:"II0041", menu_item: menu_category1_menu_item3, price:10.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Beauty Collagen Broth",item_instance_code:"II0054", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Beauty Collagen Broth",item_instance_code:"II0054", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Spicy Nourishing Broth ",item_instance_code:"II0064", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Spicy Nourishing Broth ",item_instance_code:"II0064", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Herbal Drunken Chicken Broth",item_instance_code:"II0074", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Herbal Drunken Chicken Broth",item_instance_code:"II0074", menu_item: menu_category1_menu_item3, price:8000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cooling Coconut Broth",item_instance_code:"II0084", menu_item: menu_category1_menu_item3, price:8000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cooling Coconut Broth",item_instance_code:"II0084", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Lonevity Wild Pine Mushroom Broth",item_instance_code:"II0094", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Lonevity Wild Pine Mushroom Broth",item_instance_code:"II0094", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Vitamin C Tomato Sweet Corn Broth",item_instance_code:"II0104", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Vitamin C Tomato Sweet Corn Broth",item_instance_code:"II0104", menu_item: menu_category1_menu_item3, price:6000.00, is_on_promotion:false}])
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ menu_category1 = MenuCategory.create({menu: menu, code:"C001", name: "Soup Base"
|
|||||||
# Assorted Platter
|
# Assorted Platter
|
||||||
menu_category2 = MenuCategory.create({menu: menu, code:"C002", name: "Specialty Assorted Platter", alt_name: "Assorted Platter", order_by: 2, created_by: "SYSTEM DEFAULT"})
|
menu_category2 = MenuCategory.create({menu: menu, code:"C002", name: "Specialty Assorted Platter", alt_name: "Assorted Platter", order_by: 2, created_by: "SYSTEM DEFAULT"})
|
||||||
# Pork Platter
|
# Pork Platter
|
||||||
menu_category1_menu_item3 = SimpleMenuItem.create({item_code:"01004", name: "Pork Platter", alt_name: "Twin Pot",menu_category: menu_category2 , min_selectable_item: 1, max_selectable_item:1, account: food })
|
menu_category1_menu_item3 = SimpleMenuItem.create({item_code:"01048", name: "Pork Platter", alt_name: "Twin Pot",menu_category: menu_category2 , min_selectable_item: 1, max_selectable_item:1, account: food })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Pork Platter",item_instance_code:"II0111", menu_item: menu_category1_menu_item3, price:10000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Pork Platter",item_instance_code:"II0111", menu_item: menu_category1_menu_item3, price:10000.00, is_on_promotion:false}])
|
||||||
# Beef Platter
|
# Beef Platter
|
||||||
menu_category1_menu_item4 = SimpleMenuItem.create({item_code:"01005", name: "Beef Platter", alt_name: "Twin Pot",menu_category: menu_category2 , min_selectable_item: 1, max_selectable_item:1, account: food })
|
menu_category1_menu_item4 = SimpleMenuItem.create({item_code:"01005", name: "Beef Platter", alt_name: "Twin Pot",menu_category: menu_category2 , min_selectable_item: 1, max_selectable_item:1, account: food })
|
||||||
@@ -462,7 +462,7 @@ menu_category13 = MenuCategory.create({menu: menu, code:"C0012", name: "Vegetabl
|
|||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Half Potion",item_instance_code:"II1122", menu_item: menu_category1_menu_item105, price:1200.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Half Potion",item_instance_code:"II1122", menu_item: menu_category1_menu_item105, price:1200.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Full Potion",item_instance_code:"II1121", menu_item: menu_category1_menu_item105, price:2400.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Full Potion",item_instance_code:"II1121", menu_item: menu_category1_menu_item105, price:2400.00, is_on_promotion:false}])
|
||||||
# Bamboo Shoot
|
# Bamboo Shoot
|
||||||
menu_category1_menu_item105 = SimpleMenuItem.create({item_code:"01106", name: "Kangkung", alt_name: "Twin Pot",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
|
menu_category1_menu_item105 = SimpleMenuItem.create({item_code:"01112", name: "Bamboo Shoot", alt_name: "Twin Pot",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Half Potion",item_instance_code:"II1132", menu_item: menu_category1_menu_item105, price:1200.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Half Potion",item_instance_code:"II1132", menu_item: menu_category1_menu_item105, price:1200.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Full Potion",item_instance_code:"II1131", menu_item: menu_category1_menu_item105, price:2400.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Full Potion",item_instance_code:"II1131", menu_item: menu_category1_menu_item105, price:2400.00, is_on_promotion:false}])
|
||||||
# Others
|
# Others
|
||||||
@@ -566,17 +566,17 @@ menu_category19 = MenuCategory.create({menu: menu, code:"C0018", name: "Beer", a
|
|||||||
menu_category1_menu_item132 = SimpleMenuItem.create({item_code:"01133", name: "Myanmar Beer", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
menu_category1_menu_item132 = SimpleMenuItem.create({item_code:"01133", name: "Myanmar Beer", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1392", menu_item: menu_category1_menu_item132, price:1500.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1392", menu_item: menu_category1_menu_item132, price:1500.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Bottle",item_instance_code:"II1391", menu_item: menu_category1_menu_item132, price:3000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Bottle",item_instance_code:"II1391", menu_item: menu_category1_menu_item132, price:3000.00, is_on_promotion:false}])
|
||||||
# Tiger Beer
|
# # Tiger Beer
|
||||||
menu_category1_menu_item133 = SimpleMenuItem.create({item_code:"01134", name: "Tiger Beer ", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
# menu_category1_menu_item133 = SimpleMenuItem.create({item_code:"01134", name: "Tiger Beer ", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1402", menu_item: menu_category1_menu_item133, price:1500.00, is_on_promotion:false}])
|
# menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1402", menu_item: menu_category1_menu_item133, price:1500.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Bottle",item_instance_code:"II1401", menu_item: menu_category1_menu_item133, price:3000.00, is_on_promotion:false}])
|
# menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Bottle",item_instance_code:"II1401", menu_item: menu_category1_menu_item133, price:3000.00, is_on_promotion:false}])
|
||||||
# Heineken Beer
|
# Heineken Beer
|
||||||
menu_category1_menu_item134 = SimpleMenuItem.create({item_code:"01135", name: "Heineken Beer", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
menu_category1_menu_item134 = SimpleMenuItem.create({item_code:"01135", name: "Heineken Beer", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1412", menu_item: menu_category1_menu_item134, price:1800.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1402", menu_item: menu_category1_menu_item134, price:1800.00, is_on_promotion:false}])
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Bottle",item_instance_code:"II1411", menu_item: menu_category1_menu_item134, price:3600.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Bottle",item_instance_code:"II1401", menu_item: menu_category1_menu_item134, price:3600.00, is_on_promotion:false}])
|
||||||
# Tsing Tao Beer
|
# Tsing Tao Beer
|
||||||
menu_category1_menu_item135 = SimpleMenuItem.create({item_code:"01136", name: "Tsing Tao Beer", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
menu_category1_menu_item135 = SimpleMenuItem.create({item_code:"01136", name: "Tsing Tao Beer", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",item_instance_code:"II1421", menu_item: menu_category1_menu_item135, price:2800.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",item_instance_code:"II141", menu_item: menu_category1_menu_item135, price:2800.00, is_on_promotion:false}])
|
||||||
# ABC Stout
|
# ABC Stout
|
||||||
menu_category1_menu_item136 = SimpleMenuItem.create({item_code:"01137", name: "ABC Stout ", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
menu_category1_menu_item136 = SimpleMenuItem.create({item_code:"01137", name: "ABC Stout ", alt_name: "Twin Pot",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
|
||||||
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1432", menu_item: menu_category1_menu_item136, price:2000.00, is_on_promotion:false}])
|
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Can",item_instance_code:"II1432", menu_item: menu_category1_menu_item136, price:2000.00, is_on_promotion:false}])
|
||||||
|
|||||||
Reference in New Issue
Block a user