mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: show correct PR amount in email template (#51033)
* fix: show correct PR amount in email template * fix: add translation string
This commit is contained in:
@@ -427,6 +427,7 @@ class PaymentRequest(Document):
|
|||||||
context = {
|
context = {
|
||||||
"doc": frappe.get_doc(self.reference_doctype, self.reference_name),
|
"doc": frappe.get_doc(self.reference_doctype, self.reference_name),
|
||||||
"payment_url": self.payment_url,
|
"payment_url": self.payment_url,
|
||||||
|
"payment_request": self,
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.message:
|
if self.message:
|
||||||
@@ -892,22 +893,25 @@ def update_payment_requests_as_per_pe_references(references=None, cancel=False):
|
|||||||
|
|
||||||
|
|
||||||
def get_dummy_message(doc):
|
def get_dummy_message(doc):
|
||||||
return frappe.render_template(
|
return """
|
||||||
"""{% if doc.contact_person -%}
|
{% if doc.contact_person -%}
|
||||||
<p>Dear {{ doc.contact_person }},</p>
|
<p>Dear {{ doc.contact_person }},</p>
|
||||||
{%- else %}<p>Hello,</p>{% endif %}
|
{%- else %}<p>Hello,</p>{% endif %}
|
||||||
|
|
||||||
<p>{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype,
|
<p>
|
||||||
doc.name, doc.get_formatted("grand_total")) }}</p>
|
{{ _("Requesting payment against {0} {1} for amount {2}").format(
|
||||||
|
doc.doctype,
|
||||||
|
doc.name,
|
||||||
|
payment_request.get_formatted("grand_total")
|
||||||
|
) }}
|
||||||
|
</p>
|
||||||
|
|
||||||
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
|
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
|
||||||
|
|
||||||
<p>{{ _("If you have any questions, please get back to us.") }}</p>
|
<p>{{ _("If you have any questions, please get back to us.") }}</p>
|
||||||
|
|
||||||
<p>{{ _("Thank you for your business!") }}</p>
|
<p>{{ _("Thank you for your business!") }}</p>
|
||||||
""",
|
"""
|
||||||
dict(doc=doc, payment_url="{{ payment_url }}"),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
|||||||
Reference in New Issue
Block a user