change credit payment query

This commit is contained in:
phyusin
2018-07-13 14:44:29 +06:30
parent dd4db6d2e7
commit 533a3999fb
5 changed files with 99 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
class Reports::CreditPaymentController < BaseReportController
authorize_resource :class => false
def index
@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)
@@ -17,10 +17,12 @@ authorize_resource :class => false
end
end
@sale_data = Sale.get_by_shift_sale_credit_payment(@shift_sale_range,@shift,from,to)
@filter = params[:filter_check]
@sale_data = Sale.get_by_shift_sale_credit_payment(@shift_sale_range,@shift,from,to,@filter)
@from = from
@to = to
# get printer info
@print_settings = PrintSetting.get_precision_delimiter()
if @shift.present?