Advertisement
Guest User

mysql

a guest
Sep 13th, 2017
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 13.88 KB | None | 0 0
  1. SET FOREIGN_KEY_CHECKS=0;
  2.  
  3. -- ----------------------------
  4. -- Table structure for ip_clients
  5. -- ----------------------------
  6. DROP TABLE IF EXISTS `ip_clients`;
  7. CREATE TABLE `ip_clients` (
  8.   `client_id` int(11) NOT NULL AUTO_INCREMENT,
  9.   `client_date_created` datetime NOT NULL,
  10.   `client_date_modified` datetime NOT NULL,
  11.   `client_name` text,
  12.   `client_address_1` text,
  13.   `client_address_2` text,
  14.   `client_city` text,
  15.   `client_state` text,
  16.   `client_zip` text,
  17.   `client_country` text,
  18.   `client_phone` text,
  19.   `client_fax` text,
  20.   `client_mobile` text,
  21.   `client_email` text,
  22.   `client_web` text,
  23.   `client_vat_id` text,
  24.   `client_tax_code` text,
  25.   `client_language` varchar(255) DEFAULT 'system',
  26.   `client_active` int(1) NOT NULL DEFAULT '1',
  27.   `client_surname` varchar(255) DEFAULT NULL,
  28.   `client_avs` varchar(16) DEFAULT NULL,
  29.   `client_insurednumber` varchar(30) DEFAULT NULL,
  30.   `client_veka` varchar(30) DEFAULT NULL,
  31.   `client_birthdate` date DEFAULT NULL,
  32.   `client_gender` int(1) DEFAULT '0',
  33.   PRIMARY KEY (`client_id`),
  34.   KEY `client_active` (`client_active`) USING BTREE
  35. ) ENGINE=MyISAM AUTO_INCREMENT=840 DEFAULT CHARSET=utf8;
  36.  
  37. -- ----------------------------
  38. -- Records of ip_clients
  39. -- ----------------------------
  40. INSERT INTO `ip_clients` VALUES ('1', '0000-00-00 00:00:00', '2017-09-12 19:58:32', 'Client 1', '', '', null, '', '', '', null, null, null, null, null, null, null, 'system', '1', '', null, null, null, '0000-00-00', '0');
  41. INSERT INTO `ip_clients` VALUES ('2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'Client 2', null, null, null, null, null, null, null, null, null, null, null, null, null, 'system', '1', null, null, null, null, null, '0');
  42.  
  43. -- ----------------------------
  44. -- Table structure for ip_invoice_amounts
  45. -- ----------------------------
  46. DROP TABLE IF EXISTS `ip_invoice_amounts`;
  47. CREATE TABLE `ip_invoice_amounts` (
  48.   `invoice_amount_id` int(11) NOT NULL AUTO_INCREMENT,
  49.   `invoice_id` int(11) NOT NULL,
  50.   `invoice_sign` enum('1','-1') NOT NULL DEFAULT '1',
  51.   `invoice_item_subtotal` decimal(20,2) DEFAULT NULL,
  52.   `invoice_item_tax_total` decimal(20,2) DEFAULT NULL,
  53.   `invoice_tax_total` decimal(20,2) DEFAULT NULL,
  54.   `invoice_total` decimal(20,2) DEFAULT NULL,
  55.   `invoice_paid` decimal(20,2) DEFAULT NULL,
  56.   `invoice_balance` decimal(20,2) DEFAULT NULL,
  57.   PRIMARY KEY (`invoice_amount_id`),
  58.   KEY `invoice_id` (`invoice_id`) USING BTREE,
  59.   KEY `invoice_paid` (`invoice_paid`,`invoice_balance`) USING BTREE
  60. ) ENGINE=MyISAM AUTO_INCREMENT=205 DEFAULT CHARSET=utf8;
  61.  
  62. -- ----------------------------
  63. -- Records of ip_invoice_amounts
  64. -- ----------------------------
  65. INSERT INTO `ip_invoice_amounts` VALUES ('1', '1', '1', '129.60', '0.00', '0.00', '129.60', '129.60', '0.00');
  66. INSERT INTO `ip_invoice_amounts` VALUES ('2', '2', '1', '4.78', '0.00', '0.00', '4.78', '0.00', '4.78');
  67. INSERT INTO `ip_invoice_amounts` VALUES ('3', '3', '1', '60.24', '0.00', '0.00', '60.24', '0.00', '60.24');
  68. INSERT INTO `ip_invoice_amounts` VALUES ('4', '4', '1', '62.53', '0.00', '0.00', '62.53', '0.00', '62.53');
  69. INSERT INTO `ip_invoice_amounts` VALUES ('5', '5', '1', '90.74', '0.00', '0.00', '90.74', '0.00', '90.74');
  70.  
  71. -- ----------------------------
  72. -- Table structure for ip_invoice_item_amounts
  73. -- ----------------------------
  74. DROP TABLE IF EXISTS `ip_invoice_item_amounts`;
  75. CREATE TABLE `ip_invoice_item_amounts` (
  76.   `item_amount_id` int(11) NOT NULL AUTO_INCREMENT,
  77.   `item_id` int(11) NOT NULL,
  78.   `item_subtotal` decimal(20,2) DEFAULT NULL,
  79.   `item_tax_total` decimal(20,2) DEFAULT NULL,
  80.   `item_discount` decimal(20,2) DEFAULT NULL,
  81.   `item_total` decimal(20,2) DEFAULT NULL,
  82.   PRIMARY KEY (`item_amount_id`),
  83.   KEY `item_id` (`item_id`) USING BTREE
  84. ) ENGINE=MyISAM AUTO_INCREMENT=255 DEFAULT CHARSET=utf8;
  85.  
  86. -- ----------------------------
  87. -- Records of ip_invoice_item_amounts
  88. -- ----------------------------
  89. INSERT INTO `ip_invoice_item_amounts` VALUES ('1', '1', '129.60', '0.00', '0.00', '129.60');
  90. INSERT INTO `ip_invoice_item_amounts` VALUES ('2', '2', '4.78', '0.00', '0.00', '4.78');
  91. INSERT INTO `ip_invoice_item_amounts` VALUES ('3', '3', '60.24', '0.00', '0.00', '60.24');
  92. INSERT INTO `ip_invoice_item_amounts` VALUES ('4', '4', '62.53', '0.00', '0.00', '62.53');
  93. INSERT INTO `ip_invoice_item_amounts` VALUES ('5', '5', '90.74', '0.00', '0.00', '90.74');
  94.  
  95. -- ----------------------------
  96. -- Table structure for ip_invoice_items
  97. -- ----------------------------
  98. DROP TABLE IF EXISTS `ip_invoice_items`;
  99. CREATE TABLE `ip_invoice_items` (
  100.   `item_id` int(11) NOT NULL AUTO_INCREMENT,
  101.   `invoice_id` int(11) NOT NULL,
  102.   `item_tax_rate_id` int(11) NOT NULL DEFAULT '0',
  103.   `item_product_id` int(11) DEFAULT NULL,
  104.   `item_date_added` date NOT NULL,
  105.   `item_task_id` int(11) DEFAULT NULL,
  106.   `item_name` text,
  107.   `item_promitheftis` text,
  108.   `item_description` longtext,
  109.   `item_quantity` decimal(10,2) NOT NULL,
  110.   `item_price` decimal(20,2) DEFAULT NULL,
  111.   `item_discount_amount` decimal(20,2) DEFAULT NULL,
  112.   `item_order` int(2) NOT NULL DEFAULT '0',
  113.   `item_product_unit` varchar(50) DEFAULT NULL,
  114.   `item_product_unit_id` int(11) DEFAULT NULL,
  115.   `item_date` date DEFAULT NULL,
  116.   `promithefti` varchar(255) DEFAULT NULL,
  117.   PRIMARY KEY (`item_id`),
  118.   KEY `invoice_id` (`invoice_id`,`item_tax_rate_id`,`item_date_added`,`item_order`) USING BTREE
  119. ) ENGINE=MyISAM AUTO_INCREMENT=255 DEFAULT CHARSET=utf8;
  120.  
  121. -- ----------------------------
  122. -- Records of ip_invoice_items
  123. -- ----------------------------
  124. INSERT INTO `ip_invoice_items` VALUES ('1', '1', '0', '3021104', '2017-07-26', null, 'item names', null, '', '1.00', '129.60', null, '1', null, null, null, '');
  125. INSERT INTO `ip_invoice_items` VALUES ('2', '2', '0', '3021137', '2017-07-26', null, 'item names', null, '', '1.00', '4.78', null, '1', null, null, null, '');
  126. INSERT INTO `ip_invoice_items` VALUES ('3', '3', '0', '3021100', '2017-07-26', null, 'item names', null, '', '1.00', '60.24', null, '1', null, null, null, '');
  127. INSERT INTO `ip_invoice_items` VALUES ('4', '4', '0', '3021138', '2017-07-26', null, 'item names', null, '', '1.00', '62.53', null, '1', null, null, null, '');
  128. INSERT INTO `ip_invoice_items` VALUES ('5', '5', '0', '3021101', '2017-07-26', null, 'item names', null, '', '1.00', '90.74', null, '1', null, null, null, '');
  129. INSERT INTO `ip_invoice_items` VALUES ('6', '6', '0', '3021139', '2017-07-26', null, 'item names', null, '', '1.00', '274.54', null, '1', null, null, null, '');
  130. INSERT INTO `ip_invoice_items` VALUES ('7', '7', '0', '3021102', '2017-07-26', null, 'item names', null, '', '1.00', '152.36', null, '1', null, null, null, '');
  131. INSERT INTO `ip_invoice_items` VALUES ('8', '8', '0', '3021140', '2017-07-26', null, 'item names', null, '', '1.00', '184.21', null, '1', null, null, null, '');
  132. INSERT INTO `ip_invoice_items` VALUES ('9', '9', '0', '3021103', '2017-07-26', null, 'item names', null, '', '1.00', '5.95', null, '1', null, null, null, '');
  133.  
  134. -- ----------------------------
  135. -- Table structure for ip_invoice_tax_rates
  136. -- ----------------------------
  137. DROP TABLE IF EXISTS `ip_invoice_tax_rates`;
  138. CREATE TABLE `ip_invoice_tax_rates` (
  139.   `invoice_tax_rate_id` int(11) NOT NULL AUTO_INCREMENT,
  140.   `invoice_id` int(11) NOT NULL,
  141.   `tax_rate_id` int(11) NOT NULL,
  142.   `include_item_tax` int(1) NOT NULL DEFAULT '0',
  143.   `invoice_tax_rate_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  144.   PRIMARY KEY (`invoice_tax_rate_id`),
  145.   KEY `invoice_id` (`invoice_id`,`tax_rate_id`) USING BTREE
  146. ) ENGINE=MyISAM AUTO_INCREMENT=228 DEFAULT CHARSET=utf8;
  147.  
  148. -- ----------------------------
  149. -- Records of ip_invoice_tax_rates
  150. -- ----------------------------
  151. INSERT INTO `ip_invoice_tax_rates` VALUES ('1', '1', '1', '0', '15.00');
  152. INSERT INTO `ip_invoice_tax_rates` VALUES ('2', '2', '1', '0', '10.00');
  153. INSERT INTO `ip_invoice_tax_rates` VALUES ('3', '3', '1', '0', '50.00');
  154. INSERT INTO `ip_invoice_tax_rates` VALUES ('4', '4', '1', '0', '34.27');
  155. INSERT INTO `ip_invoice_tax_rates` VALUES ('5', '5', '1', '0', '16.32');
  156.  
  157. -- ----------------------------
  158. -- Table structure for ip_invoices
  159. -- ----------------------------
  160. DROP TABLE IF EXISTS `ip_invoices`;
  161. CREATE TABLE `ip_invoices` (
  162.   `invoice_id` int(11) NOT NULL AUTO_INCREMENT,
  163.   `user_id` int(11) NOT NULL,
  164.   `client_id` int(11) NOT NULL,
  165.   `invoice_group_id` int(11) NOT NULL,
  166.   `invoice_status_id` tinyint(2) NOT NULL DEFAULT '1',
  167.   `is_read_only` tinyint(1) DEFAULT NULL,
  168.   `invoice_password` varchar(90) DEFAULT NULL,
  169.   `invoice_date_created` date NOT NULL,
  170.   `invoice_time_created` time NOT NULL DEFAULT '00:00:00',
  171.   `invoice_date_modified` datetime NOT NULL,
  172.   `invoice_date_due` date NOT NULL,
  173.   `invoice_number` varchar(100) DEFAULT NULL,
  174.   `invoice_discount_amount` decimal(20,2) DEFAULT NULL,
  175.   `invoice_discount_percent` decimal(20,2) DEFAULT NULL,
  176.   `invoice_terms` longtext NOT NULL,
  177.   `invoice_url_key` char(32) NOT NULL,
  178.   `payment_method` int(11) NOT NULL DEFAULT '0',
  179.   `creditinvoice_parent_id` int(11) DEFAULT NULL,
  180.   PRIMARY KEY (`invoice_id`),
  181.   UNIQUE KEY `invoice_url_key` (`invoice_url_key`) USING BTREE,
  182.   KEY `user_id` (`user_id`,`client_id`,`invoice_group_id`,`invoice_date_created`,`invoice_date_due`,`invoice_number`) USING BTREE,
  183.   KEY `invoice_status_id` (`invoice_status_id`) USING BTREE
  184. ) ENGINE=MyISAM AUTO_INCREMENT=205 DEFAULT CHARSET=utf8;
  185.  
  186. -- ----------------------------
  187. -- Records of ip_invoices
  188. -- ----------------------------
  189. INSERT INTO `ip_invoices` VALUES ('1', '1', '1', '3', '4', '1', '', '2017-07-26', '16:21:25', '2017-07-26 16:21:57', '2017-08-25', '1', '0.00', '0.00', '', 'N5G208R7j9EhrnP', '1', null);
  190. INSERT INTO `ip_invoices` VALUES ('2', '1', '1', '3', '2', null, '', '2017-07-26', '16:21:29', '2017-07-26 16:22:10', '2017-08-25', '2', '0.00', '0.00', '', 'MscSjbXU5maZdFN', '1', null);
  191. INSERT INTO `ip_invoices` VALUES ('3', '1', '1', '3', '1', null, '', '2017-07-26', '16:22:04', '2017-07-26 16:22:47', '2017-08-25', '3', '0.00', '0.00', '', 'uzUyISZ7ia2eLlf', '1', null);
  192. INSERT INTO `ip_invoices` VALUES ('4', '1', '2', '3', '1', null, '', '2017-07-26', '16:22:28', '2017-07-26 16:22:55', '2017-08-25', '4', '0.00', '0.00', '', 'awN8XJFlpGu3MPi', '1', null);
  193. INSERT INTO `ip_invoices` VALUES ('5', '1', '2', '3', '4', null, '', '2017-07-26', '16:23:04', '2017-07-26 16:23:27', '2017-08-25', '5', '0.00', '0.00', '', 'bDodkRZTxAKPi3I', '1', null);
  194.  
  195. -- ----------------------------
  196. -- Table structure for ip_payments
  197. -- ----------------------------
  198. DROP TABLE IF EXISTS `ip_payments`;
  199. CREATE TABLE `ip_payments` (
  200.   `payment_id` int(11) NOT NULL AUTO_INCREMENT,
  201.   `invoice_id` int(11) NOT NULL,
  202.   `payment_method_id` int(11) NOT NULL DEFAULT '0',
  203.   `payment_date` date NOT NULL,
  204.   `payment_amount` decimal(20,2) DEFAULT NULL,
  205.   `payment_note` longtext NOT NULL,
  206.   PRIMARY KEY (`payment_id`),
  207.   KEY `invoice_id` (`invoice_id`) USING BTREE,
  208.   KEY `payment_method_id` (`payment_method_id`) USING BTREE,
  209.   KEY `payment_amount` (`payment_amount`) USING BTREE
  210. ) ENGINE=MyISAM AUTO_INCREMENT=81 DEFAULT CHARSET=utf8;
  211.  
  212. -- ----------------------------
  213. -- Records of ip_payments
  214. -- ----------------------------
  215. INSERT INTO `ip_payments` VALUES ('1', '1', '1', '2017-07-26', '142.37', '');
  216. INSERT INTO `ip_payments` VALUES ('2', '2', '1', '2017-08-01', '84.32', '');
  217. INSERT INTO `ip_payments` VALUES ('3', '3', '1', '2017-08-01', '180.79', '');
  218. INSERT INTO `ip_payments` VALUES ('4', '4', '1', '2017-08-03', '126.48', '');
  219.  
  220. -- ----------------------------
  221. -- Table structure for ip_products
  222. -- ----------------------------
  223. DROP TABLE IF EXISTS `ip_products`;
  224. CREATE TABLE `ip_products` (
  225.   `product_id` int(11) NOT NULL AUTO_INCREMENT,
  226.   `family_id` int(11) DEFAULT NULL,
  227.   `product_sku` text,
  228.   `product_name` text CHARACTER SET greek,
  229.   `product_description` longtext NOT NULL,
  230.   `product_price` decimal(20,3) DEFAULT NULL,
  231.   `purchase_price` decimal(20,3) DEFAULT NULL,
  232.   `provider_name` text,
  233.   `tax_rate_id` int(11) DEFAULT NULL,
  234.   `unit_id` int(11) DEFAULT NULL,
  235.   `product_tariff` int(11) DEFAULT NULL,
  236.   `promithefti` text,
  237.   `posotita` varchar(255) DEFAULT NULL,
  238.   PRIMARY KEY (`product_id`)
  239. ) ENGINE=MyISAM AUTO_INCREMENT=463 DEFAULT CHARSET=utf8;
  240.  
  241. -- ----------------------------
  242. -- Records of ip_products
  243. -- ----------------------------
  244. INSERT INTO `ip_products` VALUES ('1', '1', '1010001', 'Product 1', '', '1.650', '1.610', '', null, '2', '0', null, null);
  245. INSERT INTO `ip_products` VALUES ('2', '1', '1010002', 'Product 2', '', '1.610', '1.610', '', null, '2', '0', null, null);
  246.  
  247. -- ----------------------------
  248. -- Table structure for ip_tasks
  249. -- ----------------------------
  250. DROP TABLE IF EXISTS `ip_tasks`;
  251. CREATE TABLE `ip_tasks` (
  252.   `task_id` int(11) NOT NULL AUTO_INCREMENT,
  253.   `project_id` int(11) NOT NULL,
  254.   `task_name` text,
  255.   `task_description` longtext NOT NULL,
  256.   `task_price` decimal(20,2) DEFAULT NULL,
  257.   `task_finish_date` date NOT NULL,
  258.   `task_status` tinyint(1) NOT NULL,
  259.   `tax_rate_id` int(11) NOT NULL,
  260.   `task_base` text,
  261.   `task_til` text,
  262.   `task_kostos` tinyint(1) NOT NULL,
  263.   `task_perioxes` text,
  264.   `task_promitheftis` text,
  265.   PRIMARY KEY (`task_id`)
  266. ) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
  267.  
  268. -- ----------------------------
  269. -- Records of ip_tasks
  270. -- ----------------------------
  271. INSERT INTO `ip_tasks` VALUES ('5', '0', 'task name 1', '', '2.00', '0000-00-00', '3', '1', 'base', null, '1', null, null);
  272. INSERT INTO `ip_tasks` VALUES ('6', '0', 'task name 2', '', '5.00', '0000-00-00', '3', '1', 'base', null, '1', null, null);
  273.  
  274. -- ----------------------------
  275. -- Table structure for ip_tax_rates
  276. -- ----------------------------
  277. DROP TABLE IF EXISTS `ip_tax_rates`;
  278. CREATE TABLE `ip_tax_rates` (
  279.   `tax_rate_id` int(11) NOT NULL AUTO_INCREMENT,
  280.   `tax_rate_name` text,
  281.   `tax_rate_percent` decimal(5,2) NOT NULL,
  282.   PRIMARY KEY (`tax_rate_id`)
  283. ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  284.  
  285. -- ----------------------------
  286. -- Records of ip_tax_rates
  287. -- ----------------------------
  288. INSERT INTO `ip_tax_rates` VALUES ('1', 'tax name', '24.00');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement