#
# TABLE STRUCTURE FOR: sma_addresses
#

DROP TABLE IF EXISTS `sma_addresses`;

CREATE TABLE `sma_addresses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `company_id` int(11) NOT NULL,
  `line1` varchar(50) NOT NULL,
  `line2` varchar(50) DEFAULT NULL,
  `city` varchar(25) NOT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `state` varchar(25) NOT NULL,
  `country` varchar(50) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_adjustment_items
#

DROP TABLE IF EXISTS `sma_adjustment_items`;

CREATE TABLE `sma_adjustment_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `adjustment_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `option_id` int(11) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `type` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `adjustment_id` (`adjustment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=222 DEFAULT CHARSET=utf8;

INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (200, 118, 1, NULL, '110.0000', 1, '', 'addition');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (201, 118, 2, NULL, '110.0000', 1, '', 'addition');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (202, 119, 1, NULL, '50.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (203, 119, 2, NULL, '50.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (204, 120, 1, NULL, '20.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (205, 120, 2, NULL, '20.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (206, 121, 1, NULL, '10.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (207, 121, 2, NULL, '10.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (208, 122, 1, NULL, '20.0000', 1, '', 'addition');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (209, 122, 2, NULL, '20.0000', 1, '', 'addition');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (210, 123, 1, NULL, '10.0000', 1, '', 'addition');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (211, 123, 2, NULL, '10.0000', 1, '', 'addition');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (212, 124, 1, NULL, '20.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (213, 124, 2, NULL, '20.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (214, 125, 1, NULL, '10.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (215, 125, 2, NULL, '10.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (216, 126, 1, NULL, '10.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (217, 126, 2, NULL, '10.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (218, 127, 1, NULL, '1.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (219, 127, 2, NULL, '1.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (220, 128, 1, NULL, '1.0000', 1, '', 'subtraction');
INSERT INTO `sma_adjustment_items` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `serial_no`, `type`) VALUES (221, 128, 2, NULL, '1.0000', 1, '', 'subtraction');


#
# TABLE STRUCTURE FOR: sma_adjustment_items_stores
#

DROP TABLE IF EXISTS `sma_adjustment_items_stores`;

CREATE TABLE `sma_adjustment_items_stores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `adjustment_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `option_id` int(11) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `type` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `adjustment_id` (`adjustment_id`)
) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=utf8;

INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (138, 81, 1, NULL, '50.0000', 1, 6, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (139, 81, 2, NULL, '50.0000', 1, 6, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (140, 82, 1, NULL, '20.0000', 1, 7, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (141, 82, 2, NULL, '20.0000', 1, 7, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (142, 83, 1, NULL, '10.0000', 1, 7, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (143, 83, 2, NULL, '10.0000', 1, 7, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (144, 84, 1, NULL, '10.0000', 1, 6, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (145, 84, 2, NULL, '10.0000', 1, 6, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (146, 85, 1, NULL, '10.0000', 1, 15, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (147, 85, 2, NULL, '10.0000', 1, 15, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (148, 86, 1, NULL, '1.0000', 1, 6, '', 'addition');
INSERT INTO `sma_adjustment_items_stores` (`id`, `adjustment_id`, `product_id`, `option_id`, `quantity`, `warehouse_id`, `store_id`, `serial_no`, `type`) VALUES (149, 87, 1, NULL, '1.0000', 1, 6, '', 'addition');


#
# TABLE STRUCTURE FOR: sma_adjustments
#

DROP TABLE IF EXISTS `sma_adjustments`;

CREATE TABLE `sma_adjustments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `note` text,
  `attachment` varchar(55) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `count_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8;

INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (118, '2018-05-06 18:44:00', '2018/05/0113', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (119, '2018-05-06 18:44:00', '2018/05/0114', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (120, '2018-05-06 18:45:00', '2018/05/0115', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (121, '2018-05-06 18:50:00', '2018/05/0116', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (122, '2018-05-06 18:53:00', '2018/05/0117', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (123, '2018-05-06 18:59:00', '2018/05/0118', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (124, '2018-05-06 18:59:00', '2018/05/0119', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (125, '2018-05-07 13:17:00', '2018/05/0120', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (126, '2018-05-07 16:34:00', '2018/05/0121', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (127, '2018-05-10 18:14:00', '2018/05/0122', 1, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments` (`id`, `date`, `reference_no`, `warehouse_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (128, '2018-05-10 18:14:00', '2018/05/0123', 1, '', NULL, 2, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_adjustments_stores
#

DROP TABLE IF EXISTS `sma_adjustments_stores`;

CREATE TABLE `sma_adjustments_stores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `store_id` int(20) DEFAULT NULL,
  `note` text,
  `attachment` varchar(55) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `count_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8;

INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (81, '2018-05-06 18:44:00', '2018/05/0114', 1, 6, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (82, '2018-05-06 18:45:00', '2018/05/0115', 1, 7, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (83, '2018-05-06 18:50:00', '2018/05/0116', 1, 7, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (84, '2018-05-07 13:17:00', '2018/05/0120', 1, 6, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (85, '2018-05-07 16:34:00', '2018/05/0121', 1, 15, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (86, '2018-05-10 18:14:00', '2018/05/0122', 1, 6, '', NULL, 2, NULL, NULL, NULL);
INSERT INTO `sma_adjustments_stores` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `note`, `attachment`, `created_by`, `updated_by`, `updated_at`, `count_id`) VALUES (87, '2018-05-10 18:14:00', '2018/05/0123', 1, 6, '', NULL, 2, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_brands
#

DROP TABLE IF EXISTS `sma_brands`;

CREATE TABLE `sma_brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(20) DEFAULT NULL,
  `name` varchar(50) NOT NULL,
  `image` varchar(50) DEFAULT NULL,
  `slug` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_calendar
#

DROP TABLE IF EXISTS `sma_calendar`;

CREATE TABLE `sma_calendar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(55) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `start` datetime NOT NULL,
  `end` datetime DEFAULT NULL,
  `color` varchar(7) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_captcha
#

DROP TABLE IF EXISTS `sma_captcha`;

CREATE TABLE `sma_captcha` (
  `captcha_id` bigint(13) unsigned NOT NULL AUTO_INCREMENT,
  `captcha_time` int(10) unsigned NOT NULL,
  `ip_address` varchar(16) CHARACTER SET latin1 NOT NULL DEFAULT '0',
  `word` varchar(20) CHARACTER SET latin1 NOT NULL,
  PRIMARY KEY (`captcha_id`),
  KEY `word` (`word`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_cashback
#

DROP TABLE IF EXISTS `sma_cashback`;

CREATE TABLE `sma_cashback` (
  `start_amount` varchar(60) NOT NULL,
  `end_amount` varchar(60) NOT NULL,
  `type` varchar(60) NOT NULL,
  `cashback` varchar(60) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO `sma_cashback` (`start_amount`, `end_amount`, `type`, `cashback`, `date`, `id`) VALUES ('456', '5678', 'flat', 'sadddsdf', '2018-02-26 15:09:09', 1);


#
# TABLE STRUCTURE FOR: sma_categories
#

DROP TABLE IF EXISTS `sma_categories`;

CREATE TABLE `sma_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(55) NOT NULL,
  `name` varchar(55) NOT NULL,
  `image` varchar(55) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `slug` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`) VALUES (3, 'C1', 'Category1', NULL, 0, 'category1');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`) VALUES (4, 'c2', 'cat2', NULL, 0, 'cat2');


#
# TABLE STRUCTURE FOR: sma_combo_items
#

DROP TABLE IF EXISTS `sma_combo_items`;

CREATE TABLE `sma_combo_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `item_code` varchar(20) NOT NULL,
  `quantity` decimal(12,4) NOT NULL,
  `unit_price` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_companies
#

DROP TABLE IF EXISTS `sma_companies`;

CREATE TABLE `sma_companies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(10) unsigned DEFAULT NULL,
  `group_name` varchar(20) NOT NULL,
  `customer_group_id` int(11) DEFAULT NULL,
  `customer_group_name` varchar(100) DEFAULT NULL,
  `name` varchar(55) NOT NULL,
  `company` varchar(255) NOT NULL,
  `vat_no` varchar(100) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(55) DEFAULT NULL,
  `state` varchar(55) DEFAULT NULL,
  `postal_code` varchar(8) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `cf1` varchar(100) DEFAULT NULL,
  `cf2` varchar(100) DEFAULT NULL,
  `cf3` varchar(100) DEFAULT NULL,
  `cf4` varchar(100) DEFAULT NULL,
  `cf5` varchar(100) DEFAULT NULL,
  `cf6` varchar(100) DEFAULT NULL,
  `invoice_footer` text,
  `payment_term` int(11) DEFAULT '0',
  `logo` varchar(255) DEFAULT 'logo.png',
  `award_points` int(11) DEFAULT '0',
  `deposit_amount` decimal(25,4) DEFAULT NULL,
  `price_group_id` int(11) DEFAULT NULL,
  `price_group_name` varchar(50) DEFAULT NULL,
  `store_id` varchar(50) NOT NULL,
  `werehouse_id` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`),
  KEY `group_id_2` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (1, 3, 'customer', 1, 'General', 'Walk-in Customer', 'Walk-in Customer', '', 'Customer Address', 'Petaling Jaya', 'Selangor', '46000', 'Malaysia', '0123456789', 'customer@tecdiary.com', '', '', '', '', '', '', NULL, 0, 'logo.png', 0, NULL, NULL, NULL, '', '');
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (2, 4, 'supplier', NULL, NULL, 'Test Supplier', 'Supplier Company Name', NULL, 'Supplier Address', 'Petaling Jaya', 'Selangor', '46050', 'Malaysia', '0123456789', 'supplier@tecdiary.com', '-', '-', '-', '-', '-', '-', NULL, 0, 'logo.png', 0, NULL, NULL, NULL, '', '');
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (3, NULL, 'biller', NULL, NULL, 'Mian Saleem', 'Test Biller', '5555', 'Biller adddress', 'City', '', '', 'Country', '012345678', 'saleem@tecdiary.com', '', '', '', '', '', '', ' Thank you for shopping with us. Please come again', 0, 'logo1.png', 0, NULL, NULL, NULL, '', '');
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (5, 3, 'customer', 1, 'General', 'vijay', 'new', '10', 'hosur', 'hosur', 'tamilnadu', '123456', '', '9876543210', 'vijay@gmail.com', '', '', '', '', '', '', NULL, 0, 'logo.png', 0, NULL, 1, 'Default', '', '');
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (6, 4, 'supplier', NULL, NULL, 'sabari', 'new', '', 'hosur', 'hosur', '', '', '', '9876543210', 'sabari@gmail.com', '', '', '', '', '', '', NULL, 0, 'logo.png', 0, NULL, NULL, NULL, '', '');


#
# TABLE STRUCTURE FOR: sma_costing
#

DROP TABLE IF EXISTS `sma_costing`;

CREATE TABLE `sma_costing` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `sale_item_id` int(11) NOT NULL,
  `sale_id` int(11) DEFAULT NULL,
  `purchase_item_id` int(11) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `purchase_net_unit_cost` decimal(25,4) DEFAULT NULL,
  `purchase_unit_cost` decimal(25,4) DEFAULT NULL,
  `sale_net_unit_price` decimal(25,4) NOT NULL,
  `sale_unit_price` decimal(25,4) NOT NULL,
  `quantity_balance` decimal(15,4) DEFAULT NULL,
  `inventory` tinyint(1) DEFAULT '0',
  `overselling` tinyint(1) DEFAULT '0',
  `option_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

INSERT INTO `sma_costing` (`id`, `date`, `product_id`, `sale_item_id`, `sale_id`, `purchase_item_id`, `quantity`, `purchase_net_unit_cost`, `purchase_unit_cost`, `sale_net_unit_price`, `sale_unit_price`, `quantity_balance`, `inventory`, `overselling`, `option_id`) VALUES (19, '2018-05-06', 1, 39, 93, 118, '10.0000', '50.0000', '50.0000', '100.0000', '100.0000', '20.0000', 1, 0, NULL);
INSERT INTO `sma_costing` (`id`, `date`, `product_id`, `sale_item_id`, `sale_id`, `purchase_item_id`, `quantity`, `purchase_net_unit_cost`, `purchase_unit_cost`, `sale_net_unit_price`, `sale_unit_price`, `quantity_balance`, `inventory`, `overselling`, `option_id`) VALUES (20, '2018-05-06', 2, 40, 93, 119, '10.0000', '50.0000', '50.0000', '100.0000', '100.0000', '20.0000', 1, 0, NULL);
INSERT INTO `sma_costing` (`id`, `date`, `product_id`, `sale_item_id`, `sale_id`, `purchase_item_id`, `quantity`, `purchase_net_unit_cost`, `purchase_unit_cost`, `sale_net_unit_price`, `sale_unit_price`, `quantity_balance`, `inventory`, `overselling`, `option_id`) VALUES (21, '2018-05-09', 2, 41, 94, 119, '1.0000', '50.0000', '50.0000', '100.0000', '100.0000', '13.0000', 1, 0, NULL);
INSERT INTO `sma_costing` (`id`, `date`, `product_id`, `sale_item_id`, `sale_id`, `purchase_item_id`, `quantity`, `purchase_net_unit_cost`, `purchase_unit_cost`, `sale_net_unit_price`, `sale_unit_price`, `quantity_balance`, `inventory`, `overselling`, `option_id`) VALUES (22, '2018-05-09', 2, 42, 95, 119, '1.0000', '50.0000', '50.0000', '100.0000', '100.0000', '12.0000', 1, 0, NULL);


#
# TABLE STRUCTURE FOR: sma_coupon
#

DROP TABLE IF EXISTS `sma_coupon`;

CREATE TABLE `sma_coupon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `coupon_code` varchar(60) NOT NULL,
  `start_amount` varchar(60) DEFAULT NULL,
  `end_amount` varchar(60) DEFAULT NULL,
  `type` varchar(60) DEFAULT NULL,
  `cashback_type` varchar(60) DEFAULT NULL,
  `cashback` varchar(255) DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO `sma_coupon` (`id`, `coupon_code`, `start_amount`, `end_amount`, `type`, `cashback_type`, `cashback`, `date`) VALUES (1, 'dsfdff', '4000', '3000', 'flat', 'overall', 'gghumy', '2018-02-24 19:11:53');


#
# TABLE STRUCTURE FOR: sma_currencies
#

DROP TABLE IF EXISTS `sma_currencies`;

CREATE TABLE `sma_currencies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(5) NOT NULL,
  `name` varchar(55) NOT NULL,
  `rate` decimal(12,4) NOT NULL,
  `auto_update` tinyint(1) NOT NULL DEFAULT '0',
  `symbol` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

INSERT INTO `sma_currencies` (`id`, `code`, `name`, `rate`, `auto_update`, `symbol`) VALUES (1, 'USD', 'US Dollar', '1.0000', 0, NULL);
INSERT INTO `sma_currencies` (`id`, `code`, `name`, `rate`, `auto_update`, `symbol`) VALUES (2, 'ERU', 'EURO', '0.7340', 0, NULL);


#
# TABLE STRUCTURE FOR: sma_customer_groups
#

DROP TABLE IF EXISTS `sma_customer_groups`;

CREATE TABLE `sma_customer_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `percent` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO `sma_customer_groups` (`id`, `name`, `percent`) VALUES (1, 'General', 0);
INSERT INTO `sma_customer_groups` (`id`, `name`, `percent`) VALUES (2, 'Reseller', -5);
INSERT INTO `sma_customer_groups` (`id`, `name`, `percent`) VALUES (3, 'Distributor', -15);
INSERT INTO `sma_customer_groups` (`id`, `name`, `percent`) VALUES (4, 'New Customer (+10)', 10);


#
# TABLE STRUCTURE FOR: sma_date_format
#

DROP TABLE IF EXISTS `sma_date_format`;

CREATE TABLE `sma_date_format` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `js` varchar(20) NOT NULL,
  `php` varchar(20) NOT NULL,
  `sql` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

INSERT INTO `sma_date_format` (`id`, `js`, `php`, `sql`) VALUES (1, 'mm-dd-yyyy', 'm-d-Y', '%m-%d-%Y');
INSERT INTO `sma_date_format` (`id`, `js`, `php`, `sql`) VALUES (2, 'mm/dd/yyyy', 'm/d/Y', '%m/%d/%Y');
INSERT INTO `sma_date_format` (`id`, `js`, `php`, `sql`) VALUES (3, 'mm.dd.yyyy', 'm.d.Y', '%m.%d.%Y');
INSERT INTO `sma_date_format` (`id`, `js`, `php`, `sql`) VALUES (4, 'dd-mm-yyyy', 'd-m-Y', '%d-%m-%Y');
INSERT INTO `sma_date_format` (`id`, `js`, `php`, `sql`) VALUES (5, 'dd/mm/yyyy', 'd/m/Y', '%d/%m/%Y');
INSERT INTO `sma_date_format` (`id`, `js`, `php`, `sql`) VALUES (6, 'dd.mm.yyyy', 'd.m.Y', '%d.%m.%Y');


#
# TABLE STRUCTURE FOR: sma_deliveries
#

DROP TABLE IF EXISTS `sma_deliveries`;

CREATE TABLE `sma_deliveries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sale_id` int(11) NOT NULL,
  `do_reference_no` varchar(50) NOT NULL,
  `sale_reference_no` varchar(50) NOT NULL,
  `customer` varchar(55) NOT NULL,
  `address` varchar(1000) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `status` varchar(15) DEFAULT NULL,
  `attachment` varchar(50) DEFAULT NULL,
  `delivered_by` varchar(50) DEFAULT NULL,
  `received_by` varchar(50) DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_deposits
#

DROP TABLE IF EXISTS `sma_deposits`;

CREATE TABLE `sma_deposits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `company_id` int(11) NOT NULL,
  `amount` decimal(25,4) NOT NULL,
  `paid_by` varchar(50) DEFAULT NULL,
  `note` varchar(255) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_discount
#

DROP TABLE IF EXISTS `sma_discount`;

CREATE TABLE `sma_discount` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `start_amount` varchar(60) DEFAULT NULL,
  `end_amount` varchar(60) DEFAULT NULL,
  `discount_type` varchar(60) DEFAULT NULL,
  `categories` varchar(255) DEFAULT NULL,
  `type` varchar(60) DEFAULT NULL,
  `customer_price_group` varchar(60) DEFAULT NULL,
  `discount` varchar(60) DEFAULT NULL,
  `account` varchar(255) DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO `sma_discount` (`id`, `start_amount`, `end_amount`, `discount_type`, `categories`, `type`, `customer_price_group`, `discount`, `account`, `date`) VALUES (1, '4000', '3000', 'specific', '1,2', 'percentage', 'default', '34', 'Store Delhi', '2018-02-24 19:11:53');
INSERT INTO `sma_discount` (`id`, `start_amount`, `end_amount`, `discount_type`, `categories`, `type`, `customer_price_group`, `discount`, `account`, `date`) VALUES (3, '567', '678', 'specific', '1,2,3', 'percentage', 'default', '50', 'Store Delhi', '2018-02-26 16:53:07');


#
# TABLE STRUCTURE FOR: sma_expense_categories
#

DROP TABLE IF EXISTS `sma_expense_categories`;

CREATE TABLE `sma_expense_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(55) NOT NULL,
  `name` varchar(55) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_expenses
#

DROP TABLE IF EXISTS `sma_expenses`;

CREATE TABLE `sma_expenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference` varchar(50) NOT NULL,
  `amount` decimal(25,4) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `created_by` varchar(55) NOT NULL,
  `attachment` varchar(55) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

INSERT INTO `sma_expenses` (`id`, `date`, `reference`, `amount`, `note`, `created_by`, `attachment`, `category_id`, `warehouse_id`, `store_id`) VALUES (1, '2018-04-14 01:23:00', 'salary', '50.0000', '', '2', NULL, 0, 1, 0);
INSERT INTO `sma_expenses` (`id`, `date`, `reference`, `amount`, `note`, `created_by`, `attachment`, `category_id`, `warehouse_id`, `store_id`) VALUES (2, '2018-05-03 11:48:00', '2018/05/0001', '150.0000', '<p>zss</p>', '2', NULL, 0, 1, 0);
INSERT INTO `sma_expenses` (`id`, `date`, `reference`, `amount`, `note`, `created_by`, `attachment`, `category_id`, `warehouse_id`, `store_id`) VALUES (3, '2018-05-03 11:58:00', '2018/05/0002', '20.0000', '<p>dsds</p>', '2', NULL, 0, 1, 12);


#
# TABLE STRUCTURE FOR: sma_gift_card_topups
#

DROP TABLE IF EXISTS `sma_gift_card_topups`;

CREATE TABLE `sma_gift_card_topups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `card_id` int(11) NOT NULL,
  `amount` decimal(15,4) NOT NULL,
  `created_by` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `card_id` (`card_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_gift_cards
#

DROP TABLE IF EXISTS `sma_gift_cards`;

CREATE TABLE `sma_gift_cards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `card_no` varchar(20) NOT NULL,
  `value` decimal(25,4) NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `customer` varchar(255) DEFAULT NULL,
  `balance` decimal(25,4) NOT NULL,
  `expiry` date DEFAULT NULL,
  `created_by` varchar(55) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `card_no` (`card_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_groups
#

DROP TABLE IF EXISTS `sma_groups`;

CREATE TABLE `sma_groups` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  `description` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (1, 'owner', 'Owner');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (2, 'admin', 'Administrator');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (3, 'customer', 'Customer');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (4, 'supplier', 'Supplier');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (5, 'sales', 'Sales Staff');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (6, 'conunters', 'Counter person');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (7, 'warehousemanager', 'warehouse manager');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (8, 'storemanager', 'Store Manager');


#
# TABLE STRUCTURE FOR: sma_login_attempts
#

DROP TABLE IF EXISTS `sma_login_attempts`;

CREATE TABLE `sma_login_attempts` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `ip_address` varbinary(16) NOT NULL,
  `login` varchar(100) NOT NULL,
  `time` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_migrations
#

DROP TABLE IF EXISTS `sma_migrations`;

CREATE TABLE `sma_migrations` (
  `version` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_migrations` (`version`) VALUES ('315');


#
# TABLE STRUCTURE FOR: sma_newsletters
#

DROP TABLE IF EXISTS `sma_newsletters`;

CREATE TABLE `sma_newsletters` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `from_date` datetime DEFAULT NULL,
  `till_date` datetime DEFAULT NULL,
  `scope` tinyint(1) NOT NULL DEFAULT '3',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

INSERT INTO `sma_newsletters` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (1, 'Test Title', '<p>Thank you for purchasing Stock Manager Advance.</p>', '2014-08-15 06:00:57', '2015-01-01 00:00:00', '2017-01-01 00:00:00', 3);
INSERT INTO `sma_newsletters` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (3, 'test rfdt', '<p>dsdsfdsfd fhgfhg</p>', '2018-02-23 19:21:30', NULL, NULL, 3);
INSERT INTO `sma_newsletters` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (4, 'sfdsf', '<p>fdsfdg</p>', '2018-02-24 17:22:00', NULL, NULL, 3);
INSERT INTO `sma_newsletters` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (5, 'ds', '<p>fdfg</p>', '2018-02-24 17:22:07', NULL, NULL, 3);
INSERT INTO `sma_newsletters` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (6, 'dfdg', '<p>gfgf</p>', '2018-02-24 17:23:43', NULL, NULL, 3);


#
# TABLE STRUCTURE FOR: sma_newsletters1
#

DROP TABLE IF EXISTS `sma_newsletters1`;

CREATE TABLE `sma_newsletters1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL,
  `slug` varchar(55) DEFAULT NULL,
  `message_body` text,
  PRIMARY KEY (`id`),
  KEY `name` (`title`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (1, 'pantaloon', 'pantaloon', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (2, 'levies', 'levies', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (3, 'addidas', 'addidas', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (4, 'lenovo', 'lenovo', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (5, 'Canon', 'canon', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (6, 'acer', 'acer', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (7, 'Samsung', 'samsung', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (8, 'Microsoft', 'microsoft', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (9, 'LG', 'lg', NULL);
INSERT INTO `sma_newsletters1` (`id`, `title`, `slug`, `message_body`) VALUES (10, 'News Letter 1', 'newsletter', 'text fgdfgfg');


#
# TABLE STRUCTURE FOR: sma_notifications
#

DROP TABLE IF EXISTS `sma_notifications`;

CREATE TABLE `sma_notifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comment` text NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `from_date` datetime DEFAULT NULL,
  `till_date` datetime DEFAULT NULL,
  `scope` tinyint(1) NOT NULL DEFAULT '3',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_order_ref
#

DROP TABLE IF EXISTS `sma_order_ref`;

CREATE TABLE `sma_order_ref` (
  `ref_id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `so` int(11) NOT NULL DEFAULT '1',
  `qu` int(11) NOT NULL DEFAULT '1',
  `po` int(11) NOT NULL DEFAULT '1',
  `to` int(11) NOT NULL DEFAULT '1',
  `pos` int(11) NOT NULL DEFAULT '1',
  `do` int(11) NOT NULL DEFAULT '1',
  `pay` int(11) NOT NULL DEFAULT '1',
  `re` int(11) NOT NULL DEFAULT '1',
  `rep` int(11) NOT NULL DEFAULT '1',
  `ex` int(11) NOT NULL DEFAULT '1',
  `ppay` int(11) NOT NULL DEFAULT '1',
  `qa` int(11) DEFAULT '1',
  PRIMARY KEY (`ref_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_order_ref` (`ref_id`, `date`, `so`, `qu`, `po`, `to`, `pos`, `do`, `pay`, `re`, `rep`, `ex`, `ppay`, `qa`) VALUES (1, '2015-03-01', 7, 3, 2, 1, 48, 1, 72, 12, 1, 3, 1, 124);


#
# TABLE STRUCTURE FOR: sma_payments
#

DROP TABLE IF EXISTS `sma_payments`;

CREATE TABLE `sma_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `sale_id` int(11) DEFAULT NULL,
  `return_id` int(11) DEFAULT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `reference_no` varchar(50) NOT NULL,
  `transaction_id` varchar(50) DEFAULT NULL,
  `paid_by` varchar(20) NOT NULL,
  `cheque_no` varchar(20) DEFAULT NULL,
  `cc_no` varchar(20) DEFAULT NULL,
  `cc_holder` varchar(25) DEFAULT NULL,
  `cc_month` varchar(2) DEFAULT NULL,
  `cc_year` varchar(4) DEFAULT NULL,
  `cc_type` varchar(20) DEFAULT NULL,
  `amount` decimal(25,4) NOT NULL,
  `currency` varchar(3) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `attachment` varchar(55) DEFAULT NULL,
  `type` varchar(20) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `pos_paid` decimal(25,4) DEFAULT '0.0000',
  `pos_balance` decimal(25,4) DEFAULT '0.0000',
  `approval_code` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8;

INSERT INTO `sma_payments` (`id`, `date`, `sale_id`, `return_id`, `purchase_id`, `reference_no`, `transaction_id`, `paid_by`, `cheque_no`, `cc_no`, `cc_holder`, `cc_month`, `cc_year`, `cc_type`, `amount`, `currency`, `created_by`, `attachment`, `type`, `note`, `pos_paid`, `pos_balance`, `approval_code`) VALUES (69, '2018-05-06 19:01:33', 93, NULL, NULL, 'IPAY2018/05/0067', NULL, 'cash', '', '', '', '', '', '', '2000.0000', NULL, 2, NULL, 'received', '', '2000.0000', '0.0000', NULL);
INSERT INTO `sma_payments` (`id`, `date`, `sale_id`, `return_id`, `purchase_id`, `reference_no`, `transaction_id`, `paid_by`, `cheque_no`, `cc_no`, `cc_holder`, `cc_month`, `cc_year`, `cc_type`, `amount`, `currency`, `created_by`, `attachment`, `type`, `note`, `pos_paid`, `pos_balance`, `approval_code`) VALUES (70, '2018-05-09 16:43:48', 94, NULL, NULL, 'IPAY2018/05/0068', NULL, 'cash', '', '', '', '', '', '', '100.0000', NULL, 1, NULL, 'received', '', '100.0000', '0.0000', NULL);
INSERT INTO `sma_payments` (`id`, `date`, `sale_id`, `return_id`, `purchase_id`, `reference_no`, `transaction_id`, `paid_by`, `cheque_no`, `cc_no`, `cc_holder`, `cc_month`, `cc_year`, `cc_type`, `amount`, `currency`, `created_by`, `attachment`, `type`, `note`, `pos_paid`, `pos_balance`, `approval_code`) VALUES (71, '2018-05-09 16:47:10', 95, NULL, NULL, 'IPAY2018/05/0069', NULL, 'cash', '', '', '', '', '', '', '100.0000', NULL, 2, NULL, 'received', '', '100.0000', '0.0000', NULL);
INSERT INTO `sma_payments` (`id`, `date`, `sale_id`, `return_id`, `purchase_id`, `reference_no`, `transaction_id`, `paid_by`, `cheque_no`, `cc_no`, `cc_holder`, `cc_month`, `cc_year`, `cc_type`, `amount`, `currency`, `created_by`, `attachment`, `type`, `note`, `pos_paid`, `pos_balance`, `approval_code`) VALUES (72, '2018-05-09 21:47:42', 96, NULL, NULL, 'IPAY2018/05/0070', NULL, 'CC', '', '4242424242424242', 'yogesh', '02', '2019', 'MasterCard', '100.0000', NULL, 2, NULL, 'received', '', '100.0000', '0.0000', NULL);
INSERT INTO `sma_payments` (`id`, `date`, `sale_id`, `return_id`, `purchase_id`, `reference_no`, `transaction_id`, `paid_by`, `cheque_no`, `cc_no`, `cc_holder`, `cc_month`, `cc_year`, `cc_type`, `amount`, `currency`, `created_by`, `attachment`, `type`, `note`, `pos_paid`, `pos_balance`, `approval_code`) VALUES (73, '2018-05-10 12:02:00', 97, NULL, NULL, 'IPAY2018/05/0071', NULL, 'cash', '', '', '', '', '', 'Visa', '-100.0000', NULL, 2, NULL, 'returned', NULL, '0.0000', '0.0000', NULL);


#
# TABLE STRUCTURE FOR: sma_paypal
#

DROP TABLE IF EXISTS `sma_paypal`;

CREATE TABLE `sma_paypal` (
  `id` int(11) NOT NULL,
  `active` tinyint(4) NOT NULL,
  `account_email` varchar(255) NOT NULL,
  `paypal_currency` varchar(3) NOT NULL DEFAULT 'USD',
  `fixed_charges` decimal(25,4) NOT NULL DEFAULT '2.0000',
  `extra_charges_my` decimal(25,4) NOT NULL DEFAULT '3.9000',
  `extra_charges_other` decimal(25,4) NOT NULL DEFAULT '4.4000',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_paypal` (`id`, `active`, `account_email`, `paypal_currency`, `fixed_charges`, `extra_charges_my`, `extra_charges_other`) VALUES (1, 1, 'mypaypal@paypal.com', 'USD', '0.0000', '0.0000', '0.0000');


#
# TABLE STRUCTURE FOR: sma_permissions
#

DROP TABLE IF EXISTS `sma_permissions`;

CREATE TABLE `sma_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `products-index` tinyint(1) DEFAULT '0',
  `products-add` tinyint(1) DEFAULT '0',
  `products-edit` tinyint(1) DEFAULT '0',
  `products-delete` tinyint(1) DEFAULT '0',
  `products-cost` tinyint(1) DEFAULT '0',
  `products-price` tinyint(1) DEFAULT '0',
  `quotes-index` tinyint(1) DEFAULT '0',
  `quotes-add` tinyint(1) DEFAULT '0',
  `quotes-edit` tinyint(1) DEFAULT '0',
  `quotes-pdf` tinyint(1) DEFAULT '0',
  `quotes-email` tinyint(1) DEFAULT '0',
  `quotes-delete` tinyint(1) DEFAULT '0',
  `sales-index` tinyint(1) DEFAULT '0',
  `sales-add` tinyint(1) DEFAULT '0',
  `sales-edit` tinyint(1) DEFAULT '0',
  `sales-pdf` tinyint(1) DEFAULT '0',
  `sales-email` tinyint(1) DEFAULT '0',
  `sales-delete` tinyint(1) DEFAULT '0',
  `purchases-index` tinyint(1) DEFAULT '0',
  `purchases-add` tinyint(1) DEFAULT '0',
  `purchases-edit` tinyint(1) DEFAULT '0',
  `purchases-pdf` tinyint(1) DEFAULT '0',
  `purchases-email` tinyint(1) DEFAULT '0',
  `purchases-delete` tinyint(1) DEFAULT '0',
  `transfers-index` tinyint(1) DEFAULT '0',
  `transfers-add` tinyint(1) DEFAULT '0',
  `transfers-edit` tinyint(1) DEFAULT '0',
  `transfers-pdf` tinyint(1) DEFAULT '0',
  `transfers-email` tinyint(1) DEFAULT '0',
  `transfers-delete` tinyint(1) DEFAULT '0',
  `customers-index` tinyint(1) DEFAULT '0',
  `customers-add` tinyint(1) DEFAULT '0',
  `customers-edit` tinyint(1) DEFAULT '0',
  `customers-delete` tinyint(1) DEFAULT '0',
  `suppliers-index` tinyint(1) DEFAULT '0',
  `suppliers-add` tinyint(1) DEFAULT '0',
  `suppliers-edit` tinyint(1) DEFAULT '0',
  `suppliers-delete` tinyint(1) DEFAULT '0',
  `sales-deliveries` tinyint(1) DEFAULT '0',
  `sales-add_delivery` tinyint(1) DEFAULT '0',
  `sales-edit_delivery` tinyint(1) DEFAULT '0',
  `sales-delete_delivery` tinyint(1) DEFAULT '0',
  `sales-email_delivery` tinyint(1) DEFAULT '0',
  `sales-pdf_delivery` tinyint(1) DEFAULT '0',
  `sales-gift_cards` tinyint(1) DEFAULT '0',
  `sales-add_gift_card` tinyint(1) DEFAULT '0',
  `sales-edit_gift_card` tinyint(1) DEFAULT '0',
  `sales-delete_gift_card` tinyint(1) DEFAULT '0',
  `pos-index` tinyint(1) DEFAULT '0',
  `sales-return_sales` tinyint(1) DEFAULT '0',
  `reports-index` tinyint(1) DEFAULT '0',
  `reports-warehouse_stock` tinyint(1) DEFAULT '0',
  `reports-quantity_alerts` tinyint(1) DEFAULT '0',
  `reports-expiry_alerts` tinyint(1) DEFAULT '0',
  `reports-products` tinyint(1) DEFAULT '0',
  `reports-daily_sales` tinyint(1) DEFAULT '0',
  `reports-monthly_sales` tinyint(1) DEFAULT '0',
  `reports-sales` tinyint(1) DEFAULT '0',
  `reports-payments` tinyint(1) DEFAULT '0',
  `reports-purchases` tinyint(1) DEFAULT '0',
  `reports-profit_loss` tinyint(1) DEFAULT '0',
  `reports-customers` tinyint(1) DEFAULT '0',
  `reports-suppliers` tinyint(1) DEFAULT '0',
  `reports-staff` tinyint(1) DEFAULT '0',
  `reports-register` tinyint(1) DEFAULT '0',
  `sales-payments` tinyint(1) DEFAULT '0',
  `purchases-payments` tinyint(1) DEFAULT '0',
  `purchases-expenses` tinyint(1) DEFAULT '0',
  `products-adjustments` tinyint(1) NOT NULL DEFAULT '0',
  `bulk_actions` tinyint(1) NOT NULL DEFAULT '0',
  `customers-deposits` tinyint(1) NOT NULL DEFAULT '0',
  `customers-delete_deposit` tinyint(1) NOT NULL DEFAULT '0',
  `products-barcode` tinyint(1) NOT NULL DEFAULT '0',
  `purchases-return_purchases` tinyint(1) NOT NULL DEFAULT '0',
  `reports-expenses` tinyint(1) NOT NULL DEFAULT '0',
  `reports-daily_purchases` tinyint(1) DEFAULT '0',
  `reports-monthly_purchases` tinyint(1) DEFAULT '0',
  `products-stock_count` tinyint(1) DEFAULT '0',
  `edit_price` tinyint(1) DEFAULT '0',
  `returns-index` tinyint(1) DEFAULT '0',
  `returns-add` tinyint(1) DEFAULT '0',
  `returns-edit` tinyint(1) DEFAULT '0',
  `returns-delete` tinyint(1) DEFAULT '0',
  `returns-email` tinyint(1) DEFAULT '0',
  `returns-pdf` tinyint(1) DEFAULT '0',
  `reports-tax` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO `sma_permissions` (`id`, `group_id`, `products-index`, `products-add`, `products-edit`, `products-delete`, `products-cost`, `products-price`, `quotes-index`, `quotes-add`, `quotes-edit`, `quotes-pdf`, `quotes-email`, `quotes-delete`, `sales-index`, `sales-add`, `sales-edit`, `sales-pdf`, `sales-email`, `sales-delete`, `purchases-index`, `purchases-add`, `purchases-edit`, `purchases-pdf`, `purchases-email`, `purchases-delete`, `transfers-index`, `transfers-add`, `transfers-edit`, `transfers-pdf`, `transfers-email`, `transfers-delete`, `customers-index`, `customers-add`, `customers-edit`, `customers-delete`, `suppliers-index`, `suppliers-add`, `suppliers-edit`, `suppliers-delete`, `sales-deliveries`, `sales-add_delivery`, `sales-edit_delivery`, `sales-delete_delivery`, `sales-email_delivery`, `sales-pdf_delivery`, `sales-gift_cards`, `sales-add_gift_card`, `sales-edit_gift_card`, `sales-delete_gift_card`, `pos-index`, `sales-return_sales`, `reports-index`, `reports-warehouse_stock`, `reports-quantity_alerts`, `reports-expiry_alerts`, `reports-products`, `reports-daily_sales`, `reports-monthly_sales`, `reports-sales`, `reports-payments`, `reports-purchases`, `reports-profit_loss`, `reports-customers`, `reports-suppliers`, `reports-staff`, `reports-register`, `sales-payments`, `purchases-payments`, `purchases-expenses`, `products-adjustments`, `bulk_actions`, `customers-deposits`, `customers-delete_deposit`, `products-barcode`, `purchases-return_purchases`, `reports-expenses`, `reports-daily_purchases`, `reports-monthly_purchases`, `products-stock_count`, `edit_price`, `returns-index`, `returns-add`, `returns-edit`, `returns-delete`, `returns-email`, `returns-pdf`, `reports-tax`) VALUES (1, 5, 1, NULL, NULL, NULL, NULL, NULL, 1, 1, 1, 1, 1, NULL, 1, 1, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, 1, 1, 1, NULL, NULL, 1, 1, 1, NULL, NULL, 1, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_permissions` (`id`, `group_id`, `products-index`, `products-add`, `products-edit`, `products-delete`, `products-cost`, `products-price`, `quotes-index`, `quotes-add`, `quotes-edit`, `quotes-pdf`, `quotes-email`, `quotes-delete`, `sales-index`, `sales-add`, `sales-edit`, `sales-pdf`, `sales-email`, `sales-delete`, `purchases-index`, `purchases-add`, `purchases-edit`, `purchases-pdf`, `purchases-email`, `purchases-delete`, `transfers-index`, `transfers-add`, `transfers-edit`, `transfers-pdf`, `transfers-email`, `transfers-delete`, `customers-index`, `customers-add`, `customers-edit`, `customers-delete`, `suppliers-index`, `suppliers-add`, `suppliers-edit`, `suppliers-delete`, `sales-deliveries`, `sales-add_delivery`, `sales-edit_delivery`, `sales-delete_delivery`, `sales-email_delivery`, `sales-pdf_delivery`, `sales-gift_cards`, `sales-add_gift_card`, `sales-edit_gift_card`, `sales-delete_gift_card`, `pos-index`, `sales-return_sales`, `reports-index`, `reports-warehouse_stock`, `reports-quantity_alerts`, `reports-expiry_alerts`, `reports-products`, `reports-daily_sales`, `reports-monthly_sales`, `reports-sales`, `reports-payments`, `reports-purchases`, `reports-profit_loss`, `reports-customers`, `reports-suppliers`, `reports-staff`, `reports-register`, `sales-payments`, `purchases-payments`, `purchases-expenses`, `products-adjustments`, `bulk_actions`, `customers-deposits`, `customers-delete_deposit`, `products-barcode`, `purchases-return_purchases`, `reports-expenses`, `reports-daily_purchases`, `reports-monthly_purchases`, `products-stock_count`, `edit_price`, `returns-index`, `returns-add`, `returns-edit`, `returns-delete`, `returns-email`, `returns-pdf`, `reports-tax`) VALUES (2, 6, 1, NULL, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, 0, 1, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 1, 1, 1, 1, 1, 1, NULL);
INSERT INTO `sma_permissions` (`id`, `group_id`, `products-index`, `products-add`, `products-edit`, `products-delete`, `products-cost`, `products-price`, `quotes-index`, `quotes-add`, `quotes-edit`, `quotes-pdf`, `quotes-email`, `quotes-delete`, `sales-index`, `sales-add`, `sales-edit`, `sales-pdf`, `sales-email`, `sales-delete`, `purchases-index`, `purchases-add`, `purchases-edit`, `purchases-pdf`, `purchases-email`, `purchases-delete`, `transfers-index`, `transfers-add`, `transfers-edit`, `transfers-pdf`, `transfers-email`, `transfers-delete`, `customers-index`, `customers-add`, `customers-edit`, `customers-delete`, `suppliers-index`, `suppliers-add`, `suppliers-edit`, `suppliers-delete`, `sales-deliveries`, `sales-add_delivery`, `sales-edit_delivery`, `sales-delete_delivery`, `sales-email_delivery`, `sales-pdf_delivery`, `sales-gift_cards`, `sales-add_gift_card`, `sales-edit_gift_card`, `sales-delete_gift_card`, `pos-index`, `sales-return_sales`, `reports-index`, `reports-warehouse_stock`, `reports-quantity_alerts`, `reports-expiry_alerts`, `reports-products`, `reports-daily_sales`, `reports-monthly_sales`, `reports-sales`, `reports-payments`, `reports-purchases`, `reports-profit_loss`, `reports-customers`, `reports-suppliers`, `reports-staff`, `reports-register`, `sales-payments`, `purchases-payments`, `purchases-expenses`, `products-adjustments`, `bulk_actions`, `customers-deposits`, `customers-delete_deposit`, `products-barcode`, `purchases-return_purchases`, `reports-expenses`, `reports-daily_purchases`, `reports-monthly_purchases`, `products-stock_count`, `edit_price`, `returns-index`, `returns-add`, `returns-edit`, `returns-delete`, `returns-email`, `returns-pdf`, `reports-tax`) VALUES (3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, NULL, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
INSERT INTO `sma_permissions` (`id`, `group_id`, `products-index`, `products-add`, `products-edit`, `products-delete`, `products-cost`, `products-price`, `quotes-index`, `quotes-add`, `quotes-edit`, `quotes-pdf`, `quotes-email`, `quotes-delete`, `sales-index`, `sales-add`, `sales-edit`, `sales-pdf`, `sales-email`, `sales-delete`, `purchases-index`, `purchases-add`, `purchases-edit`, `purchases-pdf`, `purchases-email`, `purchases-delete`, `transfers-index`, `transfers-add`, `transfers-edit`, `transfers-pdf`, `transfers-email`, `transfers-delete`, `customers-index`, `customers-add`, `customers-edit`, `customers-delete`, `suppliers-index`, `suppliers-add`, `suppliers-edit`, `suppliers-delete`, `sales-deliveries`, `sales-add_delivery`, `sales-edit_delivery`, `sales-delete_delivery`, `sales-email_delivery`, `sales-pdf_delivery`, `sales-gift_cards`, `sales-add_gift_card`, `sales-edit_gift_card`, `sales-delete_gift_card`, `pos-index`, `sales-return_sales`, `reports-index`, `reports-warehouse_stock`, `reports-quantity_alerts`, `reports-expiry_alerts`, `reports-products`, `reports-daily_sales`, `reports-monthly_sales`, `reports-sales`, `reports-payments`, `reports-purchases`, `reports-profit_loss`, `reports-customers`, `reports-suppliers`, `reports-staff`, `reports-register`, `sales-payments`, `purchases-payments`, `purchases-expenses`, `products-adjustments`, `bulk_actions`, `customers-deposits`, `customers-delete_deposit`, `products-barcode`, `purchases-return_purchases`, `reports-expenses`, `reports-daily_purchases`, `reports-monthly_purchases`, `products-stock_count`, `edit_price`, `returns-index`, `returns-add`, `returns-edit`, `returns-delete`, `returns-email`, `returns-pdf`, `reports-tax`) VALUES (4, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, NULL, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);


#
# TABLE STRUCTURE FOR: sma_pos_register
#

DROP TABLE IF EXISTS `sma_pos_register`;

CREATE TABLE `sma_pos_register` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user_id` int(11) NOT NULL,
  `cash_in_hand` decimal(25,4) NOT NULL,
  `status` varchar(10) NOT NULL,
  `total_cash` decimal(25,4) DEFAULT NULL,
  `total_cheques` int(11) DEFAULT NULL,
  `total_cc_slips` int(11) DEFAULT NULL,
  `total_cash_submitted` decimal(25,4) DEFAULT NULL,
  `total_cheques_submitted` int(11) DEFAULT NULL,
  `total_cc_slips_submitted` int(11) DEFAULT NULL,
  `note` text,
  `closed_at` timestamp NULL DEFAULT NULL,
  `transfer_opened_bills` varchar(50) DEFAULT NULL,
  `closed_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (1, '2018-02-20 06:48:16', 1, '500000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (2, '2018-04-10 20:36:40', 2, '1000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (3, '2018-04-21 00:49:14', 10, '500.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (4, '2018-04-22 00:05:19', 8, '20000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (5, '2018-04-25 23:26:38', 14, '50000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (6, '2018-04-26 03:19:45', 15, '10.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (7, '2018-05-04 13:33:59', 16, '50000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES (8, '2018-05-04 13:37:26', 17, '20000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_pos_settings
#

DROP TABLE IF EXISTS `sma_pos_settings`;

CREATE TABLE `sma_pos_settings` (
  `pos_id` int(1) NOT NULL,
  `cat_limit` int(11) NOT NULL,
  `pro_limit` int(11) NOT NULL,
  `default_category` int(11) NOT NULL,
  `default_customer` int(11) NOT NULL,
  `default_biller` int(11) NOT NULL,
  `display_time` varchar(3) NOT NULL DEFAULT 'yes',
  `cf_title1` varchar(255) DEFAULT NULL,
  `cf_title2` varchar(255) DEFAULT NULL,
  `cf_value1` varchar(255) DEFAULT NULL,
  `cf_value2` varchar(255) DEFAULT NULL,
  `receipt_printer` varchar(55) DEFAULT NULL,
  `cash_drawer_codes` varchar(55) DEFAULT NULL,
  `focus_add_item` varchar(55) DEFAULT NULL,
  `add_manual_product` varchar(55) DEFAULT NULL,
  `customer_selection` varchar(55) DEFAULT NULL,
  `add_customer` varchar(55) DEFAULT NULL,
  `toggle_category_slider` varchar(55) DEFAULT NULL,
  `toggle_subcategory_slider` varchar(55) DEFAULT NULL,
  `cancel_sale` varchar(55) DEFAULT NULL,
  `suspend_sale` varchar(55) DEFAULT NULL,
  `print_items_list` varchar(55) DEFAULT NULL,
  `finalize_sale` varchar(55) DEFAULT NULL,
  `today_sale` varchar(55) DEFAULT NULL,
  `open_hold_bills` varchar(55) DEFAULT NULL,
  `close_register` varchar(55) DEFAULT NULL,
  `keyboard` tinyint(1) NOT NULL,
  `pos_printers` varchar(255) DEFAULT NULL,
  `java_applet` tinyint(1) NOT NULL,
  `product_button_color` varchar(20) NOT NULL DEFAULT 'default',
  `tooltips` tinyint(1) DEFAULT '1',
  `paypal_pro` tinyint(1) DEFAULT '0',
  `stripe` tinyint(1) DEFAULT '0',
  `rounding` tinyint(1) DEFAULT '0',
  `char_per_line` tinyint(4) DEFAULT '42',
  `pin_code` varchar(20) DEFAULT NULL,
  `purchase_code` varchar(100) DEFAULT 'purchase_code',
  `envato_username` varchar(50) DEFAULT 'envato_username',
  `version` varchar(10) DEFAULT '3.2.14',
  `after_sale_page` tinyint(1) DEFAULT '0',
  `item_order` tinyint(1) DEFAULT '0',
  `authorize` tinyint(1) DEFAULT '0',
  `toggle_brands_slider` varchar(55) DEFAULT NULL,
  `remote_printing` tinyint(1) DEFAULT '1',
  `printer` int(11) DEFAULT NULL,
  `order_printers` varchar(55) DEFAULT NULL,
  `auto_print` tinyint(1) DEFAULT '0',
  `customer_details` tinyint(1) DEFAULT NULL,
  `local_printers` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`pos_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_pos_settings` (`pos_id`, `cat_limit`, `pro_limit`, `default_category`, `default_customer`, `default_biller`, `display_time`, `cf_title1`, `cf_title2`, `cf_value1`, `cf_value2`, `receipt_printer`, `cash_drawer_codes`, `focus_add_item`, `add_manual_product`, `customer_selection`, `add_customer`, `toggle_category_slider`, `toggle_subcategory_slider`, `cancel_sale`, `suspend_sale`, `print_items_list`, `finalize_sale`, `today_sale`, `open_hold_bills`, `close_register`, `keyboard`, `pos_printers`, `java_applet`, `product_button_color`, `tooltips`, `paypal_pro`, `stripe`, `rounding`, `char_per_line`, `pin_code`, `purchase_code`, `envato_username`, `version`, `after_sale_page`, `item_order`, `authorize`, `toggle_brands_slider`, `remote_printing`, `printer`, `order_printers`, `auto_print`, `customer_details`, `local_printers`) VALUES (1, 22, 20, 1, 1, 3, '1', 'GST Reg', 'VAT Reg', '123456789', '987654321', 'BIXOLON SRP-350II', 'x1C', 'Ctrl+F3', 'Ctrl+Shift+M', 'Ctrl+Shift+C', 'Ctrl+Shift+A', 'Ctrl+F11', 'Ctrl+F12', 'F4', 'F7', 'F9', 'F8', 'Ctrl+F1', 'Ctrl+F2', 'Ctrl+F10', 1, 'BIXOLON SRP-350II, BIXOLON SRP-350II', 0, 'default', 1, 0, 0, 0, 42, NULL, 'purchase_code', 'envato_username', '3.2.14', 0, 0, 0, NULL, 1, NULL, NULL, 0, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_price_groups
#

DROP TABLE IF EXISTS `sma_price_groups`;

CREATE TABLE `sma_price_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_price_groups` (`id`, `name`) VALUES (1, 'Default');


#
# TABLE STRUCTURE FOR: sma_printers
#

DROP TABLE IF EXISTS `sma_printers`;

CREATE TABLE `sma_printers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(55) NOT NULL,
  `type` varchar(25) NOT NULL,
  `profile` varchar(25) NOT NULL,
  `char_per_line` tinyint(3) unsigned DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  `ip_address` varbinary(45) DEFAULT NULL,
  `port` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_product_photos
#

DROP TABLE IF EXISTS `sma_product_photos`;

CREATE TABLE `sma_product_photos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `photo` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_product_prices
#

DROP TABLE IF EXISTS `sma_product_prices`;

CREATE TABLE `sma_product_prices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `price_group_id` int(11) NOT NULL,
  `price` decimal(25,4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `product_id` (`product_id`),
  KEY `price_group_id` (`price_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_product_variants
#

DROP TABLE IF EXISTS `sma_product_variants`;

CREATE TABLE `sma_product_variants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `name` varchar(55) NOT NULL,
  `cost` decimal(25,4) DEFAULT NULL,
  `price` decimal(25,4) DEFAULT NULL,
  `quantity` decimal(15,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (1, 5, 'Red', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (2, 5, 'Blue', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (3, 5, 'Black', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (4, 5, 'White', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (5, 6, 'Red', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (6, 6, 'Blue', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (7, 6, 'Black', NULL, NULL, NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (8, 6, 'White', NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_products
#

DROP TABLE IF EXISTS `sma_products`;

CREATE TABLE `sma_products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  `name` varchar(255) NOT NULL,
  `unit` int(11) DEFAULT NULL,
  `cost` decimal(25,4) DEFAULT NULL,
  `price` decimal(25,4) NOT NULL,
  `alert_quantity` decimal(15,4) DEFAULT '20.0000',
  `image` varchar(255) DEFAULT 'no_image.png',
  `category_id` int(11) NOT NULL,
  `subcategory_id` int(11) DEFAULT NULL,
  `cf1` varchar(255) DEFAULT NULL,
  `cf2` varchar(255) DEFAULT NULL,
  `cf3` varchar(255) DEFAULT NULL,
  `cf4` varchar(255) DEFAULT NULL,
  `cf5` varchar(255) DEFAULT NULL,
  `cf6` varchar(255) DEFAULT NULL,
  `quantity` decimal(15,4) DEFAULT '0.0000',
  `tax_rate` int(11) DEFAULT NULL,
  `track_quantity` tinyint(1) DEFAULT '1',
  `details` varchar(1000) DEFAULT NULL,
  `warehouse` int(11) DEFAULT NULL,
  `barcode_symbology` varchar(55) NOT NULL DEFAULT 'code128',
  `file` varchar(100) DEFAULT NULL,
  `product_details` text,
  `tax_method` tinyint(1) DEFAULT '0',
  `type` varchar(55) NOT NULL DEFAULT 'standard',
  `supplier1` int(11) DEFAULT NULL,
  `supplier1price` decimal(25,4) DEFAULT NULL,
  `supplier2` int(11) DEFAULT NULL,
  `supplier2price` decimal(25,4) DEFAULT NULL,
  `supplier3` int(11) DEFAULT NULL,
  `supplier3price` decimal(25,4) DEFAULT NULL,
  `supplier4` int(11) DEFAULT NULL,
  `supplier4price` decimal(25,4) DEFAULT NULL,
  `supplier5` int(11) DEFAULT NULL,
  `supplier5price` decimal(25,4) DEFAULT NULL,
  `promotion` tinyint(1) DEFAULT '0',
  `promo_price` decimal(25,4) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `supplier1_part_no` varchar(50) DEFAULT NULL,
  `supplier2_part_no` varchar(50) DEFAULT NULL,
  `supplier3_part_no` varchar(50) DEFAULT NULL,
  `supplier4_part_no` varchar(50) DEFAULT NULL,
  `supplier5_part_no` varchar(50) DEFAULT NULL,
  `sale_unit` int(11) DEFAULT NULL,
  `purchase_unit` int(11) DEFAULT NULL,
  `brand` int(11) DEFAULT NULL,
  `slug` varchar(55) DEFAULT NULL,
  `featured` tinyint(1) DEFAULT NULL,
  `weight` decimal(10,4) DEFAULT NULL,
  `hsn_code` int(11) DEFAULT NULL,
  `views` int(11) NOT NULL DEFAULT '0',
  `hide` tinyint(1) NOT NULL DEFAULT '0',
  `second_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `category_id` (`category_id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`),
  KEY `category_id_2` (`category_id`),
  KEY `unit` (`unit`),
  KEY `brand` (`brand`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

INSERT INTO `sma_products` (`id`, `code`, `name`, `unit`, `cost`, `price`, `alert_quantity`, `image`, `category_id`, `subcategory_id`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `quantity`, `tax_rate`, `track_quantity`, `details`, `warehouse`, `barcode_symbology`, `file`, `product_details`, `tax_method`, `type`, `supplier1`, `supplier1price`, `supplier2`, `supplier2price`, `supplier3`, `supplier3price`, `supplier4`, `supplier4price`, `supplier5`, `supplier5price`, `promotion`, `promo_price`, `start_date`, `end_date`, `supplier1_part_no`, `supplier2_part_no`, `supplier3_part_no`, `supplier4_part_no`, `supplier5_part_no`, `sale_unit`, `purchase_unit`, `brand`, `slug`, `featured`, `weight`, `hsn_code`, `views`, `hide`, `second_name`) VALUES (1, '48159212', 'test()', 1, '50.0000', '100.0000', '0.0000', 'no_image.png', 1, NULL, '', '', '', '', '', '', '20.0000', 1, 1, '', NULL, 'code128', '', '', 1, 'standard', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 1, 1, 0, 'test', NULL, '0.0000', NULL, 0, 0, '');
INSERT INTO `sma_products` (`id`, `code`, `name`, `unit`, `cost`, `price`, `alert_quantity`, `image`, `category_id`, `subcategory_id`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `quantity`, `tax_rate`, `track_quantity`, `details`, `warehouse`, `barcode_symbology`, `file`, `product_details`, `tax_method`, `type`, `supplier1`, `supplier1price`, `supplier2`, `supplier2price`, `supplier3`, `supplier3price`, `supplier4`, `supplier4price`, `supplier5`, `supplier5price`, `promotion`, `promo_price`, `start_date`, `end_date`, `supplier1_part_no`, `supplier2_part_no`, `supplier3_part_no`, `supplier4_part_no`, `supplier5_part_no`, `sale_unit`, `purchase_unit`, `brand`, `slug`, `featured`, `weight`, `hsn_code`, `views`, `hide`, `second_name`) VALUES (2, '23937642', 'sweet()', 1, '50.0000', '100.0000', '0.0000', 'no_image.png', 1, NULL, '', '', '', '', '', '', '20.0000', 1, 1, '', NULL, 'code128', '', '', 1, 'standard', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 1, 1, 0, 'sweet', NULL, '0.0000', NULL, 0, 0, '');
INSERT INTO `sma_products` (`id`, `code`, `name`, `unit`, `cost`, `price`, `alert_quantity`, `image`, `category_id`, `subcategory_id`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `quantity`, `tax_rate`, `track_quantity`, `details`, `warehouse`, `barcode_symbology`, `file`, `product_details`, `tax_method`, `type`, `supplier1`, `supplier1price`, `supplier2`, `supplier2price`, `supplier3`, `supplier3price`, `supplier4`, `supplier4price`, `supplier5`, `supplier5price`, `promotion`, `promo_price`, `start_date`, `end_date`, `supplier1_part_no`, `supplier2_part_no`, `supplier3_part_no`, `supplier4_part_no`, `supplier5_part_no`, `sale_unit`, `purchase_unit`, `brand`, `slug`, `featured`, `weight`, `hsn_code`, `views`, `hide`, `second_name`) VALUES (3, '23246827', 'demo()', 1, '150.0000', '200.0000', '0.0000', 'no_image.png', 1, NULL, '', '', '', '', '', '', '0.0000', 1, 1, '', NULL, 'code128', '', '', 1, 'standard', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 1, 1, 0, 'demo', NULL, '0.0000', NULL, 0, 0, '');
INSERT INTO `sma_products` (`id`, `code`, `name`, `unit`, `cost`, `price`, `alert_quantity`, `image`, `category_id`, `subcategory_id`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `quantity`, `tax_rate`, `track_quantity`, `details`, `warehouse`, `barcode_symbology`, `file`, `product_details`, `tax_method`, `type`, `supplier1`, `supplier1price`, `supplier2`, `supplier2price`, `supplier3`, `supplier3price`, `supplier4`, `supplier4price`, `supplier5`, `supplier5price`, `promotion`, `promo_price`, `start_date`, `end_date`, `supplier1_part_no`, `supplier2_part_no`, `supplier3_part_no`, `supplier4_part_no`, `supplier5_part_no`, `sale_unit`, `purchase_unit`, `brand`, `slug`, `featured`, `weight`, `hsn_code`, `views`, `hide`, `second_name`) VALUES (4, '001', 'cake(cake)', 1, '150.0000', '150.0000', '0.0000', 'no_image.png', 1, NULL, '', '', '', '', '', '', '0.0000', 1, 1, '', NULL, 'code128', '', '', 1, 'standard', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 1, 1, 0, 'no', NULL, '0.0000', NULL, 0, 0, '');
INSERT INTO `sma_products` (`id`, `code`, `name`, `unit`, `cost`, `price`, `alert_quantity`, `image`, `category_id`, `subcategory_id`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `quantity`, `tax_rate`, `track_quantity`, `details`, `warehouse`, `barcode_symbology`, `file`, `product_details`, `tax_method`, `type`, `supplier1`, `supplier1price`, `supplier2`, `supplier2price`, `supplier3`, `supplier3price`, `supplier4`, `supplier4price`, `supplier5`, `supplier5price`, `promotion`, `promo_price`, `start_date`, `end_date`, `supplier1_part_no`, `supplier2_part_no`, `supplier3_part_no`, `supplier4_part_no`, `supplier5_part_no`, `sale_unit`, `purchase_unit`, `brand`, `slug`, `featured`, `weight`, `hsn_code`, `views`, `hide`, `second_name`) VALUES (6, 'PR-11', 'Product 11(Product 11)', 1, '90.0000', '100.0000', '20.0000', 'no_image.png', 1, NULL, 'CF1', 'CF2', 'CF3', 'CF4', 'CF5', 'CF6', '0.0000', 1, 1, NULL, NULL, 'code128', NULL, NULL, 1, 'standard', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, 0, 0, 0, NULL);


#
# TABLE STRUCTURE FOR: sma_purchase_items
#

DROP TABLE IF EXISTS `sma_purchase_items`;

CREATE TABLE `sma_purchase_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `purchase_id` int(11) DEFAULT NULL,
  `transfer_id` int(11) DEFAULT NULL,
  `product_id` int(11) NOT NULL,
  `product_code` varchar(50) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `option_id` int(11) DEFAULT NULL,
  `net_unit_cost` decimal(25,4) NOT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(20) DEFAULT NULL,
  `discount` varchar(20) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `expiry` date DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `quantity_balance` decimal(15,4) DEFAULT '0.0000',
  `date` date NOT NULL,
  `status` varchar(50) NOT NULL,
  `unit_cost` decimal(25,4) DEFAULT NULL,
  `real_unit_cost` decimal(25,4) DEFAULT NULL,
  `quantity_received` decimal(15,4) DEFAULT NULL,
  `supplier_part_no` varchar(50) DEFAULT NULL,
  `purchase_item_id` int(11) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `purchase_id` (`purchase_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8;

INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (114, NULL, NULL, 1, '48159212', 'test()', NULL, '50.0000', '110.0000', 1, 0, '0.0000', 1, '0', NULL, NULL, NULL, '5500.0000', '20.0000', '2018-05-06', 'received', '50.0000', '50.0000', '110.0000', NULL, NULL, 1, 'box', '110.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (115, NULL, NULL, 2, '23937642', 'sweet()', NULL, '50.0000', '110.0000', 1, 0, '0.0000', 1, '0', NULL, NULL, NULL, '5500.0000', '20.0000', '2018-05-06', 'received', '50.0000', '50.0000', '110.0000', NULL, NULL, 1, 'box', '110.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (116, NULL, NULL, 1, '48159212', 'test()', NULL, '50.0000', '50.0000', 1, 6, '0.0000', 1, '0', NULL, NULL, NULL, '2500.0000', '24.0000', '2018-05-06', 'received', '50.0000', '50.0000', '50.0000', NULL, NULL, 1, 'box', '50.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (117, NULL, NULL, 2, '23937642', 'sweet()', NULL, '50.0000', '50.0000', 1, 6, '0.0000', 1, '0', NULL, NULL, NULL, '2500.0000', '24.0000', '2018-05-06', 'received', '50.0000', '50.0000', '50.0000', NULL, NULL, 1, 'box', '50.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (118, NULL, NULL, 1, '48159212', 'test()', NULL, '50.0000', '20.0000', 1, 7, '0.0000', 1, '0', NULL, NULL, NULL, '1000.0000', '14.0000', '2018-05-06', 'received', '50.0000', '50.0000', '20.0000', NULL, NULL, 1, 'box', '20.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (119, NULL, NULL, 2, '23937642', 'sweet()', NULL, '50.0000', '20.0000', 1, 7, '0.0000', 1, '0', NULL, NULL, NULL, '1000.0000', '12.0000', '2018-05-06', 'received', '50.0000', '50.0000', '20.0000', NULL, NULL, 1, 'box', '20.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (120, NULL, NULL, 1, '48159212', 'test()', NULL, '50.0000', '10.0000', 1, 15, '0.0000', 1, '0', NULL, NULL, NULL, '500.0000', '7.0000', '2018-05-07', 'received', '50.0000', '50.0000', '10.0000', NULL, NULL, 1, 'box', '10.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_purchase_items` (`id`, `purchase_id`, `transfer_id`, `product_id`, `product_code`, `product_name`, `option_id`, `net_unit_cost`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (121, NULL, NULL, 2, '23937642', 'sweet()', NULL, '50.0000', '10.0000', 1, 15, '0.0000', 1, '0', NULL, NULL, NULL, '500.0000', '7.0000', '2018-05-07', 'received', '50.0000', '50.0000', '10.0000', NULL, NULL, 1, 'box', '10.0000', NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_purchases
#

DROP TABLE IF EXISTS `sma_purchases`;

CREATE TABLE `sma_purchases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(55) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `supplier_id` int(11) NOT NULL,
  `supplier` varchar(55) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `note` varchar(1000) NOT NULL,
  `total` decimal(25,4) DEFAULT NULL,
  `product_discount` decimal(25,4) DEFAULT NULL,
  `order_discount_id` varchar(20) DEFAULT NULL,
  `order_discount` decimal(25,4) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT NULL,
  `product_tax` decimal(25,4) DEFAULT NULL,
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT NULL,
  `total_tax` decimal(25,4) DEFAULT '0.0000',
  `shipping` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `paid` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `status` varchar(55) DEFAULT '',
  `payment_status` varchar(20) DEFAULT 'pending',
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `attachment` varchar(55) DEFAULT NULL,
  `payment_term` tinyint(4) DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `return_id` int(11) DEFAULT NULL,
  `surcharge` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `return_purchase_ref` varchar(55) DEFAULT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `return_purchase_total` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_quote_items
#

DROP TABLE IF EXISTS `sma_quote_items`;

CREATE TABLE `sma_quote_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `quote_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_code` varchar(55) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_type` varchar(20) DEFAULT NULL,
  `option_id` int(11) DEFAULT NULL,
  `net_unit_price` decimal(25,4) NOT NULL,
  `unit_price` decimal(25,4) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `discount` varchar(55) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `real_unit_price` decimal(25,4) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `quote_id` (`quote_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

INSERT INTO `sma_quote_items` (`id`, `quote_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (1, 1, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 2, '0.0000', 1, '0', '0', '0.0000', '100.0000', NULL, '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL);
INSERT INTO `sma_quote_items` (`id`, `quote_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (2, 2, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '100.0000', NULL, '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_quotes
#

DROP TABLE IF EXISTS `sma_quotes`;

CREATE TABLE `sma_quotes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `customer` varchar(55) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `biller_id` int(11) NOT NULL,
  `biller` varchar(55) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `internal_note` varchar(1000) DEFAULT NULL,
  `total` decimal(25,4) NOT NULL,
  `product_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount` decimal(25,4) DEFAULT NULL,
  `order_discount_id` varchar(20) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT '0.0000',
  `product_tax` decimal(25,4) DEFAULT '0.0000',
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT NULL,
  `total_tax` decimal(25,4) DEFAULT NULL,
  `shipping` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `status` varchar(20) DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `attachment` varchar(55) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `supplier` varchar(55) DEFAULT NULL,
  `hash` varchar(255) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

INSERT INTO `sma_quotes` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `warehouse_id`, `biller_id`, `biller`, `note`, `internal_note`, `total`, `product_discount`, `order_discount`, `order_discount_id`, `total_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `status`, `created_by`, `updated_by`, `updated_at`, `attachment`, `supplier_id`, `supplier`, `hash`, `cgst`, `sgst`, `igst`) VALUES (1, '2018-04-27 07:04:00', 'QUOTE2018/04/0001', 1, 'Walk-in Customer', 2, 3, 'Test Biller', '', NULL, '100.0000', '0.0000', '0.0000', '', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '100.0000', 'pending', 2, NULL, NULL, NULL, 2, 'Supplier Company Name', '26ea1113b61df25988ea3b069f6634deb612908338a184dedf31f87ed70bd404', NULL, NULL, NULL);
INSERT INTO `sma_quotes` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `warehouse_id`, `biller_id`, `biller`, `note`, `internal_note`, `total`, `product_discount`, `order_discount`, `order_discount_id`, `total_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `status`, `created_by`, `updated_by`, `updated_at`, `attachment`, `supplier_id`, `supplier`, `hash`, `cgst`, `sgst`, `igst`) VALUES (2, '2018-04-27 07:09:00', 'QUOTE2018/04/0002', 1, 'Walk-in Customer', 1, 3, 'Test Biller', '', NULL, '100.0000', '0.0000', '0.0000', '', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '100.0000', 'pending', 8, NULL, NULL, NULL, 2, 'Supplier Company Name', '127875773c741cb4fdaef71de1bb8678fdecebb642faf8f7b7597ed2d1a3a6ee', NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_return_items
#

DROP TABLE IF EXISTS `sma_return_items`;

CREATE TABLE `sma_return_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `return_id` int(11) unsigned NOT NULL,
  `product_id` int(11) unsigned NOT NULL,
  `product_code` varchar(55) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_type` varchar(20) DEFAULT NULL,
  `option_id` int(11) DEFAULT NULL,
  `net_unit_price` decimal(25,4) NOT NULL,
  `unit_price` decimal(25,4) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `discount` varchar(55) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `real_unit_price` decimal(25,4) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `return_id` (`return_id`),
  KEY `product_id` (`product_id`),
  KEY `product_id_2` (`product_id`,`return_id`),
  KEY `return_id_2` (`return_id`,`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (1, 1, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 3, 14, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (2, 2, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (3, 2, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (4, 3, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '-10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (5, 3, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '-10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (6, 4, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '-10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (7, 4, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '-10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (8, 5, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '-10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (9, 5, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '-10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (10, 6, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (11, 6, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '10.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', 1, 'box', '10.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (12, 7, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', 1, 'box', '5.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (13, 7, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', 1, 'box', '5.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (14, 8, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', 1, 'box', '5.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (15, 8, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', 1, 'box', '5.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (16, 9, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (17, 9, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (18, 10, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (19, 10, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (20, 11, 1, '48159212', 'test()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 15, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_return_items` (`id`, `return_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (21, 11, 2, '23937642', 'sweet()', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 15, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', 1, 'box', '1.0000', NULL, NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_returns
#

DROP TABLE IF EXISTS `sma_returns`;

CREATE TABLE `sma_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `customer` varchar(55) NOT NULL,
  `biller_id` int(11) NOT NULL,
  `biller` varchar(55) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `staff_note` varchar(1000) DEFAULT NULL,
  `total` decimal(25,4) NOT NULL,
  `product_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount_id` varchar(20) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount` decimal(25,4) DEFAULT '0.0000',
  `product_tax` decimal(25,4) DEFAULT '0.0000',
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT '0.0000',
  `total_tax` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_items` smallint(6) DEFAULT NULL,
  `paid` decimal(25,4) DEFAULT '0.0000',
  `surcharge` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `attachment` varchar(55) DEFAULT NULL,
  `hash` varchar(255) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  `return_type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (1, '2018-04-25 02:00:00', 'SR2018/04/0001', 1, 'Walk-in Customer', 3, 'Test Biller', 3, 14, '', '', '100.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '100.0000', 14, NULL, NULL, 1, '0.0000', '0.0000', NULL, '6be9a05cd301f1cd6ca0fb8e3d24aefe82a976da8b64ce6560e3729d8edda3f9', NULL, NULL, NULL, 'expired_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (2, '2018-05-07 12:10:00', 'SR2018/05/0002', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '2000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '2000.0000', 2, NULL, NULL, 20, '0.0000', '0.0000', NULL, 'f87a6a38c11e0092cb3e1424c443f7016dcf21ae89b6d521cc1d1067ed6b7e2a', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (3, '2018-05-07 13:05:00', 'SR2018/05/0003', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '2000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '2000.0000', 2, NULL, NULL, 20, '0.0000', '0.0000', NULL, 'aa7539722d17d02227eae4fcae83333b502549f0ba9e7e5dc7256f98cc492a47', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (4, '2018-05-07 13:10:00', 'SR2018/05/0004', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '2000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '2000.0000', 2, NULL, NULL, 20, '0.0000', '0.0000', NULL, '4b7038f2681a27082e74d04cfecb617f8a2250bd188e1a258ed05bab7ef37cd2', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (5, '2018-05-07 13:10:00', 'SR2018/05/0005', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '2000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '2000.0000', 2, NULL, NULL, 20, '0.0000', '0.0000', NULL, '9af9bc481ed700cb8c84a4715075b85a335bae47e763c77d07bf0ab65d0ee146', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (6, '2018-05-07 13:15:00', 'SR2018/05/0006', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '2000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '2000.0000', 2, NULL, NULL, 20, '0.0000', '0.0000', NULL, '4cffa6a5d146d241017f698b8ab4b800d80a2b009169a6415aacbdf21e565887', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (7, '2018-05-07 13:15:00', 'SR2018/05/0007', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 7, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '1000.0000', 2, NULL, NULL, 10, '0.0000', '0.0000', NULL, 'd58f9f91319ff869ea474426713d480b013926c40f2e3b80cf38d3761314791a', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (8, '2018-05-07 13:20:00', 'SR2018/05/0008', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '1000.0000', 2, NULL, NULL, 10, '0.0000', '0.0000', NULL, 'a50a52bd24c2cd38807f21a1c383698fd02135b374cd30ca7a5b86b458d8882a', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (9, '2018-05-07 16:35:00', 'SR2018/05/0009', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 6, '', '', '200.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '200.0000', 2, NULL, NULL, 2, '0.0000', '0.0000', NULL, '72ee59543673277060c97e72ca28adc72354e6144ff5a6e2581341d0f67cf0d8', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (10, '2018-05-07 16:35:00', 'SR2018/05/0010', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 7, '', '', '200.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '200.0000', 2, NULL, NULL, 2, '0.0000', '0.0000', NULL, '51a3ac8e9f3f69d177a98725cee1dd95f3db987a78a81c95417cf52823664336', NULL, NULL, NULL, 'waste_item');
INSERT INTO `sma_returns` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `store_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `grand_total`, `created_by`, `updated_by`, `updated_at`, `total_items`, `paid`, `surcharge`, `attachment`, `hash`, `cgst`, `sgst`, `igst`, `return_type`) VALUES (11, '2018-05-07 16:35:00', 'SR2018/05/0011', 1, 'Walk-in Customer', 3, 'Test Biller', 1, 15, '', '', '200.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '200.0000', 2, NULL, NULL, 2, '0.0000', '0.0000', NULL, '33f86d87ec510462eeb2f81e1f78b19a3d2628bd975abceb693c8c0e4fe0d2a0', NULL, NULL, NULL, 'waste_item');


#
# TABLE STRUCTURE FOR: sma_sale_items
#

DROP TABLE IF EXISTS `sma_sale_items`;

CREATE TABLE `sma_sale_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sale_id` int(11) unsigned NOT NULL,
  `product_id` int(11) unsigned NOT NULL,
  `product_code` varchar(55) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_type` varchar(20) DEFAULT NULL,
  `option_id` int(11) DEFAULT NULL,
  `net_unit_price` decimal(25,4) NOT NULL,
  `unit_price` decimal(25,4) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `discount` varchar(55) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `real_unit_price` decimal(25,4) DEFAULT NULL,
  `sale_item_id` int(11) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `product_id` (`product_id`),
  KEY `product_id_2` (`product_id`,`sale_id`),
  KEY `sale_id_2` (`sale_id`,`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8;

INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (1, 72, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (2, 73, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (3, 73, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (4, 74, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (5, 74, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (6, 75, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '-2.0000', 1, 0, '0.0000', 1, '0', '0', '0.0000', '-200.0000', '', '100.0000', 4, 1, 'box', '-2.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (7, 75, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '-2.0000', 1, 0, '0.0000', 1, '0', '0', '0.0000', '-200.0000', '', '100.0000', 5, 1, 'box', '-2.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (8, 76, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '-1.0000', 1, 0, '0.0000', 1, '0', '0', '0.0000', '-100.0000', '', '100.0000', 2, 1, 'box', '-1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (9, 76, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '-1.0000', 1, 0, '0.0000', 1, '0', '0', '0.0000', '-100.0000', '', '100.0000', 3, 1, 'box', '-1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (10, 77, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '-1.0000', 1, 0, '0.0000', 1, '0', '0', '0.0000', '-100.0000', '', '100.0000', 1, 1, 'box', '-1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (11, 78, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (12, 79, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '-1.0000', 1, 0, '0.0000', 1, '0', '0', '0.0000', '-100.0000', '', '100.0000', 11, 1, 'box', '-1.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (13, 80, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (14, 80, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (15, 81, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (16, 81, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (17, 82, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (18, 82, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (19, 83, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '-2.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '-200.0000', '', '100.0000', 15, 1, 'box', '-2.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (20, 83, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '-2.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '-200.0000', '', '100.0000', 16, 1, 'box', '-2.0000', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (21, 84, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (22, 84, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (23, 85, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (24, 85, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (25, 86, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (26, 86, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (27, 87, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (28, 87, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '2.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '200.0000', '', '100.0000', NULL, 1, 'box', '2.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (29, 88, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', NULL, 1, 'box', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (30, 88, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', NULL, 1, 'box', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (31, 89, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '3.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '300.0000', '', '100.0000', NULL, 1, 'box', '3.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (32, 89, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '3.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '300.0000', '', '100.0000', NULL, 1, 'box', '3.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (33, 90, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '3.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '300.0000', '', '100.0000', NULL, 1, 'box', '3.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (34, 90, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '3.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '300.0000', '', '100.0000', NULL, 1, 'box', '3.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (35, 91, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (36, 91, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (37, 92, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (38, 92, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '5.0000', 1, 6, '0.0000', 1, '0', '0', '0.0000', '500.0000', '', '100.0000', NULL, 1, 'box', '5.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (39, 93, 1, '48159212', 'test<br>', 'standard', NULL, '100.0000', '100.0000', '10.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', NULL, 1, 'box', '10.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (40, 93, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '10.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '1000.0000', '', '100.0000', NULL, 1, 'box', '10.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (41, 94, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', NULL, 1, 'box', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (42, 95, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', NULL, 1, 'box', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (43, 96, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '1.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '100.0000', '', '100.0000', NULL, 1, 'box', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (44, 97, 2, '23937642', 'sweet<br>', 'standard', NULL, '100.0000', '100.0000', '-1.0000', 1, 7, '0.0000', 1, '0', '0', '0.0000', '-100.0000', '', '100.0000', 43, 1, 'box', '-1.0000', NULL, NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_sales
#

DROP TABLE IF EXISTS `sma_sales`;

CREATE TABLE `sma_sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `customer` varchar(55) NOT NULL,
  `biller_id` int(11) NOT NULL,
  `biller` varchar(55) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `staff_note` varchar(1000) DEFAULT NULL,
  `total` decimal(25,4) NOT NULL,
  `product_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount_id` varchar(20) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount` decimal(25,4) DEFAULT '0.0000',
  `product_tax` decimal(25,4) DEFAULT '0.0000',
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT '0.0000',
  `total_tax` decimal(25,4) DEFAULT '0.0000',
  `shipping` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `sale_status` varchar(20) DEFAULT NULL,
  `payment_status` varchar(20) DEFAULT NULL,
  `payment_term` tinyint(4) DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_items` smallint(6) DEFAULT NULL,
  `pos` tinyint(1) NOT NULL DEFAULT '0',
  `paid` decimal(25,4) DEFAULT '0.0000',
  `return_id` int(11) DEFAULT NULL,
  `surcharge` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `attachment` varchar(55) DEFAULT NULL,
  `return_sale_ref` varchar(55) DEFAULT NULL,
  `sale_id` int(11) DEFAULT NULL,
  `return_sale_total` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `rounding` decimal(10,4) DEFAULT NULL,
  `suspend_note` varchar(255) DEFAULT NULL,
  `api` tinyint(1) DEFAULT '0',
  `shop` tinyint(1) DEFAULT '0',
  `address_id` int(11) DEFAULT NULL,
  `reserve_id` int(11) DEFAULT NULL,
  `hash` varchar(255) DEFAULT NULL,
  `manual_payment` varchar(55) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8;

INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (72, '2018-05-04 13:34:23', 'SALE/POS2018/05/0029', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '200.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '200.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 2, 1, '200.0000', 77, '0.0000', NULL, 'SR2018/05/0002', NULL, '-100.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'f49d340e28ea99cf1415136cbabae28da2d8e6d5ab7d3c1d9dbde9b7471eafa1', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (73, '2018-05-04 13:37:55', 'SALE/POS2018/05/0030', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '400.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '400.0000', 'completed', 'paid', 0, NULL, 17, NULL, NULL, 4, 1, '400.0000', 76, '0.0000', NULL, 'SR2018/05/0002', NULL, '-200.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'c1fb9ae5e69d2c826fba3268156e73dbf5c6c4bb165b9effd4ba09f97e8370bb', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (74, '2018-05-04 13:41:02', 'SALE/POS2018/05/0031', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'paid', 0, NULL, 17, NULL, NULL, 10, 1, '1000.0000', 75, '0.0000', NULL, 'SR2018/05/0002', NULL, '-400.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'fefae5a0dd3043710fa24ca28aea9f0816ba8f31291949fbb3be9ba3fa8854fa', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (75, '2018-05-04 13:47:00', 'SALE/POS2018/05/0031', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', NULL, '-400.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '-400.0000', 'returned', 'paid', NULL, NULL, 2, NULL, NULL, NULL, 1, '-400.0000', NULL, '0.0000', NULL, 'SR2018/05/0002', 74, '0.0000', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (76, '2018-05-04 13:50:00', 'SALE/POS2018/05/0030', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', NULL, '-200.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '-200.0000', 'returned', 'paid', NULL, NULL, 2, NULL, NULL, NULL, 1, '-200.0000', NULL, '0.0000', NULL, 'SR2018/05/0002', 73, '0.0000', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (77, '2018-05-04 14:20:00', 'SALE/POS2018/05/0029', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', NULL, '-100.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '-100.0000', 'returned', 'paid', NULL, NULL, 2, NULL, NULL, NULL, 1, '-100.0000', NULL, '0.0000', NULL, 'SR2018/05/0002', 72, '0.0000', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (78, '2018-05-04 14:34:15', 'SALE/POS2018/05/0032', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '200.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '200.0000', 'completed', 'paid', 0, NULL, 17, NULL, NULL, 2, 1, '200.0000', 79, '0.0000', NULL, 'SR2018/05/0002', NULL, '-100.0000', '0.0000', NULL, 0, 0, NULL, NULL, '7dee566479b4def4c5a51deb4ac8e8554282468f380d9ad4e3415defadd9c7cd', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (79, '2018-05-04 14:41:00', 'SALE/POS2018/05/0032', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', NULL, '-100.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '-100.0000', 'returned', 'paid', NULL, NULL, 2, NULL, NULL, NULL, 1, '-100.0000', NULL, '0.0000', NULL, 'SR2018/05/0002', 78, '0.0000', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (80, '2018-05-05 10:48:07', 'SALE/POS2018/05/0033', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'paid', 0, NULL, 2, NULL, NULL, 10, 1, '1000.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'afa5812886f035992b041957efd019406128b6dd80e0eb6c39d469fa2e9faa7e', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (81, '2018-05-05 14:13:51', 'SALE/POS2018/05/0034', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'paid', 0, NULL, 2, NULL, NULL, 10, 1, '1000.0000', 83, '0.0000', NULL, 'SR2018/05/0002', NULL, '-400.0000', '0.0000', NULL, 0, 0, NULL, NULL, '8a3fe13cd172057dd8f95d7325aba5911637405e7293031c65c779a3cdc5cd60', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (82, '2018-05-05 14:16:49', 'SALE/POS2018/05/0035', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'paid', 0, NULL, 2, NULL, NULL, 10, 1, '1000.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '02224aaa3a8e690ca48d14d5782af5d19dc6b169ee525764a9ec7c5d8550fafc', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (83, '2018-05-05 14:31:00', 'SALE/POS2018/05/0034', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', NULL, '-400.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '-400.0000', 'returned', 'paid', NULL, NULL, 2, NULL, NULL, NULL, 1, '-400.0000', NULL, '0.0000', NULL, 'SR2018/05/0002', 81, '0.0000', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (84, '2018-05-06 13:26:00', 'SALE/POS2018/05/0036', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 10, 1, '1000.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '09d0af275ae475424a8ced126a4e0ce44ef64b3bc560d6799ced405696e299b4', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (85, '2018-05-06 13:26:47', 'SALE/POS2018/05/0037', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '400.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '400.0000', 'completed', 'paid', 0, NULL, 17, NULL, NULL, 4, 1, '400.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'b0a147511f93484a1df5de499be0c99fe012ffb5dc460e6219871ce2538669d8', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (86, '2018-05-06 13:30:20', 'SALE/POS2018/05/0038', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '400.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '400.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 4, 1, '400.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '3ffb3c2b6fb52d04081faf2d352cd90db09e05265f13745d6724d62894a69705', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (87, '2018-05-06 13:31:13', 'SALE/POS2018/05/0039', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '400.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '400.0000', 'completed', 'paid', 0, NULL, 17, NULL, NULL, 4, 1, '400.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '4a83841500eebe5124c5e811c48dc0d61f511113886457c10313d4e8a96708e0', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (88, '2018-05-06 14:38:08', 'SALE/POS2018/05/0040', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '200.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '200.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 2, 1, '200.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '83d7cd47a01e2374135c9d4b0091106a015ce98b73c9cac4b898442f8dfb3bac', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (89, '2018-05-06 14:38:43', 'SALE/POS2018/05/0041', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '600.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '600.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 6, 1, '600.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'ba2433174bcb90bf0aaf5441a4d0121c0ae8f4640bde0797036ebe15b3a3047e', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (90, '2018-05-06 14:39:14', 'SALE/POS2018/05/0042', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '600.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '600.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 6, 1, '600.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '23b0849f72453a42dca2c7166c84c1988995ac0cbfd277bc04fd51be1eab5621', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (91, '2018-05-06 14:39:51', 'SALE/POS2018/05/0043', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'paid', 0, NULL, 16, NULL, NULL, 10, 1, '1000.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'a09708869ddd3dee17d5fc8cd6a438b46cc70f3230b2edce29d7f8af7e155b97', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (92, '2018-05-06 14:49:52', 'SALE/POS2018/05/0044', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '1000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '1000.0000', 'completed', 'due', 0, NULL, 16, NULL, NULL, 10, 1, '0.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '1e02143fc370468da57d49924ef396768b4aefbc1b7c48f860f60c08c822b37a', NULL, NULL, NULL, NULL, 6);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (93, '2018-05-06 19:01:33', 'SALE/POS2018/05/0044', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '2000.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '2000.0000', 'completed', 'paid', 0, NULL, 2, NULL, NULL, 20, 1, '2000.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '08d9efce224f809ee9fb63fe5cbec82d0a479cf62503afcbdbf915599c40df33', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (94, '2018-05-09 16:43:48', 'SALE/POS2018/05/0045', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '100.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '100.0000', 'completed', 'paid', 0, NULL, 1, NULL, NULL, 1, 1, '100.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, '1f05eba4da08c690595d3be2507c3c14987edb9947f4f88f907796780d2894ac', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (95, '2018-05-09 16:47:10', 'SALE/POS2018/05/0046', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '100.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '100.0000', 'completed', 'paid', 0, NULL, 2, NULL, NULL, 1, 1, '100.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL, 0, 0, NULL, NULL, 'c21794c34bf6c82a780a08142e4e845399841f1f4b7b3adc5407678cc18c3b24', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (96, '2018-05-09 21:47:42', 'SALE/POS2018/05/0047', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', '', '100.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '100.0000', 'completed', 'paid', 0, NULL, 2, NULL, NULL, 1, 1, '100.0000', 97, '0.0000', NULL, 'SR2018/05/0012', NULL, '-100.0000', '0.0000', NULL, 0, 0, NULL, NULL, '6f5b316cca38d7bfa9b42f8ed58c388f4af1e84bbfd4768024e70140f46e2f43', NULL, NULL, NULL, NULL, 7);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`, `api`, `shop`, `address_id`, `reserve_id`, `hash`, `manual_payment`, `cgst`, `sgst`, `igst`, `store_id`) VALUES (97, '2018-05-10 12:02:00', 'SALE/POS2018/05/0047', 1, 'Walk-in Customer', 3, 'Test Biller', 1, '', NULL, '-100.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', 1, '0.0000', '0.0000', '0.0000', '-100.0000', 'returned', 'paid', NULL, NULL, 2, NULL, NULL, NULL, 1, '-100.0000', NULL, '0.0000', NULL, 'SR2018/05/0012', 96, '0.0000', NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 7);


#
# TABLE STRUCTURE FOR: sma_sessions
#

DROP TABLE IF EXISTS `sma_sessions`;

CREATE TABLE `sma_sessions` (
  `id` varchar(40) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `data` blob NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('023c39e86686ef33abad3c3f345dd45ed460441a', '127.0.0.1', 1526279413, '__ci_last_regenerate|i:1526279413;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1526277334\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('04b690ab706f8bc9784aec9805971086b4aab89e', '127.0.0.1', 1526280666, '__ci_last_regenerate|i:1526280665;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('08cqakkalpe10fb0bgai2q76e0ovoaar', '::1', 1525805087, '__ci_last_regenerate|i:1525804807;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('10efi31q3p08j5ic47s0lbkvd1u7am3b', '::1', 1525803110, '__ci_last_regenerate|i:1525802809;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525803109;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1b5ni0dkk91qmqp0kb35589nahk09opp', '::1', 1525873109, '__ci_last_regenerate|i:1525872826;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1d41gufbmumdsq5loclgvp2pfqtj9ege', '::1', 1525809724, '__ci_last_regenerate|i:1525809716;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1or5dvfpr2r0msgvu86vqob5ibmrrf91', '::1', 1525882782, '__ci_last_regenerate|i:1525882581;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525882781;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";werehouse|s:1:\"1\";store|s:1:\"7\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1skrg1gkuisoijl20355vvg5kcm7ddub', '::1', 1525876435, '__ci_last_regenerate|i:1525876435;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('26d1qeodh52et9cca344bkiind3lenj0', '::1', 1526279684, '__ci_last_regenerate|i:1526279684;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2g0h72dt8omfjo60dqpdaiidcrn6p9g2', '::1', 1525803285, '__ci_last_regenerate|i:1525803138;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525803285;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('378c934fcae031219934eabca5814d3d8607f7f1', '127.0.0.1', 1526279922, '__ci_last_regenerate|i:1526279844;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1526279555\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";message|s:38:\"<p>You are successfully logged in.</p>\";__ci_vars|a:1:{s:7:\"message\";s:3:\"old\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3kjvqb9foauevi9892di1v88ctjggeu5', '::1', 1525795416, '__ci_last_regenerate|i:1525795405;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3vhp4636mti8kk4fos8k0toge0cc1f56', '::1', 1525864736, '__ci_last_regenerate|i:1525864602;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525864736;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('4b330e17b554afa95c555fe6e383a544ed798449', '127.0.0.1', 1526279352, '__ci_last_regenerate|i:1526279104;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1526277334\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('4ri09ticmqlq469t04jir4mfgsjq300m', '::1', 1525878299, '__ci_last_regenerate|i:1525878032;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";message|s:38:\"Group permissions successfully updated\";__ci_vars|a:1:{s:7:\"message\";s:3:\"old\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('53s2ukuve4vj27n0q9l35jtisnoot4vk', '::1', 1525808032, '__ci_last_regenerate|i:1525807819;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('607cgj6tjbfcnr35it7g7lhad7sdehkd', '::1', 1525872801, '__ci_last_regenerate|i:1525872503;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9d94f4ed2858e35606729452450b134d94cd2f8c', '127.0.0.1', 1526279785, '__ci_last_regenerate|i:1526279785;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1526277334\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9ofok5kc3bplgj6dnostco9m528hck0r', '::1', 1525875725, '__ci_last_regenerate|i:1525875509;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a0ddsg1g2qrs4rujommsduab9ka6c0t2', '::1', 1525875215, '__ci_last_regenerate|i:1525875059;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a9pucj2akq794j8er3odpi435hv18utt', '::1', 1525807049, '__ci_last_regenerate|i:1525807037;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('adgffbvm3ssg806c450lleib05mr1tk9', '::1', 1525806330, '__ci_last_regenerate|i:1525806290;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('au084uatm0om30cd6pijt0redalvkmoo', '::1', 1525957292, '__ci_last_regenerate|i:1525957268;requested_page|s:25:\"admin/reports/profit_loss\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525933379\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";remove_qals|i:1;werehouse|s:1:\"1\";store|s:1:\"6\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('avtet52k4et3kof3r10ul9ldp9j4p8to', '::1', 1525894208, '__ci_last_regenerate|i:1525894204;requested_page|s:9:\"admin/pos\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ca4pi229oud23pdlq6b0gebf64v5u12a', '::1', 1526286209, '__ci_last_regenerate|i:1526286199;requested_page|s:32:\"admin/system_settings/categories\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d4a0c7c144e44f905e62f3f498c06eb67ce1cdbd', '127.0.0.1', 1526280609, '__ci_last_regenerate|i:1526280609;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('dcq13es2bc1lrpf63e4g53p879hb697c', '::1', 1525877057, '__ci_last_regenerate|i:1525876928;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('efev59u7s81f21acfcj31fpvdbg93tfi', '::1', 1525970565, '__ci_last_regenerate|i:1525970351;requested_page|s:15:\"admin/pos/sales\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525956268\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525970430;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('eltedvb9c3l7a4hqsc1df8et1ip73g0b', '::1', 1525879117, '__ci_last_regenerate|i:1525878834;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";werehouse|s:1:\"0\";store|i:0;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('g2sv008kpg2lmnlofled9t5ud3ib0903', '::1', 1525853387, '__ci_last_regenerate|i:1525853380;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525788083\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"1\";store|s:2:\"15\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('gkup91irklhbu8m3cu14cfeck9fm7fgh', '::1', 1525865075, '__ci_last_regenerate|i:1525865066;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('gtt1hphdsln9o1jnncrtooqrlmpe9i1o', '::1', 1525956340, '__ci_last_regenerate|i:1525956177;requested_page|s:25:\"admin/reports/profit_loss\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525933379\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";remove_qals|i:1;message|s:38:\"Product quantity successfully adjusted\";__ci_vars|a:1:{s:7:\"message\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('hukg7actqn1cnf1u7biss01h0bvjv74i', '::1', 1526277391, '__ci_last_regenerate|i:1526277231;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525970363\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('i1nea0s1b8mdm41heo58tjh102apr0sq', '::1', 1525877466, '__ci_last_regenerate|i:1525877234;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ievsko6r8jujktsqka1mrk1ubkt1gn54', '::1', 1525940716, '__ci_last_regenerate|i:1525933955;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525864614\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525933976;werehouse|s:1:\"1\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('j5ceqlgo4glp6pulfdkk4fbv317ia1u6', '::1', 1525940724, '__ci_last_regenerate|i:1525940717;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525864614\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525940723;werehouse|s:1:\"1\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('jgdddu2rafoovh789c1nhvh3brsgnhgb', '::1', 1525796836, '__ci_last_regenerate|i:1525796555;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('jm6as0qiiikkg2ul0096vk4lkmcujceu', '::1', 1525879350, '__ci_last_regenerate|i:1525879163;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";werehouse|s:1:\"1\";store|s:1:\"6\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('kkahdjjhvqh4oejotjn29v2jg13o944u', '::1', 1525933397, '__ci_last_regenerate|i:1525933363;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525864614\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('lbonundfi9he7tldj11fq33iv4pquose', '::1', 1525853213, '__ci_last_regenerate|i:1525853070;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525788083\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"1\";store|s:2:\"15\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ltqljht21ka9fse8lkmg60k2g76bjipt', '::1', 1525879900, '__ci_last_regenerate|i:1525879899;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";werehouse|s:1:\"1\";store|s:1:\"7\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('m73d09e60v0mk17je77j2td55bookdm5', '::1', 1525874451, '__ci_last_regenerate|i:1525874451;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('m9oovm3odjramaa83j90s660vrbg9rl6', '::1', 1525959953, '__ci_last_regenerate|i:1525959942;requested_page|s:25:\"admin/reports/profit_loss\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525933379\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";remove_qals|i:1;werehouse|s:1:\"1\";store|s:1:\"6\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('o2c1k8gmtftgte7v4jing3pl768hekqk', '::1', 1525971960, '__ci_last_regenerate|i:1525971930;requested_page|s:15:\"admin/pos/sales\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525956268\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525970430;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('o5eqggmk4s68odtvo1uq86fuh39b7sur', '::1', 1525796030, '__ci_last_regenerate|i:1525795729;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"1\";store|s:1:\"6\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('p45u1r1l6m3tbs63mh5oa74u3cpslii8', '::1', 1525807802, '__ci_last_regenerate|i:1525807516;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('pdeu8hed8s8bkdslg1dejus5gv68vbc6', '::1', 1525872083, '__ci_last_regenerate|i:1525872083;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('qg4u2juntc7u91nb6qa3bqq4lvm8papg', '::1', 1525879547, '__ci_last_regenerate|i:1525879495;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";werehouse|s:1:\"1\";store|s:1:\"7\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('rrcnqdhpnpqo6nqbhpbnnrvc12purhk0', '::1', 1525809095, '__ci_last_regenerate|i:1525808826;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('sjhg2p4bj09pcmtq3bn2to356iij9jns', '::1', 1525876377, '__ci_last_regenerate|i:1525876127;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('sr1l7kbns1g8mqmpqtuhh4nubh1nin4l', '::1', 1525956179, '__ci_last_regenerate|i:1525956177;requested_page|s:15:\"admin/pos/sales\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ssroaqc1tfrnrjrn9vdroidolmhbp7oq', '::1', 1525797122, '__ci_last_regenerate|i:1525796867;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('t002ievf6qh1tci3rdtqnl3u4b33bca0', '::1', 1526302973, '__ci_last_regenerate|i:1526302908;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1526280645\";last_ip|s:9:\"127.0.0.1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ubp8damt0avvaatce4q4rm69s1in24mb', '::1', 1525806692, '__ci_last_regenerate|i:1525806666;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"1\";store|s:1:\"0\";last_activity|i:1525804808;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ucch09hi0uh20mbfl0lfp983q8i0iekt', '::1', 1525876005, '__ci_last_regenerate|i:1525875824;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525852753\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1525865075;register_id|s:1:\"2\";cash_in_hand|s:9:\"1000.0000\";register_open_time|s:19:\"2018-04-10 20:36:40\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('uf45mvgkpjddcg0rgi8igetkepngpj4a', '::1', 1525796034, '__ci_last_regenerate|i:1525796030;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"1\";store|s:1:\"7\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ula03eqik15469ori6qoosp8hmgotr62', '::1', 1525962405, '__ci_last_regenerate|i:1525962196;requested_page|s:25:\"admin/reports/profit_loss\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525933379\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";remove_qals|i:1;werehouse|s:1:\"1\";store|s:1:\"6\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('uqhdv2s7o3t50vlj108mggnn27l068qn', '::1', 1525852997, '__ci_last_regenerate|i:1525852714;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525788083\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"1\";store|s:1:\"6\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('vmbdhjjitfoorck73qtsa04ftkh66mph', '::1', 1525797447, '__ci_last_regenerate|i:1525797171;requested_page|s:21:\"admin/reports/returns\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:15:\"info@mmdnow.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1525763478\";last_ip|s:3:\"::1\";avatar|s:36:\"3cbf6efff9f22a000df9e037e0db4365.png\";gender|N;group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|N;company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;');


#
# TABLE STRUCTURE FOR: sma_settings
#

DROP TABLE IF EXISTS `sma_settings`;

CREATE TABLE `sma_settings` (
  `setting_id` int(1) NOT NULL,
  `logo` varchar(255) NOT NULL,
  `logo2` varchar(255) NOT NULL,
  `site_name` varchar(55) NOT NULL,
  `language` varchar(20) NOT NULL,
  `default_warehouse` int(2) NOT NULL,
  `accounting_method` tinyint(4) NOT NULL DEFAULT '0',
  `default_currency` varchar(3) NOT NULL,
  `default_tax_rate` int(2) NOT NULL,
  `rows_per_page` int(2) NOT NULL,
  `version` varchar(10) NOT NULL DEFAULT '1.0',
  `default_tax_rate2` int(11) NOT NULL DEFAULT '0',
  `dateformat` int(11) NOT NULL,
  `sales_prefix` varchar(20) DEFAULT NULL,
  `quote_prefix` varchar(20) DEFAULT NULL,
  `purchase_prefix` varchar(20) DEFAULT NULL,
  `transfer_prefix` varchar(20) DEFAULT NULL,
  `delivery_prefix` varchar(20) DEFAULT NULL,
  `payment_prefix` varchar(20) DEFAULT NULL,
  `return_prefix` varchar(20) DEFAULT NULL,
  `returnp_prefix` varchar(20) DEFAULT NULL,
  `expense_prefix` varchar(20) DEFAULT NULL,
  `item_addition` tinyint(1) NOT NULL DEFAULT '0',
  `theme` varchar(20) NOT NULL,
  `product_serial` tinyint(4) NOT NULL,
  `default_discount` int(11) NOT NULL,
  `product_discount` tinyint(1) NOT NULL DEFAULT '0',
  `discount_method` tinyint(4) NOT NULL,
  `tax1` tinyint(4) NOT NULL,
  `tax2` tinyint(4) NOT NULL,
  `overselling` tinyint(1) NOT NULL DEFAULT '0',
  `restrict_user` tinyint(4) NOT NULL DEFAULT '0',
  `restrict_calendar` tinyint(4) NOT NULL DEFAULT '0',
  `timezone` varchar(100) DEFAULT NULL,
  `iwidth` int(11) NOT NULL DEFAULT '0',
  `iheight` int(11) NOT NULL,
  `twidth` int(11) NOT NULL,
  `theight` int(11) NOT NULL,
  `watermark` tinyint(1) DEFAULT NULL,
  `reg_ver` tinyint(1) DEFAULT NULL,
  `allow_reg` tinyint(1) DEFAULT NULL,
  `reg_notification` tinyint(1) DEFAULT NULL,
  `auto_reg` tinyint(1) DEFAULT NULL,
  `protocol` varchar(20) NOT NULL DEFAULT 'mail',
  `mailpath` varchar(55) DEFAULT '/usr/sbin/sendmail',
  `smtp_host` varchar(100) DEFAULT NULL,
  `smtp_user` varchar(100) DEFAULT NULL,
  `smtp_pass` varchar(255) DEFAULT NULL,
  `smtp_port` varchar(10) DEFAULT '25',
  `smtp_crypto` varchar(10) DEFAULT NULL,
  `corn` datetime DEFAULT NULL,
  `customer_group` int(11) NOT NULL,
  `default_email` varchar(100) NOT NULL,
  `mmode` tinyint(1) NOT NULL,
  `bc_fix` tinyint(4) NOT NULL DEFAULT '0',
  `auto_detect_barcode` tinyint(1) NOT NULL DEFAULT '0',
  `captcha` tinyint(1) NOT NULL DEFAULT '1',
  `reference_format` tinyint(1) NOT NULL DEFAULT '1',
  `racks` tinyint(1) DEFAULT '0',
  `attributes` tinyint(1) NOT NULL DEFAULT '0',
  `product_expiry` tinyint(1) NOT NULL DEFAULT '0',
  `decimals` tinyint(2) NOT NULL DEFAULT '2',
  `qty_decimals` tinyint(2) NOT NULL DEFAULT '2',
  `decimals_sep` varchar(2) NOT NULL DEFAULT '.',
  `thousands_sep` varchar(2) NOT NULL DEFAULT ',',
  `invoice_view` tinyint(1) DEFAULT '0',
  `default_biller` int(11) DEFAULT NULL,
  `envato_username` varchar(50) DEFAULT NULL,
  `purchase_code` varchar(100) DEFAULT NULL,
  `rtl` tinyint(1) DEFAULT '0',
  `each_spent` decimal(15,4) DEFAULT NULL,
  `ca_point` tinyint(4) DEFAULT NULL,
  `each_sale` decimal(15,4) DEFAULT NULL,
  `sa_point` tinyint(4) DEFAULT NULL,
  `update` tinyint(1) DEFAULT '0',
  `sac` tinyint(1) DEFAULT '0',
  `display_all_products` tinyint(1) DEFAULT '0',
  `display_symbol` tinyint(1) DEFAULT NULL,
  `symbol` varchar(50) DEFAULT NULL,
  `remove_expired` tinyint(1) DEFAULT '0',
  `barcode_separator` varchar(2) NOT NULL DEFAULT '_',
  `set_focus` tinyint(1) NOT NULL DEFAULT '0',
  `price_group` int(11) DEFAULT NULL,
  `barcode_img` tinyint(1) NOT NULL DEFAULT '1',
  `ppayment_prefix` varchar(20) DEFAULT 'POP',
  `disable_editing` smallint(6) DEFAULT '90',
  `qa_prefix` varchar(55) DEFAULT NULL,
  `update_cost` tinyint(1) DEFAULT NULL,
  `apis` tinyint(1) NOT NULL DEFAULT '0',
  `state` varchar(100) DEFAULT NULL,
  `pdf_lib` varchar(20) DEFAULT 'dompdf',
  PRIMARY KEY (`setting_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_settings` (`setting_id`, `logo`, `logo2`, `site_name`, `language`, `default_warehouse`, `accounting_method`, `default_currency`, `default_tax_rate`, `rows_per_page`, `version`, `default_tax_rate2`, `dateformat`, `sales_prefix`, `quote_prefix`, `purchase_prefix`, `transfer_prefix`, `delivery_prefix`, `payment_prefix`, `return_prefix`, `returnp_prefix`, `expense_prefix`, `item_addition`, `theme`, `product_serial`, `default_discount`, `product_discount`, `discount_method`, `tax1`, `tax2`, `overselling`, `restrict_user`, `restrict_calendar`, `timezone`, `iwidth`, `iheight`, `twidth`, `theight`, `watermark`, `reg_ver`, `allow_reg`, `reg_notification`, `auto_reg`, `protocol`, `mailpath`, `smtp_host`, `smtp_user`, `smtp_pass`, `smtp_port`, `smtp_crypto`, `corn`, `customer_group`, `default_email`, `mmode`, `bc_fix`, `auto_detect_barcode`, `captcha`, `reference_format`, `racks`, `attributes`, `product_expiry`, `decimals`, `qty_decimals`, `decimals_sep`, `thousands_sep`, `invoice_view`, `default_biller`, `envato_username`, `purchase_code`, `rtl`, `each_spent`, `ca_point`, `each_sale`, `sa_point`, `update`, `sac`, `display_all_products`, `display_symbol`, `symbol`, `remove_expired`, `barcode_separator`, `set_focus`, `price_group`, `barcode_img`, `ppayment_prefix`, `disable_editing`, `qa_prefix`, `update_cost`, `apis`, `state`, `pdf_lib`) VALUES (1, 'logo2.png', 'logo3.png', 'POS', 'english', 1, 0, 'USD', 1, 10, '3.2.14', 1, 5, 'SALE', 'QUOTE', 'PO', 'TR', 'DO', 'IPAY', 'SR', 'PR', '', 0, 'default', 1, 1, 1, 1, 1, 1, 0, 1, 0, 'Asia/Kolkata', 800, 800, 150, 150, 0, 0, 0, 0, NULL, 'mail', '/usr/sbin/sendmail', 'pop.gmail.com', 'contact@sma.tecdiary.org', 'jEFTM4T63AiQ9dsidxhPKt9CIg4HQjCN58n/RW9vmdC/UDXCzRLR469ziZ0jjpFlbOg43LyoSmpJLBkcAHh0Yw==', '25', NULL, NULL, 1, 'contact@tecdiary.com', 0, 4, 1, 0, 2, 1, 1, 0, 2, 2, '.', ',', 0, 3, 'Graphics_webdesign2002', '7d144173-c8b6-4155-b56c-50295b42c62d', 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '', 0, '_', 0, 1, 1, 'POP', 90, '', 0, 0, 'AN', 'dompdf');


#
# TABLE STRUCTURE FOR: sma_skrill
#

DROP TABLE IF EXISTS `sma_skrill`;

CREATE TABLE `sma_skrill` (
  `id` int(11) NOT NULL,
  `active` tinyint(4) NOT NULL,
  `account_email` varchar(255) NOT NULL DEFAULT 'testaccount2@moneybookers.com',
  `secret_word` varchar(20) NOT NULL DEFAULT 'mbtest',
  `skrill_currency` varchar(3) NOT NULL DEFAULT 'USD',
  `fixed_charges` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `extra_charges_my` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `extra_charges_other` decimal(25,4) NOT NULL DEFAULT '0.0000',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_skrill` (`id`, `active`, `account_email`, `secret_word`, `skrill_currency`, `fixed_charges`, `extra_charges_my`, `extra_charges_other`) VALUES (1, 1, 'testaccount2@moneybookers.com', 'mbtest', 'USD', '0.0000', '0.0000', '0.0000');


#
# TABLE STRUCTURE FOR: sma_sms
#

DROP TABLE IF EXISTS `sma_sms`;

CREATE TABLE `sma_sms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `from_date` datetime DEFAULT NULL,
  `till_date` datetime DEFAULT NULL,
  `scope` tinyint(1) NOT NULL DEFAULT '3',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_sms` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (1, 'erfdf', '<p>rffgt</p>', '2018-03-05 15:24:32', NULL, NULL, 3);


#
# TABLE STRUCTURE FOR: sma_stock_count_items
#

DROP TABLE IF EXISTS `sma_stock_count_items`;

CREATE TABLE `sma_stock_count_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stock_count_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_code` varchar(50) DEFAULT NULL,
  `product_name` varchar(255) DEFAULT NULL,
  `product_variant` varchar(55) DEFAULT NULL,
  `product_variant_id` int(11) DEFAULT NULL,
  `expected` decimal(15,4) NOT NULL,
  `counted` decimal(15,4) NOT NULL,
  `cost` decimal(25,4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `stock_count_id` (`stock_count_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_stock_counts
#

DROP TABLE IF EXISTS `sma_stock_counts`;

CREATE TABLE `sma_stock_counts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `type` varchar(10) NOT NULL,
  `initial_file` varchar(50) NOT NULL,
  `final_file` varchar(50) DEFAULT NULL,
  `brands` varchar(50) DEFAULT NULL,
  `brand_names` varchar(100) DEFAULT NULL,
  `categories` varchar(50) DEFAULT NULL,
  `category_names` varchar(100) DEFAULT NULL,
  `note` text,
  `products` int(11) DEFAULT NULL,
  `rows` int(11) DEFAULT NULL,
  `differences` int(11) DEFAULT NULL,
  `matches` int(11) DEFAULT NULL,
  `missing` int(11) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `finalized` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_stock_counts` (`id`, `date`, `reference_no`, `warehouse_id`, `store_id`, `type`, `initial_file`, `final_file`, `brands`, `brand_names`, `categories`, `category_names`, `note`, `products`, `rows`, `differences`, `matches`, `missing`, `created_by`, `updated_by`, `updated_at`, `finalized`) VALUES (1, '2018-05-08 14:51:00', '', 1, 15, 'full', 'b943627a70cbbdb583e53083463ca948.csv', NULL, '', '', '', '', NULL, 2, 2, NULL, NULL, NULL, 2, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_stores
#

DROP TABLE IF EXISTS `sma_stores`;

CREATE TABLE `sma_stores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `warehouse_id` int(30) NOT NULL DEFAULT '0',
  `code` varchar(50) NOT NULL,
  `name` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `map` varchar(255) DEFAULT NULL,
  `phone` varchar(55) DEFAULT NULL,
  `email` varchar(55) DEFAULT NULL,
  `syncflag` tinyint(4) NOT NULL,
  `price_group_id` int(40) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

INSERT INTO `sma_stores` (`id`, `warehouse_id`, `code`, `name`, `address`, `map`, `phone`, `email`, `syncflag`, `price_group_id`) VALUES (6, 1, 'Store001', 'Store1', '<p>Jeddah</p>', NULL, '+966551668081', 'graphics_webdesign2002@yahoo.com', 0, NULL);
INSERT INTO `sma_stores` (`id`, `warehouse_id`, `code`, `name`, `address`, `map`, `phone`, `email`, `syncflag`, `price_group_id`) VALUES (7, 1, 'Store001', 'Store2', '<p>Riyadh Saudi Arabia</p>', NULL, '+966551668081', 'graphics_webdesign2002@yahoo.com', 0, NULL);
INSERT INTO `sma_stores` (`id`, `warehouse_id`, `code`, `name`, `address`, `map`, `phone`, `email`, `syncflag`, `price_group_id`) VALUES (15, 1, 'ST3', 'Store 3', '<p>ddd</p>', NULL, '434343434', 'yogesh@gmail.com', 0, NULL);


#
# TABLE STRUCTURE FOR: sma_suspended_bills
#

DROP TABLE IF EXISTS `sma_suspended_bills`;

CREATE TABLE `sma_suspended_bills` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `customer_id` int(11) NOT NULL,
  `customer` varchar(55) DEFAULT NULL,
  `count` int(11) NOT NULL,
  `order_discount_id` varchar(20) DEFAULT NULL,
  `order_tax_id` int(11) DEFAULT NULL,
  `total` decimal(25,4) NOT NULL,
  `biller_id` int(11) DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `suspend_note` varchar(255) DEFAULT NULL,
  `shipping` decimal(15,4) DEFAULT '0.0000',
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

INSERT INTO `sma_suspended_bills` (`id`, `date`, `customer_id`, `customer`, `count`, `order_discount_id`, `order_tax_id`, `total`, `biller_id`, `warehouse_id`, `created_by`, `suspend_note`, `shipping`, `cgst`, `sgst`, `igst`) VALUES (1, '2018-04-10 20:43:18', 1, 'Walk-in Customer', 1000, '', 1, '100000.0000', 3, 1, 2, 'test suspend', '0.0000', NULL, NULL, NULL);
INSERT INTO `sma_suspended_bills` (`id`, `date`, `customer_id`, `customer`, `count`, `order_discount_id`, `order_tax_id`, `total`, `biller_id`, `warehouse_id`, `created_by`, `suspend_note`, `shipping`, `cgst`, `sgst`, `igst`) VALUES (2, '2018-04-10 20:45:23', 1, 'Walk-in Customer', 1000, '', 1, '100000.0000', 3, 1, 2, 'test suspend', '0.0000', NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_suspended_items
#

DROP TABLE IF EXISTS `sma_suspended_items`;

CREATE TABLE `sma_suspended_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `suspend_id` int(11) unsigned NOT NULL,
  `product_id` int(11) unsigned NOT NULL,
  `product_code` varchar(55) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `net_unit_price` decimal(25,4) NOT NULL,
  `unit_price` decimal(25,4) NOT NULL,
  `quantity` decimal(15,4) DEFAULT '0.0000',
  `warehouse_id` int(11) DEFAULT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `discount` varchar(55) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `option_id` int(11) DEFAULT NULL,
  `product_type` varchar(20) DEFAULT NULL,
  `real_unit_price` decimal(25,4) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_tax_rates
#

DROP TABLE IF EXISTS `sma_tax_rates`;

CREATE TABLE `sma_tax_rates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(55) NOT NULL,
  `code` varchar(10) DEFAULT NULL,
  `rate` decimal(12,4) NOT NULL,
  `type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

INSERT INTO `sma_tax_rates` (`id`, `name`, `code`, `rate`, `type`) VALUES (1, 'No Tax', 'NT', '0.0000', '2');
INSERT INTO `sma_tax_rates` (`id`, `name`, `code`, `rate`, `type`) VALUES (2, 'VAT @10%', 'VAT10', '10.0000', '1');
INSERT INTO `sma_tax_rates` (`id`, `name`, `code`, `rate`, `type`) VALUES (3, 'GST @6%', 'GST', '6.0000', '1');
INSERT INTO `sma_tax_rates` (`id`, `name`, `code`, `rate`, `type`) VALUES (4, 'VAT @20%', 'VT20', '20.0000', '1');


#
# TABLE STRUCTURE FOR: sma_transfer_items
#

DROP TABLE IF EXISTS `sma_transfer_items`;

CREATE TABLE `sma_transfer_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transfer_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_code` varchar(55) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `option_id` int(11) DEFAULT NULL,
  `expiry` date DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `net_unit_cost` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) DEFAULT NULL,
  `quantity_balance` decimal(15,4) NOT NULL,
  `unit_cost` decimal(25,4) DEFAULT NULL,
  `real_unit_cost` decimal(25,4) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `transfer_id` (`transfer_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_transfers
#

DROP TABLE IF EXISTS `sma_transfers`;

CREATE TABLE `sma_transfers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transfer_no` varchar(55) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `from_warehouse_id` int(11) NOT NULL,
  `from_warehouse_code` varchar(55) NOT NULL,
  `from_warehouse_name` varchar(55) NOT NULL,
  `to_warehouse_id` int(11) NOT NULL,
  `to_warehouse_code` varchar(55) NOT NULL,
  `to_warehouse_name` varchar(55) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `total` decimal(25,4) DEFAULT NULL,
  `total_tax` decimal(25,4) DEFAULT NULL,
  `grand_total` decimal(25,4) DEFAULT NULL,
  `created_by` varchar(255) DEFAULT NULL,
  `status` varchar(55) NOT NULL DEFAULT 'pending',
  `shipping` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `attachment` varchar(55) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_units
#

DROP TABLE IF EXISTS `sma_units`;

CREATE TABLE `sma_units` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(10) NOT NULL,
  `name` varchar(55) NOT NULL,
  `base_unit` int(11) DEFAULT NULL,
  `operator` varchar(1) DEFAULT NULL,
  `unit_value` varchar(55) DEFAULT NULL,
  `operation_value` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `base_unit` (`base_unit`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES (1, 'box', 'sweets', NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_user_logins
#

DROP TABLE IF EXISTS `sma_user_logins`;

CREATE TABLE `sma_user_logins` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `company_id` int(11) DEFAULT NULL,
  `ip_address` varbinary(16) NOT NULL,
  `login` varchar(100) NOT NULL,
  `time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (1, 2, NULL, '::1', 'admin', '2018-05-07 16:32:29');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (2, 2, NULL, '::1', 'admin', '2018-05-07 18:52:13');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (3, 2, NULL, '::1', 'admin', '2018-05-08 12:41:18');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (4, 2, NULL, '::1', 'admin', '2018-05-08 19:31:23');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (5, 2, NULL, '::1', 'admin', '2018-05-09 13:29:13');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (6, 1, NULL, '::1', 'owner', '2018-05-09 16:43:11');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (7, 2, NULL, '::1', 'admin', '2018-05-09 16:46:54');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (8, 2, NULL, '::1', 'admin', '2018-05-10 11:53:00');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (9, 2, NULL, '::1', 'admin', '2018-05-10 18:14:28');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (10, 2, NULL, '::1', 'admin', '2018-05-10 22:09:24');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (11, 2, NULL, '::1', 'admin', '2018-05-14 11:25:34');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (12, 2, NULL, '127.0.0.1', 'admin', '2018-05-14 11:56:45');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (13, 2, NULL, '::1', 'admin', '2018-05-14 12:02:35');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (14, 2, NULL, '127.0.0.1', 'admin', '2018-05-14 12:08:41');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (15, 2, NULL, '127.0.0.1', 'admin', '2018-05-14 12:20:46');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (16, 2, NULL, '::1', 'admin', '2018-05-14 18:32:32');


#
# TABLE STRUCTURE FOR: sma_users
#

DROP TABLE IF EXISTS `sma_users`;

CREATE TABLE `sma_users` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `last_ip_address` varbinary(45) DEFAULT NULL,
  `ip_address` varbinary(45) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` varchar(40) NOT NULL,
  `salt` varchar(40) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `activation_code` varchar(40) DEFAULT NULL,
  `forgotten_password_code` varchar(40) DEFAULT NULL,
  `forgotten_password_time` int(11) unsigned DEFAULT NULL,
  `remember_code` varchar(40) DEFAULT NULL,
  `created_on` int(11) unsigned NOT NULL,
  `last_login` int(11) unsigned DEFAULT NULL,
  `active` tinyint(1) unsigned DEFAULT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `company` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `avatar` varchar(55) DEFAULT NULL,
  `gender` varchar(20) DEFAULT NULL,
  `group_id` int(10) unsigned NOT NULL,
  `warehouse_id` int(10) unsigned DEFAULT NULL,
  `biller_id` int(10) unsigned DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `show_cost` tinyint(1) DEFAULT '0',
  `show_price` tinyint(1) DEFAULT '0',
  `award_points` int(11) DEFAULT '0',
  `view_right` tinyint(1) NOT NULL DEFAULT '0',
  `edit_right` tinyint(1) NOT NULL DEFAULT '0',
  `allow_discount` tinyint(1) DEFAULT '0',
  `stores_id` varchar(50) NOT NULL,
  `wherehouse_id_header` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`,`warehouse_id`,`biller_id`),
  KEY `group_id_2` (`group_id`,`company_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;

INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (1, '::1', '\0\0', 'owner', '38dc63b680d205e1a16b4e3ccd3587900bf7f630', NULL, 'info@admin.com', NULL, NULL, NULL, NULL, 1351661704, 1525864391, 1, 'Owner', 'Owner', 'POS', '012345678', NULL, 'male', 1, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, '', '');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (2, '::1', '', 'admin', '38dc63b680d205e1a16b4e3ccd3587900bf7f630', NULL, 'info@mmdnow.com', NULL, NULL, NULL, NULL, 0, 1526302950, 1, 'Owner', 'Owner', 'stock manager', NULL, '3cbf6efff9f22a000df9e037e0db4365.png', NULL, 1, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, '', '');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (9, '125.99.161.46', '125.99.161.46', 'yogesh1122', '6b9c2e6bead8e1546fd088fdc4ad9af92153e29c', NULL, 'yogesh1122@gmail.com', NULL, NULL, NULL, NULL, 1524145837, 1524147023, 1, 'yogesh', 'rathore', 'POS', '7898655787', NULL, 'male', 2, 0, 0, NULL, 0, 0, 0, 1, 0, 0, '', '2');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (10, '103.82.210.37', '103.82.210.37', 'sabari', 'af51ba8fb9957ac943c52691f037cd0114c2ef26', NULL, 'sabari@gmail.com', NULL, NULL, NULL, NULL, 1524206547, 1524218628, 1, 'sabari', 'giri', 'new', '9876543210', NULL, 'male', 7, 1, 4, NULL, 0, 0, 0, 1, 1, 1, '11', '1');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (11, '125.99.161.46', '125.99.161.46', 'ujjwal121', 'd21a4461a031b64369ae50b41e687e432877daf8', NULL, 'hello@ujjwalsahay.com', NULL, NULL, NULL, NULL, 1524218179, 1524218812, 1, 'Ujjwal', 'Sahay', 'POS', '83473848943', NULL, 'male', 2, 0, 0, NULL, 0, 0, 0, 1, 0, 0, '', '1');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (12, '103.82.210.37', '125.99.161.46', 'shivaji', '7f66bba9f37c23f9bf85bb42caa5f157649210b2', NULL, 'shiva@gmail.com', NULL, NULL, NULL, NULL, 1524219112, 1524219206, 1, 'Shiva', 'ji', 'POS', '1342525554', NULL, 'male', 8, 1, 3, NULL, 0, 0, 0, 1, 1, 1, '12', '1');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (13, '125.99.161.46', '125.99.161.46', 'mamun', '0aa59049521ca3347a55be22c1aabcab8a962add', NULL, 'abc@eds.com', NULL, NULL, NULL, NULL, 1524400183, 1524400209, 1, 'Mamun', 'Rahman', 'POS', '87679695696', NULL, 'male', 2, 0, 0, NULL, 0, 0, 0, 1, 0, 0, '', '1');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (14, '103.82.210.44', '103.82.210.44', 'vijay', '21bb585227e477b5a41619f37f3d60aa8e847d6a', NULL, 'vijaykumar@gmail.com', NULL, NULL, NULL, NULL, 1524548071, 1524646539, 1, 'vijay', 'kumar', 'new', '7896543210', NULL, 'male', 2, 3, 3, NULL, 0, 0, 0, 1, 1, 1, '11', '3');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (15, '103.82.210.44', '103.82.210.44', 'ravi', 'c55418ef5e35c9f29b9ee8b1a6fdbbfdbe89c837', NULL, 'ravikumar@gmail.com', NULL, NULL, NULL, NULL, 1524647790, 1524647813, 1, 'ravi', 'kumar', 'friendzion', '9876543210', NULL, 'male', 8, 3, 0, NULL, 0, 0, 0, 1, 1, 1, '14', '3');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (16, '::1', '::1', 'yogeshst1', '6b9c2e6bead8e1546fd088fdc4ad9af92153e29c', NULL, 'yogesh@gmail.com', NULL, NULL, NULL, NULL, 1525420198, 1525597670, 1, 'yogesh', 'rathore', 'Codezuke', '7898655787', NULL, 'male', 5, 1, 3, NULL, NULL, NULL, 0, 1, 0, 1, '6', '1');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (17, '::1', '::1', 'yogeshst2', '6b9c2e6bead8e1546fd088fdc4ad9af92153e29c', NULL, 'yogeshdf@gmail.com', NULL, NULL, NULL, NULL, 1525420314, 1525593645, 1, 'yogesh', 'rathore', 'Codezuke', '7898655787', NULL, 'male', 5, 1, 3, NULL, NULL, NULL, 0, 1, 0, 1, '7', '1');


#
# TABLE STRUCTURE FOR: sma_variants
#

DROP TABLE IF EXISTS `sma_variants`;

CREATE TABLE `sma_variants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(55) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_verify_app
#

DROP TABLE IF EXISTS `sma_verify_app`;

CREATE TABLE `sma_verify_app` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `verification_code` varchar(50) NOT NULL,
  `is_valid` varchar(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO `sma_verify_app` (`id`, `verification_code`, `is_valid`) VALUES (1, '11f6426097d72813794cd0359342abe0', 'verify');


#
# TABLE STRUCTURE FOR: sma_warehouses
#

DROP TABLE IF EXISTS `sma_warehouses`;

CREATE TABLE `sma_warehouses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  `name` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `map` varchar(255) DEFAULT NULL,
  `phone` varchar(55) DEFAULT NULL,
  `email` varchar(55) DEFAULT NULL,
  `price_group_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses` (`id`, `code`, `name`, `address`, `map`, `phone`, `email`, `price_group_id`) VALUES (1, 'WH1', 'Warehouse1', '', NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_warehouses_products
#

DROP TABLE IF EXISTS `sma_warehouses_products`;

CREATE TABLE `sma_warehouses_products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `rack` varchar(55) DEFAULT NULL,
  `avg_cost` decimal(25,4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `product_id` (`product_id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (24, 1, 1, '20.0000', NULL, '50.0000');
INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (25, 2, 1, '20.0000', NULL, '50.0000');


#
# TABLE STRUCTURE FOR: sma_warehouses_products_variants
#

DROP TABLE IF EXISTS `sma_warehouses_products_variants`;

CREATE TABLE `sma_warehouses_products_variants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `option_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `rack` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `option_id` (`option_id`),
  KEY `product_id` (`product_id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_warehouses_stores_products
#

DROP TABLE IF EXISTS `sma_warehouses_stores_products`;

CREATE TABLE `sma_warehouses_stores_products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `rack` varchar(55) DEFAULT NULL,
  `avg_cost` decimal(25,4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `product_id` (`product_id`),
  KEY `warehouse_id` (`warehouse_id`)
) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses_stores_products` (`id`, `product_id`, `warehouse_id`, `store_id`, `quantity`, `rack`, `avg_cost`) VALUES (77, 1, 1, 6, '24.0000', NULL, '0.0000');
INSERT INTO `sma_warehouses_stores_products` (`id`, `product_id`, `warehouse_id`, `store_id`, `quantity`, `rack`, `avg_cost`) VALUES (78, 2, 1, 6, '24.0000', NULL, '0.0000');
INSERT INTO `sma_warehouses_stores_products` (`id`, `product_id`, `warehouse_id`, `store_id`, `quantity`, `rack`, `avg_cost`) VALUES (79, 1, 1, 7, '14.0000', NULL, '0.0000');
INSERT INTO `sma_warehouses_stores_products` (`id`, `product_id`, `warehouse_id`, `store_id`, `quantity`, `rack`, `avg_cost`) VALUES (80, 2, 1, 7, '12.0000', NULL, '0.0000');
INSERT INTO `sma_warehouses_stores_products` (`id`, `product_id`, `warehouse_id`, `store_id`, `quantity`, `rack`, `avg_cost`) VALUES (81, 1, 1, 15, '9.0000', NULL, '0.0000');
INSERT INTO `sma_warehouses_stores_products` (`id`, `product_id`, `warehouse_id`, `store_id`, `quantity`, `rack`, `avg_cost`) VALUES (82, 2, 1, 15, '9.0000', NULL, '0.0000');


