webERP Forum
Last address field could be country... - Printable Version

+- webERP Forum (
+-- Forum: webERP Discussion (
+--- Forum: Development Discussion & Specification (
+--- Thread: Last address field could be country... (/showthread.php?tid=350)

Pages: 1 2

RE: Last address field could be country... - phil - 09-18-2012

Hi Ricard,
I am away from home at the mo and limited internet connection (in Maccers Blenheim!!) so I've not been able to check the code, but know the ropes so I am confident you are on to it... I see you decided to store the country as a two character abbreviation that turns into a country name when gettexted. I guess that's ok.

I see your point about the labels on customer/supplier address fields and not a bad solution. We need to be careful about the languages again as storage in config table of the street may not translate so well - we may need to go with your idea of a mapping again.

I guess you are working on the customer side too?

RE: Last address field could be country... - PakRicard - 09-18-2012

Hi Phil:

Not sure about the 2 char abbreviation. it's the international one, but it will force us to re-write all scripts and PDF containing supplier data. Maybe wiser to use just the name? (I'm open to change it, depending of majority of developers vote ;-)

Regarding labeling of address fields, if tehy are in SystemParameters would be no different tahn ROALPA clause, name of tax authority, etc, so I guess will be no problem for translation.

Once I get the supplier part working OK, I'll do the customer side.

Thanks for your POV.

RE: Last address field could be country... - phil - 09-19-2012

You are right ... the 2 char abbreviation is really not necessary it should be removed from the array (just use the ordinal index)

$CountriesArray[] = _('Andorra');
$CountriesArray[] = _('United Arab Emirates');
$CountriesArray[] = _('Afghanistan');
$CountriesArray[] = _('Antigua & Barbuda');

and store the text of the country as we always have - the language should be the language of the business as it is stored in the db.

Well I think the labeling of the address fields are slightly different as they are part of the user interface - if they are stored in the db then they will not change when the user changes their language.... this is not ideal IMEO :-)

Maybe just hard code 'em in the way that suits the do'er of the do'ocracy - a business that wishes to work another way can modify them very easily as the code is so easy to read :-)

RE: Last address field could be country... - PakRicard - 09-21-2012

Hi all:

Already uploaded to SVN (and changed field size to 40).

Please check!

RE: Last address field could be country... - PakRicard - 09-21-2012

Thanks Tim! Already changed in CountriesArray.php.

RE: Last address field could be country... - icedlava - 09-28-2012

I know I've come into this a bit late, but I thought I'd post the link to ISO 3166 Country Codes which I have used previously in a country drop down implementation, in case it's of any future use.

This ISO Standard seems to be accepted generally. It also did assist me in overcoming some disputes which arose at the time over official country names, and their correct presentation/spelling, which as Tim pointed out could arise. As it is updated regularly it's also a good reference for use in maintaining the country list.