#
# 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 DEFAULT CHARSET=utf8;

#
# 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 DEFAULT NULL,
  `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 DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_api_keys
#

DROP TABLE IF EXISTS `sma_api_keys`;

CREATE TABLE `sma_api_keys` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `reference` varchar(40) NOT NULL,
  `key` varchar(40) NOT NULL,
  `level` int(2) NOT NULL,
  `ignore_limits` tinyint(1) NOT NULL DEFAULT 0,
  `is_private_key` tinyint(1) NOT NULL DEFAULT 0,
  `ip_addresses` text DEFAULT NULL,
  `date_created` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_api_limits
#

DROP TABLE IF EXISTS `sma_api_limits`;

CREATE TABLE `sma_api_limits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uri` varchar(255) NOT NULL,
  `count` int(10) NOT NULL,
  `hour_started` int(11) NOT NULL,
  `api_key` varchar(40) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_api_logs
#

DROP TABLE IF EXISTS `sma_api_logs`;

CREATE TABLE `sma_api_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uri` varchar(255) NOT NULL,
  `method` varchar(6) NOT NULL,
  `params` text DEFAULT NULL,
  `api_key` varchar(40) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `time` int(11) NOT NULL,
  `rtime` float DEFAULT NULL,
  `authorized` varchar(1) NOT NULL,
  `response_code` smallint(3) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_attachments
#

DROP TABLE IF EXISTS `sma_attachments`;

CREATE TABLE `sma_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `subject_type` varchar(55) NOT NULL,
  `file_name` varchar(100) NOT NULL,
  `orig_name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# 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,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

INSERT INTO `sma_brands` (`id`, `code`, `name`, `image`, `slug`, `description`) VALUES (2, 'Home Made', 'Home Made', NULL, 'home-made', 'Home Made');


#
# 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 AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_calendar` (`id`, `title`, `description`, `start`, `end`, `color`, `user_id`) VALUES (1, 'Buy Beer', 'We need to buy beer', '2021-11-17 00:00:00', '2021-11-18 00:00:00', '#3a87ad', 1);


#
# 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_cart
#

DROP TABLE IF EXISTS `sma_cart`;

CREATE TABLE `sma_cart` (
  `id` varchar(40) NOT NULL,
  `time` varchar(30) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `data` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# 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,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`, `description`) VALUES (3, 'SWEATERS', 'SWEATERS', NULL, 0, 'sweaters', 'SWEATERS');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`, `description`) VALUES (4, 'TSHIRTS', 'TSHIRTS', NULL, 0, 'tshirts', 'TSHIRTS');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`, `description`) VALUES (5, 'MAVINGS', 'MAVINGS', NULL, 0, 'mavings', 'MAVINGS');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`, `description`) VALUES (6, 'LEGWARMERS', 'LEGWARMERS', NULL, 0, 'legwarmers', 'LEGWARMERS');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`, `description`) VALUES (7, 'SCALFS', 'SCALFS', NULL, 0, 'scalfs', 'SCALFS');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`, `description`) VALUES (8, 'embroidery', 'embroidery', NULL, 0, 'embroidery', 'embroidery');


#
# 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 DEFAULT NULL,
  `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,
  `gst_no` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`),
  KEY `group_id_2` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 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`, `gst_no`) VALUES (1, 3, 'customer', 1, 'General', 'Walk-in Customer', 'Walk-in Customer', '', 'Customer Address', 'Uhuru Market', 'uhuru market', '46000', 'Malaysia', '0123456789', 'info@techfirmknits.co.ke', '', '', '', '', '', '', 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`, `gst_no`) VALUES (3, NULL, 'biller', NULL, NULL, 'Main Counter', 'Tech-Firm Knits', '5555', 'Biller adddress', 'Nairobi', '', '', 'Country', '012345678', 'info@techfirmknits.com', '', '', '', '', '', '', ' Thank you for shopping with us. Please come again', 0, 'Tech-Firm_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`, `gst_no`) VALUES (6, 4, 'supplier', NULL, NULL, 'Warehouse', 'Warehouse', '', 'Ruiru', 'Ruiru', '', '', '', '0722000000', 'info@techfirmknits.co.ke', '', '', '', '', '', '', 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`, `gst_no`) VALUES (7, 4, 'supplier', NULL, NULL, 'Spinners', 'Spinners', '', 'Ruiru', 'Ruiru', '', '', '', '0791949499', 'snippers@gmail.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`, `gst_no`) VALUES (8, 4, 'supplier', NULL, NULL, 'Wall Street', 'Wall Street', '', 'Uhuru Market', 'Uhuru Market', '', '', '', '1231456', 'wall@gmail.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`, `gst_no`) VALUES (9, 4, 'supplier', NULL, NULL, 'maziwa', 'maziwa', '', 'maziwa', 'Uhuru Market', '', '', '', '22222', 'maziwa@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,
  `purchase_id` int(11) DEFAULT NULL,
  `transfer_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

#
# 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, 'Kes', 'Kenya Shillings', '110.0000', 1, 'KSh');


#
# 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,
  `discount` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

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


#
# 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_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,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# 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=7 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, 'waiters', 'Waiter');


#
# 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=15 DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_logs
#

DROP TABLE IF EXISTS `sma_logs`;

CREATE TABLE `sma_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `detail` varchar(190) NOT NULL,
  `model` longtext DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (1, 'POS Bill is being deleted by jane (User Id: 2)', '{\"model\":{\"id\":\"3\",\"date\":\"2021-11-17 00:15:33\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"count\":\"2\",\"order_discount_id\":\"\",\"order_tax_id\":\"1\",\"total\":\"360.0000\",\"biller_id\":\"3\",\"warehouse_id\":\"1\",\"created_by\":\"2\",\"suspend_note\":\"Table 4\",\"shipping\":\"0.0000\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"15\",\"suspend_id\":\"3\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"option_id\":\"5\",\"product_type\":\"standard\",\"real_unit_price\":\"180.0000\",\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null},{\"id\":\"16\",\"suspend_id\":\"3\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"option_id\":\"5\",\"product_type\":\"standard\",\"real_unit_price\":\"180.0000\",\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null}]}', '2021-11-17 00:16:00');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (2, 'POS Bill is being deleted by jane (User Id: 2)', '{\"model\":{\"id\":\"2\",\"date\":\"2021-11-17 00:15:18\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"count\":\"5\",\"order_discount_id\":\"\",\"order_tax_id\":\"1\",\"total\":\"940.0000\",\"biller_id\":\"3\",\"warehouse_id\":\"1\",\"created_by\":\"2\",\"suspend_note\":\"Table 10\",\"shipping\":\"0.0000\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"13\",\"suspend_id\":\"2\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"3.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"540.0000\",\"serial_no\":\"\",\"option_id\":\"5\",\"product_type\":\"standard\",\"real_unit_price\":\"180.0000\",\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"3.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null},{\"id\":\"14\",\"suspend_id\":\"2\",\"product_id\":\"1\",\"product_code\":\"Tusker Lager 500 ML\",\"product_name\":\"Tusker Lager 500 ML\",\"net_unit_price\":\"200.0000\",\"unit_price\":\"200.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"400.0000\",\"serial_no\":\"\",\"option_id\":\"1\",\"product_type\":\"standard\",\"real_unit_price\":\"200.0000\",\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"2.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null}]}', '2021-11-17 00:17:07');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (3, 'POS Bill is being deleted by jane (User Id: 2)', '{\"model\":{\"id\":\"4\",\"date\":\"2021-11-17 01:40:03\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"count\":\"6\",\"order_discount_id\":\"\",\"order_tax_id\":\"1\",\"total\":\"1120.0000\",\"biller_id\":\"3\",\"warehouse_id\":\"1\",\"created_by\":\"2\",\"suspend_note\":\"Table 2\",\"shipping\":\"0.0000\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"17\",\"suspend_id\":\"4\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"4.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"720.0000\",\"serial_no\":\"\",\"option_id\":\"5\",\"product_type\":\"standard\",\"real_unit_price\":\"180.0000\",\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"4.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null},{\"id\":\"18\",\"suspend_id\":\"4\",\"product_id\":\"1\",\"product_code\":\"Tusker Lager 500 ML\",\"product_name\":\"Tusker Lager 500 ML\",\"net_unit_price\":\"200.0000\",\"unit_price\":\"200.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"400.0000\",\"serial_no\":\"\",\"option_id\":\"1\",\"product_type\":\"standard\",\"real_unit_price\":\"200.0000\",\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"2.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null}]}', '2021-11-17 01:44:25');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (4, 'Product is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"3\",\"code\":\"737\",\"name\":\"FAXE 500ML\",\"unit\":\"3\",\"cost\":\"3500.0000\",\"price\":\"4500.0000\",\"alert_quantity\":\"5.0000\",\"image\":\"0877189a1a03a32e4243dcaddafc3253.jpg\",\"category_id\":\"1\",\"subcategory_id\":\"2\",\"cf1\":\"\",\"cf2\":\"\",\"cf3\":\"\",\"cf4\":\"\",\"cf5\":\"\",\"cf6\":\"\",\"quantity\":\"2.0000\",\"tax_rate\":\"2\",\"track_quantity\":\"1\",\"details\":\"\",\"warehouse\":null,\"barcode_symbology\":\"code128\",\"file\":\"\",\"product_details\":\"\",\"tax_method\":\"1\",\"type\":\"standard\",\"supplier1\":\"0\",\"supplier1price\":null,\"supplier2\":null,\"supplier2price\":null,\"supplier3\":null,\"supplier3price\":null,\"supplier4\":null,\"supplier4price\":null,\"supplier5\":null,\"supplier5price\":null,\"promotion\":null,\"promo_price\":null,\"start_date\":null,\"end_date\":null,\"supplier1_part_no\":\"\",\"supplier2_part_no\":null,\"supplier3_part_no\":null,\"supplier4_part_no\":null,\"supplier5_part_no\":null,\"sale_unit\":\"1\",\"purchase_unit\":\"3\",\"brand\":\"1\",\"slug\":\"faxe-500ml\",\"featured\":null,\"weight\":\"500.0000\",\"hsn_code\":null,\"views\":\"0\",\"hide\":\"0\",\"second_name\":\"\",\"hide_pos\":\"0\"}}', '2022-05-01 13:25:39');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (5, 'Product is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"2\",\"code\":\"PilsnerLager500ML\",\"name\":\"Pilsner Lager 500 ML\",\"unit\":\"1\",\"cost\":\"130.0000\",\"price\":\"180.0000\",\"alert_quantity\":\"24.0000\",\"image\":\"7ba9306341e1f2840529f859e5d6a71e.jpg\",\"category_id\":\"1\",\"subcategory_id\":null,\"cf1\":\"CF1\",\"cf2\":\"CF2\",\"cf3\":\"CF3\",\"cf4\":\"CF4\",\"cf5\":\"CF5\",\"cf6\":\"CF6\",\"quantity\":null,\"tax_rate\":\"1\",\"track_quantity\":\"1\",\"details\":\"\",\"warehouse\":null,\"barcode_symbology\":\"code25\",\"file\":null,\"product_details\":\"\",\"tax_method\":\"1\",\"type\":\"standard\",\"supplier1\":\"0\",\"supplier1price\":null,\"supplier2\":null,\"supplier2price\":null,\"supplier3\":null,\"supplier3price\":null,\"supplier4\":null,\"supplier4price\":null,\"supplier5\":null,\"supplier5price\":null,\"promotion\":null,\"promo_price\":null,\"start_date\":null,\"end_date\":null,\"supplier1_part_no\":\"\",\"supplier2_part_no\":null,\"supplier3_part_no\":null,\"supplier4_part_no\":null,\"supplier5_part_no\":null,\"sale_unit\":\"1\",\"purchase_unit\":\"1\",\"brand\":\"1\",\"slug\":\"pilsner-lager-500-ml\",\"featured\":null,\"weight\":\"0.0000\",\"hsn_code\":null,\"views\":\"0\",\"hide\":\"0\",\"second_name\":\"Pro 11\",\"hide_pos\":\"0\"}}', '2022-05-01 13:25:39');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (6, 'Product is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"1\",\"code\":\"Tusker Lager 500 ML\",\"name\":\"Tusker Lager 500 ML\",\"unit\":\"1\",\"cost\":\"146.0000\",\"price\":\"200.0000\",\"alert_quantity\":\"24.0000\",\"image\":\"tusker_lager_4_0.png\",\"category_id\":\"2\",\"subcategory_id\":null,\"cf1\":\"CF1\",\"cf2\":\"CF2\",\"cf3\":\"CF3\",\"cf4\":\"CF4\",\"cf5\":\"CF5\",\"cf6\":\"CF6\",\"quantity\":\"4.0000\",\"tax_rate\":\"1\",\"track_quantity\":\"1\",\"details\":null,\"warehouse\":null,\"barcode_symbology\":\"327732732\",\"file\":null,\"product_details\":null,\"tax_method\":\"1\",\"type\":\"standard\",\"supplier1\":null,\"supplier1price\":\"146.0000\",\"supplier2\":null,\"supplier2price\":null,\"supplier3\":null,\"supplier3price\":null,\"supplier4\":null,\"supplier4price\":null,\"supplier5\":null,\"supplier5price\":null,\"promotion\":\"0\",\"promo_price\":null,\"start_date\":null,\"end_date\":null,\"supplier1_part_no\":\"NG01\",\"supplier2_part_no\":null,\"supplier3_part_no\":null,\"supplier4_part_no\":null,\"supplier5_part_no\":null,\"sale_unit\":\"1\",\"purchase_unit\":\"1\",\"brand\":\"1\",\"slug\":\"tusker-lager-500-ml\",\"featured\":null,\"weight\":null,\"hsn_code\":\"0\",\"views\":\"0\",\"hide\":\"0\",\"second_name\":\"Pro 11\",\"hide_pos\":\"0\"}}', '2022-05-01 13:25:39');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (7, 'Sale is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"6\",\"date\":\"2021-11-17 01:52:11\",\"reference_no\":\"SALE\\/POS2021\\/11\\/0006\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Test Biller\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"180.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"180.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"4\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"1\",\"pos\":\"1\",\"paid\":\"180.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"98b7341d299ae7ace226cabbf9a449079cd137533b01f4e2fc0e1e285b17aea6\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"10\",\"sale_id\":\"6\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null}]}', '2022-05-01 14:02:35');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (8, 'Sale is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"5\",\"date\":\"2021-11-17 01:44:25\",\"reference_no\":\"SALE\\/POS2021\\/11\\/0005\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Test Biller\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"400.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"400.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"2\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"2\",\"pos\":\"1\",\"paid\":\"400.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"dd6ae6f745137ca1a1c817414ca2c165db0a1c084cab7da8f212eef11d0fadb9\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"9\",\"sale_id\":\"5\",\"product_id\":\"1\",\"product_code\":\"Tusker Lager 500 ML\",\"product_name\":\"Tusker Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"1\",\"net_unit_price\":\"200.0000\",\"unit_price\":\"200.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"400.0000\",\"serial_no\":\"\",\"real_unit_price\":\"200.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"2.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null}]}', '2022-05-01 14:02:35');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (9, 'Sale is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"4\",\"date\":\"2021-11-17 01:40:52\",\"reference_no\":\"SALE\\/POS2021\\/11\\/0004\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Test Biller\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"360.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"360.0000\",\"sale_status\":\"completed\",\"payment_status\":\"due\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"2\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"2\",\"pos\":\"1\",\"paid\":\"300.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"eb8e71464bbb477c56a44899565318146600f7f6baac3b1cd87646848b4b2eaa\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"7\",\"sale_id\":\"4\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null},{\"id\":\"8\",\"sale_id\":\"4\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null}]}', '2022-05-01 14:02:35');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (10, 'Sale is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"3\",\"date\":\"2021-11-17 00:17:07\",\"reference_no\":\"SALE\\/POS2021\\/11\\/0003\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Test Biller\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"940.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"940.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"2\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"5\",\"pos\":\"1\",\"paid\":\"940.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"604941aa07342d5bd0fa65c854552dd0a53fda8b2a290dc9a61299887546675f\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"5\",\"sale_id\":\"3\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"3.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"540.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"3.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null},{\"id\":\"6\",\"sale_id\":\"3\",\"product_id\":\"1\",\"product_code\":\"Tusker Lager 500 ML\",\"product_name\":\"Tusker Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"1\",\"net_unit_price\":\"200.0000\",\"unit_price\":\"200.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"400.0000\",\"serial_no\":\"\",\"real_unit_price\":\"200.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"2.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null}]}', '2022-05-01 14:02:35');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (11, 'Sale is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"2\",\"date\":\"2021-11-17 00:15:59\",\"reference_no\":\"SALE\\/POS2021\\/11\\/0002\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Test Biller\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"360.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"360.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"2\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"2\",\"pos\":\"1\",\"paid\":\"360.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"0c1b7e1eaeaf83d51368b69842cf4ca10ddbcf25b8975186919f4f903f006137\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"3\",\"sale_id\":\"2\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null},{\"id\":\"4\",\"sale_id\":\"2\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"180.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null}]}', '2022-05-01 14:02:35');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (12, 'Sale is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"1\",\"date\":\"2021-11-16 23:38:39\",\"reference_no\":\"SALE\\/POS2021\\/11\\/0001\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Test Biller\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"760.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"760.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"1\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"4\",\"pos\":\"1\",\"paid\":\"760.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"1380913ecac11c94a9621805c9cce31f087815058b8492a3eb0ce7a6d632fbb8\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"1\",\"sale_id\":\"1\",\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"5\",\"net_unit_price\":\"180.0000\",\"unit_price\":\"180.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"360.0000\",\"serial_no\":\"\",\"real_unit_price\":\"180.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"2.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null},{\"id\":\"2\",\"sale_id\":\"1\",\"product_id\":\"1\",\"product_code\":\"Tusker Lager 500 ML\",\"product_name\":\"Tusker Lager 500 ML\",\"product_type\":\"standard\",\"option_id\":\"1\",\"net_unit_price\":\"200.0000\",\"unit_price\":\"200.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"400.0000\",\"serial_no\":\"\",\"real_unit_price\":\"200.0000\",\"sale_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"2.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":null,\"details\":null,\"variant\":null,\"hsn_code\":null,\"second_name\":null,\"base_unit_id\":null,\"base_unit_code\":null}]}', '2022-05-01 14:02:35');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (13, 'Purchase is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"2\",\"reference_no\":\"12\",\"date\":\"2021-11-17 01:07:00\",\"supplier_id\":\"5\",\"supplier\":\"Muranga Distributors\",\"warehouse_id\":\"1\",\"note\":\"\",\"total\":\"7000.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"order_discount\":\"0.0000\",\"total_discount\":\"0.0000\",\"product_tax\":\"700.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"700.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"7700.0000\",\"paid\":\"0.0000\",\"status\":\"received\",\"payment_status\":\"pending\",\"created_by\":\"3\",\"updated_by\":\"3\",\"updated_at\":\"2021-11-17 01:10:55\",\"attachment\":\"0\",\"payment_term\":\"1\",\"due_date\":\"2021-11-18\",\"return_id\":null,\"surcharge\":\"0.0000\",\"return_purchase_ref\":null,\"purchase_id\":null,\"return_purchase_total\":\"0.0000\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"4\",\"purchase_id\":\"2\",\"transfer_id\":null,\"product_id\":\"3\",\"product_code\":\"737\",\"product_name\":\"FAXE 500ML\",\"option_id\":null,\"net_unit_cost\":\"3500.0000\",\"quantity\":\"2.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"700.0000\",\"tax_rate_id\":\"2\",\"tax\":\"10%\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"expiry\":null,\"subtotal\":\"7700.0000\",\"quantity_balance\":\"2.0000\",\"date\":\"2021-11-17\",\"status\":\"received\",\"unit_cost\":\"3850.0000\",\"real_unit_cost\":\"3500.0000\",\"quantity_received\":\"2.0000\",\"supplier_part_no\":null,\"purchase_item_id\":null,\"product_unit_id\":\"3\",\"product_unit_code\":\"Crate\",\"unit_quantity\":\"2.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"base_unit_cost\":\"3500.0000\"}]}', '2022-05-01 14:02:57');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (14, 'Purchase is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"1\",\"reference_no\":\"2101\",\"date\":\"2021-11-16 23:32:00\",\"supplier_id\":\"4\",\"supplier\":\"Muranga Distributors\",\"warehouse_id\":\"1\",\"note\":\"&lt;p&gt;Tusker and Pilsner&lt;&sol;p&gt;\",\"total\":\"2760.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"order_discount\":\"0.0000\",\"total_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"2760.0000\",\"paid\":\"0.0000\",\"status\":\"received\",\"payment_status\":\"pending\",\"created_by\":\"1\",\"updated_by\":null,\"updated_at\":null,\"attachment\":\"0\",\"payment_term\":\"1\",\"due_date\":\"2021-11-17\",\"return_id\":null,\"surcharge\":\"0.0000\",\"return_purchase_ref\":null,\"purchase_id\":null,\"return_purchase_total\":\"0.0000\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"1\",\"purchase_id\":\"1\",\"transfer_id\":null,\"product_id\":\"1\",\"product_code\":\"Tusker Lager 500 ML\",\"product_name\":\"Tusker Lager 500 ML\",\"option_id\":\"1\",\"net_unit_cost\":\"146.0000\",\"quantity\":\"10.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"expiry\":null,\"subtotal\":\"1460.0000\",\"quantity_balance\":\"4.0000\",\"date\":\"2021-11-16\",\"status\":\"received\",\"unit_cost\":\"146.0000\",\"real_unit_cost\":\"146.0000\",\"quantity_received\":\"10.0000\",\"supplier_part_no\":null,\"purchase_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"10.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"base_unit_cost\":\"146.0000\"},{\"id\":\"2\",\"purchase_id\":\"1\",\"transfer_id\":null,\"product_id\":\"2\",\"product_code\":\"PilsnerLager500ML\",\"product_name\":\"Pilsner Lager 500 ML\",\"option_id\":\"5\",\"net_unit_cost\":\"130.0000\",\"quantity\":\"10.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"expiry\":null,\"subtotal\":\"1300.0000\",\"quantity_balance\":\"0.0000\",\"date\":\"2021-11-16\",\"status\":\"received\",\"unit_cost\":\"130.0000\",\"real_unit_cost\":\"130.0000\",\"quantity_received\":\"10.0000\",\"supplier_part_no\":null,\"purchase_item_id\":null,\"product_unit_id\":\"1\",\"product_unit_code\":\"pc\",\"unit_quantity\":\"10.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"base_unit_cost\":\"130.0000\"}]}', '2022-05-01 14:02:57');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (15, 'Supplier is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"4\",\"group_id\":\"4\",\"group_name\":\"supplier\",\"customer_group_id\":null,\"customer_group_name\":null,\"name\":\"Muranga Distributors\",\"company\":\"Muranga Distributors\",\"vat_no\":\"\",\"address\":\"636\",\"city\":\"Muranga\",\"state\":\"\",\"postal_code\":\"\",\"country\":\"\",\"phone\":\"2389838923\",\"email\":\"kimems01@gmail.com\",\"cf1\":\"\",\"cf2\":\"\",\"cf3\":\"\",\"cf4\":\"\",\"cf5\":\"\",\"cf6\":\"\",\"invoice_footer\":null,\"payment_term\":\"0\",\"logo\":\"logo.png\",\"award_points\":\"0\",\"deposit_amount\":null,\"price_group_id\":null,\"price_group_name\":null,\"gst_no\":\"\"}}', '2022-05-01 14:09:01');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (16, 'Supplier is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"5\",\"group_id\":\"4\",\"group_name\":\"supplier\",\"customer_group_id\":null,\"customer_group_name\":null,\"name\":\"Muranga Distributors\",\"company\":\"Muranga Distributors\",\"vat_no\":\"\",\"address\":\"36\",\"city\":\"Nairobi\",\"state\":\"\",\"postal_code\":\"\",\"country\":\"\",\"phone\":\"389223883\",\"email\":\"muranga@gmail.com\",\"cf1\":\"\",\"cf2\":\"\",\"cf3\":\"\",\"cf4\":\"\",\"cf5\":\"\",\"cf6\":\"\",\"invoice_footer\":null,\"payment_term\":\"0\",\"logo\":\"logo.png\",\"award_points\":\"0\",\"deposit_amount\":null,\"price_group_id\":null,\"price_group_name\":null,\"gst_no\":\"\"}}', '2022-05-01 14:09:01');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (17, 'Supplier is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"2\",\"group_id\":\"4\",\"group_name\":\"supplier\",\"customer_group_id\":null,\"customer_group_name\":null,\"name\":\"Test Supplier\",\"company\":\"Supplier Company Name\",\"vat_no\":null,\"address\":\"Supplier Address\",\"city\":\"Petaling Jaya\",\"state\":\"Selangor\",\"postal_code\":\"46050\",\"country\":\"Malaysia\",\"phone\":\"0123456789\",\"email\":\"supplier@tecdiary.com\",\"cf1\":\"-\",\"cf2\":\"-\",\"cf3\":\"-\",\"cf4\":\"-\",\"cf5\":\"-\",\"cf6\":\"-\",\"invoice_footer\":null,\"payment_term\":\"0\",\"logo\":\"logo.png\",\"award_points\":\"0\",\"deposit_amount\":null,\"price_group_id\":null,\"price_group_name\":null,\"gst_no\":null}}', '2022-05-01 14:09:01');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (18, 'Sale is being deleted by charles (User Id: 5)', '{\"model\":{\"id\":\"7\",\"date\":\"2022-05-02 02:09:41\",\"reference_no\":\"SALE\\/POS2022\\/05\\/0007\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Tech-Firm Knits\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"420.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"420.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"5\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"1\",\"pos\":\"1\",\"paid\":\"420.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":null,\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":\"0.0000\",\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"c92d5280bd5a91b28bb88f2658e77d8196ef4bd826b5864dda87d6b91fd6cf6b\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"11\",\"sale_id\":\"7\",\"product_id\":\"4\",\"product_code\":\"81105746\",\"product_name\":\"Plain Long sleeve\",\"product_type\":\"standard\",\"option_id\":\"9\",\"net_unit_price\":\"420.0000\",\"unit_price\":\"420.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"420.0000\",\"serial_no\":\"\",\"real_unit_price\":\"420.0000\",\"sale_item_id\":null,\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"1.0000\",\"comment\":\"\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":\"no_image.png\",\"details\":\"\",\"variant\":\"Size 22\",\"hsn_code\":null,\"second_name\":\"\",\"base_unit_id\":\"4\",\"base_unit_code\":\"Pc\"}]}', '2022-05-02 02:10:30');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (19, 'Product is being deleted by kimems (User Id: 3)', '{\"model\":{\"id\":\"4\",\"code\":\"81105746\",\"name\":\"Plain Long sleeve\",\"unit\":\"4\",\"cost\":\"0.0000\",\"price\":\"420.0000\",\"alert_quantity\":\"0.0000\",\"image\":\"no_image.png\",\"category_id\":\"3\",\"subcategory_id\":null,\"cf1\":\"\",\"cf2\":\"\",\"cf3\":\"\",\"cf4\":\"\",\"cf5\":\"\",\"cf6\":\"\",\"quantity\":\"-1.0000\",\"tax_rate\":\"1\",\"track_quantity\":\"0\",\"details\":\"\",\"warehouse\":null,\"barcode_symbology\":\"code128\",\"file\":\"\",\"product_details\":\"\",\"tax_method\":\"1\",\"type\":\"standard\",\"supplier1\":\"0\",\"supplier1price\":null,\"supplier2\":null,\"supplier2price\":null,\"supplier3\":null,\"supplier3price\":null,\"supplier4\":null,\"supplier4price\":null,\"supplier5\":null,\"supplier5price\":null,\"promotion\":null,\"promo_price\":null,\"start_date\":null,\"end_date\":null,\"supplier1_part_no\":\"\",\"supplier2_part_no\":null,\"supplier3_part_no\":null,\"supplier4_part_no\":null,\"supplier5_part_no\":null,\"sale_unit\":\"4\",\"purchase_unit\":\"4\",\"brand\":\"2\",\"slug\":\"81105746\",\"featured\":null,\"weight\":\"0.0000\",\"hsn_code\":null,\"views\":\"0\",\"hide\":\"0\",\"second_name\":\"\",\"hide_pos\":\"0\"}}', '2022-05-02 08:30:50');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (20, 'Sale is being deleted by wanjiru (User Id: 6)', '{\"model\":{\"id\":\"8\",\"date\":\"2022-05-02 08:37:00\",\"reference_no\":\"SALE2022\\/05\\/0001\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"biller_id\":\"3\",\"biller\":\"Tech-Firm Knits\",\"warehouse_id\":\"1\",\"note\":\"\",\"staff_note\":\"\",\"total\":\"1680.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"1680.0000\",\"sale_status\":\"completed\",\"payment_status\":\"paid\",\"payment_term\":\"0\",\"due_date\":null,\"created_by\":\"3\",\"updated_by\":null,\"updated_at\":null,\"total_items\":\"4\",\"pos\":\"0\",\"paid\":\"1680.0000\",\"return_id\":null,\"surcharge\":\"0.0000\",\"attachment\":\"0\",\"return_sale_ref\":null,\"sale_id\":null,\"return_sale_total\":\"0.0000\",\"rounding\":null,\"suspend_note\":null,\"api\":\"0\",\"shop\":\"0\",\"address_id\":null,\"reserve_id\":null,\"hash\":\"46f189d22f9c57eabdcb4fadb8e3640b9d577c459656a0f6f679e7df048a574e\",\"manual_payment\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"payment_method\":null},\"items\":[{\"id\":\"12\",\"sale_id\":\"8\",\"product_id\":\"5\",\"product_code\":\"23033060\",\"product_name\":\"PLAIN SWEATERS SIZE 22\",\"product_type\":\"standard\",\"option_id\":\"12\",\"net_unit_price\":\"420.0000\",\"unit_price\":\"420.0000\",\"quantity\":\"3.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"1260.0000\",\"serial_no\":\"56\",\"real_unit_price\":\"420.0000\",\"sale_item_id\":null,\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"3.0000\",\"comment\":null,\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":\"no_image.png\",\"details\":\"\",\"variant\":\"RED\",\"hsn_code\":null,\"second_name\":\"\",\"base_unit_id\":\"4\",\"base_unit_code\":\"Pc\"},{\"id\":\"13\",\"sale_id\":\"8\",\"product_id\":\"5\",\"product_code\":\"23033060\",\"product_name\":\"PLAIN SWEATERS SIZE 22\",\"product_type\":\"standard\",\"option_id\":\"13\",\"net_unit_price\":\"420.0000\",\"unit_price\":\"420.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"420.0000\",\"serial_no\":\"67\",\"real_unit_price\":\"420.0000\",\"sale_item_id\":null,\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"1.0000\",\"comment\":null,\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"image\":\"no_image.png\",\"details\":\"\",\"variant\":\"MAROON\",\"hsn_code\":null,\"second_name\":\"\",\"base_unit_id\":\"4\",\"base_unit_code\":\"Pc\"}]}', '2022-05-02 14:31:09');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (21, 'Purchase is being deleted by wanjiru (User Id: 6)', '{\"model\":{\"id\":\"3\",\"reference_no\":\"PO2022\\/05\\/0001\",\"date\":\"2022-05-02 08:34:00\",\"supplier_id\":\"6\",\"supplier\":\"Warehouse\",\"warehouse_id\":\"1\",\"note\":\"\",\"total\":\"4800.0000\",\"product_discount\":\"0.0000\",\"order_discount_id\":\"\",\"order_discount\":\"0.0000\",\"total_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"4800.0000\",\"paid\":\"0.0000\",\"status\":\"received\",\"payment_status\":\"pending\",\"created_by\":\"3\",\"updated_by\":null,\"updated_at\":null,\"attachment\":\"0\",\"payment_term\":\"0\",\"due_date\":null,\"return_id\":null,\"surcharge\":\"0.0000\",\"return_purchase_ref\":null,\"purchase_id\":null,\"return_purchase_total\":\"0.0000\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"6\",\"purchase_id\":\"3\",\"transfer_id\":null,\"product_id\":\"5\",\"product_code\":\"23033060\",\"product_name\":\"PLAIN SWEATERS SIZE 22\",\"option_id\":\"13\",\"net_unit_cost\":\"300.0000\",\"quantity\":\"6.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"expiry\":null,\"subtotal\":\"1800.0000\",\"quantity_balance\":\"6.0000\",\"date\":\"2022-05-02\",\"status\":\"received\",\"unit_cost\":\"300.0000\",\"real_unit_cost\":\"300.0000\",\"quantity_received\":\"6.0000\",\"supplier_part_no\":null,\"purchase_item_id\":null,\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"6.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"base_unit_cost\":\"300.0000\"},{\"id\":\"7\",\"purchase_id\":\"3\",\"transfer_id\":null,\"product_id\":\"5\",\"product_code\":\"23033060\",\"product_name\":\"PLAIN SWEATERS SIZE 22\",\"option_id\":\"12\",\"net_unit_cost\":\"300.0000\",\"quantity\":\"10.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"expiry\":null,\"subtotal\":\"3000.0000\",\"quantity_balance\":\"10.0000\",\"date\":\"2022-05-02\",\"status\":\"received\",\"unit_cost\":\"300.0000\",\"real_unit_cost\":\"300.0000\",\"quantity_received\":\"10.0000\",\"supplier_part_no\":null,\"purchase_item_id\":null,\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"10.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"base_unit_cost\":\"300.0000\"}]}', '2022-05-02 14:31:22');
INSERT INTO `sma_logs` (`id`, `detail`, `model`, `date`) VALUES (22, 'Quotation is being deleted by wanjiru (User Id: 6)', '{\"model\":{\"id\":\"1\",\"date\":\"2022-05-02 08:36:00\",\"reference_no\":\"2020\",\"customer_id\":\"1\",\"customer\":\"Walk-in Customer\",\"warehouse_id\":\"1\",\"biller_id\":\"3\",\"biller\":\"Tech-Firm Knits\",\"note\":\"\",\"internal_note\":null,\"total\":\"1680.0000\",\"product_discount\":\"0.0000\",\"order_discount\":\"0.0000\",\"order_discount_id\":\"\",\"total_discount\":\"0.0000\",\"product_tax\":\"0.0000\",\"order_tax_id\":\"1\",\"order_tax\":\"0.0000\",\"total_tax\":\"0.0000\",\"shipping\":\"0.0000\",\"grand_total\":\"1680.0000\",\"status\":\"completed\",\"created_by\":\"3\",\"updated_by\":null,\"updated_at\":null,\"attachment\":null,\"supplier_id\":\"0\",\"supplier\":null,\"hash\":\"1a414a8812404d8fa95431f52c8b5361a7bbd7a73e38d5154728fa7fd9f8380e\",\"cgst\":null,\"sgst\":null,\"igst\":null},\"items\":[{\"id\":\"1\",\"quote_id\":\"1\",\"product_id\":\"5\",\"product_code\":\"23033060\",\"product_name\":\"PLAIN SWEATERS SIZE 22\",\"product_type\":\"standard\",\"option_id\":\"13\",\"net_unit_price\":\"420.0000\",\"unit_price\":\"420.0000\",\"quantity\":\"1.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"420.0000\",\"serial_no\":null,\"real_unit_price\":\"420.0000\",\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"1.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"unit\":\"4\",\"image\":\"no_image.png\",\"details\":\"\",\"variant\":\"MAROON\",\"hsn_code\":null,\"second_name\":\"\"},{\"id\":\"2\",\"quote_id\":\"1\",\"product_id\":\"5\",\"product_code\":\"23033060\",\"product_name\":\"PLAIN SWEATERS SIZE 22\",\"product_type\":\"standard\",\"option_id\":\"12\",\"net_unit_price\":\"420.0000\",\"unit_price\":\"420.0000\",\"quantity\":\"3.0000\",\"warehouse_id\":\"1\",\"item_tax\":\"0.0000\",\"tax_rate_id\":\"1\",\"tax\":\"0\",\"discount\":\"0\",\"item_discount\":\"0.0000\",\"subtotal\":\"1260.0000\",\"serial_no\":null,\"real_unit_price\":\"420.0000\",\"product_unit_id\":\"4\",\"product_unit_code\":\"Pc\",\"unit_quantity\":\"3.0000\",\"gst\":null,\"cgst\":null,\"sgst\":null,\"igst\":null,\"tax_code\":\"NT\",\"tax_name\":\"No Tax\",\"tax_rate\":\"0.0000\",\"unit\":\"4\",\"image\":\"no_image.png\",\"details\":\"\",\"variant\":\"RED\",\"hsn_code\":null,\"second_name\":\"\"}]}', '2022-05-02 14:31:37');


#
# 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_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 AUTO_INCREMENT=2 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', 2, 1, 2, 1, 8, 1, 9, 1, 1, 1, 1, 1);


#
# TABLE STRUCTURE FOR: sma_pages
#

DROP TABLE IF EXISTS `sma_pages`;

CREATE TABLE `sma_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(15) NOT NULL,
  `title` varchar(60) NOT NULL,
  `description` varchar(180) NOT NULL,
  `slug` varchar(55) DEFAULT NULL,
  `body` text NOT NULL,
  `active` tinyint(1) NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `order_no` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# 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=9 DEFAULT CHARSET=utf8;

#
# 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=3 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, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 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, NULL, NULL, NULL, NULL, 1, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);


#
# 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 DEFAULT NULL,
  `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=8 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, '2021-11-16 23:36:08', 1, '0.0000', 'close', '760.0000', 0, 0, '760.0000', 0, 0, '', '2021-11-16 23:53:36', '0', 1);
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, '2021-11-17 00:09:37', 2, '0.0000', 'close', '940.0000', 0, 0, '940.0000', 0, 0, '', '2021-11-17 00:27:55', NULL, 1);
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, '2021-11-17 00:35:00', 3, '0.0000', 'close', '0.0000', 0, 0, '0.0000', 0, 0, '', '2021-11-17 01:54:18', NULL, 3);
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, '2021-11-17 01:38:24', 2, '10000.0000', 'close', '700.0000', 0, 0, '700.0000', 0, 0, '', '2021-11-17 01:54:31', NULL, 3);
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, '2021-11-17 01:50:56', 4, '0.0000', 'close', '180.0000', 0, 0, '180.0000', 0, 0, '', '2021-11-17 01:54:42', NULL, 3);
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, '2022-05-01 14:27:58', 3, '0.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, '2022-05-02 02:09:04', 5, '0.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.4.47',
  `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, 3, 1, 3, '1', 'GST Reg', 'VAT Reg', '123456789', '987654321', NULL, '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, NULL, 0, 'default', 1, 0, 0, 0, 42, '12345678', 'purchase_code', 'envato_username', '3.4.47', 0, 0, 0, '', 1, NULL, 'null', 0, 0, 1);


#
# 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 AUTO_INCREMENT=2 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`),
  UNIQUE KEY `unique_product_id_name` (`product_id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (12, 5, 'RED', NULL, '50.0000', NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (13, 5, 'MAROON', NULL, '0.0000', NULL);
INSERT INTO `sma_product_variants` (`id`, `product_id`, `name`, `cost`, `price`, `quantity`) VALUES (14, 5, 'GREEN', NULL, '0.0000', '0.0000');


#
# 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 DEFAULT NULL,
  `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,
  `hide_pos` tinyint(1) NOT NULL DEFAULT 0,
  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`, `hide_pos`) VALUES (5, '23033060', 'PLAIN SWEATERS SIZE 22', 4, '300.0000', '420.0000', '3.0000', 'no_image.png', 3, NULL, '', '', '', '', '', '', NULL, 1, 1, '', NULL, 'code128', '', '', 1, 'standard', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 4, 4, 0, '23033060', 1, '0.0000', NULL, 0, 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`, `hide_pos`) VALUES (6, '67569947', 'plain sweater size 24', 4, '0.0000', '460.0000', '5.0000', 'no_image.png', 3, 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, 4, 4, 0, '67569947', 1, '0.0000', NULL, 0, 0, '', 0);


#
# TABLE STRUCTURE FOR: sma_promos
#

DROP TABLE IF EXISTS `sma_promos`;

CREATE TABLE `sma_promos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `product2buy` int(11) NOT NULL,
  `product2get` int(11) NOT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `description` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# 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,
  `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,
  `base_unit_cost` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `purchase_id` (`purchase_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 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`, `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`, `base_unit_cost`) VALUES (5, NULL, NULL, 4, '', '', 9, '0.0000', '0.0000', 1, '0.0000', NULL, NULL, NULL, NULL, NULL, '0.0000', '-1.0000', '0000-00-00', 'received', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0.0000', NULL, 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 AUTO_INCREMENT=4 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;

#
# 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=2 DEFAULT CHARSET=utf8;

#
# 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,
  `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 DEFAULT CHARSET=utf8;

#
# 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,
  `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,
  `shipping` decimal(25,4) DEFAULT 0.0000,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# 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,
  `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=14 DEFAULT CHARSET=utf8;

#
# 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,
  `payment_method` varchar(55) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

#
# 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 ('046c37c8843b00610111c5e094048f27e5e0670f', '154.159.252.6', 1651427447, '__ci_last_regenerate|i:1651427447;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('04f3c975e8abe1052d93d9ff5df24863345e3318', '41.191.104.95', 1651468477, '__ci_last_regenerate|i:1651468477;identity|s:7:\"charles\";username|s:7:\"charles\";email|s:27:\"charles@techfirmknits.co.ke\";user_id|s:1:\"5\";old_last_login|s:10:\"1651446524\";last_ip|s:13:\"154.159.252.6\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651467161;register_id|s:1:\"7\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-02 02:09:04\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0ae1c0b1dd03b5d2ef17593b612e496efdec7d26', '154.159.252.6', 1651427336, '__ci_last_regenerate|i:1651427336;error|s:119:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>https://techfirmknits.co.ke/pos/admin/login\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0e81f3799e6ee15e9501cb5b25caf3fbac174bdf', '198.55.126.241', 1651423245, '__ci_last_regenerate|i:1651423245;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0fcbbc0dc9fe2fac0f8b560e61fe1e7c8b1bdb5b', '198.55.126.241', 1651423478, '__ci_last_regenerate|i:1651423478;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0ffabe9f3454060bf702d13c87bccf7ae664720c', '154.159.252.6', 1651427752, '__ci_last_regenerate|i:1651427752;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0vmua8jv10md4gklvjj9a5dehk4autt1', '::1', 1637103461, '__ci_last_regenerate|i:1637103173;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637102740\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637103290;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('114f47281942097f7368991209e7f6eddd1d15d1', '198.55.126.241', 1651423205, '__ci_last_regenerate|i:1651423205;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('117aa0b67657eb93bfc6a08c46b57258bab4ee0d', '197.237.214.102', 1651422125, '__ci_last_regenerate|i:1651422125;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1218l18ejh57gakn38nsmofk4pils5fm', '127.0.0.1', 1637091859, '__ci_last_regenerate|i:1637091859;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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 ('12ec68e0ce23c453b472304e9ff2ad18d3d77884', '154.159.252.6', 1651430327, '__ci_last_regenerate|i:1651430327;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('133efdc88c6cfcb238a099afee205d2507cd9828', '197.237.214.102', 1651423080, '__ci_last_regenerate|i:1651423080;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('13a43b15e539d81b9753614a0f99437ed45d194b', '154.159.252.6', 1651444669, '__ci_last_regenerate|i:1651444669;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('15b92190b08bbfa260928decb7bdc889b5fbf510', '198.55.126.241', 1651423869, '');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('172fa2f023f04249d4748efbaae6343a9b9f4015', '154.159.252.6', 1651438642, '__ci_last_regenerate|i:1651438642;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('19a7b764258f35a56b8321cb62af951433d9d308', '154.159.252.6', 1651443984, '__ci_last_regenerate|i:1651443984;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1a7917ffda601c93d2331eb2e7a2e8c2a00b41a6', '154.159.252.6', 1651434777, '__ci_last_regenerate|i:1651434777;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1ab20f3cd6b020514cee353d1811a52acd913843', '154.159.252.168', 1651490499, '__ci_last_regenerate|i:1651490499;identity|s:7:\"wanjiru\";username|s:7:\"wanjiru\";email|s:26:\"wanjiruwangondu3@gmail.com\";user_id|s:1:\"6\";old_last_login|s:10:\"1651490101\";last_ip|N;avatar|N;gender|s:6:\"female\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1f1708c902e54bca72113f0ae1f678f898959cc0', '23.228.131.197', 1651467112, '__ci_last_regenerate|i:1651467112;requested_page|s:9:\"admin/pos\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1gho54g4e6n16tmk0d42pg4hf5b0t02n', '127.0.0.1', 1637098720, '__ci_last_regenerate|i:1637098720;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637098347\";last_ip|N;avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637098693;register_id|s:1:\"3\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-17 00:35:00\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2375561d42f47424a2d4f0b1a5c59f3466523589', '154.159.252.6', 1651444413, '__ci_last_regenerate|i:1651444412;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('26dc61b12f114377a563a7d26d0fc62946aca301', '154.159.252.6', 1651427380, '__ci_last_regenerate|i:1651427380;error|s:119:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>https://techfirmknits.co.ke/pos/admin/login\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('27cb73579b5809d86acd52c383014f3b577e51a7', '154.159.252.6', 1651427330, '__ci_last_regenerate|i:1651427330;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('27fc2acfebe4244cb9932655a0ce2d30288eaec7', '198.55.126.241', 1651423869, 'error|s:128:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>https://techfirmknits.co.ke/pos/shop/products?page=1\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('286eef672ed063061201df228c88d51685a291e5', '154.159.252.6', 1651427330, '__ci_last_regenerate|i:1651427330;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2abf3251f0122f1747ea9f5a1f19345c176853d9', '154.159.252.6', 1651444861, '__ci_last_regenerate|i:1651444861;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2c3bf1db2c3898ee53f1d3c600ff08f8dfd8de93', '154.159.252.6', 1651444860, '__ci_last_regenerate|i:1651444860;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651443983\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";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:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2c5e9ece8a57d202b2891e0ab41fb639dd1c0d6f', '154.159.252.6', 1651427380, '__ci_last_regenerate|i:1651427380;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2hc4lfkvgi9l2dkur8qapdtmb6f6918d', '::1', 1637094896, '__ci_last_regenerate|i:1637094896;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2r2vorkkle34787qo6rracsiqeohjl8h', '127.0.0.1', 1637100759, '__ci_last_regenerate|i:1637100692;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637098347\";last_ip|N;avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637100759;register_id|s:1:\"3\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-17 00:35:00\";user_csrf|s:20:\"U9qGLmn2r7ahIevMQ1k4\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('323a22fd07634244b56e645127abf2992b01366d', '105.163.1.196', 1651470446, '__ci_last_regenerate|i:1651470263;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"JBHmrp5nDAI1RPM9OxG2\";last_activity|i:1651470336;register_id|s:1:\"6\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-01 14:27:58\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('34ceb0cc2d1f68e45120c4a1e12414d2943170cf', '154.159.252.6', 1651444449, '__ci_last_regenerate|i:1651444449;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('35227d662534523c9a652dce5b4d63b2a1137bec', '154.159.252.6', 1651443997, '__ci_last_regenerate|i:1651443997;error|s:37:\"<p>Login Failed, Please try again</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3548i3ngkihs3ofehf577u5736fu3cbk', '127.0.0.1', 1637100692, '__ci_last_regenerate|i:1637100692;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637098347\";last_ip|N;avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637100215;register_id|s:1:\"3\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-17 00:35:00\";user_csrf|s:20:\"U9qGLmn2r7ahIevMQ1k4\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('399731d729f4c5c3c3dbb7bda266c7853b570c3a', '154.159.252.6', 1651427337, '__ci_last_regenerate|i:1651427337;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3acb2f22b9f2eaedb939c4a1806b8b64eda7c04c', '154.159.252.6', 1651444650, '__ci_last_regenerate|i:1651444650;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3fa26240270f77f292b1d69c6fc6c2ad42448763', '154.159.252.6', 1651445046, '__ci_last_regenerate|i:1651445046;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3fe002f9b996f3ca82f72a999c73cb4ca32fc2d0', '154.159.252.6', 1651444668, '__ci_last_regenerate|i:1651444668;error|s:68:\"<p>You have 3 failed login attempts. Please try after 10 minutes</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('450da4457ea1db45867d5f65923eeccf35598a24', '198.55.126.241', 1651423860, '__ci_last_regenerate|i:1651423860;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('489124008e081e04ac1af7709962d4fa604096d3', '198.55.126.241', 1651423239, '__ci_last_regenerate|i:1651423239;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('4a64533398009b5d3d5df7b33272f0dfc6186a3b', '154.159.252.168', 1651490941, '__ci_last_regenerate|i:1651490941;identity|s:7:\"wanjiru\";username|s:7:\"wanjiru\";email|s:26:\"wanjiruwangondu3@gmail.com\";user_id|s:1:\"6\";old_last_login|s:10:\"1651490203\";last_ip|s:15:\"154.159.252.168\";avatar|N;gender|s:6:\"female\";group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"1\";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 ('4d513393437b2a171e214a8b44411fabc62bcab3', '197.237.214.102', 1651421963, '__ci_last_regenerate|i:1651421963;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('569fec6d6cb064fc02949eb106429926149e4a6e', '154.159.252.6', 1651427453, '__ci_last_regenerate|i:1651427452;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('586723e0681db1ed1134ec4597de02a30e282ba2', '154.159.252.6', 1651444396, '__ci_last_regenerate|i:1651444396;error|s:68:\"<p>You have 3 failed login attempts. Please try after 10 minutes</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('58ccae68ead801ea827eece8e43e69372980c45e', '154.159.252.6', 1651443983, '__ci_last_regenerate|i:1651443983;requested_page|s:13:\"admin/welcome\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('5e1e889c61d48c43bd13cea42649b07cd298622f', '154.159.252.6', 1651445045, '__ci_last_regenerate|i:1651445045;requested_page|s:13:\"admin/welcome\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('5ee20da1ecd47d66c3af277cbe1a22434be6c379', '41.191.107.152', 1651434082, '__ci_last_regenerate|i:1651434082;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('5s89seerpfogkkdvel6bgbh3t0v8msls', '127.0.0.1', 1637098447, '__ci_last_regenerate|i:1637098447;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('606c2eb82429a5bbfa9c59e7f004a8a999b692b7', '154.159.252.6', 1651443278, '__ci_last_regenerate|i:1651443278;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('63db4c92df59d5f3b00f5336b486b5551319f114', '105.163.1.196', 1651469326, '__ci_last_regenerate|i:1651469326;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('63ddcbe2e6d50aa0ac4eaa2ff7d35182a4b501f7', '197.237.214.102', 1651424054, '__ci_last_regenerate|i:1651423873;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('68cd654724d815048dd3225f85fc81bbf48a7221', '105.163.2.239', 1651469944, '__ci_last_regenerate|i:1651469944;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"JBHmrp5nDAI1RPM9OxG2\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('69b56fdc20b9792295f06a428b1ade158a1f4a78', '198.55.126.241', 1651423404, '__ci_last_regenerate|i:1651423404;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('6a0ce1777561d5b30ea5c4132a07c49ae683122c', '105.163.1.196', 1651470263, '__ci_last_regenerate|i:1651470263;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"JBHmrp5nDAI1RPM9OxG2\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('6tfbupau9bqf3bik4qc3ulhnvi77rsbr', '::1', 1651400706, '__ci_last_regenerate|i:1651400706;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('744d245179d1924919f2df717e50137a9b4e6abd', '154.159.252.6', 1651443270, '__ci_last_regenerate|i:1651443270;error|s:119:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>https://techfirmknits.co.ke/pos/admin/login\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('7622e81ea7c36e3308fd5eb7c6181a16cc67ebba', '154.159.252.6', 1651444107, '__ci_last_regenerate|i:1651444107;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('76865baeb84e99da40ca3313f8fa3da1b9bfbfde', '154.159.252.6', 1651443270, '__ci_last_regenerate|i:1651443270;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('78e4199ce628c0ebb8a5c27e93d429a4dc7e972c', '154.159.252.6', 1651444449, '__ci_last_regenerate|i:1651444449;error|s:68:\"<p>You have 3 failed login attempts. Please try after 10 minutes</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('7qubpeientlf7dag96bb3gkcgd8k0am7', '::1', 1637094896, '__ci_last_regenerate|i:1637094896;error|s:76:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('7s3dauhet5n3qf958rvf588koole2919', '::1', 1651404536, '__ci_last_regenerate|i:1651404536;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651404510;register_id|s:1:\"6\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-01 14:27:58\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('82cc18272ce8d0b9ea0f177e532997e2561a47bc', '154.159.252.6', 1651445029, '__ci_last_regenerate|i:1651445029;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8dced7ac52a0ff22b9dd4e5ae629cc268bf55518', '198.55.126.241', 1651423396, '__ci_last_regenerate|i:1651423396;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8fda810ec60a642dae183941e4540e675e293c0a', '105.163.1.196', 1651468700, '__ci_last_regenerate|i:1651468700;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('915ace27c443b802110fadb68fe095fe83138876', '154.159.252.6', 1651443585, '__ci_last_regenerate|i:1651443585;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('917b4596bf7c547f8846d43fe85dd5f01234cba4', '64.90.64.197', 1651466953, '__ci_last_regenerate|i:1651466953;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('97b156dff2442e73c9cbfe7e8dbb0a170a1c75ba', '154.159.252.6', 1651444681, '__ci_last_regenerate|i:1651444681;error|s:68:\"<p>You have 3 failed login attempts. Please try after 10 minutes</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9cfc88673148d891182f5befae13f03e091b9e05', '154.159.252.6', 1651445028, '__ci_last_regenerate|i:1651445028;error|s:37:\"<p>Login Failed, Please try again</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9de5c2b4cd1bb6887b34bf721df66eb05bd3fd71', '154.159.252.6', 1651443596, '__ci_last_regenerate|i:1651443596;error|s:37:\"<p>Login Failed, Please try again</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a10f8d66642d0e17fbd2d860e753b4d2a8612f64', '197.237.214.102', 1651421638, '__ci_last_regenerate|i:1651421638;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a4c4f6009ab7d9c39c3c59c1b8838aa2fd55c049', '154.159.252.6', 1651444682, '__ci_last_regenerate|i:1651444682;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a6al1116k973og3cqv3cv35tp1ndn5qe', '::1', 1651403309, '__ci_last_regenerate|i:1651403309;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651402955;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a6f1e9e87a77093a7d37cdbbebd471c0480512d2', '154.159.252.6', 1651427452, '__ci_last_regenerate|i:1651427452;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('aaui47dugj4bsh9eh4ejn0ffu80hbh9p', '::1', 1651403897, '__ci_last_regenerate|i:1651403897;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651403503;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('af23715ca543522f77d4884a9fe28d0b9267ad01', '154.159.252.6', 1651443998, '__ci_last_regenerate|i:1651443998;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ahipr43ol0cdgmdaoiml40ov18g6nqi6', '127.0.0.1', 1637097224, '__ci_last_regenerate|i:1637097224;identity|s:4:\"jane\";username|s:4:\"jane\";email|s:20:\"kimems2030@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1637096806\";last_ip|N;avatar|N;gender|s:6:\"female\";group_id|s:1:\"5\";warehouse_id|s:1:\"1\";view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"3\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";hidden1|i:1;last_activity|i:1637097217;register_id|s:1:\"2\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-17 00:09:37\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b0c42216cd987311f9e2b7c993dfb7abc7ff76a4', '154.159.252.6', 1651446254, '__ci_last_regenerate|i:1651446254;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651445045\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b14f3b0263555d35b5cf367e1a55c7115a52bf1b', '105.163.2.239', 1651469637, '__ci_last_regenerate|i:1651469637;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"ChlHPxEiNUIcBW6vzA2L\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b1ed372005e65200bf0e9774199ab1429204e1af', '154.159.252.6', 1651427283, '__ci_last_regenerate|i:1651427283;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b35b8596edf0e533e32842f417fc673475c2a2dc', '154.159.252.6', 1651443591, '__ci_last_regenerate|i:1651443591;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b42af9a3c0e6778797814b719032fa0560963c80', '154.159.252.6', 1651444397, '__ci_last_regenerate|i:1651444397;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b5ab8a3f6b77477a97bbdf7709e39d96992a2ee3', '154.159.252.6', 1651427342, '__ci_last_regenerate|i:1651427342;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b8d69b12ff8faad95e5da7b1bf64edca6781e846', '154.159.252.6', 1651443277, '__ci_last_regenerate|i:1651443277;error|s:108:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>https://techfirmknits.co.ke/pos/\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('bc3049a6e511b033dd8545470f211f3eb17a391b', '154.159.252.6', 1651444090, '__ci_last_regenerate|i:1651444090;error|s:37:\"<p>Login Failed, Please try again</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('bcef3da26aa5c22244cc099eea0d428c595f5537', '154.159.252.6', 1651418489, '__ci_last_regenerate|i:1651418489;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('bdd1aa497b82707e005a2dd01c681576209656ce', '154.159.252.6', 1651444861, '__ci_last_regenerate|i:1651444861;requested_page|s:13:\"admin/welcome\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c1caee378e5324c1d928cdd33b09b7e28e68ce80', '41.191.104.95', 1651468968, '__ci_last_regenerate|i:1651468966;identity|s:7:\"charles\";username|s:7:\"charles\";email|s:27:\"charles@techfirmknits.co.ke\";user_id|s:1:\"5\";old_last_login|s:10:\"1651446524\";last_ip|s:13:\"154.159.252.6\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651468586;register_id|s:1:\"7\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-02 02:09:04\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c2f4bdf7d6c8d0f9e58e557b378f509987917a2d', '154.159.252.6', 1651443596, '__ci_last_regenerate|i:1651443596;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c3e1dcf57049a354c44fcb903967353b3bd7fad6', '154.159.252.6', 1651434765, '__ci_last_regenerate|i:1651434765;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c52b2bb1f2645a5c16eda611851c9b8e7d326c61', '154.159.252.6', 1651444091, '__ci_last_regenerate|i:1651444091;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c54b47efa3d94e31bf981905468ecc545a734dde', '154.159.252.6', 1651444412, '__ci_last_regenerate|i:1651444412;error|s:68:\"<p>You have 3 failed login attempts. Please try after 10 minutes</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c6affa06e257b7b2d441453a39de5afadcbdd207', '198.55.126.241', 1651423251, '__ci_last_regenerate|i:1651423251;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c9dc7d3bf7c60d30bba403d63a35fc946532577d', '198.55.126.241', 1651423524, '__ci_last_regenerate|i:1651423524;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ccec85081294328530c4a43bd5522f32c4beacb1', '41.191.104.95', 1651479125, '__ci_last_regenerate|i:1651479125;requested_page|s:14:\"admin/products\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ce00c73cf76ca94d9baeaf7059c07ab0fe2cfa68', '154.159.252.6', 1651446962, '__ci_last_regenerate|i:1651446962;identity|s:7:\"charles\";username|s:7:\"charles\";email|s:27:\"charles@techfirmknits.co.ke\";user_id|s:1:\"5\";old_last_login|s:10:\"1651446130\";last_ip|N;avatar|N;gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651446631;register_id|s:1:\"7\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-02 02:09:04\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ceb1543bab1b6a9eb60edf0f72bb037c2d849867', '198.55.126.241', 1651423865, '__ci_last_regenerate|i:1651423865;requested_page|s:13:\"shop/products\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('cfcceb9473356d953c255a0fdfcbc93a03fe8055', '154.159.252.6', 1651443249, '__ci_last_regenerate|i:1651443249;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d5eec1990e6f3a50a286b880646f5057a438cdc1', '154.159.252.6', 1651427302, '__ci_last_regenerate|i:1651427302;error|s:119:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>https://techfirmknits.co.ke/pos/admin/login\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d89094387aa922d3e730698acecdf1fbc21277d2', '154.159.252.6', 1651430315, '__ci_last_regenerate|i:1651430315;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('db6217c1ba6c5ebd81c925e7327d343d963d06aa', '154.159.252.6', 1651434766, '__ci_last_regenerate|i:1651434766;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('df63vmbrclgop4voh63j75vodan7q9ai', '127.0.0.1', 1637095457, '__ci_last_regenerate|i:1637095457;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637095442;user_csrf|s:20:\"hHjYd5GvVJ1gL6lkzDUT\";register_id|s:1:\"1\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-16 23:36:08\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('dpq60e5lcs9604c0cnmdfdt7dg35fbrg', '127.0.0.1', 1637092491, '__ci_last_regenerate|i:1637092491;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637092410;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e000aa46369620873832c417771773adbabefbe3', '197.237.214.102', 1651423873, '__ci_last_regenerate|i:1651423873;requested_page|s:4:\"cart\";reminder|s:65:\"Shopping cart is empty, please add item and visit the page again.\";__ci_vars|a:1:{s:8:\"reminder\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e23ff8c5011991cd730b681a8105089467ba34bc', '154.159.252.6', 1651444107, '__ci_last_regenerate|i:1651444107;error|s:37:\"<p>Login Failed, Please try again</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e89a4ab9ecf46e03c626697dffd5dd30b023d62a', '197.237.214.102', 1651423084, '__ci_last_regenerate|i:1651423084;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('eac8f8e78b4180d0b0db457ad10fb7f9b912afae', '41.191.104.95', 1651468966, '__ci_last_regenerate|i:1651468966;identity|s:7:\"charles\";username|s:7:\"charles\";email|s:27:\"charles@techfirmknits.co.ke\";user_id|s:1:\"5\";old_last_login|s:10:\"1651446524\";last_ip|s:13:\"154.159.252.6\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651468586;register_id|s:1:\"7\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-02 02:09:04\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f113c2a8fff4235fd7baac97352d6910833d9a0f', '154.159.252.6', 1651447039, '__ci_last_regenerate|i:1651446962;identity|s:7:\"charles\";username|s:7:\"charles\";email|s:27:\"charles@techfirmknits.co.ke\";user_id|s:1:\"5\";old_last_login|s:10:\"1651446130\";last_ip|N;avatar|N;gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651446631;register_id|s:1:\"7\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-02 02:09:04\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f119a6052cb0e52a1b208cda9aa49ae9a8235911', '154.159.252.6', 1651430528, '__ci_last_regenerate|i:1651430528;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f23e61fa851f69c414cf0661678df6a6d8bd5590', '154.159.252.6', 1651443983, '__ci_last_regenerate|i:1651443983;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651406767\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";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:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f328b19d1b0c6f700ebfccc5a61f462eb6982e0d', '154.159.252.168', 1651489517, '__ci_last_regenerate|i:1651489248;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f4eb3f3e973f0631433830e9dc407044def12e5c', '154.159.252.6', 1651427302, '__ci_last_regenerate|i:1651427302;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f83195d13a7135df7b2be9ea8aff05b366ef788e', '154.159.252.6', 1651443591, '__ci_last_regenerate|i:1651443591;error|s:37:\"<p>Login Failed, Please try again</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f8459f5215cc1b61c97e89ea5494517181feca75', '105.163.2.239', 1651469001, '__ci_last_regenerate|i:1651469001;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651446446\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f8ac265e2f330050721a6843ab79ca22204c24d0', '154.159.252.6', 1651430315, '__ci_last_regenerate|i:1651430315;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('fa94eafb24572b9ac7a8a1a2457b0f295aecc0cd', '154.159.252.6', 1651445045, '__ci_last_regenerate|i:1651445045;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651444860\";last_ip|s:13:\"154.159.252.6\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";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:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('fc14a6ec57845ed43e7764803026001a37102d75', '154.159.252.168', 1651491170, '__ci_last_regenerate|i:1651490941;identity|s:7:\"wanjiru\";username|s:7:\"wanjiru\";email|s:26:\"wanjiruwangondu3@gmail.com\";user_id|s:1:\"6\";old_last_login|s:10:\"1651490203\";last_ip|s:15:\"154.159.252.168\";avatar|N;gender|s:6:\"female\";group_id|s:1:\"1\";warehouse_id|N;view_right|s:1:\"1\";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 ('fcb7a23e603833497ab5b343859a2b2fc22c6843', '41.191.104.95', 1651466951, '__ci_last_regenerate|i:1651466951;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('fcn691k5lhjp4sa21u589ehqojjlkid2', '127.0.0.1', 1637091848, '__ci_last_regenerate|i:1637091848;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ffimsmiokqobgkars9a0q5akd5idko12', '::1', 1651404224, '__ci_last_regenerate|i:1651404224;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651403897;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ftd9rg1tv4vsngusk3bg5dsumd5irmk6', '127.0.0.1', 1637093625, '__ci_last_regenerate|i:1637093625;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637093129;user_csrf|s:20:\"qBRiL1z5vHNpTG2eVoW3\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('g0dvjg6s11265a59dvf2qj1s6ve458ds', '127.0.0.1', 1637092183, '__ci_last_regenerate|i:1637092183;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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 ('g56813dvh6ar28dchsr78akek1oqam91', '127.0.0.1', 1637095119, '__ci_last_regenerate|i:1637095119;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637095001;user_csrf|s:20:\"hHjYd5GvVJ1gL6lkzDUT\";register_id|s:1:\"1\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-16 23:36:08\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('hd24r7bvsl2taq7mofk8q6lsvhtehhbn', '::1', 1637094893, '__ci_last_regenerate|i:1637094893;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ifgsga7e78uscq9nshkcmtkkt2cj3fu8', '127.0.0.1', 1637094062, '__ci_last_regenerate|i:1637094062;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637093129;user_csrf|s:20:\"qBRiL1z5vHNpTG2eVoW3\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('j247qs8pp8fgngp3u1u41degc5a0h5f5', '::1', 1637094893, '__ci_last_regenerate|i:1637094893;error|s:76:\"<h4>404 Not Found!</h4><p>The page you are looking for can not be found.</p>\";__ci_vars|a:1:{s:5:\"error\";s:3:\"new\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('jui5kofv22qjm6st26rh9q9pgh62v7el', '::1', 1637102593, '__ci_last_regenerate|i:1637102593;identity|s:4:\"jane\";username|s:4:\"jane\";email|s:20:\"kimems2030@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1637096914\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:6:\"female\";group_id|s:1:\"5\";warehouse_id|s:1:\"1\";view_right|s:1:\"0\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"3\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637102576;register_id|s:1:\"4\";cash_in_hand|s:10:\"10000.0000\";register_open_time|s:19:\"2021-11-17 01:38:24\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('krak05i95i0lo2a3e9p5subpjsksavgn', '127.0.0.1', 1637092792, '__ci_last_regenerate|i:1637092792;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637092530;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('l16ic17un5fi2ujq3umovkgalr2p2vqe', '::1', 1651402955, '__ci_last_regenerate|i:1651402955;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651400769;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('lfid1agrvhuck7e8er13r3ifk0c8gf5p', '127.0.0.1', 1637100379, '__ci_last_regenerate|i:1637100379;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637098347\";last_ip|N;avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637100215;register_id|s:1:\"3\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-17 00:35:00\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('lhq48ujdet6nr7cvsit5l5n2jo4bhp6u', '::1', 1651406750, '__ci_last_regenerate|i:1651406750;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637103205\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1651404609;register_id|s:1:\"6\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2022-05-01 14:27:58\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('m49sbdrn1c1n1vkhppg667pccg9rhmd4', '127.0.0.1', 1637096016, '__ci_last_regenerate|i:1637096016;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637096000;user_csrf|s:20:\"hHjYd5GvVJ1gL6lkzDUT\";register_id|s:1:\"1\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-16 23:36:08\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('mc4po38ciibd7uenhsafubkr1tm938lc', '127.0.0.1', 1637093095, '__ci_last_regenerate|i:1637093095;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637092993;user_csrf|s:20:\"qBRiL1z5vHNpTG2eVoW3\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('mgjfmen2bmm4iuetj9tg3r730kucbk72', '::1', 1651406782, '__ci_last_regenerate|i:1651406759;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1651399880\";last_ip|s:3:\"::1\";avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('oni36pj1ksia5fbe19glev8h6t3rsgf4', '127.0.0.1', 1637094766, '__ci_last_regenerate|i:1637094766;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637093129;user_csrf|s:20:\"aFfRmOD79zMLJTAnsyqj\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('p15j6op5ciikm3ndq4tprigm06k32i88', '127.0.0.1', 1637097805, '__ci_last_regenerate|i:1637097805;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1637091626\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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\";user_csrf|s:20:\"HCqEJc4eRbLyWSKUPYko\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('rsli0h8ib8nkd8fj8gslisgrscopmg1h', '127.0.0.1', 1637096317, '__ci_last_regenerate|i:1637096317;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637096016;user_csrf|s:20:\"hHjYd5GvVJ1gL6lkzDUT\";register_id|s:1:\"1\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-16 23:36:08\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('s2066abkfcv6onqvfj4t6pgmbq7chm71', '127.0.0.1', 1637100063, '__ci_last_regenerate|i:1637100063;identity|s:18:\"kimems01@gmail.com\";username|s:6:\"kimems\";email|s:18:\"kimems01@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1637098347\";last_ip|N;avatar|s:36:\"a557d510090c1cd90048dde610fc6ca6.png\";gender|s:4:\"male\";group_id|s:1:\"1\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1637098693;register_id|s:1:\"3\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-17 00:35:00\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('tivdi7qnagsgfg72bvlufr4144d3apus', '127.0.0.1', 1637096687, '__ci_last_regenerate|i:1637096687;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637096016;user_csrf|s:20:\"hHjYd5GvVJ1gL6lkzDUT\";register_id|s:1:\"1\";cash_in_hand|s:6:\"0.0000\";register_open_time|s:19:\"2021-11-16 23:36:08\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ubqudca9r3k17hgee7q47g7obf0g4bip', '127.0.0.1', 1637094378, '__ci_last_regenerate|i:1637094378;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1426618492\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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:1637093129;user_csrf|s:20:\"qBRiL1z5vHNpTG2eVoW3\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ueaalijr5cetrct8f41dih8pmm4r4uud', '127.0.0.1', 1637098107, '__ci_last_regenerate|i:1637098107;identity|s:18:\"owner@tecdiary.com\";username|s:5:\"owner\";email|s:18:\"owner@tecdiary.com\";user_id|s:1:\"1\";old_last_login|s:10:\"1637091626\";last_ip|s:9:\"127.0.0.1\";avatar|N;gender|s:4:\"male\";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\";user_csrf|s:20:\"HCqEJc4eRbLyWSKUPYko\";last_activity|i:1637098075;__ci_vars|a:1:{s:7:\"message\";s:3:\"old\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ui9u3b5rtjevgfgjlpgl2ovc9u62p9n7', '::1', 1637094895, '__ci_last_regenerate|i:1637094895;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('vh04sdkq7aujklovkv6ogp6nlnl2f6c2', '::1', 1637094893, '__ci_last_regenerate|i:1637094892;');


#
# 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',
  `use_code_for_slug` tinyint(1) DEFAULT NULL,
  `ws_barcode_type` varchar(10) DEFAULT 'weight',
  `ws_barcode_chars` tinyint(4) DEFAULT NULL,
  `flag_chars` tinyint(4) DEFAULT NULL,
  `item_code_start` tinyint(4) DEFAULT NULL,
  `item_code_chars` tinyint(4) DEFAULT NULL,
  `price_start` tinyint(4) DEFAULT NULL,
  `price_chars` tinyint(4) DEFAULT NULL,
  `price_divide_by` int(11) DEFAULT NULL,
  `weight_start` tinyint(4) DEFAULT NULL,
  `weight_chars` tinyint(4) DEFAULT NULL,
  `weight_divide_by` int(11) DEFAULT NULL,
  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`, `use_code_for_slug`, `ws_barcode_type`, `ws_barcode_chars`, `flag_chars`, `item_code_start`, `item_code_chars`, `price_start`, `price_chars`, `price_divide_by`, `weight_start`, `weight_chars`, `weight_divide_by`) VALUES (1, 'Tech-Firm_Logo.png', 'Tech-Firm_Logo1.png', 'Tech-Firm Knits', 'english', 1, 2, 'Kes', 1, 10, '3.4.47', 1, 4, 'SALE', 'QUOTE', 'PO', 'TR', 'DO', 'IPAY', 'SR', 'PR', '', 0, 'default', 1, 1, 1, 1, 1, 1, 1, 1, 0, 'Africa/Nairobi', 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, 'info@techfirmknits.com', 0, 4, 1, 0, 2, 1, 1, 0, 2, 2, '.', ',', 0, 3, 'nullmaster@babiato.co', 'Nullmaster01', 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '', 0, '-', 0, 1, 1, 'POP', 90, '', 0, 0, 'AN', 'dompdf', 0, 'weight', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);


#
# TABLE STRUCTURE FOR: sma_shop_settings
#

DROP TABLE IF EXISTS `sma_shop_settings`;

CREATE TABLE `sma_shop_settings` (
  `shop_id` int(11) NOT NULL,
  `shop_name` varchar(55) NOT NULL,
  `description` varchar(160) NOT NULL,
  `warehouse` int(11) NOT NULL,
  `biller` int(11) NOT NULL,
  `about_link` varchar(55) NOT NULL,
  `terms_link` varchar(55) NOT NULL,
  `privacy_link` varchar(55) NOT NULL,
  `contact_link` varchar(55) NOT NULL,
  `payment_text` varchar(100) NOT NULL,
  `follow_text` varchar(100) NOT NULL,
  `facebook` varchar(55) NOT NULL,
  `twitter` varchar(55) DEFAULT NULL,
  `google_plus` varchar(55) DEFAULT NULL,
  `instagram` varchar(55) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `email` varchar(55) DEFAULT NULL,
  `cookie_message` varchar(180) DEFAULT NULL,
  `cookie_link` varchar(55) DEFAULT NULL,
  `slider` text DEFAULT NULL,
  `shipping` int(11) DEFAULT NULL,
  `purchase_code` varchar(100) DEFAULT 'purchase_code',
  `envato_username` varchar(50) DEFAULT 'envato_username',
  `version` varchar(10) DEFAULT '3.4.47',
  `logo` varchar(55) DEFAULT NULL,
  `bank_details` varchar(255) DEFAULT NULL,
  `products_page` tinyint(1) DEFAULT NULL,
  `hide0` tinyint(1) DEFAULT 0,
  `products_description` varchar(255) DEFAULT NULL,
  `private` tinyint(1) DEFAULT 0,
  `hide_price` tinyint(1) DEFAULT 0,
  `stripe` tinyint(1) DEFAULT 0,
  PRIMARY KEY (`shop_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `sma_shop_settings` (`shop_id`, `shop_name`, `description`, `warehouse`, `biller`, `about_link`, `terms_link`, `privacy_link`, `contact_link`, `payment_text`, `follow_text`, `facebook`, `twitter`, `google_plus`, `instagram`, `phone`, `email`, `cookie_message`, `cookie_link`, `slider`, `shipping`, `purchase_code`, `envato_username`, `version`, `logo`, `bank_details`, `products_page`, `hide0`, `products_description`, `private`, `hide_price`, `stripe`) VALUES (1, 'Tech-Firm Knits', 'Tech-Firm Knits Online sales', 1, 3, '', '', '', '', 'We accept PayPal or you can pay with your credit/debit cards.', 'Please click the link below to follow us on social media.', 'http://facebook.com/feastersbar', 'http://twitter.com/feastersbar', '', '', '0723759494', 'kimems01@gmail.com', 'We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.', '', '[{\"image\":\"19d75966bae634225fad38ab848d743a.jpg\",\"link\":\"http:\\/\\/ci.dev\\/sma\\/shop\\/products\",\"caption\":\"\"},{\"image\":\"049c1dcf651171726b2e8621529de1ce.jpg\",\"link\":\"\",\"caption\":\"\"},{\"image\":\"80f518343d5d8a66d5db6e43aa556370.jpg\",\"link\":\"\",\"caption\":\"\"},{\"image\":\"24144e13a45389170ab9b81c3524b291.jpg\",\"link\":\"\",\"caption\":\"\"},{\"image\":\"484191627458ee94e8f0b2b60b2e5dba.jpg\",\"link\":\"\",\"caption\":\"\"}]', 0, '', 'envato_username', '3.4.47', 'Tech-Firm_Logo3.png', '', 0, 1, 'Embroidery and Knits', 0, 0, 0);


#
# 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_settings
#

DROP TABLE IF EXISTS `sma_sms_settings`;

CREATE TABLE `sma_sms_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `auto_send` tinyint(1) DEFAULT NULL,
  `config` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_sms_settings` (`id`, `auto_send`, `config`) VALUES (1, NULL, '{\"gateway\":\"Log\",\"Log\":{}');


#
# 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,
  `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 DEFAULT NULL,
  `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`, `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, '2021-11-17 00:20:00', '234', 1, 'full', '133f21bd861ebdedee65e3e9d6cca531.csv', NULL, '', '', '', '', NULL, 2, 2, NULL, NULL, NULL, 1, NULL, NULL, 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=5 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, '2021-11-16 23:45:13', 1, 'Walk-in Customer', 7, '', 1, '1260.0000', 3, 1, 1, 'peter', '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 AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (6, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (7, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (8, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (9, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (10, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (11, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);
INSERT INTO `sma_suspended_items` (`id`, `suspend_id`, `product_id`, `product_code`, `product_name`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `option_id`, `product_type`, `real_unit_price`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`, `gst`, `cgst`, `sgst`, `igst`) VALUES (12, 1, 2, 'PilsnerLager500ML', 'Pilsner Lager 500 ML', '180.0000', '180.0000', '1.0000', 1, '0.0000', 1, '0', '0', '0.0000', '180.0000', '', 5, 'standard', '180.0000', 1, 'pc', '1.0000', '', NULL, NULL, NULL, NULL);


#
# 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=5 DEFAULT CHARSET=utf8;

INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES (4, 'Pc', 'Pieces', 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=28 DEFAULT CHARSET=utf8;

INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (1, 1, NULL, '127.0.0.1', 'owner@tecdiary.com', '2021-11-16 22:40:26');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (2, 2, NULL, '127.0.0.1', 'jane', '2021-11-17 00:08:34');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (3, 1, NULL, '127.0.0.1', 'owner@tecdiary.com', '2021-11-17 00:18:13');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (4, 1, NULL, '127.0.0.1', 'owner@tecdiary.com', '2021-11-17 00:31:15');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (5, 3, NULL, '127.0.0.1', 'kimems01@gmail.com', '2021-11-17 00:33:37');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (6, 3, NULL, '::1', 'kimems01@gmail.com', '2021-11-17 01:36:02');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (7, 2, NULL, '::1', 'jane', '2021-11-17 01:37:45');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (8, 3, NULL, '::1', 'kimems01@gmail.com', '2021-11-17 01:45:40');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (9, 4, NULL, '::1', 'peter', '2021-11-17 01:50:13');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (10, 3, NULL, '::1', 'kimems01@gmail.com', '2021-11-17 01:53:25');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (11, 3, NULL, '::1', 'kimems01@gmail.com', '2022-05-01 13:11:20');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (12, 3, NULL, '::1', 'kimems01@gmail.com', '2022-05-01 15:06:07');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (13, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 01:26:23');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (14, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 01:41:00');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (15, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 01:44:05');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (16, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 01:59:23');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (17, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 02:05:32');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (18, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 02:06:34');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (19, 3, NULL, '154.159.252.6', 'kimems01@gmail.com', '2022-05-02 02:07:26');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (20, 5, NULL, '154.159.252.6', 'Charles', '2022-05-02 02:08:44');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (21, 5, NULL, '41.191.104.95', 'Charles', '2022-05-02 07:49:47');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (22, 3, NULL, '105.163.2.239', 'kimems01@gmail.com', '2022-05-02 08:12:11');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (23, 3, NULL, '154.159.252.168', 'kimems01@gmail.com', '2022-05-02 14:09:52');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (24, 3, NULL, '154.159.252.168', 'kimems01@gmail.com', '2022-05-02 14:11:38');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (25, 6, NULL, '154.159.252.168', 'wanjiru', '2022-05-02 14:16:43');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (26, 3, NULL, '154.159.252.168', 'kimems01@gmail.com', '2022-05-02 14:22:39');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (27, 6, NULL, '154.159.252.168', 'wanjiru', '2022-05-02 14:23:16');


#
# 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,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`,`warehouse_id`,`biller_id`),
  KEY `group_id_2` (`group_id`,`company_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 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`) VALUES (3, '154.159.252.168', '127.0.0.1', 'kimems', 'a4986cd5bc599e2709247e58c8dd012f7df8d566', NULL, 'kimems01@gmail.com', NULL, NULL, NULL, '085b04d511f1bb2a2c8b0d516ced82d4a28232bf', 1637098347, 1651490559, 1, 'James', 'Kimemia', 'Livecode Solutions LTD', '254723759494', 'a557d510090c1cd90048dde610fc6ca6.png', 'male', 1, 0, 0, NULL, 0, 0, 0, 1, 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`) VALUES (5, '41.191.104.95', '154.159.252.6', 'charles', 'd063e3fb14042b2ec6e09b6e11089438bdfcfc07', NULL, 'charles@techfirmknits.co.ke', NULL, NULL, NULL, NULL, 1651446130, 1651466987, 1, 'Charles', 'Githinji', 'Tech-Firm Knits', '+254723077207', NULL, 'male', 1, 0, 0, NULL, 0, 0, 0, 1, 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`) VALUES (6, '154.159.252.168', '154.159.252.168', 'wanjiru', '14fde85b3e12079b07a1350b6f33714531161b14', NULL, 'wanjiruwangondu3@gmail.com', NULL, NULL, NULL, NULL, 1651490101, 1651490596, 1, 'pasqualine', 'wanjiru', 'techfirm', '0791949499', NULL, 'female', 1, NULL, NULL, NULL, 0, 0, 0, 1, 0, 0);


#
# 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 AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

INSERT INTO `sma_variants` (`id`, `name`) VALUES (4, 'RED');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (5, 'MAROON');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (6, 'GREEN');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (7, 'BEIGE');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (8, 'GREY');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (9, 'R/BLUE');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (10, 'N/BLUE');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (11, 'BLACK');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (12, 'AZURE');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (13, 'BROWN');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (14, 'PURPLW');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (15, 'NDENGU');


#
# 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=3 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses` (`id`, `code`, `name`, `address`, `map`, `phone`, `email`, `price_group_id`) VALUES (1, 'WHI', 'Main Counter', '<p>Address, City</p>', NULL, '012345678', 'info@techfirmknites.com', 1);


#
# 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=12 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (6, 2, 1, '0.0000', NULL, '130.0000');
INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (7, 1, 1, '0.0000', NULL, '243.3333');
INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (8, 3, 1, '0.0000', NULL, '3500.0000');
INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (10, 5, 1, '0.0000', NULL, '300.0000');
INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES (11, 6, 1, '0.0000', NULL, '0.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 AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses_products_variants` (`id`, `option_id`, `product_id`, `warehouse_id`, `quantity`, `rack`) VALUES (3, 1, 1, 1, '0.0000', NULL);
INSERT INTO `sma_warehouses_products_variants` (`id`, `option_id`, `product_id`, `warehouse_id`, `quantity`, `rack`) VALUES (7, 12, 5, 1, '0.0000', NULL);
INSERT INTO `sma_warehouses_products_variants` (`id`, `option_id`, `product_id`, `warehouse_id`, `quantity`, `rack`) VALUES (8, 13, 5, 1, '0.0000', NULL);
INSERT INTO `sma_warehouses_products_variants` (`id`, `option_id`, `product_id`, `warehouse_id`, `quantity`, `rack`) VALUES (9, 14, 5, 1, '0.0000', NULL);


#
# TABLE STRUCTURE FOR: sma_wishlist
#

DROP TABLE IF EXISTS `sma_wishlist`;

CREATE TABLE `sma_wishlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

