[Vtigercrm-developers] address module
    Joe Bordes 
    joe at tsolucio.com
       
    Fri Jun  1 08:28:34 PDT 2012
    
    
  
This is a good idea, but has some implications and has to be well defined.
If the same interface is kept, then this is really an internal 
restructure (rather easy and nice), if you want to add many addresses to 
any account (entity) then creating/editing becomes a few steps more complex.
Then we have to keep in mind that certain entities MUST have the address 
on the record, for consistency, like a SO where we need the address on 
it to make sure we don't send the goods to a different address if the 
account's address changes or on the Invoice where this needs to be kept 
for legal reasons.
Also if various addresses are permitted on the account/contact we need a 
way to permit the user to pick which of them to use for billing and 
shipping.
...
and probably some additional logic that I haven't considered.
In short, like most things, it isn't that easy.
That said, I would vote +1 as I consider it is important
Have a nice weekend
Joe
TSolucio
El 01/06/12 16:55, Adam Heinz escribió:
> Has anyone given any thought to building a standalone address module?
> There are a lot of repeated (and inconsistently named) address fields
> in the database.  Wouldn't it be simpler to have a single
> vtiger_address table with an addresstype picklist ('shipping',
> 'billing', 'mailing', 'other'), then just refer to this table as a
> related module?
>
> mysql>  desc vtiger_contactaddress;
> +------------------+---------------+------+-----+---------+-------+
> | Field            | Type          | Null | Key | Default | Extra |
> +------------------+---------------+------+-----+---------+-------+
> | contactaddressid | int(19)       | NO   | PRI | 0       |       |
> | mailingcity      | varchar(40)   | YES  |     | NULL    |       |
> | mailingstreet    | varchar(250)  | YES  |     | NULL    |       |
> | mailingcountry   | varchar(40)   | YES  |     | NULL    |       |
> | othercountry     | varchar(30)   | YES  |     | NULL    |       |
> | mailingstate     | varchar(30)   | YES  |     | NULL    |       |
> | mailingpobox     | varchar(30)   | YES  |     | NULL    |       |
> | othercity        | varchar(40)   | YES  |     | NULL    |       |
> | otherstate       | varchar(50)   | YES  |     | NULL    |       |
> | mailingzip       | varchar(30)   | YES  |     | NULL    |       |
> | otherzip         | varchar(30)   | YES  |     | NULL    |       |
> | otherstreet      | varchar(250)  | YES  |     | NULL    |       |
> | otherpobox       | varchar(30)   | YES  |     | NULL    |       |
> +------------------+---------------+------+-----+---------+-------+
>
> mysql>  desc vtiger_organizationdetails;
> +------------------+--------------+------+-----+---------+-------+
> | Field            | Type         | Null | Key | Default | Extra |
> +------------------+--------------+------+-----+---------+-------+
> | organizationname | varchar(60)  | NO   | PRI |         |       |
> | address          | varchar(150) | YES  |     | NULL    |       |
> | city             | varchar(100) | YES  |     | NULL    |       |
> | state            | varchar(100) | YES  |     | NULL    |       |
> | country          | varchar(100) | YES  |     | NULL    |       |
> | code             | varchar(30)  | YES  |     | NULL    |       |
> | phone            | varchar(30)  | YES  |     | NULL    |       |
> | fax              | varchar(30)  | YES  |     | NULL    |       |
> | website          | varchar(100) | YES  |     | NULL    |       |
> | logoname         | varchar(50)  | YES  |     | NULL    |       |
> | logo             | mediumtext   | YES  |     | NULL    |       |
> | showtax          | varchar(1)   | NO   |     | NULL    |       |
> +------------------+--------------+------+-----+---------+-------+
>
> mysql>  desc vtiger_quotesbillads;
> +--------------------+--------------+------+-----+---------+-------+
> | Field              | Type         | Null | Key | Default | Extra |
> +--------------------+--------------+------+-----+---------+-------+
> | quotebilladdressid | int(19)      | NO   | PRI | 0       |       |
> | bill_city          | varchar(30)  | YES  |     | NULL    |       |
> | bill_code          | varchar(30)  | YES  |     | NULL    |       |
> | bill_country       | varchar(30)  | YES  |     | NULL    |       |
> | bill_state         | varchar(30)  | YES  |     | NULL    |       |
> | bill_street        | varchar(250) | YES  |     | NULL    |       |
> | bill_pobox         | varchar(30)  | YES  |     | NULL    |       |
> +--------------------+--------------+------+-----+---------+-------+
>
> mysql>  desc vtiger_quotesshipads;
> +--------------------+--------------+------+-----+---------+-------+
> | Field              | Type         | Null | Key | Default | Extra |
> +--------------------+--------------+------+-----+---------+-------+
> | quoteshipaddressid | int(19)      | NO   | PRI | 0       |       |
> | ship_city          | varchar(30)  | YES  |     | NULL    |       |
> | ship_code          | varchar(30)  | YES  |     | NULL    |       |
> | ship_country       | varchar(30)  | YES  |     | NULL    |       |
> | ship_state         | varchar(30)  | YES  |     | NULL    |       |
> | ship_street        | varchar(250) | YES  |     | NULL    |       |
> | ship_pobox         | varchar(30)  | YES  |     | NULL    |       |
> +--------------------+--------------+------+-----+---------+-------+
>
> mysql>  desc vtiger_accountbillads;
> +------------------+--------------+------+-----+---------+-------+
> | Field            | Type         | Null | Key | Default | Extra |
> +------------------+--------------+------+-----+---------+-------+
> | accountaddressid | int(19)      | NO   | PRI | 0       |       |
> | bill_city        | varchar(30)  | YES  |     | NULL    |       |
> | bill_code        | varchar(30)  | YES  |     | NULL    |       |
> | bill_country     | varchar(30)  | YES  |     | NULL    |       |
> | bill_state       | varchar(30)  | YES  |     | NULL    |       |
> | bill_street      | varchar(250) | YES  |     | NULL    |       |
> | bill_pobox       | varchar(30)  | YES  |     | NULL    |       |
> +------------------+--------------+------+-----+---------+-------+
>
> mysql>  desc vtiger_accountshipads;
> +------------------+--------------+------+-----+---------+-------+
> | Field            | Type         | Null | Key | Default | Extra |
> +------------------+--------------+------+-----+---------+-------+
> | accountaddressid | int(19)      | NO   | PRI | 0       |       |
> | ship_city        | varchar(30)  | YES  |     | NULL    |       |
> | ship_code        | varchar(30)  | YES  |     | NULL    |       |
> | ship_country     | varchar(30)  | YES  |     | NULL    |       |
> | ship_state       | varchar(30)  | YES  |     | NULL    |       |
> | ship_pobox       | varchar(30)  | YES  |     | NULL    |       |
> | ship_street      | varchar(250) | YES  |     | NULL    |       |
> +------------------+--------------+------+-----+---------+-------+
> _______________________________________________
> http://www.vtiger.com/
    
    
More information about the vtigercrm-developers
mailing list