[ 
https://issues.apache.org/jira/browse/OFBIZ-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214541#comment-13214541
 ] 

Jacopo Cappellato commented on OFBIZ-4715:
------------------------------------------

Maybe a better way is to create a simple dynamic mechanism to lookup, based on 
the postalAddress.countryGeoId, if there is a country specific ftl; if not use 
the default one.
Steps to implement this feature could be:

* extract from Contact.ftl the existing code that formats the postal address 
into a separate PostalAddress.ftl (or similar) template;
* in Contact.ftl, where the postal address needs to be rendered, get the 
postalAddress.countryGeoId and try to locate a template with file name: 
PostalAddress_${postalAddress.countryGeoId}.ftl (e.g. PostalAddress_USA.ftl or 
PostalAddress_FRA.ftl); if not found then default to PostalAddress.ftl
* the same mechanism could be reused for invoices etc...
* it would be nice (but maybe not too easy) to try to implement all the 
PostalAddress_*.ftl templates in a way that will let them to be reused in 
various screens, possibly using the <@htmlTemplate/> tags, with minimal to no 
formatting/styling; but it would be also nice to be able to reuse them for PDF 
rendering (form widgets?)

Just my 2 cents
                
> Invoice PDF and Contact Information show Region Code instead of Country Code 
> before the Zip Code
> ------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4715
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4715
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party, specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>            Reporter: Markus M. May
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: 
> OFBIZ-4715-add-locale-for-country-and-remove-countryGeo-if-not-us.patch
>
>
> The Invoice PDF and the Contact Information in the Party application show the 
> Region Code instead of the Country Code before the Zip Code. This will be 
> fine for the US, here in Germany it is rather unusual. 
> I propose to avoid this by removing the Region Code if the country is 
> different then US.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to