[Vtigercrm-developers] Relationships in Vtlib

Manilal K M manilal at ejyothi.com
Sun Nov 6 21:47:18 PST 2011


Hello all,
   Here is the background information: We have a requirement for developing a custom contracts management module in vtigercrm. Our customer information is stored as Accounts in Vtiger and Contractor(Employee) information is stored in Contacts module in vtiger. 

I have developed a custom Entity type module for contracts management and now I need to setup the relationship between the contract and the employees(This will give information on who all works on a specific contract). But I'm confused on how to have this relationship using vtlib. I know that the Entity modules has a *related to* field which can be used to associate between two entities and I'm using the same feature to relate the contracts with Accounts.

But when associating an employee(contact) with a contract, there are specific attributes such as pay type, pay rate, billing rate, start date and end date. These are different for each employee and there is also a possibility of an employee associated with multiple contracts(only one will be active at a given point of time). So the system should also keep track of the entire history of employee as well as a contract.

I clearly understood how entities are managed using vtlib, but couldn't get a clear picture on how the non-entity tables(like the above relation) are populated/retrieved in vtlib. Please let me know your comments or suggestions on how the above model can be effectively integrated using vtlib. 

I have also attached the relationship diagram.

thanks
-- 
Manilal K M
eJyothi Services
http://www.ejyothi.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Contracts-CRM.png
Type: image/png
Size: 56671 bytes
Desc: not available
Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20111107/c48ea1a4/attachment-0002.png 


More information about the vtigercrm-developers mailing list