fix bugs and improvement

This commit is contained in:
Thein Lin Kyaw
2020-06-16 12:26:25 +06:30
parent 160c43699e
commit e697108a6e
8 changed files with 18 additions and 26 deletions

View File

@@ -40,7 +40,7 @@ class Transactions::ShiftSalesController < ApplicationController
@sale_taxes = Sale.get_separate_tax(shift_obj,from=nil,to=nil,type='')
#other payment details for mpu or visa like card
@other_payment = ShiftSale.get_by_shift_other_payment(@shift)
@payment_methods = SalePayment.where.not(payment_method: ['cash', 'creditnote', 'foc']).distinct.pluck(:payment_method)
@payment_methods = PaymentMethodSetting.where(is_active: true).pluck(:payment_method)
# Calculate price_by_accounts
@total_amount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'amount')
@total_discount_by_account = ShiftSale.calculate_total_price_by_accounts(@shift,'discount')