[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Address formatting functionality
- Subject: Address formatting functionality
- From: Erik Huelsmann <..hidden..>
- Date: Sun, 6 May 2012 21:20:31 +0200
Hi,
Currently, LSMB wants addresses to be entered in parts: Company name, address lines 1 and 2, postal code, city, state, country. This is fine, of course, from a database perspective.
However, it's not so fine from a perspective with businesses operating on a global scale anymore: one business can have clients all over the world, with each country having its own addressing scheme. E.g. The Netherlands uses:
<Addressee>
<Address>
<Postal code> <city>
<Country>
(No state!)
Whereas Great Britain seems to use
<Addressee>
<Address>
<City> <Postal code>
<Country>
Of course there are all the variations of having a person as a second addressee line and the suppression of address line 2 if it's empty and suppression of <country> if the country of the sender is the same as the country of the of the addressee.
My idea (driven by a request from Havard) is to associate address templates with countries (or maybe even country/state combinations). Every part of the application requiring the company's address would request that from a function which applies the template to the database fields, returning a simple (opaque) list of printable lines which can be printed in a letter head or on an envelope. That way, we don't need to develop intelligent templates which know about all the different variations of addressing methods -- and neither does the rest of the application.
Bye,
Erik.