shift
This commit is contained in:
@@ -19,4 +19,25 @@ class PaymentJournal < ApplicationRecord
|
||||
self.created_by = current_user
|
||||
self.save
|
||||
end
|
||||
|
||||
# def self.today_cash_in(current_user)
|
||||
# credit = 0.0
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
# pj_credit = PaymentJournal.where("TO_CHAR(created_at, 'YYYY-MM-DD')=? and created_by=?",today_date, current_user)
|
||||
# pj_credit.each do |obj|
|
||||
# credit += obj.credit_amount
|
||||
# end
|
||||
# return credit
|
||||
# end
|
||||
#
|
||||
# def self.today_cash_out(current_user)
|
||||
# debit = 0.0
|
||||
# today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
# pj_debit = PaymentJournal.where("TO_CHAR(created_at, 'YYYY-MM-DD')=? and created_by=?",today_date, current_user)
|
||||
# pj_debit.each do |obj|
|
||||
# debit += obj.debit_amount
|
||||
# end
|
||||
# return debit
|
||||
# end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user