I may have a use for this, where I would like to do some of my own contribution to the project:
There is a great deal of demand for specialized accounting software packages to connect with CRM packages. Seeing the Inventory Detail module creates a detailed record for everything, I would like to create an extension that produces XML files on the server where basically there will be a detailed invoice report in XML format. Most accounting packages have the possibility to create 'cron-jobs' (or similar jobs with a set interval) to import records.
I read into the PHP DOMDocument model, and am studying the PearDatabase.php file. I would like to create a create a PHP file that uses the classes in PearDatabase to connect to the database and retrieve the inventory details lines for each record associated with an invoice. After that, I'd like to use DOMDocument to create and save on server an XML file that contains all inventory lines and the invoice numbers it relates to. Maybe even create a backend settings screen, where a user could make his own XML templates, based on his accounting package.
My first question, I see the database table for inventory details holds a 'related_to' column. There is an ID, but this does not state what kind of record type this is. So my question: how does the inventory details module know what kind of record (either SO, Invoice etc.) it is related to? The ID number could appear in any of those tables. I'm asking this because I'd like to use the same logic for my query.
EDIT
I think I may have found the answer already.. I see that the system does not create double ID's.. didn't know that. Am I right to say that if I create an invoice with ID '1', and then create a quote, that quote will have ID '2', and so on for SO's etc...?
There is a great deal of demand for specialized accounting software packages to connect with CRM packages. Seeing the Inventory Detail module creates a detailed record for everything, I would like to create an extension that produces XML files on the server where basically there will be a detailed invoice report in XML format. Most accounting packages have the possibility to create 'cron-jobs' (or similar jobs with a set interval) to import records.
I read into the PHP DOMDocument model, and am studying the PearDatabase.php file. I would like to create a create a PHP file that uses the classes in PearDatabase to connect to the database and retrieve the inventory details lines for each record associated with an invoice. After that, I'd like to use DOMDocument to create and save on server an XML file that contains all inventory lines and the invoice numbers it relates to. Maybe even create a backend settings screen, where a user could make his own XML templates, based on his accounting package.
My first question, I see the database table for inventory details holds a 'related_to' column. There is an ID, but this does not state what kind of record type this is. So my question: how does the inventory details module know what kind of record (either SO, Invoice etc.) it is related to? The ID number could appear in any of those tables. I'm asking this because I'd like to use the same logic for my query.
EDIT
I think I may have found the answer already.. I see that the system does not create double ID's.. didn't know that. Am I right to say that if I create an invoice with ID '1', and then create a quote, that quote will have ID '2', and so on for SO's etc...?