fix conflit
This commit is contained in:
102
.idea/workspace.xml
generated
102
.idea/workspace.xml
generated
@@ -3,16 +3,6 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dump.rdb" afterPath="$PROJECT_DIR$/dump.rdb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/origami/table_invoices_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/table_invoices_controller.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/home/index.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/home/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/orders/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/orders/show.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/payments/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/payments/show.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/sales/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/sales/show.html.erb" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/table_invoices/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/table_invoices/show.html.erb" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/.bundle/" />
|
||||
<ignored path="$PROJECT_DIR$/components/" />
|
||||
@@ -85,7 +75,45 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="128" lean-forward="false" selection-start-line="28" selection-start-column="128" selection-end-line="28" selection-end-column="128" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1498539948000" expanded="true" signature="3450:4239" ph="do ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="3598:4131" ph="<%...%>" />
|
||||
<marker date="1498539948000" expanded="true" signature="3714:4114" ph="if ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="4005:4027" ph="if ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="4395:6842" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4419:6833" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4454:4539" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4571:6821" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4609:5000" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4661:4756" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4678:4738" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4713:4734" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4819:4984" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5059:5210" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5111:5193" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5243:6180" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5313:6164" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5334:5545" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5354:5523" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5566:6144" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5583:5749" ph="<%...%>" />
|
||||
<marker date="1498539948000" expanded="true" signature="5817:6041" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6058:6123" ph="<%...%>" />
|
||||
<marker date="1498539948000" expanded="true" signature="6215:6807" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6284:6791" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6302:6491" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6509:6725" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6908:7237" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6999:7127" ph="if ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="7253:8136" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="7283:7870" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7322:7434" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7471:7574" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7612:7723" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7761:7867" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7905:8012" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="8047:8088" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -93,8 +121,8 @@
|
||||
<file leaf-file-name="show.html.erb" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="550">
|
||||
<caret line="191" column="7" lean-forward="true" selection-start-line="191" selection-start-column="7" selection-end-line="191" selection-end-column="7" />
|
||||
<state relative-caret-position="249">
|
||||
<caret line="139" column="30" lean-forward="true" selection-start-line="139" selection-start-column="30" selection-end-line="139" selection-end-column="30" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -879,12 +907,12 @@
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1498458293643</updated>
|
||||
<workItem from="1498458295318" duration="2552000" />
|
||||
<workItem from="1498465879846" duration="18166000" />
|
||||
<workItem from="1498465879846" duration="18792000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="20718000" />
|
||||
<option name="totallyTimeSpent" value="21344000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="22" width="1440" height="833" extended-state="6" />
|
||||
@@ -1180,14 +1208,52 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="128" lean-forward="false" selection-start-line="28" selection-start-column="128" selection-end-line="28" selection-end-column="128" />
|
||||
<folding />
|
||||
<folding>
|
||||
<marker date="1498539948000" expanded="true" signature="3450:4239" ph="do ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="3598:4131" ph="<%...%>" />
|
||||
<marker date="1498539948000" expanded="true" signature="3714:4114" ph="if ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="4005:4027" ph="if ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="4395:6842" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4419:6833" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4454:4539" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4571:6821" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4609:5000" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4661:4756" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4678:4738" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4713:4734" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="4819:4984" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5059:5210" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5111:5193" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5243:6180" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5313:6164" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5334:5545" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5354:5523" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5566:6144" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="5583:5749" ph="<%...%>" />
|
||||
<marker date="1498539948000" expanded="true" signature="5817:6041" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6058:6123" ph="<%...%>" />
|
||||
<marker date="1498539948000" expanded="true" signature="6215:6807" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6284:6791" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6302:6491" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6509:6725" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6908:7237" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="6999:7127" ph="if ... end" />
|
||||
<marker date="1498539948000" expanded="true" signature="7253:8136" ph="..." />
|
||||
<marker date="1498539948000" expanded="true" signature="7283:7870" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7322:7434" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7471:7574" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7612:7723" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7761:7867" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="7905:8012" ph="{...}" />
|
||||
<marker date="1498539948000" expanded="true" signature="8047:8088" ph="{...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="550">
|
||||
<caret line="191" column="7" lean-forward="true" selection-start-line="191" selection-start-column="7" selection-end-line="191" selection-end-column="7" />
|
||||
<state relative-caret-position="249">
|
||||
<caret line="139" column="30" lean-forward="true" selection-start-line="139" selection-start-column="30" selection-end-line="139" selection-end-column="30" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
||||
@@ -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 bookings as bk on bk.booking_id = bo.booking_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")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -82,6 +82,15 @@ class Order < ApplicationRecord
|
||||
set_order_items
|
||||
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],
|
||||
item[:quantity],menu_item[:price], item[:options], set_order_items, self.id,
|
||||
self.employee_name)
|
||||
|
||||
@@ -37,8 +37,10 @@ class OrderQueueStation < ApplicationRecord
|
||||
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||
# else
|
||||
|
||||
if (order_item.price != 0)
|
||||
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||
oqs_order_items.push(order_item)
|
||||
end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,6 +7,9 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
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"
|
||||
|
||||
# check for item not to show
|
||||
if order_item[0].price != 0
|
||||
pdf = OrderItemPdf.new(order_item[0], print_status, options)
|
||||
pdf.render_file filename
|
||||
|
||||
@@ -20,6 +23,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Query for per order
|
||||
def print_order_summary(oqs, order_id, order_items, print_status)
|
||||
@@ -33,6 +37,9 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
||||
# For Item Options
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
|
||||
# check for item not to show
|
||||
if odi.price != 0 || odi.price != 10
|
||||
pdf = OrderItemPdf.new(odi, print_status, options)
|
||||
# pdf.render_file "tmp/order_item.pdf"
|
||||
pdf.render_file filename
|
||||
@@ -43,6 +50,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/order_summary_#{ order_id }" + ".pdf"
|
||||
@@ -69,8 +77,10 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
|
||||
# For Item Options
|
||||
options = odi.options == "[]"? "" : odi.options
|
||||
pdf = OrderItemPdf.new(odi, print_status, options)
|
||||
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
pdf = OrderItemPdf.new(odi, print_status, options)
|
||||
pdf.render_file filename
|
||||
|
||||
if oqs.print_copy
|
||||
@@ -83,6 +93,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
self.print(filename, oqs.printer_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/booking_summary_#{ booking_id }" + ".pdf"
|
||||
@@ -109,7 +120,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
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 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")
|
||||
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")
|
||||
@@ -118,7 +129,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
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 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")
|
||||
else
|
||||
# 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 dining_facilities AS df ON df.id = b.dining_facility_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
|
||||
|
||||
@@ -232,11 +232,19 @@ class SalePayment < ApplicationRecord
|
||||
self.sale.amount_changed = self.sale.amount_received.to_f - self.sale.grand_total.to_f
|
||||
all_received_amount = 0.0
|
||||
sObj = Sale.find(self.sale_id)
|
||||
is_credit = 0
|
||||
sObj.sale_payments.each do |spay|
|
||||
all_received_amount += spay.payment_amount.to_f
|
||||
if spay.payment_method == "creditnote"
|
||||
is_credit = 1
|
||||
end
|
||||
end
|
||||
if (self.sale.grand_total <= all_received_amount)
|
||||
if is_credit == 0
|
||||
self.sale.payment_status = "paid"
|
||||
else
|
||||
self.sale.payment_status = "outstanding"
|
||||
end
|
||||
self.sale.sale_status = "completed"
|
||||
self.sale.save!
|
||||
table_update_status(sObj)
|
||||
|
||||
@@ -86,12 +86,10 @@ class OrderSummaryPdf < Prawn::Document
|
||||
move_down 5
|
||||
|
||||
order_item.each do|odi|
|
||||
# check for item not to show
|
||||
if odi.price != 0
|
||||
y_position = cursor
|
||||
|
||||
# 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
|
||||
@@ -107,17 +105,19 @@ class OrderSummaryPdf < Prawn::Document
|
||||
|
||||
if options != ""
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
|
||||
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
|
||||
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
|
||||
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_height = 2500
|
||||
self.page_height = 7000
|
||||
self.margin = 5
|
||||
self.price_width = 40
|
||||
self.qty_width = 20
|
||||
@@ -119,6 +119,8 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down 5
|
||||
sub_total = 0.0
|
||||
sale_items.each do |item|
|
||||
# check for item not to show
|
||||
if item.price != 0
|
||||
sub_total += (item.qty*item.unit_price)
|
||||
qty = item.qty
|
||||
total_price = item.qty*item.unit_price
|
||||
@@ -136,6 +138,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
}
|
||||
move_down 1
|
||||
end
|
||||
end
|
||||
|
||||
stroke_horizontal_rule
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<div class="row">
|
||||
<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" %>
|
||||
<% elsif current_login_employee.role = "cashier" %>
|
||||
<%= link_to "Cashier Station", origami_path %>
|
||||
@@ -13,7 +13,23 @@
|
||||
<%= link_to "Cashier Station", oishi_path %>
|
||||
|
||||
<% 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>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<%
|
||||
@queue_completed_item.each do |qid|
|
||||
if qid.price != 0
|
||||
%>
|
||||
<div class="card queue_station">
|
||||
<div class="card-block">
|
||||
@@ -71,6 +72,7 @@
|
||||
</div>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,6 +88,7 @@
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<%
|
||||
@queue_items_details.each do |qid|
|
||||
if qid.price != 0
|
||||
if qid.station_name == qsi[:station_name]
|
||||
%>
|
||||
<div class="card queue_station">
|
||||
@@ -124,6 +127,7 @@
|
||||
<%
|
||||
end
|
||||
end
|
||||
end
|
||||
%>
|
||||
|
||||
<!--- end of Items-->
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
<tbody>
|
||||
<% sub_total = 0 %>
|
||||
<% @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 %> >
|
||||
<td style="width:60%; text-align:left">
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<%end %>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -166,7 +172,7 @@
|
||||
|
||||
<div class="col-md-3">
|
||||
<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="remove-item" class="btn btn-default fluid action-btn">Remove</button>
|
||||
</div>
|
||||
|
||||
@@ -250,8 +250,10 @@
|
||||
</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
|
||||
|
||||
@@ -213,18 +213,20 @@
|
||||
</table>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<%
|
||||
if @status == 'sale'
|
||||
if @status_sale == 'sale'
|
||||
unless @order_items.nil?
|
||||
%>
|
||||
Added New Order
|
||||
Pending New Order
|
||||
<table class="table table-striped">
|
||||
<%
|
||||
count = 0
|
||||
@order_items.each do |order_item |
|
||||
count += 1
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td><%= count %>
|
||||
<td class='item-name'><%= order_item.item_name %></td>
|
||||
<td class='item-attr'><%= order_item.qty %></td>
|
||||
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
||||
@@ -234,10 +236,28 @@
|
||||
end
|
||||
%>
|
||||
</table>
|
||||
<button class='btn btn-primary'> Add to existing invoice </button>
|
||||
<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
|
||||
%>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td>Receipt No - <%= sale.receipt_no %></td>
|
||||
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
%>
|
||||
|
||||
</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:"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:"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:"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}])
|
||||
@@ -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:"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:"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:"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:"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: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}])
|
||||
|
||||
@@ -48,7 +48,7 @@ menu_category1 = MenuCategory.create({menu: menu, code:"C001", name: "Soup Base"
|
||||
# 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"})
|
||||
# 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}])
|
||||
# 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 })
|
||||
@@ -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:"Full Potion",item_instance_code:"II1121", menu_item: menu_category1_menu_item105, price:2400.00, is_on_promotion:false}])
|
||||
# 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:"Full Potion",item_instance_code:"II1131", menu_item: menu_category1_menu_item105, price:2400.00, is_on_promotion:false}])
|
||||
# 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_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}])
|
||||
# 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_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}])
|
||||
# # 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_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}])
|
||||
# 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_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:"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:"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:"II1401", menu_item: menu_category1_menu_item134, price:3600.00, is_on_promotion:false}])
|
||||
# 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_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
|
||||
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}])
|
||||
|
||||
Reference in New Issue
Block a user