Merge branch 'topup_payment' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-03-30 16:38:00 +06:30
17 changed files with 458 additions and 9 deletions

View File

@@ -229,6 +229,7 @@ class Origami::PaymentsController < BaseOrigamiController
@alipaycount = 0.0
@junctionpaycount = 0.0
@credit = 0.0
@paymalcount = 0.0
@sale_data = Sale.find_by_sale_id(sale_id)
@balance = 0
@accountable_type = ''
@@ -347,6 +348,8 @@ class Origami::PaymentsController < BaseOrigamiController
@junctionpaycount += spay.payment_amount
elsif spay.payment_method == "creditnote"
@credit += spay.payment_amount
elsif spay.payment_method == "paymal"
@paymalcount += spay.payment_amount
elsif spay.payment_method == "alipay"
@alipaycount += spay.payment_amount
end