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

#
# TABLE STRUCTURE FOR: sma_calendar
#

DROP TABLE IF EXISTS `sma_calendar`;

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

#
# TABLE STRUCTURE FOR: sma_captcha
#

DROP TABLE IF EXISTS `sma_captcha`;

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

#
# TABLE STRUCTURE FOR: sma_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,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`) VALUES ('1', 'C1', 'Category 1', NULL, NULL);


#
# 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) NOT NULL,
  `city` varchar(55) NOT NULL,
  `state` varchar(55) DEFAULT NULL,
  `postal_code` varchar(8) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `phone` varchar(20) NOT NULL,
  `email` varchar(100) NOT NULL,
  `cf1` varchar(100) DEFAULT NULL,
  `cf2` varchar(100) DEFAULT NULL,
  `cf3` varchar(100) DEFAULT NULL,
  `cf4` varchar(100) DEFAULT NULL,
  `cf5` varchar(100) DEFAULT NULL,
  `cf6` varchar(100) DEFAULT NULL,
  `invoice_footer` text,
  `payment_term` int(11) DEFAULT '0',
  `logo` varchar(255) DEFAULT 'logo.png',
  `award_points` int(11) DEFAULT '0',
  `deposit_amount` decimal(25,4) DEFAULT NULL,
  `price_group_id` int(11) DEFAULT NULL,
  `price_group_name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`),
  KEY `group_id_2` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 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`) VALUES ('1', '3', 'customer', '1', 'General', 'Walk-in Customer', 'Walk-in Customer', '', 'Customer Address', 'Higurakkgoda', '', '', '', '', '', '', '', '', '', '', '', 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`) VALUES ('2', '4', 'supplier', NULL, NULL, 'Test Supplier', 'Supplier Company Name', '', 'Supplier Address', 'colombo', '', '46050', 'Malaysia', '0123456789', '', '-', '-', '-', '-', '-', '-', 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`) VALUES ('3', NULL, 'biller', NULL, NULL, 'chaminda', 'Mayura Stores', '', 'main road,', 'Higurakkgoda', '', '', '', '0123456789', '', '', '', '', '', '', '', ' Thank you for shopping with us. Please come again', '0', 'logo1.png', '0', NULL, NULL, NULL);
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`) VALUES ('4', '3', 'customer', '1', 'General', 'sarath', 'KTT', '', 'higurakkgoda', 'polonnaruwa', '', '', '', '', '', '', '', '', '', '', '', NULL, '0', 'logo.png', '0', NULL, '1', 'Default');
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`) VALUES ('5', '4', 'supplier', NULL, NULL, 'kamal', 'munchi', '', 'Kurunagala', 'Higurakkgoda', '', '', '', '0123456789', '', '', '', '', '', '', '', NULL, '0', 'logo.png', '0', NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_costing
#

DROP TABLE IF EXISTS `sma_costing`;

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

INSERT INTO `sma_costing` (`id`, `date`, `product_id`, `sale_item_id`, `sale_id`, `purchase_item_id`, `quantity`, `purchase_net_unit_cost`, `purchase_unit_cost`, `sale_net_unit_price`, `sale_unit_price`, `quantity_balance`, `inventory`, `overselling`, `option_id`) VALUES ('1', '2017-03-05', '1', '1', '1', '1', '1.0000', '85.0000', '85.0000', '100.0000', '100.0000', '49.0000', '1', '0', NULL);
INSERT INTO `sma_costing` (`id`, `date`, `product_id`, `sale_item_id`, `sale_id`, `purchase_item_id`, `quantity`, `purchase_net_unit_cost`, `purchase_unit_cost`, `sale_net_unit_price`, `sale_unit_price`, `quantity_balance`, `inventory`, `overselling`, `option_id`) VALUES ('3', '2017-03-08', '1', '3', '3', '1', '1.0000', '85.0000', '85.0000', '100.0000', '100.0000', '48.0000', '1', '0', NULL);


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

INSERT INTO `sma_currencies` (`id`, `code`, `name`, `rate`, `auto_update`) VALUES ('1', 'Rs.', 'Sri Lankan Rupee', '1.0000', '0');


#
# TABLE STRUCTURE FOR: sma_customer_groups
#

DROP TABLE IF EXISTS `sma_customer_groups`;

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

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


#
# TABLE STRUCTURE FOR: sma_date_format
#

DROP TABLE IF EXISTS `sma_date_format`;

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

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


#
# TABLE STRUCTURE FOR: sma_deliveries
#

DROP TABLE IF EXISTS `sma_deliveries`;

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

#
# TABLE STRUCTURE FOR: sma_deposits
#

DROP TABLE IF EXISTS `sma_deposits`;

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

#
# TABLE STRUCTURE FOR: sma_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=6 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');


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

#
# TABLE STRUCTURE FOR: sma_migrations
#

DROP TABLE IF EXISTS `sma_migrations`;

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

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


#
# TABLE STRUCTURE FOR: sma_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;

INSERT INTO `sma_notifications` (`id`, `comment`, `date`, `from_date`, `till_date`, `scope`) VALUES ('1', '<p>\r\n <strong>Wenmark Lanka POS system<br></strong></p><p>\r\n Contact : 0774560266/0758385872 | <a href=\"http://www.webmarklanka.com\">www.webmarklanka.com</a> | webmarklanka@gmail.com</p>', '2014-08-15 06:00:57', '2017-03-01 00:00:00', '2021-03-01 00:00:00', '3');


#
# 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', '3', '1', '2', '1', '2', '1', '2', '1', '1', '1', '1', '1');


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

INSERT INTO `sma_payments` (`id`, `date`, `sale_id`, `return_id`, `purchase_id`, `reference_no`, `transaction_id`, `paid_by`, `cheque_no`, `cc_no`, `cc_holder`, `cc_month`, `cc_year`, `cc_type`, `amount`, `currency`, `created_by`, `attachment`, `type`, `note`, `pos_paid`, `pos_balance`, `approval_code`) VALUES ('1', '2017-03-05 16:30:08', '1', NULL, NULL, 'IPAY/2017/03/0001', NULL, 'cash', '', '', '', '', '', '', '100.0000', NULL, '1', NULL, 'received', '', '200.0000', '100.0000', NULL);


#
# TABLE STRUCTURE FOR: sma_paypal
#

DROP TABLE IF EXISTS `sma_paypal`;

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

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


#
# TABLE STRUCTURE FOR: sma_permissions
#

DROP TABLE IF EXISTS `sma_permissions`;

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


#
# TABLE STRUCTURE FOR: sma_pos_register
#

DROP TABLE IF EXISTS `sma_pos_register`;

CREATE TABLE `sma_pos_register` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user_id` int(11) NOT NULL,
  `cash_in_hand` decimal(25,4) NOT NULL,
  `status` varchar(10) NOT NULL,
  `total_cash` decimal(25,4) DEFAULT NULL,
  `total_cheques` int(11) DEFAULT NULL,
  `total_cc_slips` int(11) DEFAULT NULL,
  `total_cash_submitted` decimal(25,4) DEFAULT NULL,
  `total_cheques_submitted` int(11) DEFAULT NULL,
  `total_cc_slips_submitted` int(11) DEFAULT NULL,
  `note` text,
  `closed_at` timestamp NULL DEFAULT NULL,
  `transfer_opened_bills` varchar(50) DEFAULT NULL,
  `closed_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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', '2017-03-05 00:03:41', '1', '2000.0000', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sma_pos_register` (`id`, `date`, `user_id`, `cash_in_hand`, `status`, `total_cash`, `total_cheques`, `total_cc_slips`, `total_cash_submitted`, `total_cheques_submitted`, `total_cc_slips_submitted`, `note`, `closed_at`, `transfer_opened_bills`, `closed_by`) VALUES ('2', '2017-03-09 01:12:32', '2', '2000.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.0.2.23',
  `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,
  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`) VALUES ('1', '22', '20', '1', '1', '3', '1', '', '', '', '', '1', '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', NULL, 'purchase_code', 'envato_username', '3.0.2.24', '0', '0', '0', '', '0', '1', 'null', '1', '0');


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

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


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

INSERT INTO `sma_printers` (`id`, `title`, `type`, `profile`, `char_per_line`, `path`, `ip_address`, `port`) VALUES ('1', 'EPSON', 'windows', 'simple', '20', 'smb://SUJITH-PC/EPSON TM-T82 Receipt', '', NULL);


#
# TABLE STRUCTURE FOR: sma_product_photos
#

DROP TABLE IF EXISTS `sma_product_photos`;

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

#
# TABLE STRUCTURE FOR: sma_product_prices
#

DROP TABLE IF EXISTS `sma_product_prices`;

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

INSERT INTO `sma_product_prices` (`id`, `product_id`, `price_group_id`, `price`) VALUES ('1', '1', '1', '150.0000');
INSERT INTO `sma_product_prices` (`id`, `product_id`, `price_group_id`, `price`) VALUES ('2', '1', '2', '90.0000');


#
# TABLE STRUCTURE FOR: sma_product_variants
#

DROP TABLE IF EXISTS `sma_product_variants`;

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

#
# 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` char(255) NOT NULL,
  `unit` int(11) DEFAULT NULL,
  `cost` decimal(25,4) DEFAULT NULL,
  `price` decimal(25,4) NOT NULL,
  `alert_quantity` decimal(15,4) DEFAULT '20.0000',
  `image` varchar(255) DEFAULT 'no_image.png',
  `category_id` int(11) NOT NULL,
  `subcategory_id` int(11) DEFAULT NULL,
  `cf1` varchar(255) DEFAULT NULL,
  `cf2` varchar(255) DEFAULT NULL,
  `cf3` varchar(255) DEFAULT NULL,
  `cf4` varchar(255) DEFAULT NULL,
  `cf5` varchar(255) DEFAULT NULL,
  `cf6` varchar(255) DEFAULT NULL,
  `quantity` decimal(15,4) DEFAULT '0.0000',
  `tax_rate` int(11) DEFAULT NULL,
  `track_quantity` tinyint(1) DEFAULT '1',
  `details` varchar(1000) DEFAULT NULL,
  `warehouse` int(11) DEFAULT NULL,
  `barcode_symbology` varchar(55) NOT NULL DEFAULT 'code128',
  `file` varchar(100) DEFAULT NULL,
  `product_details` text,
  `tax_method` tinyint(1) DEFAULT '0',
  `type` varchar(55) NOT NULL DEFAULT 'standard',
  `supplier1` int(11) DEFAULT NULL,
  `supplier1price` decimal(25,4) DEFAULT NULL,
  `supplier2` int(11) DEFAULT NULL,
  `supplier2price` decimal(25,4) DEFAULT NULL,
  `supplier3` int(11) DEFAULT NULL,
  `supplier3price` decimal(25,4) DEFAULT NULL,
  `supplier4` int(11) DEFAULT NULL,
  `supplier4price` decimal(25,4) DEFAULT NULL,
  `supplier5` int(11) DEFAULT NULL,
  `supplier5price` decimal(25,4) DEFAULT NULL,
  `promotion` tinyint(1) DEFAULT '0',
  `promo_price` decimal(25,4) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `supplier1_part_no` varchar(50) DEFAULT NULL,
  `supplier2_part_no` varchar(50) DEFAULT NULL,
  `supplier3_part_no` varchar(50) DEFAULT NULL,
  `supplier4_part_no` varchar(50) DEFAULT NULL,
  `supplier5_part_no` varchar(50) DEFAULT NULL,
  `sale_unit` int(11) DEFAULT NULL,
  `purchase_unit` int(11) DEFAULT NULL,
  `brand` int(11) DEFAULT NULL,
  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=2 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`) VALUES ('1', '63581591', 'munchi mari', '1', '85.0000', '100.0000', '0.0000', 'no_image.png', '1', NULL, '', '', '', '', '', '', '98.0000', '1', '1', '', NULL, 'code128', '', '', '0', 'standard', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, '1', '1', '0');


#
# 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,
  PRIMARY KEY (`id`),
  KEY `purchase_id` (`purchase_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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`) VALUES ('1', NULL, NULL, '1', '63581591', 'munchi mari', NULL, '85.0000', '50.0000', '1', '0.0000', '1', '0.0000', NULL, NULL, NULL, '4250.0000', '48.0000', '2017-03-05', 'received', '85.0000', '85.0000', NULL, NULL, NULL, NULL, NULL, '0.0000');
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`) VALUES ('2', '1', NULL, '1', '63581591', 'munchi mari', NULL, '85.0000', '50.0000', '1', '0.0000', '1', '0.0000', '0', '0.0000', NULL, '4250.0000', '50.0000', '2017-03-09', 'received', '85.0000', '85.0000', '50.0000', NULL, NULL, '1', 'PC', '50.0000');


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

INSERT INTO `sma_purchases` (`id`, `reference_no`, `date`, `supplier_id`, `supplier`, `warehouse_id`, `note`, `total`, `product_discount`, `order_discount_id`, `order_discount`, `total_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `paid`, `status`, `payment_status`, `created_by`, `updated_by`, `updated_at`, `attachment`, `payment_term`, `due_date`, `return_id`, `surcharge`, `return_purchase_ref`, `purchase_id`, `return_purchase_total`) VALUES ('1', 'PO/2017/03/0001', '2017-03-09 14:58:00', '2', 'Supplier Company Name', '1', '', '4250.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', '1', '0.0000', '0.0000', '0.0000', '4250.0000', '0.0000', 'received', 'pending', '2', NULL, NULL, NULL, '0', NULL, NULL, '0.0000', NULL, NULL, '0.0000');


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

INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`) VALUES ('1', '1', '1', '63581591', 'munchi mari', 'standard', NULL, '100.0000', '100.0000', '1.0000', '1', '0.0000', '1', '0.0000', '0', '0.0000', '100.0000', '', '100.0000', NULL, '1', 'PC', '1.0000', '');
INSERT INTO `sma_sale_items` (`id`, `sale_id`, `product_id`, `product_code`, `product_name`, `product_type`, `option_id`, `net_unit_price`, `unit_price`, `quantity`, `warehouse_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `subtotal`, `serial_no`, `real_unit_price`, `sale_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `comment`) VALUES ('3', '3', '1', '63581591', 'munchi mari', 'standard', NULL, '100.0000', '100.0000', '1.0000', '1', '0.0000', '1', '0.0000', '0', '0.0000', '100.0000', '', '100.0000', NULL, '1', 'PC', '1.0000', NULL);


#
# TABLE STRUCTURE FOR: sma_sales
#

DROP TABLE IF EXISTS `sma_sales`;

CREATE TABLE `sma_sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `customer` varchar(55) NOT NULL,
  `biller_id` int(11) NOT NULL,
  `biller` varchar(55) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `staff_note` varchar(1000) DEFAULT NULL,
  `total` decimal(25,4) NOT NULL,
  `product_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount_id` varchar(20) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount` decimal(25,4) DEFAULT '0.0000',
  `product_tax` decimal(25,4) DEFAULT '0.0000',
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT '0.0000',
  `total_tax` decimal(25,4) DEFAULT '0.0000',
  `shipping` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `sale_status` varchar(20) DEFAULT NULL,
  `payment_status` varchar(20) DEFAULT NULL,
  `payment_term` tinyint(4) DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_items` tinyint(4) 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,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`) VALUES ('1', '2017-03-05 16:30:08', 'SALE/POS/2017/03/0001', '1', 'Walk-in Customer', '3', 'Test Biller', '1', '', '', '100.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', '1', '0.0000', '0.0000', '0.0000', '100.0000', 'completed', 'paid', '0', NULL, '1', NULL, NULL, '1', '1', '100.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', '0.0000', NULL);
INSERT INTO `sma_sales` (`id`, `date`, `reference_no`, `customer_id`, `customer`, `biller_id`, `biller`, `warehouse_id`, `note`, `staff_note`, `total`, `product_discount`, `order_discount_id`, `total_discount`, `order_discount`, `product_tax`, `order_tax_id`, `order_tax`, `total_tax`, `shipping`, `grand_total`, `sale_status`, `payment_status`, `payment_term`, `due_date`, `created_by`, `updated_by`, `updated_at`, `total_items`, `pos`, `paid`, `return_id`, `surcharge`, `attachment`, `return_sale_ref`, `sale_id`, `return_sale_total`, `rounding`, `suspend_note`) VALUES ('3', '2017-03-08 18:16:00', 'SALE/2017/03/0002', '1', 'Walk-in Customer', '3', 'Test Biller', '1', '', '', '100.0000', '0.0000', NULL, '0.0000', '0.0000', '0.0000', '1', '0.0000', '0.0000', '0.0000', '100.0000', 'completed', 'pending', '0', NULL, '2', NULL, NULL, '1', '0', '0.0000', NULL, '0.0000', NULL, NULL, NULL, '0.0000', NULL, NULL);


#
# 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 ('0g5bqv6vkke5fb61fh1pg7etf921kp18', '192.168.1.101', '1489053093', '__ci_last_regenerate|i:1489052818;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489051639;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('143a57h4hpo66nbhc61gohttorqs8e5j', '192.168.1.101', '1489053285', '__ci_last_regenerate|i:1489053283;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489051639;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1e28mk5ijbqaq3pmjvappp08hg8l902u', '127.0.0.1', '1488976010', '__ci_last_regenerate|i:1488973919;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488969896;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1ke1vq980c0vgsq4hk2d4rkl37gmta5v', '127.0.0.1', '1488977470', '__ci_last_regenerate|i:1488977181;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488977469;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1okk6aptesjhvt3sf3fcno2u0eetahuu', '192.168.1.101', '1489048602', '__ci_last_regenerate|i:1489047311;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489048600;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1q2m7ehe2jej0afgvo39clf329okp6rl', '192.168.1.101', '1489054286', '__ci_last_regenerate|i:1489054094;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('23jml1pucipupij6fp5gfpvlisb1jva7', '192.168.1.101', '1489002156', '__ci_last_regenerate|i:1489002113;requested_page|s:0:\"\";identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002059\";last_ip|s:13:\"192.168.1.103\";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:1489002153;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('35ca337ikbcguu0mfuu4ekr3u20c1jgf', '127.0.0.1', '1488711380', '__ci_last_regenerate|i:1488711109;requested_page|s:12:\"pos/settings\";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:\"1488701451\";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:1488711327;register_id|s:1:\"1\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-05 00:03:41\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3j4l7i7h0o60oci0uat8vv7f8lmsj7ri', '127.0.0.1', '1488966849', '__ci_last_regenerate|i:1488966542;requested_page|s:7:\"welcome\";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:\"1488963828\";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:1488966580;register_id|s:1:\"1\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-05 00:03:41\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3tevujltnpdr3bvl73an6fgh7avgr3ui', '127.0.0.1', '1488963842', '__ci_last_regenerate|i:1488963821;requested_page|s:0:\"\";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:\"1488962904\";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:1488963836;register_id|s:1:\"1\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-05 00:03:41\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('4vvinf999luesi9jqgld1h5ei39h25kq', '192.168.1.101', '1489045863', '__ci_last_regenerate|i:1489044287;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489037365;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('551nnopberv2lur3jem8clg0b5fiq8mn', '192.168.1.101', '1489057799', '__ci_last_regenerate|i:1489057516;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489057789;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";hidden1|i:1;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('5vk2f23mptvilc4tp7500juibio793pe', '192.168.1.101', '1489056290', '__ci_last_regenerate|i:1489055993;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";hidden1|i:1;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('63l44mmmvki88je3lvmul29sklpb4djt', '192.168.1.103', '1489004814', '__ci_last_regenerate|i:1489004808;requested_page|s:0:\"\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('6q294l7b4gi6qfccc18cu4mj0jhodhe1', '192.168.1.101', '1489037723', '__ci_last_regenerate|i:1489037332;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489037365;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('7obhod7f3lo3b4n8qqhuovamm393nbmi', '192.168.1.101', '1489058337', '__ci_last_regenerate|i:1489058042;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489058295;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";hidden1|i:1;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('82bhqqbv5fq46m5bne33h4fqi5lhe0bo', '127.0.0.1', '1488969614', '__ci_last_regenerate|i:1488969353;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('896tkaptkni3aa7a2fvmj4759tq9jo3j', '127.0.0.1', '1488711640', '__ci_last_regenerate|i:1488711410;requested_page|s:12:\"pos/settings\";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:\"1488701451\";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:1488711639;register_id|s:1:\"1\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-05 00:03:41\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8da0ocstlld1n7a39bt4b0j936qni447', '192.168.1.101', '1489053218', '__ci_last_regenerate|i:1489053116;requested_page|s:0:\"\";identity|s:5:\"kamal\";username|s:5:\"kamal\";email|s:15:\"kamal@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1489053091\";last_ip|N;avatar|N;gender|s:4:\"male\";group_id|s:1:\"5\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"1\";allow_discount|s:1:\"1\";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 ('8hde2cb9pn87tu17o9l3hg5minlm3ulh', '192.168.1.101', '1489054091', '__ci_last_regenerate|i:1489053697;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9cmn5k5da5rvi2gik6vmco921tp8a91q', '127.0.0.1', '1488709972', '__ci_last_regenerate|i:1488709957;requested_page|s:12:\"pos/settings\";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:\"1488701451\";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:1488709969;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9e54u0fao61g93b686h3fpcmdl548000', '127.0.0.1', '1489034748', '__ci_last_regenerate|i:1489034747;requested_page|s:0:\"\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a3aviubbi59pgq1i3t26l1fq2qtk6o63', '127.0.0.1', '1488984608', '__ci_last_regenerate|i:1488984339;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488984334;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a3cs181svh2rrug1a29phmvt6kosg757', '192.168.1.101', '1489037323', '__ci_last_regenerate|i:1489036842;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489034828;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('a7v9mmb7s56vcq492ceb0ul18hf502kq', '127.0.0.1', '1488976848', '__ci_last_regenerate|i:1488976054;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488976846;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('be6d5rjqlhrqabo1np3lc9st7js47hkp', '127.0.0.1', '1488710678', '__ci_last_regenerate|i:1488710638;requested_page|s:12:\"pos/settings\";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:\"1488701451\";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:1488710678;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('bhotg9vbp24g06cb22tkisrntf2g9tli', '192.168.1.101', '1489005030', '__ci_last_regenerate|i:1489005017;requested_page|s:0:\"\";identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002059\";last_ip|s:13:\"192.168.1.103\";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:1489004074;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";error|N;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('br6es3npn8vrv4ilcfv9hlvd6qm39gdm', '192.168.1.101', '1489051880', '__ci_last_regenerate|i:1489051633;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489051639;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('curn3hiqj731isk9a8hb1nkrrnog4p4d', '127.0.0.1', '1488966880', '__ci_last_regenerate|i:1488966880;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('db3j245uhm0kr7iirrd1pjifhl17f23b', '192.168.1.101', '1489059067', '__ci_last_regenerate|i:1489059067;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489058711;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";hidden1|i:1;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('dkdrst5ln6e73uknqrfrf4pr6cfpfhna', '192.168.1.101', '1489034944', '__ci_last_regenerate|i:1489034748;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489034828;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('duvvj5dlk9gglvt0a151h8o3rq0v2nkg', '127.0.0.1', '1488981516', '__ci_last_regenerate|i:1488978026;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488978149;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f193d7q64ruhvhjktvnq9lcqrn4h8smb', '192.168.1.101', '1489055397', '__ci_last_regenerate|i:1489055122;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('gg6jko3d8n4s13aciq7p5ed7ho9d63go', '192.168.1.101', '1489058936', '__ci_last_regenerate|i:1489058683;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489058711;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";hidden1|i:1;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('grk1s476b5pq9929413g69jnvuhnu0n8', '192.168.1.101', '1489058648', '__ci_last_regenerate|i:1489058349;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489058420;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";hidden1|i:1;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ihdn60n6hjri5nqa44vc3dnq01595it9', '192.168.1.103', '1489003901', '__ci_last_regenerate|i:1489003889;requested_page|s:0:\"\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('iv7ohe2604g61o135nsk6p63vrdcpp1k', '127.0.0.1', '1488973876', '__ci_last_regenerate|i:1488973614;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488969896;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('jf23g7kenuob3dn3d7bihrtk9dpapbld', '127.0.0.1', '1488714133', '__ci_last_regenerate|i:1488713922;requested_page|s:12:\"pos/settings\";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:\"1488701451\";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:1488714133;register_id|s:1:\"1\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-05 00:03:41\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('jnqmgplt1fdjahlg37oen0qmvokejk2o', '127.0.0.1', '1488984335', '__ci_last_regenerate|i:1488981528;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488984334;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('npt4mqfifli0qd12jsiqmvefeub2aclf', '192.168.1.101', '1489055104', '__ci_last_regenerate|i:1489054821;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('pnu27b1dqj0te9qgr7q5i6183o5c1t59', '192.168.1.101', '1489004075', '__ci_last_regenerate|i:1489004032;requested_page|s:0:\"\";identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002059\";last_ip|s:13:\"192.168.1.103\";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:1489004074;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('progbh3um54ok00h5qt5f85qr3dqva0l', '192.168.1.103', '1489002278', '__ci_last_regenerate|i:1489002271;requested_page|s:7:\"welcome\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('qfkakrtv0p1abm46n7tuq8nf88695khl', '192.168.1.101', '1489052769', '__ci_last_regenerate|i:1489052494;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489051639;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('qg7upl39pp6kjeso99uq796rod5n3u5k', '127.0.0.1', '1488714454', '__ci_last_regenerate|i:1488714239;requested_page|s:12:\"pos/settings\";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:\"1488701451\";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:1488714453;register_id|s:1:\"1\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-05 00:03:41\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('qict5tp5te15rnctfl9tnpbcnepqsjqo', '192.168.1.101', '1489054789', '__ci_last_regenerate|i:1489054504;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('rmmklv8q8snoal9kl020grbnhsnkj592', '192.168.1.101', '1489051522', '__ci_last_regenerate|i:1489048791;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489051521;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('s7u25am6nhelml196te94hgneum24oma', '127.0.0.1', '1489005017', '__ci_last_regenerate|i:1489002113;requested_page|s:18:\"sales/modal_view/3\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('t0uhqjjieed9k6688nf7un3ag0maa750', '192.168.1.101', '1489044281', '__ci_last_regenerate|i:1489037749;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489037365;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('t3sh0iell128qpv3bo2to6hq623ndl7g', '192.168.1.101', '1489001718', '__ci_last_regenerate|i:1489001685;requested_page|s:0:\"\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('tvm0s5g2qib1ggg32mb9tfv9obuvspqc', '127.0.0.1', '1488977176', '__ci_last_regenerate|i:1488976863;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488976886;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('u68s8d6psrm1g04192u7p9qbomobchtt', '127.0.0.1', '1489001694', '__ci_last_regenerate|i:1489001686;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ucbltna7ntbd3b6q02g8sg759ul5eoqk', '192.168.1.101', '1489055832', '__ci_last_regenerate|i:1489055580;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1489002123\";last_ip|s:13:\"192.168.1.101\";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:1489053714;register_id|s:1:\"2\";cash_in_hand|s:9:\"2000.0000\";register_open_time|s:19:\"2017-03-09 01:12:32\";user_csrf|s:20:\"txUh8ZYA0smHJvWFGoDT\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ucet1ill6g8on760fovtb6jl0pk11el3', '127.0.0.1', '1488977964', '__ci_last_regenerate|i:1488977562;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488977962;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('uo610itlhrt9lh7hqn99ske39luueljf', '127.0.0.1', '1488969904', '__ci_last_regenerate|i:1488969675;identity|s:12:\"webmarklanka\";username|s:12:\"webmarklanka\";email|s:22:\"webmarklanka@gmail.com\";user_id|s:1:\"2\";old_last_login|s:10:\"1488969303\";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:1488969896;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('vdkfkihg026gpp7ju9tl3et17dhuhtb1', '127.0.0.1', '1488963009', '__ci_last_regenerate|i:1488962896;requested_page|s:0:\"\";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:\"1488709968\";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\";');


#
# 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,
  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`) VALUES ('1', 'logo6.png', 'logo7.png', 'Mayura Storse', 'english', '1', '0', 'Rs.', '1', '10', '3.0.2.26', '1', '5', 'SALE', 'QUOTE', 'PO', 'TR', 'DO', 'IPAY', 'SR', 'PR', '', '0', 'default', '1', '1', '1', '1', '1', '1', '0', '1', '0', 'Asia/Colombo', '800', '800', '60', '60', '0', '0', '0', '0', NULL, 'mail', '/usr/sbin/sendmail', 'pop.gmail.com', 'contact@sma.tecdiary.org', 'jEFTM4T63AiQ9dsidxhPKt9CIg4HQjCN58n/RW9vmdC/UDXCzRLR469ziZ0jjpFlbOg43LyoSmpJLBkcAHh0Yw==', '25', NULL, NULL, '1', 'webmarklanka@gmail.com', '0', '4', '1', '0', '2', '1', '1', '0', '2', '2', '.', ',', '0', '3', 'webmarklanka', 'f000bef6-faae-4797-8ea3-171a68b86db8', '0', NULL, NULL, NULL, NULL, '0', '0', '0', '0', '', '0', '_', '0', '1', '1', 'POP', '90', '', '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_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,
  `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 DEFAULT CHARSET=utf8;

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

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

#
# TABLE STRUCTURE FOR: sma_tax_rates
#

DROP TABLE IF EXISTS `sma_tax_rates`;

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

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


#
# TABLE STRUCTURE FOR: sma_transfer_items
#

DROP TABLE IF EXISTS `sma_transfer_items`;

CREATE TABLE `sma_transfer_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transfer_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_code` varchar(55) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `option_id` int(11) DEFAULT NULL,
  `expiry` date DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `net_unit_cost` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) DEFAULT NULL,
  `quantity_balance` decimal(15,4) NOT NULL,
  `unit_cost` decimal(25,4) DEFAULT NULL,
  `real_unit_cost` decimal(25,4) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  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,
  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=18 DEFAULT CHARSET=utf8;

INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('1', 'PC', 'Piece', NULL, NULL, NULL, NULL);
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('2', 'kg', 'Kilogram', NULL, NULL, NULL, NULL);
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('3', 'm', 'Meter', NULL, NULL, NULL, NULL);
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('4', 'cm', 'Centimeter', '3', '/', NULL, '100');
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('5', 'ft', 'Foot', '3', '/', NULL, '3.28084');
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('6', 'g', 'gram', '2', '/', NULL, '1000');
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('7', 'l', 'liter', NULL, NULL, NULL, NULL);
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('8', 'ml', 'milliliter', '7', '/', NULL, '1000');
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('11', 'Barrel', 'Barrel', '7', '*', NULL, '500');
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('16', 'pack (50kg', '50kg (pack)', '2', '*', NULL, '50');
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES ('17', 'bot', 'Bottle', '7', '/', NULL, '1.33333');


#
# 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=14 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', '2017-03-04 23:32:58');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('2', '1', NULL, '127.0.0.1', 'owner@tecdiary.com', '2017-03-05 13:40:51');
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', '2017-03-05 16:02:48');
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', '2017-03-08 14:18:24');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('5', '1', NULL, '127.0.0.1', 'owner@tecdiary.com', '2017-03-08 14:33:48');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('6', '1', NULL, '127.0.0.1', 'owner@tecdiary.com', '2017-03-08 15:19:09');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('7', '1', NULL, '127.0.0.1', 'owner@tecdiary.com', '2017-03-08 16:03:59');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('8', '2', NULL, '127.0.0.1', 'webmarklanka', '2017-03-08 16:06:00');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('9', '2', NULL, '192.168.1.103', 'webmarklanka', '2017-03-09 01:07:10');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('10', '2', NULL, '192.168.1.103', 'webmarklanka', '2017-03-09 01:10:59');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('11', '2', NULL, '192.168.1.101', 'webmarklanka', '2017-03-09 01:12:03');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('12', '2', NULL, '192.168.1.101', 'webmarklanka', '2017-03-09 10:15:59');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES ('13', '3', NULL, '192.168.1.101', 'kamal', '2017-03-09 15:22:11');


#
# 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=4 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 ('2', '192.168.1.101', '127.0.0.1', 'webmarklanka', 'bb23b3b7d2de2e17183e62b5de0c4e60fa14945b', NULL, 'webmarklanka@gmail.com', NULL, NULL, NULL, NULL, '1488969303', '1489034759', '1', 'Sujith', 'Bandara', 'Webmark Lanka', '0758357872', 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 ('3', '192.168.1.101', '192.168.1.101', 'kamal', '54d9aab86b22642cfc676d529e67b5ee4398ebf8', NULL, 'kamal@gmail.com', NULL, NULL, NULL, NULL, '1489053091', '1489053131', '1', 'Kamal', 'Perera', 'Mayura Stores', '0123456789', NULL, 'male', '5', '0', '0', NULL, '0', '0', '0', '1', '1', '1');


#
# TABLE STRUCTURE FOR: sma_variants
#

DROP TABLE IF EXISTS `sma_variants`;

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

#
# TABLE STRUCTURE FOR: sma_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', 'Warehouse 1', '<p>Address, City</p>', NULL, '012345678', '', '0');
INSERT INTO `sma_warehouses` (`id`, `code`, `name`, `address`, `map`, `phone`, `email`, `price_group_id`) VALUES ('2', 'WH2', 'Warehouse 2', '<p>higurakkgoda</p>', NULL, '', '', '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=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_warehouses_products` (`id`, `product_id`, `warehouse_id`, `quantity`, `rack`, `avg_cost`) VALUES ('1', '1', '1', '98.0000', NULL, '85.0000');


#
# TABLE STRUCTURE FOR: sma_warehouses_products_variants
#

DROP TABLE IF EXISTS `sma_warehouses_products_variants`;

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

