

CREATE TABLE IF NOT EXISTS `account_type` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO account_type VALUES("1","Savings Account");
INSERT INTO account_type VALUES("2","Chequing Account");
INSERT INTO account_type VALUES("3","Credit Account");
INSERT INTO account_type VALUES("4","Cash Account");





CREATE TABLE IF NOT EXISTS `accounts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `account_type_id` tinyint(4) NOT NULL,
  `account_name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `account_no` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `bank_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `bank_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `default_account` tinyint(4) NOT NULL DEFAULT '0',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO accounts VALUES("1","1","Shawon Ahmed","1000001","Duthch Bangla Bank Limited","Dhaka","1","1");
INSERT INTO accounts VALUES("2","3","Asif Khan","5200044","Brac Bank Limited","Dhaka","0","1");





CREATE TABLE IF NOT EXISTS `backup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;






CREATE TABLE IF NOT EXISTS `countries` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `country` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=243 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO countries VALUES("1","United States","US");
INSERT INTO countries VALUES("2","Canada","CA");
INSERT INTO countries VALUES("3","Afghanistan","AF");
INSERT INTO countries VALUES("4","Albania","AL");
INSERT INTO countries VALUES("5","Algeria","DZ");
INSERT INTO countries VALUES("6","American Samoa","AS");
INSERT INTO countries VALUES("7","Andorra","AD");
INSERT INTO countries VALUES("8","Angola","AO");
INSERT INTO countries VALUES("9","Anguilla","AI");
INSERT INTO countries VALUES("10","Antarctica","AQ");
INSERT INTO countries VALUES("11","Antigua and/or Barbuda","AG");
INSERT INTO countries VALUES("12","Argentina","AR");
INSERT INTO countries VALUES("13","Armenia","AM");
INSERT INTO countries VALUES("14","Aruba","AW");
INSERT INTO countries VALUES("15","Australia","AU");
INSERT INTO countries VALUES("16","Austria","AT");
INSERT INTO countries VALUES("17","Azerbaijan","AZ");
INSERT INTO countries VALUES("18","Bahamas","BS");
INSERT INTO countries VALUES("19","Bahrain","BH");
INSERT INTO countries VALUES("20","Bangladesh","BD");
INSERT INTO countries VALUES("21","Barbados","BB");
INSERT INTO countries VALUES("22","Belarus","BY");
INSERT INTO countries VALUES("23","Belgium","BE");
INSERT INTO countries VALUES("24","Belize","BZ");
INSERT INTO countries VALUES("25","Benin","BJ");
INSERT INTO countries VALUES("26","Bermuda","BM");
INSERT INTO countries VALUES("27","Bhutan","BT");
INSERT INTO countries VALUES("28","Bolivia","BO");
INSERT INTO countries VALUES("29","Bosnia and Herzegovina","BA");
INSERT INTO countries VALUES("30","Botswana","BW");
INSERT INTO countries VALUES("31","Bouvet Island","BV");
INSERT INTO countries VALUES("32","Brazil","BR");
INSERT INTO countries VALUES("33","British lndian Ocean Territory","IO");
INSERT INTO countries VALUES("34","Brunei Darussalam","BN");
INSERT INTO countries VALUES("35","Bulgaria","BG");
INSERT INTO countries VALUES("36","Burkina Faso","BF");
INSERT INTO countries VALUES("37","Burundi","BI");
INSERT INTO countries VALUES("38","Cambodia","KH");
INSERT INTO countries VALUES("39","Cameroon","CM");
INSERT INTO countries VALUES("40","Cape Verde","CV");
INSERT INTO countries VALUES("41","Cayman Islands","KY");
INSERT INTO countries VALUES("42","Central African Republic","CF");
INSERT INTO countries VALUES("43","Chad","TD");
INSERT INTO countries VALUES("44","Chile","CL");
INSERT INTO countries VALUES("45","China","CN");
INSERT INTO countries VALUES("46","Christmas Island","CX");
INSERT INTO countries VALUES("47","Cocos (Keeling) Islands","CC");
INSERT INTO countries VALUES("48","Colombia","CO");
INSERT INTO countries VALUES("49","Comoros","KM");
INSERT INTO countries VALUES("50","Congo","CG");
INSERT INTO countries VALUES("51","Cook Islands","CK");
INSERT INTO countries VALUES("52","Costa Rica","CR");
INSERT INTO countries VALUES("53","Croatia (Hrvatska)","HR");
INSERT INTO countries VALUES("54","Cuba","CU");
INSERT INTO countries VALUES("55","Cyprus","CY");
INSERT INTO countries VALUES("56","Czech Republic","CZ");
INSERT INTO countries VALUES("57","Democratic Republic of Congo","CD");
INSERT INTO countries VALUES("58","Denmark","DK");
INSERT INTO countries VALUES("59","Djibouti","DJ");
INSERT INTO countries VALUES("60","Dominica","DM");
INSERT INTO countries VALUES("61","Dominican Republic","DO");
INSERT INTO countries VALUES("62","East Timor","TP");
INSERT INTO countries VALUES("63","Ecudaor","EC");
INSERT INTO countries VALUES("64","Egypt","EG");
INSERT INTO countries VALUES("65","El Salvador","SV");
INSERT INTO countries VALUES("66","Equatorial Guinea","GQ");
INSERT INTO countries VALUES("67","Eritrea","ER");
INSERT INTO countries VALUES("68","Estonia","EE");
INSERT INTO countries VALUES("69","Ethiopia","ET");
INSERT INTO countries VALUES("70","Falkland Islands (Malvinas)","FK");
INSERT INTO countries VALUES("71","Faroe Islands","FO");
INSERT INTO countries VALUES("72","Fiji","FJ");
INSERT INTO countries VALUES("73","Finland","FI");
INSERT INTO countries VALUES("74","France","FR");
INSERT INTO countries VALUES("75","France, Metropolitan","FX");
INSERT INTO countries VALUES("76","French Guiana","GF");
INSERT INTO countries VALUES("77","French Polynesia","PF");
INSERT INTO countries VALUES("78","French Southern Territories","TF");
INSERT INTO countries VALUES("79","Gabon","GA");
INSERT INTO countries VALUES("80","Gambia","GM");
INSERT INTO countries VALUES("81","Georgia","GE");
INSERT INTO countries VALUES("82","Germany","DE");
INSERT INTO countries VALUES("83","Ghana","GH");
INSERT INTO countries VALUES("84","Gibraltar","GI");
INSERT INTO countries VALUES("85","Greece","GR");
INSERT INTO countries VALUES("86","Greenland","GL");
INSERT INTO countries VALUES("87","Grenada","GD");
INSERT INTO countries VALUES("88","Guadeloupe","GP");
INSERT INTO countries VALUES("89","Guam","GU");
INSERT INTO countries VALUES("90","Guatemala","GT");
INSERT INTO countries VALUES("91","Guinea","GN");
INSERT INTO countries VALUES("92","Guinea-Bissau","GW");
INSERT INTO countries VALUES("93","Guyana","GY");
INSERT INTO countries VALUES("94","Haiti","HT");
INSERT INTO countries VALUES("95","Heard and Mc Donald Islands","HM");
INSERT INTO countries VALUES("96","Honduras","HN");
INSERT INTO countries VALUES("97","Hong Kong","HK");
INSERT INTO countries VALUES("98","Hungary","HU");
INSERT INTO countries VALUES("99","Iceland","IS");
INSERT INTO countries VALUES("100","India","IN");
INSERT INTO countries VALUES("101","Indonesia","ID");
INSERT INTO countries VALUES("102","Iran (Islamic Republic of)","IR");
INSERT INTO countries VALUES("103","Iraq","IQ");
INSERT INTO countries VALUES("104","Ireland","IE");
INSERT INTO countries VALUES("105","Israel","IL");
INSERT INTO countries VALUES("106","Italy","IT");
INSERT INTO countries VALUES("107","Ivory Coast","CI");
INSERT INTO countries VALUES("108","Jamaica","JM");
INSERT INTO countries VALUES("109","Japan","JP");
INSERT INTO countries VALUES("110","Jordan","JO");
INSERT INTO countries VALUES("111","Kazakhstan","KZ");
INSERT INTO countries VALUES("112","Kenya","KE");
INSERT INTO countries VALUES("113","Kiribati","KI");
INSERT INTO countries VALUES("114","Korea, Democratic People\'s Republic of","KP");
INSERT INTO countries VALUES("115","Korea, Republic of","KR");
INSERT INTO countries VALUES("116","Kuwait","KW");
INSERT INTO countries VALUES("117","Kyrgyzstan","KG");
INSERT INTO countries VALUES("118","Lao People\'s Democratic Republic","LA");
INSERT INTO countries VALUES("119","Latvia","LV");
INSERT INTO countries VALUES("120","Lebanon","LB");
INSERT INTO countries VALUES("121","Lesotho","LS");
INSERT INTO countries VALUES("122","Liberia","LR");
INSERT INTO countries VALUES("123","Libyan Arab Jamahiriya","LY");
INSERT INTO countries VALUES("124","Liechtenstein","LI");
INSERT INTO countries VALUES("125","Lithuania","LT");
INSERT INTO countries VALUES("126","Luxembourg","LU");
INSERT INTO countries VALUES("127","Macau","MO");
INSERT INTO countries VALUES("128","Macedonia","MK");
INSERT INTO countries VALUES("129","Madagascar","MG");
INSERT INTO countries VALUES("130","Malawi","MW");
INSERT INTO countries VALUES("131","Malaysia","MY");
INSERT INTO countries VALUES("132","Maldives","MV");
INSERT INTO countries VALUES("133","Mali","ML");
INSERT INTO countries VALUES("134","Malta","MT");
INSERT INTO countries VALUES("135","Marshall Islands","MH");
INSERT INTO countries VALUES("136","Martinique","MQ");
INSERT INTO countries VALUES("137","Mauritania","MR");
INSERT INTO countries VALUES("138","Mauritius","MU");
INSERT INTO countries VALUES("139","Mayotte","TY");
INSERT INTO countries VALUES("140","Mexico","MX");
INSERT INTO countries VALUES("141","Micronesia, Federated States of","FM");
INSERT INTO countries VALUES("142","Moldova, Republic of","MD");
INSERT INTO countries VALUES("143","Monaco","MC");
INSERT INTO countries VALUES("144","Mongolia","MN");
INSERT INTO countries VALUES("145","Montserrat","MS");
INSERT INTO countries VALUES("146","Morocco","MA");
INSERT INTO countries VALUES("147","Mozambique","MZ");
INSERT INTO countries VALUES("148","Myanmar","MM");
INSERT INTO countries VALUES("149","Namibia","NA");
INSERT INTO countries VALUES("150","Nauru","NR");
INSERT INTO countries VALUES("151","Nepal","NP");
INSERT INTO countries VALUES("152","Netherlands","NL");
INSERT INTO countries VALUES("153","Netherlands Antilles","AN");
INSERT INTO countries VALUES("154","New Caledonia","NC");
INSERT INTO countries VALUES("155","New Zealand","NZ");
INSERT INTO countries VALUES("156","Nicaragua","NI");
INSERT INTO countries VALUES("157","Niger","NE");
INSERT INTO countries VALUES("158","Nigeria","NG");
INSERT INTO countries VALUES("159","Niue","NU");
INSERT INTO countries VALUES("160","Norfork Island","NF");
INSERT INTO countries VALUES("161","Northern Mariana Islands","MP");
INSERT INTO countries VALUES("162","Norway","NO");
INSERT INTO countries VALUES("163","Oman","OM");
INSERT INTO countries VALUES("164","Pakistan","PK");
INSERT INTO countries VALUES("165","Palau","PW");
INSERT INTO countries VALUES("166","Panama","PA");
INSERT INTO countries VALUES("167","Papua New Guinea","PG");
INSERT INTO countries VALUES("168","Paraguay","PY");
INSERT INTO countries VALUES("169","Peru","PE");
INSERT INTO countries VALUES("170","Philippines","PH");
INSERT INTO countries VALUES("171","Pitcairn","PN");
INSERT INTO countries VALUES("172","Poland","PL");
INSERT INTO countries VALUES("173","Portugal","PT");
INSERT INTO countries VALUES("174","Puerto Rico","PR");
INSERT INTO countries VALUES("175","Qatar","QA");
INSERT INTO countries VALUES("176","Republic of South Sudan","SS");
INSERT INTO countries VALUES("177","Reunion","RE");
INSERT INTO countries VALUES("178","Romania","RO");
INSERT INTO countries VALUES("179","Russian Federation","RU");
INSERT INTO countries VALUES("180","Rwanda","RW");
INSERT INTO countries VALUES("181","Saint Kitts and Nevis","KN");
INSERT INTO countries VALUES("182","Saint Lucia","LC");
INSERT INTO countries VALUES("183","Saint Vincent and the Grenadines","VC");
INSERT INTO countries VALUES("184","Samoa","WS");
INSERT INTO countries VALUES("185","San Marino","SM");
INSERT INTO countries VALUES("186","Sao Tome and Principe","ST");
INSERT INTO countries VALUES("187","Saudi Arabia","SA");
INSERT INTO countries VALUES("188","Senegal","SN");
INSERT INTO countries VALUES("189","Serbia","RS");
INSERT INTO countries VALUES("190","Seychelles","SC");
INSERT INTO countries VALUES("191","Sierra Leone","SL");
INSERT INTO countries VALUES("192","Singapore","SG");
INSERT INTO countries VALUES("193","Slovakia","SK");
INSERT INTO countries VALUES("194","Slovenia","SI");
INSERT INTO countries VALUES("195","Solomon Islands","SB");
INSERT INTO countries VALUES("196","Somalia","SO");
INSERT INTO countries VALUES("197","South Africa","ZA");
INSERT INTO countries VALUES("198","South Georgia South Sandwich Islands","GS");
INSERT INTO countries VALUES("199","Spain","ES");
INSERT INTO countries VALUES("200","Sri Lanka","LK");
INSERT INTO countries VALUES("201","St. Helena","SH");
INSERT INTO countries VALUES("202","St. Pierre and Miquelon","PM");
INSERT INTO countries VALUES("203","Sudan","SD");
INSERT INTO countries VALUES("204","Suriname","SR");
INSERT INTO countries VALUES("205","Svalbarn and Jan Mayen Islands","SJ");
INSERT INTO countries VALUES("206","Swaziland","SZ");
INSERT INTO countries VALUES("207","Sweden","SE");
INSERT INTO countries VALUES("208","Switzerland","CH");
INSERT INTO countries VALUES("209","Syrian Arab Republic","SY");
INSERT INTO countries VALUES("210","Taiwan","TW");
INSERT INTO countries VALUES("211","Tajikistan","TJ");
INSERT INTO countries VALUES("212","Tanzania, United Republic of","TZ");
INSERT INTO countries VALUES("213","Thailand","TH");
INSERT INTO countries VALUES("214","Togo","TG");
INSERT INTO countries VALUES("215","Tokelau","TK");
INSERT INTO countries VALUES("216","Tonga","TO");
INSERT INTO countries VALUES("217","Trinidad and Tobago","TT");
INSERT INTO countries VALUES("218","Tunisia","TN");
INSERT INTO countries VALUES("219","Turkey","TR");
INSERT INTO countries VALUES("220","Turkmenistan","TM");
INSERT INTO countries VALUES("221","Turks and Caicos Islands","TC");
INSERT INTO countries VALUES("222","Tuvalu","TV");
INSERT INTO countries VALUES("223","Uganda","UG");
INSERT INTO countries VALUES("224","Ukraine","UA");
INSERT INTO countries VALUES("225","United Arab Emirates","AE");
INSERT INTO countries VALUES("226","United Kingdom","GB");
INSERT INTO countries VALUES("227","United States minor outlying islands","UM");
INSERT INTO countries VALUES("228","Uruguay","UY");
INSERT INTO countries VALUES("229","Uzbekistan","UZ");
INSERT INTO countries VALUES("230","Vanuatu","VU");
INSERT INTO countries VALUES("231","Vatican City State","VA");
INSERT INTO countries VALUES("232","Venezuela","VE");
INSERT INTO countries VALUES("233","Vietnam","VN");
INSERT INTO countries VALUES("234","Virgin Islands (British)","VG");
INSERT INTO countries VALUES("235","Virgin Islands (U.S.)","VI");
INSERT INTO countries VALUES("236","Wallis and Futuna Islands","WF");
INSERT INTO countries VALUES("237","Western Sahara","EH");
INSERT INTO countries VALUES("238","Yemen","YE");
INSERT INTO countries VALUES("239","Yugoslavia","YU");
INSERT INTO countries VALUES("240","Zaire","ZR");
INSERT INTO countries VALUES("241","Zambia","ZM");
INSERT INTO countries VALUES("242","Zimbabwe","ZW");





CREATE TABLE IF NOT EXISTS `currency` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `symbol` char(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO currency VALUES("1","American Dolar","USD");
INSERT INTO currency VALUES("2","Bangladeshi Taka","BDT");





CREATE TABLE IF NOT EXISTS `customers` (
  `customer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `zipcode` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `country_id` tinyint(4) NOT NULL,
  `remember_token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO customers VALUES("1","Shajahan Ali","customer@w3developer.org","$2y$10$NFl9z/cbBkX8q41bIkZbm.32OT/Ogp2fYKIZXifzgm2M6n1oG5/0C","249/01(Top Floor)","Dhaka","123456","Dhaka","1216","20","","1","2017-04-28 02:49:14","");
INSERT INTO customers VALUES("2","Abul Khayer Rony","rony@gmail.com","$2y$10$NFl9z/cbBkX8q41bIkZbm.32OT/Ogp2fYKIZXifzgm2M6n1oG5/0C","120/5","Rangpur","123456","Rangpur","1200","20","","1","2017-04-28 02:49:14","");
INSERT INTO customers VALUES("3","Nazmul Hossain","nazmul@gmail.com","$2y$10$NFl9z/cbBkX8q41bIkZbm.32OT/Ogp2fYKIZXifzgm2M6n1oG5/0C","123/1","Bogra","123456","Rajshahi","5800","20","","1","2017-04-28 02:49:14","");





CREATE TABLE IF NOT EXISTS `income_expense_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO income_expense_categories VALUES("1","Sales","income");
INSERT INTO income_expense_categories VALUES("2","Sallery","income");
INSERT INTO income_expense_categories VALUES("3","income","Bonus");
INSERT INTO income_expense_categories VALUES("4","Utility Bill","expense");
INSERT INTO income_expense_categories VALUES("5","Repair & MaintEnance","expense");
INSERT INTO income_expense_categories VALUES("6","House Rent","expense");





CREATE TABLE IF NOT EXISTS `invoice_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `stock_id` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tax_percent` double NOT NULL DEFAULT '0',
  `quantity` double NOT NULL DEFAULT '0',
  `unit_price` double NOT NULL DEFAULT '0',
  `discount_percent` double NOT NULL DEFAULT '0',
  `subtotal` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO invoice_details VALUES("1","1","1","IPHONE 5","0","5","25000","0","125000");
INSERT INTO invoice_details VALUES("2","2","3","PEPSI","0","100","25","0","2500");
INSERT INTO invoice_details VALUES("3","3","5","HP Laptop 430","0","10","25000","10","225000");
INSERT INTO invoice_details VALUES("4","4","2","SAMSUNG S7","15","10","20000","15","195500");





CREATE TABLE IF NOT EXISTS `invoices` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `reference` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `comments` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date` date NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `total` double NOT NULL DEFAULT '0',
  `paid` double NOT NULL DEFAULT '0',
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO invoices VALUES("1","1","2","INV-001","","2017-04-12","1","125000","125000","","0","2017-04-12 02:49:15");
INSERT INTO invoices VALUES("2","1","2","INV-002","","2017-04-23","1","2500","0","","0","2017-04-23 02:49:15");
INSERT INTO invoices VALUES("3","1","3","INV-003","","2017-04-28","1","225000","0","","0","2017-04-28 02:49:15");
INSERT INTO invoices VALUES("4","1","1","INV-004","","2017-04-25","1","195500","95500","","0","2017-04-25 02:49:15");





CREATE TABLE IF NOT EXISTS `item_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO item_category VALUES("1","Computer");
INSERT INTO item_category VALUES("2","Mobile");
INSERT INTO item_category VALUES("3","Food");





CREATE TABLE IF NOT EXISTS `items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stock_id` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sale_price` double NOT NULL,
  `purchase_price` double NOT NULL,
  `category_id` smallint(6) NOT NULL,
  `item_image` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `deleted_status` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO items VALUES("1","IPHONE5","IPHONE 5","25000","20000","2","1492268462.jpg","0");
INSERT INTO items VALUES("2","SAMSUNG","SAMSUNG S7","20000","15000","2","1492268881.jpg","0");
INSERT INTO items VALUES("3","PEPSI","PEPSI","25","20","3","1492268923.jpg","0");
INSERT INTO items VALUES("4","KFC","KFC Fried Chiken","1000","750","3","1492268974.jpg","0");
INSERT INTO items VALUES("5","LAPTOP","HP Laptop 430","25000","18000","1","1492269025.jpg","0");





CREATE TABLE IF NOT EXISTS `migrations` (
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO migrations VALUES("2014_10_12_100000_create_password_resets_table","1");
INSERT INTO migrations VALUES("2016_08_30_100832_create_users_table","1");
INSERT INTO migrations VALUES("2016_08_30_104058_create_user_role_table","1");
INSERT INTO migrations VALUES("2016_08_30_104506_create_item_category_table","1");
INSERT INTO migrations VALUES("2016_08_30_105339_create_warehouse_table","1");
INSERT INTO migrations VALUES("2016_08_30_110408_create_items_table","1");
INSERT INTO migrations VALUES("2016_09_20_123717_create_stock_move_table","1");
INSERT INTO migrations VALUES("2016_10_05_113244_create_customer_table","1");
INSERT INTO migrations VALUES("2016_10_05_113333_create_invoices_table","1");
INSERT INTO migrations VALUES("2016_10_05_113333_create_orders_table","1");
INSERT INTO migrations VALUES("2016_10_05_113356_create_invoice_details_table","1");
INSERT INTO migrations VALUES("2016_10_05_113356_create_order_details_table","1");
INSERT INTO migrations VALUES("2016_10_18_060431_create_supplier_table","1");
INSERT INTO migrations VALUES("2016_10_18_063931_create_purchase_order_table","1");
INSERT INTO migrations VALUES("2016_10_18_064211_create_purchase_order_detail_table","1");
INSERT INTO migrations VALUES("2016_11_15_121343_create_settings_table","1");
INSERT INTO migrations VALUES("2016_12_03_062131_create_payment_method_table","1");
INSERT INTO migrations VALUES("2016_12_03_062247_create_payment_history_table","1");
INSERT INTO migrations VALUES("2016_12_03_065915_create_currency_table","1");
INSERT INTO migrations VALUES("2016_12_03_070030_create_country_table","1");
INSERT INTO migrations VALUES("2016_12_03_071018_create_backup_table","1");
INSERT INTO migrations VALUES("2017_03_20_104506_create_account_type_table","1");
INSERT INTO migrations VALUES("2017_03_20_104506_create_accounts_table","1");
INSERT INTO migrations VALUES("2017_03_20_104506_create_income_expense_categories_table","1");
INSERT INTO migrations VALUES("2017_03_20_104506_create_transactions_table","1");
INSERT INTO migrations VALUES("2017_04_10_062131_create_payment_gateway_table","1");





CREATE TABLE IF NOT EXISTS `order_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `stock_id` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tax_percent` double NOT NULL DEFAULT '0',
  `quantity` double NOT NULL DEFAULT '0',
  `unit_price` double NOT NULL DEFAULT '0',
  `discount_percent` double NOT NULL DEFAULT '0',
  `subtotal` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO order_details VALUES("1","1","1","IPHONE 5","0","10","25000","0","250000");
INSERT INTO order_details VALUES("2","1","2","SAMSUNG S7","0","10","20000","0","200000");
INSERT INTO order_details VALUES("3","2","3","PEPSI","0","10","25","10","225");
INSERT INTO order_details VALUES("4","3","4","SKFC Fried Chicken","0","5","1000","0","5000");





CREATE TABLE IF NOT EXISTS `orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `reference` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `comments` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date` date NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `total` double NOT NULL DEFAULT '0',
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'order',
  `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO orders VALUES("1","1","1","SO-001","","2017-04-12","1","450000","order","0","2017-04-12 02:49:15");
INSERT INTO orders VALUES("2","1","1","SO-002","","2017-04-17","1","225","order","0","2017-04-17 02:49:15");
INSERT INTO orders VALUES("3","1","3","SO-003","","2017-04-28","1","5000","order","0","2017-04-28 02:49:15");





CREATE TABLE IF NOT EXISTS `password_resets` (
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  KEY `password_resets_email_index` (`email`),
  KEY `password_resets_token_index` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;






CREATE TABLE IF NOT EXISTS `payment_gateway` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `site` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO payment_gateway VALUES("1","username","demo@gmail.com","PayPal");
INSERT INTO payment_gateway VALUES("2","password","9DDYZX2JLA6QL668","PayPal");
INSERT INTO payment_gateway VALUES("3","signature","AFcWxV21C7fd0v3bYYYRCpSSRl31ABayz5pdk84jno7.Udj6-U8ffwbT","PayPal");
INSERT INTO payment_gateway VALUES("4","mode","sandbox","PayPal");





CREATE TABLE IF NOT EXISTS `payment_history` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `transaction_id` int(11) NOT NULL,
  `reference` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL DEFAULT '0',
  `payment_date` date NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO payment_history VALUES("1","1","1","9","INV-004","95500","2017-04-26","2017-04-26 02:49:17");
INSERT INTO payment_history VALUES("2","1","1","10","INV-001","125000","2017-04-28","2017-04-28 02:49:17");





CREATE TABLE IF NOT EXISTS `payment_method` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `defaults` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO payment_method VALUES("1","Bank","1");
INSERT INTO payment_method VALUES("2","Cash","0");





CREATE TABLE IF NOT EXISTS `purchase_order_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `stock_id` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tax_percent` double NOT NULL DEFAULT '0',
  `quantity` double NOT NULL DEFAULT '0',
  `unit_price` double NOT NULL DEFAULT '0',
  `subtotal` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO purchase_order_details VALUES("1","1","1","IPHONE 5","0","1000","20000","20000000");
INSERT INTO purchase_order_details VALUES("2","1","2","SAMSUNG S7","0","1000","15000","15000000");
INSERT INTO purchase_order_details VALUES("3","2","3","PEPSI","10","10000","20","220000");
INSERT INTO purchase_order_details VALUES("4","3","4","KFC Fried Chicken","0","1000","750","750000");
INSERT INTO purchase_order_details VALUES("5","3","5","HP Laptop 430","0","1000","18000","18000000");





CREATE TABLE IF NOT EXISTS `purchase_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `reference` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `comments` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date` date NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `total` double NOT NULL DEFAULT '0',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO purchase_orders VALUES("1","1","1","PO-001","","2017-04-14","1","35000000","2017-04-14 02:49:13");
INSERT INTO purchase_orders VALUES("2","1","2","PO-002","","2017-04-23","1","220000","2017-04-23 02:49:13");
INSERT INTO purchase_orders VALUES("3","1","3","PO-003","","2017-04-28","1","18750000","2017-04-28 02:49:13");





CREATE TABLE IF NOT EXISTS `settings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `field` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `value` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO settings VALUES("1","company_name","Inventory & Billing Manager");
INSERT INTO settings VALUES("2","site_short_name","IBM");
INSERT INTO settings VALUES("3","company_email","support@w3developer.org");
INSERT INTO settings VALUES("4","company_phone","1234");
INSERT INTO settings VALUES("5","company_street","Dhaka");
INSERT INTO settings VALUES("6","company_city","Dhaka");
INSERT INTO settings VALUES("7","company_state","Dhaka");
INSERT INTO settings VALUES("8","company_zipCode","1216");
INSERT INTO settings VALUES("9","company_country_id","Bangladesh");
INSERT INTO settings VALUES("10","dflt_currency_id","1");





CREATE TABLE IF NOT EXISTS `stock_moves` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stock_id` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `order_id` int(11) NOT NULL,
  `person_id` int(11) DEFAULT NULL,
  `transaction_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `warehouse_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `order_reference` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `reference` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `transaction_reference_id` int(11) NOT NULL,
  `transfer_id` int(11) DEFAULT NULL,
  `qty` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO stock_moves VALUES("1","1","0","1","purchase","1","2017-04-14","PO-001","store_in_1","1","","1000");
INSERT INTO stock_moves VALUES("2","2","0","1","purchase","1","2017-04-14","PO-001","store_in_1","1","","1000");
INSERT INTO stock_moves VALUES("3","3","0","1","purchase","1","2017-04-23","PO-002","store_in_2","2","","10000");
INSERT INTO stock_moves VALUES("4","4","0","1","purchase","1","2017-04-28","PO-003","store_in_3","3","","1000");
INSERT INTO stock_moves VALUES("5","5","0","1","purchase","1","2017-04-28","PO-003","store_in_3","3","","1000");
INSERT INTO stock_moves VALUES("6","1","0","1","sale","1","2017-04-12","INV-001","store_out_1","1","","-5");
INSERT INTO stock_moves VALUES("7","3","0","1","sale","1","2017-04-23","INV-002","store_out_2","2","","-100");
INSERT INTO stock_moves VALUES("8","5","0","1","sale","1","2017-04-28","INV-003","store_out_3","3","","-10");
INSERT INTO stock_moves VALUES("9","2","0","1","sale","1","2017-04-25","INV-004","store_out_4","4","","-10");





CREATE TABLE IF NOT EXISTS `suppliers` (
  `supplier_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `zipcode` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `country_id` tinyint(4) NOT NULL,
  `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`supplier_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO suppliers VALUES("1","Shahed Hasan","shahed@yahoo.com","240/01(5th Floor)","Dhaka","123456","Dhaka","1000","20","0","","");
INSERT INTO suppliers VALUES("2","Tarikul Islam","tarek@yahoo.com","240/04","Bogra","123456","Rajshahi","5800","20","0","","");
INSERT INTO suppliers VALUES("3","Abu Rayhan","rayhan@yahoo.com","249/01(Top Floor)","Dhaka","123456","Dhaka","1215","20","0","","");





CREATE TABLE IF NOT EXISTS `transactions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `trans_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `account_no` int(11) NOT NULL,
  `trans_date` date NOT NULL,
  `reference` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `category_id` int(11) NOT NULL,
  `payment_method` int(11) NOT NULL,
  `attachment` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO transactions VALUES("1","1","1000","cash-in","1","2017-04-28","opening balance","opening balance","1","1","","2017-04-28 02:49:13");
INSERT INTO transactions VALUES("2","1","5000","cash-in","2","2017-04-28","opening balance","opening balance","1","1","","2017-04-28 02:49:13");
INSERT INTO transactions VALUES("3","1","250000","deposit","1","2017-03-28","","Income from sell my old Car","1","1","","2017-04-28 02:49:13");
INSERT INTO transactions VALUES("4","1","-50000","expense","1","2017-03-28","","Repair my old AC","5","1","","2017-03-28 02:49:13");
INSERT INTO transactions VALUES("5","1","12000","deposit","1","2017-04-14","","Office Sallery","2","1","","2017-04-14 02:49:13");
INSERT INTO transactions VALUES("6","1","-20000","expense","1","2017-04-14","","Paid House Rent ","6","1","","2017-04-14 02:49:13");
INSERT INTO transactions VALUES("7","1","-120200","expense","1","2017-04-28","","Shopping","4","1","","2017-04-28 02:49:13");
INSERT INTO transactions VALUES("8","1","150000","deposit","2","2017-04-28","","Income from business","1","1","","2017-04-28 02:49:13");
INSERT INTO transactions VALUES("9","1","95500","sale-income","2","2017-04-26","INV-004","Income from business","1","1","","2017-04-26 02:49:13");
INSERT INTO transactions VALUES("10","1","125000","sale-income","1","2017-04-28","INV-001","Income from sale item","1","1","","2017-04-28 02:49:13");





CREATE TABLE IF NOT EXISTS `user_role` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `role` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sections` text COLLATE utf8_unicode_ci NOT NULL,
  `areas` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO user_role VALUES("1","Super Admin","a:29:{s:8:\"customer\";s:3:\"100\";s:4:\"item\";s:3:\"200\";s:10:\"order_sale\";s:3:\"300\";s:5:\"order\";s:3:\"400\";s:7:\"invoice\";s:3:\"500\";s:7:\"payment\";s:3:\"600\";s:8:\"supplier\";s:3:\"700\";s:8:\"purchase\";s:3:\"800\";s:11:\"transaction\";s:3:\"900\";s:7:\"deposit\";s:4:\"1000\";s:7:\"expense\";s:4:\"1100\";s:16:\"balance_transfer\";s:4:\"1200\";s:16:\"view_transaction\";s:4:\"1300\";s:12:\"bank_balance\";s:4:\"1400\";s:11:\"new_account\";s:4:\"1500\";s:12:\"list_account\";s:4:\"1600\";s:6:\"report\";s:4:\"1700\";s:8:\"settings\";s:4:\"1700\";s:9:\"warehouse\";s:4:\"1800\";s:13:\"item_category\";s:4:\"1900\";s:15:\"income_category\";s:4:\"2000\";s:16:\"expense_category\";s:4:\"2100\";s:8:\"currency\";s:4:\"2200\";s:14:\"payment_method\";s:4:\"2300\";s:12:\"site_setting\";s:4:\"2400\";s:6:\"backup\";s:4:\"2500\";s:4:\"role\";s:4:\"2600\";s:6:\"people\";s:4:\"2700\";s:4:\"user\";s:4:\"2800\";}","a:68:{s:12:\"customer_add\";s:3:\"101\";s:13:\"customer_edit\";s:3:\"102\";s:15:\"customer_delete\";s:3:\"103\";s:8:\"item_add\";s:3:\"201\";s:9:\"item_edit\";s:3:\"202\";s:11:\"item_delete\";s:3:\"203\";s:9:\"order_add\";s:3:\"401\";s:10:\"order_edit\";s:3:\"402\";s:12:\"order_delete\";s:3:\"403\";s:11:\"invoice_add\";s:3:\"501\";s:12:\"invoice_edit\";s:3:\"502\";s:14:\"invoice_delete\";s:3:\"503\";s:11:\"payment_add\";s:3:\"601\";s:12:\"payment_edit\";s:3:\"602\";s:14:\"payment_delete\";s:3:\"603\";s:12:\"supplier_add\";s:3:\"701\";s:13:\"supplier_edit\";s:3:\"702\";s:15:\"supplier_delete\";s:3:\"703\";s:12:\"purchase_add\";s:3:\"801\";s:13:\"purchase_edit\";s:3:\"802\";s:15:\"purchase_delete\";s:3:\"803\";s:15:\"transaction_add\";s:3:\"901\";s:16:\"transaction_edit\";s:3:\"902\";s:18:\"transaction_delete\";s:3:\"903\";s:11:\"deposit_add\";s:4:\"1001\";s:12:\"deposit_edit\";s:4:\"1002\";s:14:\"deposit_delete\";s:4:\"1003\";s:11:\"expense_add\";s:4:\"1101\";s:12:\"expense_edit\";s:4:\"1102\";s:14:\"expense_delete\";s:4:\"1103\";s:20:\"balance_transfer_add\";s:4:\"1201\";s:21:\"balance_transfer_edit\";s:4:\"1202\";s:23:\"balance_transfer_delete\";s:4:\"1203\";s:15:\"new_account_add\";s:4:\"1501\";s:16:\"new_account_edit\";s:4:\"1502\";s:18:\"new_account_delete\";s:4:\"1503\";s:15:\"purchase_report\";s:4:\"1701\";s:11:\"sale_report\";s:4:\"1702\";s:13:\"income_report\";s:4:\"1703\";s:14:\"expense_report\";s:4:\"1704\";s:17:\"income_vs_expense\";s:4:\"1705\";s:16:\"inventory_report\";s:4:\"1706\";s:13:\"warehouse_add\";s:4:\"1801\";s:14:\"warehouse_edit\";s:4:\"1802\";s:16:\"warehouse_delete\";s:4:\"1803\";s:17:\"item_category_add\";s:4:\"1901\";s:18:\"item_category_edit\";s:4:\"1902\";s:20:\"item_category_delete\";s:4:\"1903\";s:19:\"income_category_add\";s:4:\"2001\";s:20:\"income_category_edit\";s:4:\"2002\";s:22:\"income_category_delete\";s:4:\"2003\";s:20:\"expense_category_add\";s:4:\"2101\";s:21:\"expense_category_edit\";s:4:\"2102\";s:23:\"expense_category_delete\";s:4:\"2103\";s:12:\"currency_add\";s:4:\"2201\";s:13:\"currency_edit\";s:4:\"2202\";s:15:\"currency_delete\";s:4:\"2203\";s:18:\"payment_method_add\";s:4:\"2301\";s:19:\"payment_method_edit\";s:4:\"2302\";s:21:\"payment_method_delete\";s:4:\"2303\";s:10:\"backup_add\";s:4:\"2501\";s:13:\"backup_delete\";s:4:\"2502\";s:8:\"role_add\";s:4:\"2601\";s:9:\"role_edit\";s:4:\"2602\";s:11:\"role_delete\";s:4:\"2603\";s:8:\"user_add\";s:4:\"2801\";s:9:\"user_edit\";s:4:\"2802\";s:11:\"user_delete\";s:4:\"2803\";}");
INSERT INTO user_role VALUES("2","Manager","a:29:{s:8:\"customer\";s:3:\"100\";s:4:\"item\";s:3:\"200\";s:10:\"order_sale\";s:3:\"300\";s:5:\"order\";s:3:\"400\";s:7:\"invoice\";s:3:\"500\";s:7:\"payment\";s:3:\"600\";s:8:\"supplier\";s:3:\"700\";s:8:\"purchase\";s:3:\"800\";s:11:\"transaction\";s:3:\"900\";s:7:\"deposit\";s:4:\"1000\";s:7:\"expense\";s:4:\"1100\";s:16:\"balance_transfer\";s:4:\"1200\";s:16:\"view_transaction\";s:4:\"1300\";s:12:\"bank_balance\";s:4:\"1400\";s:11:\"new_account\";s:4:\"1500\";s:12:\"list_account\";s:4:\"1600\";s:6:\"report\";s:4:\"1700\";s:8:\"settings\";s:4:\"1700\";s:9:\"warehouse\";s:4:\"1800\";s:13:\"item_category\";s:4:\"1900\";s:15:\"income_category\";s:4:\"2000\";s:16:\"expense_category\";s:4:\"2100\";s:8:\"currency\";s:4:\"2200\";s:14:\"payment_method\";s:4:\"2300\";s:12:\"site_setting\";s:4:\"2400\";s:6:\"backup\";s:4:\"2500\";s:4:\"role\";s:4:\"2600\";s:6:\"people\";s:4:\"2700\";s:4:\"user\";s:4:\"2800\";}","a:68:{s:12:\"customer_add\";s:3:\"101\";s:13:\"customer_edit\";s:3:\"102\";s:15:\"customer_delete\";s:3:\"103\";s:8:\"item_add\";s:3:\"201\";s:9:\"item_edit\";s:3:\"202\";s:11:\"item_delete\";s:3:\"203\";s:9:\"order_add\";s:3:\"401\";s:10:\"order_edit\";s:3:\"402\";s:12:\"order_delete\";s:3:\"403\";s:11:\"invoice_add\";s:3:\"501\";s:12:\"invoice_edit\";s:3:\"502\";s:14:\"invoice_delete\";s:3:\"503\";s:11:\"payment_add\";s:3:\"601\";s:12:\"payment_edit\";s:3:\"602\";s:14:\"payment_delete\";s:3:\"603\";s:12:\"supplier_add\";s:3:\"701\";s:13:\"supplier_edit\";s:3:\"702\";s:15:\"supplier_delete\";s:3:\"703\";s:12:\"purchase_add\";s:3:\"801\";s:13:\"purchase_edit\";s:3:\"802\";s:15:\"purchase_delete\";s:3:\"803\";s:15:\"transaction_add\";s:3:\"901\";s:16:\"transaction_edit\";s:3:\"902\";s:18:\"transaction_delete\";s:3:\"903\";s:11:\"deposit_add\";s:4:\"1001\";s:12:\"deposit_edit\";s:4:\"1002\";s:14:\"deposit_delete\";s:4:\"1003\";s:11:\"expense_add\";s:4:\"1101\";s:12:\"expense_edit\";s:4:\"1102\";s:14:\"expense_delete\";s:4:\"1103\";s:20:\"balance_transfer_add\";s:4:\"1201\";s:21:\"balance_transfer_edit\";s:4:\"1202\";s:23:\"balance_transfer_delete\";s:4:\"1203\";s:15:\"new_account_add\";s:4:\"1501\";s:16:\"new_account_edit\";s:4:\"1502\";s:18:\"new_account_delete\";s:4:\"1503\";s:15:\"purchase_report\";s:4:\"1701\";s:11:\"sale_report\";s:4:\"1702\";s:13:\"income_report\";s:4:\"1703\";s:14:\"expense_report\";s:4:\"1704\";s:17:\"income_vs_expense\";s:4:\"1705\";s:16:\"inventory_report\";s:4:\"1706\";s:13:\"warehouse_add\";s:4:\"1801\";s:14:\"warehouse_edit\";s:4:\"1802\";s:16:\"warehouse_delete\";s:4:\"1803\";s:17:\"item_category_add\";s:4:\"1901\";s:18:\"item_category_edit\";s:4:\"1902\";s:20:\"item_category_delete\";s:4:\"1903\";s:19:\"income_category_add\";s:4:\"2001\";s:20:\"income_category_edit\";s:4:\"2002\";s:22:\"income_category_delete\";s:4:\"2003\";s:20:\"expense_category_add\";s:4:\"2101\";s:21:\"expense_category_edit\";s:4:\"2102\";s:23:\"expense_category_delete\";s:4:\"2103\";s:12:\"currency_add\";s:4:\"2201\";s:13:\"currency_edit\";s:4:\"2202\";s:15:\"currency_delete\";s:4:\"2203\";s:18:\"payment_method_add\";s:4:\"2301\";s:19:\"payment_method_edit\";s:4:\"2302\";s:21:\"payment_method_delete\";s:4:\"2303\";s:10:\"backup_add\";s:4:\"2501\";s:13:\"backup_delete\";s:4:\"2502\";s:8:\"role_add\";s:4:\"2601\";s:9:\"role_edit\";s:4:\"2602\";s:11:\"role_delete\";s:4:\"2603\";s:8:\"user_add\";s:4:\"2801\";s:9:\"user_edit\";s:4:\"2802\";s:11:\"user_delete\";s:4:\"2803\";}");





CREATE TABLE IF NOT EXISTS `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int(11) NOT NULL DEFAULT '1',
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `picture` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO users VALUES("1","1","Admin","admin@w3developer.org","$2y$10$l0AVt19nS3QBDHfxN0BFIeHXBJ5abHFDDfwFPthbncAuSOrjNlMFi","","","","");
INSERT INTO users VALUES("2","2","Manager","manager@w3developer.org","$2y$10$l0AVt19nS3QBDHfxN0BFIeHXBJ5abHFDDfwFPthbncAuSOrjNlMFi","","","","");





CREATE TABLE IF NOT EXISTS `warehouse` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO warehouse VALUES("1","Default Location","0");



