shop code
This commit is contained in:
@@ -7,15 +7,15 @@ class Origami::PayparPaymentsController < BaseOrigamiController
|
||||
payment_method = "paypar"
|
||||
if(Sale.exists?(sale_id))
|
||||
saleObj = Sale.find(sale_id)
|
||||
shop_details = Shop.first
|
||||
|
||||
# shop_details = Shop.first
|
||||
|
||||
# rounding adjustment
|
||||
if shop_details.is_rounding_adj
|
||||
if @shop.is_rounding_adj
|
||||
new_total = Sale.get_rounding_adjustment(saleObj.grand_total)
|
||||
rounding_adj = new_total-saleObj.grand_total
|
||||
saleObj.update_attributes(grand_total: new_total,old_grand_total: saleObj.grand_total,rounding_adjustment:rounding_adj)
|
||||
saleObj.update_attributes(grand_total: new_total,old_grand_total: saleObj.grand_total,rounding_adjustment:rounding_adj)
|
||||
end
|
||||
|
||||
|
||||
sale_payment = SalePayment.new
|
||||
status,msg =sale_payment.process_payment(saleObj, current_user, redeem_amount,payment_method)
|
||||
if status == true
|
||||
@@ -28,5 +28,5 @@ class Origami::PayparPaymentsController < BaseOrigamiController
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user