Hello, when I go to Payment Request page to request a payment for an invoice, a default e-mail is placed in the corresponding e-mail body field. How can I change it?
Someone here in this forum told that the template can be changed in payment gateway, but it seems it is not there (I have no payment gateway). I searched in e-mail template list, but it is not there either.
Currently this appears:
Any help, please?
Regards
Jaime
Hello, thanks for replying, but, where to change the localized version of the message? If you see the screenshot, the message is in Spanish, however, that default message in PY file is in English.
<p>Dear {{ doc.contact_person }},</p>
{%- else %}<p>Hello,</p>{% endif %}
<p>{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype,
doc.name, doc.get_formatted("grand_total")) }}</p>
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
<p>{{ _("If you have any questions, please get back to us.") }}</p>
On the other hand, I have found this code in that file:
"message": gateway_account.get("message") or get_dummy_message(ref_doc)
That means I can configure the message somewhere. If it is not set, dummy message is placed.
So, where can I configure that message? By seeing the function gateway_account.get("message")
, the closest module I have found is “Payment gateway account”. Is that module where I can configure the message? I am not sure.
Thanks
Jaime
Yes, you can set the message for each payment gateway:
If nothing is available, the system will pick up the default message defined in the code in my first reply. Since your user or system language is set to Spanish, the system is translating it for you.
1 Like
Hello,
I loaded that page but I cannot create a Payment Gateway. When I go to payment gateway module, system does not allow me to create one.
How can I do it?
Regards
Jaime
Try a search like this:
frappe@ubuntu:~/frappe-bench$ find . -name ‘*.csv’ | xargs grep ‘Solicitando el pago’
./apps/erpnext/erpnext/translations/es.csv:apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py,Requesting payment against {0} {1} for amount {2},Solicitando el pago contra {0} {1} para la cantidad {2}
This sheds light where message translation occurs in the code:
The set of csv files are just a dictionary of key, value pairs by country en, es, fr, de, where the key is the English message phrase and the value is the translated version Spanish, French, German and so on.
Any way to show the date of the invoice in the payment request?
What variables are available to display in the email besides doc.amount, doc.name, doc.contact_person, doc.grand_total?
Try doc.posting_date
. The message is written in jinja and the variables are basically the docfields in the reference doctype.
If you’re using Sales Order as the reference doc, then add the fields name from the order. Likewise, if you’re using Sales Invoice, then add invoice field names.