Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -143,7 +143,7 @@ class Crm::CustomersController < BaseCrmController
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -269,7 +269,7 @@ end
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -328,7 +328,7 @@ end
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
|||||||
auth_token:auth_token}.to_json,
|
auth_token:auth_token}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue HTTParty::Error
|
rescue HTTParty::Error
|
||||||
response = {"status": false, "message": "Can't open membership server " }
|
response = {"status": false, "message": "Can't open membership server " }
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
# get member information
|
# get member information
|
||||||
rebate = MembershipSetting.find_by_rebate(1)
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
if customer.membership_id != nil && rebate
|
if customer.membership_id != nil && rebate
|
||||||
member_info = Customer.get_member_account(customer)
|
# member_info = Customer.get_member_account(customer)
|
||||||
current_balance = SaleAudit.paymal_search(sale_id)
|
# current_balance = SaleAudit.paymal_search(sale_id)
|
||||||
# current_balance = 0
|
current_balance = 0
|
||||||
end
|
end
|
||||||
# get printer info
|
# get printer info
|
||||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
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?
|
if customer.membership_id != nil && rebate && credit_data.nil?
|
||||||
member_info = Customer.get_member_account(customer)
|
member_info = Customer.get_member_account(customer)
|
||||||
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
|
if member_info["status"] == true
|
||||||
current_balance = SaleAudit.paymal_search(sale_id)
|
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
|
||||||
|
current_balance = SaleAudit.paymal_search(sale_id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#for card sale data
|
#for card sale data
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ class Origami::RequestBillsController < ApplicationController
|
|||||||
if !ShiftSale.current_shift.nil?
|
if !ShiftSale.current_shift.nil?
|
||||||
order_id = params[:id] # order_id
|
order_id = params[:id] # order_id
|
||||||
bk_order = BookingOrder.find_by_order_id(order_id)
|
bk_order = BookingOrder.find_by_order_id(order_id)
|
||||||
puts params[:id]
|
order = Order.find(order_id)
|
||||||
puts bk_order
|
|
||||||
puts bk_order.booking_id
|
|
||||||
check_booking = Booking.find_by_booking_id(bk_order.booking_id)
|
check_booking = Booking.find_by_booking_id(bk_order.booking_id)
|
||||||
|
|
||||||
if check_booking.sale_id.nil?
|
if check_booking.sale_id.nil?
|
||||||
@@ -29,6 +27,10 @@ class Origami::RequestBillsController < ApplicationController
|
|||||||
|
|
||||||
# Promotion Activation
|
# Promotion Activation
|
||||||
Promotion.promo_activate(@sale)
|
Promotion.promo_activate(@sale)
|
||||||
|
if order.source == "quick_service"
|
||||||
|
result = {:status=> @status, :data => @sale.sale_id }
|
||||||
|
render :json => result.to_json
|
||||||
|
end
|
||||||
else
|
else
|
||||||
@status = false
|
@status = false
|
||||||
@error_message = "No Current Open Shift for This Employee"
|
@error_message = "No Current Open Shift for This Employee"
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class Origami::VoucherController < BaseOrigamiController
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10
|
}, :timeout => 10
|
||||||
)
|
)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10)
|
:timeout => 10)
|
||||||
rescue HTTParty::Error
|
rescue HTTParty::Error
|
||||||
@@ -68,7 +68,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -121,7 +121,7 @@ class Customer < ApplicationRecord
|
|||||||
:body => member_params,
|
:body => member_params,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
})
|
})
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { status: false, message: "Server Time out" }
|
response = { status: false, message: "Server Time out" }
|
||||||
@@ -198,7 +198,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": "Connect To" }
|
response = { "status": false , "message": "Connect To" }
|
||||||
@@ -274,7 +274,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": "Connect To" }
|
response = { "status": false , "message": "Connect To" }
|
||||||
@@ -309,7 +309,7 @@ class Customer < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class SalePayment < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10
|
}, :timeout => 10
|
||||||
)
|
)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
@@ -133,7 +133,7 @@ class SalePayment < ApplicationRecord
|
|||||||
auth_token:auth_token}.to_json,
|
auth_token:auth_token}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
},
|
},
|
||||||
:timeout => 10
|
:timeout => 10
|
||||||
)
|
)
|
||||||
@@ -455,7 +455,7 @@ class SalePayment < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": " Connection timeout" }
|
response = { "status": false , "message": " Connection timeout" }
|
||||||
@@ -500,7 +500,8 @@ class SalePayment < ApplicationRecord
|
|||||||
end
|
end
|
||||||
rebate_arr.push(data)
|
rebate_arr.push(data)
|
||||||
end
|
end
|
||||||
|
Rails.logger.debug "Rebage Response"
|
||||||
|
Rails.logger.debug rebate_arr.to_json
|
||||||
total_amount = rebate_prices - payparcost - overall_dis
|
total_amount = rebate_prices - payparcost - overall_dis
|
||||||
|
|
||||||
if credit == 1
|
if credit == 1
|
||||||
@@ -531,7 +532,7 @@ class SalePayment < ApplicationRecord
|
|||||||
}.to_json,
|
}.to_json,
|
||||||
:headers => {
|
:headers => {
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Accept' => 'application/json; version=2'
|
'Accept' => 'application/json; version=3'
|
||||||
}, :timeout => 10)
|
}, :timeout => 10)
|
||||||
rescue Net::OpenTimeout
|
rescue Net::OpenTimeout
|
||||||
response = { "status": false , "message": "Connect To" }
|
response = { "status": false , "message": "Connect To" }
|
||||||
|
|||||||
@@ -203,11 +203,12 @@ $(document).ready(function(){
|
|||||||
url: ajax_url,
|
url: ajax_url,
|
||||||
// data: 'order_id='+ order_id,
|
// data: 'order_id='+ order_id,
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
|
console.log(result)
|
||||||
if (!result.status) {
|
if (!result.status) {
|
||||||
swal("Information!", result.error_message);
|
swal("Information!", result.error_message);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
location.reload();
|
window.location.href = '../pending_order/'+ result.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user