Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -273,7 +273,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
auth_token:auth_token}.to_json,
|
||||
:headers => {
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json; version=2'
|
||||
'Accept' => 'application/json; version=3'
|
||||
}, :timeout => 10)
|
||||
rescue HTTParty::Error
|
||||
response = {"status": false, "message": "Can't open membership server " }
|
||||
|
||||
@@ -63,9 +63,9 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
# get member information
|
||||
rebate = MembershipSetting.find_by_rebate(1)
|
||||
if customer.membership_id != nil && rebate
|
||||
member_info = Customer.get_member_account(customer)
|
||||
current_balance = SaleAudit.paymal_search(sale_id)
|
||||
# current_balance = 0
|
||||
# member_info = Customer.get_member_account(customer)
|
||||
# current_balance = SaleAudit.paymal_search(sale_id)
|
||||
current_balance = 0
|
||||
end
|
||||
# get printer info
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
@@ -152,8 +152,10 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
if customer.membership_id != nil && rebate && credit_data.nil?
|
||||
member_info = Customer.get_member_account(customer)
|
||||
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
|
||||
current_balance = SaleAudit.paymal_search(sale_id)
|
||||
if member_info["status"] == true
|
||||
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
|
||||
current_balance = SaleAudit.paymal_search(sale_id)
|
||||
end
|
||||
end
|
||||
|
||||
#for card sale data
|
||||
|
||||
@@ -8,9 +8,7 @@ class Origami::RequestBillsController < ApplicationController
|
||||
if !ShiftSale.current_shift.nil?
|
||||
order_id = params[:id] # order_id
|
||||
bk_order = BookingOrder.find_by_order_id(order_id)
|
||||
puts params[:id]
|
||||
puts bk_order
|
||||
puts bk_order.booking_id
|
||||
order = Order.find(order_id)
|
||||
check_booking = Booking.find_by_booking_id(bk_order.booking_id)
|
||||
|
||||
if check_booking.sale_id.nil?
|
||||
@@ -29,6 +27,10 @@ class Origami::RequestBillsController < ApplicationController
|
||||
|
||||
# Promotion Activation
|
||||
Promotion.promo_activate(@sale)
|
||||
if order.source == "quick_service"
|
||||
result = {:status=> @status, :data => @sale.sale_id }
|
||||
render :json => result.to_json
|
||||
end
|
||||
else
|
||||
@status = false
|
||||
@error_message = "No Current Open Shift for This Employee"
|
||||
|
||||
@@ -54,7 +54,7 @@ class Origami::VoucherController < BaseOrigamiController
|
||||
}.to_json,
|
||||
:headers => {
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json; version=2'
|
||||
'Accept' => 'application/json; version=3'
|
||||
}, :timeout => 10
|
||||
)
|
||||
rescue Net::OpenTimeout
|
||||
|
||||
Reference in New Issue
Block a user