Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-11-28 19:12:02 +06:30
7 changed files with 25 additions and 23 deletions

View File

@@ -184,12 +184,17 @@ class Customer < ApplicationRecord
# Control for Paypar Cloud
begin
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,total_sale_transaction_amount: sObj.grand_total,merchant_uid:merchant_uid,total_amount: total_amount,campaign_type_id: campaign_type_id,
receipt_no: receipt_no,auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json; version=2'
}, :timeout => 10)
response = HTTParty.post(url, :body => { generic_customer_id:generic_customer_id ,
total_sale_transaction_amount: sObj.grand_total,
merchant_uid:merchant_uid,
total_amount: total_amount,
campaign_type_id: campaign_type_id,
receipt_no: receipt_no,
auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json; version=2'
}, :timeout => 10)
rescue Net::OpenTimeout
response = { "status": false , "message": "Connect To" }
@@ -201,7 +206,9 @@ class Customer < ApplicationRecord
response = { "status": false, "message": "Can't connect server"}
end
return response
return response
puts response.to_json
puts "ttttttttttttttttttttttt"
end
end
end

View File

@@ -875,7 +875,7 @@ end
# end
def grand_total_after_rounding
return self.old_grand_total.to_f + self.rounding_adjustment.to_f
return self.grand_total.to_f + self.rounding_adjustment.to_f
end
def get_cash_amount