update rebate and update api

This commit is contained in:
Aung Myo
2017-11-14 18:30:57 +06:30
parent f927d99807
commit 28dbb75774
8 changed files with 39 additions and 32 deletions

View File

@@ -199,7 +199,7 @@ class Origami::DiscountsController < BaseOrigamiController
auth_token:auth_token}.to_json,
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
'Accept' => 'application/json; version=2'
}, :timeout => 10)
rescue HTTParty::Error
response = {"status": false, "message": "Can't open membership server " }
@@ -215,7 +215,8 @@ class Origami::DiscountsController < BaseOrigamiController
else
response = {"status": false, "message": "You have no selected discount item" }
end
puts "discount"
puts response.to_json
# Re-calc All Amount in Sale
if response["status"] == true
discount_amount = response["discount_earned"]
@@ -229,7 +230,7 @@ class Origami::DiscountsController < BaseOrigamiController
else
result = {:status=> response["message"],:title=>"Alert", :table_id => table_id,:table_type => table_type }
end
render :json => result.to_json
end #end Is Card Payment