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,12 +1185,19 @@
|
||||
if (!isEmailValid()) {
|
||||
alert("{!! trans('texts.provide_email') !!}");
|
||||
return;
|
||||
}
|
||||
8 }
|
||||
|
||||
if (confirm('{!! trans("texts.confirm_email_$entityType") !!}' + '\n\n' + getSendToEmails())) {
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onSaveClick() {
|
||||
if (model.invoice().is_recurring()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user