void
This commit is contained in:
@@ -33,15 +33,6 @@ class Foodcourt::VoidController < BaseFoodcourtController
|
||||
sale.sale_status = 'void'
|
||||
sale.save
|
||||
|
||||
# No Need
|
||||
# bookings = sale.bookings
|
||||
# bookings.each do |booking|
|
||||
# orders = booking.orders
|
||||
# orders.each do |order|
|
||||
# # order.status = 'void'
|
||||
# end
|
||||
# end
|
||||
|
||||
if sale.bookings[0].dining_facility_id.to_i > 0
|
||||
table_avaliable = true
|
||||
table_count = 0
|
||||
@@ -79,8 +70,14 @@ class Foodcourt::VoidController < BaseFoodcourtController
|
||||
# remark = "Void Sale ID #{sale_id} | Receipt No #{sale.receipt_no} | Receipt No #{sale.receipt_no} | Table ->#{table.name}"
|
||||
sale_audit = SaleAudit.record_audit_for_edit(sale_id,current_user.name, action_by,remark,"SALEVOID" )
|
||||
|
||||
# For Print
|
||||
#call paymal to void
|
||||
if sale.sale_payments
|
||||
membership_response =sale.paymal_payment_void
|
||||
end
|
||||
Rails.logger.debug "---------Paymal Payment Void response in VoidController"
|
||||
Rails.logger.debug membership_response.to_json
|
||||
|
||||
# For Print
|
||||
member_info = nil
|
||||
rebate_amount = nil
|
||||
current_balance = nil
|
||||
@@ -102,17 +99,6 @@ class Foodcourt::VoidController < BaseFoodcourtController
|
||||
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
||||
end
|
||||
|
||||
|
||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
# get printer info
|
||||
# print_settings = PrintSetting.find_by_unique_code('ReceiptBillPdf') # SaleItemsPdf
|
||||
#
|
||||
# if !print_settings.nil?
|
||||
# unique_code = 'ReceiptBillPdf'
|
||||
# elsif
|
||||
# unique_code = 'ReceiptBillStarPdf'
|
||||
# end
|
||||
|
||||
customer= Customer.find(sale.customer_id)
|
||||
|
||||
# get member information
|
||||
|
||||
Reference in New Issue
Block a user