feat: addresses print in the document's language
Address lines, city, county and state are translatable (Property Setters), so the Address form offers a translate button that stores the other language as a Translation record. The Thailand Address Template renders those fields through _(), and the print formats re-render party addresses from the linked Address with get_print_address instead of printing the stored address_display, which is frozen in the language of whoever saved the document. The letter head already rendered the company address at print time. The withholding tax certificate takes the Thai translation whatever the print language, like its tax in words.
This commit is contained in:
1 parent
b6492f75e1
commit
5c15b6637b
7 files changed
+171
-18
No files matched your search
@@ -20,6 +20,17 @@ file overrides the upstream Thai for the standard labels the print formats show.
|
||||
print formats embed Sarabun (`public/fonts`, OFL) so PDFs render Thai on servers
|
||||
without a Thai system font. Switch a user or the print language to `th` to use it.
|
||||
|
||||
### Addresses in more than one language
|
||||
|
||||
Address lines, city, county and state are *translatable*: the Address form shows a translate
|
||||
button next to each, which stores the other language in a Translation record. The Thailand
|
||||
Address Template renders those fields through `_()`, so the print formats and letter head
|
||||
show the company's and the party's address in the document's print language (the company
|
||||
address is re-rendered at print time; party addresses are re-rendered from the linked
|
||||
Address instead of printing the stored `address_display`). The withholding tax certificate
|
||||
always takes the Thai translation. Translations are keyed on the exact text, so one
|
||||
translation of a city or province serves every address that uses it.
|
||||
|
||||
### Withholding tax certificate
|
||||
|
||||
A paid Purchase Invoice with *Apply Tax Withholding Amount* gets a **Withholding Tax Certificate**
|
||||
|
||||
Reference in new issue
Block a user