Jump to content

Invoice Attached To Email


a.daniello

Recommended Posts

Can you clarify whether you encounter this issue if you login as the client (NOT when an admin) and attempt to view an invoice? Do you only encounter this issue with invoices sent in emails? Which email template did you experience this with?

 

Even though you have the client set to use a separate language by default, did you define language for the invoice type you're viewing (/components/invoice_templates/default_invoice/language/ab_cd/default_invoice.php)?

Link to comment
Share on other sites

Tyson, i try to explain better:

 

- the issue is only with invoices sent in emails (other case works fine, eg send an invoice copy from dashboard, as staff or as customer)

 

- the issue is not related to an email template

 

- if system send an email with invoice (or proforma, is the same) attached (for example, when client buy or renew a service), i expect (also client expect ;)) that the invoice is in client's language, but the invoice is sent in default language system.

 

Hope that this can clarify the problem.

 

Thanks

Link to comment
Share on other sites

Found problem: in constructor of /components/invoice_templates/[template_name]/[template_name].php, Blesta loads language for this template with second parameter null
 

Language::loadLang("komunica_invoice", null, dirname(__FILE__) . DS . "language" . DS);

 
But so Blesta load "self::$current_language" (default Blesta language or user's language in current session) and not the client's language.
 
Solution is simply replace "null" with the ISO 639-1/2 code of the client's language, but... we don't know how!!  :D

 

Waiting for Blesta team, we're investigating on how to get this value.

Link to comment
Share on other sites

Found problem: in constructor of /components/invoice_templates/[template_name]/[template_name].php, Blesta loads language for this template with second parameter null

 

Language::loadLang("komunica_invoice", null, dirname(__FILE__) . DS . "language" . DS);

 

But so Blesta load "self::$current_language" (default Blesta language or user's language in current session) and not the client's language.

 

Solution is simply replace "null" with the ISO 639-1/2 code of the client's language, but... we don't know how!!  :D

 

Waiting for Blesta team, we're investigating on how to get this value.

 

The problem is more complex than updating that null value, which, by default, uses the language the system is currently using. If you only updated that value, it would be possible for clients to receive their invoice PDF in another client's default language.

 

I've resolved this issue for v3.4.1 in CORE-1559. It will probably be available next week.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...