by Mike.Sheen » Thu Apr 02, 2015 10:33 pm
Hi Stuart,
I can provide you a sample that does all that - but there would need to be a mechanism to identify which entries in the wages system have already been processed to prevent double posting. To achieve this, you could store in a custom field on the journal a unique identifier from the wages system (pay run number or something), so identifying journals yet to be processed would be done by finding all the wages system entries where the unique identifier was not in the Jiwa journals.
The notification to a user who may not be logged in at the time could be done by creating a To-Do notification in Jiwa, or by simply sending an email.
So, my initial approach would be to create a plugin which:
1. Creates a custom field on the journal set "Pay Run No." or "Pay Run ID" or equivalent
2. On a scheduled basis, query the wages database to find entries not already processed into Jiwa (ie: no matching journals with the "Pay Run No. / ID"). This query would need to use SQL credentials valid for the wages database - ideally you would create a SQL user with read-only access to the relevant tables.
3. Create journal(s)
4. Create a To-Do notifying a Jiwa user of the event
Sound about right?
I'm on leave until the 11th of April, but should be able to provide you with a plugin which does the bulk of the work in the next few days (you'll have to fill in some bits relating to the structures of the wages database).
Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials
If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution