Advertisement
G666h05t

TRIPLE ONE GLOBAL ( MEMBER OF MONSTER GROUP ) LEAKED BY AnonGhost Indonesia

Sep 21st, 2023
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 207.82 KB | None | 0 0
  1. -- RMS ( REMOTE MANIPULATION SYSTEM ) Dump
  2. -- version 5.0.1
  3. --
  4.  
  5.  
  6.  
  7.  
  8. HURRR - R - R RRAAYYY THE KING OF INDONESIAN LEAKERS IS BACK!!!!
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. --
  18. -- Host: localhost
  19. --
  20. -- Server version: 10.4.11-MariaDB
  21. -- PHP Version: 7.4.2
  22.  
  23. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  24. SET AUTOCOMMIT = 0;
  25. START TRANSACTION;
  26. SET time_zone = "+00:00";
  27.  
  28.  
  29. /*!40101 SET
  30. /*!40101 SET NAMES ANONGHOST INDONESIA */;
  31.  
  32. --
  33. -- Database: `dev_monsterg_poskita`
  34. --
  35.  
  36. -- --------------------------------------------------------
  37.  
  38. --
  39. -- Table structure for table `accounts`
  40. --
  41.  
  42. CREATE TABLE `accounts` (
  43. `id` int(10) UNSIGNED NOT NULL,
  44. `business_id` int(11) NOT NULL,
  45. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  46. `account_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  47. `account_type_id` int(11) DEFAULT NULL,
  48. `note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  49. `created_by` int(11) NOT NULL,
  50. `is_closed` tinyint(1) NOT NULL DEFAULT 0,
  51. `deleted_at` timestamp NULL DEFAULT NULL,
  52. `created_at` timestamp NULL DEFAULT NULL,
  53. `updated_at` timestamp NULL DEFAULT NULL
  54. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  55.  
  56. -- --------------------------------------------------------
  57.  
  58. --
  59. -- Table structure for table `account_transactions`
  60. --
  61.  
  62. CREATE TABLE `account_transactions` (
  63. `id` int(10) UNSIGNED NOT NULL,
  64. `account_id` int(11) NOT NULL,
  65. `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,
  66. `sub_type` enum('opening_balance','fund_transfer','deposit') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  67. `amount` decimal(22,4) NOT NULL,
  68. `reff_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  69. `operation_date` datetime NOT NULL,
  70. `created_by` int(11) NOT NULL,
  71. `transaction_id` int(11) DEFAULT NULL,
  72. `transaction_payment_id` int(11) DEFAULT NULL,
  73. `transfer_transaction_id` int(11) DEFAULT NULL,
  74. `note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  75. `deleted_at` timestamp NULL DEFAULT NULL,
  76. `created_at` timestamp NULL DEFAULT NULL,
  77. `updated_at` timestamp NULL DEFAULT NULL
  78. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  79.  
  80. -- --------------------------------------------------------
  81.  
  82. --
  83. -- Table structure for table `account_types`
  84. --
  85.  
  86. CREATE TABLE `account_types` (
  87. `id` int(10) UNSIGNED NOT NULL,
  88. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  89. `parent_account_type_id` int(11) DEFAULT NULL,
  90. `business_id` int(11) NOT NULL,
  91. `created_at` timestamp NULL DEFAULT NULL,
  92. `updated_at` timestamp NULL DEFAULT NULL
  93. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  94.  
  95. -- --------------------------------------------------------
  96.  
  97. --
  98. -- Table structure for table `activity_log`
  99. --
  100.  
  101. CREATE TABLE `activity_log` (
  102. `id` int(10) UNSIGNED NOT NULL,
  103. `log_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  104. `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  105. `subject_id` int(11) DEFAULT NULL,
  106. `subject_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  107. `causer_id` int(11) DEFAULT NULL,
  108. `causer_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  109. `properties` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  110. `created_at` timestamp NULL DEFAULT NULL,
  111. `updated_at` timestamp NULL DEFAULT NULL
  112. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  113.  
  114. --
  115. -- Dumping data for table `activity_log`
  116. --
  117.  
  118. INSERT INTO `activity_log` (`id`, `log_name`, `description`, `subject_id`, `subject_type`, `causer_id`, `causer_type`, `properties`, `created_at`, `updated_at`) VALUES
  119. (1, 'default', 'edited', 41, 'App\\Transaction', 1, 'App\\User', '[]', '2020-03-04 04:13:34', '2020-03-04 04:13:34'),
  120. (2, 'default', 'edited', 46, 'App\\Transaction', 1, 'App\\User', '[]', '2020-03-04 06:58:06', '2020-03-04 06:58:06'),
  121. (3, 'default', 'edited', 50, 'App\\Transaction', 1, 'App\\User', '[]', '2020-03-04 07:34:30', '2020-03-04 07:34:30');
  122.  
  123. -- --------------------------------------------------------
  124.  
  125. --
  126. -- Table structure for table `barcodes`
  127. --
  128.  
  129. CREATE TABLE `barcodes` (
  130. `id` int(10) UNSIGNED NOT NULL,
  131. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  132. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  133. `width` double(22,4) DEFAULT NULL,
  134. `height` double(22,4) DEFAULT NULL,
  135. `paper_width` double(22,4) DEFAULT NULL,
  136. `paper_height` double(22,4) DEFAULT NULL,
  137. `top_margin` double(22,4) DEFAULT NULL,
  138. `left_margin` double(22,4) DEFAULT NULL,
  139. `row_distance` double(22,4) DEFAULT NULL,
  140. `col_distance` double(22,4) DEFAULT NULL,
  141. `stickers_in_one_row` int(11) DEFAULT NULL,
  142. `is_default` tinyint(1) NOT NULL DEFAULT 0,
  143. `is_continuous` tinyint(1) NOT NULL DEFAULT 0,
  144. `stickers_in_one_sheet` int(11) DEFAULT NULL,
  145. `business_id` int(10) UNSIGNED DEFAULT NULL,
  146. `created_at` timestamp NULL DEFAULT NULL,
  147. `updated_at` timestamp NULL DEFAULT NULL
  148. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  149.  
  150. --
  151. -- Dumping data for table `barcodes`
  152. --
  153.  
  154. INSERT INTO `barcodes` (`id`, `name`, `description`, `width`, `height`, `paper_width`, `paper_height`, `top_margin`, `left_margin`, `row_distance`, `col_distance`, `stickers_in_one_row`, `is_default`, `is_continuous`, `stickers_in_one_sheet`, `business_id`, `created_at`, `updated_at`) VALUES
  155. (1, '20 Labels per Sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 4\" x 1\"\\r\\nLabels per sheet: 20', 3.7500, 1.0000, 8.5000, 11.0000, 0.5000, 0.5000, 0.0000, 0.1562, 2, 0, 0, 20, NULL, '2017-12-17 23:13:44', '2017-12-17 23:13:44'),
  156. (2, '30 Labels per sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 2.625\" x 1\"\\r\\nLabels per sheet: 30', 2.6250, 1.0000, 8.5000, 11.0000, 0.5000, 0.2198, 0.0000, 0.1400, 3, 0, 0, 30, NULL, '2017-12-17 23:04:39', '2017-12-17 23:10:40'),
  157. (3, '32 Labels per sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 2\" x 1.25\"\\r\\nLabels per sheet: 32', 2.0000, 1.2500, 8.5000, 11.0000, 0.5000, 0.2500, 0.0000, 0.0000, 4, 0, 0, 32, NULL, '2017-12-17 22:55:40', '2017-12-17 22:55:40'),
  158. (4, '40 Labels per sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 2\" x 1\"\\r\\nLabels per sheet: 40', 2.0000, 1.0000, 8.5000, 11.0000, 0.5000, 0.2500, 0.0000, 0.0000, 4, 0, 0, 40, NULL, '2017-12-17 22:58:40', '2017-12-17 22:58:40'),
  159. (5, '50 Labels per Sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 1.5\" x 1\"\\r\\nLabels per sheet: 50', 1.5000, 1.0000, 8.5000, 11.0000, 0.5000, 0.5000, 0.0000, 0.0000, 5, 0, 0, 50, NULL, '2017-12-17 22:51:10', '2017-12-17 22:51:10'),
  160. (6, 'Continuous Rolls - 31.75mm x 25.4mm', 'Label Size: 31.75mm x 25.4mm\\r\\nGap: 3.18mm', 1.2500, 1.0000, 1.2500, 0.0000, 0.1250, 0.0000, 0.1250, 0.0000, 1, 0, 1, NULL, NULL, '2017-12-17 22:51:10', '2017-12-17 22:51:10');
  161.  
  162. -- --------------------------------------------------------
  163.  
  164. --
  165. -- Table structure for table `belidetail`
  166. --
  167.  
  168. CREATE TABLE `belidetail` (
  169. `id` int(11) NOT NULL,
  170. `nomor` varchar(100) NOT NULL,
  171. `mobile_id` varchar(50) NOT NULL,
  172. `qty` int(11) NOT NULL,
  173. `price` int(11) NOT NULL
  174. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  175.  
  176. --
  177. -- Dumping data for table `belidetail`
  178. --
  179.  
  180. INSERT INTO `belidetail` (`id`, `nomor`, `mobile_id`, `qty`, `price`) VALUES
  181. (1, '0001', '2', 2, 2000);
  182.  
  183. -- --------------------------------------------------------
  184.  
  185. --
  186. -- Table structure for table `belimaster`
  187. --
  188.  
  189. CREATE TABLE `belimaster` (
  190. `id` int(11) NOT NULL,
  191. `nomor` varchar(50) NOT NULL,
  192. `supplier_id` varchar(50) NOT NULL,
  193. `ref_no` varchar(50) NOT NULL,
  194. `total_pay` int(11) NOT NULL,
  195. `total_price` int(11) NOT NULL
  196. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  197.  
  198. --
  199. -- Dumping data for table `belimaster`
  200. --
  201.  
  202. INSERT INTO `belimaster` (`id`, `nomor`, `supplier_id`, `ref_no`, `total_pay`, `total_price`) VALUES
  203. (1, '00001', '1', '3', 9000, 8000);
  204.  
  205. -- --------------------------------------------------------
  206.  
  207. --
  208. -- Table structure for table `bookings`
  209. --
  210.  
  211. CREATE TABLE `bookings` (
  212. `id` int(10) UNSIGNED NOT NULL,
  213. `contact_id` int(10) UNSIGNED NOT NULL,
  214. `waiter_id` int(10) UNSIGNED DEFAULT NULL,
  215. `table_id` int(10) UNSIGNED DEFAULT NULL,
  216. `correspondent_id` int(11) DEFAULT NULL,
  217. `business_id` int(10) UNSIGNED NOT NULL,
  218. `location_id` int(10) UNSIGNED NOT NULL,
  219. `booking_start` datetime NOT NULL,
  220. `booking_end` datetime NOT NULL,
  221. `created_by` int(10) UNSIGNED NOT NULL,
  222. `booking_status` enum('booked','completed','cancelled') COLLATE utf8mb4_unicode_ci NOT NULL,
  223. `booking_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  224. `created_at` timestamp NULL DEFAULT NULL,
  225. `updated_at` timestamp NULL DEFAULT NULL
  226. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  227.  
  228. -- --------------------------------------------------------
  229.  
  230. --
  231. -- Table structure for table `brands`
  232. --
  233.  
  234. CREATE TABLE `brands` (
  235. `id` int(10) UNSIGNED NOT NULL,
  236. `business_id` int(10) UNSIGNED NOT NULL,
  237. `mobile_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  238. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  239. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  240. `created_by` int(10) UNSIGNED NOT NULL,
  241. `deleted_at` timestamp NULL DEFAULT NULL,
  242. `created_at` timestamp NULL DEFAULT NULL,
  243. `updated_at` timestamp NULL DEFAULT NULL
  244. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  245.  
  246. --
  247. -- Dumping data for table `brands`
  248. --
  249.  
  250. INSERT INTO `brands` (`id`, `business_id`, `mobile_id`, `name`, `description`, `created_by`, `deleted_at`, `created_at`, `updated_at`) VALUES
  251. (3, 1, '1111', 'Sik', '4', 1, NULL, NULL, NULL),
  252. (4, 1, '1111', 'Sik', '4', 1, NULL, NULL, NULL);
  253.  
  254. -- --------------------------------------------------------
  255.  
  256. --
  257. -- Table structure for table `business`
  258. --
  259.  
  260. CREATE TABLE `business` (
  261. `id` int(10) UNSIGNED NOT NULL,
  262. `business_code` int(6) UNSIGNED ZEROFILL NOT NULL,
  263. `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  264. `currency_id` int(10) UNSIGNED NOT NULL,
  265. `start_date` date DEFAULT NULL,
  266. `tax_number_1` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  267. `tax_label_1` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  268. `tax_number_2` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  269. `tax_label_2` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  270. `default_sales_tax` int(10) UNSIGNED DEFAULT NULL,
  271. `default_profit_percent` double(5,2) NOT NULL DEFAULT 0.00,
  272. `owner_id` int(10) UNSIGNED NOT NULL,
  273. `time_zone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Asia/Kolkata',
  274. `fy_start_month` tinyint(4) NOT NULL DEFAULT 1,
  275. `accounting_method` enum('fifo','lifo','avco') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fifo',
  276. `default_sales_discount` decimal(5,2) DEFAULT NULL,
  277. `sell_price_tax` enum('includes','excludes') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'includes',
  278. `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  279. `sku_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  280. `enable_product_expiry` tinyint(1) NOT NULL DEFAULT 0,
  281. `expiry_type` enum('add_expiry','add_manufacturing') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'add_expiry',
  282. `on_product_expiry` enum('keep_selling','stop_selling','auto_delete') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'keep_selling',
  283. `stop_selling_before` int(11) NOT NULL COMMENT 'Stop selling expied item n days before expiry',
  284. `enable_tooltip` tinyint(1) NOT NULL DEFAULT 1,
  285. `purchase_in_diff_currency` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Allow purchase to be in different currency then the business currency',
  286. `purchase_currency_id` int(10) UNSIGNED DEFAULT NULL,
  287. `p_exchange_rate` decimal(20,3) NOT NULL DEFAULT 1.000,
  288. `transaction_edit_days` int(10) UNSIGNED NOT NULL DEFAULT 30,
  289. `stock_expiry_alert_days` int(10) UNSIGNED NOT NULL DEFAULT 30,
  290. `keyboard_shortcuts` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  291. `pos_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  292. `enable_brand` tinyint(1) NOT NULL DEFAULT 1,
  293. `enable_category` tinyint(1) NOT NULL DEFAULT 1,
  294. `enable_sub_category` tinyint(1) NOT NULL DEFAULT 1,
  295. `enable_price_tax` tinyint(1) NOT NULL DEFAULT 1,
  296. `enable_purchase_status` tinyint(1) DEFAULT 1,
  297. `enable_lot_number` tinyint(1) NOT NULL DEFAULT 0,
  298. `default_unit` int(11) DEFAULT NULL,
  299. `enable_sub_units` tinyint(1) NOT NULL DEFAULT 0,
  300. `enable_racks` tinyint(1) NOT NULL DEFAULT 0,
  301. `enable_row` tinyint(1) NOT NULL DEFAULT 0,
  302. `enable_position` tinyint(1) NOT NULL DEFAULT 0,
  303. `enable_editing_product_from_purchase` tinyint(1) NOT NULL DEFAULT 1,
  304. `sales_cmsn_agnt` enum('logged_in_user','user','cmsn_agnt') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  305. `item_addition_method` tinyint(1) NOT NULL DEFAULT 1,
  306. `enable_inline_tax` tinyint(1) NOT NULL DEFAULT 1,
  307. `currency_symbol_placement` enum('before','after') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'before',
  308. `enabled_modules` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  309. `date_format` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'm/d/Y',
  310. `time_format` enum('12','24') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '24',
  311. `ref_no_prefixes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  312. `theme_color` char(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  313. `created_by` int(11) DEFAULT NULL,
  314. `enable_rp` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  315. `rp_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'rp is the short form of reward points',
  316. `amount_for_unit_rp` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  317. `min_order_total_for_rp` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  318. `max_rp_per_order` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  319. `redeem_amount_per_unit_rp` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  320. `min_order_total_for_redeem` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  321. `min_redeem_point` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  322. `max_redeem_point` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  323. `rp_expiry_period` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  324. `rp_expiry_type` enum('month','year') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'year' COMMENT 'rp is the short form of reward points',
  325. `email_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  326. `sms_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  327. `custom_labels` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  328. `common_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  329. `is_active` tinyint(1) NOT NULL DEFAULT 1,
  330. `created_at` timestamp NULL DEFAULT NULL,
  331. `updated_at` timestamp NULL DEFAULT NULL
  332. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  333.  
  334. --
  335. -- Dumping data for table `business`
  336. --
  337.  
  338. INSERT INTO `business` (`id`, `business_code`, `name`, `currency_id`, `start_date`, `tax_number_1`, `tax_label_1`, `tax_number_2`, `tax_label_2`, `default_sales_tax`, `default_profit_percent`, `owner_id`, `time_zone`, `fy_start_month`, `accounting_method`, `default_sales_discount`, `sell_price_tax`, `logo`, `sku_prefix`, `enable_product_expiry`, `expiry_type`, `on_product_expiry`, `stop_selling_before`, `enable_tooltip`, `purchase_in_diff_currency`, `purchase_currency_id`, `p_exchange_rate`, `transaction_edit_days`, `stock_expiry_alert_days`, `keyboard_shortcuts`, `pos_settings`, `enable_brand`, `enable_category`, `enable_sub_category`, `enable_price_tax`, `enable_purchase_status`, `enable_lot_number`, `default_unit`, `enable_sub_units`, `enable_racks`, `enable_row`, `enable_position`, `enable_editing_product_from_purchase`, `sales_cmsn_agnt`, `item_addition_method`, `enable_inline_tax`, `currency_symbol_placement`, `enabled_modules`, `date_format`, `time_format`, `ref_no_prefixes`, `theme_color`, `created_by`, `enable_rp`, `rp_name`, `amount_for_unit_rp`, `min_order_total_for_rp`, `max_rp_per_order`, `redeem_amount_per_unit_rp`, `min_order_total_for_redeem`, `min_redeem_point`, `max_redeem_point`, `rp_expiry_period`, `rp_expiry_type`, `email_settings`, `sms_settings`, `custom_labels`, `common_settings`, `is_active`, `created_at`, `updated_at`) VALUES
  339. (1, 000001, 'POS Kita', 54, '2020-01-01', NULL, NULL, NULL, NULL, NULL, 25.00, 1, 'Asia/Jakarta', 1, 'fifo', '0.00', 'includes', '1578557733_posKITA.png', NULL, 0, 'add_expiry', 'keep_selling', 0, 1, 0, NULL, '1.000', 30, 30, '{\"pos\":{\"express_checkout\":\"shift+e\",\"pay_n_ckeckout\":\"shift+p\",\"draft\":\"shift+d\",\"cancel\":\"shift+c\",\"recent_product_quantity\":\"f2\",\"edit_discount\":\"shift+i\",\"edit_order_tax\":\"shift+t\",\"add_payment_row\":\"shift+r\",\"finalize_payment\":\"shift+f\",\"add_new_product\":\"f4\"}}', '{\"disable_pay_checkout\":0,\"disable_draft\":0,\"disable_express_checkout\":0,\"hide_product_suggestion\":0,\"hide_recent_trans\":0,\"disable_discount\":0,\"disable_order_tax\":0,\"is_pos_subtotal_editable\":0}', 1, 1, 1, 1, 1, 0, NULL, 0, 0, 0, 0, 1, NULL, 1, 0, 'before', NULL, 'm/d/Y', '24', '{\"purchase\":\"PO\",\"purchase_return\":null,\"stock_transfer\":\"ST\",\"stock_adjustment\":\"SA\",\"sell_return\":\"CN\",\"expense\":\"EP\",\"contacts\":\"CO\",\"purchase_payment\":\"PP\",\"sell_payment\":\"SP\",\"expense_payment\":null,\"business_location\":\"BL\",\"username\":null,\"subscription\":null}', NULL, NULL, 0, NULL, '1.0000', '1.0000', NULL, '1.0000', '1.0000', NULL, NULL, NULL, 'year', '{\"mail_driver\":\"smtp\",\"mail_host\":null,\"mail_port\":null,\"mail_username\":null,\"mail_password\":null,\"mail_encryption\":null,\"mail_from_address\":null,\"mail_from_name\":null}', '{\"url\":null,\"send_to_param_name\":\"to\",\"msg_param_name\":\"text\",\"request_method\":\"post\",\"param_1\":null,\"param_val_1\":null,\"param_2\":null,\"param_val_2\":null,\"param_3\":null,\"param_val_3\":null,\"param_4\":null,\"param_val_4\":null,\"param_5\":null,\"param_val_5\":null,\"param_6\":null,\"param_val_6\":null,\"param_7\":null,\"param_val_7\":null,\"param_8\":null,\"param_val_8\":null,\"param_9\":null,\"param_val_9\":null,\"param_10\":null,\"param_val_10\":null}', '{\"payments\":{\"custom_pay_1\":null,\"custom_pay_2\":null,\"custom_pay_3\":null}}', '{\"default_datatable_page_entries\":\"25\"}', 1, '2020-01-09 06:45:33', '2020-03-31 07:19:46'),
  340. (2, 000002, 'Rumah UMKM Indonesia', 54, '2020-01-01', NULL, NULL, NULL, NULL, NULL, 5.00, 2, 'Asia/Jakarta', 1, 'fifo', '0.00', 'includes', NULL, NULL, 0, 'add_expiry', 'stop_selling', 0, 1, 0, NULL, '1.000', 30, 30, '{\"pos\":{\"express_checkout\":\"shift+e\",\"pay_n_ckeckout\":\"shift+p\",\"draft\":\"shift+d\",\"cancel\":\"shift+c\",\"recent_product_quantity\":\"f2\",\"edit_discount\":\"shift+i\",\"edit_order_tax\":\"shift+t\",\"add_payment_row\":\"shift+r\",\"finalize_payment\":\"shift+f\",\"add_new_product\":\"f4\"}}', '{\"enable_msp\":\"1\",\"disable_pay_checkout\":\"1\",\"disable_draft\":\"1\",\"disable_discount\":\"1\",\"disable_order_tax\":\"1\",\"is_pos_subtotal_editable\":\"1\",\"disable_suspend\":\"1\",\"disable_express_checkout\":0,\"hide_product_suggestion\":0,\"hide_recent_trans\":0}', 1, 1, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, NULL, 1, 1, 'before', '[\"account\"]', 'm/d/Y', '24', '{\"purchase\":\"PO\",\"purchase_return\":null,\"stock_transfer\":\"ST\",\"stock_adjustment\":\"SA\",\"sell_return\":\"CN\",\"expense\":\"EP\",\"contacts\":\"CO\",\"purchase_payment\":\"PP\",\"sell_payment\":\"SP\",\"expense_payment\":null,\"business_location\":\"BL\",\"username\":null,\"subscription\":null}', 'purple-light', NULL, 0, NULL, '1.0000', '1.0000', NULL, '1.0000', '1.0000', NULL, NULL, NULL, 'year', '{\"mail_driver\":\"smtp\",\"mail_host\":null,\"mail_port\":null,\"mail_username\":null,\"mail_password\":null,\"mail_encryption\":null,\"mail_from_address\":null,\"mail_from_name\":null}', '{\"url\":null,\"send_to_param_name\":\"to\",\"msg_param_name\":\"text\",\"request_method\":\"post\",\"param_1\":null,\"param_val_1\":null,\"param_2\":null,\"param_val_2\":null,\"param_3\":null,\"param_val_3\":null,\"param_4\":null,\"param_val_4\":null,\"param_5\":null,\"param_val_5\":null,\"param_6\":null,\"param_val_6\":null,\"param_7\":null,\"param_val_7\":null,\"param_8\":null,\"param_val_8\":null,\"param_9\":null,\"param_val_9\":null,\"param_10\":null,\"param_val_10\":null}', '{\"payments\":{\"custom_pay_1\":null,\"custom_pay_2\":null,\"custom_pay_3\":null}}', '{\"default_datatable_page_entries\":\"25\"}', 1, '2020-01-10 09:32:53', '2020-02-03 04:59:40'),
  341. (3, 000003, 'PT. RITEL TEAM', 54, '2020-02-03', NULL, NULL, NULL, NULL, NULL, 10.00, 4, 'Asia/Jakarta', 1, 'fifo', '0.00', 'includes', '1580713578_Logo-Ritelteam-Small.png', 'SKM', 1, 'add_expiry', 'stop_selling', 1, 1, 0, NULL, '1.000', 30, 30, '{\"pos\":{\"express_checkout\":\"shift+e\",\"pay_n_ckeckout\":\"shift+p\",\"draft\":\"shift+d\",\"cancel\":\"shift+c\",\"recent_product_quantity\":\"f2\",\"edit_discount\":\"shift+i\",\"edit_order_tax\":\"shift+t\",\"add_payment_row\":\"shift+r\",\"finalize_payment\":\"shift+f\",\"add_new_product\":\"f4\"}}', '{\"allow_overselling\":\"1\",\"disable_discount\":\"1\",\"disable_order_tax\":\"1\",\"disable_suspend\":\"1\",\"enable_transaction_date\":\"1\",\"disable_pay_checkout\":0,\"disable_draft\":0,\"disable_express_checkout\":0,\"hide_product_suggestion\":0,\"hide_recent_trans\":0,\"is_pos_subtotal_editable\":0}', 1, 1, 0, 1, 0, 0, NULL, 0, 1, 0, 0, 1, 'user', 1, 0, 'before', '[\"service_staff\"]', 'm/d/Y', '24', '{\"purchase\":\"PO\",\"purchase_return\":null,\"stock_transfer\":\"ST\",\"stock_adjustment\":\"SA\",\"sell_return\":\"CN\",\"expense\":\"EP\",\"contacts\":\"CO\",\"purchase_payment\":\"PP\",\"sell_payment\":\"SP\",\"expense_payment\":null,\"business_location\":\"BL\",\"username\":null,\"subscription\":null}', 'purple', NULL, 0, NULL, '1.0000', '1.0000', NULL, '1.0000', '1.0000', NULL, NULL, NULL, 'year', '{\"mail_driver\":\"smtp\",\"mail_host\":null,\"mail_port\":null,\"mail_username\":null,\"mail_password\":null,\"mail_encryption\":null,\"mail_from_address\":null,\"mail_from_name\":null}', '{\"url\":null,\"send_to_param_name\":\"to\",\"msg_param_name\":\"text\",\"request_method\":\"post\",\"param_1\":null,\"param_val_1\":null,\"param_2\":null,\"param_val_2\":null,\"param_3\":null,\"param_val_3\":null,\"param_4\":null,\"param_val_4\":null,\"param_5\":null,\"param_val_5\":null,\"param_6\":null,\"param_val_6\":null,\"param_7\":null,\"param_val_7\":null,\"param_8\":null,\"param_val_8\":null,\"param_9\":null,\"param_val_9\":null,\"param_10\":null,\"param_val_10\":null}', '{\"payments\":{\"custom_pay_1\":null,\"custom_pay_2\":null,\"custom_pay_3\":null}}', '{\"default_datatable_page_entries\":\"25\"}', 1, '2020-02-03 05:36:19', '2020-02-13 04:53:06'),
  342. (4, 000004, 'Dapur Watu Leter', 54, '1970-01-01', NULL, NULL, NULL, NULL, NULL, 25.00, 8, 'Asia/Kolkata', 1, 'fifo', '0.00', 'includes', NULL, NULL, 0, 'add_expiry', 'keep_selling', 0, 1, 0, NULL, '1.000', 30, 30, '{\"pos\":{\"express_checkout\":\"shift+e\",\"pay_n_ckeckout\":\"shift+p\",\"draft\":\"shift+d\",\"cancel\":\"shift+c\",\"recent_product_quantity\":\"f2\",\"edit_discount\":\"shift+i\",\"edit_order_tax\":\"shift+t\",\"add_payment_row\":\"shift+r\",\"finalize_payment\":\"shift+f\",\"add_new_product\":\"f4\"}}', '{\"disable_draft\":\"1\",\"hide_product_suggestion\":\"1\",\"hide_recent_trans\":\"1\",\"disable_discount\":\"1\",\"disable_order_tax\":\"1\",\"disable_suspend\":\"1\",\"disable_pay_checkout\":0,\"disable_express_checkout\":0,\"is_pos_subtotal_editable\":0}', 1, 1, 0, 1, 1, 0, 5, 0, 0, 0, 0, 1, NULL, 1, 0, 'before', NULL, 'm/d/Y', '24', '{\"purchase\":\"PO\",\"purchase_return\":null,\"stock_transfer\":\"ST\",\"stock_adjustment\":\"SA\",\"sell_return\":\"CN\",\"expense\":\"EP\",\"contacts\":\"CO\",\"purchase_payment\":\"PP\",\"sell_payment\":\"SP\",\"expense_payment\":null,\"business_location\":\"BL\",\"username\":null,\"subscription\":null}', NULL, NULL, 0, NULL, '1.0000', '1.0000', NULL, '1.0000', '1.0000', NULL, NULL, NULL, 'year', '{\"mail_driver\":\"smtp\",\"mail_host\":null,\"mail_port\":null,\"mail_username\":null,\"mail_password\":null,\"mail_encryption\":null,\"mail_from_address\":null,\"mail_from_name\":null}', '{\"url\":null,\"send_to_param_name\":\"to\",\"msg_param_name\":\"text\",\"request_method\":\"post\",\"param_1\":null,\"param_val_1\":null,\"param_2\":null,\"param_val_2\":null,\"param_3\":null,\"param_val_3\":null,\"param_4\":null,\"param_val_4\":null,\"param_5\":null,\"param_val_5\":null,\"param_6\":null,\"param_val_6\":null,\"param_7\":null,\"param_val_7\":null,\"param_8\":null,\"param_val_8\":null,\"param_9\":null,\"param_val_9\":null,\"param_10\":null,\"param_val_10\":null}', '{\"payments\":{\"custom_pay_1\":null,\"custom_pay_2\":null,\"custom_pay_3\":null}}', '{\"default_datatable_page_entries\":\"25\"}', 1, '2020-02-17 07:49:19', '2020-02-17 08:45:02');
  343.  
  344. -- --------------------------------------------------------
  345.  
  346. --
  347. -- Table structure for table `business_locations`
  348. --
  349.  
  350. CREATE TABLE `business_locations` (
  351. `id` int(10) UNSIGNED NOT NULL,
  352. `business_id` int(10) UNSIGNED NOT NULL,
  353. `location_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  354. `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  355. `landmark` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  356. `country` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  357. `state` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  358. `city` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  359. `zip_code` char(7) COLLATE utf8mb4_unicode_ci NOT NULL,
  360. `invoice_scheme_id` int(10) UNSIGNED NOT NULL,
  361. `invoice_layout_id` int(10) UNSIGNED NOT NULL,
  362. `selling_price_group_id` int(11) DEFAULT NULL,
  363. `print_receipt_on_invoice` tinyint(1) DEFAULT 1,
  364. `receipt_printer_type` enum('browser','printer') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'browser',
  365. `printer_id` int(11) DEFAULT NULL,
  366. `mobile` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  367. `alternate_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  368. `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  369. `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  370. `default_payment_accounts` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  371. `is_active` tinyint(1) NOT NULL DEFAULT 1,
  372. `custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  373. `custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  374. `custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  375. `custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  376. `deleted_at` timestamp NULL DEFAULT NULL,
  377. `created_at` timestamp NULL DEFAULT NULL,
  378. `updated_at` timestamp NULL DEFAULT NULL
  379. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  380.  
  381. --
  382. -- Dumping data for table `business_locations`
  383. --
  384.  
  385. INSERT INTO `business_locations` (`id`, `business_id`, `location_id`, `name`, `landmark`, `country`, `state`, `city`, `zip_code`, `invoice_scheme_id`, `invoice_layout_id`, `selling_price_group_id`, `print_receipt_on_invoice`, `receipt_printer_type`, `printer_id`, `mobile`, `alternate_number`, `email`, `website`, `default_payment_accounts`, `is_active`, `custom_field1`, `custom_field2`, `custom_field3`, `custom_field4`, `deleted_at`, `created_at`, `updated_at`) VALUES
  386. (1, 1, 'BL0001', 'POS Kita', 'Jakarta', 'Indonesia', 'Jakarta', 'Jakarta', '11530', 1, 1, NULL, 1, 'browser', NULL, '081111111', '081111111', NULL, 'http://poskita.kitadigi.com', '{\"cash\":{\"is_enabled\":\"1\"},\"card\":{\"is_enabled\":\"1\"},\"cheque\":{\"is_enabled\":\"1\"},\"bank_transfer\":{\"is_enabled\":\"1\"},\"other\":{\"is_enabled\":\"1\"},\"custom_pay_1\":{\"is_enabled\":\"1\"},\"custom_pay_2\":{\"is_enabled\":\"1\"},\"custom_pay_3\":{\"is_enabled\":\"1\"}}', 1, NULL, NULL, NULL, NULL, NULL, '2020-01-09 06:45:33', '2020-03-09 03:12:45'),
  387. (2, 2, 'BL0001', 'Rumah UMKM Indonesia', 'Jakarta', 'Indonesia', 'Indonesia', 'Jakarta', '11530', 2, 2, NULL, 1, 'browser', NULL, '08110880', '08110880', '', 'rumahumkmindonesia', NULL, 1, NULL, NULL, NULL, NULL, NULL, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  388. (3, 3, 'BL0001', 'PT. RITEL TEAM', 'Jl. Petung No.3, Demangan Baru, Caturtunggal, Kec. Depok, Kabupaten Sleman, Daerah Istimewa Yogyakarta', 'Indonesi', 'Indonesia', 'Yogyakarta', '55281', 3, 3, NULL, 1, 'browser', NULL, '0274 560 979', '0811 231 331', '', 'https://ritelteamindonesia.co.id/', NULL, 1, NULL, NULL, NULL, NULL, NULL, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  389. (4, 4, 'BL0001', 'Dapur Watu Leter', 'Butuh 17, 7, Sidorejo, Kemalang, Kabupaten Klaten, Jawa Tengah', 'Indonesia', 'Indonesia', 'Klaten', '57484', 4, 4, NULL, 1, 'browser', NULL, '', '', '', '', NULL, 1, NULL, NULL, NULL, NULL, NULL, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  390. (5, 1, 'BL0002', 'POS Kita 2', 'Jawa Barat', 'Indonesia', 'Jawa Barat', 'Bekasi', '17153', 1, 1, NULL, 1, 'browser', NULL, '085693086800', NULL, '[email protected]', 'dikhimartin.com', '{\"cash\":{\"is_enabled\":\"1\"},\"card\":{\"is_enabled\":\"1\"},\"cheque\":{\"is_enabled\":\"1\"},\"bank_transfer\":{\"is_enabled\":\"1\"},\"other\":{\"is_enabled\":\"1\"},\"custom_pay_1\":{\"is_enabled\":\"1\"},\"custom_pay_2\":{\"is_enabled\":\"1\"},\"custom_pay_3\":{\"is_enabled\":\"1\"}}', 1, NULL, NULL, NULL, NULL, NULL, '2020-03-05 07:24:24', '2020-03-05 07:24:24');
  391.  
  392. -- --------------------------------------------------------
  393.  
  394. --
  395. -- Table structure for table `cash_registers`
  396. --
  397.  
  398. CREATE TABLE `cash_registers` (
  399. `id` int(10) UNSIGNED NOT NULL,
  400. `business_id` int(10) UNSIGNED NOT NULL,
  401. `location_id` int(11) DEFAULT NULL,
  402. `user_id` int(10) UNSIGNED DEFAULT NULL,
  403. `status` enum('close','open') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',
  404. `closed_at` datetime DEFAULT NULL,
  405. `closing_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  406. `total_card_slips` int(11) NOT NULL DEFAULT 0,
  407. `total_cheques` int(11) NOT NULL DEFAULT 0,
  408. `closing_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  409. `created_at` timestamp NULL DEFAULT NULL,
  410. `updated_at` timestamp NULL DEFAULT NULL
  411. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  412.  
  413. -- --------------------------------------------------------
  414.  
  415. --
  416. -- Table structure for table `cash_register_transactions`
  417. --
  418.  
  419. CREATE TABLE `cash_register_transactions` (
  420. `id` int(10) UNSIGNED NOT NULL,
  421. `cash_register_id` int(10) UNSIGNED NOT NULL,
  422. `amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  423. `pay_method` enum('cash','card','cheque','bank_transfer','custom_pay_1','custom_pay_2','custom_pay_3','other') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  424. `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,
  425. `transaction_type` enum('initial','sell','transfer','refund') COLLATE utf8mb4_unicode_ci NOT NULL,
  426. `transaction_id` int(11) DEFAULT NULL,
  427. `created_at` timestamp NULL DEFAULT NULL,
  428. `updated_at` timestamp NULL DEFAULT NULL
  429. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  430.  
  431. -- --------------------------------------------------------
  432.  
  433. --
  434. -- Table structure for table `categories`
  435. --
  436.  
  437. CREATE TABLE `categories` (
  438. `id` int(10) UNSIGNED NOT NULL,
  439. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  440. `business_id` int(10) UNSIGNED NOT NULL,
  441. `mobile_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  442. `short_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  443. `parent_id` int(11) NOT NULL,
  444. `created_by` int(10) UNSIGNED NOT NULL,
  445. `deleted_at` timestamp NULL DEFAULT NULL,
  446. `created_at` timestamp NULL DEFAULT NULL,
  447. `updated_at` timestamp NULL DEFAULT NULL
  448. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  449.  
  450. -- --------------------------------------------------------
  451.  
  452. --
  453. -- Table structure for table `contacts`
  454. --
  455.  
  456. CREATE TABLE `contacts` (
  457. `id` int(10) UNSIGNED NOT NULL,
  458. `business_id` int(10) UNSIGNED NOT NULL,
  459. `type` enum('supplier','customer','both') COLLATE utf8mb4_unicode_ci NOT NULL,
  460. `supplier_business_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  461. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  462. `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  463. `contact_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  464. `tax_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  465. `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  466. `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  467. `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  468. `landmark` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  469. `mobile` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  470. `landline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  471. `alternate_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  472. `pay_term_number` int(11) DEFAULT NULL,
  473. `pay_term_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  474. `credit_limit` decimal(22,4) DEFAULT NULL,
  475. `created_by` int(10) UNSIGNED NOT NULL,
  476. `total_rp` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  477. `total_rp_used` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  478. `total_rp_expired` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  479. `is_default` tinyint(1) NOT NULL DEFAULT 0,
  480. `customer_group_id` int(11) DEFAULT NULL,
  481. `custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  482. `custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  483. `custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  484. `custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  485. `deleted_at` timestamp NULL DEFAULT NULL,
  486. `created_at` timestamp NULL DEFAULT NULL,
  487. `updated_at` timestamp NULL DEFAULT NULL
  488. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  489.  
  490. --
  491. -- Dumping data for table `contacts`
  492. --
  493.  
  494. INSERT INTO `contacts` (`id`, `business_id`, `type`, `supplier_business_name`, `name`, `email`, `contact_id`, `tax_number`, `city`, `state`, `country`, `landmark`, `mobile`, `landline`, `alternate_number`, `pay_term_number`, `pay_term_type`, `credit_limit`, `created_by`, `total_rp`, `total_rp_used`, `total_rp_expired`, `is_default`, `customer_group_id`, `custom_field1`, `custom_field2`, `custom_field3`, `custom_field4`, `deleted_at`, `created_at`, `updated_at`) VALUES
  495. (1, 1, 'customer', NULL, 'Walk-In Customer', '[email protected]', 'CO001', 'PJK001', 'Cikarang Timur', 'Jawa Barat', 'Indonesia', '', '085219378505', '085219378505', '085219378505', 1, 'months', '10000.0000', 1, 0, 0, 0, 1, 0, '', '', '', '', NULL, '2020-04-02 04:20:51', '2020-04-13 06:47:29'),
  496. (6, 1, 'customer', NULL, 'Pelanggan 2', '[email protected]', 'C002', 'PJK002', 'Cikarang Timur', 'Jawa Barat', 'Indonesia', '', '085219378505', '', '', 1, 'months', '20000.0000', 1, 0, 0, 0, 0, 0, '', '', '', '', NULL, '2020-04-02 04:21:32', '2020-04-02 07:05:21'),
  497. (7, 1, 'customer', NULL, 'Pelanggan 3', '[email protected]', 'C003', 'PJK003', 'Bekasi', 'Jawa Barat', 'Indonesia', '', '081310844956', '', '', 30, 'days', '30000.0000', 1, 0, 0, 0, 0, 4, '', '', '', '', NULL, '2020-04-02 04:22:01', '2020-04-02 08:16:29'),
  498. (8, 1, 'customer', NULL, 'Pelanggan 4', '[email protected]', 'C004', 'PJK004', 'Bekasi', 'Jawa Barat', 'Indonesia', '', '081310844956', '', '', 1, 'months', '10000.0000', 1, 0, 0, 0, 0, 4, '', '', '', '', NULL, '2020-04-02 04:22:34', '2020-04-02 04:22:34'),
  499. (9, 1, 'customer', NULL, 'Pelanggan 5', '[email protected]', 'C005', 'PHJ005', 'Bekasi', 'Jawa Barat', 'Indonesia', '', '081310844956', '', '', 12, 'days', '20000.0000', 1, 0, 0, 0, 0, 4, '', '', '', '', NULL, '2020-04-02 04:23:06', '2020-04-02 09:29:07'),
  500. (19, 1, 'customer', NULL, 'Pelanggan 6', '[email protected]', 'C006', 'PJK006', 'Bekasi', 'Jawa Barat', 'Indonesia', '', '085693086800', '', '', 10, 'days', '20000.0000', 1, 0, 0, 0, 0, 4, 'Custom Field 1', 'Custom Field 2', 'Custom Field 3', 'Custom Field 4', NULL, '2020-04-02 06:50:04', '2020-04-02 09:39:52'),
  501. (20, 1, 'customer', NULL, 'Pelanggan 7', '[email protected]', 'C007', 'PJK007', 'Cikarang Timur', 'Jawa Barat', 'Indonesia', '', '085219378505', '', '', 0, '', '5000.0000', 1, 0, 0, 0, 0, 0, '', '', '', '', NULL, '2020-04-02 06:51:27', '2020-04-02 07:00:20'),
  502. (22, 1, 'customer', NULL, 'Pelanggan 8', '[email protected]', 'C008', 'PJK008', 'Cikarang Timur', 'Jawa Barat', 'Indonesia', '', '085219378505', '', '', 0, 'days', '20000.0000', 1, 0, 0, 0, 0, 0, '', '', '', '', NULL, '2020-04-02 07:02:01', '2020-04-02 07:04:05'),
  503. (23, 1, 'customer', NULL, 'Pelanggan 9', '[email protected]', 'C009', 'PJK009', 'Bekasi', 'Jawa Barat', 'Indonesia', '', '085693086800', '', '', 0, '', '20000.0000', 1, 0, 0, 0, 0, 4, '', '', '', '', NULL, '2020-04-02 07:04:33', '2020-04-02 07:04:33'),
  504. (24, 1, 'customer', NULL, 'Pelanggan 10', '[email protected]', 'C0010', 'PJK0010', 'Bekasi', 'Jawa Barat', 'Indonesia', 'Desa Kampung Dukuh Rt 017 Desa Kampung Dukuh Rt 017 Desa Kampung Dukuh Rt 017 Desa Kampung Dukuh Rt 017 Desa Kampung Dukuh Rt 017', '085693086800', '085693086800', '085693086800', 10, 'days', '20000.0000', 1, 0, 0, 0, 0, 4, '', '', '', '', NULL, '2020-04-02 07:04:56', '2020-04-03 09:51:53'),
  505. (29, 2, 'customer', NULL, 'Walk-In Customer', '[email protected]', 'C001', '', '', '', '', '', '085219378505', '', '', 0, '', '0.0000', 2, 0, 0, 0, 1, 0, '', '', '', '', NULL, '2020-04-03 10:08:22', '2020-04-03 10:08:22'),
  506. (30, 2, 'customer', NULL, 'Dikhi Martin', '[email protected]', 'Dikhi Martin', 'Dikhi Martin', '', '', '', '', '081310844956', '', '', 0, '', '0.0000', 2, 0, 0, 0, 0, 0, '', '', '', '', NULL, '2020-04-03 10:16:24', '2020-04-03 10:16:24');
  507.  
  508. -- --------------------------------------------------------
  509.  
  510. --
  511. -- Table structure for table `currencies`
  512. --
  513.  
  514. CREATE TABLE `currencies` (
  515. `id` int(10) UNSIGNED NOT NULL,
  516. `country` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  517. `currency` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  518. `code` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  519. `symbol` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  520. `thousand_separator` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  521. `decimal_separator` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  522. `created_at` timestamp NULL DEFAULT NULL,
  523. `updated_at` timestamp NULL DEFAULT NULL
  524. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  525.  
  526. --
  527. -- Dumping data for table `currencies`
  528. --
  529.  
  530. INSERT INTO `currencies` (`id`, `country`, `currency`, `code`, `symbol`, `thousand_separator`, `decimal_separator`, `created_at`, `updated_at`) VALUES
  531. (1, 'Albania', 'Leke', 'ALL', 'Lek', ',', '.', NULL, NULL),
  532. (2, 'America', 'Dollars', 'USD', '$', ',', '.', NULL, NULL),
  533. (3, 'Afghanistan', 'Afghanis', 'AF', '؋', ',', '.', NULL, NULL),
  534. (4, 'Argentina', 'Pesos', 'ARS', '$', ',', '.', NULL, NULL),
  535. (5, 'Aruba', 'Guilders', 'AWG', 'ƒ', ',', '.', NULL, NULL),
  536. (6, 'Australia', 'Dollars', 'AUD', '$', ',', '.', NULL, NULL),
  537. (7, 'Azerbaijan', 'New Manats', 'AZ', 'ман', ',', '.', NULL, NULL),
  538. (8, 'Bahamas', 'Dollars', 'BSD', '$', ',', '.', NULL, NULL),
  539. (9, 'Barbados', 'Dollars', 'BBD', '$', ',', '.', NULL, NULL),
  540. (10, 'Belarus', 'Rubles', 'BYR', 'p.', ',', '.', NULL, NULL),
  541. (11, 'Belgium', 'Euro', 'EUR', '€', ',', '.', NULL, NULL),
  542. (12, 'Beliz', 'Dollars', 'BZD', 'BZ$', ',', '.', NULL, NULL),
  543. (13, 'Bermuda', 'Dollars', 'BMD', '$', ',', '.', NULL, NULL),
  544. (14, 'Bolivia', 'Bolivianos', 'BOB', '$b', ',', '.', NULL, NULL),
  545. (15, 'Bosnia and Herzegovina', 'Convertible Marka', 'BAM', 'KM', ',', '.', NULL, NULL),
  546. (16, 'Botswana', 'Pula\'s', 'BWP', 'P', ',', '.', NULL, NULL),
  547. (17, 'Bulgaria', 'Leva', 'BG', 'лв', ',', '.', NULL, NULL),
  548. (18, 'Brazil', 'Reais', 'BRL', 'R$', ',', '.', NULL, NULL),
  549. (19, 'Britain [United Kingdom]', 'Pounds', 'GBP', '£', ',', '.', NULL, NULL),
  550. (20, 'Brunei Darussalam', 'Dollars', 'BND', '$', ',', '.', NULL, NULL),
  551. (21, 'Cambodia', 'Riels', 'KHR', '៛', ',', '.', NULL, NULL),
  552. (22, 'Canada', 'Dollars', 'CAD', '$', ',', '.', NULL, NULL),
  553. (23, 'Cayman Islands', 'Dollars', 'KYD', '$', ',', '.', NULL, NULL),
  554. (24, 'Chile', 'Pesos', 'CLP', '$', ',', '.', NULL, NULL),
  555. (25, 'China', 'Yuan Renminbi', 'CNY', '¥', ',', '.', NULL, NULL),
  556. (26, 'Colombia', 'Pesos', 'COP', '$', ',', '.', NULL, NULL),
  557. (27, 'Costa Rica', 'Colón', 'CRC', '₡', ',', '.', NULL, NULL),
  558. (28, 'Croatia', 'Kuna', 'HRK', 'kn', ',', '.', NULL, NULL),
  559. (29, 'Cuba', 'Pesos', 'CUP', '₱', ',', '.', NULL, NULL),
  560. (30, 'Cyprus', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  561. (31, 'Czech Republic', 'Koruny', 'CZK', 'Kč', ',', '.', NULL, NULL),
  562. (32, 'Denmark', 'Kroner', 'DKK', 'kr', ',', '.', NULL, NULL),
  563. (33, 'Dominican Republic', 'Pesos', 'DOP ', 'RD$', ',', '.', NULL, NULL),
  564. (34, 'East Caribbean', 'Dollars', 'XCD', '$', ',', '.', NULL, NULL),
  565. (35, 'Egypt', 'Pounds', 'EGP', '£', ',', '.', NULL, NULL),
  566. (36, 'El Salvador', 'Colones', 'SVC', '$', ',', '.', NULL, NULL),
  567. (37, 'England [United Kingdom]', 'Pounds', 'GBP', '£', ',', '.', NULL, NULL),
  568. (38, 'Euro', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  569. (39, 'Falkland Islands', 'Pounds', 'FKP', '£', ',', '.', NULL, NULL),
  570. (40, 'Fiji', 'Dollars', 'FJD', '$', ',', '.', NULL, NULL),
  571. (41, 'France', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  572. (42, 'Ghana', 'Cedis', 'GHC', '¢', ',', '.', NULL, NULL),
  573. (43, 'Gibraltar', 'Pounds', 'GIP', '£', ',', '.', NULL, NULL),
  574. (44, 'Greece', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  575. (45, 'Guatemala', 'Quetzales', 'GTQ', 'Q', ',', '.', NULL, NULL),
  576. (46, 'Guernsey', 'Pounds', 'GGP', '£', ',', '.', NULL, NULL),
  577. (47, 'Guyana', 'Dollars', 'GYD', '$', ',', '.', NULL, NULL),
  578. (48, 'Holland [Netherlands]', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  579. (49, 'Honduras', 'Lempiras', 'HNL', 'L', ',', '.', NULL, NULL),
  580. (50, 'Hong Kong', 'Dollars', 'HKD', '$', ',', '.', NULL, NULL),
  581. (51, 'Hungary', 'Forint', 'HUF', 'Ft', ',', '.', NULL, NULL),
  582. (52, 'Iceland', 'Kronur', 'ISK', 'kr', ',', '.', NULL, NULL),
  583. (53, 'India', 'Rupees', 'INR', '₹', ',', '.', NULL, NULL),
  584. (54, 'Indonesia', 'Rupiahs', 'IDR', 'Rp', ',', '.', NULL, NULL),
  585. (55, 'Iran', 'Rials', 'IRR', '﷼', ',', '.', NULL, NULL),
  586. (56, 'Ireland', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  587. (57, 'Isle of Man', 'Pounds', 'IMP', '£', ',', '.', NULL, NULL),
  588. (58, 'Israel', 'New Shekels', 'ILS', '₪', ',', '.', NULL, NULL),
  589. (59, 'Italy', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  590. (60, 'Jamaica', 'Dollars', 'JMD', 'J$', ',', '.', NULL, NULL),
  591. (61, 'Japan', 'Yen', 'JPY', '¥', ',', '.', NULL, NULL),
  592. (62, 'Jersey', 'Pounds', 'JEP', '£', ',', '.', NULL, NULL),
  593. (63, 'Kazakhstan', 'Tenge', 'KZT', 'лв', ',', '.', NULL, NULL),
  594. (64, 'Korea [North]', 'Won', 'KPW', '₩', ',', '.', NULL, NULL),
  595. (65, 'Korea [South]', 'Won', 'KRW', '₩', ',', '.', NULL, NULL),
  596. (66, 'Kyrgyzstan', 'Soms', 'KGS', 'лв', ',', '.', NULL, NULL),
  597. (67, 'Laos', 'Kips', 'LAK', '₭', ',', '.', NULL, NULL),
  598. (68, 'Latvia', 'Lati', 'LVL', 'Ls', ',', '.', NULL, NULL),
  599. (69, 'Lebanon', 'Pounds', 'LBP', '£', ',', '.', NULL, NULL),
  600. (70, 'Liberia', 'Dollars', 'LRD', '$', ',', '.', NULL, NULL),
  601. (71, 'Liechtenstein', 'Switzerland Francs', 'CHF', 'CHF', ',', '.', NULL, NULL),
  602. (72, 'Lithuania', 'Litai', 'LTL', 'Lt', ',', '.', NULL, NULL),
  603. (73, 'Luxembourg', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  604. (74, 'Macedonia', 'Denars', 'MKD', 'ден', ',', '.', NULL, NULL),
  605. (75, 'Malaysia', 'Ringgits', 'MYR', 'RM', ',', '.', NULL, NULL),
  606. (76, 'Malta', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  607. (77, 'Mauritius', 'Rupees', 'MUR', '₨', ',', '.', NULL, NULL),
  608. (78, 'Mexico', 'Pesos', 'MXN', '$', ',', '.', NULL, NULL),
  609. (79, 'Mongolia', 'Tugriks', 'MNT', '₮', ',', '.', NULL, NULL),
  610. (80, 'Mozambique', 'Meticais', 'MZ', 'MT', ',', '.', NULL, NULL),
  611. (81, 'Namibia', 'Dollars', 'NAD', '$', ',', '.', NULL, NULL),
  612. (82, 'Nepal', 'Rupees', 'NPR', '₨', ',', '.', NULL, NULL),
  613. (83, 'Netherlands Antilles', 'Guilders', 'ANG', 'ƒ', ',', '.', NULL, NULL),
  614. (84, 'Netherlands', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  615. (85, 'New Zealand', 'Dollars', 'NZD', '$', ',', '.', NULL, NULL),
  616. (86, 'Nicaragua', 'Cordobas', 'NIO', 'C$', ',', '.', NULL, NULL),
  617. (87, 'Nigeria', 'Nairas', 'NG', '₦', ',', '.', NULL, NULL),
  618. (88, 'North Korea', 'Won', 'KPW', '₩', ',', '.', NULL, NULL),
  619. (89, 'Norway', 'Krone', 'NOK', 'kr', ',', '.', NULL, NULL),
  620. (90, 'Oman', 'Rials', 'OMR', '﷼', ',', '.', NULL, NULL),
  621. (91, 'Pakistan', 'Rupees', 'PKR', '₨', ',', '.', NULL, NULL),
  622. (92, 'Panama', 'Balboa', 'PAB', 'B/.', ',', '.', NULL, NULL),
  623. (93, 'Paraguay', 'Guarani', 'PYG', 'Gs', ',', '.', NULL, NULL),
  624. (94, 'Peru', 'Nuevos Soles', 'PE', 'S/.', ',', '.', NULL, NULL),
  625. (95, 'Philippines', 'Pesos', 'PHP', 'Php', ',', '.', NULL, NULL),
  626. (96, 'Poland', 'Zlotych', 'PL', 'zł', ',', '.', NULL, NULL),
  627. (97, 'Qatar', 'Rials', 'QAR', '﷼', ',', '.', NULL, NULL),
  628. (98, 'Romania', 'New Lei', 'RO', 'lei', ',', '.', NULL, NULL),
  629. (99, 'Russia', 'Rubles', 'RUB', 'руб', ',', '.', NULL, NULL),
  630. (100, 'Saint Helena', 'Pounds', 'SHP', '£', ',', '.', NULL, NULL),
  631. (101, 'Saudi Arabia', 'Riyals', 'SAR', '﷼', ',', '.', NULL, NULL),
  632. (102, 'Serbia', 'Dinars', 'RSD', 'Дин.', ',', '.', NULL, NULL),
  633. (103, 'Seychelles', 'Rupees', 'SCR', '₨', ',', '.', NULL, NULL),
  634. (104, 'Singapore', 'Dollars', 'SGD', '$', ',', '.', NULL, NULL),
  635. (105, 'Slovenia', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  636. (106, 'Solomon Islands', 'Dollars', 'SBD', '$', ',', '.', NULL, NULL),
  637. (107, 'Somalia', 'Shillings', 'SOS', 'S', ',', '.', NULL, NULL),
  638. (108, 'South Africa', 'Rand', 'ZAR', 'R', ',', '.', NULL, NULL),
  639. (109, 'South Korea', 'Won', 'KRW', '₩', ',', '.', NULL, NULL),
  640. (110, 'Spain', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  641. (111, 'Sri Lanka', 'Rupees', 'LKR', '₨', ',', '.', NULL, NULL),
  642. (112, 'Sweden', 'Kronor', 'SEK', 'kr', ',', '.', NULL, NULL),
  643. (113, 'Switzerland', 'Francs', 'CHF', 'CHF', ',', '.', NULL, NULL),
  644. (114, 'Suriname', 'Dollars', 'SRD', '$', ',', '.', NULL, NULL),
  645. (115, 'Syria', 'Pounds', 'SYP', '£', ',', '.', NULL, NULL),
  646. (116, 'Taiwan', 'New Dollars', 'TWD', 'NT$', ',', '.', NULL, NULL),
  647. (117, 'Thailand', 'Baht', 'THB', '฿', ',', '.', NULL, NULL),
  648. (118, 'Trinidad and Tobago', 'Dollars', 'TTD', 'TT$', ',', '.', NULL, NULL),
  649. (119, 'Turkey', 'Lira', 'TRY', 'TL', ',', '.', NULL, NULL),
  650. (120, 'Turkey', 'Liras', 'TRL', '£', ',', '.', NULL, NULL),
  651. (121, 'Tuvalu', 'Dollars', 'TVD', '$', ',', '.', NULL, NULL),
  652. (122, 'Ukraine', 'Hryvnia', 'UAH', '₴', ',', '.', NULL, NULL),
  653. (123, 'United Kingdom', 'Pounds', 'GBP', '£', ',', '.', NULL, NULL),
  654. (124, 'United States of America', 'Dollars', 'USD', '$', ',', '.', NULL, NULL),
  655. (125, 'Uruguay', 'Pesos', 'UYU', '$U', ',', '.', NULL, NULL),
  656. (126, 'Uzbekistan', 'Sums', 'UZS', 'лв', ',', '.', NULL, NULL),
  657. (127, 'Vatican City', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
  658. (128, 'Venezuela', 'Bolivares Fuertes', 'VEF', 'Bs', ',', '.', NULL, NULL),
  659. (129, 'Vietnam', 'Dong', 'VND', '₫', ',', '.', NULL, NULL),
  660. (130, 'Yemen', 'Rials', 'YER', '﷼', ',', '.', NULL, NULL),
  661. (131, 'Zimbabwe', 'Zimbabwe Dollars', 'ZWD', 'Z$', ',', '.', NULL, NULL),
  662. (132, 'Iraq', 'Iraqi dinar', 'IQD', 'د.ع', ',', '.', NULL, NULL),
  663. (133, 'Kenya', 'Kenyan shilling', 'KES', 'KSh', ',', '.', NULL, NULL),
  664. (134, 'Bangladesh', 'Taka', 'BDT', '৳', ',', '.', NULL, NULL),
  665. (135, 'Algerie', 'Algerian dinar', 'DZD', 'د.ج', ' ', '.', NULL, NULL),
  666. (136, 'United Arab Emirates', 'United Arab Emirates dirham', 'AED', 'د.إ', ',', '.', NULL, NULL),
  667. (137, 'Uganda', 'Uganda shillings', 'UGX', 'USh', ',', '.', NULL, NULL),
  668. (138, 'Tanzania', 'Tanzanian shilling', 'TZS', 'TSh', ',', '.', NULL, NULL),
  669. (139, 'Angola', 'Kwanza', 'AOA', 'Kz', ',', '.', NULL, NULL);
  670.  
  671. -- --------------------------------------------------------
  672.  
  673. --
  674. -- Table structure for table `customer_groups`
  675. --
  676.  
  677. CREATE TABLE `customer_groups` (
  678. `id` int(10) UNSIGNED NOT NULL,
  679. `business_id` int(10) UNSIGNED NOT NULL,
  680. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  681. `amount` double(5,2) NOT NULL,
  682. `created_by` int(10) UNSIGNED NOT NULL,
  683. `created_at` timestamp NULL DEFAULT NULL,
  684. `updated_at` timestamp NULL DEFAULT NULL
  685. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  686.  
  687. --
  688. -- Dumping data for table `customer_groups`
  689. --
  690.  
  691. INSERT INTO `customer_groups` (`id`, `business_id`, `name`, `amount`, `created_by`, `created_at`, `updated_at`) VALUES
  692. (1, 2, 'Member', -5.00, 2, '2020-01-22 14:02:10', '2020-01-22 14:02:10'),
  693. (2, 3, 'Pelanggan', -5.00, 4, '2020-02-13 06:25:43', '2020-02-13 06:26:11'),
  694. (3, 3, 'Member', -10.00, 4, '2020-02-13 06:26:58', '2020-02-13 06:27:11'),
  695. (4, 1, 'Grup Pelanggan Coba', 5.00, 1, '2020-03-04 03:40:38', '2020-03-04 03:40:38');
  696.  
  697. -- --------------------------------------------------------
  698.  
  699. --
  700. -- Table structure for table `discounts`
  701. --
  702.  
  703. CREATE TABLE `discounts` (
  704. `id` int(10) UNSIGNED NOT NULL,
  705. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  706. `business_id` int(11) NOT NULL,
  707. `brand_id` int(11) DEFAULT NULL,
  708. `category_id` int(11) DEFAULT NULL,
  709. `location_id` int(11) DEFAULT NULL,
  710. `priority` int(11) DEFAULT NULL,
  711. `discount_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  712. `discount_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  713. `starts_at` datetime DEFAULT NULL,
  714. `ends_at` datetime DEFAULT NULL,
  715. `is_active` tinyint(1) NOT NULL DEFAULT 1,
  716. `applicable_in_spg` tinyint(1) DEFAULT 0,
  717. `applicable_in_cg` tinyint(1) DEFAULT 0,
  718. `created_at` timestamp NULL DEFAULT NULL,
  719. `updated_at` timestamp NULL DEFAULT NULL
  720. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  721.  
  722. --
  723. -- Dumping data for table `discounts`
  724. --
  725.  
  726. INSERT INTO `discounts` (`id`, `name`, `business_id`, `brand_id`, `category_id`, `location_id`, `priority`, `discount_type`, `discount_amount`, `starts_at`, `ends_at`, `is_active`, `applicable_in_spg`, `applicable_in_cg`, `created_at`, `updated_at`) VALUES
  727. (1, 'ABC', 2, NULL, NULL, 2, 1, 'fixed', '10.0000', '2020-01-22 21:01:00', '2020-01-31 21:01:00', 1, 1, 1, '2020-01-22 14:01:19', '2020-01-22 14:01:19');
  728.  
  729. -- --------------------------------------------------------
  730.  
  731. --
  732. -- Table structure for table `expense_categories`
  733. --
  734.  
  735. CREATE TABLE `expense_categories` (
  736. `id` int(10) UNSIGNED NOT NULL,
  737. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  738. `business_id` int(10) UNSIGNED NOT NULL,
  739. `code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  740. `deleted_at` timestamp NULL DEFAULT NULL,
  741. `created_at` timestamp NULL DEFAULT NULL,
  742. `updated_at` timestamp NULL DEFAULT NULL
  743. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  744.  
  745. --
  746. -- Dumping data for table `expense_categories`
  747. --
  748.  
  749. INSERT INTO `expense_categories` (`id`, `name`, `business_id`, `code`, `deleted_at`, `created_at`, `updated_at`) VALUES
  750. (1, 'Operasional', 3, NULL, NULL, '2020-02-13 07:18:03', '2020-02-13 07:18:03');
  751.  
  752. -- --------------------------------------------------------
  753.  
  754. --
  755. -- Table structure for table `group_sub_taxes`
  756. --
  757.  
  758. CREATE TABLE `group_sub_taxes` (
  759. `group_tax_id` int(10) UNSIGNED NOT NULL,
  760. `tax_id` int(10) UNSIGNED NOT NULL
  761. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  762.  
  763. -- --------------------------------------------------------
  764.  
  765. --
  766. -- Table structure for table `invoice_layouts`
  767. --
  768.  
  769. CREATE TABLE `invoice_layouts` (
  770. `id` int(10) UNSIGNED NOT NULL,
  771. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  772. `header_text` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  773. `invoice_no_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  774. `quotation_no_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  775. `invoice_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  776. `sub_heading_line1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  777. `sub_heading_line2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  778. `sub_heading_line3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  779. `sub_heading_line4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  780. `sub_heading_line5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  781. `invoice_heading_not_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  782. `invoice_heading_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  783. `quotation_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  784. `sub_total_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  785. `discount_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  786. `tax_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  787. `total_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  788. `total_due_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  789. `paid_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  790. `show_client_id` tinyint(1) NOT NULL DEFAULT 0,
  791. `client_id_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  792. `client_tax_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  793. `date_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  794. `date_time_format` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  795. `show_time` tinyint(1) NOT NULL DEFAULT 1,
  796. `show_brand` tinyint(1) NOT NULL DEFAULT 0,
  797. `show_sku` tinyint(1) NOT NULL DEFAULT 1,
  798. `show_cat_code` tinyint(1) NOT NULL DEFAULT 1,
  799. `show_expiry` tinyint(1) NOT NULL DEFAULT 0,
  800. `show_lot` tinyint(1) NOT NULL DEFAULT 0,
  801. `show_image` tinyint(1) NOT NULL DEFAULT 0,
  802. `show_sale_description` tinyint(1) NOT NULL DEFAULT 0,
  803. `sales_person_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  804. `show_sales_person` tinyint(1) NOT NULL DEFAULT 0,
  805. `table_product_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  806. `table_qty_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  807. `table_unit_price_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  808. `table_subtotal_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  809. `cat_code_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  810. `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  811. `show_logo` tinyint(1) NOT NULL DEFAULT 0,
  812. `show_business_name` tinyint(1) NOT NULL DEFAULT 0,
  813. `show_location_name` tinyint(1) NOT NULL DEFAULT 1,
  814. `show_landmark` tinyint(1) NOT NULL DEFAULT 1,
  815. `show_city` tinyint(1) NOT NULL DEFAULT 1,
  816. `show_state` tinyint(1) NOT NULL DEFAULT 1,
  817. `show_zip_code` tinyint(1) NOT NULL DEFAULT 1,
  818. `show_country` tinyint(1) NOT NULL DEFAULT 1,
  819. `show_mobile_number` tinyint(1) NOT NULL DEFAULT 1,
  820. `show_alternate_number` tinyint(1) NOT NULL DEFAULT 0,
  821. `show_email` tinyint(1) NOT NULL DEFAULT 0,
  822. `show_tax_1` tinyint(1) NOT NULL DEFAULT 1,
  823. `show_tax_2` tinyint(1) NOT NULL DEFAULT 0,
  824. `show_barcode` tinyint(1) NOT NULL DEFAULT 0,
  825. `show_payments` tinyint(1) NOT NULL DEFAULT 0,
  826. `show_customer` tinyint(1) NOT NULL DEFAULT 0,
  827. `customer_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  828. `show_reward_point` tinyint(1) NOT NULL DEFAULT 0,
  829. `highlight_color` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  830. `footer_text` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  831. `module_info` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  832. `common_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  833. `is_default` tinyint(1) NOT NULL DEFAULT 0,
  834. `business_id` int(10) UNSIGNED NOT NULL,
  835. `design` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT 'classic',
  836. `cn_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'cn = credit note',
  837. `cn_no_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  838. `cn_amount_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  839. `table_tax_headings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  840. `show_previous_bal` tinyint(1) NOT NULL DEFAULT 0,
  841. `prev_bal_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  842. `change_return_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  843. `product_custom_fields` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  844. `contact_custom_fields` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  845. `location_custom_fields` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  846. `created_at` timestamp NULL DEFAULT NULL,
  847. `updated_at` timestamp NULL DEFAULT NULL
  848. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  849.  
  850. --
  851. -- Dumping data for table `invoice_layouts`
  852. --
  853.  
  854. INSERT INTO `invoice_layouts` (`id`, `name`, `header_text`, `invoice_no_prefix`, `quotation_no_prefix`, `invoice_heading`, `sub_heading_line1`, `sub_heading_line2`, `sub_heading_line3`, `sub_heading_line4`, `sub_heading_line5`, `invoice_heading_not_paid`, `invoice_heading_paid`, `quotation_heading`, `sub_total_label`, `discount_label`, `tax_label`, `total_label`, `total_due_label`, `paid_label`, `show_client_id`, `client_id_label`, `client_tax_label`, `date_label`, `date_time_format`, `show_time`, `show_brand`, `show_sku`, `show_cat_code`, `show_expiry`, `show_lot`, `show_image`, `show_sale_description`, `sales_person_label`, `show_sales_person`, `table_product_label`, `table_qty_label`, `table_unit_price_label`, `table_subtotal_label`, `cat_code_label`, `logo`, `show_logo`, `show_business_name`, `show_location_name`, `show_landmark`, `show_city`, `show_state`, `show_zip_code`, `show_country`, `show_mobile_number`, `show_alternate_number`, `show_email`, `show_tax_1`, `show_tax_2`, `show_barcode`, `show_payments`, `show_customer`, `customer_label`, `show_reward_point`, `highlight_color`, `footer_text`, `module_info`, `common_settings`, `is_default`, `business_id`, `design`, `cn_heading`, `cn_no_label`, `cn_amount_label`, `table_tax_headings`, `show_previous_bal`, `prev_bal_label`, `change_return_label`, `product_custom_fields`, `contact_custom_fields`, `location_custom_fields`, `created_at`, `updated_at`) VALUES
  855. (1, 'Default', NULL, 'Invoice No.', NULL, 'Invoice', NULL, NULL, NULL, NULL, NULL, '', '', NULL, 'Subtotal', 'Discount', 'Tax', 'Total', 'Total Due', 'Total Paid', 0, NULL, NULL, 'Date', NULL, 1, 0, 1, 1, 0, 0, 0, 0, NULL, 0, 'Product', 'Quantity', 'Unit Price', 'Subtotal', NULL, NULL, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 'Customer', 0, '#000000', '', NULL, NULL, 1, 1, 'classic', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  856. (2, 'Default', NULL, 'Invoice No.', NULL, 'Invoice', NULL, NULL, NULL, NULL, NULL, '', '', NULL, 'Subtotal', 'Discount', 'Tax', 'Total', 'Total Due', 'Total Paid', 0, NULL, NULL, 'Date', NULL, 1, 0, 1, 1, 0, 0, 0, 0, NULL, 0, 'Product', 'Quantity', 'Unit Price', 'Subtotal', NULL, NULL, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 'Customer', 0, '#000000', '', NULL, NULL, 1, 2, 'classic', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  857. (3, 'Default', NULL, 'Invoice No.', NULL, 'Invoice', NULL, NULL, NULL, NULL, NULL, '', '', NULL, 'Subtotal', 'Discount', 'Tax', 'Total', 'Total Due', 'Total Paid', 0, NULL, NULL, 'Date', NULL, 1, 0, 1, 1, 0, 0, 0, 0, NULL, 0, 'Product', 'Quantity', 'Unit Price', 'Subtotal', NULL, NULL, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 'Customer', 0, '#000000', '', NULL, NULL, 1, 3, 'classic', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  858. (4, 'Default', NULL, 'Invoice No.', NULL, 'Invoice', NULL, NULL, NULL, NULL, NULL, '', '', NULL, 'Subtotal', 'Discount', 'Tax', 'Total', 'Total Due', 'Total Paid', 0, NULL, NULL, 'Date', NULL, 1, 0, 1, 1, 0, 0, 0, 0, NULL, 0, 'Product', 'Quantity', 'Unit Price', 'Subtotal', NULL, NULL, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 'Customer', 0, '#000000', '', NULL, NULL, 1, 4, 'classic', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2020-02-17 07:49:19', '2020-02-17 07:49:19');
  859.  
  860. -- --------------------------------------------------------
  861.  
  862. --
  863. -- Table structure for table `invoice_schemes`
  864. --
  865.  
  866. CREATE TABLE `invoice_schemes` (
  867. `id` int(10) UNSIGNED NOT NULL,
  868. `business_id` int(10) UNSIGNED NOT NULL,
  869. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  870. `scheme_type` enum('blank','year') COLLATE utf8mb4_unicode_ci NOT NULL,
  871. `prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  872. `start_number` int(11) DEFAULT NULL,
  873. `invoice_count` int(11) NOT NULL DEFAULT 0,
  874. `total_digits` int(11) DEFAULT NULL,
  875. `is_default` tinyint(1) NOT NULL DEFAULT 0,
  876. `created_at` timestamp NULL DEFAULT NULL,
  877. `updated_at` timestamp NULL DEFAULT NULL
  878. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  879.  
  880. --
  881. -- Dumping data for table `invoice_schemes`
  882. --
  883.  
  884. INSERT INTO `invoice_schemes` (`id`, `business_id`, `name`, `scheme_type`, `prefix`, `start_number`, `invoice_count`, `total_digits`, `is_default`, `created_at`, `updated_at`) VALUES
  885. (1, 1, 'Default', 'blank', '', 1, 0, 4, 1, '2020-01-09 06:45:33', '2020-03-31 07:17:02'),
  886. (2, 2, 'Default', 'blank', '', 1, 0, 4, 1, '2020-01-10 09:32:54', '2020-01-22 10:37:20'),
  887. (3, 3, 'Default', 'blank', '', 1, 0, 4, 1, '2020-02-03 05:36:19', '2020-02-13 07:06:34'),
  888. (4, 4, 'Default', 'blank', '', 1, 0, 4, 1, '2020-02-17 07:49:19', '2020-02-17 08:44:33');
  889.  
  890. -- --------------------------------------------------------
  891.  
  892. --
  893. -- Table structure for table `item`
  894. --
  895.  
  896. CREATE TABLE `item` (
  897. `id` int(11) NOT NULL,
  898. `name` varchar(100) NOT NULL,
  899. `mobile_id` varchar(50) NOT NULL,
  900. `brand_id` int(11) NOT NULL,
  901. `category_id` int(11) NOT NULL,
  902. `unit_id` int(11) NOT NULL,
  903. `sell_price` int(11) NOT NULL,
  904. `purchase_price` int(11) NOT NULL,
  905. `sku` varchar(50) NOT NULL,
  906. `qty_stock` int(11) NOT NULL,
  907. `qty_minimum` int(11) NOT NULL,
  908. `business_id` varchar(50) NOT NULL,
  909. `tax_type` varchar(50) NOT NULL,
  910. `enable_stock` varchar(50) NOT NULL,
  911. `enable_sr_no` varchar(50) NOT NULL,
  912. `created_by` varchar(50) NOT NULL,
  913. `is_inactive` varchar(50) NOT NULL,
  914. `not_for_selling` varchar(50) NOT NULL,
  915. `image` varchar(50) NOT NULL
  916. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  917.  
  918. -- --------------------------------------------------------
  919.  
  920. --
  921. -- Table structure for table `jualdetail`
  922. --
  923.  
  924. CREATE TABLE `jualdetail` (
  925. `id` int(11) NOT NULL,
  926. `nomor` varchar(30) NOT NULL,
  927. `mobile_id_produk` varchar(50) NOT NULL,
  928. `qty` int(11) NOT NULL,
  929. `price` int(11) NOT NULL
  930. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  931.  
  932. --
  933. -- Dumping data for table `jualdetail`
  934. --
  935.  
  936. INSERT INTO `jualdetail` (`id`, `nomor`, `mobile_id_produk`, `qty`, `price`) VALUES
  937. (1, '0001', '2', 2, 2000),
  938. (2, '0001', '2', 2, 2000);
  939.  
  940. -- --------------------------------------------------------
  941.  
  942. --
  943. -- Table structure for table `jualmaster`
  944. --
  945.  
  946. CREATE TABLE `jualmaster` (
  947. `id` int(11) NOT NULL,
  948. `nomor` varchar(50) NOT NULL,
  949. `contact_id` varchar(50) NOT NULL,
  950. `total_pay` int(11) NOT NULL,
  951. `total_price` int(11) NOT NULL
  952. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  953.  
  954. --
  955. -- Dumping data for table `jualmaster`
  956. --
  957.  
  958. INSERT INTO `jualmaster` (`id`, `nomor`, `contact_id`, `total_pay`, `total_price`) VALUES
  959. (1, '00001', '1', 9000, 8000),
  960. (2, '00001', '', 9000, 8000);
  961.  
  962. -- --------------------------------------------------------
  963.  
  964. --
  965. -- Table structure for table `media`
  966. --
  967.  
  968. CREATE TABLE `media` (
  969. `id` int(10) UNSIGNED NOT NULL,
  970. `business_id` int(11) NOT NULL,
  971. `file_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  972. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  973. `uploaded_by` int(11) DEFAULT NULL,
  974. `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  975. `model_id` int(10) UNSIGNED NOT NULL,
  976. `created_at` timestamp NULL DEFAULT NULL,
  977. `updated_at` timestamp NULL DEFAULT NULL
  978. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  979.  
  980. -- --------------------------------------------------------
  981.  
  982. --
  983. -- Table structure for table `migrations`
  984. --
  985.  
  986. CREATE TABLE `migrations` (
  987. `id` int(10) UNSIGNED NOT NULL,
  988. `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  989. `batch` int(11) NOT NULL
  990. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  991.  
  992. --
  993. -- Dumping data for table `migrations`
  994. --
  995.  
  996. INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  997. (1, '2014_10_12_000000_create_users_table', 1),
  998. (2, '2014_10_12_100000_create_password_resets_table', 1),
  999. (3, '2017_07_05_071953_create_currencies_table', 1),
  1000. (4, '2017_07_05_073658_create_business_table', 1),
  1001. (5, '2017_07_22_075923_add_business_id_users_table', 1),
  1002. (6, '2017_07_23_113209_create_brands_table', 1),
  1003. (7, '2017_07_26_083429_create_permission_tables', 1),
  1004. (8, '2017_07_26_110000_create_tax_rates_table', 1),
  1005. (9, '2017_07_26_122313_create_units_table', 1),
  1006. (10, '2017_07_27_075706_create_contacts_table', 1),
  1007. (11, '2017_08_04_071038_create_categories_table', 1),
  1008. (12, '2017_08_08_115903_create_products_table', 1),
  1009. (13, '2017_08_09_061616_create_variation_templates_table', 1),
  1010. (14, '2017_08_09_061638_create_variation_value_templates_table', 1),
  1011. (15, '2017_08_10_061146_create_product_variations_table', 1),
  1012. (16, '2017_08_10_061216_create_variations_table', 1),
  1013. (17, '2017_08_19_054827_create_transactions_table', 1),
  1014. (18, '2017_08_31_073533_create_purchase_lines_table', 1),
  1015. (19, '2017_10_15_064638_create_transaction_payments_table', 1),
  1016. (20, '2017_10_31_065621_add_default_sales_tax_to_business_table', 1),
  1017. (21, '2017_11_20_051930_create_table_group_sub_taxes', 1),
  1018. (22, '2017_11_20_063603_create_transaction_sell_lines', 1),
  1019. (23, '2017_11_21_064540_create_barcodes_table', 1),
  1020. (24, '2017_11_23_181237_create_invoice_schemes_table', 1),
  1021. (25, '2017_12_25_122822_create_business_locations_table', 1),
  1022. (26, '2017_12_25_160253_add_location_id_to_transactions_table', 1),
  1023. (27, '2017_12_25_163227_create_variation_location_details_table', 1),
  1024. (28, '2018_01_04_115627_create_sessions_table', 1),
  1025. (29, '2018_01_05_112817_create_invoice_layouts_table', 1),
  1026. (30, '2018_01_06_112303_add_invoice_scheme_id_and_invoice_layout_id_to_business_locations', 1),
  1027. (31, '2018_01_08_104124_create_expense_categories_table', 1),
  1028. (32, '2018_01_08_123327_modify_transactions_table_for_expenses', 1),
  1029. (33, '2018_01_09_111005_modify_payment_status_in_transactions_table', 1),
  1030. (34, '2018_01_09_111109_add_paid_on_column_to_transaction_payments_table', 1),
  1031. (35, '2018_01_25_172439_add_printer_related_fields_to_business_locations_table', 1),
  1032. (36, '2018_01_27_184322_create_printers_table', 1),
  1033. (37, '2018_01_30_181442_create_cash_registers_table', 1),
  1034. (38, '2018_01_31_125836_create_cash_register_transactions_table', 1),
  1035. (39, '2018_02_07_173326_modify_business_table', 1),
  1036. (40, '2018_02_08_105425_add_enable_product_expiry_column_to_business_table', 1),
  1037. (41, '2018_02_08_111027_add_expiry_period_and_expiry_period_type_columns_to_products_table', 1),
  1038. (42, '2018_02_08_131118_add_mfg_date_and_exp_date_purchase_lines_table', 1),
  1039. (43, '2018_02_08_155348_add_exchange_rate_to_transactions_table', 1),
  1040. (44, '2018_02_09_124945_modify_transaction_payments_table_for_contact_payments', 1),
  1041. (45, '2018_02_12_113640_create_transaction_sell_lines_purchase_lines_table', 1),
  1042. (46, '2018_02_12_114605_add_quantity_sold_in_purchase_lines_table', 1),
  1043. (47, '2018_02_13_183323_alter_decimal_fields_size', 1),
  1044. (48, '2018_02_14_161928_add_transaction_edit_days_to_business_table', 1),
  1045. (49, '2018_02_15_161032_add_document_column_to_transactions_table', 1),
  1046. (50, '2018_02_17_124709_add_more_options_to_invoice_layouts', 1),
  1047. (51, '2018_02_19_111517_add_keyboard_shortcut_column_to_business_table', 1),
  1048. (52, '2018_02_19_121537_stock_adjustment_move_to_transaction_table', 1),
  1049. (53, '2018_02_20_165505_add_is_direct_sale_column_to_transactions_table', 1),
  1050. (54, '2018_02_21_105329_create_system_table', 1),
  1051. (55, '2018_02_23_100549_version_1_2', 1),
  1052. (56, '2018_02_23_125648_add_enable_editing_sp_from_purchase_column_to_business_table', 1),
  1053. (57, '2018_02_26_103612_add_sales_commission_agent_column_to_business_table', 1),
  1054. (58, '2018_02_26_130519_modify_users_table_for_sales_cmmsn_agnt', 1),
  1055. (59, '2018_02_26_134500_add_commission_agent_to_transactions_table', 1),
  1056. (60, '2018_02_27_121422_add_item_addition_method_to_business_table', 1),
  1057. (61, '2018_02_27_170232_modify_transactions_table_for_stock_transfer', 1),
  1058. (62, '2018_03_05_153510_add_enable_inline_tax_column_to_business_table', 1),
  1059. (63, '2018_03_06_210206_modify_product_barcode_types', 1),
  1060. (64, '2018_03_13_181541_add_expiry_type_to_business_table', 1),
  1061. (65, '2018_03_16_113446_product_expiry_setting_for_business', 1),
  1062. (66, '2018_03_19_113601_add_business_settings_options', 1),
  1063. (67, '2018_03_26_125334_add_pos_settings_to_business_table', 1),
  1064. (68, '2018_03_26_165350_create_customer_groups_table', 1),
  1065. (69, '2018_03_27_122720_customer_group_related_changes_in_tables', 1),
  1066. (70, '2018_03_29_110138_change_tax_field_to_nullable_in_business_table', 1),
  1067. (71, '2018_03_29_115502_add_changes_for_sr_number_in_products_and_sale_lines_table', 1),
  1068. (72, '2018_03_29_134340_add_inline_discount_fields_in_purchase_lines', 1),
  1069. (73, '2018_03_31_140921_update_transactions_table_exchange_rate', 1),
  1070. (74, '2018_04_03_103037_add_contact_id_to_contacts_table', 1),
  1071. (75, '2018_04_03_122709_add_changes_to_invoice_layouts_table', 1),
  1072. (76, '2018_04_09_135320_change_exchage_rate_size_in_business_table', 1),
  1073. (77, '2018_04_17_123122_add_lot_number_to_business', 1),
  1074. (78, '2018_04_17_160845_add_product_racks_table', 1),
  1075. (79, '2018_04_20_182015_create_res_tables_table', 1),
  1076. (80, '2018_04_24_105246_restaurant_fields_in_transaction_table', 1),
  1077. (81, '2018_04_24_114149_add_enabled_modules_business_table', 1),
  1078. (82, '2018_04_24_133704_add_modules_fields_in_invoice_layout_table', 1),
  1079. (83, '2018_04_27_132653_quotation_related_change', 1),
  1080. (84, '2018_05_02_104439_add_date_format_and_time_format_to_business', 1),
  1081. (85, '2018_05_02_111939_add_sell_return_to_transaction_payments', 1),
  1082. (86, '2018_05_14_114027_add_rows_positions_for_products', 1),
  1083. (87, '2018_05_14_125223_add_weight_to_products_table', 1),
  1084. (88, '2018_05_14_164754_add_opening_stock_permission', 1),
  1085. (89, '2018_05_15_134729_add_design_to_invoice_layouts', 1),
  1086. (90, '2018_05_16_183307_add_tax_fields_invoice_layout', 1),
  1087. (91, '2018_05_18_191956_add_sell_return_to_transaction_table', 1),
  1088. (92, '2018_05_21_131349_add_custom_fileds_to_contacts_table', 1),
  1089. (93, '2018_05_21_131607_invoice_layout_fields_for_sell_return', 1),
  1090. (94, '2018_05_21_131949_add_custom_fileds_and_website_to_business_locations_table', 1),
  1091. (95, '2018_05_22_123527_create_reference_counts_table', 1),
  1092. (96, '2018_05_22_154540_add_ref_no_prefixes_column_to_business_table', 1),
  1093. (97, '2018_05_24_132620_add_ref_no_column_to_transaction_payments_table', 1),
  1094. (98, '2018_05_24_161026_add_location_id_column_to_business_location_table', 1),
  1095. (99, '2018_05_25_180603_create_modifiers_related_table', 1),
  1096. (100, '2018_05_29_121714_add_purchase_line_id_to_stock_adjustment_line_table', 1),
  1097. (101, '2018_05_31_114645_add_res_order_status_column_to_transactions_table', 1),
  1098. (102, '2018_06_05_103530_rename_purchase_line_id_in_stock_adjustment_lines_table', 1),
  1099. (103, '2018_06_05_111905_modify_products_table_for_modifiers', 1),
  1100. (104, '2018_06_06_110524_add_parent_sell_line_id_column_to_transaction_sell_lines_table', 1),
  1101. (105, '2018_06_07_152443_add_is_service_staff_to_roles_table', 1),
  1102. (106, '2018_06_07_182258_add_image_field_to_products_table', 1),
  1103. (107, '2018_06_13_133705_create_bookings_table', 1),
  1104. (108, '2018_06_15_173636_add_email_column_to_contacts_table', 1),
  1105. (109, '2018_06_27_182835_add_superadmin_related_fields_business', 1),
  1106. (110, '2018_07_10_101913_add_custom_fields_to_products_table', 1),
  1107. (111, '2018_07_17_103434_add_sales_person_name_label_to_invoice_layouts_table', 1),
  1108. (112, '2018_07_17_163920_add_theme_skin_color_column_to_business_table', 1),
  1109. (113, '2018_07_24_160319_add_lot_no_line_id_to_transaction_sell_lines_table', 1),
  1110. (114, '2018_07_25_110004_add_show_expiry_and_show_lot_colums_to_invoice_layouts_table', 1),
  1111. (115, '2018_07_25_172004_add_discount_columns_to_transaction_sell_lines_table', 1),
  1112. (116, '2018_07_26_124720_change_design_column_type_in_invoice_layouts_table', 1),
  1113. (117, '2018_07_26_170424_add_unit_price_before_discount_column_to_transaction_sell_line_table', 1),
  1114. (118, '2018_07_28_103614_add_credit_limit_column_to_contacts_table', 1),
  1115. (119, '2018_08_08_110755_add_new_payment_methods_to_transaction_payments_table', 1),
  1116. (120, '2018_08_08_122225_modify_cash_register_transactions_table_for_new_payment_methods', 1),
  1117. (121, '2018_08_14_104036_add_opening_balance_type_to_transactions_table', 1),
  1118. (122, '2018_09_04_155900_create_accounts_table', 1),
  1119. (123, '2018_09_06_114438_create_selling_price_groups_table', 1),
  1120. (124, '2018_09_06_154057_create_variation_group_prices_table', 1),
  1121. (125, '2018_09_07_102413_add_permission_to_access_default_selling_price', 1),
  1122. (126, '2018_09_07_134858_add_selling_price_group_id_to_transactions_table', 1),
  1123. (127, '2018_09_10_112448_update_product_type_to_single_if_null_in_products_table', 1),
  1124. (128, '2018_09_10_152703_create_account_transactions_table', 1),
  1125. (129, '2018_09_10_173656_add_account_id_column_to_transaction_payments_table', 1),
  1126. (130, '2018_09_19_123914_create_notification_templates_table', 1),
  1127. (131, '2018_09_22_110504_add_sms_and_email_settings_columns_to_business_table', 1),
  1128. (132, '2018_09_24_134942_add_lot_no_line_id_to_stock_adjustment_lines_table', 1),
  1129. (133, '2018_09_26_105557_add_transaction_payments_for_existing_expenses', 1),
  1130. (134, '2018_09_27_111609_modify_transactions_table_for_purchase_return', 1),
  1131. (135, '2018_09_27_131154_add_quantity_returned_column_to_purchase_lines_table', 1),
  1132. (136, '2018_10_02_131401_add_return_quantity_column_to_transaction_sell_lines_table', 1),
  1133. (137, '2018_10_03_104918_add_qty_returned_column_to_transaction_sell_lines_purchase_lines_table', 1),
  1134. (138, '2018_10_03_185947_add_default_notification_templates_to_database', 1),
  1135. (139, '2018_10_09_153105_add_business_id_to_transaction_payments_table', 1),
  1136. (140, '2018_10_16_135229_create_permission_for_sells_and_purchase', 1),
  1137. (141, '2018_10_22_114441_add_columns_for_variable_product_modifications', 1),
  1138. (142, '2018_10_22_134428_modify_variable_product_data', 1),
  1139. (143, '2018_10_30_181558_add_table_tax_headings_to_invoice_layout', 1),
  1140. (144, '2018_10_31_122619_add_pay_terms_field_transactions_table', 1),
  1141. (145, '2018_10_31_161328_add_new_permissions_for_pos_screen', 1),
  1142. (146, '2018_10_31_174752_add_access_selected_contacts_only_to_users_table', 1),
  1143. (147, '2018_10_31_175627_add_user_contact_access', 1),
  1144. (148, '2018_10_31_180559_add_auto_send_sms_column_to_notification_templates_table', 1),
  1145. (149, '2018_11_02_171949_change_card_type_column_to_varchar_in_transaction_payments_table', 1),
  1146. (150, '2018_11_08_105621_add_role_permissions', 1),
  1147. (151, '2018_11_26_114135_add_is_suspend_column_to_transactions_table', 1),
  1148. (152, '2018_11_28_104410_modify_units_table_for_multi_unit', 1),
  1149. (153, '2018_11_28_170952_add_sub_unit_id_to_purchase_lines_and_sell_lines', 1),
  1150. (154, '2018_11_29_115918_add_primary_key_in_system_table', 1),
  1151. (155, '2018_12_03_185546_add_product_description_column_to_products_table', 1),
  1152. (156, '2018_12_06_114937_modify_system_table_and_users_table', 1),
  1153. (157, '2018_12_13_160007_add_custom_fields_display_options_to_invoice_layouts_table', 1),
  1154. (158, '2018_12_14_103307_modify_system_table', 1),
  1155. (159, '2018_12_18_133837_add_prev_balance_due_columns_to_invoice_layouts_table', 1),
  1156. (160, '2018_12_18_170656_add_invoice_token_column_to_transaction_table', 1),
  1157. (161, '2018_12_20_133639_add_date_time_format_column_to_invoice_layouts_table', 1),
  1158. (162, '2018_12_21_120659_add_recurring_invoice_fields_to_transactions_table', 1),
  1159. (163, '2018_12_24_154933_create_notifications_table', 1),
  1160. (164, '2019_01_08_112015_add_document_column_to_transaction_payments_table', 1),
  1161. (165, '2019_01_10_124645_add_account_permission', 1),
  1162. (166, '2019_01_16_125825_add_subscription_no_column_to_transactions_table', 1),
  1163. (167, '2019_01_28_111647_add_order_addresses_column_to_transactions_table', 1),
  1164. (168, '2019_02_13_173821_add_is_inactive_column_to_products_table', 1),
  1165. (169, '2019_02_19_103118_create_discounts_table', 1),
  1166. (170, '2019_02_21_120324_add_discount_id_column_to_transaction_sell_lines_table', 1),
  1167. (171, '2019_02_21_134324_add_permission_for_discount', 1),
  1168. (172, '2019_03_04_170832_add_service_staff_columns_to_transaction_sell_lines_table', 1),
  1169. (173, '2019_03_09_102425_add_sub_type_column_to_transactions_table', 1),
  1170. (174, '2019_03_09_124457_add_indexing_transaction_sell_lines_purchase_lines_table', 1),
  1171. (175, '2019_03_12_120336_create_activity_log_table', 1),
  1172. (176, '2019_03_15_132925_create_media_table', 1),
  1173. (177, '2019_05_08_130339_add_indexing_to_parent_id_in_transaction_payments_table', 1),
  1174. (178, '2019_05_10_132311_add_missing_column_indexing', 1),
  1175. (179, '2019_05_14_091812_add_show_image_column_to_invoice_layouts_table', 1),
  1176. (180, '2019_05_25_104922_add_view_purchase_price_permission', 1),
  1177. (181, '2019_06_17_103515_add_profile_informations_columns_to_users_table', 1),
  1178. (182, '2019_06_18_135524_add_permission_to_view_own_sales_only', 1),
  1179. (183, '2019_06_19_112058_add_database_changes_for_reward_points', 1),
  1180. (184, '2019_06_28_133732_change_type_column_to_string_in_transactions_table', 1),
  1181. (185, '2019_07_13_111420_add_is_created_from_api_column_to_transactions_table', 1),
  1182. (186, '2019_07_15_165136_add_fields_for_combo_product', 1),
  1183. (187, '2019_07_19_103446_add_mfg_quantity_used_column_to_purchase_lines_table', 1),
  1184. (188, '2019_07_22_152649_add_not_for_selling_in_product_table', 1),
  1185. (189, '2019_07_29_185351_add_show_reward_point_column_to_invoice_layouts_table', 1),
  1186. (190, '2019_08_08_162302_add_sub_units_related_fields', 1),
  1187. (191, '2019_08_26_133419_update_price_fields_decimal_point', 1),
  1188. (192, '2019_09_02_160054_remove_location_permissions_from_roles', 1),
  1189. (193, '2019_09_03_185259_add_permission_for_pos_screen', 1),
  1190. (194, '2019_09_17_122522_add_custom_labels_column_to_business_table', 1),
  1191. (195, '2019_09_18_164319_add_shipping_fields_to_transactions_table', 1),
  1192. (196, '2019_09_23_161906_add_media_description_cloumn_to_media_table', 1),
  1193. (197, '2019_10_18_155633_create_account_types_table', 1),
  1194. (198, '2019_10_22_163335_add_common_settings_column_to_business_table', 1),
  1195. (199, '2019_11_09_110522_add_indexing_to_lot_number', 1),
  1196. (200, '2019_11_19_170824_add_is_active_column_to_business_locations_table', 1),
  1197. (201, '2019_11_21_162913_change_quantity_field_types_to_decimal', 1),
  1198. (202, '2018_06_27_185405_create_packages_table', 2),
  1199. (203, '2018_06_28_182803_create_subscriptions_table', 2),
  1200. (204, '2018_07_17_182021_add_rows_to_system_table', 2),
  1201. (205, '2018_07_19_131721_add_options_to_packages_table', 2),
  1202. (206, '2018_08_17_155534_add_min_termination_alert_days', 2),
  1203. (207, '2018_08_28_105945_add_business_based_username_settings_to_system_table', 2),
  1204. (208, '2018_08_30_105906_add_superadmin_communicator_logs_table', 2),
  1205. (209, '2018_11_02_130636_add_custom_permissions_to_packages_table', 2),
  1206. (210, '2018_11_05_161848_add_more_fields_to_packages_table', 2),
  1207. (211, '2018_12_10_124621_modify_system_table_values_null_default', 2),
  1208. (212, '2019_05_10_135434_add_missing_database_column_indexes', 2),
  1209. (213, '2019_08_16_115300_create_superadmin_frontend_pages_table', 2),
  1210. (214, '2019_09_04_163141_add_location_id_to_cash_registers_table', 3),
  1211. (215, '2019_09_04_184008_create_types_of_services_table', 3),
  1212. (216, '2019_09_06_131445_add_types_of_service_fields_to_transactions_table', 3),
  1213. (217, '2019_09_09_134810_add_default_selling_price_group_id_column_to_business_locations_table', 3),
  1214. (218, '2019_09_12_105616_create_product_locations_table', 3),
  1215. (219, '2019_09_19_170927_close_all_active_registers', 3),
  1216. (220, '2019_10_29_132521_add_update_purchase_status_permission', 3),
  1217. (221, '2019_12_02_105025_create_warranties_table', 3),
  1218. (222, '2019_12_03_180342_add_common_settings_field_to_invoice_layouts_table', 3),
  1219. (223, '2019_12_06_174904_add_change_return_label_column_to_invoice_layouts_table', 3),
  1220. (224, '2019_12_11_121307_add_draft_and_quotation_list_permissions', 3),
  1221. (225, '2019_12_12_180126_copy_expense_total_to_total_before_tax', 3),
  1222. (226, '2019_12_19_181412_make_alert_quantity_field_nullable_on_products_table', 3);
  1223.  
  1224. -- --------------------------------------------------------
  1225.  
  1226. --
  1227. -- Table structure for table `model_has_permissions`
  1228. --
  1229.  
  1230. CREATE TABLE `model_has_permissions` (
  1231. `permission_id` int(10) UNSIGNED NOT NULL,
  1232. `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1233. `model_id` bigint(20) UNSIGNED NOT NULL
  1234. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1235.  
  1236. --
  1237. -- Dumping data for table `model_has_permissions`
  1238. --
  1239.  
  1240. INSERT INTO `model_has_permissions` (`permission_id`, `model_type`, `model_id`) VALUES
  1241. (74, 'App\\User', 3),
  1242. (74, 'App\\User', 5),
  1243. (74, 'App\\User', 6),
  1244. (74, 'App\\User', 7),
  1245. (74, 'App\\User', 10),
  1246. (82, 'App\\User', 9);
  1247.  
  1248. -- --------------------------------------------------------
  1249.  
  1250. --
  1251. -- Table structure for table `model_has_roles`
  1252. --
  1253.  
  1254. CREATE TABLE `model_has_roles` (
  1255. `role_id` int(10) UNSIGNED NOT NULL,
  1256. `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1257. `model_id` bigint(20) UNSIGNED NOT NULL
  1258. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1259.  
  1260. --
  1261. -- Dumping data for table `model_has_roles`
  1262. --
  1263.  
  1264. INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
  1265. (1, 'App\\User', 1),
  1266. (3, 'App\\User', 2),
  1267. (4, 'App\\User', 3),
  1268. (5, 'App\\User', 4),
  1269. (6, 'App\\User', 5),
  1270. (6, 'App\\User', 6),
  1271. (8, 'App\\User', 7),
  1272. (9, 'App\\User', 8),
  1273. (10, 'App\\User', 9),
  1274. (10, 'App\\User', 10);
  1275.  
  1276. -- --------------------------------------------------------
  1277.  
  1278. --
  1279. -- Table structure for table `notifications`
  1280. --
  1281.  
  1282. CREATE TABLE `notifications` (
  1283. `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  1284. `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1285. `notifiable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1286. `notifiable_id` bigint(20) UNSIGNED NOT NULL,
  1287. `data` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1288. `read_at` timestamp NULL DEFAULT NULL,
  1289. `created_at` timestamp NULL DEFAULT NULL,
  1290. `updated_at` timestamp NULL DEFAULT NULL
  1291. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1292.  
  1293. -- --------------------------------------------------------
  1294.  
  1295. --
  1296. -- Table structure for table `notification_templates`
  1297. --
  1298.  
  1299. CREATE TABLE `notification_templates` (
  1300. `id` int(10) UNSIGNED NOT NULL,
  1301. `business_id` int(11) NOT NULL,
  1302. `template_for` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1303. `email_body` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1304. `sms_body` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1305. `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1306. `auto_send` tinyint(1) NOT NULL DEFAULT 0,
  1307. `auto_send_sms` tinyint(1) NOT NULL DEFAULT 0,
  1308. `created_at` timestamp NULL DEFAULT NULL,
  1309. `updated_at` timestamp NULL DEFAULT NULL
  1310. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1311.  
  1312. --
  1313. -- Dumping data for table `notification_templates`
  1314. --
  1315.  
  1316. INSERT INTO `notification_templates` (`id`, `business_id`, `template_for`, `email_body`, `sms_body`, `subject`, `auto_send`, `auto_send_sms`, `created_at`, `updated_at`) VALUES
  1317. (1, 1, 'new_sale', '<p>Dear {contact_name},</p>\n\n <p>Your invoice number is {invoice_number}<br />\n Total amount: {total_amount}<br />\n Paid amount: {paid_amount}</p>\n\n <p>Thank you for shopping with us.</p>\n\n <p>{business_logo}</p>\n\n <p>&nbsp;</p>', 'Dear {contact_name}, Thank you for shopping with us. {business_name}', 'Thank you from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1318. (2, 1, 'payment_received', '<p>Dear {contact_name},</p>\n\n <p>We have received a payment of {paid_amount}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, We have received a payment of {paid_amount}. {business_name}', 'Payment Received, from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1319. (3, 1, 'payment_reminder', '<p>Dear {contact_name},</p>\n\n <p>This is to remind you that you have pending payment of {due_amount}. Kindly pay it as soon as possible.</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, You have pending payment of {due_amount}. Kindly pay it as soon as possible. {business_name}', 'Payment Reminder, from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1320. (4, 1, 'new_booking', '<p>Dear {contact_name},</p>\n\n <p>Your booking is confirmed</p>\n\n <p>Date: {start_time} to {end_time}</p>\n\n <p>Table: {table}</p>\n\n <p>Location: {location}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, Your booking is confirmed. Date: {start_time} to {end_time}, Table: {table}, Location: {location}', 'Booking Confirmed - {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1321. (5, 1, 'new_order', '<p>Dear {contact_name},</p>\n\n <p>We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'Dear {contact_name}, We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible. {business_name}', 'New Order, from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1322. (6, 1, 'payment_paid', '<p>Dear {contact_name},</p>\n\n <p>We have paid amount {paid_amount} again invoice number {invoice_number}.<br />\n Kindly note it down.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have paid amount {paid_amount} again invoice number {invoice_number}.\n Kindly note it down. {business_name}', 'Payment Paid, from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1323. (7, 1, 'items_received', '<p>Dear {contact_name},</p>\n\n <p>We have received all items from invoice reference number {invoice_number}. Thank you for processing it.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have received all items from invoice reference number {invoice_number}. Thank you for processing it. {business_name}', 'Items received, from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1324. (8, 1, 'items_pending', '<p>Dear {contact_name},<br />\n This is to remind you that we have not yet received some items from invoice reference number {invoice_number}. Please process it as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'This is to remind you that we have not yet received some items from invoice reference number {invoice_number} . Please process it as soon as possible.{business_name}', 'Items Pending, from {business_name}', 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1325. (9, 2, 'new_sale', '<p>Dear {contact_name},</p>\n\n <p>Your invoice number is {invoice_number}<br />\n Total amount: {total_amount}<br />\n Paid amount: {paid_amount}</p>\n\n <p>Thank you for shopping with us.</p>\n\n <p>{business_logo}</p>\n\n <p>&nbsp;</p>', 'Dear {contact_name}, Thank you for shopping with us. {business_name}', 'Thank you from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1326. (10, 2, 'payment_received', '<p>Dear {contact_name},</p>\n\n <p>We have received a payment of {paid_amount}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, We have received a payment of {paid_amount}. {business_name}', 'Payment Received, from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1327. (11, 2, 'payment_reminder', '<p>Dear {contact_name},</p>\n\n <p>This is to remind you that you have pending payment of {due_amount}. Kindly pay it as soon as possible.</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, You have pending payment of {due_amount}. Kindly pay it as soon as possible. {business_name}', 'Payment Reminder, from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1328. (12, 2, 'new_booking', '<p>Dear {contact_name},</p>\n\n <p>Your booking is confirmed</p>\n\n <p>Date: {start_time} to {end_time}</p>\n\n <p>Table: {table}</p>\n\n <p>Location: {location}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, Your booking is confirmed. Date: {start_time} to {end_time}, Table: {table}, Location: {location}', 'Booking Confirmed - {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1329. (13, 2, 'new_order', '<p>Dear {contact_name},</p>\n\n <p>We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'Dear {contact_name}, We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible. {business_name}', 'New Order, from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1330. (14, 2, 'payment_paid', '<p>Dear {contact_name},</p>\n\n <p>We have paid amount {paid_amount} again invoice number {invoice_number}.<br />\n Kindly note it down.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have paid amount {paid_amount} again invoice number {invoice_number}.\n Kindly note it down. {business_name}', 'Payment Paid, from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1331. (15, 2, 'items_received', '<p>Dear {contact_name},</p>\n\n <p>We have received all items from invoice reference number {invoice_number}. Thank you for processing it.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have received all items from invoice reference number {invoice_number}. Thank you for processing it. {business_name}', 'Items received, from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1332. (16, 2, 'items_pending', '<p>Dear {contact_name},<br />\n This is to remind you that we have not yet received some items from invoice reference number {invoice_number}. Please process it as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'This is to remind you that we have not yet received some items from invoice reference number {invoice_number} . Please process it as soon as possible.{business_name}', 'Items Pending, from {business_name}', 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1333. (17, 3, 'new_sale', '<p>Dear {contact_name},</p>\n\n <p>Your invoice number is {invoice_number}<br />\n Total amount: {total_amount}<br />\n Paid amount: {paid_amount}</p>\n\n <p>Thank you for shopping with us.</p>\n\n <p>{business_logo}</p>\n\n <p>&nbsp;</p>', 'Dear {contact_name}, Thank you for shopping with us. {business_name}', 'Thank you from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1334. (18, 3, 'payment_received', '<p>Dear {contact_name},</p>\n\n <p>We have received a payment of {paid_amount}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, We have received a payment of {paid_amount}. {business_name}', 'Payment Received, from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1335. (19, 3, 'payment_reminder', '<p>Dear {contact_name},</p>\n\n <p>This is to remind you that you have pending payment of {due_amount}. Kindly pay it as soon as possible.</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, You have pending payment of {due_amount}. Kindly pay it as soon as possible. {business_name}', 'Payment Reminder, from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1336. (20, 3, 'new_booking', '<p>Dear {contact_name},</p>\n\n <p>Your booking is confirmed</p>\n\n <p>Date: {start_time} to {end_time}</p>\n\n <p>Table: {table}</p>\n\n <p>Location: {location}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, Your booking is confirmed. Date: {start_time} to {end_time}, Table: {table}, Location: {location}', 'Booking Confirmed - {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1337. (21, 3, 'new_order', '<p>Dear {contact_name},</p>\n\n <p>We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'Dear {contact_name}, We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible. {business_name}', 'New Order, from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1338. (22, 3, 'payment_paid', '<p>Dear {contact_name},</p>\n\n <p>We have paid amount {paid_amount} again invoice number {invoice_number}.<br />\n Kindly note it down.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have paid amount {paid_amount} again invoice number {invoice_number}.\n Kindly note it down. {business_name}', 'Payment Paid, from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1339. (23, 3, 'items_received', '<p>Dear {contact_name},</p>\n\n <p>We have received all items from invoice reference number {invoice_number}. Thank you for processing it.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have received all items from invoice reference number {invoice_number}. Thank you for processing it. {business_name}', 'Items received, from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1340. (24, 3, 'items_pending', '<p>Dear {contact_name},<br />\n This is to remind you that we have not yet received some items from invoice reference number {invoice_number}. Please process it as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'This is to remind you that we have not yet received some items from invoice reference number {invoice_number} . Please process it as soon as possible.{business_name}', 'Items Pending, from {business_name}', 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1341. (25, 4, 'new_sale', '<p>Dear {contact_name},</p>\n\n <p>Your invoice number is {invoice_number}<br />\n Total amount: {total_amount}<br />\n Paid amount: {paid_amount}</p>\n\n <p>Thank you for shopping with us.</p>\n\n <p>{business_logo}</p>\n\n <p>&nbsp;</p>', 'Dear {contact_name}, Thank you for shopping with us. {business_name}', 'Thank you from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1342. (26, 4, 'payment_received', '<p>Dear {contact_name},</p>\n\n <p>We have received a payment of {paid_amount}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, We have received a payment of {paid_amount}. {business_name}', 'Payment Received, from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1343. (27, 4, 'payment_reminder', '<p>Dear {contact_name},</p>\n\n <p>This is to remind you that you have pending payment of {due_amount}. Kindly pay it as soon as possible.</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, You have pending payment of {due_amount}. Kindly pay it as soon as possible. {business_name}', 'Payment Reminder, from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1344. (28, 4, 'new_booking', '<p>Dear {contact_name},</p>\n\n <p>Your booking is confirmed</p>\n\n <p>Date: {start_time} to {end_time}</p>\n\n <p>Table: {table}</p>\n\n <p>Location: {location}</p>\n\n <p>{business_logo}</p>', 'Dear {contact_name}, Your booking is confirmed. Date: {start_time} to {end_time}, Table: {table}, Location: {location}', 'Booking Confirmed - {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1345. (29, 4, 'new_order', '<p>Dear {contact_name},</p>\n\n <p>We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'Dear {contact_name}, We have a new order with reference number {invoice_number}. Kindly process the products as soon as possible. {business_name}', 'New Order, from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1346. (30, 4, 'payment_paid', '<p>Dear {contact_name},</p>\n\n <p>We have paid amount {paid_amount} again invoice number {invoice_number}.<br />\n Kindly note it down.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have paid amount {paid_amount} again invoice number {invoice_number}.\n Kindly note it down. {business_name}', 'Payment Paid, from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1347. (31, 4, 'items_received', '<p>Dear {contact_name},</p>\n\n <p>We have received all items from invoice reference number {invoice_number}. Thank you for processing it.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'We have received all items from invoice reference number {invoice_number}. Thank you for processing it. {business_name}', 'Items received, from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1348. (32, 4, 'items_pending', '<p>Dear {contact_name},<br />\n This is to remind you that we have not yet received some items from invoice reference number {invoice_number}. Please process it as soon as possible.</p>\n\n <p>{business_name}<br />\n {business_logo}</p>', 'This is to remind you that we have not yet received some items from invoice reference number {invoice_number} . Please process it as soon as possible.{business_name}', 'Items Pending, from {business_name}', 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19');
  1349.  
  1350. -- --------------------------------------------------------
  1351.  
  1352. --
  1353. -- Table structure for table `packages`
  1354. --
  1355.  
  1356. CREATE TABLE `packages` (
  1357. `id` int(10) UNSIGNED NOT NULL,
  1358. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1359. `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1360. `location_count` int(11) NOT NULL COMMENT 'No. of Business Locations, 0 = infinite option.',
  1361. `user_count` int(11) NOT NULL,
  1362. `product_count` int(11) NOT NULL,
  1363. `bookings` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Enable/Disable bookings',
  1364. `kitchen` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Enable/Disable kitchen',
  1365. `order_screen` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Enable/Disable order_screen',
  1366. `tables` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Enable/Disable tables',
  1367. `invoice_count` int(11) NOT NULL,
  1368. `interval` enum('days','months','years') COLLATE utf8mb4_unicode_ci NOT NULL,
  1369. `interval_count` int(11) NOT NULL,
  1370. `trial_days` int(11) NOT NULL,
  1371. `price` decimal(20,4) NOT NULL,
  1372. `custom_permissions` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  1373. `created_by` int(11) NOT NULL,
  1374. `sort_order` int(11) NOT NULL DEFAULT 0,
  1375. `is_active` tinyint(1) NOT NULL,
  1376. `is_private` tinyint(1) NOT NULL DEFAULT 0,
  1377. `is_one_time` tinyint(1) NOT NULL DEFAULT 0,
  1378. `enable_custom_link` tinyint(1) NOT NULL DEFAULT 0,
  1379. `custom_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1380. `custom_link_text` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1381. `deleted_at` timestamp NULL DEFAULT NULL,
  1382. `created_at` timestamp NULL DEFAULT NULL,
  1383. `updated_at` timestamp NULL DEFAULT NULL
  1384. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1385.  
  1386. --
  1387. -- Dumping data for table `packages`
  1388. --
  1389.  
  1390. INSERT INTO `packages` (`id`, `name`, `description`, `location_count`, `user_count`, `product_count`, `bookings`, `kitchen`, `order_screen`, `tables`, `invoice_count`, `interval`, `interval_count`, `trial_days`, `price`, `custom_permissions`, `created_by`, `sort_order`, `is_active`, `is_private`, `is_one_time`, `enable_custom_link`, `custom_link`, `custom_link_text`, `deleted_at`, `created_at`, `updated_at`) VALUES
  1391. (1, 'Paket100', 'Paket Trial 100rb', 0, 0, 0, 0, 0, 0, 0, 0, 'months', 1, 0, '100000.0000', '', 1, 1, 1, 0, 0, 0, '', '', NULL, '2020-01-10 07:57:43', '2020-02-03 05:41:46');
  1392.  
  1393. -- --------------------------------------------------------
  1394.  
  1395. --
  1396. -- Table structure for table `password_resets`
  1397. --
  1398.  
  1399. CREATE TABLE `password_resets` (
  1400. `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1401. `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1402. `created_at` timestamp NULL DEFAULT NULL
  1403. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1404.  
  1405. -- --------------------------------------------------------
  1406.  
  1407. --
  1408. -- Table structure for table `permissions`
  1409. --
  1410.  
  1411. CREATE TABLE `permissions` (
  1412. `id` int(10) UNSIGNED NOT NULL,
  1413. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1414. `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1415. `created_at` timestamp NULL DEFAULT NULL,
  1416. `updated_at` timestamp NULL DEFAULT NULL
  1417. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1418.  
  1419. --
  1420. -- Dumping data for table `permissions`
  1421. --
  1422.  
  1423. INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
  1424. (1, 'profit_loss_report.view', 'web', '2020-01-09 06:39:56', NULL),
  1425. (2, 'direct_sell.access', 'web', '2020-01-09 06:39:56', NULL),
  1426. (3, 'product.opening_stock', 'web', '2020-01-09 06:39:58', '2020-01-09 06:39:58'),
  1427. (4, 'crud_all_bookings', 'web', '2020-01-09 06:39:59', '2020-01-09 06:39:59'),
  1428. (5, 'crud_own_bookings', 'web', '2020-01-09 06:39:59', '2020-01-09 06:39:59'),
  1429. (6, 'access_default_selling_price', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1430. (7, 'purchase.payments', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1431. (8, 'sell.payments', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1432. (9, 'edit_product_price_from_sale_screen', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1433. (10, 'edit_product_discount_from_sale_screen', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1434. (11, 'roles.view', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1435. (12, 'roles.create', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1436. (13, 'roles.update', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1437. (14, 'roles.delete', 'web', '2020-01-09 06:40:00', '2020-01-09 06:40:00'),
  1438. (15, 'account.access', 'web', '2020-01-09 06:40:01', '2020-01-09 06:40:01'),
  1439. (16, 'discount.access', 'web', '2020-01-09 06:40:02', '2020-01-09 06:40:02'),
  1440. (17, 'view_purchase_price', 'web', '2020-01-09 06:40:03', '2020-01-09 06:40:03'),
  1441. (18, 'view_own_sell_only', 'web', '2020-01-09 06:40:03', '2020-01-09 06:40:03'),
  1442. (19, 'edit_product_discount_from_pos_screen', 'web', '2020-01-09 06:40:03', '2020-01-09 06:40:03'),
  1443. (20, 'edit_product_price_from_pos_screen', 'web', '2020-01-09 06:40:03', '2020-01-09 06:40:03'),
  1444. (21, 'access_shipping', 'web', '2020-01-09 06:40:04', '2020-01-09 06:40:04'),
  1445. (22, 'user.view', 'web', '2020-01-09 06:40:04', NULL),
  1446. (23, 'user.create', 'web', '2020-01-09 06:40:04', NULL),
  1447. (24, 'user.update', 'web', '2020-01-09 06:40:04', NULL),
  1448. (25, 'user.delete', 'web', '2020-01-09 06:40:04', NULL),
  1449. (26, 'supplier.view', 'web', '2020-01-09 06:40:04', NULL),
  1450. (27, 'supplier.create', 'web', '2020-01-09 06:40:04', NULL),
  1451. (28, 'supplier.update', 'web', '2020-01-09 06:40:04', NULL),
  1452. (29, 'supplier.delete', 'web', '2020-01-09 06:40:04', NULL),
  1453. (30, 'customer.view', 'web', '2020-01-09 06:40:04', NULL),
  1454. (31, 'customer.create', 'web', '2020-01-09 06:40:04', NULL),
  1455. (32, 'customer.update', 'web', '2020-01-09 06:40:04', NULL),
  1456. (33, 'customer.delete', 'web', '2020-01-09 06:40:04', NULL),
  1457. (34, 'product.view', 'web', '2020-01-09 06:40:04', NULL),
  1458. (35, 'product.create', 'web', '2020-01-09 06:40:04', NULL),
  1459. (36, 'product.update', 'web', '2020-01-09 06:40:04', NULL),
  1460. (37, 'product.delete', 'web', '2020-01-09 06:40:04', NULL),
  1461. (38, 'purchase.view', 'web', '2020-01-09 06:40:04', NULL),
  1462. (39, 'purchase.create', 'web', '2020-01-09 06:40:04', NULL),
  1463. (40, 'purchase.update', 'web', '2020-01-09 06:40:04', NULL),
  1464. (41, 'purchase.delete', 'web', '2020-01-09 06:40:04', NULL),
  1465. (42, 'sell.view', 'web', '2020-01-09 06:40:04', NULL),
  1466. (43, 'sell.create', 'web', '2020-01-09 06:40:04', NULL),
  1467. (44, 'sell.update', 'web', '2020-01-09 06:40:04', NULL),
  1468. (45, 'sell.delete', 'web', '2020-01-09 06:40:04', NULL),
  1469. (46, 'purchase_n_sell_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1470. (47, 'contacts_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1471. (48, 'stock_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1472. (49, 'tax_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1473. (50, 'trending_product_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1474. (51, 'register_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1475. (52, 'sales_representative.view', 'web', '2020-01-09 06:40:04', NULL),
  1476. (53, 'expense_report.view', 'web', '2020-01-09 06:40:04', NULL),
  1477. (54, 'business_settings.access', 'web', '2020-01-09 06:40:04', NULL),
  1478. (55, 'barcode_settings.access', 'web', '2020-01-09 06:40:04', NULL),
  1479. (56, 'invoice_settings.access', 'web', '2020-01-09 06:40:04', NULL),
  1480. (57, 'brand.view', 'web', '2020-01-09 06:40:04', NULL),
  1481. (58, 'brand.create', 'web', '2020-01-09 06:40:04', NULL),
  1482. (59, 'brand.update', 'web', '2020-01-09 06:40:04', NULL),
  1483. (60, 'brand.delete', 'web', '2020-01-09 06:40:04', NULL),
  1484. (61, 'tax_rate.view', 'web', '2020-01-09 06:40:04', NULL),
  1485. (62, 'tax_rate.create', 'web', '2020-01-09 06:40:04', NULL),
  1486. (63, 'tax_rate.update', 'web', '2020-01-09 06:40:04', NULL),
  1487. (64, 'tax_rate.delete', 'web', '2020-01-09 06:40:04', NULL),
  1488. (65, 'unit.view', 'web', '2020-01-09 06:40:04', NULL),
  1489. (66, 'unit.create', 'web', '2020-01-09 06:40:04', NULL),
  1490. (67, 'unit.update', 'web', '2020-01-09 06:40:04', NULL),
  1491. (68, 'unit.delete', 'web', '2020-01-09 06:40:04', NULL),
  1492. (69, 'category.view', 'web', '2020-01-09 06:40:04', NULL),
  1493. (70, 'category.create', 'web', '2020-01-09 06:40:04', NULL),
  1494. (71, 'category.update', 'web', '2020-01-09 06:40:04', NULL),
  1495. (72, 'category.delete', 'web', '2020-01-09 06:40:04', NULL),
  1496. (73, 'expense.access', 'web', '2020-01-09 06:40:04', NULL),
  1497. (74, 'access_all_locations', 'web', '2020-01-09 06:40:04', NULL),
  1498. (75, 'dashboard.data', 'web', '2020-01-09 06:40:04', NULL),
  1499. (76, 'location.1', 'web', '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1500. (77, 'location.2', 'web', '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1501. (78, 'selling_price_group.1', 'web', '2020-01-22 13:50:12', '2020-01-22 13:50:12'),
  1502. (79, 'location.3', 'web', '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1503. (80, 'selling_price_group.2', 'web', '2020-02-03 07:22:07', '2020-02-03 07:22:07'),
  1504. (81, 'selling_price_group.3', 'web', '2020-02-13 06:41:21', '2020-02-13 06:41:21'),
  1505. (82, 'location.4', 'web', '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1506. (83, 'purchase.update_status', 'web', '2020-03-03 00:14:09', '2020-03-03 00:14:09'),
  1507. (84, 'list_drafts', 'web', '2020-03-03 00:14:12', '2020-03-03 00:14:12'),
  1508. (85, 'list_quotations', 'web', '2020-03-03 00:14:12', '2020-03-03 00:14:12'),
  1509. (86, 'location.5', 'web', '2020-03-05 07:24:24', '2020-03-05 07:24:24');
  1510.  
  1511. -- --------------------------------------------------------
  1512.  
  1513. --
  1514. -- Table structure for table `printers`
  1515. --
  1516.  
  1517. CREATE TABLE `printers` (
  1518. `id` int(10) UNSIGNED NOT NULL,
  1519. `business_id` int(10) UNSIGNED NOT NULL,
  1520. `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  1521. `connection_type` enum('network','windows','linux') COLLATE utf8mb4_unicode_ci NOT NULL,
  1522. `capability_profile` enum('default','simple','SP2000','TEP-200M','P822D') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',
  1523. `char_per_line` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1524. `ip_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1525. `port` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1526. `path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1527. `created_by` int(10) UNSIGNED NOT NULL,
  1528. `created_at` timestamp NULL DEFAULT NULL,
  1529. `updated_at` timestamp NULL DEFAULT NULL
  1530. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1531.  
  1532. -- --------------------------------------------------------
  1533.  
  1534. --
  1535. -- Table structure for table `products`
  1536. --
  1537.  
  1538. CREATE TABLE `products` (
  1539. `id` int(10) UNSIGNED NOT NULL,
  1540. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1541. `business_id` int(10) UNSIGNED NOT NULL,
  1542. `mobile_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1543. `type` enum('single','variable','modifier','combo') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1544. `unit_id` int(11) UNSIGNED DEFAULT NULL,
  1545. `sub_unit_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1546. `brand_id` int(10) UNSIGNED DEFAULT NULL,
  1547. `category_id` int(10) UNSIGNED DEFAULT NULL,
  1548. `sub_category_id` int(10) UNSIGNED DEFAULT NULL,
  1549. `tax` int(10) UNSIGNED DEFAULT NULL,
  1550. `tax_type` enum('inclusive','exclusive') COLLATE utf8mb4_unicode_ci NOT NULL,
  1551. `enable_stock` tinyint(1) NOT NULL DEFAULT 0,
  1552. `alert_quantity` decimal(22,4) DEFAULT NULL,
  1553. `sku` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1554. `barcode_type` enum('C39','C128','EAN13','EAN8','UPCA','UPCE') COLLATE utf8mb4_unicode_ci DEFAULT 'C128',
  1555. `expiry_period` decimal(4,2) DEFAULT NULL,
  1556. `expiry_period_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1557. `enable_sr_no` tinyint(1) NOT NULL DEFAULT 0,
  1558. `weight` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1559. `product_custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1560. `product_custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1561. `product_custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1562. `product_custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1563. `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1564. `product_description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1565. `created_by` int(10) UNSIGNED NOT NULL,
  1566. `warranty_id` int(11) DEFAULT NULL,
  1567. `is_inactive` tinyint(1) NOT NULL DEFAULT 0,
  1568. `not_for_selling` tinyint(1) NOT NULL DEFAULT 0,
  1569. `created_at` timestamp NULL DEFAULT NULL,
  1570. `updated_at` timestamp NULL DEFAULT NULL
  1571. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1572.  
  1573. -- --------------------------------------------------------
  1574.  
  1575. --
  1576. -- Table structure for table `product_locations`
  1577. --
  1578.  
  1579. CREATE TABLE `product_locations` (
  1580. `product_id` int(10) UNSIGNED NOT NULL,
  1581. `location_id` int(10) NOT NULL
  1582. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1583.  
  1584. -- --------------------------------------------------------
  1585.  
  1586. --
  1587. -- Table structure for table `product_racks`
  1588. --
  1589.  
  1590. CREATE TABLE `product_racks` (
  1591. `id` int(10) UNSIGNED NOT NULL,
  1592. `business_id` int(10) UNSIGNED NOT NULL,
  1593. `location_id` int(10) UNSIGNED NOT NULL,
  1594. `product_id` int(10) UNSIGNED NOT NULL,
  1595. `rack` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1596. `row` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1597. `position` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1598. `created_at` timestamp NULL DEFAULT NULL,
  1599. `updated_at` timestamp NULL DEFAULT NULL
  1600. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1601.  
  1602. -- --------------------------------------------------------
  1603.  
  1604. --
  1605. -- Table structure for table `product_variations`
  1606. --
  1607.  
  1608. CREATE TABLE `product_variations` (
  1609. `id` int(10) UNSIGNED NOT NULL,
  1610. `variation_template_id` int(11) DEFAULT NULL,
  1611. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1612. `product_id` int(10) UNSIGNED NOT NULL,
  1613. `is_dummy` tinyint(1) NOT NULL DEFAULT 1,
  1614. `created_at` timestamp NULL DEFAULT NULL,
  1615. `updated_at` timestamp NULL DEFAULT NULL
  1616. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1617.  
  1618. -- --------------------------------------------------------
  1619.  
  1620. --
  1621. -- Table structure for table `purchase_lines`
  1622. --
  1623.  
  1624. CREATE TABLE `purchase_lines` (
  1625. `id` int(10) UNSIGNED NOT NULL,
  1626. `transaction_id` int(10) UNSIGNED NOT NULL,
  1627. `product_id` int(10) UNSIGNED NOT NULL,
  1628. `variation_id` int(10) UNSIGNED NOT NULL,
  1629. `quantity` decimal(22,4) NOT NULL DEFAULT 0.0000,
  1630. `pp_without_discount` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Purchase price before inline discounts',
  1631. `discount_percent` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT 'Inline discount percentage',
  1632. `purchase_price` decimal(22,4) NOT NULL,
  1633. `purchase_price_inc_tax` decimal(22,4) NOT NULL DEFAULT 0.0000,
  1634. `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',
  1635. `tax_id` int(10) UNSIGNED DEFAULT NULL,
  1636. `quantity_sold` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Quanity sold from this purchase line',
  1637. `quantity_adjusted` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Quanity adjusted in stock adjustment from this purchase line',
  1638. `quantity_returned` decimal(22,4) NOT NULL DEFAULT 0.0000,
  1639. `mfg_quantity_used` decimal(22,4) NOT NULL DEFAULT 0.0000,
  1640. `mfg_date` date DEFAULT NULL,
  1641. `exp_date` date DEFAULT NULL,
  1642. `lot_number` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1643. `sub_unit_id` int(11) DEFAULT NULL,
  1644. `created_at` timestamp NULL DEFAULT NULL,
  1645. `updated_at` timestamp NULL DEFAULT NULL
  1646. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1647.  
  1648. -- --------------------------------------------------------
  1649.  
  1650. --
  1651. -- Table structure for table `reference_counts`
  1652. --
  1653.  
  1654. CREATE TABLE `reference_counts` (
  1655. `id` int(10) UNSIGNED NOT NULL,
  1656. `ref_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1657. `ref_count` int(11) NOT NULL,
  1658. `business_id` int(11) NOT NULL,
  1659. `created_at` timestamp NULL DEFAULT NULL,
  1660. `updated_at` timestamp NULL DEFAULT NULL
  1661. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1662.  
  1663. --
  1664. -- Dumping data for table `reference_counts`
  1665. --
  1666.  
  1667. INSERT INTO `reference_counts` (`id`, `ref_type`, `ref_count`, `business_id`, `created_at`, `updated_at`) VALUES
  1668. (1, 'contacts', 4, 1, '2020-01-09 06:45:33', '2020-03-31 10:11:44'),
  1669. (2, 'business_location', 0, 1, '2020-01-09 06:45:33', '2020-03-05 07:24:23'),
  1670. (3, 'contacts', 0, 2, '2020-01-10 09:32:54', '2020-01-22 10:33:30'),
  1671. (4, 'business_location', 0, 2, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1672. (5, 'username', 0, 2, '2020-01-10 11:54:17', '2020-01-10 11:54:17'),
  1673. (6, 'purchase', 0, 2, '2020-01-22 09:16:41', '2020-01-22 09:59:32'),
  1674. (7, 'purchase_payment', 0, 2, '2020-01-22 09:16:41', '2020-01-22 09:59:32'),
  1675. (8, 'sell_payment', 0, 2, '2020-01-22 10:07:15', '2020-01-22 10:37:20'),
  1676. (9, 'stock_adjustment', 0, 2, '2020-01-22 10:18:23', '2020-02-10 04:41:51'),
  1677. (10, 'expense', 0, 2, '2020-01-22 10:19:37', '2020-01-22 10:19:37'),
  1678. (11, 'purchase_return', 0, 2, '2020-01-22 10:31:47', '2020-01-22 10:31:47'),
  1679. (12, 'contacts', 0, 3, '2020-02-03 05:36:19', '2020-02-10 07:09:14'),
  1680. (13, 'business_location', 0, 3, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1681. (14, 'username', 0, 3, '2020-02-03 07:15:30', '2020-02-13 04:34:41'),
  1682. (15, 'purchase', 0, 3, '2020-02-03 07:39:24', '2020-02-10 07:10:29'),
  1683. (16, 'purchase_payment', 0, 3, '2020-02-03 07:39:24', '2020-02-03 07:39:24'),
  1684. (17, 'sell_payment', 0, 3, '2020-02-03 07:41:54', '2020-02-13 07:06:34'),
  1685. (18, 'stock_adjustment', 0, 3, '2020-02-10 07:32:30', '2020-02-10 07:32:30'),
  1686. (19, 'purchase_return', 0, 3, '2020-02-13 07:10:07', '2020-02-13 07:10:07'),
  1687. (20, 'contacts', 0, 4, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1688. (21, 'business_location', 0, 4, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1689. (22, 'username', 0, 4, '2020-02-17 08:15:57', '2020-02-17 08:20:13'),
  1690. (23, 'opening_balance', 6, 1, '2020-03-04 03:21:38', '2020-03-31 10:11:44'),
  1691. (24, 'purchase', 0, 1, '2020-03-04 03:27:26', '2020-03-31 07:19:46'),
  1692. (25, 'purchase_payment', 0, 1, '2020-03-04 03:27:26', '2020-03-31 07:19:46'),
  1693. (26, 'sell_payment', 0, 1, '2020-03-04 04:10:10', '2020-03-31 07:17:02');
  1694.  
  1695. -- --------------------------------------------------------
  1696.  
  1697. --
  1698. -- Table structure for table `res_product_modifier_sets`
  1699. --
  1700.  
  1701. CREATE TABLE `res_product_modifier_sets` (
  1702. `modifier_set_id` int(10) UNSIGNED NOT NULL,
  1703. `product_id` int(10) UNSIGNED NOT NULL COMMENT 'Table use to store the modifier sets applicable for a product'
  1704. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1705.  
  1706. -- --------------------------------------------------------
  1707.  
  1708. --
  1709. -- Table structure for table `res_tables`
  1710. --
  1711.  
  1712. CREATE TABLE `res_tables` (
  1713. `id` int(10) UNSIGNED NOT NULL,
  1714. `business_id` int(10) UNSIGNED NOT NULL,
  1715. `location_id` int(10) UNSIGNED NOT NULL,
  1716. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1717. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1718. `created_by` int(10) UNSIGNED NOT NULL,
  1719. `deleted_at` timestamp NULL DEFAULT NULL,
  1720. `created_at` timestamp NULL DEFAULT NULL,
  1721. `updated_at` timestamp NULL DEFAULT NULL
  1722. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1723.  
  1724. -- --------------------------------------------------------
  1725.  
  1726. --
  1727. -- Table structure for table `roles`
  1728. --
  1729.  
  1730. CREATE TABLE `roles` (
  1731. `id` int(10) UNSIGNED NOT NULL,
  1732. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1733. `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1734. `business_id` int(10) UNSIGNED NOT NULL,
  1735. `is_default` tinyint(1) NOT NULL DEFAULT 0,
  1736. `is_service_staff` tinyint(1) NOT NULL DEFAULT 0,
  1737. `created_at` timestamp NULL DEFAULT NULL,
  1738. `updated_at` timestamp NULL DEFAULT NULL
  1739. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1740.  
  1741. --
  1742. -- Dumping data for table `roles`
  1743. --
  1744.  
  1745. INSERT INTO `roles` (`id`, `name`, `guard_name`, `business_id`, `is_default`, `is_service_staff`, `created_at`, `updated_at`) VALUES
  1746. (1, 'Admin#1', 'web', 1, 1, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1747. (2, 'Cashier#1', 'web', 1, 0, 0, '2020-01-09 06:45:33', '2020-01-09 06:45:33'),
  1748. (3, 'Admin#2', 'web', 2, 1, 0, '2020-01-10 09:32:53', '2020-01-10 09:32:53'),
  1749. (4, 'Cashier#2', 'web', 2, 0, 0, '2020-01-10 09:32:54', '2020-01-10 09:32:54'),
  1750. (5, 'Admin#3', 'web', 3, 1, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1751. (6, 'Cashier#3', 'web', 3, 0, 0, '2020-02-03 05:36:19', '2020-02-03 05:36:19'),
  1752. (7, 'Stock Barang#3', 'web', 3, 0, 0, '2020-02-13 04:25:55', '2020-02-13 04:25:55'),
  1753. (8, 'PRAMUNIAGA#3', 'web', 3, 0, 0, '2020-02-13 04:32:28', '2020-02-13 04:32:28'),
  1754. (9, 'Admin#4', 'web', 4, 1, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1755. (10, 'Cashier#4', 'web', 4, 0, 0, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  1756. (11, 'POS UMKM#4', 'web', 4, 0, 0, '2020-02-17 08:26:02', '2020-02-17 08:26:02');
  1757.  
  1758. -- --------------------------------------------------------
  1759.  
  1760. --
  1761. -- Table structure for table `role_has_permissions`
  1762. --
  1763.  
  1764. CREATE TABLE `role_has_permissions` (
  1765. `permission_id` int(10) UNSIGNED NOT NULL,
  1766. `role_id` int(10) UNSIGNED NOT NULL
  1767. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1768.  
  1769. --
  1770. -- Dumping data for table `role_has_permissions`
  1771. --
  1772.  
  1773. INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
  1774. (3, 7),
  1775. (3, 11),
  1776. (6, 6),
  1777. (6, 7),
  1778. (6, 8),
  1779. (6, 11),
  1780. (7, 7),
  1781. (17, 7),
  1782. (17, 11),
  1783. (18, 11),
  1784. (26, 7),
  1785. (27, 7),
  1786. (28, 7),
  1787. (29, 7),
  1788. (34, 7),
  1789. (34, 11),
  1790. (35, 7),
  1791. (35, 11),
  1792. (36, 7),
  1793. (36, 11),
  1794. (37, 7),
  1795. (37, 11),
  1796. (38, 7),
  1797. (39, 7),
  1798. (40, 7),
  1799. (41, 7),
  1800. (42, 2),
  1801. (42, 4),
  1802. (42, 6),
  1803. (42, 10),
  1804. (42, 11),
  1805. (43, 2),
  1806. (43, 4),
  1807. (43, 6),
  1808. (43, 10),
  1809. (43, 11),
  1810. (44, 2),
  1811. (44, 4),
  1812. (44, 6),
  1813. (44, 10),
  1814. (45, 2),
  1815. (45, 4),
  1816. (45, 6),
  1817. (45, 10),
  1818. (46, 11),
  1819. (51, 11),
  1820. (57, 11),
  1821. (58, 11),
  1822. (59, 11),
  1823. (60, 11),
  1824. (65, 11),
  1825. (66, 11),
  1826. (67, 11),
  1827. (68, 11),
  1828. (69, 11),
  1829. (70, 11),
  1830. (71, 11),
  1831. (72, 11),
  1832. (74, 2),
  1833. (74, 4),
  1834. (74, 10),
  1835. (75, 7),
  1836. (75, 8),
  1837. (75, 11),
  1838. (80, 6),
  1839. (81, 6);
  1840.  
  1841. -- --------------------------------------------------------
  1842.  
  1843. --
  1844. -- Table structure for table `selling_price_groups`
  1845. --
  1846.  
  1847. CREATE TABLE `selling_price_groups` (
  1848. `id` int(10) UNSIGNED NOT NULL,
  1849. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1850. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1851. `business_id` int(10) UNSIGNED NOT NULL,
  1852. `deleted_at` timestamp NULL DEFAULT NULL,
  1853. `created_at` timestamp NULL DEFAULT NULL,
  1854. `updated_at` timestamp NULL DEFAULT NULL
  1855. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1856.  
  1857. --
  1858. -- Dumping data for table `selling_price_groups`
  1859. --
  1860.  
  1861. INSERT INTO `selling_price_groups` (`id`, `name`, `description`, `business_id`, `deleted_at`, `created_at`, `updated_at`) VALUES
  1862. (1, 'Group1', NULL, 2, NULL, '2020-01-22 13:50:12', '2020-01-22 13:50:12'),
  1863. (2, 'Harga Jual Retail', NULL, 3, NULL, '2020-02-03 07:22:07', '2020-02-03 07:22:07'),
  1864. (3, 'Promo Akhir Tahun', NULL, 3, NULL, '2020-02-13 06:41:21', '2020-02-13 06:41:21');
  1865.  
  1866. -- --------------------------------------------------------
  1867.  
  1868. --
  1869. -- Table structure for table `sell_line_warranties`
  1870. --
  1871.  
  1872. CREATE TABLE `sell_line_warranties` (
  1873. `sell_line_id` int(11) NOT NULL,
  1874. `warranty_id` int(11) NOT NULL
  1875. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1876.  
  1877. -- --------------------------------------------------------
  1878.  
  1879. --
  1880. -- Table structure for table `sessions`
  1881. --
  1882.  
  1883. CREATE TABLE `sessions` (
  1884. `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1885. `user_id` int(10) UNSIGNED DEFAULT NULL,
  1886. `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1887. `user_agent` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1888. `payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
  1889. `last_activity` int(11) NOT NULL
  1890. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1891.  
  1892. -- --------------------------------------------------------
  1893.  
  1894. --
  1895. -- Table structure for table `stock_adjustments_temp`
  1896. --
  1897.  
  1898. CREATE TABLE `stock_adjustments_temp` (
  1899. `id` int(11) DEFAULT NULL
  1900. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  1901.  
  1902. -- --------------------------------------------------------
  1903.  
  1904. --
  1905. -- Table structure for table `stock_adjustment_lines`
  1906. --
  1907.  
  1908. CREATE TABLE `stock_adjustment_lines` (
  1909. `id` int(10) UNSIGNED NOT NULL,
  1910. `transaction_id` int(10) UNSIGNED NOT NULL,
  1911. `product_id` int(10) UNSIGNED NOT NULL,
  1912. `variation_id` int(10) UNSIGNED NOT NULL,
  1913. `quantity` decimal(22,4) NOT NULL,
  1914. `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Last purchase unit price',
  1915. `removed_purchase_line` int(11) DEFAULT NULL,
  1916. `lot_no_line_id` int(11) DEFAULT NULL,
  1917. `created_at` timestamp NULL DEFAULT NULL,
  1918. `updated_at` timestamp NULL DEFAULT NULL
  1919. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1920.  
  1921. -- --------------------------------------------------------
  1922.  
  1923. --
  1924. -- Table structure for table `subscriptions`
  1925. --
  1926.  
  1927. CREATE TABLE `subscriptions` (
  1928. `id` int(10) UNSIGNED NOT NULL,
  1929. `business_id` int(10) UNSIGNED NOT NULL,
  1930. `package_id` int(10) UNSIGNED NOT NULL,
  1931. `start_date` date DEFAULT NULL,
  1932. `trial_end_date` date DEFAULT NULL,
  1933. `end_date` date DEFAULT NULL,
  1934. `package_price` decimal(20,2) NOT NULL,
  1935. `package_details` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  1936. `created_id` int(10) UNSIGNED NOT NULL,
  1937. `paid_via` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1938. `payment_transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1939. `status` enum('approved','waiting','declined') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'waiting',
  1940. `deleted_at` timestamp NULL DEFAULT NULL,
  1941. `created_at` timestamp NULL DEFAULT NULL,
  1942. `updated_at` timestamp NULL DEFAULT NULL
  1943. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1944.  
  1945. --
  1946. -- Dumping data for table `subscriptions`
  1947. --
  1948.  
  1949. INSERT INTO `subscriptions` (`id`, `business_id`, `package_id`, `start_date`, `trial_end_date`, `end_date`, `package_price`, `package_details`, `created_id`, `paid_via`, `payment_transaction_id`, `status`, `deleted_at`, `created_at`, `updated_at`) VALUES
  1950. (1, 2, 1, '2020-01-10', '2020-02-10', '2020-02-10', '100000.00', '{\"location_count\":\"0\",\"user_count\":\"0\",\"product_count\":\"0\",\"invoice_count\":\"0\",\"name\":\"Paket100\"}', 2, 'offline', '1', 'approved', NULL, '2020-01-10 11:30:32', '2020-01-10 10:23:02'),
  1951. (2, 3, 1, '2020-02-03', '2020-03-03', '2020-03-03', '100000.00', '{\"location_count\":\"0\",\"user_count\":\"0\",\"product_count\":\"0\",\"invoice_count\":\"0\",\"name\":\"Paket100\"}', 1, 'offline', NULL, 'approved', NULL, '2020-02-03 05:43:27', '2020-02-03 05:43:27'),
  1952. (3, 4, 1, '2020-02-17', '2020-03-17', '2020-03-17', '100000.00', '{\"location_count\":\"0\",\"user_count\":\"0\",\"product_count\":\"0\",\"invoice_count\":\"0\",\"name\":\"Paket100\"}', 1, 'offline', NULL, 'approved', NULL, '2020-02-17 07:49:34', '2020-02-17 07:49:34');
  1953.  
  1954. -- --------------------------------------------------------
  1955.  
  1956. --
  1957. -- Table structure for table `superadmin_communicator_logs`
  1958. --
  1959.  
  1960. CREATE TABLE `superadmin_communicator_logs` (
  1961. `id` int(10) UNSIGNED NOT NULL,
  1962. `business_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1963. `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1964. `message` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1965. `created_at` timestamp NULL DEFAULT NULL,
  1966. `updated_at` timestamp NULL DEFAULT NULL
  1967. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1968.  
  1969. -- --------------------------------------------------------
  1970.  
  1971. --
  1972. -- Table structure for table `superadmin_frontend_pages`
  1973. --
  1974.  
  1975. CREATE TABLE `superadmin_frontend_pages` (
  1976. `id` int(10) UNSIGNED NOT NULL,
  1977. `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  1978. `slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1979. `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  1980. `is_shown` tinyint(1) NOT NULL,
  1981. `menu_order` int(11) DEFAULT 0,
  1982. `created_at` timestamp NULL DEFAULT NULL,
  1983. `updated_at` timestamp NULL DEFAULT NULL
  1984. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1985.  
  1986. -- --------------------------------------------------------
  1987.  
  1988. --
  1989. -- Table structure for table `system`
  1990. --
  1991.  
  1992. CREATE TABLE `system` (
  1993. `id` int(10) UNSIGNED NOT NULL,
  1994. `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  1995. `value` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
  1996. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1997.  
  1998. --
  1999. -- Dumping data for table `system`
  2000. --
  2001.  
  2002. INSERT INTO `system` (`id`, `key`, `value`) VALUES
  2003. (1, 'db_version', '2.18'),
  2004. (2, 'default_business_active_status', '1'),
  2005. (3, 'superadmin_version', '1.6'),
  2006. (4, 'app_currency_id', '54'),
  2007. (5, 'invoice_business_name', 'POS Kita'),
  2008. (6, 'invoice_business_landmark', 'Jln. Aren No 29'),
  2009. (7, 'invoice_business_zip', '11430'),
  2010. (8, 'invoice_business_state', 'Jakarta Barat'),
  2011. (9, 'invoice_business_city', 'DKI Jakarta'),
  2012. (10, 'invoice_business_country', 'Indonesia'),
  2013. (11, 'email', '[email protected]'),
  2014. (12, 'package_expiry_alert_days', '7'),
  2015. (13, 'enable_business_based_username', '0'),
  2016. (14, 'superadmin_register_tc', NULL),
  2017. (15, 'welcome_email_subject', NULL),
  2018. (16, 'welcome_email_body', NULL),
  2019. (17, 'superadmin_enable_register_tc', '0'),
  2020. (18, 'allow_email_settings_to_businesses', '0'),
  2021. (19, 'enable_new_business_registration_notification', '0'),
  2022. (20, 'enable_new_subscription_notification', '0'),
  2023. (21, 'enable_welcome_email', '0');
  2024.  
  2025. -- --------------------------------------------------------
  2026.  
  2027. --
  2028. -- Table structure for table `tax_rates`
  2029. --
  2030.  
  2031. CREATE TABLE `tax_rates` (
  2032. `id` int(10) UNSIGNED NOT NULL,
  2033. `business_id` int(10) UNSIGNED NOT NULL,
  2034. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2035. `amount` double(22,4) NOT NULL,
  2036. `is_tax_group` tinyint(1) NOT NULL DEFAULT 0,
  2037. `created_by` int(10) UNSIGNED NOT NULL,
  2038. `deleted_at` timestamp NULL DEFAULT NULL,
  2039. `created_at` timestamp NULL DEFAULT NULL,
  2040. `updated_at` timestamp NULL DEFAULT NULL
  2041. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2042.  
  2043. --
  2044. -- Dumping data for table `tax_rates`
  2045. --
  2046.  
  2047. INSERT INTO `tax_rates` (`id`, `business_id`, `name`, `amount`, `is_tax_group`, `created_by`, `deleted_at`, `created_at`, `updated_at`) VALUES
  2048. (1, 2, 'PPN', 10.0000, 0, 2, NULL, '2020-01-22 13:53:15', '2020-01-22 13:53:15');
  2049.  
  2050. -- --------------------------------------------------------
  2051.  
  2052. --
  2053. -- Table structure for table `tb_log_product_report_store`
  2054. --
  2055.  
  2056. CREATE TABLE `tb_log_product_report_store` (
  2057. `id` int(11) NOT NULL,
  2058. `business_id` int(10) UNSIGNED NOT NULL,
  2059. `product_id` int(11) UNSIGNED NOT NULL,
  2060. `date` date DEFAULT NULL,
  2061. `total_sale` int(11) DEFAULT NULL,
  2062. `created_at` timestamp NULL DEFAULT NULL,
  2063. `updated_at` timestamp NULL DEFAULT NULL,
  2064. `additional` varchar(50) DEFAULT NULL
  2065. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  2066.  
  2067. -- --------------------------------------------------------
  2068.  
  2069. --
  2070. -- Table structure for table `transactions`
  2071. --
  2072.  
  2073. CREATE TABLE `transactions` (
  2074. `id` int(10) UNSIGNED NOT NULL,
  2075. `business_id` int(10) UNSIGNED NOT NULL,
  2076. `location_id` int(10) UNSIGNED DEFAULT NULL,
  2077. `res_table_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'fields to restaurant module',
  2078. `res_waiter_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'fields to restaurant module',
  2079. `res_order_status` enum('received','cooked','served') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2080. `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2081. `sub_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2082. `status` enum('received','pending','ordered','draft','final') COLLATE utf8mb4_unicode_ci NOT NULL,
  2083. `is_quotation` tinyint(1) NOT NULL DEFAULT 0,
  2084. `payment_status` enum('paid','due','partial') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2085. `adjustment_type` enum('normal','abnormal') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2086. `contact_id` int(11) UNSIGNED DEFAULT NULL,
  2087. `customer_group_id` int(11) DEFAULT NULL COMMENT 'used to add customer group while selling',
  2088. `invoice_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2089. `ref_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2090. `subscription_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2091. `transaction_date` datetime NOT NULL,
  2092. `total_before_tax` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total before the purchase/invoice tax, this includeds the indivisual product tax',
  2093. `tax_id` int(10) UNSIGNED DEFAULT NULL,
  2094. `tax_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2095. `discount_type` enum('fixed','percentage') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2096. `discount_amount` decimal(22,4) DEFAULT 0.0000,
  2097. `rp_redeemed` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  2098. `rp_redeemed_amount` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'rp is the short form of reward points',
  2099. `shipping_details` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2100. `shipping_address` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2101. `shipping_status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2102. `delivered_to` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2103. `shipping_charges` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2104. `additional_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2105. `staff_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2106. `final_total` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2107. `expense_category_id` int(10) UNSIGNED DEFAULT NULL,
  2108. `expense_for` int(10) UNSIGNED DEFAULT NULL,
  2109. `commission_agent` int(11) DEFAULT NULL,
  2110. `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2111. `is_direct_sale` tinyint(1) NOT NULL DEFAULT 0,
  2112. `is_suspend` tinyint(1) NOT NULL DEFAULT 0,
  2113. `exchange_rate` decimal(20,3) NOT NULL DEFAULT 1.000,
  2114. `total_amount_recovered` decimal(22,4) DEFAULT NULL COMMENT 'Used for stock adjustment.',
  2115. `transfer_parent_id` int(11) DEFAULT NULL,
  2116. `return_parent_id` int(11) DEFAULT NULL,
  2117. `opening_stock_product_id` int(11) DEFAULT NULL,
  2118. `created_by` int(10) UNSIGNED NOT NULL,
  2119. `types_of_service_id` int(11) DEFAULT NULL,
  2120. `packing_charge` decimal(22,4) DEFAULT NULL,
  2121. `packing_charge_type` enum('fixed','percent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2122. `service_custom_field_1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2123. `service_custom_field_2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2124. `service_custom_field_3` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2125. `service_custom_field_4` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2126. `is_created_from_api` tinyint(1) NOT NULL DEFAULT 0,
  2127. `rp_earned` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  2128. `order_addresses` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2129. `is_recurring` tinyint(1) NOT NULL DEFAULT 0,
  2130. `recur_interval` double(22,4) DEFAULT NULL,
  2131. `recur_interval_type` enum('days','months','years') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2132. `recur_repetitions` int(11) DEFAULT NULL,
  2133. `recur_stopped_on` datetime DEFAULT NULL,
  2134. `recur_parent_id` int(11) DEFAULT NULL,
  2135. `invoice_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2136. `pay_term_number` int(11) DEFAULT NULL,
  2137. `pay_term_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2138. `selling_price_group_id` int(11) DEFAULT NULL,
  2139. `created_at` timestamp NULL DEFAULT NULL,
  2140. `updated_at` timestamp NULL DEFAULT NULL
  2141. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2142.  
  2143. -- --------------------------------------------------------
  2144.  
  2145. --
  2146. -- Table structure for table `transaction_payments`
  2147. --
  2148.  
  2149. CREATE TABLE `transaction_payments` (
  2150. `id` int(10) UNSIGNED NOT NULL,
  2151. `transaction_id` int(11) UNSIGNED DEFAULT NULL,
  2152. `business_id` int(11) DEFAULT NULL,
  2153. `is_return` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Used during sales to return the change',
  2154. `amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2155. `method` enum('cash','card','cheque','bank_transfer','custom_pay_1','custom_pay_2','custom_pay_3','other') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2156. `transaction_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2157. `card_transaction_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2158. `card_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2159. `card_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2160. `card_holder_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2161. `card_month` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2162. `card_year` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2163. `card_security` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2164. `cheque_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2165. `bank_account_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2166. `paid_on` datetime DEFAULT NULL,
  2167. `created_by` int(11) NOT NULL,
  2168. `payment_for` int(11) DEFAULT NULL,
  2169. `parent_id` int(11) DEFAULT NULL,
  2170. `note` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2171. `document` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2172. `payment_ref_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2173. `account_id` int(11) DEFAULT NULL,
  2174. `created_at` timestamp NULL DEFAULT NULL,
  2175. `updated_at` timestamp NULL DEFAULT NULL
  2176. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2177.  
  2178. -- --------------------------------------------------------
  2179.  
  2180. --
  2181. -- Table structure for table `transaction_sell_lines`
  2182. --
  2183.  
  2184. CREATE TABLE `transaction_sell_lines` (
  2185. `id` int(10) UNSIGNED NOT NULL,
  2186. `transaction_id` int(10) UNSIGNED NOT NULL,
  2187. `product_id` int(10) UNSIGNED NOT NULL,
  2188. `variation_id` int(10) UNSIGNED NOT NULL,
  2189. `quantity` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2190. `quantity_returned` decimal(20,4) NOT NULL DEFAULT 0.0000,
  2191. `unit_price_before_discount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2192. `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Sell price excluding tax',
  2193. `line_discount_type` enum('fixed','percentage') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2194. `line_discount_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2195. `unit_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',
  2196. `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',
  2197. `tax_id` int(10) UNSIGNED DEFAULT NULL,
  2198. `discount_id` int(11) DEFAULT NULL,
  2199. `lot_no_line_id` int(11) DEFAULT NULL,
  2200. `sell_line_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2201. `res_service_staff_id` int(11) DEFAULT NULL,
  2202. `res_line_order_status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2203. `parent_sell_line_id` int(11) DEFAULT NULL,
  2204. `children_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Type of children for the parent, like modifier or combo',
  2205. `sub_unit_id` int(11) DEFAULT NULL,
  2206. `created_at` timestamp NULL DEFAULT NULL,
  2207. `updated_at` timestamp NULL DEFAULT NULL
  2208. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2209.  
  2210. --
  2211. -- Triggers `transaction_sell_lines`
  2212. --
  2213. DELIMITER $$
  2214. CREATE TRIGGER `log_after_insert_transaction_sell_lines` AFTER INSERT ON `transaction_sell_lines` FOR EACH ROW BEGIN
  2215.  
  2216. #insert_to_log_report_specific_store
  2217. SET @business_id = (SELECT business_id FROM transactions WHERE id = NEW.transaction_id LIMIT 1);
  2218. SET @transaction_date = (SELECT CAST(transaction_date AS DATE) FROM transactions WHERE id = NEW.transaction_id LIMIT 1);
  2219. SET @existing_store = (SELECT business_id FROM tb_log_product_report_store WHERE business_id = @business_id AND product_id = NEW.product_id AND date = @transaction_date LIMIT 1);
  2220. SET @kuantiti_log_store = (SELECT SUM(total_sale) FROM tb_log_product_report_store WHERE business_id = @business_id AND product_id = NEW.product_id AND date = @transaction_date LIMIT 1);
  2221.  
  2222.  
  2223. IF (@existing_store IS NULL OR @existing_store = '') THEN
  2224. INSERT INTO tb_log_product_report_store
  2225. ( business_id,
  2226. product_id,
  2227. date,
  2228. total_sale)
  2229. VALUES
  2230. ( @business_id,
  2231. NEW.product_id,
  2232. @transaction_date,
  2233. NEW.quantity);
  2234. ELSE
  2235. UPDATE tb_log_product_report_store
  2236. SET
  2237. total_sale =(@kuantiti_log_store + NEW.quantity)
  2238. WHERE
  2239. business_id = @business_id AND product_id = NEW.product_id AND date = @transaction_date;
  2240. END IF;
  2241.  
  2242. END
  2243. $$
  2244. DELIMITER ;
  2245.  
  2246. -- --------------------------------------------------------
  2247.  
  2248. --
  2249. -- Table structure for table `transaction_sell_lines_purchase_lines`
  2250. --
  2251.  
  2252. CREATE TABLE `transaction_sell_lines_purchase_lines` (
  2253. `id` int(10) UNSIGNED NOT NULL,
  2254. `sell_line_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'id from transaction_sell_lines',
  2255. `stock_adjustment_line_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'id from stock_adjustment_lines',
  2256. `purchase_line_id` int(10) UNSIGNED NOT NULL COMMENT 'id from purchase_lines',
  2257. `quantity` decimal(22,4) NOT NULL,
  2258. `qty_returned` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2259. `created_at` timestamp NULL DEFAULT NULL,
  2260. `updated_at` timestamp NULL DEFAULT NULL
  2261. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2262.  
  2263. -- --------------------------------------------------------
  2264.  
  2265. --
  2266. -- Table structure for table `types_of_services`
  2267. --
  2268.  
  2269. CREATE TABLE `types_of_services` (
  2270. `id` int(10) UNSIGNED NOT NULL,
  2271. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2272. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2273. `business_id` int(11) NOT NULL,
  2274. `location_price_group` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2275. `packing_charge` decimal(22,4) DEFAULT NULL,
  2276. `packing_charge_type` enum('fixed','percent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2277. `enable_custom_fields` tinyint(1) NOT NULL DEFAULT 0,
  2278. `created_at` timestamp NULL DEFAULT NULL,
  2279. `updated_at` timestamp NULL DEFAULT NULL
  2280. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2281.  
  2282. -- --------------------------------------------------------
  2283.  
  2284. --
  2285. -- Table structure for table `units`
  2286. --
  2287.  
  2288. CREATE TABLE `units` (
  2289. `id` int(10) UNSIGNED NOT NULL,
  2290. `business_id` int(10) UNSIGNED NOT NULL,
  2291. `mobile_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2292. `actual_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2293. `short_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2294. `allow_decimal` tinyint(1) NOT NULL,
  2295. `base_unit_id` int(11) DEFAULT NULL,
  2296. `base_unit_multiplier` decimal(20,4) DEFAULT NULL,
  2297. `created_by` int(10) UNSIGNED NOT NULL,
  2298. `deleted_at` timestamp NULL DEFAULT NULL,
  2299. `created_at` timestamp NULL DEFAULT NULL,
  2300. `updated_at` timestamp NULL DEFAULT NULL
  2301. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2302.  
  2303. --
  2304. -- Dumping data for table `units`
  2305. --
  2306.  
  2307. INSERT INTO `units` (`id`, `business_id`, `mobile_id`, `actual_name`, `short_name`, `allow_decimal`, `base_unit_id`, `base_unit_multiplier`, `created_by`, `deleted_at`, `created_at`, `updated_at`) VALUES
  2308. (2, 3, '2323', 'kilogram (edit)', 'kg', 1, NULL, NULL, 1, NULL, NULL, NULL);
  2309.  
  2310. -- --------------------------------------------------------
  2311.  
  2312. --
  2313. -- Table structure for table `users`
  2314. --
  2315.  
  2316. CREATE TABLE `users` (
  2317. `id` int(10) UNSIGNED NOT NULL,
  2318. `surname` char(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2319. `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2320. `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2321. `username` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2322. `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2323. `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2324. `language` char(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
  2325. `contact_no` char(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2326. `address` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2327. `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2328. `auth_token_mobile` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2329. `business_id` int(10) UNSIGNED DEFAULT NULL,
  2330. `status` enum('active','inactive','terminated') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  2331. `is_cmmsn_agnt` tinyint(1) NOT NULL DEFAULT 0,
  2332. `cmmsn_percent` decimal(4,2) NOT NULL DEFAULT 0.00,
  2333. `selected_contacts` tinyint(1) NOT NULL DEFAULT 0,
  2334. `dob` date DEFAULT NULL,
  2335. `marital_status` enum('married','unmarried','divorced') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2336. `blood_group` char(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2337. `contact_number` char(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2338. `fb_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2339. `twitter_link` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2340. `social_media_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2341. `social_media_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2342. `permanent_address` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2343. `current_address` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2344. `guardian_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2345. `custom_field_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2346. `custom_field_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2347. `custom_field_3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2348. `custom_field_4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2349. `bank_details` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2350. `id_proof_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2351. `id_proof_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2352. `deleted_at` timestamp NULL DEFAULT NULL,
  2353. `created_at` timestamp NULL DEFAULT NULL,
  2354. `updated_at` timestamp NULL DEFAULT NULL
  2355. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2356.  
  2357. --
  2358. -- Dumping data for table `users`
  2359. --
  2360.  
  2361. INSERT INTO `users` (`id`, `surname`, `first_name`, `last_name`, `username`, `email`, `password`, `language`, `contact_no`, `address`, `remember_token`, `auth_token_mobile`, `business_id`, `status`, `is_cmmsn_agnt`, `cmmsn_percent`, `selected_contacts`, `dob`, `marital_status`, `blood_group`, `contact_number`, `fb_link`, `twitter_link`, `social_media_1`, `social_media_2`, `permanent_address`, `current_address`, `guardian_name`, `custom_field_1`, `custom_field_2`, `custom_field_3`, `custom_field_4`, `bank_details`, `id_proof_name`, `id_proof_number`, `deleted_at`, `created_at`, `updated_at`) VALUES
  2362. (1, 'Mr', 'Lingga', 'Permadi', 'adminkitadigi', '[email protected]', '$2y$12$pwvEdHuNwA1mc5kJ8kPR/uywEomUA1d4ANd0MnmEaMAsXjPLlvBJq', 'id', NULL, NULL, '5JMZ9aatlySkAqKSalMNkL1oKVUCQc2PAS2WQQODDG3Bql5qf1dcF0C2hzIr', 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODg3NDE0NTQsImp0aSI6Im1haW5fMSJ9.YK7Y9Uu2f1nhulfrRk5jmj_c03QA5wX-RIymL8WHlLe4Rh1ISzcUjH54LGgfwgJ6kIwtU5E5tFuebHHmXWz-2w', 1, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-01-09 06:45:33', '2020-04-07 04:36:11'),
  2363. (2, 'Mr', 'RUI', 'RUI', 'adminrui', '[email protected]', '$2y$12$O/dpJheylIXeB5UcKwixNuzdNhs13TOpMVHGsQezdv3u5B0DpS2wy', 'en', NULL, NULL, 'fgplllWFTrK8D4V5kgEF9WYZqXo9HrIHjq8ATlRxwhJXxW5s96Gya3iF3ovb', 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODYyNTg4MTYsImp0aSI6Im1haW5fMiJ9.OaWAFQNGh6pEX4rZvEtCX49y_fpKHBkYm8IRocMvviXIxezfdxdAFp7AUn_BWDCtvUnIO9cljw2MylO_pGlvqg', 2, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-01-10 09:32:53', '2020-04-07 03:26:57'),
  2364. (3, NULL, 'Kasir 1', NULL, 'kasirRUI', '[email protected]', '$2y$10$HsSa9ggNbpemVemNQTejLel7SoSVaiUgO4GJksfWzGWY4senxV.Iu', 'en', NULL, NULL, 'Mo13y4JdDxspbeWY8jR0DVj9Y9BhRWENtDnxQC3uOHie3ukmAsUeYiawEQlV', NULL, 2, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-01-10 11:54:17', '2020-02-03 05:03:06'),
  2365. (4, NULL, 'Ritel', 'Team', 'ritelteam', '[email protected]', '$2y$10$A6e7hR8JIpcc.QZZF0rl0uXzN9Kob3/C.fvEUIZWC44uD8gN72xQa', 'id', NULL, NULL, 'u57gOeFQPtmsnUDhRNBVkmQVph28cEii6lmox3Uf1iugQV6xY7wzIjII8bRu', NULL, 3, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-02-03 05:36:18', '2020-02-03 05:36:19'),
  2366. (5, NULL, 'Kasir', NULL, 'kasirritelteam', '[email protected]', '$2y$10$eUzLEy30O3/AhFoTiCWbyumblRerLNNmRkJczWeJqbPpEOCics2YG', 'id', NULL, NULL, '0RPqADFuyTViGWhKhdsDNkPeLw4UE7zR6ndbdWQdLQvXfNOJh3lXDX1WjqvB', NULL, 3, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-02-03 07:15:30', '2020-02-13 04:05:38'),
  2367. (6, NULL, 'Kasir 2', NULL, '0002', '[email protected]', '$2y$10$Ip7jNS/8K9C3m6pAg/bVOONoZrsU2Qk/K.d9J0Ds2r9gcerTHX1OG', 'en', NULL, NULL, NULL, NULL, 3, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-02-13 04:18:02', '2020-02-13 04:18:02'),
  2368. (7, NULL, 'AYU', 'AZHARI', '0003', '[email protected]', '$2y$10$WxTQipg/AxTE/DduTtaoauRIQHTIrgroaWq6U4LrQ4.dn8qoj748m', 'en', NULL, NULL, NULL, NULL, 3, 'active', 0, '1.00', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-02-13 04:34:41', '2020-02-13 04:34:41'),
  2369. (8, NULL, 'Dapur Watu Leter', NULL, 'dapurwatuleter', '[email protected]', '$2y$10$n1nMYfSDauMZGma7V.0LDuxsySpOrF1B7ZWgsUy3N3lY3ZPS9XiuS', 'id', NULL, NULL, NULL, NULL, 4, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-02-17 07:49:19', '2020-02-17 07:49:19'),
  2370. (9, NULL, 'Kasir dapurwatuleter', NULL, '0001', '[email protected]', '$2y$10$oFSvwoD2Rna0YNvmGFscD.e6jzGVGu/ZOeOo0XQn3u.vh8KUsXBVG', 'en', NULL, NULL, NULL, NULL, 4, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-02-17 08:15:57', '2020-02-17 08:15:57'),
  2371. (10, NULL, 'Dapur Watu Leter', NULL, 'POSDapurwatuleter', '[email protected]', '$2y$10$wdHoRXtloRMjtlqWc78AveDpeE2Wci.w/TaO70Yj6KSuCe/fdjFSm', 'id', NULL, NULL, '7uJ8kQFFEqL5LOE1TQOpNJkhTX9csjRBzdfOSgPeeQXVM5ViEdV6qqjSQslD', NULL, 4, 'active', 0, '0.00', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '{\"account_holder_name\":null,\"account_number\":null,\"bank_name\":null,\"bank_code\":null,\"branch\":null,\"tax_payer_id\":null}', NULL, NULL, NULL, '2020-02-17 08:20:13', '2020-02-17 08:33:51');
  2372.  
  2373. -- --------------------------------------------------------
  2374.  
  2375. --
  2376. -- Table structure for table `user_contact_access`
  2377. --
  2378.  
  2379. CREATE TABLE `user_contact_access` (
  2380. `id` int(10) UNSIGNED NOT NULL,
  2381. `user_id` int(11) NOT NULL,
  2382. `contact_id` int(11) NOT NULL
  2383. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2384.  
  2385. -- --------------------------------------------------------
  2386.  
  2387. --
  2388. -- Table structure for table `variations`
  2389. --
  2390.  
  2391. CREATE TABLE `variations` (
  2392. `id` int(10) UNSIGNED NOT NULL,
  2393. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2394. `product_id` int(10) UNSIGNED NOT NULL,
  2395. `sub_sku` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2396. `product_variation_id` int(10) UNSIGNED NOT NULL,
  2397. `variation_value_id` int(11) DEFAULT NULL,
  2398. `default_purchase_price` decimal(22,4) DEFAULT NULL,
  2399. `dpp_inc_tax` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2400. `profit_percent` decimal(22,4) NOT NULL DEFAULT 0.0000,
  2401. `default_sell_price` decimal(22,4) DEFAULT NULL,
  2402. `sell_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',
  2403. `created_at` timestamp NULL DEFAULT NULL,
  2404. `updated_at` timestamp NULL DEFAULT NULL,
  2405. `deleted_at` timestamp NULL DEFAULT NULL,
  2406. `combo_variations` text COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Contains the combo variation details'
  2407. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2408.  
  2409. -- --------------------------------------------------------
  2410.  
  2411. --
  2412. -- Table structure for table `variation_group_prices`
  2413. --
  2414.  
  2415. CREATE TABLE `variation_group_prices` (
  2416. `id` int(10) UNSIGNED NOT NULL,
  2417. `variation_id` int(10) UNSIGNED NOT NULL,
  2418. `price_group_id` int(10) UNSIGNED NOT NULL,
  2419. `price_inc_tax` decimal(22,4) NOT NULL,
  2420. `created_at` timestamp NULL DEFAULT NULL,
  2421. `updated_at` timestamp NULL DEFAULT NULL
  2422. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2423.  
  2424. -- --------------------------------------------------------
  2425.  
  2426. --
  2427. -- Table structure for table `variation_location_details`
  2428. --
  2429.  
  2430. CREATE TABLE `variation_location_details` (
  2431. `id` int(10) UNSIGNED NOT NULL,
  2432. `product_id` int(10) UNSIGNED NOT NULL,
  2433. `product_variation_id` int(10) UNSIGNED NOT NULL COMMENT 'id from product_variations table',
  2434. `variation_id` int(10) UNSIGNED NOT NULL,
  2435. `location_id` int(10) UNSIGNED NOT NULL,
  2436. `qty_available` decimal(22,4) DEFAULT NULL,
  2437. `created_at` timestamp NULL DEFAULT NULL,
  2438. `updated_at` timestamp NULL DEFAULT NULL
  2439. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2440.  
  2441. -- --------------------------------------------------------
  2442.  
  2443. --
  2444. -- Table structure for table `variation_templates`
  2445. --
  2446.  
  2447. CREATE TABLE `variation_templates` (
  2448. `id` int(10) UNSIGNED NOT NULL,
  2449. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2450. `business_id` int(10) UNSIGNED NOT NULL,
  2451. `created_at` timestamp NULL DEFAULT NULL,
  2452. `updated_at` timestamp NULL DEFAULT NULL
  2453. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2454.  
  2455. --
  2456. -- Dumping data for table `variation_templates`
  2457. --
  2458.  
  2459. INSERT INTO `variation_templates` (`id`, `name`, `business_id`, `created_at`, `updated_at`) VALUES
  2460. (1, 'XL-Merah', 3, '2020-02-13 06:29:22', '2020-02-13 06:29:22'),
  2461. (2, 'varian coba', 1, '2020-03-04 03:05:50', '2020-03-04 03:05:50');
  2462.  
  2463. -- --------------------------------------------------------
  2464.  
  2465. --
  2466. -- Table structure for table `variation_value_templates`
  2467. --
  2468.  
  2469. CREATE TABLE `variation_value_templates` (
  2470. `id` int(10) UNSIGNED NOT NULL,
  2471. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2472. `variation_template_id` int(10) UNSIGNED NOT NULL,
  2473. `created_at` timestamp NULL DEFAULT NULL,
  2474. `updated_at` timestamp NULL DEFAULT NULL
  2475. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2476.  
  2477. --
  2478. -- Dumping data for table `variation_value_templates`
  2479. --
  2480.  
  2481. INSERT INTO `variation_value_templates` (`id`, `name`, `variation_template_id`, `created_at`, `updated_at`) VALUES
  2482. (1, 'XL', 1, '2020-02-13 06:29:23', '2020-02-13 06:29:23'),
  2483. (2, '100', 2, '2020-03-04 03:05:51', '2020-03-04 03:05:51');
  2484.  
  2485. -- --------------------------------------------------------
  2486.  
  2487. --
  2488. -- Stand-in structure for view `v_get_mobile_cash_register_open`
  2489. -- (See below for the actual view)
  2490. --
  2491. CREATE TABLE `v_get_mobile_cash_register_open` (
  2492. `id` int(10) unsigned
  2493. ,`cash_register_id` int(10) unsigned
  2494. ,`transaction_id` int(11)
  2495. ,`business_id` int(10) unsigned
  2496. ,`amount` decimal(22,4)
  2497. ,`transaction_type` enum('initial','sell','transfer','refund')
  2498. ,`status` enum('close','open')
  2499. ,`created_at` timestamp
  2500. ,`updated_at` timestamp
  2501. );
  2502.  
  2503. -- --------------------------------------------------------
  2504.  
  2505. --
  2506. -- Stand-in structure for view `v_get_mobile_cash_register_transaction_open`
  2507. -- (See below for the actual view)
  2508. --
  2509. CREATE TABLE `v_get_mobile_cash_register_transaction_open` (
  2510. `id` int(10) unsigned
  2511. ,`cash_register_id` int(10) unsigned
  2512. ,`transaction_id` int(11)
  2513. ,`business_id` int(10) unsigned
  2514. ,`amount` decimal(22,4)
  2515. ,`transaction_type` enum('initial','sell','transfer','refund')
  2516. ,`status` enum('close','open')
  2517. ,`created_at` timestamp
  2518. ,`updated_at` timestamp
  2519. );
  2520.  
  2521. -- --------------------------------------------------------
  2522.  
  2523. --
  2524. -- Stand-in structure for view `v_get_mobile_categories`
  2525. -- (See below for the actual view)
  2526. --
  2527. CREATE TABLE `v_get_mobile_categories` (
  2528. `id` int(10) unsigned
  2529. ,`business_id` int(10) unsigned
  2530. ,`mobile_id` varchar(100)
  2531. ,`NAME` varchar(191)
  2532. ,`short_code` varchar(191)
  2533. );
  2534.  
  2535. -- --------------------------------------------------------
  2536.  
  2537. --
  2538. -- Stand-in structure for view `v_get_mobile_data_customer`
  2539. -- (See below for the actual view)
  2540. --
  2541. CREATE TABLE `v_get_mobile_data_customer` (
  2542. `id` int(10) unsigned
  2543. ,`id_transaction` int(10) unsigned
  2544. ,`business_id` int(10) unsigned
  2545. ,`type` enum('supplier','customer','both')
  2546. ,`name` varchar(191)
  2547. ,`email` varchar(191)
  2548. ,`contact_id` varchar(191)
  2549. ,`tax_number` varchar(191)
  2550. ,`city` varchar(191)
  2551. ,`state` varchar(191)
  2552. ,`country` varchar(191)
  2553. ,`landmark` varchar(191)
  2554. ,`mobile` varchar(191)
  2555. ,`landline` varchar(191)
  2556. ,`alternate_number` varchar(191)
  2557. ,`pay_term_type` enum('days','months')
  2558. ,`pay_term_number` int(11)
  2559. ,`customer_group_id` int(11)
  2560. ,`name_customer_group` varchar(191)
  2561. ,`credit_limit` decimal(22,4)
  2562. ,`opening_balance` decimal(22,4)
  2563. ,`custom_field1` varchar(191)
  2564. ,`custom_field2` varchar(191)
  2565. ,`custom_field3` varchar(191)
  2566. ,`custom_field4` varchar(191)
  2567. ,`created_by` varchar(394)
  2568. ,`created_at` timestamp
  2569. ,`updated_at` timestamp
  2570. );
  2571.  
  2572. -- --------------------------------------------------------
  2573.  
  2574. --
  2575. -- Stand-in structure for view `v_get_mobile_data_supplier`
  2576. -- (See below for the actual view)
  2577. --
  2578. CREATE TABLE `v_get_mobile_data_supplier` (
  2579. `id` int(10) unsigned
  2580. ,`business_id` int(10) unsigned
  2581. ,`type` enum('supplier','customer','both')
  2582. ,`supplier_business_name` varchar(191)
  2583. ,`name` varchar(191)
  2584. ,`email` varchar(191)
  2585. ,`contact_id` varchar(191)
  2586. ,`tax_number` varchar(191)
  2587. ,`city` varchar(191)
  2588. ,`state` varchar(191)
  2589. ,`country` varchar(191)
  2590. ,`landmark` varchar(191)
  2591. ,`mobile` varchar(191)
  2592. ,`landline` varchar(191)
  2593. ,`alternate_number` varchar(191)
  2594. ,`pay_term_number` int(11)
  2595. ,`pay_term_type` enum('days','months')
  2596. ,`credit_limit` decimal(22,4)
  2597. ,`created_by` int(10) unsigned
  2598. ,`total_rp` int(11)
  2599. ,`total_rp_used` int(11)
  2600. ,`total_rp_expired` int(11)
  2601. ,`is_default` tinyint(1)
  2602. ,`customer_group_id` int(11)
  2603. ,`custom_field1` varchar(191)
  2604. ,`custom_field2` varchar(191)
  2605. ,`custom_field3` varchar(191)
  2606. ,`custom_field4` varchar(191)
  2607. ,`deleted_at` timestamp
  2608. ,`created_at` timestamp
  2609. ,`updated_at` timestamp
  2610. );
  2611.  
  2612. -- --------------------------------------------------------
  2613.  
  2614. --
  2615. -- Stand-in structure for view `v_get_mobile_master_products`
  2616. -- (See below for the actual view)
  2617. --
  2618. CREATE TABLE `v_get_mobile_master_products` (
  2619. `id` int(10) unsigned
  2620. ,`business_id` int(10) unsigned
  2621. ,`mobile_id` varchar(100)
  2622. ,`category_id` int(10) unsigned
  2623. ,`sub_category_id` int(10) unsigned
  2624. ,`variation_id` int(10) unsigned
  2625. ,`product_variation_id` int(10) unsigned
  2626. ,`units_id` int(10) unsigned
  2627. ,`brands_id` int(10) unsigned
  2628. ,`type` enum('single','variable','modifier','combo')
  2629. ,`sku` varchar(191)
  2630. ,`name_product` varchar(191)
  2631. ,`brands_name` varchar(191)
  2632. ,`name_category` varchar(191)
  2633. ,`name_sub_category` varchar(191)
  2634. ,`units_name` varchar(191)
  2635. ,`image` varchar(191)
  2636. ,`qty_stock` decimal(22,4)
  2637. ,`qty_minimum` decimal(22,4)
  2638. ,`profit_percent` decimal(22,4)
  2639. ,`purchase_price` decimal(22,4)
  2640. ,`sell_price` decimal(22,4)
  2641. );
  2642.  
  2643. -- --------------------------------------------------------
  2644.  
  2645. --
  2646. -- Stand-in structure for view `v_get_mobile_products_stock`
  2647. -- (See below for the actual view)
  2648. --
  2649. CREATE TABLE `v_get_mobile_products_stock` (
  2650. `id` int(10) unsigned
  2651. ,`business_id` int(10) unsigned
  2652. ,`category_id` int(10) unsigned
  2653. ,`sub_category_id` int(10) unsigned
  2654. ,`units_id` int(10) unsigned
  2655. ,`brands_id` int(10) unsigned
  2656. ,`type` enum('single','variable','modifier','combo')
  2657. ,`sku` varchar(191)
  2658. ,`name_product` varchar(191)
  2659. ,`brands_name` varchar(191)
  2660. ,`name_category` varchar(191)
  2661. ,`name_sub_category` varchar(191)
  2662. ,`image` varchar(191)
  2663. ,`qty_available` decimal(22,4)
  2664. ,`units_name` varchar(191)
  2665. ,`profit_percent` decimal(22,4)
  2666. ,`purchase_price` decimal(22,4)
  2667. ,`sell_price` decimal(22,4)
  2668. );
  2669.  
  2670. -- --------------------------------------------------------
  2671.  
  2672. --
  2673. -- Stand-in structure for view `v_get_mobile_report_purchase_order`
  2674. -- (See below for the actual view)
  2675. --
  2676. CREATE TABLE `v_get_mobile_report_purchase_order` (
  2677. `id` int(10) unsigned
  2678. ,`business_id` int(10) unsigned
  2679. ,`ref_no` varchar(191)
  2680. ,`payment_ref_no` varchar(191)
  2681. ,`transaction_date` datetime
  2682. ,`payment_method` enum('cash','card','cheque','bank_transfer','custom_pay_1','custom_pay_2','custom_pay_3','other')
  2683. ,`amount` decimal(22,4)
  2684. ,`qty` decimal(44,4)
  2685. ,`created_at` timestamp
  2686. ,`updated_at` timestamp
  2687. );
  2688.  
  2689. -- --------------------------------------------------------
  2690.  
  2691. --
  2692. -- Stand-in structure for view `v_get_mobile_report_purchase_order_detail`
  2693. -- (See below for the actual view)
  2694. --
  2695. CREATE TABLE `v_get_mobile_report_purchase_order_detail` (
  2696. `id` int(10) unsigned
  2697. ,`business_id` int(10) unsigned
  2698. ,`transaction_id` int(10) unsigned
  2699. ,`product_id` int(10) unsigned
  2700. ,`name_product` varchar(191)
  2701. ,`name_unit` varchar(191)
  2702. ,`name_categories` varchar(191)
  2703. ,`name_brands` varchar(191)
  2704. ,`image` varchar(191)
  2705. ,`quantity` decimal(22,4)
  2706. ,`purchase_price` decimal(22,4)
  2707. ,`sub_total` decimal(44,8)
  2708. ,`transaction_date` datetime
  2709. );
  2710.  
  2711. -- --------------------------------------------------------
  2712.  
  2713. --
  2714. -- Stand-in structure for view `v_get_mobile_report_revenue`
  2715. -- (See below for the actual view)
  2716. --
  2717. CREATE TABLE `v_get_mobile_report_revenue` (
  2718. `id` int(10) unsigned
  2719. ,`business_id` int(10) unsigned
  2720. ,`invoice_no` varchar(191)
  2721. ,`payment_ref_no` varchar(191)
  2722. ,`transaction_date` datetime
  2723. ,`payment_method` enum('cash','card','cheque','bank_transfer','custom_pay_1','custom_pay_2','custom_pay_3','other')
  2724. ,`amount` decimal(22,4)
  2725. ,`qty` decimal(44,4)
  2726. ,`created_at` timestamp
  2727. ,`updated_at` timestamp
  2728. );
  2729.  
  2730. -- --------------------------------------------------------
  2731.  
  2732. --
  2733. -- Stand-in structure for view `v_get_mobile_report_stock`
  2734. -- (See below for the actual view)
  2735. --
  2736. CREATE TABLE `v_get_mobile_report_stock` (
  2737. `id` int(10) unsigned
  2738. ,`business_id` int(10) unsigned
  2739. ,`category_id` int(10) unsigned
  2740. ,`units_id` int(10) unsigned
  2741. ,`brands_id` int(10) unsigned
  2742. ,`type` enum('single','variable','modifier','combo')
  2743. ,`sku` varchar(191)
  2744. ,`name_product` varchar(191)
  2745. ,`brands_name` varchar(191)
  2746. ,`name_category` varchar(191)
  2747. ,`image` varchar(191)
  2748. ,`qty_available` decimal(22,4)
  2749. ,`units_name` varchar(191)
  2750. ,`purchase_price` decimal(22,4)
  2751. ,`sell_price` decimal(22,4)
  2752. ,`current_price` decimal(44,8)
  2753. ,`quantity_sold` decimal(22,4)
  2754. );
  2755.  
  2756. -- --------------------------------------------------------
  2757.  
  2758. --
  2759. -- Stand-in structure for view `v_get_mobile_report_stock_detail`
  2760. -- (See below for the actual view)
  2761. --
  2762. CREATE TABLE `v_get_mobile_report_stock_detail` (
  2763. `id` int(10) unsigned
  2764. ,`business_id` int(10) unsigned
  2765. ,`type` varchar(255)
  2766. ,`status` enum('received','pending','ordered','draft','final')
  2767. ,`payment_status` enum('paid','due','partial')
  2768. ,`invoice_no` varchar(191)
  2769. ,`ref_no` varchar(191)
  2770. ,`transaction_date` datetime
  2771. ,`product_po_id` int(10) unsigned
  2772. ,`product_po_code` varchar(191)
  2773. ,`product_po_name` varchar(191)
  2774. ,`product_po_qty` decimal(22,4)
  2775. ,`product_so_id` int(10) unsigned
  2776. ,`product_so_name` varchar(191)
  2777. ,`product_so_code` varchar(191)
  2778. ,`product_so_qty` decimal(22,4)
  2779. );
  2780.  
  2781. -- --------------------------------------------------------
  2782.  
  2783. --
  2784. -- Stand-in structure for view `v_get_mobile_report_transaction`
  2785. -- (See below for the actual view)
  2786. --
  2787. CREATE TABLE `v_get_mobile_report_transaction` (
  2788. `id` int(10) unsigned
  2789. ,`business_id` int(10) unsigned
  2790. ,`invoice_no` varchar(191)
  2791. ,`payment_ref_no` varchar(191)
  2792. ,`transaction_date` datetime
  2793. ,`payment_method` enum('cash','card','cheque','bank_transfer','custom_pay_1','custom_pay_2','custom_pay_3','other')
  2794. ,`amount` decimal(22,4)
  2795. ,`qty` decimal(44,4)
  2796. ,`created_at` timestamp
  2797. ,`updated_at` timestamp
  2798. );
  2799.  
  2800. -- --------------------------------------------------------
  2801.  
  2802. --
  2803. -- Stand-in structure for view `v_get_mobile_report_transaction_detail`
  2804. -- (See below for the actual view)
  2805. --
  2806. CREATE TABLE `v_get_mobile_report_transaction_detail` (
  2807. `id` int(10) unsigned
  2808. ,`business_id` int(10) unsigned
  2809. ,`transaction_id` int(10) unsigned
  2810. ,`product_id` int(10) unsigned
  2811. ,`name_product` varchar(191)
  2812. ,`name_unit` varchar(191)
  2813. ,`name_categories` varchar(191)
  2814. ,`name_brands` varchar(191)
  2815. ,`image` varchar(191)
  2816. ,`quantity` decimal(22,4)
  2817. ,`unit_price` decimal(22,4)
  2818. ,`sub_total` decimal(44,8)
  2819. ,`transaction_date` datetime
  2820. );
  2821.  
  2822. -- --------------------------------------------------------
  2823.  
  2824. --
  2825. -- Stand-in structure for view `v_get_mobile_users`
  2826. -- (See below for the actual view)
  2827. --
  2828. CREATE TABLE `v_get_mobile_users` (
  2829. `id` int(10) unsigned
  2830. ,`business_id` int(10) unsigned
  2831. ,`business_code` int(6) unsigned zerofill
  2832. ,`location_id` int(10) unsigned
  2833. ,`surname` char(10)
  2834. ,`first_name` varchar(191)
  2835. ,`last_name` varchar(191)
  2836. ,`username` varchar(191)
  2837. ,`email` varchar(191)
  2838. ,`password` varchar(191)
  2839. ,`remember_token` varchar(100)
  2840. ,`auth_token_mobile` varchar(200)
  2841. ,`address` text
  2842. ,`status` enum('active','inactive','terminated')
  2843. );
  2844.  
  2845. -- --------------------------------------------------------
  2846.  
  2847. --
  2848. -- Table structure for table `warranties`
  2849. --
  2850.  
  2851. CREATE TABLE `warranties` (
  2852. `id` int(10) UNSIGNED NOT NULL,
  2853. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  2854. `business_id` int(11) NOT NULL,
  2855. `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  2856. `duration` int(11) NOT NULL,
  2857. `duration_type` enum('days','months','years') COLLATE utf8mb4_unicode_ci NOT NULL,
  2858. `created_at` timestamp NULL DEFAULT NULL,
  2859. `updated_at` timestamp NULL DEFAULT NULL
  2860. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  2861.  
  2862. -- --------------------------------------------------------
  2863.  
  2864. --
  2865. -- Structure for view `v_get_mobile_cash_register_open`
  2866. --
  2867. DROP TABLE IF EXISTS `v_get_mobile_cash_register_open`;
  2868.  
  2869. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_cash_register_open` AS select `crs`.`id` AS `id`,`cr`.`id` AS `cash_register_id`,`crs`.`transaction_id` AS `transaction_id`,`cr`.`business_id` AS `business_id`,`crs`.`amount` AS `amount`,`crs`.`transaction_type` AS `transaction_type`,`cr`.`status` AS `status`,`crs`.`created_at` AS `created_at`,`crs`.`updated_at` AS `updated_at` from (`cash_register_transactions` `crs` left join `cash_registers` `cr` on(`crs`.`cash_register_id` = `cr`.`id`)) where `cr`.`status` = 'open' and `crs`.`transaction_type` = 'initial' ;
  2870.  
  2871. -- --------------------------------------------------------
  2872.  
  2873. --
  2874. -- Structure for view `v_get_mobile_cash_register_transaction_open`
  2875. --
  2876. DROP TABLE IF EXISTS `v_get_mobile_cash_register_transaction_open`;
  2877.  
  2878. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_cash_register_transaction_open` AS select `crs`.`id` AS `id`,`cr`.`id` AS `cash_register_id`,`crs`.`transaction_id` AS `transaction_id`,`cr`.`business_id` AS `business_id`,`crs`.`amount` AS `amount`,`crs`.`transaction_type` AS `transaction_type`,`cr`.`status` AS `status`,`crs`.`created_at` AS `created_at`,`crs`.`updated_at` AS `updated_at` from (`cash_register_transactions` `crs` left join `cash_registers` `cr` on(`crs`.`cash_register_id` = `cr`.`id`)) where `cr`.`status` = 'open' and `crs`.`transaction_type` = 'sell' ;
  2879.  
  2880. -- --------------------------------------------------------
  2881.  
  2882. --
  2883. -- Structure for view `v_get_mobile_categories`
  2884. --
  2885. DROP TABLE IF EXISTS `v_get_mobile_categories`;
  2886.  
  2887. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_categories` AS select `categories`.`id` AS `id`,`categories`.`business_id` AS `business_id`,`categories`.`mobile_id` AS `mobile_id`,`categories`.`name` AS `NAME`,`categories`.`short_code` AS `short_code` from `categories` where `categories`.`parent_id` = 0 ;
  2888.  
  2889. -- --------------------------------------------------------
  2890.  
  2891. --
  2892. -- Structure for view `v_get_mobile_data_customer`
  2893. --
  2894. DROP TABLE IF EXISTS `v_get_mobile_data_customer`;
  2895.  
  2896. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_data_customer` AS select `contacts`.`id` AS `id`,`transactions`.`id` AS `id_transaction`,`contacts`.`business_id` AS `business_id`,`contacts`.`type` AS `type`,`contacts`.`name` AS `name`,`contacts`.`email` AS `email`,`contacts`.`contact_id` AS `contact_id`,`contacts`.`tax_number` AS `tax_number`,`contacts`.`city` AS `city`,`contacts`.`state` AS `state`,`contacts`.`country` AS `country`,`contacts`.`landmark` AS `landmark`,`contacts`.`mobile` AS `mobile`,`contacts`.`landline` AS `landline`,`contacts`.`alternate_number` AS `alternate_number`,`contacts`.`pay_term_type` AS `pay_term_type`,`contacts`.`pay_term_number` AS `pay_term_number`,`contacts`.`customer_group_id` AS `customer_group_id`,`customer_groups`.`name` AS `name_customer_group`,`contacts`.`credit_limit` AS `credit_limit`,`transactions`.`final_total` AS `opening_balance`,`contacts`.`custom_field1` AS `custom_field1`,`contacts`.`custom_field2` AS `custom_field2`,`contacts`.`custom_field3` AS `custom_field3`,`contacts`.`custom_field4` AS `custom_field4`,concat(`users`.`surname`,' ',`users`.`first_name`,' ',`users`.`last_name`) AS `created_by`,`contacts`.`created_at` AS `created_at`,`contacts`.`updated_at` AS `updated_at` from (((`contacts` left join `users` on(`contacts`.`created_by` = `users`.`id`)) left join `transactions` on(`contacts`.`id` = `transactions`.`contact_id`)) left join `customer_groups` on(`contacts`.`customer_group_id` = `customer_groups`.`id`)) where `contacts`.`type` = 'customer' group by `contacts`.`id` ;
  2897.  
  2898. -- --------------------------------------------------------
  2899.  
  2900. --
  2901. -- Structure for view `v_get_mobile_data_supplier`
  2902. --
  2903. DROP TABLE IF EXISTS `v_get_mobile_data_supplier`;
  2904.  
  2905. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_data_supplier` AS select `contacts`.`id` AS `id`,`contacts`.`business_id` AS `business_id`,`contacts`.`type` AS `type`,`contacts`.`supplier_business_name` AS `supplier_business_name`,`contacts`.`name` AS `name`,`contacts`.`email` AS `email`,`contacts`.`contact_id` AS `contact_id`,`contacts`.`tax_number` AS `tax_number`,`contacts`.`city` AS `city`,`contacts`.`state` AS `state`,`contacts`.`country` AS `country`,`contacts`.`landmark` AS `landmark`,`contacts`.`mobile` AS `mobile`,`contacts`.`landline` AS `landline`,`contacts`.`alternate_number` AS `alternate_number`,`contacts`.`pay_term_number` AS `pay_term_number`,`contacts`.`pay_term_type` AS `pay_term_type`,`contacts`.`credit_limit` AS `credit_limit`,`contacts`.`created_by` AS `created_by`,`contacts`.`total_rp` AS `total_rp`,`contacts`.`total_rp_used` AS `total_rp_used`,`contacts`.`total_rp_expired` AS `total_rp_expired`,`contacts`.`is_default` AS `is_default`,`contacts`.`customer_group_id` AS `customer_group_id`,`contacts`.`custom_field1` AS `custom_field1`,`contacts`.`custom_field2` AS `custom_field2`,`contacts`.`custom_field3` AS `custom_field3`,`contacts`.`custom_field4` AS `custom_field4`,`contacts`.`deleted_at` AS `deleted_at`,`contacts`.`created_at` AS `created_at`,`contacts`.`updated_at` AS `updated_at` from `contacts` where `contacts`.`type` = 'supplier' ;
  2906.  
  2907. -- --------------------------------------------------------
  2908.  
  2909. --
  2910. -- Structure for view `v_get_mobile_master_products`
  2911. --
  2912. DROP TABLE IF EXISTS `v_get_mobile_master_products`;
  2913.  
  2914. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_master_products` AS select `products`.`id` AS `id`,`products`.`business_id` AS `business_id`,`products`.`mobile_id` AS `mobile_id`,`c1`.`id` AS `category_id`,`c2`.`id` AS `sub_category_id`,`v`.`id` AS `variation_id`,`pv`.`id` AS `product_variation_id`,`units`.`id` AS `units_id`,`brands`.`id` AS `brands_id`,`products`.`type` AS `type`,`products`.`sku` AS `sku`,`products`.`name` AS `name_product`,`brands`.`name` AS `brands_name`,`c1`.`name` AS `name_category`,`c2`.`name` AS `name_sub_category`,`units`.`actual_name` AS `units_name`,`products`.`image` AS `image`,(select `variation_location_details`.`qty_available` from `variation_location_details` where `variation_location_details`.`product_id` = `products`.`id`) AS `qty_stock`,`products`.`alert_quantity` AS `qty_minimum`,`v`.`profit_percent` AS `profit_percent`,`v`.`dpp_inc_tax` AS `purchase_price`,`v`.`sell_price_inc_tax` AS `sell_price` from (((((((`products` left join `categories` `c1` on(`products`.`category_id` = `c1`.`id`)) left join `categories` `c2` on(`products`.`sub_category_id` = `c2`.`id`)) left join `units` on(`products`.`unit_id` = `units`.`id`)) left join `brands` on(`products`.`brand_id` = `brands`.`id`)) left join `variations` `v` on(`products`.`id` = `v`.`product_id`)) left join `product_variations` `pv` on(`v`.`product_variation_id` = `pv`.`id`)) left join `variation_location_details` `vld` on(`v`.`id` = `vld`.`variation_id`)) group by `products`.`id` ;
  2915.  
  2916. -- --------------------------------------------------------
  2917.  
  2918. --
  2919. -- Structure for view `v_get_mobile_products_stock`
  2920. --
  2921. DROP TABLE IF EXISTS `v_get_mobile_products_stock`;
  2922.  
  2923. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_products_stock` AS select `products`.`id` AS `id`,`products`.`business_id` AS `business_id`,`c1`.`id` AS `category_id`,`c2`.`id` AS `sub_category_id`,`units`.`id` AS `units_id`,`brands`.`id` AS `brands_id`,`products`.`type` AS `type`,`products`.`sku` AS `sku`,`products`.`name` AS `name_product`,`brands`.`name` AS `brands_name`,`c1`.`name` AS `name_category`,`c2`.`name` AS `name_sub_category`,`products`.`image` AS `image`,(select `variation_location_details`.`qty_available` from `variation_location_details` where `variation_location_details`.`product_id` = `products`.`id`) AS `qty_available`,`units`.`actual_name` AS `units_name`,`v`.`profit_percent` AS `profit_percent`,`v`.`dpp_inc_tax` AS `purchase_price`,`v`.`sell_price_inc_tax` AS `sell_price` from ((((((`products` left join `categories` `c1` on(`products`.`category_id` = `c1`.`id`)) left join `categories` `c2` on(`products`.`sub_category_id` = `c2`.`id`)) left join `units` on(`products`.`unit_id` = `units`.`id`)) left join `brands` on(`products`.`brand_id` = `brands`.`id`)) left join `variations` `v` on(`products`.`id` = `v`.`product_id`)) left join `variation_location_details` `vld` on(`v`.`id` = `vld`.`variation_id`)) group by `products`.`id` ;
  2924.  
  2925. -- --------------------------------------------------------
  2926.  
  2927. --
  2928. -- Structure for view `v_get_mobile_report_purchase_order`
  2929. --
  2930. DROP TABLE IF EXISTS `v_get_mobile_report_purchase_order`;
  2931.  
  2932. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_purchase_order` AS select `transactions`.`id` AS `id`,`transactions`.`business_id` AS `business_id`,`transactions`.`ref_no` AS `ref_no`,`transaction_payments`.`payment_ref_no` AS `payment_ref_no`,`transactions`.`transaction_date` AS `transaction_date`,`transaction_payments`.`method` AS `payment_method`,`transactions`.`total_before_tax` AS `amount`,(select sum(`pl`.`quantity`) from `purchase_lines` `pl` where `pl`.`transaction_id` = `transactions`.`id`) AS `qty`,`transactions`.`created_at` AS `created_at`,`transactions`.`updated_at` AS `updated_at` from (`transactions` left join `transaction_payments` on(`transactions`.`id` = `transaction_payments`.`transaction_id`)) where `transactions`.`type` = 'purchase' ;
  2933.  
  2934. -- --------------------------------------------------------
  2935.  
  2936. --
  2937. -- Structure for view `v_get_mobile_report_purchase_order_detail`
  2938. --
  2939. DROP TABLE IF EXISTS `v_get_mobile_report_purchase_order_detail`;
  2940.  
  2941. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_purchase_order_detail` AS select `purchase_lines`.`id` AS `id`,`transactions`.`business_id` AS `business_id`,`transactions`.`id` AS `transaction_id`,`products`.`id` AS `product_id`,`products`.`name` AS `name_product`,`units`.`actual_name` AS `name_unit`,`categories`.`name` AS `name_categories`,`brands`.`name` AS `name_brands`,`products`.`image` AS `image`,`purchase_lines`.`quantity` AS `quantity`,`purchase_lines`.`purchase_price` AS `purchase_price`,`purchase_lines`.`quantity` * `purchase_lines`.`purchase_price` AS `sub_total`,`transactions`.`transaction_date` AS `transaction_date` from (((((`purchase_lines` left join `transactions` on(`purchase_lines`.`transaction_id` = `transactions`.`id`)) left join `products` on(`purchase_lines`.`product_id` = `products`.`id`)) left join `units` on(`products`.`unit_id` = `units`.`id`)) left join `categories` on(`products`.`category_id` = `categories`.`id`)) left join `brands` on(`products`.`brand_id` = `brands`.`id`)) where `transactions`.`type` = 'purchase' ;
  2942.  
  2943. -- --------------------------------------------------------
  2944.  
  2945. --
  2946. -- Structure for view `v_get_mobile_report_revenue`
  2947. --
  2948. DROP TABLE IF EXISTS `v_get_mobile_report_revenue`;
  2949.  
  2950. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_revenue` AS select `transactions`.`id` AS `id`,`transactions`.`business_id` AS `business_id`,`transactions`.`invoice_no` AS `invoice_no`,`transaction_payments`.`payment_ref_no` AS `payment_ref_no`,`transactions`.`transaction_date` AS `transaction_date`,`transaction_payments`.`method` AS `payment_method`,`transactions`.`total_before_tax` AS `amount`,(select sum(`tsl`.`quantity`) from `transaction_sell_lines` `tsl` where `tsl`.`transaction_id` = `transactions`.`id`) AS `qty`,`transactions`.`created_at` AS `created_at`,`transactions`.`updated_at` AS `updated_at` from (`transactions` left join `transaction_payments` on(`transactions`.`id` = `transaction_payments`.`transaction_id`)) where `transactions`.`type` = 'sell' ;
  2951.  
  2952. -- --------------------------------------------------------
  2953.  
  2954. --
  2955. -- Structure for view `v_get_mobile_report_stock`
  2956. --
  2957. DROP TABLE IF EXISTS `v_get_mobile_report_stock`;
  2958.  
  2959. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_stock` AS select `products`.`id` AS `id`,`products`.`business_id` AS `business_id`,`c1`.`id` AS `category_id`,`units`.`id` AS `units_id`,`brands`.`id` AS `brands_id`,`products`.`type` AS `type`,`products`.`sku` AS `sku`,`products`.`name` AS `name_product`,`brands`.`name` AS `brands_name`,`c1`.`name` AS `name_category`,`products`.`image` AS `image`,(select `variation_location_details`.`qty_available` from `variation_location_details` where `variation_location_details`.`product_id` = `products`.`id`) AS `qty_available`,`units`.`actual_name` AS `units_name`,`v`.`dpp_inc_tax` AS `purchase_price`,`v`.`sell_price_inc_tax` AS `sell_price`,`vld`.`qty_available` * `v`.`dpp_inc_tax` AS `current_price`,`purchase_lines`.`quantity_sold` AS `quantity_sold` from ((((((`products` left join `categories` `c1` on(`products`.`category_id` = `c1`.`id`)) left join `units` on(`products`.`unit_id` = `units`.`id`)) left join `brands` on(`products`.`brand_id` = `brands`.`id`)) left join `variations` `v` on(`products`.`id` = `v`.`product_id`)) left join `variation_location_details` `vld` on(`v`.`id` = `vld`.`variation_id`)) left join `purchase_lines` on(`products`.`id` = `purchase_lines`.`product_id`)) group by `products`.`id` ;
  2960.  
  2961. -- --------------------------------------------------------
  2962.  
  2963. --
  2964. -- Structure for view `v_get_mobile_report_stock_detail`
  2965. --
  2966. DROP TABLE IF EXISTS `v_get_mobile_report_stock_detail`;
  2967.  
  2968. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_stock_detail` AS select `transactions`.`id` AS `id`,`transactions`.`business_id` AS `business_id`,`transactions`.`type` AS `type`,`transactions`.`status` AS `status`,`transactions`.`payment_status` AS `payment_status`,`transactions`.`invoice_no` AS `invoice_no`,`transactions`.`ref_no` AS `ref_no`,`transactions`.`transaction_date` AS `transaction_date`,`product_po`.`id` AS `product_po_id`,`product_po`.`sku` AS `product_po_code`,`product_po`.`name` AS `product_po_name`,`po`.`quantity` AS `product_po_qty`,`product_so`.`id` AS `product_so_id`,`product_so`.`name` AS `product_so_name`,`product_so`.`sku` AS `product_so_code`,`tsl`.`quantity` AS `product_so_qty` from ((((`transactions` left join `purchase_lines` `po` on(`transactions`.`id` = `po`.`transaction_id`)) left join `transaction_sell_lines` `tsl` on(`transactions`.`id` = `tsl`.`transaction_id`)) left join `products` `product_po` on(`po`.`product_id` = `product_po`.`id`)) left join `products` `product_so` on(`tsl`.`product_id` = `product_so`.`id`)) order by `transactions`.`transaction_date` desc ;
  2969.  
  2970. -- --------------------------------------------------------
  2971.  
  2972. --
  2973. -- Structure for view `v_get_mobile_report_transaction`
  2974. --
  2975. DROP TABLE IF EXISTS `v_get_mobile_report_transaction`;
  2976.  
  2977. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_transaction` AS select `transactions`.`id` AS `id`,`transactions`.`business_id` AS `business_id`,`transactions`.`invoice_no` AS `invoice_no`,`transaction_payments`.`payment_ref_no` AS `payment_ref_no`,`transactions`.`transaction_date` AS `transaction_date`,`transaction_payments`.`method` AS `payment_method`,`transactions`.`total_before_tax` AS `amount`,(select sum(`tsl`.`quantity`) from `transaction_sell_lines` `tsl` where `tsl`.`transaction_id` = `transactions`.`id`) AS `qty`,`transactions`.`created_at` AS `created_at`,`transactions`.`updated_at` AS `updated_at` from (`transactions` left join `transaction_payments` on(`transactions`.`id` = `transaction_payments`.`transaction_id`)) where `transactions`.`type` = 'sell' ;
  2978.  
  2979. -- --------------------------------------------------------
  2980.  
  2981. --
  2982. -- Structure for view `v_get_mobile_report_transaction_detail`
  2983. --
  2984. DROP TABLE IF EXISTS `v_get_mobile_report_transaction_detail`;
  2985.  
  2986. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_report_transaction_detail` AS select `tsl`.`id` AS `id`,`transactions`.`business_id` AS `business_id`,`tsl`.`transaction_id` AS `transaction_id`,`products`.`id` AS `product_id`,`products`.`name` AS `name_product`,`units`.`actual_name` AS `name_unit`,`categories`.`name` AS `name_categories`,`brands`.`name` AS `name_brands`,`products`.`image` AS `image`,`tsl`.`quantity` AS `quantity`,`tsl`.`unit_price` AS `unit_price`,`tsl`.`quantity` * `tsl`.`unit_price` AS `sub_total`,`transactions`.`transaction_date` AS `transaction_date` from (((((`transaction_sell_lines` `tsl` left join `products` on(`tsl`.`product_id` = `products`.`id`)) left join `transactions` on(`tsl`.`transaction_id` = `transactions`.`id`)) left join `units` on(`products`.`unit_id` = `units`.`id`)) left join `categories` on(`products`.`category_id` = `categories`.`id`)) left join `brands` on(`products`.`brand_id` = `brands`.`id`)) ;
  2987.  
  2988. -- --------------------------------------------------------
  2989.  
  2990. --
  2991. -- Structure for view `v_get_mobile_users`
  2992. --
  2993. DROP TABLE IF EXISTS `v_get_mobile_users`;
  2994.  
  2995. CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_get_mobile_users` AS select `users`.`id` AS `id`,`users`.`business_id` AS `business_id`,`business`.`business_code` AS `business_code`,`business_locations`.`id` AS `location_id`,`users`.`surname` AS `surname`,`users`.`first_name` AS `first_name`,`users`.`last_name` AS `last_name`,`users`.`username` AS `username`,`users`.`email` AS `email`,`users`.`password` AS `password`,`users`.`remember_token` AS `remember_token`,`users`.`auth_token_mobile` AS `auth_token_mobile`,`users`.`address` AS `address`,`users`.`status` AS `status` from ((`users` left join `business_locations` on(`users`.`business_id` = `business_locations`.`business_id`)) left join `business` on(`business_locations`.`business_id` = `business`.`id`)) group by `users`.`id` ;
  2996.  
  2997. --
  2998. -- Indexes for dumped tables
  2999. --
  3000.  
  3001. --
  3002. -- Indexes for table `accounts`
  3003. --
  3004. ALTER TABLE `accounts`
  3005. ADD PRIMARY KEY (`id`);
  3006.  
  3007. --
  3008. -- Indexes for table `account_transactions`
  3009. --
  3010. ALTER TABLE `account_transactions`
  3011. ADD PRIMARY KEY (`id`),
  3012. ADD KEY `account_transactions_account_id_index` (`account_id`),
  3013. ADD KEY `account_transactions_transaction_id_index` (`transaction_id`),
  3014. ADD KEY `account_transactions_transaction_payment_id_index` (`transaction_payment_id`),
  3015. ADD KEY `account_transactions_transfer_transaction_id_index` (`transfer_transaction_id`),
  3016. ADD KEY `account_transactions_created_by_index` (`created_by`);
  3017.  
  3018. --
  3019. -- Indexes for table `account_types`
  3020. --
  3021. ALTER TABLE `account_types`
  3022. ADD PRIMARY KEY (`id`);
  3023.  
  3024. --
  3025. -- Indexes for table `activity_log`
  3026. --
  3027. ALTER TABLE `activity_log`
  3028. ADD PRIMARY KEY (`id`),
  3029. ADD KEY `activity_log_log_name_index` (`log_name`);
  3030.  
  3031. --
  3032. -- Indexes for table `barcodes`
  3033. --
  3034. ALTER TABLE `barcodes`
  3035. ADD PRIMARY KEY (`id`),
  3036. ADD KEY `barcodes_business_id_foreign` (`business_id`);
  3037.  
  3038. --
  3039. -- Indexes for table `belidetail`
  3040. --
  3041. ALTER TABLE `belidetail`
  3042. ADD PRIMARY KEY (`id`);
  3043.  
  3044. --
  3045. -- Indexes for table `belimaster`
  3046. --
  3047. ALTER TABLE `belimaster`
  3048. ADD PRIMARY KEY (`id`);
  3049.  
  3050. --
  3051. -- Indexes for table `bookings`
  3052. --
  3053. ALTER TABLE `bookings`
  3054. ADD PRIMARY KEY (`id`),
  3055. ADD KEY `bookings_contact_id_foreign` (`contact_id`),
  3056. ADD KEY `bookings_business_id_foreign` (`business_id`),
  3057. ADD KEY `bookings_created_by_foreign` (`created_by`),
  3058. ADD KEY `bookings_table_id_index` (`table_id`),
  3059. ADD KEY `bookings_waiter_id_index` (`waiter_id`),
  3060. ADD KEY `bookings_location_id_index` (`location_id`);
  3061.  
  3062. --
  3063. -- Indexes for table `brands`
  3064. --
  3065. ALTER TABLE `brands`
  3066. ADD PRIMARY KEY (`id`),
  3067. ADD KEY `brands_business_id_foreign` (`business_id`),
  3068. ADD KEY `brands_created_by_foreign` (`created_by`);
  3069.  
  3070. --
  3071. -- Indexes for table `business`
  3072. --
  3073. ALTER TABLE `business`
  3074. ADD PRIMARY KEY (`id`),
  3075. ADD KEY `business_owner_id_foreign` (`owner_id`),
  3076. ADD KEY `business_currency_id_foreign` (`currency_id`),
  3077. ADD KEY `business_default_sales_tax_foreign` (`default_sales_tax`);
  3078.  
  3079. --
  3080. -- Indexes for table `business_locations`
  3081. --
  3082. ALTER TABLE `business_locations`
  3083. ADD PRIMARY KEY (`id`),
  3084. ADD KEY `business_locations_business_id_index` (`business_id`),
  3085. ADD KEY `business_locations_invoice_scheme_id_foreign` (`invoice_scheme_id`),
  3086. ADD KEY `business_locations_invoice_layout_id_foreign` (`invoice_layout_id`);
  3087.  
  3088. --
  3089. -- Indexes for table `cash_registers`
  3090. --
  3091. ALTER TABLE `cash_registers`
  3092. ADD PRIMARY KEY (`id`),
  3093. ADD KEY `cash_registers_business_id_foreign` (`business_id`),
  3094. ADD KEY `cash_registers_user_id_foreign` (`user_id`),
  3095. ADD KEY `cash_registers_location_id_index` (`location_id`);
  3096.  
  3097. --
  3098. -- Indexes for table `cash_register_transactions`
  3099. --
  3100. ALTER TABLE `cash_register_transactions`
  3101. ADD PRIMARY KEY (`id`),
  3102. ADD KEY `cash_register_transactions_cash_register_id_foreign` (`cash_register_id`),
  3103. ADD KEY `cash_register_transactions_transaction_id_index` (`transaction_id`);
  3104.  
  3105. --
  3106. -- Indexes for table `categories`
  3107. --
  3108. ALTER TABLE `categories`
  3109. ADD PRIMARY KEY (`id`),
  3110. ADD KEY `categories_business_id_foreign` (`business_id`),
  3111. ADD KEY `categories_created_by_foreign` (`created_by`);
  3112.  
  3113. --
  3114. -- Indexes for table `contacts`
  3115. --
  3116. ALTER TABLE `contacts`
  3117. ADD PRIMARY KEY (`id`),
  3118. ADD KEY `contacts_business_id_foreign` (`business_id`),
  3119. ADD KEY `contacts_created_by_foreign` (`created_by`);
  3120.  
  3121. --
  3122. -- Indexes for table `currencies`
  3123. --
  3124. ALTER TABLE `currencies`
  3125. ADD PRIMARY KEY (`id`);
  3126.  
  3127. --
  3128. -- Indexes for table `customer_groups`
  3129. --
  3130. ALTER TABLE `customer_groups`
  3131. ADD PRIMARY KEY (`id`),
  3132. ADD KEY `customer_groups_business_id_foreign` (`business_id`);
  3133.  
  3134. --
  3135. -- Indexes for table `discounts`
  3136. --
  3137. ALTER TABLE `discounts`
  3138. ADD PRIMARY KEY (`id`),
  3139. ADD KEY `discounts_business_id_index` (`business_id`),
  3140. ADD KEY `discounts_brand_id_index` (`brand_id`),
  3141. ADD KEY `discounts_category_id_index` (`category_id`),
  3142. ADD KEY `discounts_location_id_index` (`location_id`),
  3143. ADD KEY `discounts_priority_index` (`priority`);
  3144.  
  3145. --
  3146. -- Indexes for table `expense_categories`
  3147. --
  3148. ALTER TABLE `expense_categories`
  3149. ADD PRIMARY KEY (`id`),
  3150. ADD KEY `expense_categories_business_id_foreign` (`business_id`);
  3151.  
  3152. --
  3153. -- Indexes for table `group_sub_taxes`
  3154. --
  3155. ALTER TABLE `group_sub_taxes`
  3156. ADD KEY `group_sub_taxes_group_tax_id_foreign` (`group_tax_id`),
  3157. ADD KEY `group_sub_taxes_tax_id_foreign` (`tax_id`);
  3158.  
  3159. --
  3160. -- Indexes for table `invoice_layouts`
  3161. --
  3162. ALTER TABLE `invoice_layouts`
  3163. ADD PRIMARY KEY (`id`),
  3164. ADD KEY `invoice_layouts_business_id_foreign` (`business_id`);
  3165.  
  3166. --
  3167. -- Indexes for table `invoice_schemes`
  3168. --
  3169. ALTER TABLE `invoice_schemes`
  3170. ADD PRIMARY KEY (`id`),
  3171. ADD KEY `invoice_schemes_business_id_foreign` (`business_id`);
  3172.  
  3173. --
  3174. -- Indexes for table `item`
  3175. --
  3176. ALTER TABLE `item`
  3177. ADD PRIMARY KEY (`id`);
  3178.  
  3179. --
  3180. -- Indexes for table `jualdetail`
  3181. --
  3182. ALTER TABLE `jualdetail`
  3183. ADD PRIMARY KEY (`id`);
  3184.  
  3185. --
  3186. -- Indexes for table `jualmaster`
  3187. --
  3188. ALTER TABLE `jualmaster`
  3189. ADD PRIMARY KEY (`id`);
  3190.  
  3191. --
  3192. -- Indexes for table `media`
  3193. --
  3194. ALTER TABLE `media`
  3195. ADD PRIMARY KEY (`id`),
  3196. ADD KEY `media_model_type_model_id_index` (`model_type`,`model_id`),
  3197. ADD KEY `FK_media_variations` (`model_id`);
  3198.  
  3199. --
  3200. -- Indexes for table `migrations`
  3201. --
  3202. ALTER TABLE `migrations`
  3203. ADD PRIMARY KEY (`id`);
  3204.  
  3205. --
  3206. -- Indexes for table `model_has_permissions`
  3207. --
  3208. ALTER TABLE `model_has_permissions`
  3209. ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  3210. ADD KEY `model_has_permissions_model_type_model_id_index` (`model_type`,`model_id`);
  3211.  
  3212. --
  3213. -- Indexes for table `model_has_roles`
  3214. --
  3215. ALTER TABLE `model_has_roles`
  3216. ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  3217. ADD KEY `model_has_roles_model_type_model_id_index` (`model_type`,`model_id`);
  3218.  
  3219. --
  3220. -- Indexes for table `notifications`
  3221. --
  3222. ALTER TABLE `notifications`
  3223. ADD PRIMARY KEY (`id`),
  3224. ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`);
  3225.  
  3226. --
  3227. -- Indexes for table `notification_templates`
  3228. --
  3229. ALTER TABLE `notification_templates`
  3230. ADD PRIMARY KEY (`id`);
  3231.  
  3232. --
  3233. -- Indexes for table `packages`
  3234. --
  3235. ALTER TABLE `packages`
  3236. ADD PRIMARY KEY (`id`);
  3237.  
  3238. --
  3239. -- Indexes for table `password_resets`
  3240. --
  3241. ALTER TABLE `password_resets`
  3242. ADD KEY `password_resets_email_index` (`email`);
  3243.  
  3244. --
  3245. -- Indexes for table `permissions`
  3246. --
  3247. ALTER TABLE `permissions`
  3248. ADD PRIMARY KEY (`id`);
  3249.  
  3250. --
  3251. -- Indexes for table `printers`
  3252. --
  3253. ALTER TABLE `printers`
  3254. ADD PRIMARY KEY (`id`),
  3255. ADD KEY `printers_business_id_foreign` (`business_id`);
  3256.  
  3257. --
  3258. -- Indexes for table `products`
  3259. --
  3260. ALTER TABLE `products`
  3261. ADD PRIMARY KEY (`id`),
  3262. ADD KEY `products_brand_id_foreign` (`brand_id`),
  3263. ADD KEY `products_category_id_foreign` (`category_id`),
  3264. ADD KEY `products_sub_category_id_foreign` (`sub_category_id`),
  3265. ADD KEY `products_tax_foreign` (`tax`),
  3266. ADD KEY `products_name_index` (`name`),
  3267. ADD KEY `products_business_id_index` (`business_id`),
  3268. ADD KEY `products_unit_id_index` (`unit_id`),
  3269. ADD KEY `products_created_by_index` (`created_by`),
  3270. ADD KEY `products_warranty_id_index` (`warranty_id`);
  3271.  
  3272. --
  3273. -- Indexes for table `product_locations`
  3274. --
  3275. ALTER TABLE `product_locations`
  3276. ADD KEY `FK_product_locations_products` (`product_id`);
  3277.  
  3278. --
  3279. -- Indexes for table `product_racks`
  3280. --
  3281. ALTER TABLE `product_racks`
  3282. ADD PRIMARY KEY (`id`);
  3283.  
  3284. --
  3285. -- Indexes for table `product_variations`
  3286. --
  3287. ALTER TABLE `product_variations`
  3288. ADD PRIMARY KEY (`id`),
  3289. ADD KEY `product_variations_name_index` (`name`),
  3290. ADD KEY `product_variations_product_id_index` (`product_id`);
  3291.  
  3292. --
  3293. -- Indexes for table `purchase_lines`
  3294. --
  3295. ALTER TABLE `purchase_lines`
  3296. ADD PRIMARY KEY (`id`),
  3297. ADD KEY `purchase_lines_product_id_foreign` (`product_id`),
  3298. ADD KEY `purchase_lines_variation_id_foreign` (`variation_id`),
  3299. ADD KEY `purchase_lines_tax_id_foreign` (`tax_id`),
  3300. ADD KEY `purchase_lines_sub_unit_id_index` (`sub_unit_id`),
  3301. ADD KEY `purchase_lines_lot_number_index` (`lot_number`(191)),
  3302. ADD KEY `FK_purchase_lines_transactions` (`transaction_id`);
  3303.  
  3304. --
  3305. -- Indexes for table `reference_counts`
  3306. --
  3307. ALTER TABLE `reference_counts`
  3308. ADD PRIMARY KEY (`id`);
  3309.  
  3310. --
  3311. -- Indexes for table `res_product_modifier_sets`
  3312. --
  3313. ALTER TABLE `res_product_modifier_sets`
  3314. ADD KEY `res_product_modifier_sets_modifier_set_id_foreign` (`modifier_set_id`);
  3315.  
  3316. --
  3317. -- Indexes for table `res_tables`
  3318. --
  3319. ALTER TABLE `res_tables`
  3320. ADD PRIMARY KEY (`id`),
  3321. ADD KEY `res_tables_business_id_foreign` (`business_id`);
  3322.  
  3323. --
  3324. -- Indexes for table `roles`
  3325. --
  3326. ALTER TABLE `roles`
  3327. ADD PRIMARY KEY (`id`),
  3328. ADD KEY `roles_business_id_foreign` (`business_id`);
  3329.  
  3330. --
  3331. -- Indexes for table `role_has_permissions`
  3332. --
  3333. ALTER TABLE `role_has_permissions`
  3334. ADD PRIMARY KEY (`permission_id`,`role_id`),
  3335. ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);
  3336.  
  3337. --
  3338. -- Indexes for table `selling_price_groups`
  3339. --
  3340. ALTER TABLE `selling_price_groups`
  3341. ADD PRIMARY KEY (`id`),
  3342. ADD KEY `selling_price_groups_business_id_foreign` (`business_id`);
  3343.  
  3344. --
  3345. -- Indexes for table `sessions`
  3346. --
  3347. ALTER TABLE `sessions`
  3348. ADD UNIQUE KEY `sessions_id_unique` (`id`);
  3349.  
  3350. --
  3351. -- Indexes for table `stock_adjustment_lines`
  3352. --
  3353. ALTER TABLE `stock_adjustment_lines`
  3354. ADD PRIMARY KEY (`id`),
  3355. ADD KEY `stock_adjustment_lines_product_id_foreign` (`product_id`),
  3356. ADD KEY `stock_adjustment_lines_variation_id_foreign` (`variation_id`),
  3357. ADD KEY `stock_adjustment_lines_transaction_id_index` (`transaction_id`);
  3358.  
  3359. --
  3360. -- Indexes for table `subscriptions`
  3361. --
  3362. ALTER TABLE `subscriptions`
  3363. ADD PRIMARY KEY (`id`),
  3364. ADD KEY `subscriptions_business_id_foreign` (`business_id`),
  3365. ADD KEY `subscriptions_package_id_index` (`package_id`),
  3366. ADD KEY `subscriptions_created_id_index` (`created_id`);
  3367.  
  3368. --
  3369. -- Indexes for table `superadmin_communicator_logs`
  3370. --
  3371. ALTER TABLE `superadmin_communicator_logs`
  3372. ADD PRIMARY KEY (`id`);
  3373.  
  3374. --
  3375. -- Indexes for table `superadmin_frontend_pages`
  3376. --
  3377. ALTER TABLE `superadmin_frontend_pages`
  3378. ADD PRIMARY KEY (`id`);
  3379.  
  3380. --
  3381. -- Indexes for table `system`
  3382. --
  3383. ALTER TABLE `system`
  3384. ADD PRIMARY KEY (`id`);
  3385.  
  3386. --
  3387. -- Indexes for table `tax_rates`
  3388. --
  3389. ALTER TABLE `tax_rates`
  3390. ADD PRIMARY KEY (`id`),
  3391. ADD KEY `tax_rates_business_id_foreign` (`business_id`),
  3392. ADD KEY `tax_rates_created_by_foreign` (`created_by`);
  3393.  
  3394. --
  3395. -- Indexes for table `tb_log_product_report_store`
  3396. --
  3397. ALTER TABLE `tb_log_product_report_store`
  3398. ADD PRIMARY KEY (`id`),
  3399. ADD UNIQUE KEY `business_id_product_id_date` (`business_id`,`product_id`,`date`),
  3400. ADD KEY `FK_tb_log_product_report_tb_product_master` (`product_id`);
  3401.  
  3402. --
  3403. -- Indexes for table `transactions`
  3404. --
  3405. ALTER TABLE `transactions`
  3406. ADD PRIMARY KEY (`id`),
  3407. ADD KEY `transactions_tax_id_foreign` (`tax_id`),
  3408. ADD KEY `transactions_business_id_index` (`business_id`),
  3409. ADD KEY `transactions_type_index` (`type`(191)),
  3410. ADD KEY `transactions_contact_id_index` (`contact_id`),
  3411. ADD KEY `transactions_transaction_date_index` (`transaction_date`),
  3412. ADD KEY `transactions_created_by_index` (`created_by`),
  3413. ADD KEY `transactions_location_id_index` (`location_id`),
  3414. ADD KEY `transactions_expense_for_foreign` (`expense_for`),
  3415. ADD KEY `transactions_expense_category_id_index` (`expense_category_id`),
  3416. ADD KEY `transactions_sub_type_index` (`sub_type`),
  3417. ADD KEY `transactions_return_parent_id_index` (`return_parent_id`),
  3418. ADD KEY `type` (`type`(191));
  3419.  
  3420. --
  3421. -- Indexes for table `transaction_payments`
  3422. --
  3423. ALTER TABLE `transaction_payments`
  3424. ADD PRIMARY KEY (`id`),
  3425. ADD KEY `transaction_payments_transaction_id_foreign` (`transaction_id`),
  3426. ADD KEY `transaction_payments_created_by_index` (`created_by`),
  3427. ADD KEY `transaction_payments_parent_id_index` (`parent_id`);
  3428.  
  3429. --
  3430. -- Indexes for table `transaction_sell_lines`
  3431. --
  3432. ALTER TABLE `transaction_sell_lines`
  3433. ADD PRIMARY KEY (`id`),
  3434. ADD KEY `transaction_sell_lines_transaction_id_foreign` (`transaction_id`),
  3435. ADD KEY `transaction_sell_lines_product_id_foreign` (`product_id`),
  3436. ADD KEY `transaction_sell_lines_variation_id_foreign` (`variation_id`),
  3437. ADD KEY `transaction_sell_lines_tax_id_foreign` (`tax_id`),
  3438. ADD KEY `transaction_sell_lines_children_type_index` (`children_type`),
  3439. ADD KEY `transaction_sell_lines_parent_sell_line_id_index` (`parent_sell_line_id`);
  3440.  
  3441. --
  3442. -- Indexes for table `transaction_sell_lines_purchase_lines`
  3443. --
  3444. ALTER TABLE `transaction_sell_lines_purchase_lines`
  3445. ADD PRIMARY KEY (`id`),
  3446. ADD KEY `sell_line_id` (`sell_line_id`),
  3447. ADD KEY `stock_adjustment_line_id` (`stock_adjustment_line_id`),
  3448. ADD KEY `purchase_line_id` (`purchase_line_id`);
  3449.  
  3450. --
  3451. -- Indexes for table `types_of_services`
  3452. --
  3453. ALTER TABLE `types_of_services`
  3454. ADD PRIMARY KEY (`id`),
  3455. ADD KEY `types_of_services_business_id_index` (`business_id`);
  3456.  
  3457. --
  3458. -- Indexes for table `units`
  3459. --
  3460. ALTER TABLE `units`
  3461. ADD PRIMARY KEY (`id`),
  3462. ADD KEY `units_business_id_foreign` (`business_id`),
  3463. ADD KEY `units_created_by_foreign` (`created_by`),
  3464. ADD KEY `units_base_unit_id_index` (`base_unit_id`);
  3465.  
  3466. --
  3467. -- Indexes for table `users`
  3468. --
  3469. ALTER TABLE `users`
  3470. ADD PRIMARY KEY (`id`),
  3471. ADD UNIQUE KEY `users_username_unique` (`username`),
  3472. ADD KEY `users_business_id_foreign` (`business_id`);
  3473.  
  3474. --
  3475. -- Indexes for table `user_contact_access`
  3476. --
  3477. ALTER TABLE `user_contact_access`
  3478. ADD PRIMARY KEY (`id`);
  3479.  
  3480. --
  3481. -- Indexes for table `variations`
  3482. --
  3483. ALTER TABLE `variations`
  3484. ADD PRIMARY KEY (`id`),
  3485. ADD KEY `variations_product_id_foreign` (`product_id`),
  3486. ADD KEY `variations_product_variation_id_foreign` (`product_variation_id`),
  3487. ADD KEY `variations_name_index` (`name`),
  3488. ADD KEY `variations_sub_sku_index` (`sub_sku`),
  3489. ADD KEY `variations_variation_value_id_index` (`variation_value_id`);
  3490.  
  3491. --
  3492. -- Indexes for table `variation_group_prices`
  3493. --
  3494. ALTER TABLE `variation_group_prices`
  3495. ADD PRIMARY KEY (`id`),
  3496. ADD KEY `variation_group_prices_variation_id_foreign` (`variation_id`),
  3497. ADD KEY `variation_group_prices_price_group_id_foreign` (`price_group_id`);
  3498.  
  3499. --
  3500. -- Indexes for table `variation_location_details`
  3501. --
  3502. ALTER TABLE `variation_location_details`
  3503. ADD PRIMARY KEY (`id`),
  3504. ADD KEY `variation_location_details_location_id_foreign` (`location_id`),
  3505. ADD KEY `variation_location_details_product_id_index` (`product_id`),
  3506. ADD KEY `variation_location_details_product_variation_id_index` (`product_variation_id`),
  3507. ADD KEY `variation_location_details_variation_id_index` (`variation_id`);
  3508.  
  3509. --
  3510. -- Indexes for table `variation_templates`
  3511. --
  3512. ALTER TABLE `variation_templates`
  3513. ADD PRIMARY KEY (`id`),
  3514. ADD KEY `variation_templates_business_id_foreign` (`business_id`);
  3515.  
  3516. --
  3517. -- Indexes for table `variation_value_templates`
  3518. --
  3519. ALTER TABLE `variation_value_templates`
  3520. ADD PRIMARY KEY (`id`),
  3521. ADD KEY `variation_value_templates_name_index` (`name`),
  3522. ADD KEY `variation_value_templates_variation_template_id_index` (`variation_template_id`);
  3523.  
  3524. --
  3525. -- Indexes for table `warranties`
  3526. --
  3527. ALTER TABLE `warranties`
  3528. ADD PRIMARY KEY (`id`);
  3529.  
  3530. --
  3531. -- AUTO_INCREMENT for dumped tables
  3532. --
  3533.  
  3534. --
  3535. -- AUTO_INCREMENT for table `accounts`
  3536. --
  3537. ALTER TABLE `accounts`
  3538. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3539.  
  3540. --
  3541. -- AUTO_INCREMENT for table `account_transactions`
  3542. --
  3543. ALTER TABLE `account_transactions`
  3544. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3545.  
  3546. --
  3547. -- AUTO_INCREMENT for table `account_types`
  3548. --
  3549. ALTER TABLE `account_types`
  3550. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3551.  
  3552. --
  3553. -- AUTO_INCREMENT for table `activity_log`
  3554. --
  3555. ALTER TABLE `activity_log`
  3556. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  3557.  
  3558. --
  3559. -- AUTO_INCREMENT for table `barcodes`
  3560. --
  3561. ALTER TABLE `barcodes`
  3562. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  3563.  
  3564. --
  3565. -- AUTO_INCREMENT for table `belidetail`
  3566. --
  3567. ALTER TABLE `belidetail`
  3568. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  3569.  
  3570. --
  3571. -- AUTO_INCREMENT for table `belimaster`
  3572. --
  3573. ALTER TABLE `belimaster`
  3574. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  3575.  
  3576. --
  3577. -- AUTO_INCREMENT for table `bookings`
  3578. --
  3579. ALTER TABLE `bookings`
  3580. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3581.  
  3582. --
  3583. -- AUTO_INCREMENT for table `brands`
  3584. --
  3585. ALTER TABLE `brands`
  3586. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  3587.  
  3588. --
  3589. -- AUTO_INCREMENT for table `business`
  3590. --
  3591. ALTER TABLE `business`
  3592. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  3593.  
  3594. --
  3595. -- AUTO_INCREMENT for table `business_locations`
  3596. --
  3597. ALTER TABLE `business_locations`
  3598. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  3599.  
  3600. --
  3601. -- AUTO_INCREMENT for table `cash_registers`
  3602. --
  3603. ALTER TABLE `cash_registers`
  3604. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3605.  
  3606. --
  3607. -- AUTO_INCREMENT for table `cash_register_transactions`
  3608. --
  3609. ALTER TABLE `cash_register_transactions`
  3610. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3611.  
  3612. --
  3613. -- AUTO_INCREMENT for table `categories`
  3614. --
  3615. ALTER TABLE `categories`
  3616. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  3617.  
  3618. --
  3619. -- AUTO_INCREMENT for table `contacts`
  3620. --
  3621. ALTER TABLE `contacts`
  3622. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
  3623.  
  3624. --
  3625. -- AUTO_INCREMENT for table `currencies`
  3626. --
  3627. ALTER TABLE `currencies`
  3628. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=140;
  3629.  
  3630. --
  3631. -- AUTO_INCREMENT for table `customer_groups`
  3632. --
  3633. ALTER TABLE `customer_groups`
  3634. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  3635.  
  3636. --
  3637. -- AUTO_INCREMENT for table `discounts`
  3638. --
  3639. ALTER TABLE `discounts`
  3640. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  3641.  
  3642. --
  3643. -- AUTO_INCREMENT for table `expense_categories`
  3644. --
  3645. ALTER TABLE `expense_categories`
  3646. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  3647.  
  3648. --
  3649. -- AUTO_INCREMENT for table `invoice_layouts`
  3650. --
  3651. ALTER TABLE `invoice_layouts`
  3652. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  3653.  
  3654. --
  3655. -- AUTO_INCREMENT for table `invoice_schemes`
  3656. --
  3657. ALTER TABLE `invoice_schemes`
  3658. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  3659.  
  3660. --
  3661. -- AUTO_INCREMENT for table `item`
  3662. --
  3663. ALTER TABLE `item`
  3664. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3665.  
  3666. --
  3667. -- AUTO_INCREMENT for table `jualdetail`
  3668. --
  3669. ALTER TABLE `jualdetail`
  3670. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3671.  
  3672. --
  3673. -- AUTO_INCREMENT for table `jualmaster`
  3674. --
  3675. ALTER TABLE `jualmaster`
  3676. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3677.  
  3678. --
  3679. -- AUTO_INCREMENT for table `media`
  3680. --
  3681. ALTER TABLE `media`
  3682. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3683.  
  3684. --
  3685. -- AUTO_INCREMENT for table `migrations`
  3686. --
  3687. ALTER TABLE `migrations`
  3688. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=227;
  3689.  
  3690. --
  3691. -- AUTO_INCREMENT for table `notification_templates`
  3692. --
  3693. ALTER TABLE `notification_templates`
  3694. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
  3695.  
  3696. --
  3697. -- AUTO_INCREMENT for table `packages`
  3698. --
  3699. ALTER TABLE `packages`
  3700. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  3701.  
  3702. --
  3703. -- AUTO_INCREMENT for table `permissions`
  3704. --
  3705. ALTER TABLE `permissions`
  3706. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=87;
  3707.  
  3708. --
  3709. -- AUTO_INCREMENT for table `printers`
  3710. --
  3711. ALTER TABLE `printers`
  3712. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3713.  
  3714. --
  3715. -- AUTO_INCREMENT for table `products`
  3716. --
  3717. ALTER TABLE `products`
  3718. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3719.  
  3720. --
  3721. -- AUTO_INCREMENT for table `product_racks`
  3722. --
  3723. ALTER TABLE `product_racks`
  3724. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3725.  
  3726. --
  3727. -- AUTO_INCREMENT for table `product_variations`
  3728. --
  3729. ALTER TABLE `product_variations`
  3730. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3731.  
  3732. --
  3733. -- AUTO_INCREMENT for table `purchase_lines`
  3734. --
  3735. ALTER TABLE `purchase_lines`
  3736. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3737.  
  3738. --
  3739. -- AUTO_INCREMENT for table `reference_counts`
  3740. --
  3741. ALTER TABLE `reference_counts`
  3742. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
  3743.  
  3744. --
  3745. -- AUTO_INCREMENT for table `res_tables`
  3746. --
  3747. ALTER TABLE `res_tables`
  3748. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3749.  
  3750. --
  3751. -- AUTO_INCREMENT for table `roles`
  3752. --
  3753. ALTER TABLE `roles`
  3754. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  3755.  
  3756. --
  3757. -- AUTO_INCREMENT for table `selling_price_groups`
  3758. --
  3759. ALTER TABLE `selling_price_groups`
  3760. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  3761.  
  3762. --
  3763. -- AUTO_INCREMENT for table `stock_adjustment_lines`
  3764. --
  3765. ALTER TABLE `stock_adjustment_lines`
  3766. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3767.  
  3768. --
  3769. -- AUTO_INCREMENT for table `subscriptions`
  3770. --
  3771. ALTER TABLE `subscriptions`
  3772. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  3773.  
  3774. --
  3775. -- AUTO_INCREMENT for table `superadmin_communicator_logs`
  3776. --
  3777. ALTER TABLE `superadmin_communicator_logs`
  3778. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3779.  
  3780. --
  3781. -- AUTO_INCREMENT for table `superadmin_frontend_pages`
  3782. --
  3783. ALTER TABLE `superadmin_frontend_pages`
  3784. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3785.  
  3786. --
  3787. -- AUTO_INCREMENT for table `system`
  3788. --
  3789. ALTER TABLE `system`
  3790. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
  3791.  
  3792. --
  3793. -- AUTO_INCREMENT for table `tax_rates`
  3794. --
  3795. ALTER TABLE `tax_rates`
  3796. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  3797.  
  3798. --
  3799. -- AUTO_INCREMENT for table `tb_log_product_report_store`
  3800. --
  3801. ALTER TABLE `tb_log_product_report_store`
  3802. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  3803.  
  3804. --
  3805. -- AUTO_INCREMENT for table `transactions`
  3806. --
  3807. ALTER TABLE `transactions`
  3808. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3809.  
  3810. --
  3811. -- AUTO_INCREMENT for table `transaction_payments`
  3812. --
  3813. ALTER TABLE `transaction_payments`
  3814. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3815.  
  3816. --
  3817. -- AUTO_INCREMENT for table `transaction_sell_lines`
  3818. --
  3819. ALTER TABLE `transaction_sell_lines`
  3820. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3821.  
  3822. --
  3823. -- AUTO_INCREMENT for table `transaction_sell_lines_purchase_lines`
  3824. --
  3825. ALTER TABLE `transaction_sell_lines_purchase_lines`
  3826. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3827.  
  3828. --
  3829. -- AUTO_INCREMENT for table `types_of_services`
  3830. --
  3831. ALTER TABLE `types_of_services`
  3832. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3833.  
  3834. --
  3835. -- AUTO_INCREMENT for table `units`
  3836. --
  3837. ALTER TABLE `units`
  3838. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3839.  
  3840. --
  3841. -- AUTO_INCREMENT for table `users`
  3842. --
  3843. ALTER TABLE `users`
  3844. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
  3845.  
  3846. --
  3847. -- AUTO_INCREMENT for table `user_contact_access`
  3848. --
  3849. ALTER TABLE `user_contact_access`
  3850. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3851.  
  3852. --
  3853. -- AUTO_INCREMENT for table `variations`
  3854. --
  3855. ALTER TABLE `variations`
  3856. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
  3857.  
  3858. --
  3859. -- AUTO_INCREMENT for table `variation_group_prices`
  3860. --
  3861. ALTER TABLE `variation_group_prices`
  3862. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3863.  
  3864. --
  3865. -- AUTO_INCREMENT for table `variation_location_details`
  3866. --
  3867. ALTER TABLE `variation_location_details`
  3868. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
  3869.  
  3870. --
  3871. -- AUTO_INCREMENT for table `variation_templates`
  3872. --
  3873. ALTER TABLE `variation_templates`
  3874. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3875.  
  3876. --
  3877. -- AUTO_INCREMENT for table `variation_value_templates`
  3878. --
  3879. ALTER TABLE `variation_value_templates`
  3880. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  3881.  
  3882. --
  3883. -- AUTO_INCREMENT for table `warranties`
  3884. --
  3885. ALTER TABLE `warranties`
  3886. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  3887.  
  3888. --
  3889. -- Constraints for dumped tables
  3890. --
  3891.  
  3892. --
  3893. -- Constraints for table `media`
  3894. --
  3895. ALTER TABLE `media`
  3896. ADD CONSTRAINT `FK_media_variations` FOREIGN KEY (`model_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3897.  
  3898. --
  3899. -- Constraints for table `product_locations`
  3900. --
  3901. ALTER TABLE `product_locations`
  3902. ADD CONSTRAINT `FK_product_locations_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3903.  
  3904. --
  3905. -- Constraints for table `product_variations`
  3906. --
  3907. ALTER TABLE `product_variations`
  3908. ADD CONSTRAINT `FK_product_variations_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3909.  
  3910. --
  3911. -- Constraints for table `purchase_lines`
  3912. --
  3913. ALTER TABLE `purchase_lines`
  3914. ADD CONSTRAINT `FK_purchase_lines_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  3915. ADD CONSTRAINT `FK_purchase_lines_transactions` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3916.  
  3917. --
  3918. -- Constraints for table `tb_log_product_report_store`
  3919. --
  3920. ALTER TABLE `tb_log_product_report_store`
  3921. ADD CONSTRAINT `FK_tb_log_product_report_store_business` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  3922. ADD CONSTRAINT `FK_tb_log_product_report_store_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3923.  
  3924. --
  3925. -- Constraints for table `transaction_payments`
  3926. --
  3927. ALTER TABLE `transaction_payments`
  3928. ADD CONSTRAINT `FK1` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3929.  
  3930. --
  3931. -- Constraints for table `transaction_sell_lines`
  3932. --
  3933. ALTER TABLE `transaction_sell_lines`
  3934. ADD CONSTRAINT `FK_transaction_sell_lines_transactions` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3935.  
  3936. --
  3937. -- Constraints for table `transaction_sell_lines_purchase_lines`
  3938. --
  3939. ALTER TABLE `transaction_sell_lines_purchase_lines`
  3940. ADD CONSTRAINT `FK_transaction_sell_lines_purchase_lines_transaction_sell_lines` FOREIGN KEY (`sell_line_id`) REFERENCES `transaction_sell_lines` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3941.  
  3942. --
  3943. -- Constraints for table `variations`
  3944. --
  3945. ALTER TABLE `variations`
  3946. ADD CONSTRAINT `FK_variations_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3947.  
  3948. --
  3949. -- Constraints for table `variation_location_details`
  3950. --
  3951. ALTER TABLE `variation_location_details`
  3952. ADD CONSTRAINT `FK_variation_location_details_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  3953. COMMIT;
  3954.  
  3955. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  3956. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  3957. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  3958.  
  3959.  
  3960.  
  3961. Thanks to : INDOGHOSTSEC , ANONYMOUS NEWS INDONESIA ,ANTISECID 1337 , ANONYMOUS INDONESIA , GARNESIA CYBER TEAM , ACEH ABOUT HACKER WORLD , BREBES XPLOITER , CTRLSEC , Etersec , Akamai6h05t
  3962.  
  3963.  
  3964. GREETZ TO : Gh05t666include , DC6SEC , Ctrlsec0 , AnonBrave , AnonBl4de , Gh05t7 , Fn4ticHZ , AnonGhost_IIMQ2 , 4prili666h05t , AnonBarbby, Evr!L
  3965. & ALL INDONESIAN CYBER TEAM & ALL HACKTIVIST INDONESIA
  3966.  
  3967.  
  3968. ME?: Gh05t666include
  3969.  
  3970. Findme on telegram : t.me/AnonGhostid
  3971.  
  3972.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement