Martin
2010-12-03 22:26:17
I'm going to be using this as my slate to record notes and vocalise ideas, nuggets of intel, etc... so don't expect much of it to make sense :)
Martin
2010-12-03 23:34:07
Ok... Initial thoughts:
1. It would be easy enough to just create a PHP/MySQL specific code set to handle the export but that'd be lazy and more likely to result in mistake later so opting to use the existing modules as guidance (although Quickbooks module is supposedly broken half the time) to get at least the variables for transfer from the admin system.
2. There seems to be a useful form type called "datechooser" that doesn't appear to be used a great deal elsewhere in the ISC code but should provide the necessary date fields for start/end settings to create the range for processing records.
3. The class.accounting.php code has a lot of functionality tied around a "spool" system which I'm guessing is like a print spooler, where the information to be synchronised or processed is pre-processed, checked and then made ready for actual handling. To be honest this stuff is a complete mystery to me with very little documentation and it's pretty tricky to reverse engineer the quickbooks example because I've not used Quickbooks since around 1998 (might have changed a teensy bit since ;)).
So, looking at the StoneEdge code it's obvious that this simply doesn't use the spool code at all so I'm discounting it for now and looking at my own approach.
4. Already got a nice class that should handle the actual data transfer to Kashflow without needing me to spend forever with the XML so that makes life easier too.
So, plan of action...
1. Create necessary JOIN tables to store synch data (eg: last synched) on customer records, order records and product..
2. Figure way of "batching" information to avoid timeouts and/or overstressing the system (possibly a "kfsession" table to record last record, success, etc... information. Couple with a CRON to transfer/update data in Kashflow over time rather than in one major push)
3. Work out how to make this whole "module" lark work...
Martin
2011-02-26 00:26:45
Done a ton of work on this over the last few days and I'm reasonably close to having a basic import script ready soon.
Still incredibly rough and it won't be ready for any kind of public release for a while but definitely taking shape...
All the rubbish above was a waste of time too... Ended up coding from scratch and ignoring most of my notes apart from point 4. That has been a $deity send.