INSERT INTO `product_images` VALUES ('34', '34', 'image/jpeg', '[BLOB]', '2017-04-20 10:50:34', '2017-04-20 10:50:34');
INSERT INTO `product_images` VALUES ('35', '35', 'image/jpeg', '[BLOB]', '2017-04-20 10:52:01', '2017-04-20 10:52:01');
INSERT INTO `product_images` VALUES ('36', '36', 'image/jpeg', '[BLOB]', '2017-04-20 10:59:00', '2017-04-20 10:59:00');
INSERT INTO `product_images` VALUES ('37', '37', 'image/jpeg', '[BLOB]', '2017-04-30 14:03:47', '2017-04-30 14:03:47');

-- ----------------------------
-- Table structure for `sales`
-- ----------------------------
CREATE TABLE `sales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `date_sale` date NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sales_id_user_foreign` (`id_user`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of sales
-- ----------------------------
INSERT INTO `sales` VALUES ('1', '2', '2017-05-12', null, '2017-05-12 03:33:08', '2017-05-17 00:26:33');
INSERT INTO `sales` VALUES ('2', '2', '2017-01-01', null, '2017-05-12 03:56:46', '2017-05-12 04:05:22');
INSERT INTO `sales` VALUES ('3', '3', '2017-03-08', null, '2017-05-12 04:07:44', '2017-05-12 04:07:44');
INSERT INTO `sales` VALUES ('4', '3', '2017-02-01', null, '2017-05-12 04:21:50', '2017-05-12 04:21:50');
INSERT INTO `sales` VALUES ('5', '3', '2017-04-04', '2017-05-21 12:28:37', '2017-05-12 04:27:53', '2017-05-21 12:28:37');
INSERT INTO `sales` VALUES ('6', '2', '2017-02-03', null, '2017-05-12 04:30:03', '2017-05-12 04:30:03');

-- ----------------------------
-- Table structure for `sales_customers`
-- ----------------------------
CREATE TABLE `sales_customers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_sales` int(11) NOT NULL,
  `id_customer` int(11) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sales_customers_id_sales_foreign` (`id_sales`),
  KEY `sales_customers_id_customer_foreign` (`id_customer`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of sales_customers
-- ----------------------------
INSERT INTO `sales_customers` VALUES ('1', '1', '1', null, '2017-05-12 03:33:09', '2017-05-12 03:33:09');
INSERT INTO `sales_customers` VALUES ('2', '2', '2', null, '2017-05-12 12:03:45', '2017-05-12 12:03:53');
INSERT INTO `sales_customers` VALUES ('3', '3', '1', null, '2017-05-12 12:20:14', '2017-05-12 12:20:17');
INSERT INTO `sales_customers` VALUES ('4', '4', '2', null, '2017-05-12 12:24:45', '2017-05-12 12:24:47');
INSERT INTO `sales_customers` VALUES ('5', '5', '3', '2017-05-21 12:28:36', '2017-05-12 04:27:54', '2017-05-21 12:28:36');
INSERT INTO `sales_customers` VALUES ('6', '6', '4', null, '2017-05-12 04:30:03', '2017-05-12 04:30:03');

-- ----------------------------
-- Table structure for `sales_items`
-- ----------------------------
CREATE TABLE `sales_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_sales` int(11) NOT NULL,
  `id_product` int(11) NOT NULL,
  `commission` double(8,2) NOT NULL,
  `retail` double(8,2) NOT NULL,
  `quantity` int(11) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sales_items_id_sales_foreign` (`id_sales`),
  KEY `sales_items_id_product_foreign` (`id_product`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of sales_items
-- ----------------------------
INSERT INTO `sales_items` VALUES ('1', '1', '29', '1.00', '85.00', '1', null, '2017-05-12 03:33:09', '2017-05-12 03:33:09');
INSERT INTO `sales_items` VALUES ('2', '1', '24', '1.00', '50.00', '2', null, '2017-05-12 03:33:09', '2017-05-12 03:33:09');
INSERT INTO `sales_items` VALUES ('3', '1', '37', '0.00', '3.67', '1', null, '2017-05-12 03:33:09', '2017-05-17 00:26:33');
INSERT INTO `sales_items` VALUES ('4', '2', '15', '0.50', '39.00', '1', null, '2017-05-12 03:56:46', '2017-05-12 03:56:46');
INSERT INTO `sales_items` VALUES ('5', '2', '18', '0.50', '25.00', '1', null, '2017-05-12 03:56:46', '2017-05-12 03:56:46');
INSERT INTO `sales_items` VALUES ('6', '2', '16', '2.00', '135.00', '1', null, '2017-05-12 03:56:46', '2017-05-12 03:56:46');
INSERT INTO `sales_items` VALUES ('7', '2', '17', '1.00', '120.00', '1', null, '2017-05-12 03:56:46', '2017-05-12 03:56:46');
INSERT INTO `sales_items` VALUES ('8', '3', '23', '3.00', '89.00', '12', null, '2017-05-12 04:07:44', '2017-05-12 04:07:44');
INSERT INTO `sales_items` VALUES ('9', '4', '23', '3.00', '89.00', '1', null, '2017-05-12 04:21:51', '2017-05-12 04:21:51');
INSERT INTO `sales_items` VALUES ('10', '5', '23', '3.00', '89.00', '2', '2017-05-21 12:28:37', '2017-05-12 04:27:54', '2017-05-21 12:28:37');
INSERT INTO `sales_items` VALUES ('11', '6', '12', '0.00', '40.00', '1', null, '2017-05-12 04:30:03', '2017-05-12 04:30:03');
INSERT INTO `sales_items` VALUES ('12', '6', '13', '1.00', '45.00', '1', null, '2017-05-12 04:30:03', '2017-05-12 04:30:03');
INSERT INTO `sales_items` VALUES ('13', '6', '37', '0.00', '15.00', '1', null, '2017-05-12 04:30:03', '2017-05-12 04:30:03');

-- ----------------------------
-- Table structure for `sales_taxes`
-- ----------------------------
CREATE TABLE `sales_taxes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_sales` int(11) NOT NULL,
  `id_tax` int(11) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sales_taxes_id_sales_foreign` (`id_sales`),
  KEY `sales_taxes_id_tax_foreign` (`id_tax`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of sales_taxes
-- ----------------------------
INSERT INTO `sales_taxes` VALUES ('1', '1', '1', '2017-05-17 00:26:33', '2017-05-12 03:33:09', '2017-05-17 00:26:33');
INSERT INTO `sales_taxes` VALUES ('2', '2', '1', '2017-05-12 04:05:22', '2017-05-12 03:56:46', '2017-05-12 04:05:22');
INSERT INTO `sales_taxes` VALUES ('3', '2', '1', null, '2017-05-12 04:05:22', '2017-05-12 04:05:22');
INSERT INTO `sales_taxes` VALUES ('4', '3', '1', null, '2017-05-12 04:07:44', '2017-05-12 04:07:44');
INSERT INTO `sales_taxes` VALUES ('5', '1', '1', null, '2017-05-17 00:26:33', '2017-05-17 00:26:33');

-- ----------------------------
-- Table structure for `slip_numbers`
-- ----------------------------
CREATE TABLE `slip_numbers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_sales` int(11) NOT NULL,
  `tracking_number` text COLLATE utf8_unicode_ci NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `slip_numbers_id_sales_foreign` (`id_sales`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of slip_numbers
-- ----------------------------
INSERT INTO `slip_numbers` VALUES ('1', '1', 'QWE123123123AD', null, '2017-05-12 03:33:08', '2017-05-12 03:33:08');
INSERT INTO `slip_numbers` VALUES ('2', '2', 'QWE321321655GG', null, '2017-05-12 03:56:46', '2017-05-12 03:56:46');
INSERT INTO `slip_numbers` VALUES ('3', '3', 'QWE123123123JK', null, '2017-05-12 04:07:44', '2017-05-12 04:07:44');
INSERT INTO `slip_numbers` VALUES ('4', '4', 'QWE34556758YU', null, '2017-05-12 04:21:50', '2017-05-12 04:21:50');
INSERT INTO `slip_numbers` VALUES ('5', '5', 'ER56724784544MY', '2017-05-21 12:28:37', '2017-05-12 04:27:53', '2017-05-21 12:28:37');
INSERT INTO `slip_numbers` VALUES ('6', '6', 'ZX123123123YU', null, '2017-05-12 04:30:03', '2017-05-12 04:30:03');
INSERT INTO `slip_numbers` VALUES ('7', '1', 'WER098098OIU', null, '0000-00-00 00:00:00', '2017-05-12 03:33:08');

-- ----------------------------
-- Table structure for `slip_postages`
-- ----------------------------
CREATE TABLE `slip_postages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_sales` int(11) NOT NULL,
  `mime` text COLLATE utf8_unicode_ci NOT NULL,
  `image` longtext COLLATE utf8_unicode_ci NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `slip_postages_id_sales_foreign` (`id_sales`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of slip_postages
-- ----------------------------
INSERT INTO `slip_postages` VALUES ('2', '1', 'image/jpeg', '[BLOB]', null, '2017-05-12 03:33:09', '2017-05-12 03:33:09');
INSERT INTO `slip_postages` VALUES ('1', '1', 'image/jpeg', '[BLOB]', null, '2017-05-12 03:33:09', '2017-05-12 03:33:09');

-- ----------------------------
-- Table structure for `taxes`
-- ----------------------------
CREATE TABLE `taxes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tax` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `amount` double(8,2) NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of taxes
-- ----------------------------
INSERT INTO `taxes` VALUES ('1', 'GST', '6.00', null, null, null);

-- ----------------------------
-- Table structure for `user_groups`
-- ----------------------------
CREATE TABLE `user_groups` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `group` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of user_groups
-- ----------------------------
INSERT INTO `user_groups` VALUES ('1', 'Administrator', null, null);
INSERT INTO `user_groups` VALUES ('2', 'Staff', null, null);

-- ----------------------------
-- View structure for `invoice`
-- ----------------------------
DROP VIEW IF EXISTS `invoice`;
