update discount
This commit is contained in:
@@ -159,7 +159,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
campaign_type_id: campaign_type_id,
|
||||
receipt_no: receipt_no,
|
||||
merchant_uid:merchant_uid,
|
||||
discount_method:arr,
|
||||
discount_method:arr.to_json,
|
||||
total_sale_transaction_amount: sale.grand_total,
|
||||
auth_token:auth_token}.to_json,
|
||||
:headers => {
|
||||
@@ -179,6 +179,8 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
rescue SocketError
|
||||
response = { status: false, message: "Can't open membership server "}
|
||||
end
|
||||
puts "sssssssss"
|
||||
puts response.to_json
|
||||
|
||||
table_id = sale.bookings[0].dining_facility_id
|
||||
table_type = DiningFacility.find(table_id).type
|
||||
@@ -186,7 +188,6 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
# Re-calc All Amount in Sale
|
||||
if response["status"] == true
|
||||
sale.compute_by_sale_items(sale_id, sale.sale_items, response["discount_earned"])
|
||||
|
||||
end
|
||||
result = {:status=> "Success", :table_id => table_id,:table_type => table_type }
|
||||
# if response["status"] == false
|
||||
|
||||
Reference in New Issue
Block a user