mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
[hr] allowed rename in earning and deduction type
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from webnotes.utils import getdate, nowdate, flt, cstr
|
||||
from accounts.report.accounts_receivable.accounts_receivable import get_ageing_data
|
||||
|
||||
def execute(filters=None):
|
||||
if not filters: filters = {}
|
||||
@@ -124,20 +125,4 @@ def get_paid_amount(gle, report_date, entries_after_report_date):
|
||||
and against_voucher = %s and name != %s and ifnull(is_cancelled, 'No') = 'No'""",
|
||||
(gle.account, report_date, gle.voucher_type, gle.voucher_no, gle.name))[0][0]
|
||||
|
||||
return flt(paid_amount)
|
||||
|
||||
def get_ageing_data(ageing_based_on_date, age_on, outstanding_amount):
|
||||
val1 = val2 = val3 = val4 = diff = 0
|
||||
diff = age_on and ageing_based_on_date \
|
||||
and (getdate(age_on) - getdate(ageing_based_on_date)).days or 0
|
||||
|
||||
if diff <= 30:
|
||||
val1 = outstanding_amount
|
||||
elif 30 < diff <= 60:
|
||||
val2 = outstanding_amount
|
||||
elif 60 < diff <= 90:
|
||||
val3 = outstanding_amount
|
||||
elif diff > 90:
|
||||
val4 = outstanding_amount
|
||||
|
||||
return [diff, val1, val2, val3, val4]
|
||||
return flt(paid_amount)
|
||||
@@ -1,7 +1,7 @@
|
||||
wn.query_reports["Collection Report"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"fieldname": "from_date",
|
||||
"label": "From Date",
|
||||
"fieldtype": "Date",
|
||||
"default": wn.defaults.get_user_default("year_start_date"),
|
||||
|
||||
Reference in New Issue
Block a user