fixed payment methods & license
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
class SalePayment < ApplicationRecord
|
||||
|
||||
CARD = ['mpu', 'visa', 'master', 'jcb', 'unionpay']
|
||||
|
||||
self.primary_key = "sale_payment_id"
|
||||
|
||||
#primary key - need to be unique generated for multiple shops
|
||||
@@ -11,7 +14,7 @@ class SalePayment < ApplicationRecord
|
||||
attr_accessor :received_amount, :card_payment_reference, :voucher_no, :giftcard_no, :customer_id, :external_payment_status,:action_by
|
||||
|
||||
scope :credits, -> { where(payment_method: 'creditnote') }
|
||||
scope :cards, -> { where(payment_method: PaymentMethodSetting.where("is_active='1'").pluck("payment_method")) }
|
||||
scope :cards, -> { where(payment_method: ['mpu', 'visa', 'master', 'jcb', 'unionpay']) }
|
||||
|
||||
def self.sync_sale_payment_records(sale_payments)
|
||||
if !sale_payments.nil?
|
||||
|
||||
Reference in New Issue
Block a user