-
Notifications
You must be signed in to change notification settings - Fork 135
RegularPayments
Tim Schofield edited this page Sep 21, 2024
·
3 revisions
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`) )