-
Notifications
You must be signed in to change notification settings - Fork 3
feat:Implement PDC Maturity email notification #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.json
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.py
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.py
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.py
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.py
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.py
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_management_settings/pdc_management_settings.py
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/pdc_payment_reference/pdc_payment_reference.json
Outdated
Show resolved
Hide resolved
pdc_management/pdc_management/doctype/post_dated_cheque/post_dated_cheque.json
Show resolved
Hide resolved
for user in internal_users | ||
if frappe.db.get_value("User", user, "enabled") and frappe.db.get_value("User", user, "email") | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please recheck this
for email in recipients: | ||
frappe.sendmail( | ||
recipients=[email], | ||
subject=subject, | ||
message=message, | ||
reference_doctype="Post Dated Cheque", | ||
reference_name=pdc["name"] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why like this?
SELECT ce.email_id | ||
FROM `tabDynamic Link` dl | ||
JOIN `tabContact Email` ce ON ce.parent = dl.parent | ||
WHERE dl.link_doctype = %s AND dl.link_name = %s | ||
ORDER BY ce.is_primary DESC | ||
LIMIT 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format this
##Feature Description
This PR introduces a scheduled notification system that alerts internal users and external parties when a Post Dated Cheque (PDC) is nearing its maturity date.
##Solution Description
1.Created doctype PDC Management Settings with fields
Maturity Notification Before
Maturity Notification Template
Notification Role
2.Created PDC Payment reference - child table
Type
Name
Amount
Outstanding amount
Allocated amount
Pdc clearance date
3.Scheduled email notification if the maturity date is approaching.
Sends email to:
All internal users with the specified role (if configured).
The primary email of the linked Supplier/Customer contact (if available).
##Output Screenshots



##Areas Affected and Ensured
PDC doctype.
##Tested On
Google Chrome