Recurrent Invoices: fixed buggy call to non existing function and payment terms type...
[fa-stable.git] / sql / en_US-demo.sql
index 94496c80598a6beb74960f11ec5c434a57c3c2ac..03aff5703f9597b9abd443853fe18a1c652e8114 100644 (file)
@@ -149,6 +149,7 @@ CREATE TABLE `0_bank_trans` (
   `ref` varchar(40) DEFAULT NULL,
   `trans_date` date NOT NULL DEFAULT '0000-00-00',
   `amount` double DEFAULT NULL,
+  `charge` double DEFAULT NULL,
   `dimension_id` int(11) NOT NULL DEFAULT '0',
   `dimension2_id` int(11) NOT NULL DEFAULT '0',
   `person_type_id` int(11) NOT NULL DEFAULT '0',
@@ -164,11 +165,11 @@ CREATE TABLE `0_bank_trans` (
 -- Data of table `0_bank_trans` --
 
 INSERT INTO `0_bank_trans` VALUES
-('1', '12', '1', '2', '001/2018', '2018-05-10', '6240', '0', '0', '2', '1', NULL),
-('2', '12', '2', '2', '002/2018', '2018-05-07', '300', '0', '0', '2', '1', NULL),
-('3', '12', '3', '2', '003/2018', '2018-05-07', '0', '0', '0', '2', '1', NULL),
-('4', '1', '1', '1', '001/2018', '2018-05-07', '-5', '0', '0', '0', 'Goods received', NULL),
-('5', '12', '4', '2', '001/2019', '2019-01-21', '1250', '0', '0', '2', '1', NULL);
+('1', '12', '1', '2', '001/2018', '2018-05-10', '6240', '0', '0', '0', '2', '1', NULL),
+('2', '12', '2', '2', '002/2018', '2018-05-07', '300', '0', '0', '0', '2', '1', NULL),
+('3', '12', '3', '2', '003/2018', '2018-05-07', '0', '0', '0', '0', '2', '1', NULL),
+('4', '1', '1', '1', '001/2018', '2018-05-07', '-5', '0', '0', '0', '0', 'Goods received', NULL),
+('5', '12', '4', '2', '001/2019', '2019-01-21', '1250', '0', '0', '0', '2', '1', NULL);
 
 -- Structure of table `0_bom` --
 
@@ -524,6 +525,7 @@ CREATE TABLE `0_cust_allocations` (
   `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,
@@ -538,10 +540,10 @@ CREATE TABLE `0_cust_allocations` (
 -- Data of table `0_cust_allocations` --
 
 INSERT INTO `0_cust_allocations` VALUES
-('1', '1', '6240', '2018-05-10', '1', '12', '1', '10'),
-('2', '1', '300', '2018-05-07', '2', '12', '2', '10'),
-('3', '1', '0', '2018-05-07', '3', '12', '4', '10'),
-('4', '1', '1250', '2019-01-21', '4', '12', '5', '10');
+('1', '1', '6240', '0', '2018-05-10', '1', '12', '1', '10'),
+('2', '1', '300', '0', '2018-05-07', '2', '12', '2', '10'),
+('3', '1', '0', '0', '2018-05-07', '3', '12', '4', '10'),
+('4', '1', '1250', '0', '2019-01-21', '4', '12', '5', '10');
 
 -- Structure of table `0_cust_branch` --
 
@@ -698,7 +700,6 @@ CREATE TABLE `0_debtors_master` (
   `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',
@@ -710,8 +711,8 @@ CREATE TABLE `0_debtors_master` (
 -- Data of table `0_debtors_master` --
 
 INSERT INTO `0_debtors_master` VALUES
-('1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '123456789', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0'),
-('2', 'MoneyMaker Ltd.', 'MoneyMaker', 'N/A', '54354333', 'EUR', '1', '1', '0', '1', '1', '0', '0', '1000', '', '0');
+('1', 'Donald Easter LLC', 'Donald Easter', 'N/A', '123456789', 'USD', '1', '0', '0', '1', '4', '0', '1000', '', '0'),
+('2', 'MoneyMaker Ltd.', 'MoneyMaker', 'N/A', '54354333', 'EUR', '1', '1', '0', '1', '1', '0', '1000', '', '0');
 
 -- Structure of table `0_dimensions` --
 
@@ -1094,7 +1095,7 @@ CREATE TABLE `0_payment_terms` (
 
 INSERT INTO `0_payment_terms` VALUES
 ('1', 'Due 15th Of the Following Month', '4', '17', '0', '0', '0'),
-('2', 'Due By End Of The Following Month', '4', '30', '0', '0', '0'),
+('2', 'Due By End Of The Following Month', '4', '31', '0', '0', '0'),
 ('3', 'Payment due within 10 days', '10', '3', '0', '0', '0', '0'),
 ('4', 'Cash Only', '2', '0', '0', '0', '0'),
 ('5', 'Prepaid', '1',  '0', '0', '0', '0');
@@ -1475,7 +1476,7 @@ INSERT INTO `0_sales_orders` VALUES
 ('3', '30', '0', '0', '1', '1', '001/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '4', '300', '0', '0'),
 ('4', '30', '0', '0', '2', '2', '002/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2018-05-08', '1', '267.14', '0', '0'),
 ('5', '30', '1', '0', '2', '2', 'auto', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'MoneyMaker Ltd.', '0', 'DEF', '2018-06-17', '1', '267.14', '0', '0'),
-('6', '30', '0', '1', '1', '1', '003/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '4', '450', '0', '0'),
+('6', '30', '0', '1', '1', '1', '003/2018', '', NULL, '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-08', '3', '450', '0', '0'),
 ('7', '30', '1', '0', '1', '1', 'auto', '', 'Recurrent Invoice covers period 04/01/2018 - 04/07/2018.', '2018-05-07', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2018-05-07', '4', '0', '0', '0'),
 ('8', '30', '1', '0', '1', '1', 'auto', '', NULL, '2019-01-21', '1', 'post-std', 'N/A', NULL, NULL, 'Donald Easter LLC', '0', 'DEF', '2019-01-21', '4', '1250', '0', '0');
 
@@ -1741,6 +1742,7 @@ CREATE TABLE `0_supp_allocations` (
   `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,