`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) DEFAULT NULL,
`amt` double unsigned DEFAULT NULL,
+ `discount` double unsigned DEFAULT '0',
`date_alloc` date NOT NULL DEFAULT '0000-00-00',
`trans_no_from` int(11) DEFAULT NULL,
`trans_type_from` int(11) DEFAULT NULL,
-- Data of table `0_cust_branch` --
+DROP TABLE IF EXISTS `0_sql_trail`;
+CREATE TABLE `0_db_trail` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `stamp` timestamp DEFAULT CURRENT_TIMESTAMP,
+ `user` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `msg` varchar(255) DEFAULT '',
+ `entry` varchar(255) DEFAULT '',
+ `data` text DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
-- Structure of table `0_debtor_trans` --
DROP TABLE IF EXISTS `0_debtor_trans`;
`credit_status` int(11) NOT NULL DEFAULT '0',
`payment_terms` int(11) DEFAULT NULL,
`discount` double NOT NULL DEFAULT '0',
- `pymt_discount` double NOT NULL DEFAULT '0',
`credit_limit` float NOT NULL DEFAULT '1000',
`notes` tinytext NOT NULL,
`inactive` tinyint(1) NOT NULL DEFAULT '0',
DROP TABLE IF EXISTS `0_payment_terms`;
CREATE TABLE `0_payment_terms` (
- `terms_indicator` int(11) NOT NULL AUTO_INCREMENT,
+ `id` int(11) NOT NULL AUTO_INCREMENT,
`terms` char(80) NOT NULL DEFAULT '',
- `days_before_due` smallint(6) NOT NULL DEFAULT '0',
- `day_in_following_month` smallint(6) NOT NULL DEFAULT '0',
+ `type` tinyint(1) NOT NULL DEFAULT '1'
+ `days` int(11) NOT NULL DEFAULT '0'
+ `early_discount` double NOT NULL DEFAULT '0'
+ `early_days` double NOT NULL DEFAULT '0',
`inactive` tinyint(1) NOT NULL DEFAULT '0',
- PRIMARY KEY (`terms_indicator`),
+ PRIMARY KEY (`id`),
UNIQUE KEY `terms` (`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=6 ;
-- Data of table `0_payment_terms` --
INSERT INTO `0_payment_terms` VALUES
-('1', 'Due 15th Of the Following Month', '0', '17', '0'),
-('2', 'Due By End Of The Following Month', '0', '30', '0'),
-('3', 'Payment due within 10 days', '10', '0', '0'),
-('4', 'Cash Only', '0', '0', '0'),
-('5', 'Prepaid', '-1', '0', '0');
+('1', 'Due 15th Of the Following Month', '4', '17', '0', '0', '0'),
+('2', 'Due By End Of The Following Month', '4', '31', '0', '0', '0'),
+('3', 'Payment due within 10 days', '3', '10', '0', '0', '0'),
+('4', 'Cash Only', '2', '0', '0', '0', '0'),
+('5', 'Prepaid', '1', '0', '0', '0', '0');
-- Structure of table `0_prices` --
INSERT INTO `0_shippers` VALUES
('1', 'Default', '', '', '', '', '0');
--- Structure of table `0_sql_trail` --
-
-DROP TABLE IF EXISTS `0_sql_trail`;
-
-CREATE TABLE `0_sql_trail` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `sql` text NOT NULL,
- `result` tinyint(1) NOT NULL,
- `msg` varchar(255) NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB ;
-
--- Data of table `0_sql_trail` --
-
-- Structure of table `0_stock_category` --
DROP TABLE IF EXISTS `0_stock_category`;
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) DEFAULT NULL,
`amt` double unsigned DEFAULT NULL,
+ `discount` double unsigned DEFAULT '0',
`date_alloc` date NOT NULL DEFAULT '0000-00-00',
`trans_no_from` int(11) DEFAULT NULL,
`trans_type_from` int(11) DEFAULT NULL,