mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
fix: add filter to query to avoid send reminder for zero years (#28092)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
@@ -156,6 +156,8 @@ def get_employees_having_an_event_today(event_type):
|
|||||||
DAY({condition_column}) = DAY(%(today)s)
|
DAY({condition_column}) = DAY(%(today)s)
|
||||||
AND
|
AND
|
||||||
MONTH({condition_column}) = MONTH(%(today)s)
|
MONTH({condition_column}) = MONTH(%(today)s)
|
||||||
|
AND
|
||||||
|
YEAR({condition_column}) < YEAR(%(today)s)
|
||||||
AND
|
AND
|
||||||
`status` = 'Active'
|
`status` = 'Active'
|
||||||
""",
|
""",
|
||||||
@@ -166,6 +168,8 @@ def get_employees_having_an_event_today(event_type):
|
|||||||
DATE_PART('day', {condition_column}) = date_part('day', %(today)s)
|
DATE_PART('day', {condition_column}) = date_part('day', %(today)s)
|
||||||
AND
|
AND
|
||||||
DATE_PART('month', {condition_column}) = date_part('month', %(today)s)
|
DATE_PART('month', {condition_column}) = date_part('month', %(today)s)
|
||||||
|
AND
|
||||||
|
DATE_PART('year', {condition_column}) < date_part('year', %(today)s)
|
||||||
AND
|
AND
|
||||||
"status" = 'Active'
|
"status" = 'Active'
|
||||||
""",
|
""",
|
||||||
|
|||||||
Reference in New Issue
Block a user