From 3f8a5f8ef2d99cfd088f84e19a2d57d55570fe44 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 11 Jul 2017 18:38:55 +0630 Subject: [PATCH] update discount --- app/controllers/origami/discounts_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb index 1d1d5f83..00a25021 100644 --- a/app/controllers/origami/discounts_controller.rb +++ b/app/controllers/origami/discounts_controller.rb @@ -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