Recurring form entries

Hi Julian,

This is an idea that came to mind.
An application that keeps entries for info that is added on a monthly/quarterly or annual basis for a customer base. Such as a billing system/subscription, etc. Every monthly/quarterly or annual the same user info needs to be entered for every customer for sending out bills to customers. probable there is a need to mark those customers that should be billed for the next month and those that have discontinued so an entry is not created for them.

Is it possible/or will it be possible in the future to do this in formulize. Just for ideas.

feedback is appreciated.
btesec

Comments

You mean auto-creation of entries on a schedule?

Interesting idea, thanks for sharing. I think you're getting at the idea of having entries automatically created at certain times, so the system maintains a current state in time, independent of anyone actually doing anything?

With a real cron process running on the server, I can imagine how this would be possible. There's actually only a few places you'd need to hook in, maybe just one, in order to do this. If you make a cron job on the server, and point it at a PHP file, and the PHP file has code in it like this:

$values = array('customer_name'=>'ACME', 'product_ordered'=>'TNT', 'quantity'=>100, 'billing_address'=>'Wile E. Coyote, Supergenius', 'billing_date'=>date('Y-m-d'));
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
formulize_writeEntry($values);

Then if you had a cron job hit that file once a month, it would make a new order with a new billing date each month. The date is dynamically calculated in PHP, when the array is setup, and then the array is just written to the DB as a new entry.

It would be a medium sized step to make this configurable, so you add UI in the admin side to let people specify what values they want written to the DB at what times. But that's a UI issue. The basic architecture is dead simple, as shown above.

Is this what you're thinking of?

--Julian

Yes auto creation of entries

Hi Julian,

That's exactly what I meant. probably that something for the future.