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

DROP TABLE IF EXISTS `sma_adjustment_items_stores`;

CREATE TABLE `sma_adjustment_items_stores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `adjustment_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `option_id` int(11) DEFAULT NULL,
  `quantity` decimal(15,4) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `type` varchar(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `adjustment_id` (`adjustment_id`)
) ENGINE=InnoDB 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_adjustments_stores
#

DROP TABLE IF EXISTS `sma_adjustments_stores`;

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

#
# TABLE STRUCTURE FOR: sma_bank_accounts
#

DROP TABLE IF EXISTS `sma_bank_accounts`;

CREATE TABLE `sma_bank_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_title` varchar(100) DEFAULT NULL,
  `account_number` varchar(100) DEFAULT NULL,
  `bank_name` varchar(100) NOT NULL,
  `branch_address` varchar(100) DEFAULT NULL,
  `opening_balance` varchar(100) DEFAULT NULL,
  `added_on` datetime DEFAULT CURRENT_TIMESTAMP,
  `added_by` varchar(20) DEFAULT 'admin',
  PRIMARY KEY (`id`),
  KEY `name` (`bank_name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

INSERT INTO `sma_bank_accounts` (`id`, `account_title`, `account_number`, `bank_name`, `branch_address`, `opening_balance`, `added_on`, `added_by`) VALUES (1, 'Purchase Account', '1710189001', 'Standard Chartered', 'F7, Islamabad', '0', '2019-04-25 12:29:31', 'admin');
INSERT INTO `sma_bank_accounts` (`id`, `account_title`, `account_number`, `bank_name`, `branch_address`, `opening_balance`, `added_on`, `added_by`) VALUES (3, 'Sales Account', '1851110413', 'MCB, Pakistan', 'G-9, Islamabad', '0', '2019-04-25 12:29:31', 'admin');
INSERT INTO `sma_bank_accounts` (`id`, `account_title`, `account_number`, `bank_name`, `branch_address`, `opening_balance`, `added_on`, `added_by`) VALUES (4, 'Expenses Account', '1851110431', 'MCB, Pakistan', 'G-9, Islamabad', '0', '2019-04-25 12:29:31', 'admin');
INSERT INTO `sma_bank_accounts` (`id`, `account_title`, `account_number`, `bank_name`, `branch_address`, `opening_balance`, `added_on`, `added_by`) VALUES (5, 'Savings Account', '122356656', 'ANB Bank', 'Riyadh', '0', '2019-08-17 07:07:32', 'admin');


#
# TABLE STRUCTURE FOR: sma_brands
#

DROP TABLE IF EXISTS `sma_brands`;

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

INSERT INTO `sma_brands` (`id`, `code`, `name`, `image`, `slug`) VALUES (1, 'HP', 'HP', NULL, 'HP');


#
# TABLE STRUCTURE FOR: sma_calendar
#

DROP TABLE IF EXISTS `sma_calendar`;

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

#
# TABLE STRUCTURE FOR: sma_captcha
#

DROP TABLE IF EXISTS `sma_captcha`;

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

#
# TABLE STRUCTURE FOR: sma_cashback
#

DROP TABLE IF EXISTS `sma_cashback`;

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

#
# TABLE STRUCTURE FOR: sma_categories
#

DROP TABLE IF EXISTS `sma_categories`;

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

INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`) VALUES (1, 'C1', 'Services', NULL, 0, 'services');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`) VALUES (2, '001', 'Cleaning', NULL, 1, 'cleaning');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`) VALUES (3, '100', 'Electronics', NULL, 0, 'electronics');
INSERT INTO `sma_categories` (`id`, `code`, `name`, `image`, `parent_id`, `slug`) VALUES (4, 'Laptops', 'Laptops', NULL, 3, 'laptops');


#
# TABLE STRUCTURE FOR: sma_combo_items
#

DROP TABLE IF EXISTS `sma_combo_items`;

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

#
# TABLE STRUCTURE FOR: sma_companies
#

DROP TABLE IF EXISTS `sma_companies`;

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

INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (1, NULL, 'biller', NULL, NULL, 'default', 'naturalsweets', '', 'Riyadh', 'Riyadh', '', '', '', '05656565', 'default@default.com', '', '', '', '', '', '', 'thanks for shopping in pointofsalesaudi', 0, 'logo1.png', 0, NULL, NULL, NULL, '', '');
INSERT INTO `sma_companies` (`id`, `group_id`, `group_name`, `customer_group_id`, `customer_group_name`, `name`, `company`, `vat_no`, `address`, `city`, `state`, `postal_code`, `country`, `phone`, `email`, `cf1`, `cf2`, `cf3`, `cf4`, `cf5`, `cf6`, `invoice_footer`, `payment_term`, `logo`, `award_points`, `deposit_amount`, `price_group_id`, `price_group_name`, `store_id`, `werehouse_id`) VALUES (2, 4, 'supplier', NULL, NULL, 'aras', 'aras', '', 'iraq', 'slemani', '', '', '', '07701942462', 'aras.kurd@gmail.com', '', '', '', '', '', '', NULL, 0, 'logo.png', 0, NULL, NULL, NULL, '', '');


#
# TABLE STRUCTURE FOR: sma_costing
#

DROP TABLE IF EXISTS `sma_costing`;

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

#
# TABLE STRUCTURE FOR: sma_coupon
#

DROP TABLE IF EXISTS `sma_coupon`;

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

#
# TABLE STRUCTURE FOR: sma_currencies
#

DROP TABLE IF EXISTS `sma_currencies`;

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

#
# 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);


#
# TABLE STRUCTURE FOR: sma_date_format
#

DROP TABLE IF EXISTS `sma_date_format`;

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

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


#
# TABLE STRUCTURE FOR: sma_deliveries
#

DROP TABLE IF EXISTS `sma_deliveries`;

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

#
# TABLE STRUCTURE FOR: sma_deposits
#

DROP TABLE IF EXISTS `sma_deposits`;

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

#
# TABLE STRUCTURE FOR: sma_discount
#

DROP TABLE IF EXISTS `sma_discount`;

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

#
# TABLE STRUCTURE FOR: sma_employee
#

DROP TABLE IF EXISTS `sma_employee`;

CREATE TABLE `sma_employee` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `e_name` varchar(255) NOT NULL,
  `mobile` varchar(255) NOT NULL,
  `id_card` varchar(255) NOT NULL,
  `id_card_expire` varchar(255) NOT NULL,
  `Vehicle_insurance` enum('yes','no') NOT NULL DEFAULT 'no',
  `Vehicle_insurance_expire` varchar(50) NOT NULL,
  `Health_Insurance` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `address` text NOT NULL,
  `Calculation_Finance` varchar(200) NOT NULL,
  `salary` varchar(200) NOT NULL,
  `id_card_renewal_fee` varchar(10) NOT NULL,
  `ministry_of_labor_fee` varchar(10) NOT NULL,
  `insurance_renewal_fee` varchar(10) NOT NULL,
  `vehicle_insurance_fee` varchar(10) NOT NULL,
  `health_insurance_fee` varchar(10) NOT NULL,
  `account_holder` varchar(100) NOT NULL,
  `bank_name` varchar(255) NOT NULL,
  `account_number` varchar(20) NOT NULL,
  `iban_number` varchar(20) NOT NULL,
  `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_employee_loan
#

DROP TABLE IF EXISTS `sma_employee_loan`;

CREATE TABLE `sma_employee_loan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` int(11) NOT NULL,
  `empid` int(11) NOT NULL,
  `loan_amt` varchar(10) NOT NULL,
  `note` text NOT NULL,
  `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `return_amt` varchar(10) NOT NULL DEFAULT '0',
  `return_date` datetime NOT NULL,
  `remaining_amt` varchar(10) NOT NULL,
  `loan_summery` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# TABLE STRUCTURE FOR: sma_employee_salary
#

DROP TABLE IF EXISTS `sma_employee_salary`;

CREATE TABLE `sma_employee_salary` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `empid` int(11) NOT NULL,
  `salary_amt` varchar(10) NOT NULL,
  `note` text NOT NULL,
  `total_unpaid_leaves` int(2) DEFAULT NULL,
  `salary_period` varchar(50) DEFAULT NULL,
  `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `created_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# TABLE STRUCTURE FOR: sma_expense_categories
#

DROP TABLE IF EXISTS `sma_expense_categories`;

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

#
# TABLE STRUCTURE FOR: sma_expenses
#

DROP TABLE IF EXISTS `sma_expenses`;

CREATE TABLE `sma_expenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference` varchar(50) NOT NULL,
  `amount` decimal(25,4) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `created_by` varchar(55) NOT NULL,
  `attachment` varchar(55) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB 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,
  `is_loyality_card` int(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `card_no` (`card_no`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

INSERT INTO `sma_gift_cards` (`id`, `date`, `card_no`, `value`, `customer_id`, `customer`, `balance`, `expiry`, `created_by`, `is_loyality_card`) VALUES (1, '2019-10-23 10:15:45', '0411270547389097', '0.0000', NULL, NULL, '0.0000', NULL, '3', 1);


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

INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (1, 'owner', 'Owner');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (2, 'admin', 'Administrator');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (3, 'customer', 'Customer');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (4, 'supplier', 'Supplier');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (5, 'sales', 'Sales Staff');
INSERT INTO `sma_groups` (`id`, `name`, `description`) VALUES (9, 'salescounter', 'Sales Counter');


#
# TABLE STRUCTURE FOR: sma_login_attempts
#

DROP TABLE IF EXISTS `sma_login_attempts`;

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

#
# TABLE STRUCTURE FOR: sma_loyality_points
#

DROP TABLE IF EXISTS `sma_loyality_points`;

CREATE TABLE `sma_loyality_points` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `amount_spent` double DEFAULT '0',
  `loyality_points` int(11) DEFAULT '0',
  `per_points` int(11) DEFAULT NULL,
  `credit` int(11) DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO `sma_loyality_points` (`id`, `amount_spent`, `loyality_points`, `per_points`, `credit`, `updated_on`, `updated_by`) VALUES (1, '10', 10, 10, 1, '2019-09-27 16:45:12', 3);


#
# TABLE STRUCTURE FOR: sma_loyality_points_cust
#

DROP TABLE IF EXISTS `sma_loyality_points_cust`;

CREATE TABLE `sma_loyality_points_cust` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `points` int(11) DEFAULT '0',
  `customer_id` int(11) DEFAULT '0',
  `amount_redeemed` double DEFAULT NULL,
  `last_redeemed_amount` double DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

#
# TABLE STRUCTURE FOR: sma_migrations
#

DROP TABLE IF EXISTS `sma_migrations`;

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

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


#
# TABLE STRUCTURE FOR: sma_newsletters
#

DROP TABLE IF EXISTS `sma_newsletters`;

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

INSERT INTO `sma_newsletters` (`id`, `title`, `message`, `date`, `from_date`, `till_date`, `scope`) VALUES (1, 'Test Title', '<p>Thank you for purchasing POS.</p>', '2014-08-14 08:30:57', '2015-01-01 00:00:00', '2017-01-01 00:00:00', 3);


#
# TABLE STRUCTURE FOR: sma_newsletters1
#

DROP TABLE IF EXISTS `sma_newsletters1`;

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

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


#
# TABLE STRUCTURE FOR: sma_notifications
#

DROP TABLE IF EXISTS `sma_notifications`;

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

#
# TABLE STRUCTURE FOR: sma_order_ref
#

DROP TABLE IF EXISTS `sma_order_ref`;

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

INSERT INTO `sma_order_ref` (`ref_id`, `date`, `so`, `qu`, `po`, `to`, `pos`, `do`, `pay`, `re`, `rep`, `ex`, `ppay`, `qa`) VALUES (1, '2015-03-01', 66, 3, 53, 135, 346, 1, 462, 24, 1, 37, 48, 287);


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

#
# TABLE STRUCTURE FOR: sma_paypal
#

DROP TABLE IF EXISTS `sma_paypal`;

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

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


#
# TABLE STRUCTURE FOR: sma_permissions
#

DROP TABLE IF EXISTS `sma_permissions`;

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

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


#
# TABLE STRUCTURE FOR: sma_pos_register
#

DROP TABLE IF EXISTS `sma_pos_register`;

CREATE TABLE `sma_pos_register` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user_id` int(11) NOT NULL,
  `store_id` int(11) DEFAULT 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 DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_pos_settings
#

DROP TABLE IF EXISTS `sma_pos_settings`;

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

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


#
# TABLE STRUCTURE FOR: sma_price_groups
#

DROP TABLE IF EXISTS `sma_price_groups`;

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

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


#
# TABLE STRUCTURE FOR: sma_printers
#

DROP TABLE IF EXISTS `sma_printers`;

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

#
# TABLE STRUCTURE FOR: sma_product_photos
#

DROP TABLE IF EXISTS `sma_product_photos`;

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

#
# TABLE STRUCTURE FOR: sma_product_prices
#

DROP TABLE IF EXISTS `sma_product_prices`;

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

#
# TABLE STRUCTURE FOR: sma_product_variants
#

DROP TABLE IF EXISTS `sma_product_variants`;

CREATE TABLE `sma_product_variants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `name` varchar(55) NOT NULL,
  `cost` decimal(25,4) DEFAULT NULL,
  `price` decimal(25,4) DEFAULT NULL,
  `quantity` decimal(15,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB 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` varchar(255) NOT NULL,
  `unit` int(11) DEFAULT NULL,
  `cost` decimal(25,4) DEFAULT NULL,
  `price` decimal(25,4) NOT NULL,
  `alert_quantity` decimal(15,4) DEFAULT '20.0000',
  `image` varchar(255) DEFAULT 'no_image.png',
  `category_id` int(11) NOT NULL,
  `subcategory_id` int(11) DEFAULT NULL,
  `cf1` varchar(255) DEFAULT NULL,
  `cf2` varchar(255) DEFAULT NULL,
  `cf3` varchar(255) DEFAULT NULL,
  `cf4` varchar(255) DEFAULT NULL,
  `cf5` varchar(255) DEFAULT NULL,
  `cf6` varchar(255) DEFAULT NULL,
  `quantity` decimal(15,4) DEFAULT '0.0000',
  `tax_rate` int(11) DEFAULT NULL,
  `track_quantity` tinyint(1) DEFAULT '1',
  `details` varchar(1000) DEFAULT NULL,
  `warehouse` int(11) DEFAULT NULL,
  `barcode_symbology` varchar(55) NOT NULL DEFAULT 'code128',
  `file` varchar(100) DEFAULT NULL,
  `product_details` text,
  `tax_method` tinyint(1) DEFAULT '0',
  `type` varchar(55) NOT NULL DEFAULT 'standard',
  `supplier1` int(11) DEFAULT NULL,
  `supplier1price` decimal(25,4) DEFAULT NULL,
  `supplier2` int(11) DEFAULT NULL,
  `supplier2price` decimal(25,4) DEFAULT NULL,
  `supplier3` int(11) DEFAULT NULL,
  `supplier3price` decimal(25,4) DEFAULT NULL,
  `supplier4` int(11) DEFAULT NULL,
  `supplier4price` decimal(25,4) DEFAULT NULL,
  `supplier5` int(11) DEFAULT NULL,
  `supplier5price` decimal(25,4) DEFAULT NULL,
  `promotion` tinyint(1) DEFAULT '0',
  `promo_price` decimal(25,4) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `supplier1_part_no` varchar(50) DEFAULT NULL,
  `supplier2_part_no` varchar(50) DEFAULT NULL,
  `supplier3_part_no` varchar(50) DEFAULT NULL,
  `supplier4_part_no` varchar(50) DEFAULT NULL,
  `supplier5_part_no` varchar(50) DEFAULT NULL,
  `sale_unit` int(11) DEFAULT NULL,
  `purchase_unit` int(11) DEFAULT NULL,
  `brand` int(11) DEFAULT NULL,
  `slug` varchar(55) DEFAULT NULL,
  `featured` tinyint(1) DEFAULT NULL,
  `weight` decimal(10,4) DEFAULT NULL,
  `hsn_code` int(11) DEFAULT NULL,
  `views` int(11) NOT NULL DEFAULT '0',
  `hide` tinyint(1) NOT NULL DEFAULT '0',
  `second_name` varchar(255) DEFAULT NULL,
  `scale_weight` enum('1','0') NOT NULL DEFAULT '0',
  `warehouse_id` varchar(100) DEFAULT '0',
  `store_id` varchar(100) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `category_id` (`category_id`),
  KEY `id` (`id`),
  KEY `id_2` (`id`),
  KEY `category_id_2` (`category_id`),
  KEY `unit` (`unit`),
  KEY `brand` (`brand`)
) ENGINE=InnoDB AUTO_INCREMENT=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`, `slug`, `featured`, `weight`, `hsn_code`, `views`, `hide`, `second_name`, `scale_weight`, `warehouse_id`, `store_id`) VALUES (1, '123', 'test(تێست)', 2, '10.0000', '12.0000', '0.0000', '8c3a9dcd50425ec1c0d4cf0c0d87f79b.jpg', 3, NULL, '', '', '', '', '', '', '90.0000', 1, 1, '', NULL, 'code128', '', '', 1, 'standard', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 2, 2, 0, 'test', NULL, '0.0000', NULL, 0, 0, '', '0', '0', '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,
  `store_id` int(11) NOT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(20) DEFAULT NULL,
  `discount` varchar(20) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `expiry` date DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `quantity_balance` decimal(15,4) DEFAULT '0.0000',
  `date` date NOT NULL,
  `status` varchar(50) NOT NULL,
  `unit_cost` decimal(25,4) DEFAULT NULL,
  `real_unit_cost` decimal(25,4) DEFAULT NULL,
  `quantity_received` decimal(15,4) DEFAULT NULL,
  `supplier_part_no` varchar(50) DEFAULT NULL,
  `purchase_item_id` int(11) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) 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`, `store_id`, `item_tax`, `tax_rate_id`, `tax`, `discount`, `item_discount`, `expiry`, `subtotal`, `quantity_balance`, `date`, `status`, `unit_cost`, `real_unit_cost`, `quantity_received`, `supplier_part_no`, `purchase_item_id`, `product_unit_id`, `product_unit_code`, `unit_quantity`, `gst`, `cgst`, `sgst`, `igst`) VALUES (2, 1, NULL, 1, '123', 'test(تێست)', NULL, '10.0000', '90.0000', 12, 0, '0.0000', 1, '0', '0', '0.0000', NULL, '900.0000', '90.0000', '2019-11-03', 'received', '10.0000', '10.0000', '90.0000', NULL, NULL, 2, 'pcs', '90.0000', NULL, NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_purchases
#

DROP TABLE IF EXISTS `sma_purchases`;

CREATE TABLE `sma_purchases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reference_no` varchar(55) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `supplier_id` int(11) NOT NULL,
  `supplier` varchar(55) NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `note` varchar(1000) NOT NULL,
  `total` decimal(25,4) DEFAULT NULL,
  `product_discount` decimal(25,4) DEFAULT NULL,
  `order_discount_id` varchar(20) DEFAULT NULL,
  `order_discount` decimal(25,4) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT NULL,
  `product_tax` decimal(25,4) DEFAULT NULL,
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT NULL,
  `total_tax` decimal(25,4) DEFAULT '0.0000',
  `shipping` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `paid` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `status` varchar(55) DEFAULT '',
  `payment_status` varchar(20) DEFAULT 'pending',
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `attachment` varchar(55) DEFAULT NULL,
  `payment_term` tinyint(4) DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `return_id` int(11) DEFAULT NULL,
  `surcharge` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `return_purchase_ref` varchar(55) DEFAULT NULL,
  `purchase_id` int(11) DEFAULT NULL,
  `return_purchase_total` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB 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`, `cgst`, `sgst`, `igst`) VALUES (1, 'PO2019/11/0052', '2019-11-03 12:18:00', 2, 'aras', 12, '', '900.0000', '0.0000', '', '0.0000', '0.0000', '0.0000', 0, '0.0000', '0.0000', '0.0000', '900.0000', '0.0000', 'received', 'pending', 3, 3, '2019-11-03 17:05:47', NULL, 0, NULL, NULL, '0.0000', NULL, NULL, '0.0000', NULL, NULL, NULL);


#
# TABLE STRUCTURE FOR: sma_quote_items
#

DROP TABLE IF EXISTS `sma_quote_items`;

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

#
# TABLE STRUCTURE FOR: sma_quotes
#

DROP TABLE IF EXISTS `sma_quotes`;

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

#
# TABLE STRUCTURE FOR: sma_return_items
#

DROP TABLE IF EXISTS `sma_return_items`;

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

#
# TABLE STRUCTURE FOR: sma_returns
#

DROP TABLE IF EXISTS `sma_returns`;

CREATE TABLE `sma_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference_no` varchar(55) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `customer` varchar(55) NOT NULL,
  `biller_id` int(11) NOT NULL,
  `biller` varchar(55) NOT NULL,
  `warehouse_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `staff_note` varchar(1000) DEFAULT NULL,
  `total` decimal(25,4) NOT NULL,
  `product_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount_id` varchar(20) DEFAULT NULL,
  `total_discount` decimal(25,4) DEFAULT '0.0000',
  `order_discount` decimal(25,4) DEFAULT '0.0000',
  `product_tax` decimal(25,4) DEFAULT '0.0000',
  `order_tax_id` int(11) DEFAULT NULL,
  `order_tax` decimal(25,4) DEFAULT '0.0000',
  `total_tax` decimal(25,4) DEFAULT '0.0000',
  `grand_total` decimal(25,4) NOT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `total_items` smallint(6) DEFAULT NULL,
  `paid` decimal(25,4) DEFAULT '0.0000',
  `surcharge` decimal(25,4) NOT NULL DEFAULT '0.0000',
  `attachment` varchar(55) DEFAULT NULL,
  `hash` varchar(255) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  `return_type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB 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,
  `store_id` int(11) NOT NULL,
  `item_tax` decimal(25,4) DEFAULT NULL,
  `tax_rate_id` int(11) DEFAULT NULL,
  `tax` varchar(55) DEFAULT NULL,
  `discount` varchar(55) DEFAULT NULL,
  `item_discount` decimal(25,4) DEFAULT NULL,
  `subtotal` decimal(25,4) NOT NULL,
  `serial_no` varchar(255) DEFAULT NULL,
  `real_unit_price` decimal(25,4) DEFAULT NULL,
  `sale_item_id` int(11) DEFAULT NULL,
  `product_unit_id` int(11) DEFAULT NULL,
  `product_unit_code` varchar(10) DEFAULT NULL,
  `unit_quantity` decimal(15,4) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `gst` varchar(20) DEFAULT NULL,
  `cgst` decimal(25,4) DEFAULT NULL,
  `sgst` decimal(25,4) DEFAULT NULL,
  `igst` decimal(25,4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `product_id` (`product_id`),
  KEY `product_id_2` (`product_id`,`sale_id`),
  KEY `sale_id_2` (`sale_id`,`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_sales
#

DROP TABLE IF EXISTS `sma_sales`;

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

#
# TABLE STRUCTURE FOR: sma_sessions
#

DROP TABLE IF EXISTS `sma_sessions`;

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

INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0140cd52a545a6a9465879d5bbee74dddca05e6f', '49.37.207.252', 1572070594, '__ci_last_regenerate|i:1572070501;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571924520\";last_ip|s:13:\"37.104.250.70\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('02a25ac3e319b9a78b8637d936d2f73f048fba23', '62.201.253.72', 1572789932, '__ci_last_regenerate|i:1572789932;requested_page|s:15:\"admin/purchases\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572772276\";last_ip|s:15:\"130.193.239.172\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0432f20321188eb2c6fcc361f7af2e53a9a88a92', '130.193.239.172', 1572772926, '__ci_last_regenerate|i:1572772925;requested_page|s:13:\"admin/welcome\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572687102\";last_ip|s:13:\"51.235.160.19\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"XTmPZzxnYf72tKMwIRd1\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('0dc1d217d39bc4875b0bae7bb49772518472bf4d', '37.104.250.70', 1571924887, '__ci_last_regenerate|i:1571924887;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571923618\";last_ip|s:13:\"62.201.253.72\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('1c2f623ee4198b3d7ba123a979e437141bc92ea9', '54.36.150.176', 1572078464, '__ci_last_regenerate|i:1572078464;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('23b937a1530c43915eaf895e71f8c427ce1a4cfc', '185.91.17.5', 1571927260, '__ci_last_regenerate|i:1571927202;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('2cff6e5986f838e6909322409d451bc20cc3817f', '37.104.250.70', 1571926335, '__ci_last_regenerate|i:1571926335;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571923618\";last_ip|s:13:\"62.201.253.72\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571925084;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('32ae0470e6bcdb3a03a75fc021ebd73d32735f50', '94.99.153.214', 1571849953, '__ci_last_regenerate|i:1571849953;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571839840\";last_ip|s:12:\"5.42.233.154\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571848736;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3422b4a55143baa8223c39b07fc9f8243ae1ca91', '203.215.162.82', 1571976387, '__ci_last_regenerate|i:1571976387;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('36eac1df3e0ff8089486cac2241a7b314f9fcd33', '94.99.135.123', 1572262562, '__ci_last_regenerate|i:1572262562;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('37c560f2ff95e972948c707e79f30e81a6d0d105', '203.215.162.82', 1572495175, '__ci_last_regenerate|i:1572495175;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3cb97ebc34968ffdf0402ca5f683bb498727a3d2', '130.193.239.172', 1572772602, '__ci_last_regenerate|i:1572772602;requested_page|s:13:\"admin/welcome\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572687102\";last_ip|s:13:\"51.235.160.19\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3cd3af3ad1fa1f7e60ffa7c24dc360beb21f4599', '37.224.76.82', 1571909236, '__ci_last_regenerate|i:1571908948;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571850392\";last_ip|s:14:\"110.225.91.174\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('3fe5e2a190875e07aa9cd661b4dcb404677d0381', '212.11.179.74', 1572438394, '__ci_last_regenerate|i:1572438394;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572426644\";last_ip|s:11:\"51.36.91.29\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('407e19798fb6e4c84e6a3f5e3891ab0ed6d7b667', '51.235.181.195', 1572089491, '__ci_last_regenerate|i:1572089319;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572070554\";last_ip|s:13:\"49.37.207.252\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";werehouse|s:1:\"0\";store|i:0;last_activity|i:1572089466;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('475c6400f7aebdafa489b0a0649656d7add5085c', '203.215.162.82', 1572440353, '__ci_last_regenerate|i:1572440226;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('47d8a4baf1168f6d6a1ec04f6bfb874f49370173', '94.99.153.214', 1571848101, '__ci_last_regenerate|i:1571848101;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571839840\";last_ip|s:12:\"5.42.233.154\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('5dad58af2e3df7720793b93fc72e316b6702d7fb', '197.211.57.159', 1572207566, '__ci_last_regenerate|i:1572207565;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('6362e91a61c6d3ce12be7dff2e740d4a398e0811', '54.203.213.125', 1571909057, '__ci_last_regenerate|i:1571909057;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('6aedab856b8869056f2fe3d3160bd2848d64b820', '94.99.153.214', 1571848731, '__ci_last_regenerate|i:1571848731;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571839840\";last_ip|s:12:\"5.42.233.154\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571848582;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('6c5cd81ffa53df56268c0da1394f7edfffa1da30', '203.215.162.82', 1572353786, '__ci_last_regenerate|i:1572353786;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('70e92a3e1c0218e8f2c493fa8e1b00260be35941', '150.129.104.55', 1572456810, '__ci_last_regenerate|i:1572456802;requested_page|s:13:\"admin/welcome\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('70f96dc0fca0887f00bc8fb98021918afee5d93d', '54.166.184.127', 1572452984, '__ci_last_regenerate|i:1572452984;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('7241395262cbd813b59dac97b81835c651e2f148', '203.215.162.82', 1571890947, '__ci_last_regenerate|i:1571890947;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('7609f33716b66549857693c7c7220cdcd8a17883', '37.104.250.70', 1571925581, '__ci_last_regenerate|i:1571925581;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571923618\";last_ip|s:13:\"62.201.253.72\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571925084;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('78640e17bf59fa78c93962d97af46b79055ac301', '94.99.153.214', 1571849953, '__ci_last_regenerate|i:1571849953;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571839840\";last_ip|s:12:\"5.42.233.154\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571848736;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8a6e8eeb3774045a29760375174c8432ec5e65e0', '51.235.160.19', 1572691309, '__ci_last_regenerate|i:1572691305;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572456744\";last_ip|s:14:\"150.129.104.55\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8b9b0cf90fc071f665188e9bc707f5528aa4d9e0', '94.99.135.123', 1572262561, '__ci_last_regenerate|i:1572262561;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8ea2d1d56701ed79eb64dd273d26fc65cc6c40b0', '110.225.91.174', 1571850418, '__ci_last_regenerate|i:1571850382;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571845863\";last_ip|s:13:\"94.99.153.214\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8f7a86847fea74562eb8f2b5acccd1220286f915', '37.104.250.70', 1571926823, '__ci_last_regenerate|i:1571926822;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('8faae5527f28d753f6aa5f28b52705dc0a4b1718', '37.104.250.70', 1571926367, '__ci_last_regenerate|i:1571926335;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571923618\";last_ip|s:13:\"62.201.253.72\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571925084;user_csrf|s:20:\"befIzrSyPH84tgNnidF5\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('93a26c7f4f0ecd7ed2612db87ae1926c188a1272', '188.55.199.92', 1572277039, '__ci_last_regenerate|i:1572277022;requested_page|s:9:\"admin/pos\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('9829e457a4aab08535222ac21a4d40073f56514d', '62.201.253.72', 1572790223, '__ci_last_regenerate|i:1572789932;requested_page|s:15:\"admin/purchases\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572772276\";last_ip|s:15:\"130.193.239.172\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"s37ojKVLa8NYpeAq0wvH\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('999262074bbaf9376fb386ceb7d30733e3e84269', '51.235.160.19', 1572691305, '__ci_last_regenerate|i:1572691305;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572456744\";last_ip|s:14:\"150.129.104.55\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('ab8bcd1854ce095064b6a97ad5dc5d0db6ddd0ab', '130.193.239.172', 1572772925, '__ci_last_regenerate|i:1572772925;requested_page|s:13:\"admin/welcome\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572687102\";last_ip|s:13:\"51.235.160.19\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";user_csrf|s:20:\"XTmPZzxnYf72tKMwIRd1\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b48a5a5225031031533a9419703c0ab931afbe86', '203.215.162.82', 1572408798, '__ci_last_regenerate|i:1572408798;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('b523ee74b9e4faad11977a39229ab79c988f8e98', '45.249.79.194', 1572532044, '__ci_last_regenerate|i:1572532043;requested_page|s:5:\"admin\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('c07699f5713b419b060dcc7c9dd59c9f75f22179', '62.201.253.72', 1572091768, '__ci_last_regenerate|i:1572091764;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572089505\";last_ip|s:14:\"51.235.181.195\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";message|s:38:\"<p>You are successfully logged in.</p>\";__ci_vars|a:1:{s:7:\"message\";s:3:\"old\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d000800499ef05b26abf7dd14b863b4144d814bc', '94.99.153.214', 1571849324, '__ci_last_regenerate|i:1571849324;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571839840\";last_ip|s:12:\"5.42.233.154\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1571848736;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d01ba80418d55b4c7bf126635abe005bbf9cd6df', '62.201.253.72', 1571923629, '__ci_last_regenerate|i:1571923614;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571908953\";last_ip|s:12:\"37.224.76.82\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";message|s:38:\"<p>You are successfully logged in.</p>\";__ci_vars|a:1:{s:7:\"message\";s:3:\"old\";}');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d28b255c1465fab8a9c9d4db358a4efa87dd3ebc', '51.36.91.29', 1572426638, '__ci_last_regenerate|i:1572426638;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d6397f8ffb6028bd1f4e04b93efcd070951e80ca', '94.99.135.123', 1572262562, '__ci_last_regenerate|i:1572262562;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d6ff796077201493470284843139eeab04e54abc', '37.105.252.155', 1572208470, '__ci_last_regenerate|i:1572208470;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d7da9ba7b1ef4087d8fa6abe91fbfed58462fbc3', '51.36.91.29', 1572426676, '__ci_last_regenerate|i:1572426639;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572208406\";last_ip|s:14:\"37.105.252.155\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";last_activity|i:1572426670;error|N;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('d9f19d3e344d6f6f2f620cb891f7f202fcf02b34', '51.235.181.195', 1572090831, '__ci_last_regenerate|i:1572090831;requested_page|s:23:\"admin/sales/sale_by_csv\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572089321\";last_ip|s:14:\"51.235.181.195\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('de3f2ffbce88f17aa7a3b15bd9811a34d2adcfbe', '203.215.162.82', 1572243987, '__ci_last_regenerate|i:1572243987;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e4d23891cd1cee86bc7dfc04dbebd3e27f1c54f2', '203.215.162.82', 1572322275, '__ci_last_regenerate|i:1572322274;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e73d837d0c93a776967f0078df57b15b51f6913f', '212.11.179.74', 1572438394, '__ci_last_regenerate|i:1572438394;identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572426644\";last_ip|s:11:\"51.36.91.29\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e7d18478e6ce38fa938ef43539d7d8a954784577', '94.99.153.214', 1571848410, '__ci_last_regenerate|i:1571848410;requested_page|s:5:\"admin\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1571839840\";last_ip|s:12:\"5.42.233.154\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('e873e7abbd6707bd91997cb8e5888d05af62ee0d', '18.236.69.11', 1572437654, '__ci_last_regenerate|i:1572437654;');
INSERT INTO `sma_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('f5b4a93f7ffad49360a4b8daf1a7fffc45c43a65', '51.235.181.195', 1572090831, '__ci_last_regenerate|i:1572090831;requested_page|s:23:\"admin/sales/sale_by_csv\";identity|s:5:\"admin\";username|s:5:\"admin\";email|s:16:\"yogesh@gmail.com\";user_id|s:1:\"3\";old_last_login|s:10:\"1572089321\";last_ip|s:14:\"51.235.181.195\";avatar|N;gender|s:4:\"male\";group_id|s:1:\"2\";warehouse_id|s:1:\"0\";view_right|s:1:\"1\";edit_right|s:1:\"0\";allow_discount|s:1:\"0\";biller_id|s:1:\"0\";company_id|N;show_cost|s:1:\"0\";show_price|s:1:\"0\";');


#
# 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,
  `discount_type` varchar(20) DEFAULT 'by_value',
  `tax1` tinyint(4) NOT NULL,
  `tax2` tinyint(4) NOT NULL,
  `overselling` tinyint(1) NOT NULL DEFAULT '0',
  `restrict_user` tinyint(4) NOT NULL DEFAULT '0',
  `restrict_calendar` tinyint(4) NOT NULL DEFAULT '0',
  `timezone` varchar(100) DEFAULT NULL,
  `iwidth` int(11) NOT NULL DEFAULT '0',
  `iheight` int(11) NOT NULL,
  `twidth` int(11) NOT NULL,
  `theight` int(11) NOT NULL,
  `watermark` tinyint(1) DEFAULT NULL,
  `reg_ver` tinyint(1) DEFAULT NULL,
  `allow_reg` tinyint(1) DEFAULT NULL,
  `reg_notification` tinyint(1) DEFAULT NULL,
  `auto_reg` tinyint(1) DEFAULT NULL,
  `protocol` varchar(20) NOT NULL DEFAULT 'mail',
  `mailpath` varchar(55) DEFAULT '/usr/sbin/sendmail',
  `smtp_host` varchar(100) DEFAULT NULL,
  `smtp_user` varchar(100) DEFAULT NULL,
  `smtp_pass` varchar(255) DEFAULT NULL,
  `smtp_port` varchar(10) DEFAULT '25',
  `smtp_crypto` varchar(10) DEFAULT NULL,
  `corn` datetime DEFAULT NULL,
  `customer_group` int(11) NOT NULL,
  `default_email` varchar(100) NOT NULL,
  `mmode` tinyint(1) NOT NULL,
  `bc_fix` tinyint(4) NOT NULL DEFAULT '0',
  `auto_detect_barcode` tinyint(1) NOT NULL DEFAULT '0',
  `captcha` tinyint(1) NOT NULL DEFAULT '1',
  `reference_format` tinyint(1) NOT NULL DEFAULT '1',
  `racks` tinyint(1) DEFAULT '0',
  `attributes` tinyint(1) NOT NULL DEFAULT '0',
  `product_expiry` tinyint(1) NOT NULL DEFAULT '0',
  `decimals` tinyint(2) NOT NULL DEFAULT '2',
  `qty_decimals` tinyint(2) NOT NULL DEFAULT '2',
  `decimals_sep` varchar(2) NOT NULL DEFAULT '.',
  `thousands_sep` varchar(2) NOT NULL DEFAULT ',',
  `invoice_view` tinyint(1) DEFAULT '0',
  `default_biller` int(11) DEFAULT NULL,
  `envato_username` varchar(50) DEFAULT NULL,
  `purchase_code` varchar(100) DEFAULT NULL,
  `rtl` tinyint(1) DEFAULT '0',
  `each_spent` decimal(15,4) DEFAULT NULL,
  `ca_point` tinyint(4) DEFAULT NULL,
  `each_sale` decimal(15,4) DEFAULT NULL,
  `sa_point` tinyint(4) DEFAULT NULL,
  `update` tinyint(1) DEFAULT '0',
  `sac` tinyint(1) DEFAULT '0',
  `display_all_products` tinyint(1) DEFAULT '0',
  `display_symbol` tinyint(1) DEFAULT NULL,
  `symbol` varchar(50) DEFAULT NULL,
  `remove_expired` tinyint(1) DEFAULT '0',
  `barcode_separator` varchar(2) NOT NULL DEFAULT '_',
  `set_focus` tinyint(1) NOT NULL DEFAULT '0',
  `price_group` int(11) DEFAULT NULL,
  `barcode_img` tinyint(1) NOT NULL DEFAULT '1',
  `ppayment_prefix` varchar(20) DEFAULT 'POP',
  `disable_editing` smallint(6) DEFAULT '90',
  `qa_prefix` varchar(55) DEFAULT NULL,
  `update_cost` tinyint(1) DEFAULT NULL,
  `apis` tinyint(1) NOT NULL DEFAULT '0',
  `state` varchar(100) DEFAULT NULL,
  `pdf_lib` varchar(20) DEFAULT 'dompdf',
  `purchase_account` int(11) DEFAULT '0',
  `sales_account` int(11) DEFAULT '0',
  `expense_account` int(11) DEFAULT '0',
  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`, `discount_type`, `tax1`, `tax2`, `overselling`, `restrict_user`, `restrict_calendar`, `timezone`, `iwidth`, `iheight`, `twidth`, `theight`, `watermark`, `reg_ver`, `allow_reg`, `reg_notification`, `auto_reg`, `protocol`, `mailpath`, `smtp_host`, `smtp_user`, `smtp_pass`, `smtp_port`, `smtp_crypto`, `corn`, `customer_group`, `default_email`, `mmode`, `bc_fix`, `auto_detect_barcode`, `captcha`, `reference_format`, `racks`, `attributes`, `product_expiry`, `decimals`, `qty_decimals`, `decimals_sep`, `thousands_sep`, `invoice_view`, `default_biller`, `envato_username`, `purchase_code`, `rtl`, `each_spent`, `ca_point`, `each_sale`, `sa_point`, `update`, `sac`, `display_all_products`, `display_symbol`, `symbol`, `remove_expired`, `barcode_separator`, `set_focus`, `price_group`, `barcode_img`, `ppayment_prefix`, `disable_editing`, `qa_prefix`, `update_cost`, `apis`, `state`, `pdf_lib`, `purchase_account`, `sales_account`, `expense_account`) VALUES (1, 'logo2.png', 'logo3.png', 'POS', 'english', 12, 2, '0', 1, 10, '3.2.14', 0, 5, 'SALE', 'QUOTE', 'PO', 'TR', 'DO', 'IPAY', 'SR', 'PR', '', 0, 'default', 1, 1, 1, 1, 'by_percent', 1, 0, 0, 1, 0, 'Asia/Riyadh', 800, 800, 150, 150, 0, 0, 0, 0, NULL, 'smtp', '/usr/sbin/sendmail', 'pop.gmail.com', 'info@pointofsalesaudi.com', 'Pos@123456', '25', NULL, NULL, 1, 'info@pointofsalesaudi.com', 0, 4, 1, 0, 2, 1, 1, 0, 2, 2, '.', ',', 0, 1, 'Graphics_webdesign2002', '7d144173-c8b6-4155-b56c-50295b42c62d', 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, '$', 0, '_', 0, 1, 0, 'POP', 90, '', 0, 0, 'AN', 'dompdf', 1, 3, 4);


#
# TABLE STRUCTURE FOR: sma_skrill
#

DROP TABLE IF EXISTS `sma_skrill`;

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

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


#
# TABLE STRUCTURE FOR: sma_sms
#

DROP TABLE IF EXISTS `sma_sms`;

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

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


#
# TABLE STRUCTURE FOR: sma_stock_count_items
#

DROP TABLE IF EXISTS `sma_stock_count_items`;

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

#
# TABLE STRUCTURE FOR: sma_stock_counts
#

DROP TABLE IF EXISTS `sma_stock_counts`;

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

#
# TABLE STRUCTURE FOR: sma_stores
#

DROP TABLE IF EXISTS `sma_stores`;

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

INSERT INTO `sma_stores` (`id`, `warehouse_id`, `code`, `name`, `address`, `map`, `phone`, `email`, `syncflag`, `price_group_id`, `store_opening_cash`) VALUES (32, 12, 'ST1', 'Store 1', '<p>Store 1</p>', NULL, '', '', 0, NULL, '0');
INSERT INTO `sma_stores` (`id`, `warehouse_id`, `code`, `name`, `address`, `map`, `phone`, `email`, `syncflag`, `price_group_id`, `store_opening_cash`) VALUES (33, 12, 'ST2', 'Store 2', '<p>Store 2</p>', NULL, '', '', 0, NULL, '0');
INSERT INTO `sma_stores` (`id`, `warehouse_id`, `code`, `name`, `address`, `map`, `phone`, `email`, `syncflag`, `price_group_id`, `store_opening_cash`) VALUES (34, 14, 'ST3', 'Store 3', '<p>Store 3</p>', NULL, '', '', 0, NULL, '0');


#
# TABLE STRUCTURE FOR: sma_suspended_bills
#

DROP TABLE IF EXISTS `sma_suspended_bills`;

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

#
# TABLE STRUCTURE FOR: sma_tax_rates
#

DROP TABLE IF EXISTS `sma_tax_rates`;

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

INSERT INTO `sma_tax_rates` (`id`, `name`, `code`, `rate`, `type`) VALUES (1, 'No Tax', 'NT', '0.0000', '2');
INSERT INTO `sma_tax_rates` (`id`, `name`, `code`, `rate`, `type`) VALUES (2, 'VAT @5%', 'VAT5', '5.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_transactions
#

DROP TABLE IF EXISTS `sma_transactions`;

CREATE TABLE `sma_transactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(10) DEFAULT 's',
  `store_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `amount` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `trasaction_type` varchar(10) CHARACTER SET latin1 DEFAULT NULL,
  `note` text CHARACTER SET latin1,
  `bank_id` int(11) DEFAULT '0',
  `bank_deposit_reference_no` varchar(100) DEFAULT NULL,
  `type_id` int(11) DEFAULT '0',
  `pay_id` int(11) DEFAULT '0',
  `added_on` datetime DEFAULT NULL,
  `added_by` int(11) DEFAULT NULL,
  `datetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#
# TABLE STRUCTURE FOR: sma_transfer_items
#

DROP TABLE IF EXISTS `sma_transfer_items`;

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

#
# TABLE STRUCTURE FOR: sma_transfers
#

DROP TABLE IF EXISTS `sma_transfers`;

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

#
# TABLE STRUCTURE FOR: sma_units
#

DROP TABLE IF EXISTS `sma_units`;

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

INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES (2, 'pcs', 'piece', NULL, NULL, NULL, NULL);
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES (3, 'kg', 'kg', NULL, NULL, NULL, NULL);
INSERT INTO `sma_units` (`id`, `code`, `name`, `base_unit`, `operator`, `unit_value`, `operation_value`) VALUES (4, 'gram', 'Gram', 3, '/', NULL, '1000');


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

INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (1, 3, NULL, '42.111.4.46', 'admin', '2019-10-23 08:49:55');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (2, 3, NULL, '5.42.233.154', 'admin', '2019-10-23 10:10:40');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (3, 3, NULL, '94.99.153.214', 'admin', '2019-10-23 11:51:03');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (4, 3, NULL, '110.225.91.174', 'admin', '2019-10-23 13:06:32');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (5, 3, NULL, '37.224.76.82', 'admin', '2019-10-24 05:22:33');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (6, 3, NULL, '62.201.253.72', 'admin', '2019-10-24 09:26:58');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (7, 3, NULL, '37.104.250.70', 'admin', '2019-10-24 09:42:00');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (8, 3, NULL, '49.37.207.252', 'admin', '2019-10-26 02:15:54');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (9, 3, NULL, '51.235.181.195', 'admin', '2019-10-26 07:28:41');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (10, 3, NULL, '51.235.181.195', 'admin', '2019-10-26 07:31:45');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (11, 3, NULL, '62.201.253.72', 'admin', '2019-10-26 08:09:28');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (12, 3, NULL, '37.105.252.155', 'admin', '2019-10-27 16:33:26');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (13, 3, NULL, '51.36.91.29', 'admin', '2019-10-30 05:10:44');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (14, 3, NULL, '212.11.179.74', 'admin', '2019-10-30 08:13:06');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (15, 3, NULL, '150.129.104.55', 'admin', '2019-10-30 13:32:24');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (16, 3, NULL, '51.235.160.19', 'admin', '2019-11-02 05:31:42');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (17, 3, NULL, '130.193.239.172', 'admin', '2019-11-03 04:11:16');
INSERT INTO `sma_user_logins` (`id`, `user_id`, `company_id`, `ip_address`, `login`, `time`) VALUES (18, 3, NULL, '62.201.253.72', 'admin', '2019-11-03 08:59:51');


#
# TABLE STRUCTURE FOR: sma_users
#

DROP TABLE IF EXISTS `sma_users`;

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

INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (2, '203.215.162.82', '', 'owner', '38dc63b680d205e1a16b4e3ccd3587900bf7f630', NULL, 'info@mmdnow.com', NULL, NULL, NULL, '6df73cc169278dd6daab5fe7d6cacb1fed537131', 0, 1571824905, 1, 'Owner', 'Owner', 'stock manager', NULL, '053193922c5a1413883b302f0f554d61.png', NULL, 1, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, '', '');
INSERT INTO `sma_users` (`id`, `last_ip_address`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `avatar`, `gender`, `group_id`, `warehouse_id`, `biller_id`, `company_id`, `show_cost`, `show_price`, `award_points`, `view_right`, `edit_right`, `allow_discount`, `stores_id`, `wherehouse_id_header`) VALUES (3, '62.201.253.72', '::1', 'admin', '38dc63b680d205e1a16b4e3ccd3587900bf7f630', NULL, 'yogesh@gmail.com', NULL, NULL, NULL, 'ead6df1bd53fc68d00a1413bf0aab4f7f8901101', 1526820384, 1572789591, 1, 'yogesh', 'rathore', 'Codezuke', '7898655787', NULL, 'male', 2, 0, 0, NULL, 0, 0, 0, 1, 0, 0, '', '');


#
# TABLE STRUCTURE FOR: sma_variants
#

DROP TABLE IF EXISTS `sma_variants`;

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

INSERT INTO `sma_variants` (`id`, `name`) VALUES (1, 'Black color');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (2, 'Blue Color');
INSERT INTO `sma_variants` (`id`, `name`) VALUES (3, 'Red Color');


#
# TABLE STRUCTURE FOR: sma_verify_app
#

DROP TABLE IF EXISTS `sma_verify_app`;

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

INSERT INTO `sma_verify_app` (`id`, `verification_code`, `is_valid`, `ip`) VALUES (1, '34e738a674888e0283a80205ce3871d7', 'verify', NULL);


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

INSERT INTO `sma_warehouses` (`id`, `code`, `name`, `address`, `map`, `phone`, `email`, `price_group_id`, `opening_cash`) VALUES (12, 'WH1', 'Warehouse 1', '<p>Makkah</p>', NULL, '', '', 1, '0');
INSERT INTO `sma_warehouses` (`id`, `code`, `name`, `address`, `map`, `phone`, `email`, `price_group_id`, `opening_cash`) VALUES (13, 'WH2', 'Warehouse 2', '<p>Addrew</p>', NULL, '3339325261', '', 1, '0');
INSERT INTO `sma_warehouses` (`id`, `code`, `name`, `address`, `map`, `phone`, `email`, `price_group_id`, `opening_cash`) VALUES (14, 'WH3', 'Warehouse 3', '<p>teest</p>', NULL, '', '', 1, '0');


#
# 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, 12, '90.0000', NULL, '10.0000');


#
# TABLE STRUCTURE FOR: sma_warehouses_products_variants
#

DROP TABLE IF EXISTS `sma_warehouses_products_variants`;

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

#
# TABLE STRUCTURE FOR: sma_warehouses_stores_products
#

DROP TABLE IF EXISTS `sma_warehouses_stores_products`;

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

