After setting a proposal 'Signed (needs billing)', I generate a deposit invoice.
The Description used for the deposit invoice is in the language of the Dolibarr user, not in the language of the third-party.
When a deposit invoice is generated, the invoice line description is in the language of the Dolibarr user display, not in the language of the third-party.
I would expect that the invoice line description uses the translated string (bills.lang "Deposit") according to the language preference set for the third-party.
It is necessary to define the output language before adding the line to the deposit invoice and changing two occurrances of $langs to $outputlangs. I have made changes locally to compta/facture.php around line 1061, which fixes this issue for me – diff attached.
Dolibarr-4.0.4_facture.php_deposit-translate.diff.txt
I don't know if this is a robust solution, but it works for me.
This is still a problem in 6.0.2, but my local fix is broken.
compta/facture/card.php (lines 1131 & 1154) uses the display language for a Deposit Invoice line, instead of the Third-party output language.
Too old version, please upgrade and reopen if needed.
Now the deposit line contains "(DEPOSIT)" which should be correctly translated. Can you check ?
Please reopen this issue - it is still evident in v9.0.3 (and v10.x I think, but I cannot test).
htdocs/compta/facture/card.php, line 1322 still uses $langs->trans('Deposit'), which gives the Display language. It is necessary to define the output language according to the Third-party setting and then use $outputlangs->trans('Deposit').
You're right, I thought has been done but it's not.
The right way would be to store (DEPOSIT) in the databe and to translate it on the screen and in the PDF according to the language needed (user language on interface or selected PDF language during generation).
Thanks.
For the purposes of the deposit invoice document, if the deposit line is treated as a normal invoice line, where Label = (Deposit) and Description = (the other text – deposit amount or %, Proposal reference), it could be handled the same as any other invoice line and the existing translation mechanism would work. (Document generation only translates descriptions that have not been changed from the Product or Service card.)
Hi. I pushed a fix, waiting to be merged. Note that this fix will only apply for future deposits, past ones already in database won't be translatable
Most helpful comment
You're right, I thought has been done but it's not.
The right way would be to store (DEPOSIT) in the databe and to translate it on the screen and in the PDF according to the language needed (user language on interface or selected PDF language during generation).