Most companies make regular payments out, either by standing order, or by
direct debit. What is needed is a system to set up these payments, and to
process them as they become due.
We need a new table called regularpayments to store the regular payments.
CreateTable('regularpayments', "CREATE TABLE IF NOT EXISTS `regularpayments` (
`id` int(10) unsigned NOT NULL auto_increment,
`frequency` char(1) NOT NULL default 'M',
`days` tinyint(3) NOT NULL DEFAULT 0,
`glcode` varchar(20) NOT NULL DEFAULT '1',
`bankaccountcode` varchar(20) NOT NULL DEFAULT '0',
`tag` varchar(255) NOT NULL DEFAULT _,_
`amount` double NOT NULL default 0,
`currabrev` char(3) NOT NULL DEFAULT _,_
`narrative` varchar(255) default _,_
`firstpayment` date NOT NULL default '0000-00-00',
`finalpayment` date NOT NULL default '0000-00-00',
`nextpayment` date NOT NULL default '0000-00-00',
`completed` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
)
We also need to register the new scripts
NewScript('RegularPaymentsSetup.php', 5);
NewScript('RegularPaymentsProcess.php', 5);
A new script that allows us to setup new regular payments
https://github.com/timschofield/image.../RegularPaymentsSetup.png
This script shows a list of all payments that are due. Tick those that you
wish to process, click on process, and all the transactions will be posted.