check tax error, filter for credit payment report and add query for sale payment in receipt no detail

This commit is contained in:
phyusin
2018-07-20 13:43:29 +06:30
parent 91fc8696af
commit 5c75a99e41
6 changed files with 14 additions and 13 deletions

View File

@@ -60,7 +60,7 @@ class Origami::HomeController < BaseOrigamiController
accounts = @customer.tax_profiles
@account_arr =[]
accounts.each do |acc|
account = TaxProfile.find(acc)
account = TaxProfile.find_by_id(acc)
if !account.nil?
@account_arr.push(account)
end
@@ -85,7 +85,7 @@ class Origami::HomeController < BaseOrigamiController
accounts = @customer.tax_profiles
@account_arr =[]
accounts.each do |acc|
account = TaxProfile.find(acc)
account = TaxProfile.find_by_id(acc)
if !account.nil?
@account_arr.push(account)
end

View File

@@ -60,7 +60,7 @@ class Origami::RoomsController < BaseOrigamiController
accounts = @customer.tax_profiles
@account_arr =[]
accounts.each do |acc|
account = TaxProfile.find(acc)
account = TaxProfile.find_by_id(acc)
if !account.nil?
@account_arr.push(account)
end
@@ -85,7 +85,7 @@ class Origami::RoomsController < BaseOrigamiController
accounts = @customer.tax_profiles
@account_arr =[]
accounts.each do |acc|
account = TaxProfile.find(acc)
account = TaxProfile.find_by_id(acc)
if !account.nil?
@account_arr.push(account)
end

View File

@@ -4,7 +4,7 @@ authorize_resource :class => false
@filter_for_credit = [['All',''],['Paid','paid'],['Unpaid','unpaid']]
from, to = get_date_range_from_params
@shift_sale_range = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
@shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
@shift = ''
if params[:shift_name].to_i != 0
@@ -42,7 +42,7 @@ authorize_resource :class => false
def show
from, to = get_date_range_from_params
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
date_arr = Array.new
@sale_data.each do |sale|