mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for attached PDF being in the wrong language
This commit is contained in:
parent
371f224c24
commit
3b0feef87f
@ -1185,10 +1185,17 @@
|
|||||||
if (!isEmailValid()) {
|
if (!isEmailValid()) {
|
||||||
alert("{!! trans('texts.provide_email') !!}");
|
alert("{!! trans('texts.provide_email') !!}");
|
||||||
return;
|
return;
|
||||||
}
|
8 }
|
||||||
|
|
||||||
if (confirm('{!! trans("texts.confirm_email_$entityType") !!}' + '\n\n' + getSendToEmails())) {
|
if (confirm('{!! trans("texts.confirm_email_$entityType") !!}' + '\n\n' + getSendToEmails())) {
|
||||||
preparePdfData('email');
|
var accountLanguageId = parseInt({{ $account->language_id ?: '0' }});
|
||||||
|
var clientLanguageId = parseInt(model.invoice().client().language_id()) || 0;
|
||||||
|
// if the client's language is different then we can't use the browser version of the PDF
|
||||||
|
if (clientLanguageId && clientLanguageId != accountLanguageId) {
|
||||||
|
submitAction('email');
|
||||||
|
} else {
|
||||||
|
preparePdfData('email');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user