DROP TABLE accessrights;

CREATE TABLE `accessrights` (
  `rights_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `rights_LevelID` int(11) DEFAULT NULL,
  `rights_LevelName` varchar(200) DEFAULT NULL,
  `rights_AccessCode` double DEFAULT '0',
  `rights_Desc` varchar(200) DEFAULT NULL,
  `rights_Access` varchar(20) DEFAULT 'YES',
  PRIMARY KEY (`rights_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=1195 DEFAULT CHARSET=latin1;

INSERT INTO accessrights VALUES("1","1","Admin","101","Pay Customer","YES");
INSERT INTO accessrights VALUES("2","1","Admin","102","Pay Supplier","YES");
INSERT INTO accessrights VALUES("3","1","Admin","103","Create/Edit Finished Products","YES");
INSERT INTO accessrights VALUES("4","1","Admin","104","Create/Edit Raw Materials","YES");
INSERT INTO accessrights VALUES("5","1","Admin","105","Sale Finished Products","YES");
INSERT INTO accessrights VALUES("6","1","Admin","106","Sale Rwa materials","YES");
INSERT INTO accessrights VALUES("7","1","Admin","107","Set Outlets","YES");
INSERT INTO accessrights VALUES("8","1","Admin","108","Make Purchases","YES");
INSERT INTO accessrights VALUES("9","1","Admin","109","Post Expense","YES");
INSERT INTO accessrights VALUES("10","1","Admin","110","Access Production","YES");
INSERT INTO accessrights VALUES("11","1","Admin","111","Access Packaging","YES");
INSERT INTO accessrights VALUES("12","1","Admin","112","Create New Job Card","YES");
INSERT INTO accessrights VALUES("13","1","Admin","113","Update Job Cards","YES");
INSERT INTO accessrights VALUES("14","1","Admin","114","Transfer Finished Materials","YES");
INSERT INTO accessrights VALUES("15","1","Admin","115","Transfer Products","YES");
INSERT INTO accessrights VALUES("16","1","admin","116","Enter Damanges and Free Samples","YES");
INSERT INTO accessrights VALUES("17","1","admin","117","Run Stock Take","YES");
INSERT INTO accessrights VALUES("18","1","Admin","118","Supplier Management","YES");
INSERT INTO accessrights VALUES("19","1","Admin","119","Customer Management","YES");
INSERT INTO accessrights VALUES("20","1","Admin","120","Add Staff Names","YES");
INSERT INTO accessrights VALUES("101","2","Manager","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("102","2","Manager","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("103","2","Manager","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("104","2","Manager","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("105","2","Manager","105","Sale Finished Products","YES");
INSERT INTO accessrights VALUES("106","2","Manager","106","Sale Raw materials","YES");
INSERT INTO accessrights VALUES("107","2","Manager","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("108","2","Manager","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("109","2","Manager","109","Post Expense","NO");
INSERT INTO accessrights VALUES("110","2","Manager","110","Access Production","NO");
INSERT INTO accessrights VALUES("111","2","Manager","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("112","2","Manager","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("113","2","Manager","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("114","2","Manager","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("115","2","Manager","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("116","2","Manager","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("117","2","Manager","117","Run Stock Take","YES");
INSERT INTO accessrights VALUES("118","2","Manager","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("119","2","Manager","119","Customer Management","NO");
INSERT INTO accessrights VALUES("120","2","Manager","120","Add Staff Names","YES");
INSERT INTO accessrights VALUES("132","3","Supervisor","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("133","3","Supervisor","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("134","3","Supervisor","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("135","3","Supervisor","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("136","3","Supervisor","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("137","3","Supervisor","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("138","3","Supervisor","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("139","3","Supervisor","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("140","3","Supervisor","109","Post Expense","NO");
INSERT INTO accessrights VALUES("141","3","Supervisor","110","Access Production","NO");
INSERT INTO accessrights VALUES("142","3","Supervisor","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("143","3","Supervisor","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("144","3","Supervisor","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("145","3","Supervisor","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("146","3","Supervisor","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("147","3","Supervisor","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("148","3","Supervisor","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("149","3","Supervisor","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("150","3","Supervisor","119","Customer Management","NO");
INSERT INTO accessrights VALUES("151","3","Supervisor","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("163","4","User","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("164","4","User","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("165","4","User","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("166","4","User","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("167","4","User","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("168","4","User","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("169","4","User","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("170","4","User","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("171","4","User","109","Post Expense","NO");
INSERT INTO accessrights VALUES("172","4","User","110","Access Production","NO");
INSERT INTO accessrights VALUES("173","4","User","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("174","4","User","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("175","4","User","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("176","4","User","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("177","4","User","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("178","4","User","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("179","4","User","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("180","4","User","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("181","4","User","119","Customer Management","NO");
INSERT INTO accessrights VALUES("182","4","User","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("183","1","Admin","121","Access System Reports","YES");
INSERT INTO accessrights VALUES("184","2","Manager","121","Access System Reports","YES");
INSERT INTO accessrights VALUES("185","3","Supervisor","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("186","4","User","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("187","1","Admin","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("188","2","Manager","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("189","3","Supervisor","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("190","4","User","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("191","1","Admin","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("192","2","Manager","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("193","3","Supervisor","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("194","4","User","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("195","1","Admin","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("196","2","Manager","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("197","3","Supervisor","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("198","4","User","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("199","1","Admin","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("200","2","Manager","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("201","3","Supervisor","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("202","4","User","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("203","1","Admin","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("204","2","Manager","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("205","3","Supervisor","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("206","4","User","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("207","1","Admin","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("208","2","Manager","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("209","3","Supervisor","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("210","4","User","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("211","1","Admin","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("212","2","Manager","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("213","3","Supervisor","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("214","4","User","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("215","1","Admin","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("216","2","Manager","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("217","3","Supervisor","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("218","4","User","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("219","1","Admin","130","View Sales and Material Listing Report","YES");
INSERT INTO accessrights VALUES("220","2","Manager","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("221","3","Supervisor","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("222","4","User","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("223","1","Admin","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("224","2","Manager","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("225","3","Supervisor","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("226","4","User","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("227","1","Admin","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("228","2","Manager","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("229","3","Supervisor","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("230","4","User","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("231","1","Admin","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("232","2","Manager","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("233","3","Supervisor","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("234","4","User","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("235","1","Admin","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("236","2","Manager","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("237","3","Supervisor","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("238","4","User","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("239","1","Admin","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("240","2","Manager","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("241","3","Supervisor","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("242","4","User","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("243","1","Admin","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("244","2","Manager","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("245","3","Supervisor","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("246","4","User","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("247","1","Admin","137","Edit Access Rights","YES");
INSERT INTO accessrights VALUES("248","2","Manager","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("249","3","Supervisor","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("250","4","User","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("251","5"," Manager1","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("252","5"," Manager1","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("253","5"," Manager1","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("254","5"," Manager1","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("255","5"," Manager1","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("256","5"," Manager1","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("257","5"," Manager1","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("258","5"," Manager1","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("259","5"," Manager1","109","Post Expense","NO");
INSERT INTO accessrights VALUES("260","5"," Manager1","110","Access Production","NO");
INSERT INTO accessrights VALUES("261","5"," Manager1","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("262","5"," Manager1","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("263","5"," Manager1","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("264","5"," Manager1","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("265","5"," Manager1","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("266","5"," Manager1","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("267","5"," Manager1","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("268","5"," Manager1","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("269","5"," Manager1","119","Customer Management","NO");
INSERT INTO accessrights VALUES("270","5"," Manager1","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("271","5"," Manager1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("272","5"," Manager1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("273","5"," Manager1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("274","5"," Manager1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("275","5"," Manager1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("276","5"," Manager1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("277","5"," Manager1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("278","5"," Manager1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("279","5"," Manager1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("280","5"," Manager1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("281","5"," Manager1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("282","5"," Manager1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("283","5"," Manager1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("284","5"," Manager1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("285","5"," Manager1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("286","5"," Manager1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("287","5"," Manager1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("314","6"," Manager2","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("315","6"," Manager2","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("316","6"," Manager2","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("317","6"," Manager2","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("318","6"," Manager2","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("319","6"," Manager2","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("320","6"," Manager2","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("321","6"," Manager2","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("322","6"," Manager2","109","Post Expense","NO");
INSERT INTO accessrights VALUES("323","6"," Manager2","110","Access Production","NO");
INSERT INTO accessrights VALUES("324","6"," Manager2","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("325","6"," Manager2","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("326","6"," Manager2","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("327","6"," Manager2","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("328","6"," Manager2","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("329","6"," Manager2","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("330","6"," Manager2","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("331","6"," Manager2","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("332","6"," Manager2","119","Customer Management","NO");
INSERT INTO accessrights VALUES("333","6"," Manager2","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("334","6"," Manager2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("335","6"," Manager2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("336","6"," Manager2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("337","6"," Manager2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("338","6"," Manager2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("339","6"," Manager2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("340","6"," Manager2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("341","6"," Manager2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("342","6"," Manager2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("343","6"," Manager2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("344","6"," Manager2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("345","6"," Manager2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("346","6"," Manager2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("347","6"," Manager2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("348","6"," Manager2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("349","6"," Manager2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("350","6"," Manager2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("377","7"," Supervisor1","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("378","7"," Supervisor1","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("379","7"," Supervisor1","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("380","7"," Supervisor1","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("381","7"," Supervisor1","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("382","7"," Supervisor1","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("383","7"," Supervisor1","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("384","7"," Supervisor1","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("385","7"," Supervisor1","109","Post Expense","NO");
INSERT INTO accessrights VALUES("386","7"," Supervisor1","110","Access Production","NO");
INSERT INTO accessrights VALUES("387","7"," Supervisor1","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("388","7"," Supervisor1","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("389","7"," Supervisor1","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("390","7"," Supervisor1","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("391","7"," Supervisor1","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("392","7"," Supervisor1","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("393","7"," Supervisor1","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("394","7"," Supervisor1","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("395","7"," Supervisor1","119","Customer Management","NO");
INSERT INTO accessrights VALUES("396","7"," Supervisor1","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("397","7"," Supervisor1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("398","7"," Supervisor1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("399","7"," Supervisor1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("400","7"," Supervisor1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("401","7"," Supervisor1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("402","7"," Supervisor1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("403","7"," Supervisor1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("404","7"," Supervisor1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("405","7"," Supervisor1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("406","7"," Supervisor1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("407","7"," Supervisor1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("408","7"," Supervisor1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("409","7"," Supervisor1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("410","7"," Supervisor1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("411","7"," Supervisor1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("412","7"," Supervisor1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("413","7"," Supervisor1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("440","8"," Supervisor2","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("441","8"," Supervisor2","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("442","8"," Supervisor2","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("443","8"," Supervisor2","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("444","8"," Supervisor2","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("445","8"," Supervisor2","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("446","8"," Supervisor2","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("447","8"," Supervisor2","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("448","8"," Supervisor2","109","Post Expense","NO");
INSERT INTO accessrights VALUES("449","8"," Supervisor2","110","Access Production","NO");
INSERT INTO accessrights VALUES("450","8"," Supervisor2","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("451","8"," Supervisor2","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("452","8"," Supervisor2","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("453","8"," Supervisor2","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("454","8"," Supervisor2","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("455","8"," Supervisor2","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("456","8"," Supervisor2","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("457","8"," Supervisor2","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("458","8"," Supervisor2","119","Customer Management","NO");
INSERT INTO accessrights VALUES("459","8"," Supervisor2","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("460","8"," Supervisor2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("461","8"," Supervisor2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("462","8"," Supervisor2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("463","8"," Supervisor2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("464","8"," Supervisor2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("465","8"," Supervisor2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("466","8"," Supervisor2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("467","8"," Supervisor2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("468","8"," Supervisor2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("469","8"," Supervisor2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("470","8"," Supervisor2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("471","8"," Supervisor2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("472","8"," Supervisor2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("473","8"," Supervisor2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("474","8"," Supervisor2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("475","8"," Supervisor2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("476","8"," Supervisor2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("503","9"," User1","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("504","9"," User1","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("505","9"," User1","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("506","9"," User1","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("507","9"," User1","105","Sale Finished Products","YES");
INSERT INTO accessrights VALUES("508","9"," User1","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("509","9"," User1","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("510","9"," User1","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("511","9"," User1","109","Post Expense","NO");
INSERT INTO accessrights VALUES("512","9"," User1","110","Access Production","NO");
INSERT INTO accessrights VALUES("513","9"," User1","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("514","9"," User1","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("515","9"," User1","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("516","9"," User1","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("517","9"," User1","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("518","9"," User1","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("519","9"," User1","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("520","9"," User1","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("521","9"," User1","119","Customer Management","NO");
INSERT INTO accessrights VALUES("522","9"," User1","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("523","9"," User1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("524","9"," User1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("525","9"," User1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("526","9"," User1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("527","9"," User1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("528","9"," User1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("529","9"," User1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("530","9"," User1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("531","9"," User1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("532","9"," User1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("533","9"," User1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("534","9"," User1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("535","9"," User1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("536","9"," User1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("537","9"," User1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("538","9"," User1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("539","9"," User1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("566","5","Manager1","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("567","5","Manager1","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("568","5","Manager1","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("569","5","Manager1","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("570","5","Manager1","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("571","5","Manager1","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("572","5","Manager1","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("573","5","Manager1","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("574","5","Manager1","109","Post Expense","NO");
INSERT INTO accessrights VALUES("575","5","Manager1","110","Access Production","NO");
INSERT INTO accessrights VALUES("576","5","Manager1","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("577","5","Manager1","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("578","5","Manager1","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("579","5","Manager1","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("580","5","Manager1","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("581","5","Manager1","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("582","5","Manager1","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("583","5","Manager1","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("584","5","Manager1","119","Customer Management","NO");
INSERT INTO accessrights VALUES("585","5","Manager1","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("586","5","Manager1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("587","5","Manager1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("588","5","Manager1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("589","5","Manager1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("590","5","Manager1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("591","5","Manager1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("592","5","Manager1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("593","5","Manager1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("594","5","Manager1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("595","5","Manager1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("596","5","Manager1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("597","5","Manager1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("598","5","Manager1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("599","5","Manager1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("600","5","Manager1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("601","5","Manager1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("602","5","Manager1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("629","6","Manager2","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("630","6","Manager2","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("631","6","Manager2","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("632","6","Manager2","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("633","6","Manager2","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("634","6","Manager2","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("635","6","Manager2","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("636","6","Manager2","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("637","6","Manager2","109","Post Expense","NO");
INSERT INTO accessrights VALUES("638","6","Manager2","110","Access Production","NO");
INSERT INTO accessrights VALUES("639","6","Manager2","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("640","6","Manager2","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("641","6","Manager2","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("642","6","Manager2","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("643","6","Manager2","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("644","6","Manager2","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("645","6","Manager2","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("646","6","Manager2","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("647","6","Manager2","119","Customer Management","NO");
INSERT INTO accessrights VALUES("648","6","Manager2","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("649","6","Manager2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("650","6","Manager2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("651","6","Manager2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("652","6","Manager2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("653","6","Manager2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("654","6","Manager2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("655","6","Manager2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("656","6","Manager2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("657","6","Manager2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("658","6","Manager2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("659","6","Manager2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("660","6","Manager2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("661","6","Manager2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("662","6","Manager2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("663","6","Manager2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("664","6","Manager2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("665","6","Manager2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("692","7","Supervisor1","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("693","7","Supervisor1","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("694","7","Supervisor1","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("695","7","Supervisor1","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("696","7","Supervisor1","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("697","7","Supervisor1","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("698","7","Supervisor1","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("699","7","Supervisor1","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("700","7","Supervisor1","109","Post Expense","NO");
INSERT INTO accessrights VALUES("701","7","Supervisor1","110","Access Production","NO");
INSERT INTO accessrights VALUES("702","7","Supervisor1","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("703","7","Supervisor1","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("704","7","Supervisor1","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("705","7","Supervisor1","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("706","7","Supervisor1","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("707","7","Supervisor1","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("708","7","Supervisor1","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("709","7","Supervisor1","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("710","7","Supervisor1","119","Customer Management","NO");
INSERT INTO accessrights VALUES("711","7","Supervisor1","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("712","7","Supervisor1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("713","7","Supervisor1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("714","7","Supervisor1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("715","7","Supervisor1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("716","7","Supervisor1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("717","7","Supervisor1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("718","7","Supervisor1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("719","7","Supervisor1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("720","7","Supervisor1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("721","7","Supervisor1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("722","7","Supervisor1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("723","7","Supervisor1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("724","7","Supervisor1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("725","7","Supervisor1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("726","7","Supervisor1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("727","7","Supervisor1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("728","7","Supervisor1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("755","8","Supervisor2","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("756","8","Supervisor2","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("757","8","Supervisor2","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("758","8","Supervisor2","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("759","8","Supervisor2","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("760","8","Supervisor2","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("761","8","Supervisor2","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("762","8","Supervisor2","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("763","8","Supervisor2","109","Post Expense","NO");
INSERT INTO accessrights VALUES("764","8","Supervisor2","110","Access Production","NO");
INSERT INTO accessrights VALUES("765","8","Supervisor2","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("766","8","Supervisor2","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("767","8","Supervisor2","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("768","8","Supervisor2","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("769","8","Supervisor2","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("770","8","Supervisor2","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("771","8","Supervisor2","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("772","8","Supervisor2","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("773","8","Supervisor2","119","Customer Management","NO");
INSERT INTO accessrights VALUES("774","8","Supervisor2","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("775","8","Supervisor2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("776","8","Supervisor2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("777","8","Supervisor2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("778","8","Supervisor2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("779","8","Supervisor2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("780","8","Supervisor2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("781","8","Supervisor2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("782","8","Supervisor2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("783","8","Supervisor2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("784","8","Supervisor2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("785","8","Supervisor2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("786","8","Supervisor2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("787","8","Supervisor2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("788","8","Supervisor2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("789","8","Supervisor2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("790","8","Supervisor2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("791","8","Supervisor2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("818","9","User1","101","Pay Customer","NO");
INSERT INTO accessrights VALUES("819","9","User1","102","Pay Supplier","NO");
INSERT INTO accessrights VALUES("820","9","User1","103","Create/Edit Finished Products","NO");
INSERT INTO accessrights VALUES("821","9","User1","104","Create/Edit Raw Materials","NO");
INSERT INTO accessrights VALUES("822","9","User1","105","Sale Finished Products","NO");
INSERT INTO accessrights VALUES("823","9","User1","106","Sale Rwa materials","NO");
INSERT INTO accessrights VALUES("824","9","User1","107","Set Outlets","NO");
INSERT INTO accessrights VALUES("825","9","User1","108","Make Purchases","NO");
INSERT INTO accessrights VALUES("826","9","User1","109","Post Expense","NO");
INSERT INTO accessrights VALUES("827","9","User1","110","Access Production","NO");
INSERT INTO accessrights VALUES("828","9","User1","111","Access Packaging","NO");
INSERT INTO accessrights VALUES("829","9","User1","112","Create New Job Card","NO");
INSERT INTO accessrights VALUES("830","9","User1","113","Update Job Cards","NO");
INSERT INTO accessrights VALUES("831","9","User1","114","Transfer Finished Materials","NO");
INSERT INTO accessrights VALUES("832","9","User1","115","Transfer Products","NO");
INSERT INTO accessrights VALUES("833","9","User1","116","Enter Damanges and Free Samples","NO");
INSERT INTO accessrights VALUES("834","9","User1","117","Run Stock Take","NO");
INSERT INTO accessrights VALUES("835","9","User1","118","Supplier Management","NO");
INSERT INTO accessrights VALUES("836","9","User1","119","Customer Management","NO");
INSERT INTO accessrights VALUES("837","9","User1","120","Add Staff Names","NO");
INSERT INTO accessrights VALUES("838","9","User1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("839","9","User1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("840","9","User1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("841","9","User1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("842","9","User1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("843","9","User1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("844","9","User1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("845","9","User1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("846","9","User1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("847","9","User1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("848","9","User1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("849","9","User1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("850","9","User1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("851","9","User1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("852","9","User1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("853","9","User1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("854","9","User1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("881","10"," Manager1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("882","11"," Manager2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("883","12"," Supervisor1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("884","13"," Supervisor2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("885","14"," User1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("886","10"," Manager1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("887","11"," Manager2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("888","12"," Supervisor1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("889","13"," Supervisor2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("890","14"," User1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("891","10"," Manager1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("892","11"," Manager2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("893","12"," Supervisor1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("894","13"," Supervisor2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("895","14"," User1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("896","10"," Manager1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("897","11"," Manager2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("898","12"," Supervisor1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("899","13"," Supervisor2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("900","14"," User1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("901","10"," Manager1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("902","11"," Manager2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("903","12"," Supervisor1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("904","13"," Supervisor2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("905","14"," User1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("906","10"," Manager1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("907","11"," Manager2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("908","12"," Supervisor1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("909","13"," Supervisor2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("910","14"," User1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("911","10"," Manager1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("912","11"," Manager2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("913","12"," Supervisor1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("914","13"," Supervisor2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("915","14"," User1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("916","10"," Manager1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("917","11"," Manager2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("918","12"," Supervisor1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("919","13"," Supervisor2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("920","14"," User1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("921","10"," Manager1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("922","11"," Manager2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("923","12"," Supervisor1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("924","13"," Supervisor2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("925","14"," User1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("926","10"," Manager1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("927","11"," Manager2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("928","12"," Supervisor1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("929","13"," Supervisor2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("930","14"," User1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("931","10"," Manager1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("932","11"," Manager2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("933","12"," Supervisor1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("934","13"," Supervisor2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("935","14"," User1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("936","10"," Manager1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("937","11"," Manager2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("938","12"," Supervisor1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("939","13"," Supervisor2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("940","14"," User1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("941","10"," Manager1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("942","11"," Manager2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("943","12"," Supervisor1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("944","13"," Supervisor2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("945","14"," User1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("946","10"," Manager1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("947","11"," Manager2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("948","12"," Supervisor1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("949","13"," Supervisor2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("950","14"," User1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("951","10"," Manager1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("952","11"," Manager2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("953","12"," Supervisor1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("954","13"," Supervisor2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("955","14"," User1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("956","10"," Manager1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("957","11"," Manager2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("958","12"," Supervisor1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("959","13"," Supervisor2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("960","14"," User1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("961","10"," Manager1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("962","11"," Manager2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("963","12"," Supervisor1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("964","13"," Supervisor2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("965","14"," User1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("966","15"," Manager1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("967","16"," Manager2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("968","17"," Supervisor1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("969","18"," Supervisor2","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("970","19"," User1","121","Access System Reports","NO");
INSERT INTO accessrights VALUES("971","15"," Manager1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("972","16"," Manager2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("973","17"," Supervisor1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("974","18"," Supervisor2","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("975","19"," User1","122","View Periodic Profit Report","NO");
INSERT INTO accessrights VALUES("976","15"," Manager1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("977","16"," Manager2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("978","17"," Supervisor1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("979","18"," Supervisor2","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("980","19"," User1","123","View Periodic Production Report","NO");
INSERT INTO accessrights VALUES("981","15"," Manager1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("982","16"," Manager2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("983","17"," Supervisor1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("984","18"," Supervisor2","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("985","19"," User1","124","View Periodic Usage Report","NO");
INSERT INTO accessrights VALUES("986","15"," Manager1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("987","16"," Manager2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("988","17"," Supervisor1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("989","18"," Supervisor2","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("990","19"," User1","125","View Periodic Packaging Report","NO");
INSERT INTO accessrights VALUES("991","15"," Manager1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("992","16"," Manager2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("993","17"," Supervisor1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("994","18"," Supervisor2","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("995","19"," User1","126","View Periodic Inventory Report","NO");
INSERT INTO accessrights VALUES("996","15"," Manager1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("997","16"," Manager2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("998","17"," Supervisor1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("999","18"," Supervisor2","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("1000","19"," User1","127","View Periodic Statement Report","NO");
INSERT INTO accessrights VALUES("1001","15"," Manager1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("1002","16"," Manager2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("1003","17"," Supervisor1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("1004","18"," Supervisor2","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("1005","19"," User1","128","View Periodic Tracking Report","NO");
INSERT INTO accessrights VALUES("1006","15"," Manager1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("1007","16"," Manager2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("1008","17"," Supervisor1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("1009","18"," Supervisor2","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("1010","19"," User1","129","View Periodic Expiry Report","NO");
INSERT INTO accessrights VALUES("1011","15"," Manager1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("1012","16"," Manager2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("1013","17"," Supervisor1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("1014","18"," Supervisor2","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("1015","19"," User1","130","View Sales and Material Listing Report","NO");
INSERT INTO accessrights VALUES("1016","15"," Manager1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("1017","16"," Manager2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("1018","17"," Supervisor1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("1019","18"," Supervisor2","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("1020","19"," User1","131","View Customer Balances Report","NO");
INSERT INTO accessrights VALUES("1021","15"," Manager1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("1022","16"," Manager2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("1023","17"," Supervisor1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("1024","18"," Supervisor2","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("1025","19"," User1","132","View Material and Products Transfer Reports","NO");
INSERT INTO accessrights VALUES("1026","15"," Manager1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("1027","16"," Manager2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("1028","17"," Supervisor1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("1029","18"," Supervisor2","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("1030","19"," User1","133","View Samples and Damages Reports","NO");
INSERT INTO accessrights VALUES("1031","15"," Manager1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("1032","16"," Manager2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("1033","17"," Supervisor1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("1034","18"," Supervisor2","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("1035","19"," User1","134","View Audit Trail Reports","NO");
INSERT INTO accessrights VALUES("1036","15"," Manager1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("1037","16"," Manager2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("1038","17"," Supervisor1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("1039","18"," Supervisor2","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("1040","19"," User1","135","View Financial  Reports","NO");
INSERT INTO accessrights VALUES("1041","15"," Manager1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("1042","16"," Manager2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("1043","17"," Supervisor1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("1044","18"," Supervisor2","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("1045","19"," User1","136","View Stock Reports","NO");
INSERT INTO accessrights VALUES("1046","15"," Manager1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("1047","16"," Manager2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("1048","17"," Supervisor1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("1049","18"," Supervisor2","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("1050","19"," User1","137","Edit Access Rights","NO");
INSERT INTO accessrights VALUES("1051","1","Admin","138","View Periodic Purchase Report","YES");
INSERT INTO accessrights VALUES("1052","2","Manager","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1053","3","Supervisor","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1054","4","User","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1055","15"," Manager1","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1056","16"," Manager2","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1057","17"," Supervisor1","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1058","18"," Supervisor2","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1059","19"," User1","138","View Periodic Purchase Report","NO");
INSERT INTO accessrights VALUES("1060","1","Admin","139","Set Callibration","YES");
INSERT INTO accessrights VALUES("1061","2","Manager","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1062","3","Supervisor","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1063","4","User","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1064","15"," Manager1","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1065","16"," Manager2","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1066","17"," Supervisor1","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1067","18"," Supervisor2","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1068","19"," User1","139","Set Callibration","NO");
INSERT INTO accessrights VALUES("1069","1","Admin","140","Update Milk Sales","YES");
INSERT INTO accessrights VALUES("1070","2","Manager","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1071","3","Supervisor","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1072","4","User","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1073","15"," Manager1","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1074","16"," Manager2","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1075","17"," Supervisor1","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1076","18"," Supervisor2","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1077","19"," User1","140","Update Milk Sales","NO");
INSERT INTO accessrights VALUES("1078","1","Admin","141","View Periodic Milk Report","YES");
INSERT INTO accessrights VALUES("1079","2","Manager","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1080","3","Supervisor","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1081","4","User","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1082","15"," Manager1","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1083","16"," Manager2","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1084","17"," Supervisor1","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1085","18"," Supervisor2","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1086","19"," User1","141","View Periodic Milk Report","NO");
INSERT INTO accessrights VALUES("1087","1","Admin","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1088","2","Manager","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1089","3","Supervisor","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1090","4","User","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1091","15"," Manager1","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1092","16"," Manager2","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1093","17"," Supervisor1","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1094","18"," Supervisor2","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1095","19"," User1","142","View Sales Report","NO");
INSERT INTO accessrights VALUES("1096","1","Admin","143","Search and Reprint Receipt","YES");
INSERT INTO accessrights VALUES("1097","2","Manager","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1098","3","Supervisor","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1099","4","User","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1100","15"," Manager1","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1101","16"," Manager2","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1102","17"," Supervisor1","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1103","18"," Supervisor2","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1104","19"," User1","143","Search and Reprint Receipt","NO");
INSERT INTO accessrights VALUES("1105","1","Admin","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1106","2","Manager","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1107","3","Supervisor","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1108","4","User","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1109","15"," Manager1","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1110","16"," Manager2","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1111","17"," Supervisor1","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1112","18"," Supervisor2","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1113","19"," User1","144","View Sales Profit Report","NO");
INSERT INTO accessrights VALUES("1114","1","Admin","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1115","2","Manager","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1116","3","Supervisor","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1117","4","User","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1118","15"," Manager1","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1119","16"," Manager2","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1120","17"," Supervisor1","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1121","18"," Supervisor2","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1122","19"," User1","145","View Sales Persons Report","NO");
INSERT INTO accessrights VALUES("1123","1","Admin","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1124","2","Manager","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1125","3","Supervisor","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1126","4","User","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1127","15"," Manager1","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1128","16"," Manager2","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1129","17"," Supervisor1","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1130","18"," Supervisor2","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1131","19"," User1","146","View Branch Sales Report","NO");
INSERT INTO accessrights VALUES("1132","1","Admin","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1133","2","Manager","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1134","3","Supervisor","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1135","4","User","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1136","15"," Manager1","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1137","16"," Manager2","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1138","17"," Supervisor1","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1139","18"," Supervisor2","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1140","19"," User1","147","View Material Sales Report","NO");
INSERT INTO accessrights VALUES("1141","1","Admin","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1142","2","Manager","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1143","3","Supervisor","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1144","4","User","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1145","15"," Manager1","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1146","16"," Manager2","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1147","17"," Supervisor1","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1148","18"," Supervisor2","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1149","19"," User1","148","Enter Pump Reading","NO");
INSERT INTO accessrights VALUES("1150","1","Admin","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1151","2","Manager","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1152","3","Supervisor","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1153","4","User","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1154","15"," Manager1","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1155","16"," Manager2","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1156","17"," Supervisor1","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1157","18"," Supervisor2","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1158","19"," User1","149","Do pump Allocation","NO");
INSERT INTO accessrights VALUES("1159","1","Admin","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1160","2","Manager","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1161","3","Supervisor","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1162","4","User","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1163","15"," Manager1","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1164","16"," Manager2","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1165","17"," Supervisor1","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1166","18"," Supervisor2","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1167","19"," User1","150","Edit Pump Allocation","NO");
INSERT INTO accessrights VALUES("1168","1","Admin","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1169","2","Manager","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1170","3","Supervisor","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1171","4","User","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1172","15"," Manager1","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1173","16"," Manager2","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1174","17"," Supervisor1","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1175","18"," Supervisor2","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1176","19"," User1","151","View All Staff Sales Analysis Report","NO");
INSERT INTO accessrights VALUES("1177","1","Admin","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1178","2","Manager","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1179","3","Supervisor","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1180","4","User","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1181","15"," Manager1","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1182","16"," Manager2","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1183","17"," Supervisor1","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1184","18"," Supervisor2","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1185","19"," User1","152","Access Update Staff Fuel Data","NO");
INSERT INTO accessrights VALUES("1186","1","Admin","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1187","2","Manager","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1188","3","Supervisor","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1189","4","User","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1190","15"," Manager1","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1191","16"," Manager2","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1192","17"," Supervisor1","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1193","18"," Supervisor2","153","View Fuel Offloading  Report","NO");
INSERT INTO accessrights VALUES("1194","19"," User1","153","View Fuel Offloading  Report","NO");



DROP TABLE accountslist;

CREATE TABLE `accountslist` (
  `acc_ID` int(11) NOT NULL AUTO_INCREMENT,
  `acc_Name` varchar(200) DEFAULT NULL,
  `acc_CoaId` int(11) DEFAULT NULL,
  `acc_CoaName` varchar(200) DEFAULT NULL,
  `acc_Debit` double DEFAULT '0',
  `acc_Credit` double DEFAULT '0',
  PRIMARY KEY (`acc_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO accountslist VALUES("1","EXPENSES","3","TEST ACCOUNT","0","0");
INSERT INTO accountslist VALUES("2","XXXXXXXXX","2","INCOME ACCOUNT","0","0");
INSERT INTO accountslist VALUES("3","3656546546","2","INCOME ACCOUNT","0","0");



DROP TABLE audittrail;

CREATE TABLE `audittrail` (
  `audit_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `audit_UserName` varchar(200) DEFAULT NULL,
  `audit_Date` date DEFAULT NULL,
  `audit_TimeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `audit_ModuleName` varchar(200) DEFAULT NULL,
  `audit_BranchName` varchar(200) DEFAULT NULL,
  `audit_Description` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`audit_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=latin1;

INSERT INTO audittrail VALUES("2","POS USER","2017-03-09","2017-03-09 08:03:30","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("3","POS USER","2017-03-09","2017-03-09 08:03:51","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("4","POS USER","2017-03-09","2017-03-09 08:06:47","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("5","POS USER","2017-03-09","2017-03-09 08:25:58","Sales Module","MAIN SHOP","Closed Paid Sales Paymode : CASH Amount 240 Receipt No. 63");
INSERT INTO audittrail VALUES("6","POS USER","2017-03-09","2017-03-09 08:26:48","Sales Module","MAIN SHOP","Closed Credit Sales for Customer ID: 5 Amount 16000 Receipt No. 64");
INSERT INTO audittrail VALUES("7","POS USER","2017-03-09","2017-03-09 08:29:43","Purchase Module","MAIN SHOP","Closed GRN Number : 15 Amount 18050 Supplier ID. 7");
INSERT INTO audittrail VALUES("8","POS USER","2017-03-09","2017-03-09 15:14:46","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("9","POS USER","2017-03-09","2017-03-09 15:21:49","Supplier Module","MAIN SHOP","Created New Supplier: AGREKKO AGROVET LTD Opening Balance 45000 Supplier ID. 8");
INSERT INTO audittrail VALUES("10","POS USER","2017-03-09","2017-03-09 15:25:56","Supplier Module","MAIN SHOP","Created New Customer: ALICE NDUKO Opening Balance 12000 Customer ID. 9");
INSERT INTO audittrail VALUES("11","POS USER","2017-03-09","2017-03-09 15:58:19","Reports Module","MAIN SHOP","Viewed Pump Allocation Report for Dates between 2017-03-01 and 2017-03-09");
INSERT INTO audittrail VALUES("12","POS USER","2017-03-10","2017-03-10 06:54:49","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("13","POS USER","2017-03-10","2017-03-10 06:55:26","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-10 staff Name ERIC KOMU");
INSERT INTO audittrail VALUES("14","POS USER","2017-03-10","2017-03-10 06:55:32","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-05 staff Name ERIC KOMU");
INSERT INTO audittrail VALUES("15","POS USER","2017-03-10","2017-03-10 07:02:59","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-05 staff Name ERIC KOMU");
INSERT INTO audittrail VALUES("16","POS USER","2017-03-10","2017-03-10 07:03:04","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-05 staff Name JAME MRUTTU");
INSERT INTO audittrail VALUES("17","POS USER","2017-03-10","2017-03-10 07:04:59","Fuel  Module","MAIN SHOP","posted Staff Sales Data for Date 2017-03-10");
INSERT INTO audittrail VALUES("18","POS USER","2017-03-10","2017-03-10 07:05:21","Fuel  Module","MAIN SHOP","posted Staff Sales Data for Date 2017-03-10");
INSERT INTO audittrail VALUES("19","POS USER","2017-03-10","2017-03-10 07:06:02","Fuel  Module","MAIN SHOP","posted Staff Sales Data for Date 2017-03-10");
INSERT INTO audittrail VALUES("20","POS USER","2017-03-10","2017-03-10 07:06:20","Fuel  Module","MAIN SHOP","posted Staff Sales Data for Date 2017-03-10");
INSERT INTO audittrail VALUES("21","POS USER","2017-03-10","2017-03-10 07:06:37","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-10 staff Name ERIC KOMU");
INSERT INTO audittrail VALUES("22","POS USER","2017-03-10","2017-03-10 07:07:12","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-10 staff Name 0");
INSERT INTO audittrail VALUES("23","POS USER","2017-03-10","2017-03-10 07:07:38","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("24","POS USER","2017-03-10","2017-03-10 07:08:32","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("25","POS USER","2017-03-10","2017-03-10 07:08:52","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("26","POS USER","2017-03-10","2017-03-10 07:13:30","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("27","POS USER","2017-03-10","2017-03-10 07:13:52","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("28","POS USER","2017-03-10","2017-03-10 07:14:50","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("29","POS USER","2017-03-10","2017-03-10 07:16:28","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("30","POS USER","2017-03-10","2017-03-10 08:17:15","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("31","POS USER","2017-03-10","2017-03-10 08:22:10","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("32","POS USER","2017-03-10","2017-03-10 08:23:29","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("33","POS USER","2017-03-10","2017-03-10 08:24:00","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("34","POS USER","2017-03-10","2017-03-10 08:26:02","Reports Module","MAIN SHOP","Viewed All Staff Sales Analysis  Report for Date 2017-03-10");
INSERT INTO audittrail VALUES("35","POS USER","2017-03-10","2017-03-10 08:27:25","Reports Module","MAIN SHOP","Viewed Staff Sales Analysis  Report for Date 2017-03-10 staff Name MAUREEN KINYUA");
INSERT INTO audittrail VALUES("36","POS USER","2017-03-10","2017-03-10 12:57:22","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("37","POS USER","2017-03-10","2017-03-10 13:03:02","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("38","POS USER","2017-03-10","2017-03-10 13:03:26","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("39","POS USER","2017-03-10","2017-03-10 13:04:44","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("40","POS USER","2017-03-10","2017-03-10 13:05:17","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("41","POS USER","2017-03-10","2017-03-10 13:06:03","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("42","POS USER","2017-03-10","2017-03-10 13:06:30","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("43","POS USER","2017-03-10","2017-03-10 13:07:11","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("44","POS USER","2017-03-10","2017-03-10 13:07:30","Reports Module","MAIN SHOP","Viewed Audit  Report for Dates between 2017-03-01 and 2017-03-31");
INSERT INTO audittrail VALUES("45","POS USER","2017-03-10","2017-03-10 14:45:23","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("46","POS USER","2017-03-10","2017-03-10 14:47:16","Admin  Module","MAIN SHOP","Edited Company details CompanyName MUM AND PAP SHOP XX Address NAIROBI KENYA EmailINFO@DEMOPRIMARY.COM Pin KX36374564745758 TelNo 0712993080");
INSERT INTO audittrail VALUES("47","POS USER","2017-03-12","2017-03-12 18:27:57","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("48","POS USER","2017-03-12","2017-03-12 18:37:04","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("49","POS USER","2017-03-12","2017-03-12 18:37:04","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("50","POS USER","2017-03-12","2017-03-12 18:37:04","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("51","POS USER","2017-03-12","2017-03-12 18:37:04","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("52","POS USER","2017-03-12","2017-03-12 18:39:11","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("53","POS USER","2017-03-12","2017-03-12 18:39:11","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("54","POS USER","2017-03-12","2017-03-12 18:39:11","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("55","POS USER","2017-03-12","2017-03-12 18:39:11","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("56","POS USER","2017-03-12","2017-03-12 18:39:55","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("57","POS USER","2017-03-12","2017-03-12 18:39:55","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("58","POS USER","2017-03-12","2017-03-12 18:39:55","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("59","POS USER","2017-03-12","2017-03-12 18:39:55","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("60","POS USER","2017-03-12","2017-03-12 18:45:47","Reports Module","MAIN SHOP","Viewed Pump Allocation Report for Dates between 2017-03-11 and 2017-03-11");
INSERT INTO audittrail VALUES("61","POS USER","2017-03-12","2017-03-12 18:48:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("62","POS USER","2017-03-12","2017-03-12 18:48:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("63","POS USER","2017-03-12","2017-03-12 18:48:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("64","POS USER","2017-03-12","2017-03-12 18:48:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("65","POS USER","2017-03-12","2017-03-12 19:20:13","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("66","POS USER","2017-03-12","2017-03-12 19:20:20","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("67","POS USER","2017-03-12","2017-03-12 19:20:24","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("68","POS USER","2017-03-12","2017-03-12 19:20:24","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("69","POS USER","2017-03-12","2017-03-12 19:20:56","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("70","POS USER","2017-03-12","2017-03-12 19:20:56","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("71","POS USER","2017-03-12","2017-03-12 19:20:56","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("72","POS USER","2017-03-12","2017-03-12 19:20:56","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("73","POS USER","2017-03-12","2017-03-12 19:21:39","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("74","POS USER","2017-03-12","2017-03-12 19:21:39","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("75","POS USER","2017-03-12","2017-03-12 19:21:39","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("76","POS USER","2017-03-12","2017-03-12 19:21:39","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("77","POS USER","2017-03-12","2017-03-12 19:23:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("78","POS USER","2017-03-12","2017-03-12 19:23:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("79","POS USER","2017-03-12","2017-03-12 19:23:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("80","POS USER","2017-03-12","2017-03-12 19:23:05","Fuel Pumps  Module","MAIN SHOP","posted Pump Reading Data for Date 2017-03-12");
INSERT INTO audittrail VALUES("81","POS USER","2017-03-12","2017-03-12 21:18:23","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("82","POS USER","2017-03-12","2017-03-12 21:18:52","user management Module","MAIN SHOP","Created New  user : DYLAN Branch Name. MAIN SHOP");
INSERT INTO audittrail VALUES("83","POS USER","2017-03-12","2017-03-12 21:19:00","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("84","DYLAN","2017-03-12","2017-03-12 21:20:01","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("85","POS USER","2017-03-12","2017-03-12 21:20:48","Login Module","MAIN SHOP","Logged into the System");
INSERT INTO audittrail VALUES("86","POS USER","2017-03-13","2017-03-13 08:39:59","Login Module","MAIN SHOP","Logged into the System");



DROP TABLE bankaccounts;

CREATE TABLE `bankaccounts` (
  `Acc_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `Acc_BankName` varchar(200) DEFAULT NULL,
  `Acc_AccountName` varchar(200) DEFAULT NULL,
  `Acc_AccountNo` varchar(200) DEFAULT NULL,
  `Acc_OpeningBal` double DEFAULT '0',
  `Acc_OpenDate` date DEFAULT NULL,
  PRIMARY KEY (`Acc_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO bankaccounts VALUES("1","RTRTRTRET","RTRETRET","645656366","0","2016-11-11");



DROP TABLE banktrans;

CREATE TABLE `banktrans` (
  `AutoNo` int(11) NOT NULL AUTO_INCREMENT,
  `AccountId` int(11) DEFAULT NULL,
  `AccountName` varchar(200) DEFAULT NULL,
  `DateTrans` date DEFAULT NULL,
  `ReceiptNo` varchar(200) DEFAULT '0',
  `Amount` double DEFAULT NULL,
  `EntryBy` varchar(200) DEFAULT NULL,
  `TransType` varchar(200) DEFAULT NULL,
  `PayMode` varchar(200) DEFAULT 'NONE',
  `Credit` double DEFAULT '0',
  `Debit` double DEFAULT '0',
  `creditbal` double DEFAULT '0',
  `Debitbal` double DEFAULT '0',
  `Refx` varchar(200) DEFAULT '',
  `T_Sta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `CurrAmt` double DEFAULT '0',
  `CurrRate` double DEFAULT '1',
  `CurrName` varchar(200) DEFAULT 'KENYA SHILINGS',
  PRIMARY KEY (`AutoNo`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

INSERT INTO banktrans VALUES("1","1","RTRETRET","2016-11-11","0","0","","DEBIT","NONE","0","12350","0","0","","2016-11-11 11:19:57","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("2","1","RTRETRET","2016-11-11","0","0","","DEBIT","NONE","0","12350","0","0","","2016-11-11 11:21:43","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("5","1","RTRETRET","2016-11-11","0","0","","CREDIT","NONE","3000","0","0","0","","2016-11-11 16:50:34","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("6","1","RTRETRET","2016-11-11","0","0","","CREDIT","NONE","10000","0","0","0","","2016-11-11 16:51:38","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("7","1","RTRETRET","2017-01-17","0","0","","DEBIT","NONE","0","120000","0","0","","2017-01-17 14:31:06","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("8","1","RTRETRET","2017-03-10","0","0","","DEBIT","NONE","0","18050","0","0","","2017-03-10 08:12:35","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("9","1","RTRETRET","2017-03-10","0","0","","DEBIT","NONE","0","18050","0","0","","2017-03-10 08:15:51","0","1","KENYA SHILINGS");
INSERT INTO banktrans VALUES("10","1","RTRETRET","2017-03-10","0","0","","DEBIT","NONE","0","18050","0","0","","2017-03-10 08:17:39","0","1","KENYA SHILINGS");



DROP TABLE branchitems;

CREATE TABLE `branchitems` (
  `branchitems_Id` int(11) NOT NULL AUTO_INCREMENT,
  `branchitems_BranchID` int(11) DEFAULT NULL,
  `branchitems_ItemCode` int(11) DEFAULT NULL,
  `branchitems_ItemName` varchar(200) DEFAULT NULL,
  `branchitems_BranchName` varchar(200) DEFAULT NULL,
  `branchitems_barcode` varchar(200) DEFAULT '0',
  PRIMARY KEY (`branchitems_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=202 DEFAULT CHARSET=latin1;

INSERT INTO branchitems VALUES("106","2","1","MARBLE CAKE-1KG","WAREHOUSE A","234561700");
INSERT INTO branchitems VALUES("107","2","2","MIXED TEA WITH MAANDAZI","WAREHOUSE A","0");
INSERT INTO branchitems VALUES("108","2","3","CHICKEN QUATER","WAREHOUSE A","0");
INSERT INTO branchitems VALUES("109","2","6","QUEEN CAKES","WAREHOUSE A","0");
INSERT INTO branchitems VALUES("110","2","4","CHIPS","WAREHOUSE A","0");
INSERT INTO branchitems VALUES("111","2","5","PUSH CAKES","WAREHOUSE A","0");
INSERT INTO branchitems VALUES("112","2","7","FOREST CAKE 1KG","WAREHOUSE A","123456");
INSERT INTO branchitems VALUES("113","2","9","ASSORTED CUP CAKES -HALF DOZEN","WAREHOUSE A","1234561");
INSERT INTO branchitems VALUES("114","2","8","ASSORTED CUP CAKES-DOZEN","WAREHOUSE A","123450");
INSERT INTO branchitems VALUES("115","2","12","FRESH CREAM CAKE-1 KG","WAREHOUSE A","456673687");
INSERT INTO branchitems VALUES("116","2","11","LOGO DOUGHNUT-DOZEN","WAREHOUSE A","0998989879");
INSERT INTO branchitems VALUES("117","2","10","EAT YOUR BRAND-DOZEN","WAREHOUSE A","213456");
INSERT INTO branchitems VALUES("118","2","13","ANNIVERSARY CELEBRATION CAKE-4KG","WAREHOUSE A","8687668868");
INSERT INTO branchitems VALUES("119","2","14","FAMILY COOKIES 1 DOZEN","WAREHOUSE A","879895789");
INSERT INTO branchitems VALUES("120","2","16","BIRTHDAY FRUIT CAKE 1KG","WAREHOUSE A","876876666");
INSERT INTO branchitems VALUES("121","2","17","PETROL","WAREHOUSE A","0990998897");
INSERT INTO branchitems VALUES("122","2","15","CHRISTMAS CAKE 4KG","WAREHOUSE A","900124354556");
INSERT INTO branchitems VALUES("123","2","18","DIESEL","WAREHOUSE A","45670709");
INSERT INTO branchitems VALUES("124","2","19","DIESEL","WAREHOUSE A","45670709");
INSERT INTO branchitems VALUES("125","2","20","PARAFFIN","WAREHOUSE A","11222");
INSERT INTO branchitems VALUES("126","2","21","PARAFFIN","WAREHOUSE A","11222");
INSERT INTO branchitems VALUES("150","1","1","MARBLE CAKE-1KG","MAIN SHOP","234561700");
INSERT INTO branchitems VALUES("151","1","5","PUSH CAKES","MAIN SHOP","0");
INSERT INTO branchitems VALUES("152","1","2","MIXED TEA WITH MAANDAZI","MAIN SHOP","0");
INSERT INTO branchitems VALUES("153","1","6","QUEEN CAKES","MAIN SHOP","0");
INSERT INTO branchitems VALUES("154","1","3","CHICKEN QUATER","MAIN SHOP","0");
INSERT INTO branchitems VALUES("155","1","4","CHIPS","MAIN SHOP","0");
INSERT INTO branchitems VALUES("156","1","7","FOREST CAKE 1KG","MAIN SHOP","123456");
INSERT INTO branchitems VALUES("157","1","8","ASSORTED CUP CAKES-DOZEN","MAIN SHOP","123450");
INSERT INTO branchitems VALUES("158","1","10","EAT YOUR BRAND-DOZEN","MAIN SHOP","213456");
INSERT INTO branchitems VALUES("159","1","9","ASSORTED CUP CAKES -HALF DOZEN","MAIN SHOP","1234561");
INSERT INTO branchitems VALUES("160","1","11","LOGO DOUGHNUT-DOZEN","MAIN SHOP","0998989879");
INSERT INTO branchitems VALUES("161","1","12","FRESH CREAM CAKE-1 KG","MAIN SHOP","456673687");
INSERT INTO branchitems VALUES("162","1","13","ANNIVERSARY CELEBRATION CAKE-4KG","MAIN SHOP","8687668868");
INSERT INTO branchitems VALUES("163","1","14","FAMILY COOKIES 1 DOZEN","MAIN SHOP","879895789");
INSERT INTO branchitems VALUES("164","1","15","CHRISTMAS CAKE 4KG","MAIN SHOP","900124354556");
INSERT INTO branchitems VALUES("165","1","16","BIRTHDAY FRUIT CAKE 1KG","MAIN SHOP","876876666");
INSERT INTO branchitems VALUES("166","1","17","PETROL","MAIN SHOP","0990998897");
INSERT INTO branchitems VALUES("167","1","18","DIESEL","MAIN SHOP","45670709");
INSERT INTO branchitems VALUES("168","1","19","DIESEL","MAIN SHOP","45670709");
INSERT INTO branchitems VALUES("169","1","20","PARAFFIN","MAIN SHOP","11222");
INSERT INTO branchitems VALUES("170","1","21","PARAFFIN","MAIN SHOP","11222");
INSERT INTO branchitems VALUES("171","1","22","TEST NEW ITEM","MAIN SHOP","99019019900");
INSERT INTO branchitems VALUES("172","1","24","SHELL MOTOR OIL","MAIN SHOP","5636536456565");
INSERT INTO branchitems VALUES("173","1","23","TEST NEW ITEM","MAIN SHOP","99019019900");
INSERT INTO branchitems VALUES("174","1","25","SHELL MOTOR OIL","MAIN SHOP","5636536456565");
INSERT INTO branchitems VALUES("175","1","26","NEW ITEM MARCH 2017","MAIN SHOP","2017");
INSERT INTO branchitems VALUES("176","3","1","MARBLE CAKE-1KG","WAREHOUSE B","234561700");
INSERT INTO branchitems VALUES("177","3","6","QUEEN CAKES","WAREHOUSE B","0");
INSERT INTO branchitems VALUES("178","3","5","PUSH CAKES","WAREHOUSE B","0");
INSERT INTO branchitems VALUES("179","3","4","CHIPS","WAREHOUSE B","0");
INSERT INTO branchitems VALUES("180","3","3","CHICKEN QUATER","WAREHOUSE B","0");
INSERT INTO branchitems VALUES("181","3","2","MIXED TEA WITH MAANDAZI","WAREHOUSE B","0");
INSERT INTO branchitems VALUES("182","3","7","FOREST CAKE 1KG","WAREHOUSE B","123456");
INSERT INTO branchitems VALUES("183","3","9","ASSORTED CUP CAKES -HALF DOZEN","WAREHOUSE B","1234561");
INSERT INTO branchitems VALUES("184","3","11","LOGO DOUGHNUT-DOZEN","WAREHOUSE B","0998989879");
INSERT INTO branchitems VALUES("185","3","8","ASSORTED CUP CAKES-DOZEN","WAREHOUSE B","123450");
INSERT INTO branchitems VALUES("186","3","10","EAT YOUR BRAND-DOZEN","WAREHOUSE B","213456");
INSERT INTO branchitems VALUES("187","3","12","FRESH CREAM CAKE-1 KG","WAREHOUSE B","456673687");
INSERT INTO branchitems VALUES("188","3","13","ANNIVERSARY CELEBRATION CAKE-4KG","WAREHOUSE B","8687668868");
INSERT INTO branchitems VALUES("189","3","14","FAMILY COOKIES 1 DOZEN","WAREHOUSE B","879895789");
INSERT INTO branchitems VALUES("190","3","16","BIRTHDAY FRUIT CAKE 1KG","WAREHOUSE B","876876666");
INSERT INTO branchitems VALUES("191","3","15","CHRISTMAS CAKE 4KG","WAREHOUSE B","900124354556");
INSERT INTO branchitems VALUES("192","3","17","PETROL","WAREHOUSE B","0990998897");
INSERT INTO branchitems VALUES("193","3","18","DIESEL","WAREHOUSE B","45670709");
INSERT INTO branchitems VALUES("194","3","19","DIESEL","WAREHOUSE B","45670709");
INSERT INTO branchitems VALUES("195","3","23","TEST NEW ITEM","WAREHOUSE B","99019019900");
INSERT INTO branchitems VALUES("196","3","22","TEST NEW ITEM","WAREHOUSE B","99019019900");
INSERT INTO branchitems VALUES("197","3","20","PARAFFIN","WAREHOUSE B","11222");
INSERT INTO branchitems VALUES("198","3","24","SHELL MOTOR OIL","WAREHOUSE B","5636536456565");
INSERT INTO branchitems VALUES("199","3","21","PARAFFIN","WAREHOUSE B","11222");
INSERT INTO branchitems VALUES("200","3","25","SHELL MOTOR OIL","WAREHOUSE B","5636536456565");
INSERT INTO branchitems VALUES("201","3","26","NEW ITEM MARCH 2017","WAREHOUSE B","2017");



DROP TABLE branchtbl;

CREATE TABLE `branchtbl` (
  `BranchId` int(11) NOT NULL AUTO_INCREMENT,
  `Branchname` varchar(200) DEFAULT NULL,
  `PrintOrder` varchar(200) DEFAULT 'NO',
  PRIMARY KEY (`BranchId`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO branchtbl VALUES("1","MAIN SHOP","NO");
INSERT INTO branchtbl VALUES("2","WAREHOUSE A","NO");
INSERT INTO branchtbl VALUES("3","WAREHOUSE B","NO");



DROP TABLE chartofaccounts;

CREATE TABLE `chartofaccounts` (
  `coa_Id` int(11) NOT NULL AUTO_INCREMENT,
  `coa_Code` varchar(100) DEFAULT NULL,
  `coa_Name` varchar(200) DEFAULT NULL,
  `coa_Type` varchar(50) DEFAULT NULL,
  `coa_Debit` double DEFAULT '0',
  `coa_credit` double DEFAULT '0',
  PRIMARY KEY (`coa_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

INSERT INTO chartofaccounts VALUES("1","A1010","INCOME ACCOUNT","DEBIT","0","0");
INSERT INTO chartofaccounts VALUES("2","X101","INCOME ACCOUNT","DEBIT","0","0");
INSERT INTO chartofaccounts VALUES("3","435345","TEST ACCOUNT","CREDIT","0","0");
INSERT INTO chartofaccounts VALUES("4","7657","REYREYREYYR","CREDIT","0","0");



DROP TABLE companydata;

CREATE TABLE `companydata` (
  `TransId` int(11) NOT NULL AUTO_INCREMENT,
  `CompanyName` varchar(200) DEFAULT NULL,
  `Address` varchar(200) DEFAULT NULL,
  `emailAddr` varchar(200) DEFAULT NULL,
  `PinNo` varchar(200) DEFAULT NULL,
  `TelNo` varchar(200) DEFAULT NULL,
  `FaxNo` varchar(200) DEFAULT NULL,
  `WebAddr` varchar(200) DEFAULT NULL,
  `LicenceKey` varchar(200) DEFAULT NULL,
  `New_ReceiptNo` int(11) DEFAULT '0',
  PRIMARY KEY (`TransId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO companydata VALUES("1","MUM AND PAP SHOP XX","NAIROBI KENYA","INFO@DEMOPRIMARY.COM","KX36374564745758","0712993080","X","WWW.DEMOPRIMARY.COM","45216AE4C5DF0CCAA2DD6A358D5B1D5D99D31629","67");



DROP TABLE customers;

CREATE TABLE `customers` (
  `Cus_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Cus_Name` varchar(200) DEFAULT NULL,
  `Cus_Tel` varchar(200) DEFAULT NULL,
  `Cus_Email` varchar(200) DEFAULT NULL,
  `Cus_Balance` double DEFAULT '0',
  PRIMARY KEY (`Cus_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

INSERT INTO customers VALUES("1","DEBORRAH COGNAC","0712993080","debs.konyak@gmail.com","0");
INSERT INTO customers VALUES("2","NICOLAS SARZOSKY","0721990980","X","0");
INSERT INTO customers VALUES("3","MUSTEK EAST AFRICA LTD","07128938089","sales@mustek.co.ke","0");
INSERT INTO customers VALUES("4","JOHN KIRAGU","x","x","0");
INSERT INTO customers VALUES("5","NIC BANK KENYA","071345467789","INFO@NIC.CO.KE","0");
INSERT INTO customers VALUES("6","EDISSON OMONDI","0712993008300","edison.omondi@gmail.com","0");
INSERT INTO customers VALUES("7","EDISSON INDUSTRIES","x","x","0");
INSERT INTO customers VALUES("8","WILCOX GENERAL SUPPLIERS","x","x","0");
INSERT INTO customers VALUES("9","ALICE NDUKO","x","x","12000");



DROP TABLE customertrans;

CREATE TABLE `customertrans` (
  `AutoNo` int(11) NOT NULL AUTO_INCREMENT,
  `CustomerId` int(11) DEFAULT NULL,
  `CustomerName` varchar(200) DEFAULT NULL,
  `DateTrans` date DEFAULT NULL,
  `ReceiptNo` varchar(200) DEFAULT '0',
  `Amount` double DEFAULT NULL,
  `EntryBy` varchar(200) DEFAULT NULL,
  `TransType` varchar(200) DEFAULT NULL,
  `PayMode` varchar(200) DEFAULT 'NONE',
  `Credit` double DEFAULT '0',
  `Debit` double DEFAULT '0',
  `creditbal` double DEFAULT '0',
  `Debitbal` double DEFAULT '0',
  `Refx` varchar(200) DEFAULT '',
  `T_Sta` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `CurrAmt` double DEFAULT '0',
  `CurrRate` double DEFAULT '1',
  `CurrName` varchar(200) DEFAULT 'KENYA SHILINGS',
  PRIMARY KEY (`AutoNo`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

INSERT INTO customertrans VALUES("1","1","DEBORRAH COGNAC","2016-11-10","1","2400","","CREDIT","NONE","2400","0","0","0","","2016-11-10 10:29:55","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("3","1","DEBORRAH COGNAC","2016-11-11","0","0","","DEBIT","NONE","3000","0","0","0","Account Name RTRETRET(RTRETRET) ChequeNo: 36565","2016-11-11 16:50:34","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("4","1","DEBORRAH COGNAC","2016-11-11","0","0","","DEBIT","NONE","0","10000","0","0","Account Name RTRETRET(RTRETRET) ChequeNo: 5776567","2016-11-11 16:51:38","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("5","6","EDISSON OMONDI","2016-12-21","42","0","","CREDIT","NONE","29000","0","0","0","Receipt No: 42 Date 2016-12-21","2016-12-21 08:47:29","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("6","6","EDISSON OMONDI","2017-01-11","47","0","","CREDIT","NONE","35760","0","0","0","Receipt No: 47 Date 2017-01-11","2017-01-11 10:15:18","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("7","5","NIC BANK KENYA","2017-01-12","48","0","","CREDIT","NONE","4975","0","0","0","Receipt No: 48 Date 2017-01-12","2017-01-12 11:57:39","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("8","4","JOHN KIRAGU","2017-01-12","48","0","","CREDIT","NONE","4375","0","0","0","Receipt No: 48 Date 2017-01-12","2017-01-12 12:47:31","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("9","7","EDISSON INDUSTRIES","2017-01-17","50","0","","CREDIT","NONE","16100","0","0","0","Receipt No: 50 Date 2017-01-17","2017-01-17 15:08:16","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("10","7","EDISSON INDUSTRIES","2017-03-01","000","0","","CREDIT","NONE","15900","0","0","0","Fuel Purchase: Amount15900 Date 2017-03-01","2017-03-02 12:08:02","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("11","1","DEBORRAH COGNAC","2017-03-07","000","0","","CREDIT","NONE","12000","0","0","0","Fuel Purchase: Amount12000 Date 2017-03-07 Desc lorry","2017-03-07 11:06:30","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("12","2","NICOLAS SARZOSKY","2017-03-07","000","0","","CREDIT","NONE","1200","0","0","0","Fuel Purchase: Amount1200 Date 2017-03-07 Desc xxxxxxxxxxxxxxx","2017-03-07 11:15:22","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("13","2","NICOLAS SARZOSKY","2017-03-07","000","0","","CREDIT","NONE","1200","0","0","0","Fuel Purchase: Amount1200 Date 2017-03-07 Desc xxxxxxxxxxxxxxx","2017-03-07 11:17:00","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("14","4","JOHN KIRAGU","2017-03-07","000","0","","CREDIT","NONE","16000","0","0","0","Fuel Purchase: Amount16000 Date 2017-03-07 Desc test","2017-03-07 11:20:55","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("15","3","MUSTEK EAST AFRICA LTD","2017-03-07","000","0","","CREDIT","NONE","14000","0","0","0","Fuel Purchase: Amount14000 Date 2017-03-07 Desc xxxxx","2017-03-07 13:47:09","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("16","2","NICOLAS SARZOSKY","2017-03-08","000","0","","CREDIT","NONE","6000","0","0","0","Fuel Purchase: Amount6000 Date 2017-03-08 Desc kat 456t","2017-03-08 11:18:52","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("17","5","NIC BANK KENYA","2017-03-09","64","0","","CREDIT","NONE","16000","0","0","0","Receipt No: 64 Date 2017-03-09","2017-03-09 08:26:47","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("18","9","ALICE NDUKO","2017-03-09","0","0","","CREDIT","NONE","12000","0","0","0","Opening Balance","2017-03-09 15:25:56","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("19","8","WILCOX GENERAL SUPPLIERS","2017-03-10","000","0","","CREDIT","NONE","5000","0","0","0","Fuel Purchase: Amount5000 Date 2017-03-10 Desc kcx129","2017-03-10 07:04:53","0","1","KENYA SHILINGS");
INSERT INTO customertrans VALUES("20","7","EDISSON INDUSTRIES","2017-03-10","000","0","","CREDIT","NONE","4500","0","0","0","Fuel Purchase: Amount4500 Date 2017-03-10 Desc XXXXXXXXXXXXXX","2017-03-10 07:05:56","0","1","KENYA SHILINGS");



DROP TABLE expensenames;

CREATE TABLE `expensenames` (
  `expense_ID` int(11) NOT NULL AUTO_INCREMENT,
  `expense_Name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`expense_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO expensenames VALUES("1","ELEC");
INSERT INTO expensenames VALUES("2","LUNCH");
INSERT INTO expensenames VALUES("3","TRANSPORT");



DROP TABLE expensetbl;

CREATE TABLE `expensetbl` (
  `xp_ID` int(11) NOT NULL AUTO_INCREMENT,
  `xp_ExpenseID` int(11) DEFAULT NULL,
  `xp_ExpenseName` varchar(200) DEFAULT NULL,
  `xp_ExpenseDate` date DEFAULT NULL,
  `xp_ExpenseNarr` varchar(200) DEFAULT NULL,
  `xp_ExpenseAmt` double DEFAULT '0',
  `xp_staffId` int(11) DEFAULT '0',
  PRIMARY KEY (`xp_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

INSERT INTO expensetbl VALUES("1","1","ELEC","2016-11-10","november bill","2000","0");
INSERT INTO expensetbl VALUES("2","1","ELEC","2016-12-15","dec elec bill","1200","0");
INSERT INTO expensetbl VALUES("3","1","ELEC","2017-03-08","February Elec Bill o 67888570","4500","6");
INSERT INTO expensetbl VALUES("4","2","LUNCH","2017-03-10","x","500","4");
INSERT INTO expensetbl VALUES("5","2","LUNCH","2017-03-10","xx","500","2");
INSERT INTO expensetbl VALUES("6","2","LUNCH","2017-03-10","xx","500","1");
INSERT INTO expensetbl VALUES("7","2","LUNCH","2017-03-10","xxx","500","6");



DROP TABLE fueldelivery;

CREATE TABLE `fueldelivery` (
  `fuel_Id` int(11) NOT NULL AUTO_INCREMENT,
  `fuel_Date` date DEFAULT NULL,
  `fuel_Code` int(11) DEFAULT NULL,
  `fuel_Name` varchar(200) DEFAULT NULL,
  `fuel_Supplier` varchar(200) DEFAULT NULL,
  `fuel_SupID` int(11) DEFAULT NULL,
  `fuel_Cost` double DEFAULT '0',
  `fuel_TankID` int(11) DEFAULT NULL,
  `fuel_TankName` varchar(200) DEFAULT NULL,
  `fuel_ReceivedBy` varchar(200) DEFAULT NULL,
  `fuel_UserId` int(11) DEFAULT NULL,
  `fuel_Qty` double DEFAULT '0',
  `fuel_DipBefore` double DEFAULT '0',
  `fuel_DipAfter` double DEFAULT '0',
  `fuel_regNo` varchar(200) DEFAULT '',
  `fuel_DriverName` varchar(200) DEFAULT '',
  `fuel_SalesAmount` double DEFAULT '0',
  PRIMARY KEY (`fuel_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

INSERT INTO fueldelivery VALUES("1","2017-02-28","17","PETROL","KENVINE PETROLEUM LTD","6","65","1","TANK A","MAUREEN KINYUA","6","1200","0","0","","","0");
INSERT INTO fueldelivery VALUES("2","2017-03-01","17","PETROL","KENVINE PETROLEUM LTD","6","65","1","TANK A","ERIC KOMU","4","50","0","0","","","0");
INSERT INTO fueldelivery VALUES("3","2017-03-01","17","PETROL","KENVINE PETROLEUM LTD","6","65","2","TANK B","JOYCE WAWERU NJERU","1","50","0","0","","","0");
INSERT INTO fueldelivery VALUES("4","2017-03-02","17","PETROL","KENVINE PETROLEUM LTD","6","65","5","TANK E","MAUREEN KINYUA","6","1500","0","0","","","0");
INSERT INTO fueldelivery VALUES("5","2017-03-02","20","PARAFFIN","KENVINE PETROLEUM LTD","6","45","3","TANK C","JAME MRUTTU","2","15000","0","0","","","0");
INSERT INTO fueldelivery VALUES("6","2017-03-08","20","PARAFFIN","DAVID WASIKE","5","50","1","TANK A","MAUREEN KINYUA","6","14000","0","14000","kcg 456y","onesmus wanderi","2000");



DROP TABLE fueldeliveryxxxx;

CREATE TABLE `fueldeliveryxxxx` (
  `fuel_Id` int(11) NOT NULL AUTO_INCREMENT,
  `fuel_Date` date DEFAULT NULL,
  `fuel_Code` int(11) DEFAULT NULL,
  `fuel_Name` varchar(200) DEFAULT NULL,
  `fuel_Supplier` varchar(200) DEFAULT NULL,
  `fuel_SupID` int(11) DEFAULT NULL,
  `fuel_Cost` double DEFAULT '0',
  `fuel_TankID` int(11) DEFAULT NULL,
  `fuel_TankName` varchar(200) DEFAULT NULL,
  `fuel_ReceivedBy` varchar(200) DEFAULT NULL,
  `fuel_UserId` int(11) DEFAULT NULL,
  `fuel_Qty` double DEFAULT '0',
  PRIMARY KEY (`fuel_Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;




DROP TABLE invoicelist;

CREATE TABLE `invoicelist` (
  `inv_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `inv_CusId` int(11) DEFAULT NULL,
  `inv_Date` date DEFAULT NULL,
  `inv_StaffID` int(11) DEFAULT NULL,
  `inv_StaffName` varchar(200) DEFAULT NULL,
  `inv_Amount` double DEFAULT '0',
  `inv_CustomerName` varchar(200) DEFAULT NULL,
  `inv_Description` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`inv_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

INSERT INTO invoicelist VALUES("1","1","2017-03-07","4","ERIC KOMU","12000","DEBORRAH COGNAC","lorry");
INSERT INTO invoicelist VALUES("2","1","2017-03-07","4","ERIC KOMU","12000","DEBORRAH COGNAC","lorry");
INSERT INTO invoicelist VALUES("3","1","2017-03-07","4","ERIC KOMU","12000","DEBORRAH COGNAC","lorry");
INSERT INTO invoicelist VALUES("4","2","2017-03-07","4","ERIC KOMU","1200","NICOLAS SARZOSKY","xxxxxxxxxxxxxxx");
INSERT INTO invoicelist VALUES("5","2","2017-03-07","4","ERIC KOMU","1200","NICOLAS SARZOSKY","xxxxxxxxxxxxxxx");
INSERT INTO invoicelist VALUES("6","4","2017-03-07","4","ERIC KOMU","16000","JOHN KIRAGU","test");
INSERT INTO invoicelist VALUES("7","3","2017-03-07","2","JAME MRUTTU","14000","MUSTEK EAST AFRICA LTD","xxxxx");
INSERT INTO invoicelist VALUES("8","2","2017-03-08","6","MAUREEN KINYUA","6000","NICOLAS SARZOSKY","kat 456t");
INSERT INTO invoicelist VALUES("9","8","2017-03-10","4","ERIC KOMU","5000","WILCOX GENERAL SUPPLIERS","kcx129");
INSERT INTO invoicelist VALUES("10","7","2017-03-10","1","JOYCE WAWERU NJERU","4500","EDISSON INDUSTRIES","XXXXXXXXXXXXXX");



DROP TABLE invoicelistolde;

CREATE TABLE `invoicelistolde` (
  `inv_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `inv_CusId` int(11) DEFAULT NULL,
  `inv_Date` date DEFAULT NULL,
  `inv_StaffID` int(11) DEFAULT NULL,
  `inv_StaffName` varchar(200) DEFAULT NULL,
  `inv_Amount` double DEFAULT '0',
  `inv_CustomerName` varchar(200) DEFAULT NULL,
  `inv_Description` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`inv_TransID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;




DROP TABLE itemcats;

CREATE TABLE `itemcats` (
  `CatId` int(11) NOT NULL AUTO_INCREMENT,
  `itemCat` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`CatId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO itemcats VALUES("1","KITCHEN ITEMS");



DROP TABLE items;

CREATE TABLE `items` (
  `ItemCode` int(11) NOT NULL AUTO_INCREMENT,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT 'UNITS',
  `PurchPrice` double DEFAULT NULL,
  `SalePrice` double DEFAULT NULL,
  `Taxable` varchar(200) DEFAULT 'NO',
  `Salable` varchar(200) DEFAULT 'YES',
  `Qopening` double DEFAULT '0',
  `Qpurch` double DEFAULT '0',
  `Qsold` double DEFAULT '0',
  `Bal` double DEFAULT '0',
  `Client` varchar(200) DEFAULT NULL,
  `Reorder` double DEFAULT '0',
  `Category` varchar(200) DEFAULT NULL,
  `TradePrice` double DEFAULT '0',
  `XXXX` varchar(200) DEFAULT NULL,
  `PrescAbbrev` varchar(200) DEFAULT NULL,
  `xBarCode` varchar(200) DEFAULT '0000000000',
  `MinPrice` double DEFAULT '0',
  `MaxPrice` double DEFAULT '0',
  `PValue` double DEFAULT '0',
  `SValue` double DEFAULT '0',
  `StockVal` double DEFAULT '0',
  `TaxVal` double DEFAULT '16',
  `WholeSale` double DEFAULT '0',
  `CommVal` double DEFAULT '0',
  `CommType` varchar(200) DEFAULT 'A',
  `BulkQty` int(11) DEFAULT '1',
  `PurchUnits` varchar(200) DEFAULT 'Pcs',
  `SaleUnits` varchar(200) DEFAULT 'Pcs',
  `BarCode` varchar(200) DEFAULT '0',
  `UniquePack` varchar(200) DEFAULT 'NO',
  PRIMARY KEY (`ItemCode`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=latin1;

INSERT INTO items VALUES("1","MARBLE CAKE-1KG","UNITS","50","120","NO","YES","0","0","0","0","","20","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","234561700","YES");
INSERT INTO items VALUES("2","MIXED TEA WITH MAANDAZI","UNITS","45","120","NO","YES","0","0","0","0","","10","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","0","YES");
INSERT INTO items VALUES("3","CHICKEN QUATER","UNITS","60","150","NO","YES","0","0","0","0","","20","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","0","YES");
INSERT INTO items VALUES("4","CHIPS","UNITS","30","100","NO","YES","0","0","0","0","","10","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","0","YES");
INSERT INTO items VALUES("5","PUSH CAKES","UNITS","120","320","NO","YES","0","0","0","0","","10","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","12","Pcs","Pcs","0","YES");
INSERT INTO items VALUES("6","QUEEN CAKES","UNITS","60","180","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","12","Pcs","Pcs","0","YES");
INSERT INTO items VALUES("7","FOREST CAKE 1KG","UNITS","850","2500","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","123456","YES");
INSERT INTO items VALUES("8","ASSORTED CUP CAKES-DOZEN","UNITS","800","1700","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","12","Pcs","Pcs","123450","YES");
INSERT INTO items VALUES("9","ASSORTED CUP CAKES -HALF DOZEN","UNITS","5","12","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","6","Pcs","Pcs","1234561","NO");
INSERT INTO items VALUES("10","EAT YOUR BRAND-DOZEN","UNITS","6","15","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","12","Pcs","Pcs","213456","NO");
INSERT INTO items VALUES("11","LOGO DOUGHNUT-DOZEN","UNITS","800","2200","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","12","Pcs","Pcs","0998989879","NO");
INSERT INTO items VALUES("12","FRESH CREAM CAKE-1 KG","UNITS","900","1750","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","456673687","NO");
INSERT INTO items VALUES("13","ANNIVERSARY CELEBRATION CAKE-4KG","UNITS","3200","6500","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","8687668868","NO");
INSERT INTO items VALUES("14","FAMILY COOKIES 1 DOZEN","UNITS","80","200","NO","YES","0","0","0","0","","10","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","12","Pcs","Pcs","879895789","NO");
INSERT INTO items VALUES("15","CHRISTMAS CAKE 4KG","UNITS","2500","8000","NO","YES","0","0","0","0","","10","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","900124354556","NO");
INSERT INTO items VALUES("16","BIRTHDAY FRUIT CAKE 1KG","UNITS","1000","4000","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","876876666","NO");
INSERT INTO items VALUES("17","PETROL","UNITS","65","103","NO","YES","0","0","0","0","","50","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","0990998897","NO");
INSERT INTO items VALUES("18","DIESEL","UNITS","45","102","NO","YES","0","0","0","0","","100","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","45670709","NO");
INSERT INTO items VALUES("19","DIESEL","UNITS","45","102","NO","YES","0","0","0","0","","100","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","45670709","NO");
INSERT INTO items VALUES("20","PARAFFIN","UNITS","45","84","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","11222","NO");
INSERT INTO items VALUES("21","PARAFFIN","UNITS","45","84","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","1","Pcs","Pcs","11222","NO");
INSERT INTO items VALUES("22","TEST NEW ITEM","UNITS","120","180","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","0","Pcs","Pcs","99019019900","NO");
INSERT INTO items VALUES("23","TEST NEW ITEM","UNITS","120","180","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","0","Pcs","Pcs","99019019900","NO");
INSERT INTO items VALUES("24","SHELL MOTOR OIL","UNITS","180","300","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","0","Pcs","Pcs","5636536456565","NO");
INSERT INTO items VALUES("25","SHELL MOTOR OIL","UNITS","180","300","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","0","Pcs","Pcs","5636536456565","NO");
INSERT INTO items VALUES("26","NEW ITEM MARCH 2017","UNITS","10","20","NO","YES","0","0","0","0","","0","1","0","","","0000000000","0","0","0","0","0","16","0","0","A","0","Pcs","Pcs","2017","NO");



DROP TABLE jcitems;

CREATE TABLE `jcitems` (
  `RcptNo` int(11) DEFAULT NULL,
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Qty` double DEFAULT NULL,
  `UnitPrice` double DEFAULT NULL,
  `TotalPrice` double DEFAULT NULL,
  `Vat` double DEFAULT NULL,
  `TransDate` date DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `BatchNo` varchar(200) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `SaleCode` int(11) DEFAULT NULL,
  `Client` varchar(200) DEFAULT 'CASH SALE',
  `CostPrice` double DEFAULT '0',
  `Disc` double DEFAULT '0',
  `Sppl` varchar(200) DEFAULT NULL,
  `Qnty` double DEFAULT '0',
  `T_Sta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `SRet` double DEFAULT '0',
  `PatId` int(11) DEFAULT '0',
  `StoreId` int(11) DEFAULT NULL,
  PRIMARY KEY (`TransNo`),
  KEY `FK_sales` (`RcptNo`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

INSERT INTO jcitems VALUES("3","7","blue band","","1","120","","","2016-11-23","1","","","","CASH SALE","0","0","","0","2016-11-23 09:29:28","0","0","0");
INSERT INTO jcitems VALUES("4","4","CHICKEN FULL","","1","300","","","2016-11-25","2","","","","CASH SALE","0","0","","0","2016-11-25 14:10:33","0","0","0");
INSERT INTO jcitems VALUES("4","7","blue band","","2","120","","","2016-11-25","3","","","","CASH SALE","0","0","","0","2016-11-25 14:10:43","0","0","0");
INSERT INTO jcitems VALUES("4","10","queen cake cups","","4","1","","","2016-11-25","4","","","","CASH SALE","0","0","","0","2016-11-25 14:10:52","0","0","0");
INSERT INTO jcitems VALUES("4","1","WHEAT FLOUR","","2","120","","","2016-12-14","5","","","","CASH SALE","0","0","","0","2016-12-14 15:11:32","0","0","0");



DROP TABLE jobcardstbl;

CREATE TABLE `jobcardstbl` (
  `jc_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `jc_CardNo` varchar(200) DEFAULT NULL,
  `jc_CustomerID` int(11) DEFAULT NULL,
  `jc_CustomerName` varchar(200) DEFAULT NULL,
  `jc_Date` date DEFAULT NULL,
  `jc_InevtoryID` int(11) DEFAULT NULL,
  `jc_InventoryName` varchar(200) DEFAULT NULL,
  `jc_CarNo` varchar(50) DEFAULT NULL,
  `jc_Narration` varchar(200) DEFAULT NULL,
  `jc_DoneBy` varchar(200) DEFAULT NULL,
  `jc_StaffID` int(11) DEFAULT NULL,
  `jc_StaffName` varchar(200) DEFAULT NULL,
  `jc_Locked` varchar(20) DEFAULT 'NO',
  `jc_LastEdited` date DEFAULT '2016-12-14',
  PRIMARY KEY (`jc_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

INSERT INTO jobcardstbl VALUES("1","1002","2","NICOLAS SARZOSKY","2016-11-17","2","WAREHOUSE A","kcb 346c","TEST","JAME MRUTTU","2","","NO","2016-12-14");
INSERT INTO jobcardstbl VALUES("2","23456","3","MUSTEK EAST AFRICA LTD","2016-11-23","2","WAREHOUSE A","kax321v","SERVICING ","ANTHONY NDWIGA","3","","NO","2016-12-14");
INSERT INTO jobcardstbl VALUES("3","10019","1","DEBORRAH COGNAC","2016-11-23","1","MAIN SHOP","gk 441a","DOOR REPAIRS","JOYCE WAWERU","1","","NO","2016-12-14");
INSERT INTO jobcardstbl VALUES("4","14500","4","JOHN KIRAGU","2016-11-25","1","MAIN SHOP","KBA 345K","PAINT JOB","JAME MRUTTU","2","","NO","2016-12-14");



DROP TABLE login;

CREATE TABLE `login` (
  `User_Position` varchar(200) DEFAULT NULL,
  `UserName` varchar(200) DEFAULT NULL,
  `loginpass` varchar(200) DEFAULT NULL,
  `IdNo` int(11) NOT NULL AUTO_INCREMENT,
  `FullNames` varchar(200) DEFAULT NULL,
  `branchID` int(11) DEFAULT NULL,
  PRIMARY KEY (`IdNo`)
) ENGINE=InnoDB AUTO_INCREMENT=12353 DEFAULT CHARSET=latin1;

INSERT INTO login VALUES("Admin","admin","admin123","12345","POS USER","1");
INSERT INTO login VALUES("Supervisor","sarah m","salim","12346","SARAH MANNING","3");
INSERT INTO login VALUES("Admin","salim","salim","12347","SALIM MKIRANI","1");
INSERT INTO login VALUES("Admin","kiduku","salim","12348","JAME KIDUKU","1");
INSERT INTO login VALUES("Admin","ken","ken","12350","KENNED","3");
INSERT INTO login VALUES("Admin","jk","1","12351","JAMES K","2");
INSERT INTO login VALUES(" User1","dylan","dylan","12352","DYLAN","1");



DROP TABLE material_transfer;

CREATE TABLE `material_transfer` (
  `Transfer_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Transfer_itemCode` int(11) DEFAULT NULL,
  `Transfer_ItemName` varchar(200) DEFAULT NULL,
  `Transfer_SourceID` int(11) DEFAULT NULL,
  `Transfer_Qty` double DEFAULT '0',
  `Transfer_DestinationID` int(11) DEFAULT NULL,
  `Transfer_Date` date DEFAULT NULL,
  PRIMARY KEY (`Transfer_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO material_transfer VALUES("1","4","CHIPS","1","20","2","2016-11-23");



DROP TABLE materialusage;

CREATE TABLE `materialusage` (
  `usage_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `usage_ProdCode` int(11) DEFAULT NULL,
  `usage_ProdNme` varchar(200) DEFAULT NULL,
  `usage_MatCode` int(11) DEFAULT NULL,
  `usage_MatName` varchar(200) DEFAULT NULL,
  `usage_TransDate` date DEFAULT NULL,
  `usage_MatQty` double DEFAULT '0',
  `usage_StoreCode` int(11) DEFAULT NULL,
  PRIMARY KEY (`usage_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=latin1;

INSERT INTO materialusage VALUES("1","1","MARBLE CAKE","2","MILK LTR","2016-11-09","0.5","1");
INSERT INTO materialusage VALUES("2","1","MARBLE CAKE","5","SUGAR KGS","2016-11-09","0.2","1");
INSERT INTO materialusage VALUES("3","1","MARBLE CAKE","1","WHEAT FLOUR","2016-11-09","0.44","1");
INSERT INTO materialusage VALUES("4","3","CHICKEN QUATER","4","CHICKEN FULL","2016-11-09","0.8","1");
INSERT INTO materialusage VALUES("5","3","CHICKEN QUATER","6","COOKING OIL TRS","2016-11-09","0.2","1");
INSERT INTO materialusage VALUES("7","4","CHIPS","3","POTATOES KG","2016-11-09","0.8","1");
INSERT INTO materialusage VALUES("8","4","CHIPS","6","COOKING OIL TRS","2016-11-09","0.5","1");
INSERT INTO materialusage VALUES("10","1","MARBLE CAKE","2","MILK LTR","2016-11-17","0.5","1");
INSERT INTO materialusage VALUES("11","1","MARBLE CAKE","5","SUGAR KGS","2016-11-17","0.2","1");
INSERT INTO materialusage VALUES("12","1","MARBLE CAKE","1","WHEAT FLOUR","2016-11-17","0.44","1");
INSERT INTO materialusage VALUES("13","3","CHICKEN QUATER","4","CHICKEN FULL","2016-11-17","0.8","1");
INSERT INTO materialusage VALUES("14","3","CHICKEN QUATER","6","COOKING OIL TRS","2016-11-17","0.2","1");
INSERT INTO materialusage VALUES("16","4","CHIPS","3","POTATOES KG","2016-11-17","0.8","1");
INSERT INTO materialusage VALUES("17","4","CHIPS","6","COOKING OIL TRS","2016-11-17","0.5","1");
INSERT INTO materialusage VALUES("33","6","QUEEN CAKES","7","blue band","2016-11-18","50","1");
INSERT INTO materialusage VALUES("34","6","QUEEN CAKES","8","eggs pcs","2016-11-18","500","1");
INSERT INTO materialusage VALUES("35","6","QUEEN CAKES","1","WHEAT FLOUR","2016-11-18","100","1");
INSERT INTO materialusage VALUES("36","6","QUEEN CAKES","6","COOKING OIL TRS","2016-11-18","50","1");
INSERT INTO materialusage VALUES("37","6","QUEEN CAKES","2","MILK LTR","2016-11-18","50","1");
INSERT INTO materialusage VALUES("40","1","MARBLE CAKE","2","MILK LTR","2016-11-21","1.25","1");
INSERT INTO materialusage VALUES("41","1","MARBLE CAKE","5","SUGAR KGS","2016-11-21","0.5","1");
INSERT INTO materialusage VALUES("42","1","MARBLE CAKE","1","WHEAT FLOUR","2016-11-21","1.1","1");
INSERT INTO materialusage VALUES("43","15","CHRISTMAS CAKE 4KG","1","WHEAT FLOUR","2016-12-09","10","1");
INSERT INTO materialusage VALUES("44","15","CHRISTMAS CAKE 4KG","2","MILK LTR","2016-12-09","10","1");
INSERT INTO materialusage VALUES("45","15","CHRISTMAS CAKE 4KG","5","SUGAR KGS","2016-12-09","2.5","1");
INSERT INTO materialusage VALUES("46","15","CHRISTMAS CAKE 4KG","7","BLUE BAND","2016-12-09","5","1");
INSERT INTO materialusage VALUES("47","15","CHRISTMAS CAKE 4KG","8","EGGS PCS","2016-12-09","60","1");
INSERT INTO materialusage VALUES("50","16","BIRTHDAY FRUIT CAKE 1KG","1","WHEAT FLOUR","2016-12-11","8","1");
INSERT INTO materialusage VALUES("51","16","BIRTHDAY FRUIT CAKE 1KG","2","MILK LTR","2016-12-11","6","1");
INSERT INTO materialusage VALUES("52","16","BIRTHDAY FRUIT CAKE 1KG","5","SUGAR KGS","2016-12-11","2","1");
INSERT INTO materialusage VALUES("53","16","BIRTHDAY FRUIT CAKE 1KG","8","EGGS PCS","2016-12-11","24","1");
INSERT INTO materialusage VALUES("54","16","BIRTHDAY FRUIT CAKE 1KG","7","BLUE BAND","2016-12-11","4","1");
INSERT INTO materialusage VALUES("55","1","MARBLE CAKE","2","MILK LTR","2017-01-04","1","1");
INSERT INTO materialusage VALUES("56","1","MARBLE CAKE","5","SUGAR KGS","2017-01-04","0.4","1");
INSERT INTO materialusage VALUES("57","1","MARBLE CAKE","1","WHEAT FLOUR","2017-01-04","0.88","1");
INSERT INTO materialusage VALUES("58","15","CHRISTMAS CAKE 4KG","1","WHEAT FLOUR","2017-01-04","20","1");
INSERT INTO materialusage VALUES("59","15","CHRISTMAS CAKE 4KG","2","MILK LTR","2017-01-04","20","1");
INSERT INTO materialusage VALUES("60","15","CHRISTMAS CAKE 4KG","5","SUGAR KGS","2017-01-04","5","1");
INSERT INTO materialusage VALUES("61","15","CHRISTMAS CAKE 4KG","7","BLUE BAND","2017-01-04","10","1");
INSERT INTO materialusage VALUES("62","15","CHRISTMAS CAKE 4KG","8","EGGS PCS","2017-01-04","120","1");
INSERT INTO materialusage VALUES("65","16","BIRTHDAY FRUIT CAKE 1KG","1","WHEAT FLOUR","2017-01-04","24","1");
INSERT INTO materialusage VALUES("66","16","BIRTHDAY FRUIT CAKE 1KG","2","MILK LTR","2017-01-04","18","1");
INSERT INTO materialusage VALUES("67","16","BIRTHDAY FRUIT CAKE 1KG","5","SUGAR KGS","2017-01-04","6","1");
INSERT INTO materialusage VALUES("68","16","BIRTHDAY FRUIT CAKE 1KG","8","EGGS PCS","2017-01-04","72","1");
INSERT INTO materialusage VALUES("69","16","BIRTHDAY FRUIT CAKE 1KG","7","BLUE BAND","2017-01-04","12","1");
INSERT INTO materialusage VALUES("70","1","MARBLE CAKE","2","MILK LTR","2017-01-12","5","1");
INSERT INTO materialusage VALUES("71","1","MARBLE CAKE","5","SUGAR KGS","2017-01-12","2","1");
INSERT INTO materialusage VALUES("72","1","MARBLE CAKE","1","WHEAT FLOUR","2017-01-12","4.4","1");
INSERT INTO materialusage VALUES("73","6","QUEEN CAKES","7","blue band","2017-01-12","5","1");
INSERT INTO materialusage VALUES("74","6","QUEEN CAKES","8","eggs pcs","2017-01-12","50","1");
INSERT INTO materialusage VALUES("75","6","QUEEN CAKES","1","WHEAT FLOUR","2017-01-12","10","1");
INSERT INTO materialusage VALUES("76","6","QUEEN CAKES","6","COOKING OIL TRS","2017-01-12","5","1");
INSERT INTO materialusage VALUES("77","6","QUEEN CAKES","2","MILK LTR","2017-01-12","5","1");
INSERT INTO materialusage VALUES("80","16","BIRTHDAY FRUIT CAKE 1KG","1","WHEAT FLOUR","2017-01-13","20","1");
INSERT INTO materialusage VALUES("81","16","BIRTHDAY FRUIT CAKE 1KG","2","MILK LTR","2017-01-13","15","1");
INSERT INTO materialusage VALUES("82","16","BIRTHDAY FRUIT CAKE 1KG","5","SUGAR KGS","2017-01-13","5","1");
INSERT INTO materialusage VALUES("83","16","BIRTHDAY FRUIT CAKE 1KG","8","EGGS PCS","2017-01-13","60","1");
INSERT INTO materialusage VALUES("84","16","BIRTHDAY FRUIT CAKE 1KG","7","BLUE BAND","2017-01-13","10","1");
INSERT INTO materialusage VALUES("87","15","CHRISTMAS CAKE 4KG","1","WHEAT FLOUR","2017-01-13","10","1");
INSERT INTO materialusage VALUES("88","15","CHRISTMAS CAKE 4KG","2","MILK LTR","2017-01-13","10","1");
INSERT INTO materialusage VALUES("89","15","CHRISTMAS CAKE 4KG","5","SUGAR KGS","2017-01-13","2.5","1");
INSERT INTO materialusage VALUES("90","15","CHRISTMAS CAKE 4KG","7","BLUE BAND","2017-01-13","5","1");
INSERT INTO materialusage VALUES("91","15","CHRISTMAS CAKE 4KG","8","EGGS PCS","2017-01-13","60","1");
INSERT INTO materialusage VALUES("94","1","MARBLE CAKE","2","MILK LTR","2017-01-16","1.25","1");
INSERT INTO materialusage VALUES("95","1","MARBLE CAKE","5","SUGAR KGS","2017-01-16","0.5","1");
INSERT INTO materialusage VALUES("96","1","MARBLE CAKE","1","WHEAT FLOUR","2017-01-16","1.1","1");
INSERT INTO materialusage VALUES("97","15","CHRISTMAS CAKE 4KG","1","WHEAT FLOUR","2017-01-16","16","1");
INSERT INTO materialusage VALUES("98","15","CHRISTMAS CAKE 4KG","2","MILK LTR","2017-01-16","16","1");
INSERT INTO materialusage VALUES("99","15","CHRISTMAS CAKE 4KG","5","SUGAR KGS","2017-01-16","4","1");
INSERT INTO materialusage VALUES("100","15","CHRISTMAS CAKE 4KG","7","BLUE BAND","2017-01-16","8","1");
INSERT INTO materialusage VALUES("101","15","CHRISTMAS CAKE 4KG","8","EGGS PCS","2017-01-16","96","1");
INSERT INTO materialusage VALUES("104","1","MARBLE CAKE","2","MILK LTR","2017-01-20","3.75","1");
INSERT INTO materialusage VALUES("105","1","MARBLE CAKE","5","SUGAR KGS","2017-01-20","1.5","1");
INSERT INTO materialusage VALUES("106","1","MARBLE CAKE","1","WHEAT FLOUR","2017-01-20","3.3","1");
INSERT INTO materialusage VALUES("107","6","QUEEN CAKES","7","blue band","2017-01-20","1.8","1");
INSERT INTO materialusage VALUES("108","6","QUEEN CAKES","8","eggs pcs","2017-01-20","18","1");
INSERT INTO materialusage VALUES("109","6","QUEEN CAKES","1","WHEAT FLOUR","2017-01-20","3.6","1");
INSERT INTO materialusage VALUES("110","6","QUEEN CAKES","6","COOKING OIL TRS","2017-01-20","1.8","1");
INSERT INTO materialusage VALUES("111","6","QUEEN CAKES","2","MILK LTR","2017-01-20","1.8","1");
INSERT INTO materialusage VALUES("114","16","BIRTHDAY FRUIT CAKE 1KG","1","WHEAT FLOUR","2017-01-23","18","1");
INSERT INTO materialusage VALUES("115","16","BIRTHDAY FRUIT CAKE 1KG","2","MILK LTR","2017-01-23","13.5","1");
INSERT INTO materialusage VALUES("116","16","BIRTHDAY FRUIT CAKE 1KG","5","SUGAR KGS","2017-01-23","4.5","1");
INSERT INTO materialusage VALUES("117","16","BIRTHDAY FRUIT CAKE 1KG","8","EGGS PCS","2017-01-23","54","1");
INSERT INTO materialusage VALUES("118","16","BIRTHDAY FRUIT CAKE 1KG","7","BLUE BAND","2017-01-23","9","1");



DROP TABLE matlist;

CREATE TABLE `matlist` (
  `ItemCode` int(11) NOT NULL AUTO_INCREMENT,
  `ItemName` varchar(200) DEFAULT NULL,
  `CostPrice` double DEFAULT '0',
  `VatRate` double DEFAULT '0',
  `Reorder` double DEFAULT '0',
  `SerialNo` varchar(200) DEFAULT '00000000000',
  PRIMARY KEY (`ItemCode`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

INSERT INTO matlist VALUES("1","WHEAT FLOUR","120","16","10","00000000000");
INSERT INTO matlist VALUES("2","MILK LTR","65","16","20","00000000000");
INSERT INTO matlist VALUES("3","POTATOES KG","25","16","50","00000000000");
INSERT INTO matlist VALUES("4","CHICKEN FULL","300","16","50","00000000000");
INSERT INTO matlist VALUES("5","SUGAR KGS","130","16","20","00000000000");
INSERT INTO matlist VALUES("6","COOKING OIL TRS","125","16","20","00000000000");
INSERT INTO matlist VALUES("7","BLUE BAND","120","16","2","00000000000");
INSERT INTO matlist VALUES("8","EGGS PCS","10","16","300","00000000000");
INSERT INTO matlist VALUES("9","FOOD COLOR","20","16","10","123478");
INSERT INTO matlist VALUES("10","QUEEN CAKE CUPS","1","16","100","879792379");
INSERT INTO matlist VALUES("11","1 KG CAKE BOX","10","16","100","698999");
INSERT INTO matlist VALUES("12","45x45 cake box","12","16","0","123456");



DROP TABLE nonsaleitems;

CREATE TABLE `nonsaleitems` (
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Qty` double DEFAULT NULL,
  `UnitPrice` double DEFAULT '0',
  `TotalPrice` double DEFAULT '0',
  `Vat` double DEFAULT NULL,
  `TransDate` date DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `Reason` varchar(200) DEFAULT NULL,
  `Sppl` varchar(200) DEFAULT NULL,
  `StoreId` int(11) DEFAULT NULL,
  PRIMARY KEY (`TransNo`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO nonsaleitems VALUES("1","MARBLE CAKE","","2","0","0","","2016-11-24","1","Free Sample","2","1");



DROP TABLE packagetbl;

CREATE TABLE `packagetbl` (
  `package_ID` int(11) NOT NULL AUTO_INCREMENT,
  `package_Date` date DEFAULT NULL,
  `package_ItemCode` int(11) DEFAULT NULL,
  `package_ItemName` varchar(200) DEFAULT NULL,
  `package_Qty` double DEFAULT '0',
  `package_Rem` double DEFAULT '0',
  `package_Produced` double DEFAULT '0',
  `package_Done` varchar(200) DEFAULT 'NO',
  `package_Phy` double DEFAULT '0',
  `package_Var` double DEFAULT '0',
  `package_StoreID` int(11) DEFAULT '1',
  PRIMARY KEY (`package_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=227 DEFAULT CHARSET=latin1;

INSERT INTO packagetbl VALUES("1","2016-11-09","1","MARBLE CAKE","10","0","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("2","2016-11-09","3","CHICKEN QUATER","100","0","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("3","2016-11-09","4","CHIPS","150","0","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("4","2017-01-04","1","MARBLE CAKE-1KG","4","0","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("5","2017-01-04","15","CHRISTMAS CAKE 4KG","10","0","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("6","2017-01-04","16","BIRTHDAY FRUIT CAKE 1KG","12","0","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("7","2017-01-04","14","FAMILY COOKIES 1 DOZEN","1.6666666666667","8","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("8","2017-01-04","5","PUSH CAKES","1.25","3","0","NO","0","0","1");
INSERT INTO packagetbl VALUES("104","2017-01-05","1","MARBLE CAKE-1KG","4","0","4","YES","0","0","1");
INSERT INTO packagetbl VALUES("105","2017-01-05","15","CHRISTMAS CAKE 4KG","10","0","10","YES","0","0","1");
INSERT INTO packagetbl VALUES("106","2017-01-05","16","BIRTHDAY FRUIT CAKE 1KG","12","0","12","YES","0","0","1");
INSERT INTO packagetbl VALUES("107","2017-01-05","14","FAMILY COOKIES 1 DOZEN","12","8","20","YES","0","0","1");
INSERT INTO packagetbl VALUES("108","2017-01-05","5","PUSH CAKES","12","3","15","YES","0","0","1");
INSERT INTO packagetbl VALUES("109","2017-01-12","7","FOREST CAKE 1KG","30","0","30","YES","0","0","1");
INSERT INTO packagetbl VALUES("110","2017-01-12","9","ASSORTED CUP CAKES -HALF DOZEN","60","5","65","YES","0","0","1");
INSERT INTO packagetbl VALUES("111","2017-01-12","1","MARBLE CAKE-1KG","20","0","20","YES","0","0","1");
INSERT INTO packagetbl VALUES("112","2017-01-12","5","PUSH CAKES","24","7","31","YES","0","0","1");
INSERT INTO packagetbl VALUES("113","2017-01-12","6","QUEEN CAKES","48","2","50","YES","0","0","1");
INSERT INTO packagetbl VALUES("114","2017-01-12","8","ASSORTED CUP CAKES-DOZEN","60","0","60","YES","0","0","1");
INSERT INTO packagetbl VALUES("207","2017-01-13","7","FOREST CAKE 1KG","30","0","30","YES","23","7","1");
INSERT INTO packagetbl VALUES("208","2017-01-13","9","ASSORTED CUP CAKES -HALF DOZEN","60","5","65","YES","65","-5","1");
INSERT INTO packagetbl VALUES("209","2017-01-13","16","BIRTHDAY FRUIT CAKE 1KG","10","0","10","YES","10","0","1");
INSERT INTO packagetbl VALUES("210","2017-01-13","15","CHRISTMAS CAKE 4KG","5","0","5","YES","5","0","1");
INSERT INTO packagetbl VALUES("211","2017-01-16","15","CHRISTMAS CAKE 4KG","8","0","8","NO","0","0","1");
INSERT INTO packagetbl VALUES("212","2017-01-16","14","FAMILY COOKIES 1 DOZEN","12","0","12","NO","0","0","1");
INSERT INTO packagetbl VALUES("213","2017-01-16","11","LOGO DOUGHNUT-DOZEN","48","2","50","NO","0","0","1");
INSERT INTO packagetbl VALUES("214","2017-01-16","1","MARBLE CAKE-1KG","5","0","5","NO","0","0","1");
INSERT INTO packagetbl VALUES("215","2017-01-16","5","PUSH CAKES","12","8","20","NO","0","0","1");
INSERT INTO packagetbl VALUES("216","2017-01-20","1","MARBLE CAKE-1KG","15","0","15","NO","0","0","1");
INSERT INTO packagetbl VALUES("217","2017-01-20","5","PUSH CAKES","12","0","12","NO","0","0","1");
INSERT INTO packagetbl VALUES("218","2017-01-20","6","QUEEN CAKES","12","6","18","NO","0","0","1");
INSERT INTO packagetbl VALUES("219","2017-01-20","8","ASSORTED CUP CAKES-DOZEN","12","10","22","NO","0","0","1");
INSERT INTO packagetbl VALUES("220","2017-01-23","9","ASSORTED CUP CAKES -HALF DOZEN","0","5","5","YES","5","-5","1");
INSERT INTO packagetbl VALUES("221","2017-01-23","10","EAT YOUR BRAND-DOZEN","12","8","20","YES","20","-8","1");
INSERT INTO packagetbl VALUES("222","2017-01-23","11","LOGO DOUGHNUT-DOZEN","0","10","10","YES","10","-10","1");
INSERT INTO packagetbl VALUES("223","2017-01-23","12","FRESH CREAM CAKE-1 KG","12","0","12","YES","12","0","1");
INSERT INTO packagetbl VALUES("224","2017-01-23","13","ANNIVERSARY CELEBRATION CAKE-4KG","6","0","6","YES","6","0","1");
INSERT INTO packagetbl VALUES("225","2017-01-23","14","FAMILY COOKIES 1 DOZEN","12","8","20","YES","20","-8","1");
INSERT INTO packagetbl VALUES("226","2017-01-23","16","BIRTHDAY FRUIT CAKE 1KG","9","0","9","YES","9","0","1");



DROP TABLE packagingpapers;

CREATE TABLE `packagingpapers` (
  `pp_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `pp_PaperID` int(11) DEFAULT NULL,
  `pp_PaperName` varchar(200) DEFAULT NULL,
  `pp_ItemCode` int(11) DEFAULT NULL,
  `pp_ItemName` varchar(200) DEFAULT NULL,
  `pp_Qty` double DEFAULT '1',
  PRIMARY KEY (`pp_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO packagingpapers VALUES("1","10","queen cake cups","6","QUEEN CAKES","1");
INSERT INTO packagingpapers VALUES("2","10","queen cake cups","5","push cakes","1");
INSERT INTO packagingpapers VALUES("3","10","queen cake cups","1","MARBLE CAKE","1");



DROP TABLE patientstbl;

CREATE TABLE `patientstbl` (
  `patient_ID` int(11) NOT NULL AUTO_INCREMENT,
  `patient_Name` varchar(200) DEFAULT NULL,
  `patient_Age` double DEFAULT '0',
  `patient_Residence` varchar(200) DEFAULT NULL,
  `patient_RegDate` date DEFAULT NULL,
  `patient_Tel` varchar(200) DEFAULT NULL,
  `inventory_Location` int(11) DEFAULT '1',
  PRIMARY KEY (`patient_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

INSERT INTO patientstbl VALUES("1","JAMES MULANDI","21","SOUTH C","2016-12-19","00750455643646","1");
INSERT INTO patientstbl VALUES("2","MARY KEITANNY","45","THIKA","2016-12-20","0712898000","1");
INSERT INTO patientstbl VALUES("3","AHMED ALI ROBA","22","EASTLEIGH","2016-12-20","0712937398988","1");
INSERT INTO patientstbl VALUES("4","THOMAS KARIUKI FR.","45","NKUBU-MERU COUNTY","2016-12-20","0909082808","3");



DROP TABLE paymodes;

CREATE TABLE `paymodes` (
  `paymode_ID` int(11) NOT NULL AUTO_INCREMENT,
  `paymode_Name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`paymode_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

INSERT INTO paymodes VALUES("1","CASH");
INSERT INTO paymodes VALUES("2","CREDIT CARD");
INSERT INTO paymodes VALUES("3","M-PESA");
INSERT INTO paymodes VALUES("4","INVOICE");
INSERT INTO paymodes VALUES("5","INSURANCE");



DROP TABLE portionstable;

CREATE TABLE `portionstable` (
  `portions_ID` int(11) NOT NULL AUTO_INCREMENT,
  `portions_ProdCode` int(11) DEFAULT NULL,
  `portions_Name` varchar(200) DEFAULT NULL,
  `portions_MatCode` int(11) DEFAULT NULL,
  `portions_MatName` varchar(200) DEFAULT NULL,
  `portions_Qty` double DEFAULT '0',
  PRIMARY KEY (`portions_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;

INSERT INTO portionstable VALUES("1","3","CHICKEN QUATER","4","CHICKEN FULL","0.4");
INSERT INTO portionstable VALUES("2","3","CHICKEN QUATER","6","COOKING OIL TRS","0.1");
INSERT INTO portionstable VALUES("3","2","MIXED TEA","2","MILK LTR","0.2");
INSERT INTO portionstable VALUES("4","2","MIXED TEA","5","SUGAR KGS","0.1");
INSERT INTO portionstable VALUES("5","4","CHIPS","3","POTATOES KG","0.4");
INSERT INTO portionstable VALUES("6","4","CHIPS","6","COOKING OIL TRS","0.25");
INSERT INTO portionstable VALUES("7","1","MARBLE CAKE","2","MILK LTR","0.25");
INSERT INTO portionstable VALUES("8","1","MARBLE CAKE","5","SUGAR KGS","0.1");
INSERT INTO portionstable VALUES("9","1","MARBLE CAKE","1","WHEAT FLOUR","0.22");
INSERT INTO portionstable VALUES("10","6","QUEEN CAKES","7","blue band","0.1");
INSERT INTO portionstable VALUES("11","6","QUEEN CAKES","8","eggs pcs","1");
INSERT INTO portionstable VALUES("12","6","QUEEN CAKES","1","WHEAT FLOUR","0.2");
INSERT INTO portionstable VALUES("13","6","QUEEN CAKES","6","COOKING OIL TRS","0.1");
INSERT INTO portionstable VALUES("14","6","QUEEN CAKES","2","MILK LTR","0.1");
INSERT INTO portionstable VALUES("15","15","CHRISTMAS CAKE 4KG","1","WHEAT FLOUR","2");
INSERT INTO portionstable VALUES("16","15","CHRISTMAS CAKE 4KG","2","MILK LTR","2");
INSERT INTO portionstable VALUES("17","15","CHRISTMAS CAKE 4KG","5","SUGAR KGS","0.5");
INSERT INTO portionstable VALUES("18","15","CHRISTMAS CAKE 4KG","7","BLUE BAND","1");
INSERT INTO portionstable VALUES("19","15","CHRISTMAS CAKE 4KG","8","EGGS PCS","12");
INSERT INTO portionstable VALUES("20","16","BIRTHDAY FRUIT CAKE 1KG","1","WHEAT FLOUR","2");
INSERT INTO portionstable VALUES("21","16","BIRTHDAY FRUIT CAKE 1KG","2","MILK LTR","1.5");
INSERT INTO portionstable VALUES("22","16","BIRTHDAY FRUIT CAKE 1KG","5","SUGAR KGS","0.5");
INSERT INTO portionstable VALUES("23","16","BIRTHDAY FRUIT CAKE 1KG","8","EGGS PCS","6");
INSERT INTO portionstable VALUES("24","16","BIRTHDAY FRUIT CAKE 1KG","7","BLUE BAND","1");



DROP TABLE productiontbl;

CREATE TABLE `productiontbl` (
  `prod_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `prod_ItemCode` int(11) DEFAULT NULL,
  `prod_ItemName` varchar(200) DEFAULT NULL,
  `prod_Qty` double DEFAULT '0',
  `prod_Date` date DEFAULT NULL,
  `prod_staffname` varchar(200) DEFAULT NULL,
  `prod_shift` varchar(200) DEFAULT NULL,
  `prod_StoreCode` int(11) DEFAULT NULL,
  `prod_Time` varchar(200) DEFAULT NULL,
  `prod_ExpDate` date DEFAULT NULL,
  `prod_Packaged` varchar(200) DEFAULT 'NO',
  `package_Done` varchar(200) DEFAULT 'NO',
  `package_Phy` double DEFAULT '0',
  `package_Var` double DEFAULT '0',
  PRIMARY KEY (`prod_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=latin1;

INSERT INTO productiontbl VALUES("1","1","MARBLE CAKE","10","2016-11-09","","","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("2","3","CHICKEN QUATER","100","2016-11-09","","","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("3","4","CHIPS","150","2016-11-09","","","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("4","1","MARBLE CAKE","123","2016-11-17","ANTHONY NDWIGA","DAY SHIFT","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("5","3","CHICKEN QUATER","200","2016-11-17","ANTHONY NDWIGA","DAY SHIFT","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("6","4","CHIPS","213","2016-11-17","ANTHONY NDWIGA","DAY SHIFT","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("9","6","QUEEN CAKES","500","2016-11-18","ANTHONY NDWIGA","DAY SHIFT","1","","","NO","NO","0","0");
INSERT INTO productiontbl VALUES("10","1","MARBLE CAKE","5","2016-11-21","ANTHONY NDWIGA","DAY SHIFT","1","11:6:2","2016-11-24","NO","NO","0","0");
INSERT INTO productiontbl VALUES("11","15","CHRISTMAS CAKE 4KG","5","2016-12-09","ANTHONY NDWIGA","DAY SHIFT","1","9:20:38","2017-01-09","NO","NO","0","0");
INSERT INTO productiontbl VALUES("12","16","BIRTHDAY FRUIT CAKE 1KG","4","2016-12-11","ANTHONY NDWIGA","DAY SHIFT","1","13:35:21","2017-01-04","NO","NO","0","0");
INSERT INTO productiontbl VALUES("13","1","MARBLE CAKE-1KG","4","2017-01-05","Select Staff Name","DAY SHIFT","1","12:7:28","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("14","15","CHRISTMAS CAKE 4KG","10","2017-01-05","Select Staff Name","DAY SHIFT","1","12:7:49","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("15","16","BIRTHDAY FRUIT CAKE 1KG","12","2017-01-05","Select Staff Name","DAY SHIFT","1","12:8:36","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("16","14","FAMILY COOKIES 1 DOZEN","20","2017-01-05","Select Staff Name","DAY SHIFT","1","12:8:47","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("17","5","PUSH CAKES","15","2017-01-05","Select Staff Name","DAY SHIFT","1","12:9:5","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("18","1","MARBLE CAKE-1KG","20","2017-01-13","ANTHONY NDWIGA","DAY SHIFT","1","15:36:56","2017-09-20","NO","NO","0","0");
INSERT INTO productiontbl VALUES("19","5","PUSH CAKES","31","2017-01-13","ANTHONY NDWIGA","DAY SHIFT","1","15:37:38","2017-09-20","NO","NO","0","0");
INSERT INTO productiontbl VALUES("20","6","QUEEN CAKES","50","2017-01-13","ANTHONY NDWIGA","DAY SHIFT","1","15:37:46","2017-09-20","NO","NO","0","0");
INSERT INTO productiontbl VALUES("21","7","FOREST CAKE 1KG","30","2017-01-13","ANTHONY NDWIGA","DAY SHIFT","1","15:37:53","2017-09-20","YES","NO","0","0");
INSERT INTO productiontbl VALUES("22","8","ASSORTED CUP CAKES-DOZEN","60","2017-01-13","ANTHONY NDWIGA","DAY SHIFT","1","15:38:17","2017-09-20","NO","NO","0","0");
INSERT INTO productiontbl VALUES("23","9","ASSORTED CUP CAKES -HALF DOZEN","65","2017-01-13","ANTHONY NDWIGA","DAY SHIFT","1","15:38:24","2017-09-20","YES","NO","0","0");
INSERT INTO productiontbl VALUES("24","16","BIRTHDAY FRUIT CAKE 1KG","10","2017-01-13","SAMMY MWAITA","DAY SHIFT","1","16:37:53","2017-09-08","YES","NO","0","0");
INSERT INTO productiontbl VALUES("25","15","CHRISTMAS CAKE 4KG","5","2017-01-13","SAMMY MWAITA","DAY SHIFT","1","16:38:6","2017-09-08","YES","NO","0","0");
INSERT INTO productiontbl VALUES("26","1","MARBLE CAKE-1KG","5","2017-01-16","ANTHONY NDWIGA","DAY SHIFT","1","14:22:27","2017-03-16","YES","NO","0","0");
INSERT INTO productiontbl VALUES("27","5","PUSH CAKES","20","2017-01-16","ERIC","DAY SHIFT","1","14:25:11","2017-01-26","YES","NO","0","0");
INSERT INTO productiontbl VALUES("28","15","CHRISTMAS CAKE 4KG","8","2017-01-16","ANTHONY NDWIGA","DAY SHIFT","1","14:27:26","2017-02-24","YES","NO","0","0");
INSERT INTO productiontbl VALUES("29","14","FAMILY COOKIES 1 DOZEN","12","2017-01-16","ANTHONY NDWIGA","DAY SHIFT","1","14:27:38","2017-02-24","YES","NO","0","0");
INSERT INTO productiontbl VALUES("30","11","LOGO DOUGHNUT-DOZEN","50","2017-01-16","ANTHONY NDWIGA","DAY SHIFT","1","14:27:51","2017-02-24","YES","NO","0","0");
INSERT INTO productiontbl VALUES("31","1","MARBLE CAKE-1KG","15","2017-01-20","ANTHONY NDWIGA","DAY SHIFT","1","9:1:14","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("32","5","PUSH CAKES","12","2017-01-20","ANTHONY NDWIGA","DAY SHIFT","1","9:1:27","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("33","6","QUEEN CAKES","18","2017-01-20","ANTHONY NDWIGA","DAY SHIFT","1","9:1:39","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("34","8","ASSORTED CUP CAKES-DOZEN","22","2017-01-20","ANTHONY NDWIGA","DAY SHIFT","1","9:1:52","2017-03-31","YES","NO","0","0");
INSERT INTO productiontbl VALUES("35","9","ASSORTED CUP CAKES -HALF DOZEN","5","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:44:47","2017-05-25","YES","NO","0","0");
INSERT INTO productiontbl VALUES("36","10","EAT YOUR BRAND-DOZEN","20","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:45:3","2017-05-25","YES","NO","0","0");
INSERT INTO productiontbl VALUES("37","11","LOGO DOUGHNUT-DOZEN","10","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:45:16","2017-05-25","YES","NO","0","0");
INSERT INTO productiontbl VALUES("38","12","FRESH CREAM CAKE-1 KG","12","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:45:41","2017-05-25","YES","NO","0","0");
INSERT INTO productiontbl VALUES("39","13","ANNIVERSARY CELEBRATION CAKE-4KG","6","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:45:55","2017-05-25","YES","NO","0","0");
INSERT INTO productiontbl VALUES("40","14","FAMILY COOKIES 1 DOZEN","20","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:46:17","2017-05-25","YES","NO","0","0");
INSERT INTO productiontbl VALUES("41","16","BIRTHDAY FRUIT CAKE 1KG","9","2017-01-23","SAMMY MWAITA","DAY SHIFT","1","12:46:30","2017-05-25","YES","NO","0","0");



DROP TABLE products_transfer;

CREATE TABLE `products_transfer` (
  `Transfer_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Transfer_itemCode` int(11) DEFAULT NULL,
  `Transfer_ItemName` varchar(200) DEFAULT NULL,
  `Transfer_SourceID` int(11) DEFAULT NULL,
  `Transfer_Qty` double DEFAULT '0',
  `Transfer_DestinationID` int(11) DEFAULT NULL,
  `Transfer_Date` date DEFAULT NULL,
  PRIMARY KEY (`Transfer_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO products_transfer VALUES("1","5","PUSH CAKES","1","1","3","2016-12-29");



DROP TABLE pumpallocation;

CREATE TABLE `pumpallocation` (
  `alloc_ID` int(11) NOT NULL AUTO_INCREMENT,
  `alloc_StaffID` int(11) DEFAULT NULL,
  `alloc_PumpID` int(11) DEFAULT NULL,
  `alloc_Date` date DEFAULT NULL,
  PRIMARY KEY (`alloc_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;

INSERT INTO pumpallocation VALUES("1","4","1","2017-03-03");
INSERT INTO pumpallocation VALUES("2","2","2","2017-03-03");
INSERT INTO pumpallocation VALUES("3","1","3","2017-03-03");
INSERT INTO pumpallocation VALUES("4","6","4","2017-03-03");
INSERT INTO pumpallocation VALUES("5","1","1","2017-03-05");
INSERT INTO pumpallocation VALUES("6","2","2","2017-03-05");
INSERT INTO pumpallocation VALUES("7","1","1","2017-03-05");
INSERT INTO pumpallocation VALUES("8","6","1","2017-03-05");
INSERT INTO pumpallocation VALUES("9","6","1","2017-03-08");
INSERT INTO pumpallocation VALUES("10","4","1","2017-03-10");
INSERT INTO pumpallocation VALUES("11","2","2","2017-03-10");
INSERT INTO pumpallocation VALUES("12","1","3","2017-03-10");
INSERT INTO pumpallocation VALUES("13","6","4","2017-03-10");
INSERT INTO pumpallocation VALUES("14","4","1","2017-03-11");
INSERT INTO pumpallocation VALUES("15","2","2","2017-03-11");
INSERT INTO pumpallocation VALUES("16","4","3","2017-03-11");
INSERT INTO pumpallocation VALUES("17","1","4","2017-03-11");



DROP TABLE pumpdata;

CREATE TABLE `pumpdata` (
  `data_id` int(11) NOT NULL AUTO_INCREMENT,
  `data_pumpname` varchar(200) DEFAULT NULL,
  `data_tankname` varchar(200) DEFAULT NULL,
  `data_eleccash` double DEFAULT '0',
  `data_elecltrs` double DEFAULT '0',
  `data_mancash` double DEFAULT '0',
  `data_manltrs` double DEFAULT '0',
  `data_rtt` double DEFAULT '0',
  `data_dp` varchar(20) DEFAULT NULL,
  `data_dipltrs` double DEFAULT '0',
  `data_crsltrs` double DEFAULT '0',
  `data_doneby` varchar(200) DEFAULT NULL,
  `data_shiftno` varchar(200) DEFAULT NULL,
  `data_date` date DEFAULT NULL,
  PRIMARY KEY (`data_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

INSERT INTO pumpdata VALUES("1","PUMP A","TANK A","0","0","0","0","0","0","0","0","ERIC KOMU","0","2017-03-05");
INSERT INTO pumpdata VALUES("2","PUMP B","TANK A","0","0","0","0","0","0","0","0","JAME MRUTTU","0","2017-03-05");
INSERT INTO pumpdata VALUES("3","PUMP C","TANK B","0","0","0","0","0","0","0","0","JOYCE WAWERU NJERU","0","2017-03-05");
INSERT INTO pumpdata VALUES("4","PUMP D","TANK D","0","0","0","0","0","0","0","0","MAUREEN KINYUA","0","2017-03-05");
INSERT INTO pumpdata VALUES("5","PUMP B","TANK A","5","9","9","9","9","9","9","9","0","9","2017-03-12");
INSERT INTO pumpdata VALUES("6","PUMP C","TANK B","9","9","9","9","9","9","9","9","0","9","2017-03-12");
INSERT INTO pumpdata VALUES("7","PUMP D","TANK D","9","9","9","9","9","9","9","9","0","9","2017-03-12");
INSERT INTO pumpdata VALUES("8","PUMP A","TANK A","9","9","9","9","9","9","9","9","0","9","2017-03-12");
INSERT INTO pumpdata VALUES("9","PUMP B","TANK A","11","11","11","11","11","11","11","11","JAME MRUTTU","11","2017-03-11");
INSERT INTO pumpdata VALUES("10","PUMP D","TANK D","11","11","11","11","11","11","11","11","JOYCE WAWERU NJERU","11","2017-03-11");
INSERT INTO pumpdata VALUES("11","PUMP A","TANK A","8","11","11","11","11","11","11","11","ERIC KOMU","11","2017-03-11");
INSERT INTO pumpdata VALUES("12","PUMP C","TANK B","11","1","8","1","11","1","8","1","ERIC KOMU","11","2017-03-11");



DROP TABLE pumpstbl;

CREATE TABLE `pumpstbl` (
  `pump_ID` int(11) NOT NULL AUTO_INCREMENT,
  `pump_TankID` int(11) DEFAULT NULL,
  `pump_Name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`pump_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

INSERT INTO pumpstbl VALUES("1","1","PUMP A");
INSERT INTO pumpstbl VALUES("2","1","PUMP B");
INSERT INTO pumpstbl VALUES("3","2","PUMP C");
INSERT INTO pumpstbl VALUES("4","4","PUMP D");



DROP TABLE purchases;

CREATE TABLE `purchases` (
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Quantity` double DEFAULT NULL,
  `Price` double DEFAULT NULL,
  `PurchDate` date DEFAULT NULL,
  `Supplier` varchar(200) DEFAULT NULL,
  `PostedBy` varchar(200) DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `PurchNo` int(11) DEFAULT NULL,
  `BatchNo` varchar(200) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `Bal` double DEFAULT '0',
  `InvoiceAmt` double DEFAULT '0',
  `Disc` double DEFAULT '0',
  `UCost` double DEFAULT '0',
  `BonusQty` double DEFAULT '0',
  `VatAmt` double DEFAULT '0',
  `NetPrice` double DEFAULT '0',
  `T_Sta` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `PRet` double DEFAULT '0',
  `CurQty` double DEFAULT '0',
  `StoreCode` int(11) DEFAULT '0',
  PRIMARY KEY (`TransNo`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

INSERT INTO purchases VALUES("1","MARBLE CAKE","","100","50","2016-11-18","AFRIMAS GENERAL SUPPLIER","","1","6","","","0","0","0","0","0","0","0","2016-11-18 10:43:30","0","0","1");
INSERT INTO purchases VALUES("5","push cakes","","100","120","2016-11-18","AFRIMAS GENERAL SUPPLIER","","2","7","","","0","0","0","0","0","0","0","2016-11-18 10:49:54","0","0","1");
INSERT INTO purchases VALUES("1","MARBLE CAKE-1KG","","10","50","2016-11-21","CHALESTONE GENERAL SUPPLIES","","3","8","","","0","0","0","0","0","0","0","2016-12-29 14:04:23","0","0","1");
INSERT INTO purchases VALUES("3","CHICKEN QUATER","","100","60","2016-11-21","CHALESTONE GENERAL SUPPLIES","","4","8","","","0","0","0","0","0","0","0","2016-12-29 14:04:42","0","0","1");
INSERT INTO purchases VALUES("1","MARBLE CAKE-1KG","","1","120","2016-12-29","AFRIMAS GENERAL SUPPLIER","","5","10","","","0","0","0","0","0","0","0","2016-12-29 14:38:57","0","0","1");
INSERT INTO purchases VALUES("16","BIRTHDAY FRUIT CAKE 1KG","","2","4000","2016-12-29","AFRIMAS GENERAL SUPPLIER","","6","10","","","0","0","0","0","0","0","0","2016-12-29 14:39:18","0","0","1");
INSERT INTO purchases VALUES("3","CHICKEN QUATER","","1000","150","2016-12-29","MUNGUKU SUPPLIER","","7","11","","","0","0","0","0","0","0","0","2016-12-29 14:42:17","0","0","1");
INSERT INTO purchases VALUES("8","ASSORTED CUP CAKES-DOZEN","","10","720","2017-01-08","CHALESTONE GENERAL SUPPLIES","","22","13","","","0","0","0","0","0","0","0","2017-02-27 14:40:13","0","0","1");
INSERT INTO purchases VALUES("7","FOREST CAKE 1KG","","5","-850","2017-02-27","DAVID WASIKE","","23","14","","","0","0","0","0","0","0","0","2017-02-27 14:44:11","0","0","1");
INSERT INTO purchases VALUES("24","SHELL MOTOR OIL","","100","180","2017-03-09","TONYTECH EQUIPMENTS","","24","15","","","0","0","0","0","0","0","0","2017-03-09 08:29:20","0","0","1");
INSERT INTO purchases VALUES("26","NEW ITEM MARCH 2017","","5","10","2017-03-09","TONYTECH EQUIPMENTS","","25","15","","","0","0","0","0","0","0","0","2017-03-09 08:29:39","0","0","1");



DROP TABLE purchases_raw;

CREATE TABLE `purchases_raw` (
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Quantity` double DEFAULT NULL,
  `Price` double DEFAULT NULL,
  `PurchDate` date DEFAULT NULL,
  `Supplier` varchar(200) DEFAULT NULL,
  `PostedBy` varchar(200) DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `PurchNo` int(11) DEFAULT NULL,
  `BatchNo` varchar(200) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `Bal` double DEFAULT '0',
  `InvoiceAmt` double DEFAULT '0',
  `Disc` double DEFAULT '0',
  `UCost` double DEFAULT '0',
  `BonusQty` double DEFAULT '0',
  `VatAmt` double DEFAULT '0',
  `NetPrice` double DEFAULT '0',
  `T_Sta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `PRet` double DEFAULT '0',
  `CurQty` double DEFAULT '0',
  `StoreCode` int(11) DEFAULT '0',
  PRIMARY KEY (`TransNo`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

INSERT INTO purchases_raw VALUES("4","CHICKEN FULL","","400","300","2016-11-09","MUNGUKU SUPPLIER","","1","1","","","0","0","0","0","0","0","0","2016-11-09 08:37:30","0","0","1");
INSERT INTO purchases_raw VALUES("2","MILK LTR","","10","65","2016-11-09","MUNGUKU SUPPLIER","","2","1","","","0","0","0","0","0","0","0","2016-11-09 08:37:56","0","0","1");
INSERT INTO purchases_raw VALUES("4","CHICKEN FULL","","10","300","2016-11-11","AFRIMAS GENERAL SUPPLIER","","3","4","","","0","0","0","0","0","0","0","2016-11-11 10:40:19","0","0","1");
INSERT INTO purchases_raw VALUES("6","COOKING OIL TRS","","5","125","2016-11-11","AFRIMAS GENERAL SUPPLIER","","4","4","","","0","0","0","0","0","0","0","2016-11-11 10:40:28","0","0","1");
INSERT INTO purchases_raw VALUES("2","MILK LTR","","20","65","2016-11-11","AFRIMAS GENERAL SUPPLIER","","5","4","","","0","0","0","0","0","0","0","2016-11-11 10:40:36","0","0","1");
INSERT INTO purchases_raw VALUES("3","POTATOES KG","","100","25","2016-11-11","AFRIMAS GENERAL SUPPLIER","","6","4","","","0","0","0","0","0","0","0","2016-11-11 10:40:47","0","0","1");
INSERT INTO purchases_raw VALUES("5","SUGAR KGS","","10","130","2016-11-11","AFRIMAS GENERAL SUPPLIER","","7","4","","","0","0","0","0","0","0","0","2016-11-11 10:40:56","0","0","1");
INSERT INTO purchases_raw VALUES("1","WHEAT FLOUR","","30","120","2016-11-11","AFRIMAS GENERAL SUPPLIER","","8","4","","","0","0","0","0","0","0","0","2016-11-11 10:41:04","0","0","1");
INSERT INTO purchases_raw VALUES("7","blue band","","10","120","2016-11-18","AFRIMAS GENERAL SUPPLIER","","9","5","","","0","0","0","0","0","0","0","2016-11-18 09:29:05","0","0","1");
INSERT INTO purchases_raw VALUES("8","eggs pcs","","1200","10","2016-11-18","AFRIMAS GENERAL SUPPLIER","","10","5","","","0","0","0","0","0","0","0","2016-11-18 09:29:55","0","0","1");
INSERT INTO purchases_raw VALUES("6","COOKING OIL TRS","","1","125","2016-11-21","CHALESTONE GENERAL SUPPLIES","","11","8","","2016-11-21","0","0","0","0","0","0","0","2016-11-21 11:23:00","0","0","1");
INSERT INTO purchases_raw VALUES("7","BLUE BAND","","3","120","2016-12-29","MUNGUKU SUPPLIER","","12","9","","2016-12-29","0","0","0","0","0","0","0","2016-12-29 14:10:19","0","0","1");
INSERT INTO purchases_raw VALUES("3","POTATOES KG","","100","25","2016-12-29","CHALESTONE GENERAL SUPPLIES","","13","12","","2016-12-29","0","0","0","0","0","0","0","2016-12-29 14:52:22","0","0","1");
INSERT INTO purchases_raw VALUES("8","EGGS PCS","","600","10","2016-12-29","CHALESTONE GENERAL SUPPLIES","","14","12","","2016-12-29","0","0","0","0","0","0","0","2016-12-29 14:52:39","0","0","1");



DROP TABLE purchorders;

CREATE TABLE `purchorders` (
  `Order_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Order_SupplierID` int(11) DEFAULT NULL,
  `Order_SupplierName` varchar(200) DEFAULT NULL,
  `Order_Date` date DEFAULT NULL,
  `Order_InvoiceNo` varchar(200) DEFAULT NULL,
  `Order_Status` varchar(20) DEFAULT 'PENDING',
  `Order_By` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`Order_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;

INSERT INTO purchorders VALUES("1","1","MUNGUKU SUPPLIER","2016-11-09","67787","RECEIVED","");
INSERT INTO purchorders VALUES("4","4","AFRIMAS GENERAL SUPPLIER","2016-11-11","21345","RECEIVED","");
INSERT INTO purchorders VALUES("5","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","12354","RECEIVED","");
INSERT INTO purchorders VALUES("6","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","67857867","RECEIVED","");
INSERT INTO purchorders VALUES("7","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","75756","RECEIVED","");
INSERT INTO purchorders VALUES("8","2","CHALESTONE GENERAL SUPPLIES","2016-11-21","475645656","RECEIVED","JAME MRUTTU");
INSERT INTO purchorders VALUES("9","1","MUNGUKU SUPPLIER","2016-12-29","3457768","RECEIVED","SAMMY MWAITA");
INSERT INTO purchorders VALUES("10","4","AFRIMAS GENERAL SUPPLIER","2016-12-29","57547","RECEIVED","2");
INSERT INTO purchorders VALUES("11","1","MUNGUKU SUPPLIER","2016-12-29","2344898","RECEIVED","5");
INSERT INTO purchorders VALUES("12","2","CHALESTONE GENERAL SUPPLIES","2016-12-29","567567","RECEIVED","JAME MRUTTU");
INSERT INTO purchorders VALUES("13","2","CHALESTONE GENERAL SUPPLIES","2017-01-08","5567776","RECEIVED","3");
INSERT INTO purchorders VALUES("14","5","DAVID WASIKE","2017-02-27","67657775676","RECEIVED","1");
INSERT INTO purchorders VALUES("15","7","TONYTECH EQUIPMENTS","2017-03-09","66789","RECEIVED","1");



DROP TABLE salemaster;

CREATE TABLE `salemaster` (
  `Sale_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Sale_ReceiptNo` int(11) DEFAULT NULL,
  `Sale_Date` date DEFAULT NULL,
  `Sale_Amount` double DEFAULT '0',
  `Sale_PaymodeName` varchar(200) DEFAULT NULL,
  `Sale_By` varchar(20) DEFAULT 'xxxx',
  `Patient_Name` varchar(200) DEFAULT '',
  PRIMARY KEY (`Sale_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=latin1;

INSERT INTO salemaster VALUES("1","1","2016-11-10","2400","CREDIT","1","");
INSERT INTO salemaster VALUES("2","2","2016-11-10","2400","CASH","1","");
INSERT INTO salemaster VALUES("3","3","2016-11-10","3065","CASH","1","");
INSERT INTO salemaster VALUES("4","4","2016-11-17","820","CASH","1","");
INSERT INTO salemaster VALUES("5","5","2016-11-17","420","M-PESA","1","");
INSERT INTO salemaster VALUES("6","6","2016-11-17","150","M-PESA","1","");
INSERT INTO salemaster VALUES("7","7","2016-11-17","900","CASH","1","");
INSERT INTO salemaster VALUES("8","8","2016-11-17","720","CASH","1","");
INSERT INTO salemaster VALUES("9","9","2016-11-17","3350","CASH","1","");
INSERT INTO salemaster VALUES("10","10","2016-11-17","130","CASH","1","");
INSERT INTO salemaster VALUES("11","11","2016-11-17","650","CASH","1","");
INSERT INTO salemaster VALUES("12","12","2016-11-17","0","CASH","1","");
INSERT INTO salemaster VALUES("13","13","2016-11-17","360","CASH","1","");
INSERT INTO salemaster VALUES("14","14","2016-11-17","350","CASH","1","");
INSERT INTO salemaster VALUES("15","15","2016-11-17","0","CASH","1","");
INSERT INTO salemaster VALUES("16","16","2016-11-17","300","CASH","1","");
INSERT INTO salemaster VALUES("17","17","2016-11-17","120","CASH","1","");
INSERT INTO salemaster VALUES("18","18","2016-11-17","120","CASH","1","");
INSERT INTO salemaster VALUES("19","19","2016-11-17","415","CASH","1","");
INSERT INTO salemaster VALUES("20","20","2016-11-18","27000","CREDIT","1","");
INSERT INTO salemaster VALUES("21","21","2016-11-18","1200","CASH","1","");
INSERT INTO salemaster VALUES("22","22","2016-11-26","2770","CASH","","");
INSERT INTO salemaster VALUES("23","23","2016-11-26","2500","CASH","3","");
INSERT INTO salemaster VALUES("24","24","2016-11-28","960","CREDIT","3","");
INSERT INTO salemaster VALUES("25","25","2016-11-28","3500","CREDIT","3","");
INSERT INTO salemaster VALUES("26","26","2016-11-28","26000","CREDIT","2","");
INSERT INTO salemaster VALUES("27","27","2016-11-28","0","CREDIT","2","");
INSERT INTO salemaster VALUES("28","28","2016-11-28","17000","CASH","2","");
INSERT INTO salemaster VALUES("29","29","2016-12-09","2500","CASH","","");
INSERT INTO salemaster VALUES("30","30","2016-12-09","2070","Select Item","","");
INSERT INTO salemaster VALUES("31","31","2016-12-09","7024","Select Item","","");
INSERT INTO salemaster VALUES("32","32","2016-12-09","320","CASH","3","");
INSERT INTO salemaster VALUES("33","33","2016-12-09","1700","CASH","3","");
INSERT INTO salemaster VALUES("34","34","2016-12-09","1710","M-PESA","3","");
INSERT INTO salemaster VALUES("35","35","2016-12-15","1898","M-PESA","","");
INSERT INTO salemaster VALUES("36","36","2016-12-15","17150","CASH","3","");
INSERT INTO salemaster VALUES("37","37","2016-12-19","4000","CASH","","");
INSERT INTO salemaster VALUES("38","38","2016-12-19","6500","CASH","","");
INSERT INTO salemaster VALUES("39","39","2016-12-19","8000","CASH","SAMMY MWAITA","");
INSERT INTO salemaster VALUES("40","40","2016-12-20","420","CASH","4","MARY KEITANNY");
INSERT INTO salemaster VALUES("41","41","2016-12-21","6500","CREDIT","4","");
INSERT INTO salemaster VALUES("43","42","2016-12-21","29000","CREDIT","4","");
INSERT INTO salemaster VALUES("44","44","2016-12-21","13200","CASH","4","");
INSERT INTO salemaster VALUES("45","45","2016-12-31","1000","CASH","4","");
INSERT INTO salemaster VALUES("46","46","2017-01-05","480","CASH","4","");
INSERT INTO salemaster VALUES("47","47","2017-01-11","35760","CREDIT","4","");
INSERT INTO salemaster VALUES("50","48","2017-01-13","5215","CASH","5","");
INSERT INTO salemaster VALUES("51","50","2017-01-17","16100","CREDIT","5","");
INSERT INTO salemaster VALUES("52","54","2017-01-28","13850","CASH","4","");
INSERT INTO salemaster VALUES("53","56","2017-01-28","360","CASH","4","");
INSERT INTO salemaster VALUES("54","57","2017-01-28","1500","CASH","4","");
INSERT INTO salemaster VALUES("55","58","2017-01-28","2600","CASH","5","");
INSERT INTO salemaster VALUES("56","59","2017-01-28","2200","CASH","5","");
INSERT INTO salemaster VALUES("57","60","2017-01-31","3400","CASH","5","");
INSERT INTO salemaster VALUES("58","61","2017-02-14","720","CASH","5","");
INSERT INTO salemaster VALUES("59","62","2017-02-27","17120","CASH","4","");
INSERT INTO salemaster VALUES("60","63","2017-03-09","240","CASH","4","");
INSERT INTO salemaster VALUES("61","64","2017-03-09","16000","CREDIT","4","");



DROP TABLE salesitems;

CREATE TABLE `salesitems` (
  `RcptNo` int(11) DEFAULT NULL,
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Qty` double DEFAULT NULL,
  `UnitPrice` double DEFAULT NULL,
  `TotalPrice` double DEFAULT NULL,
  `Vat` double DEFAULT NULL,
  `TransDate` date DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `BatchNo` varchar(200) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `SaleCode` int(11) DEFAULT NULL,
  `Client` varchar(200) DEFAULT 'CASH SALE',
  `CostPrice` double DEFAULT '0',
  `Disc` double DEFAULT '0',
  `Sppl` varchar(200) DEFAULT NULL,
  `Qnty` double DEFAULT '0',
  `T_Sta` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `SRet` double DEFAULT '0',
  `PatId` int(11) DEFAULT '0',
  `StoreId` int(11) DEFAULT NULL,
  `user_Owner` varchar(200) DEFAULT '',
  PRIMARY KEY (`TransNo`),
  KEY `FK_sales` (`RcptNo`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=latin1;

INSERT INTO salesitems VALUES("1","1","MARBLE CAKE","","20","120","","","2016-11-10","1","","","","CASH SALE","0","0","","0","2016-11-10 10:29:38","0","0","1","");
INSERT INTO salesitems VALUES("2","1","MARBLE CAKE","","10","120","","","2016-11-10","2","","","","CASH SALE","0","0","","0","2016-11-10 11:26:54","0","0","1","");
INSERT INTO salesitems VALUES("2","2","MIXED TEA","","10","120","","","2016-11-10","3","","","","CASH SALE","0","0","","0","2016-11-10 11:27:07","0","0","1","");
INSERT INTO salesitems VALUES("4","2","MIXED TEA","","1","120","","","2016-11-17","4","","","","CASH SALE","0","0","","0","2016-11-17 14:44:38","0","0","2","");
INSERT INTO salesitems VALUES("4","3","CHICKEN QUATER","","2","150","","","2016-11-17","5","","","","CASH SALE","0","0","","0","2016-11-17 14:44:47","0","0","2","");
INSERT INTO salesitems VALUES("4","4","CHIPS","","4","100","","","2016-11-17","6","","","","CASH SALE","0","0","","0","2016-11-17 14:44:53","0","0","2","");
INSERT INTO salesitems VALUES("5","1","MARBLE CAKE","","1","120","","","2016-11-17","7","","","","CASH SALE","0","0","","0","2016-11-17 14:47:32","0","0","1","");
INSERT INTO salesitems VALUES("5","3","CHICKEN QUATER","","2","150","","","2016-11-17","8","","","","CASH SALE","0","0","","0","2016-11-17 14:47:38","0","0","1","");
INSERT INTO salesitems VALUES("6","3","CHICKEN QUATER","","1","150","","","2016-11-17","9","","","","CASH SALE","0","0","","0","2016-11-17 14:48:32","0","0","1","");
INSERT INTO salesitems VALUES("7","3","CHICKEN QUATER","","6","150","","","2016-11-17","10","","","","CASH SALE","0","0","","0","2016-11-17 15:19:41","0","0","1","");
INSERT INTO salesitems VALUES("8","5","push cakes","","1","320","","","2016-11-17","11","","","","CASH SALE","0","0","","0","2016-11-17 15:21:50","0","0","2","");
INSERT INTO salesitems VALUES("8","4","CHIPS","","4","100","","","2016-11-17","12","","","","CASH SALE","0","0","","0","2016-11-17 15:21:58","0","0","2","");
INSERT INTO salesitems VALUES("13","1","MARBLE CAKE","","1","120","","","2016-11-17","13","","","","CASH SALE","0","0","","0","2016-11-17 15:33:29","0","0","1","");
INSERT INTO salesitems VALUES("13","2","MIXED TEA","","2","120","","","2016-11-17","14","","","","CASH SALE","0","0","","0","2016-11-17 15:33:34","0","0","1","");
INSERT INTO salesitems VALUES("14","3","CHICKEN QUATER","","1","150","","","2016-11-17","15","","","","CASH SALE","0","0","","0","2016-11-17 15:36:27","0","0","1","");
INSERT INTO salesitems VALUES("14","4","CHIPS","","2","100","","","2016-11-17","16","","","","CASH SALE","0","0","","0","2016-11-17 15:36:36","0","0","1","");
INSERT INTO salesitems VALUES("16","3","CHICKEN QUATER","","2","150","","","2016-11-17","17","","","","CASH SALE","0","0","","0","2016-11-17 15:45:13","0","0","1","");
INSERT INTO salesitems VALUES("17","2","MIXED TEA","","1","120","","","2016-11-17","18","","","","CASH SALE","0","0","","0","2016-11-17 15:46:51","0","0","1","");
INSERT INTO salesitems VALUES("18","2","MIXED TEA","","1","120","","","2016-11-17","19","","","","CASH SALE","0","0","","0","2016-11-17 15:48:27","0","0","1","");
INSERT INTO salesitems VALUES("20","6","QUEEN CAKES","","150","180","","","2016-11-18","20","","","","CASH SALE","0","0","","0","2016-11-18 10:58:58","0","0","1","");
INSERT INTO salesitems VALUES("22","1","MARBLE CAKE","","1","120","","","2016-11-21","21","","","","CASH SALE","0","0","","0","2016-11-21 12:19:22","0","0","1","");
INSERT INTO salesitems VALUES("22","7","forest cake 1kg","","1","2500","","","2016-11-21","22","","","","CASH SALE","0","0","","0","2016-11-21 12:20:00","0","0","1","");
INSERT INTO salesitems VALUES("22","3","CHICKEN QUATER","","1","150","","","2016-11-22","23","","","","CASH SALE","0","0","3","0","2016-11-22 12:53:08","0","0","1","");
INSERT INTO salesitems VALUES("23","7","forest cake 1kg","","1","2500","","","2016-11-26","24","","","","CASH SALE","0","0","3","0","2016-11-26 15:08:17","0","0","1","");
INSERT INTO salesitems VALUES("24","6","QUEEN CAKES","","1","180","","","2016-11-28","25","","","","CASH SALE","0","0","3","0","2016-11-28 10:22:17","0","0","1","");
INSERT INTO salesitems VALUES("24","1","MARBLE CAKE","","4","120","","","2016-11-28","26","","","","CASH SALE","0","0","3","0","2016-11-28 10:22:31","0","0","1","");
INSERT INTO salesitems VALUES("24","3","CHICKEN QUATER","","2","150","","","2016-11-28","27","","","","CASH SALE","0","0","3","0","2016-11-28 10:22:45","0","0","1","");
INSERT INTO salesitems VALUES("25","12","FRESH CREAM CAKE-1 KG","","2","1750","","","2016-11-28","28","","","","CASH SALE","0","0","3","0","2016-11-28 14:46:24","0","0","1","");
INSERT INTO salesitems VALUES("26","13","ANNIVERSARY CELEBRATION CAKE-4KG","","4","6500","","","2016-11-28","29","","","","CASH SALE","0","0","2","0","2016-11-28 14:55:55","0","0","1","");
INSERT INTO salesitems VALUES("28","8","assorted cup cakes-dozen","","10","1700","","","2016-11-28","30","","","","CASH SALE","0","0","2","0","2016-11-28 15:01:10","0","0","1","");
INSERT INTO salesitems VALUES("29","7","FOREST CAKE 1KG","","1","2500","","","2016-12-09","31","","","","CASH SALE","0","0","3","0","2016-12-09 09:22:03","0","0","1","");
INSERT INTO salesitems VALUES("30","12","FRESH CREAM CAKE-1 KG","","2","875","","","2016-12-09","32","","","","CASH SALE","0","0","3","0","2016-12-09 10:18:38","0","0","1","");
INSERT INTO salesitems VALUES("30","5","PUSH CAKES","","1","320","","","2016-12-09","33","","","","CASH SALE","0","0","3","0","2016-12-09 10:19:03","0","0","1","");
INSERT INTO salesitems VALUES("31","9","ASSORTED CUP CAKES -HALF DOZEN","","2","12","","","2016-12-09","34","","","","CASH SALE","0","0","3","0","2016-12-09 11:16:08","0","0","1","");
INSERT INTO salesitems VALUES("31","12","FRESH CREAM CAKE-1 KG","","4","1750","","","2016-12-09","35","","","","CASH SALE","0","0","3","0","2016-12-09 11:16:21","0","0","1","");
INSERT INTO salesitems VALUES("32","5","PUSH CAKES","","1","320","","","2016-12-09","36","","","","CASH SALE","0","0","3","0","2016-12-09 12:31:40","0","0","1","");
INSERT INTO salesitems VALUES("33","8","ASSORTED CUP CAKES-DOZEN","","1","1700","","","2016-12-09","37","","","","CASH SALE","0","0","3","0","2016-12-09 12:32:26","0","0","1","");
INSERT INTO salesitems VALUES("34","6","QUEEN CAKES","","10","171","","","2016-12-09","38","","","","CASH SALE","0","5","3","0","2016-12-09 12:35:31","0","0","1","");
INSERT INTO salesitems VALUES("35","8","ASSORTED CUP CAKES-DOZEN","","1","1700","","","2016-12-11","39","","","","CASH SALE","0","0","3","0","2016-12-11 09:35:44","0","0","1","");
INSERT INTO salesitems VALUES("35","9","ASSORTED CUP CAKES -HALF DOZEN","","4","12","","","2016-12-11","40","","","","CASH SALE","0","0","3","0","2016-12-11 09:36:00","0","0","1","");
INSERT INTO salesitems VALUES("35","3","CHICKEN QUATER","","1","150","","","2016-12-14","41","","","","CASH SALE","0","0","3","0","2016-12-14 15:28:40","0","0","1","");
INSERT INTO salesitems VALUES("36","10","EAT YOUR BRAND-DOZEN","","10","15","","","2016-12-15","42","","","","CASH SALE","0","0","3","0","2016-12-15 14:47:46","0","0","1","");
INSERT INTO salesitems VALUES("36","8","ASSORTED CUP CAKES-DOZEN","","10","1700","","","2016-12-15","43","","","","CASH SALE","0","0","3","0","2016-12-15 14:48:30","0","0","1","");
INSERT INTO salesitems VALUES("37","16","BIRTHDAY FRUIT CAKE 1KG","","1","4000","","","2016-12-19","48","","","","CASH SALE","0","0","","0","2016-12-19 11:01:33","0","0","1","");
INSERT INTO salesitems VALUES("38","13","ANNIVERSARY CELEBRATION CAKE-4KG","","1","6500","","","2016-12-19","49","","","","CASH SALE","0","0","","0","2016-12-19 11:04:49","0","0","1","");
INSERT INTO salesitems VALUES("39","15","CHRISTMAS CAKE 4KG","","1","8000","","","2016-12-19","50","","","","CASH SALE","0","0","SAMMY MWAITA","0","2016-12-19 11:06:21","0","0","1","");
INSERT INTO salesitems VALUES("40","1","MARBLE CAKE-1KG","","1","120","","","2016-12-20","52","","","","CASH SALE","0","0","4","0","2016-12-20 10:00:39","0","0","1","");
INSERT INTO salesitems VALUES("40","3","CHICKEN QUATER","","2","150","","","2016-12-20","53","","","","CASH SALE","0","0","4","0","2016-12-20 14:24:01","0","0","1","");
INSERT INTO salesitems VALUES("41","13","ANNIVERSARY CELEBRATION CAKE-4KG","","1","6500","","","2016-12-21","54","","","","CASH SALE","0","0","4","0","2016-12-21 08:39:42","0","0","1","");
INSERT INTO salesitems VALUES("42","13","ANNIVERSARY CELEBRATION CAKE-4KG","","2","6500","","","2016-12-21","55","","","","CASH SALE","0","0","4","0","2016-12-21 08:42:30","0","0","1","");
INSERT INTO salesitems VALUES("42","15","CHRISTMAS CAKE 4KG","","2","8000","","","2016-12-21","57","","","","CASH SALE","0","0","4","0","2016-12-21 08:43:12","0","0","1","");
INSERT INTO salesitems VALUES("44","13","ANNIVERSARY CELEBRATION CAKE-4KG","","2","6500","","","2016-12-21","58","","","","CASH SALE","0","0","4","0","2016-12-21 14:02:51","0","0","1","POS USER");
INSERT INTO salesitems VALUES("44","4","CHIPS","","2","100","","","2016-12-21","61","","","","CASH SALE","0","0","4","0","2016-12-21 14:12:25","0","0","1","POS USER");
INSERT INTO salesitems VALUES("45","4","CHIPS","","2","100","","","2016-12-31","62","","","","CASH SALE","0","0","4","0","2016-12-31 09:02:56","0","0","1","POS USER");
INSERT INTO salesitems VALUES("45","4","CHIPS","","2","100","","","2016-12-31","63","","","","CASH SALE","0","0","4","0","2016-12-31 09:04:07","0","0","1","POS USER");
INSERT INTO salesitems VALUES("45","6","QUEEN CAKES","","2","180","","","2016-12-31","64","","","","CASH SALE","0","0","4","0","2016-12-31 09:11:04","0","0","1","POS USER");
INSERT INTO salesitems VALUES("45","1","MARBLE CAKE-1KG","","2","120","","","2016-12-31","65","","","","CASH SALE","0","0","4","0","2016-12-31 09:26:23","0","0","1","POS USER");
INSERT INTO salesitems VALUES("46","2","MIXED TEA WITH MAANDAZI","","4","120","","","2017-01-04","67","","","","CASH SALE","0","0","4","0","2017-01-04 15:06:37","0","0","1","POS USER");
INSERT INTO salesitems VALUES("47","1","MARBLE CAKE-1KG","","10","120","","","2017-01-11","68","","","","CASH SALE","0","0","4","0","2017-01-11 10:14:16","0","0","1","POS USER");
INSERT INTO salesitems VALUES("47","2","MIXED TEA WITH MAANDAZI","","98","120","","","2017-01-11","69","","","","CASH SALE","0","0","4","0","2017-01-11 10:14:26","0","0","1","POS USER");
INSERT INTO salesitems VALUES("47","3","CHICKEN QUATER","","82","150","","","2017-01-11","70","","","","CASH SALE","0","0","4","0","2017-01-11 10:14:37","0","0","1","POS USER");
INSERT INTO salesitems VALUES("47","5","PUSH CAKES","","12","320","","","2017-01-11","71","","","","CASH SALE","0","0","4","0","2017-01-11 10:14:46","0","0","1","POS USER");
INSERT INTO salesitems VALUES("47","6","QUEEN CAKES","","37","180","","","2017-01-11","72","","","","CASH SALE","0","0","4","0","2017-01-11 10:14:54","0","0","1","POS USER");
INSERT INTO salesitems VALUES("50","1","MARBLE CAKE-1KG","","20","120","","","2017-01-17","74","","","","CASH SALE","0","0","5","0","2017-01-17 15:07:37","0","0","1","POS USER");
INSERT INTO salesitems VALUES("50","2","MIXED TEA WITH MAANDAZI","","10","120","","","2017-01-17","75","","","","CASH SALE","0","0","5","0","2017-01-17 15:07:47","0","0","1","POS USER");
INSERT INTO salesitems VALUES("50","7","FOREST CAKE 1KG","","5","2500","","","2017-01-17","76","","","","CASH SALE","0","0","5","0","2017-01-17 15:07:58","0","0","1","POS USER");
INSERT INTO salesitems VALUES("52","3","CHICKEN QUATER","","5","150","","","2017-01-26","77","","","","CASH SALE","0","0","3","0","2017-01-26 09:01:15","0","0","1","admin");
INSERT INTO salesitems VALUES("54","1","MARBLE CAKE-1KG","","5","120","","","2017-01-28","78","","","","CASH SALE","0","0","4","0","2017-01-28 14:11:53","0","0","1","POS USER");
INSERT INTO salesitems VALUES("54","3","CHICKEN QUATER","","5","150","","","2017-01-28","79","","","","CASH SALE","0","0","4","0","2017-01-28 14:12:01","0","0","1","POS USER");
INSERT INTO salesitems VALUES("54","7","FOREST CAKE 1KG","","5","2500","","","2017-01-28","80","","","","CASH SALE","0","0","4","0","2017-01-28 14:12:19","0","0","1","POS USER");
INSERT INTO salesitems VALUES("61","1","MARBLE CAKE-1KG","","6","120","","","2017-02-14","81","","","","CASH SALE","0","0","5","0","2017-02-14 11:36:03","0","0","1","POS USER");
INSERT INTO salesitems VALUES("62","8","ASSORTED CUP CAKES-DOZEN","","10","1700","","","2017-02-27","82","","","","CASH SALE","0","0","4","0","2017-02-27 15:00:44","0","0","2","POS USER");
INSERT INTO salesitems VALUES("62","9","ASSORTED CUP CAKES -HALF DOZEN","","10","12","","","2017-02-27","83","","","","CASH SALE","0","0","4","0","2017-02-27 15:00:59","0","0","2","POS USER");
INSERT INTO salesitems VALUES("63","1","MARBLE CAKE-1KG","","2","120","","","2017-03-09","84","","","","CASH SALE","0","0","4","0","2017-03-09 08:25:43","0","0","1","POS USER");
INSERT INTO salesitems VALUES("64","16","BIRTHDAY FRUIT CAKE 1KG","","4","4000","","","2017-03-09","85","","","","CASH SALE","0","0","4","0","2017-03-09 08:26:27","0","0","1","POS USER");
INSERT INTO salesitems VALUES("66","1","MARBLE CAKE-1KG","","2","120","","","2017-03-13","87","","","","CASH SALE","0","0","4","0","2017-03-13 09:20:49","0","0","1","POS USER");



DROP TABLE salesitems_raw;

CREATE TABLE `salesitems_raw` (
  `RcptNo` int(11) DEFAULT NULL,
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Qty` double DEFAULT NULL,
  `UnitPrice` double DEFAULT NULL,
  `TotalPrice` double DEFAULT NULL,
  `Vat` double DEFAULT NULL,
  `TransDate` date DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `BatchNo` varchar(200) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `SaleCode` int(11) DEFAULT NULL,
  `Client` varchar(200) DEFAULT 'CASH SALE',
  `CostPrice` double DEFAULT '0',
  `Disc` double DEFAULT '0',
  `Sppl` varchar(200) DEFAULT NULL,
  `Qnty` double DEFAULT '0',
  `T_Sta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `SRet` double DEFAULT '0',
  `PatId` int(11) DEFAULT '0',
  `StoreId` int(11) DEFAULT NULL,
  `user_Owner` varchar(200) DEFAULT 'POS USER',
  PRIMARY KEY (`TransNo`),
  KEY `FK_sales` (`RcptNo`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

INSERT INTO salesitems_raw VALUES("3","4","CHIPS","","10","300","","","2016-11-10","1","","","","CASH SALE","0","0","","0","2016-11-10 12:26:17","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("3","2","MILK LTR","","1","65","","","2016-11-10","2","","","","CASH SALE","0","0","","0","2016-11-10 12:29:13","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("9","3","POTATOES KG","","10","25","","","2016-11-17","3","","","","CASH SALE","0","0","","0","2016-11-17 15:27:39","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("9","6","COOKING OIL TRS","","20","125","","","2016-11-17","4","","","","CASH SALE","0","0","","0","2016-11-17 15:27:45","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("9","1","WHEAT FLOUR","","5","120","","","2016-11-17","5","","","","CASH SALE","0","0","","0","2016-11-17 15:27:56","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("10","5","SUGAR KGS","","1","130","","","2016-11-17","6","","","","CASH SALE","0","0","","0","2016-11-17 15:28:49","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("11","5","SUGAR KGS","","3","130","","","2016-11-17","7","","","","CASH SALE","0","0","","0","2016-11-17 15:30:06","0","0","3","POS USER");
INSERT INTO salesitems_raw VALUES("11","2","MILK LTR","","4","65","","","2016-11-17","8","","","","CASH SALE","0","0","","0","2016-11-17 15:30:11","0","0","3","POS USER");
INSERT INTO salesitems_raw VALUES("19","2","MILK LTR","","1","65","","","2016-11-17","9","","","","CASH SALE","0","0","","0","2016-11-17 15:50:17","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("19","4","CHICKEN FULL","","1","300","","","2016-11-17","10","","","","CASH SALE","0","0","","0","2016-11-17 15:50:25","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("19","3","POTATOES KG","","2","25","","","2016-11-17","11","","","","CASH SALE","0","0","","0","2016-11-17 15:50:32","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("21","7","blue band","","10","120","","","2016-11-18","12","","","","CASH SALE","0","0","","0","2016-11-18 11:03:41","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("22","1","WHEAT FLOUR","","1","120","","","2016-11-21","13","","","","CASH SALE","0","0","","0","2016-11-21 12:28:35","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("35","4","CHICKEN FULL","","1","300","","","2016-12-09","14","","","","CASH SALE","0","0","","0","2016-12-09 13:03:16","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("36","1","WHEAT FLOUR","","20","120","","","2016-12-15","15","","","","CASH SALE","0","0","","0","2016-12-15 13:59:39","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("36","1","WHEAT FLOUR","","100","120","","","2016-12-15","16","","","","CASH SALE","0","0","","0","2016-12-15 14:15:24","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("36","8","EGGS PCS","","6","10","","","2016-12-15","17","","","","CASH SALE","0","0","","0","2016-12-15 14:20:33","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("37","3","POTATOES KG","","10","25","","","2016-12-19","25","","","","CASH SALE","0","0","","0","2016-12-19 10:52:01","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("37","4","CHICKEN FULL","","10","300","","","2016-12-19","26","","","","CASH SALE","0","0","","0","2016-12-19 10:52:26","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("44","11","1 KG CAKE BOX","","4","10","","","2016-12-21","27","","","","CASH SALE","0","0","","0","2016-12-21 13:33:51","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","1","WHEAT FLOUR","","10","120","","","2017-01-11","28","","","","CASH SALE","0","0","","0","2017-01-11 10:18:22","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","5","SUGAR KGS","","10","130","","","2017-01-11","30","","","","CASH SALE","0","0","","0","2017-01-11 10:18:38","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","8","EGGS PCS","","20","10","","","2017-01-11","31","","","","CASH SALE","0","0","","0","2017-01-11 10:18:49","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","3","POTATOES KG","","15","25","","","2017-01-11","32","","","","CASH SALE","0","0","","0","2017-01-11 10:19:05","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","2","MILK LTR","","20","65","","","2017-01-11","33","","","","CASH SALE","0","0","","0","2017-01-11 10:19:17","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","1","WHEAT FLOUR","","2","120","","","2017-01-13","35","","","","CASH SALE","0","0","","0","2017-01-13 16:02:28","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("48","4","CHICKEN FULL","","2","300","","","2017-01-13","36","","","","CASH SALE","0","0","","0","2017-01-13 16:15:46","0","0","1","POS USER");
INSERT INTO salesitems_raw VALUES("49","1","WHEAT FLOUR","","2","120","","","2017-01-13","37","","","","CASH SALE","0","0","","0","2017-01-13 16:27:33","0","0","1","");
INSERT INTO salesitems_raw VALUES("51","4","CHICKEN FULL","","64","300","","","2017-01-26","38","","","","CASH SALE","0","0","","0","2017-01-26 07:55:26","0","0","1","");
INSERT INTO salesitems_raw VALUES("53","3","POTATOES KG","","10","25","","","2017-01-27","40","","","","CASH SALE","0","0","","0","2017-01-27 14:43:26","0","0","1","");
INSERT INTO salesitems_raw VALUES("53","4","CHICKEN FULL","","20","300","","","2017-01-27","41","","","","CASH SALE","0","0","","0","2017-01-27 14:43:52","0","0","1","");
INSERT INTO salesitems_raw VALUES("53","8","EGGS PCS","","60","10","","","2017-01-27","42","","","","CASH SALE","0","0","","0","2017-01-27 15:07:29","0","0","1","");
INSERT INTO salesitems_raw VALUES("55","1","WHEAT FLOUR","","5","120","","","2017-01-28","43","","","","CASH SALE","0","0","","0","2017-01-28 14:19:24","0","0","1","");
INSERT INTO salesitems_raw VALUES("56","1","WHEAT FLOUR","","3","120","","","2017-01-28","44","","","","CASH SALE","0","0","","0","2017-01-28 14:25:43","0","0","1","");
INSERT INTO salesitems_raw VALUES("57","4","CHICKEN FULL","","5","300","","","2017-01-28","45","","","","CASH SALE","0","0","","0","2017-01-28 14:27:24","0","0","1","");
INSERT INTO salesitems_raw VALUES("58","5","SUGAR KGS","","20","130","","","2017-01-28","46","","","","CASH SALE","0","0","","0","2017-01-28 14:29:45","0","0","1","");
INSERT INTO salesitems_raw VALUES("59","7","BLUE BAND","","10","120","","","2017-01-28","47","","","","CASH SALE","0","0","","0","2017-01-28 14:31:51","0","0","1","");
INSERT INTO salesitems_raw VALUES("59","8","EGGS PCS","","100","10","","","2017-01-28","48","","","","CASH SALE","0","0","","0","2017-01-28 14:32:01","0","0","1","");
INSERT INTO salesitems_raw VALUES("60","1","WHEAT FLOUR","","10","120","","","2017-01-31","49","","","","CASH SALE","0","0","","0","2017-01-31 08:40:52","0","0","1","");
INSERT INTO salesitems_raw VALUES("60","2","MILK LTR","","10","65","","","2017-01-31","50","","","","CASH SALE","0","0","","0","2017-01-31 08:41:02","0","0","1","");
INSERT INTO salesitems_raw VALUES("60","3","POTATOES KG","","10","25","","","2017-01-31","51","","","","CASH SALE","0","0","","0","2017-01-31 08:41:13","0","0","1","");
INSERT INTO salesitems_raw VALUES("60","5","SUGAR KGS","","10","130","","","2017-01-31","52","","","","CASH SALE","0","0","","0","2017-01-31 08:41:25","0","0","1","");



DROP TABLE shiftstable;

CREATE TABLE `shiftstable` (
  `Shift_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Shift_Name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`Shift_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

INSERT INTO shiftstable VALUES("1","DAY SHIFT");
INSERT INTO shiftstable VALUES("2","NIGHT SHIFT");



DROP TABLE staff_sales;

CREATE TABLE `staff_sales` (
  `sales_id` int(11) NOT NULL AUTO_INCREMENT,
  `sales_Date` date DEFAULT NULL,
  `sales_SatffID` int(11) DEFAULT NULL,
  `sales_Cash` double DEFAULT '0',
  `sales_mpesa` double DEFAULT '0',
  `sales_visa` double DEFAULT '0',
  `sales_KCard` double DEFAULT '0',
  `sales_Invoice` double DEFAULT '0',
  `sales_CustomerId` int(11) DEFAULT '0',
  PRIMARY KEY (`sales_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

INSERT INTO staff_sales VALUES("1","2017-03-01","4","0","0","0","0","0","0");
INSERT INTO staff_sales VALUES("2","2017-03-01","2","15000","12000","60000","2500","50000","0");
INSERT INTO staff_sales VALUES("3","2017-03-01","6","12000","1000","4000","3200","6500","0");
INSERT INTO staff_sales VALUES("4","2017-03-01","1","0","0","0","0","15900","0");
INSERT INTO staff_sales VALUES("5","2017-03-01","1","0","0","0","0","15900","0");
INSERT INTO staff_sales VALUES("6","2017-03-01","1","0","0","0","0","15900","0");
INSERT INTO staff_sales VALUES("7","2017-03-05","4","15400","1200","0","0","0","0");
INSERT INTO staff_sales VALUES("8","2017-03-07","4","0","0","0","0","38400","0");
INSERT INTO staff_sales VALUES("9","2017-03-07","2","12000","0","0","0","14000","0");
INSERT INTO staff_sales VALUES("10","2017-03-08","6","4500","1200","0","0","6000","0");
INSERT INTO staff_sales VALUES("11","2017-03-10","4","15200","25000","0","0","5000","0");
INSERT INTO staff_sales VALUES("12","2017-03-10","2","21000","3000","5000","0","0","0");
INSERT INTO staff_sales VALUES("13","2017-03-10","1","32500","15600","4000","4000","4500","0");
INSERT INTO staff_sales VALUES("14","2017-03-10","6","12000","8000","5000","12000","0","0");



DROP TABLE stafflist;

CREATE TABLE `stafflist` (
  `staff_ID` int(11) NOT NULL AUTO_INCREMENT,
  `staff_Name` varchar(200) DEFAULT NULL,
  `staff_Code` varchar(200) DEFAULT '0000',
  `Active` varchar(200) DEFAULT 'YES',
  PRIMARY KEY (`staff_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

INSERT INTO stafflist VALUES("1","JOYCE WAWERU NJERU","6666","YES");
INSERT INTO stafflist VALUES("2","JAME MRUTTU","5555","YES");
INSERT INTO stafflist VALUES("3","ANTHONY NDWIGA OTIENO","3333","NO");
INSERT INTO stafflist VALUES("4","ERIC KOMU","1234","YES");
INSERT INTO stafflist VALUES("5","SAMMY MWAITA","8888","NO");
INSERT INTO stafflist VALUES("6","MAUREEN KINYUA","1991","YES");



DROP TABLE stock_taketbl;

CREATE TABLE `stock_taketbl` (
  `stake_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `stake_TransDate` date DEFAULT NULL,
  `stake_ItemCode` int(11) DEFAULT NULL,
  `stake_ItemName` varchar(200) DEFAULT NULL,
  `stake_Qty` double DEFAULT '0',
  `stake_LocID` int(11) DEFAULT NULL,
  `stake_adjustQty` double DEFAULT '0',
  PRIMARY KEY (`stake_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;

INSERT INTO stock_taketbl VALUES("1","2016-12-17","13","ANNIVERSARY CELEBRATION CAKE-4KG","10","2","10");
INSERT INTO stock_taketbl VALUES("2","2016-12-17","9","ASSORTED CUP CAKES -HALF DOZEN","10","2","10");
INSERT INTO stock_taketbl VALUES("3","2016-12-17","8","ASSORTED CUP CAKES-DOZEN","10","2","10");
INSERT INTO stock_taketbl VALUES("4","2016-12-19","13","ANNIVERSARY CELEBRATION CAKE-4KG","10","1","14");
INSERT INTO stock_taketbl VALUES("5","2016-12-31","9","ASSORTED CUP CAKES -HALF DOZEN","10","1","16");
INSERT INTO stock_taketbl VALUES("6","2016-12-31","8","ASSORTED CUP CAKES-DOZEN","50","1","72");
INSERT INTO stock_taketbl VALUES("7","2016-12-31","10","EAT YOUR BRAND-DOZEN","30","1","40");
INSERT INTO stock_taketbl VALUES("8","2016-12-31","7","FOREST CAKE 1KG","50","1","53");
INSERT INTO stock_taketbl VALUES("9","2016-12-31","14","FAMILY COOKIES 1 DOZEN","100","1","100");
INSERT INTO stock_taketbl VALUES("10","2016-12-31","12","FRESH CREAM CAKE-1 KG","108","1","116");
INSERT INTO stock_taketbl VALUES("11","2016-12-31","11","LOGO DOUGHNUT-DOZEN","30","1","30");
INSERT INTO stock_taketbl VALUES("12","2016-12-31","2","MIXED TEA WITH MAANDAZI","10","1","24");
INSERT INTO stock_taketbl VALUES("15","2017-01-04","2","MIXED TEA WITH MAANDAZI","200","1","192");
INSERT INTO stock_taketbl VALUES("16","2017-02-27","15","CHRISTMAS CAKE 4KG","50","2","50");
INSERT INTO stock_taketbl VALUES("17","2017-02-27","7","FOREST CAKE 1KG","10","2","10");
INSERT INTO stock_taketbl VALUES("18","2017-02-27","1","MARBLE CAKE-1KG","20","2","20");
INSERT INTO stock_taketbl VALUES("19","2017-02-27","5","PUSH CAKES","50","2","51");
INSERT INTO stock_taketbl VALUES("20","2017-02-27","6","QUEEN CAKES","20","2","20");
INSERT INTO stock_taketbl VALUES("21","2017-02-27","16","BIRTHDAY FRUIT CAKE 1KG","70","2","70");



DROP TABLE stocktake;

CREATE TABLE `stocktake` (
  `ItemCode` int(11) DEFAULT NULL,
  `ItemName` varchar(200) DEFAULT NULL,
  `Units` varchar(200) DEFAULT NULL,
  `Quantity` double DEFAULT NULL,
  `Price` double DEFAULT NULL,
  `PurchDate` date DEFAULT NULL,
  `Supplier` varchar(200) DEFAULT NULL,
  `PostedBy` varchar(200) DEFAULT NULL,
  `TransNo` int(11) NOT NULL AUTO_INCREMENT,
  `PurchNo` int(11) DEFAULT NULL,
  `BatchNo` varchar(200) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `Bal` double DEFAULT '0',
  `InvoiceAmt` double DEFAULT '0',
  `Disc` double DEFAULT '0',
  `UCost` double DEFAULT '0',
  `BonusQty` double DEFAULT '0',
  `VatAmt` double DEFAULT '0',
  `NetPrice` double DEFAULT '0',
  `T_Sta` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `StoreId` int(11) DEFAULT NULL,
  PRIMARY KEY (`TransNo`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;




DROP TABLE stocktaketbl;

CREATE TABLE `stocktaketbl` (
  `stake_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `stake_TransDate` date DEFAULT NULL,
  `stake_ItemCode` int(11) DEFAULT NULL,
  `stake_ItemName` varchar(200) DEFAULT NULL,
  `stake_Qty` double DEFAULT '0',
  `stake_LocID` int(11) DEFAULT NULL,
  `stake_adjustQty` double DEFAULT '0',
  PRIMARY KEY (`stake_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;

INSERT INTO stocktaketbl VALUES("1","2016-12-17","1","WHEAT FLOUR","10","2","10");
INSERT INTO stocktaketbl VALUES("2","2016-12-17","2","MILK LTR","10","2","10");
INSERT INTO stocktaketbl VALUES("3","2016-12-17","3","POTATOES KG","10","2","10");
INSERT INTO stocktaketbl VALUES("4","2016-12-17","5","SUGAR KGS","10","2","10");
INSERT INTO stocktaketbl VALUES("5","2016-12-21","11","1 KG CAKE BOX","10","1","10");
INSERT INTO stocktaketbl VALUES("8","2017-01-04","1","WHEAT FLOUR","10","1","-990");
INSERT INTO stocktaketbl VALUES("10","2017-01-04","9","FOOD COLOR","200","1","180");
INSERT INTO stocktaketbl VALUES("12","2017-01-04","12","45x45 cake box","165","1","165");
INSERT INTO stocktaketbl VALUES("13","2017-01-04","5","SUGAR KGS","12","1","8.4");
INSERT INTO stocktaketbl VALUES("14","2017-01-11","1","WHEAT FLOUR","50","1","1300.86");
INSERT INTO stocktaketbl VALUES("15","2017-01-11","2","MILK LTR","30","1","109.25");
INSERT INTO stocktaketbl VALUES("16","2017-01-11","5","SUGAR KGS","20","1","19.4");
INSERT INTO stocktaketbl VALUES("17","2017-01-28","1","WHEAT FLOUR","50","1","100.4");
INSERT INTO stocktaketbl VALUES("18","2017-01-28","2","MILK LTR","20","1","81.3");
INSERT INTO stocktaketbl VALUES("19","2017-01-28","5","SUGAR KGS","30","1","40");
INSERT INTO stocktaketbl VALUES("20","2017-01-28","6","COOKING OIL TRS","70","1","142.2");
INSERT INTO stocktaketbl VALUES("21","2017-01-28","7","BLUE BAND","50","1","166.8");
INSERT INTO stocktaketbl VALUES("22","2017-01-28","11","1 KG CAKE BOX","100","1","94");
INSERT INTO stocktaketbl VALUES("23","2017-01-28","12","45x45 cake box","120","1","-45");
INSERT INTO stocktaketbl VALUES("24","2017-01-28","10","QUEEN CAKE CUPS","150","1","150");



DROP TABLE suppliers;

CREATE TABLE `suppliers` (
  `Sup_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Sup_Name` varchar(200) DEFAULT NULL,
  `Sup_Tel` varchar(200) DEFAULT NULL,
  `Sup_Email` varchar(200) DEFAULT NULL,
  `Sup_Balance` double DEFAULT '0',
  PRIMARY KEY (`Sup_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

INSERT INTO suppliers VALUES("1","MUNGUKU SUPPLIER","X","X","0");
INSERT INTO suppliers VALUES("2","CHALESTONE GENERAL SUPPLIES","gm@chalestone.com","020 446789","0");
INSERT INTO suppliers VALUES("3","FARM TO SHOP MERCHANDISERS","020-9008988, 0712993450","sales@farmtoshop.co.ke","0");
INSERT INTO suppliers VALUES("4","AFRIMAS GENERAL SUPPLIER","info@afrimas.co.ke","0712345678","0");
INSERT INTO suppliers VALUES("5","DAVID WASIKE","x","x","0");
INSERT INTO suppliers VALUES("6","KENVINE PETROLEUM LTD","x","x","0");
INSERT INTO suppliers VALUES("7","TONYTECH EQUIPMENTS","x","x","0");
INSERT INTO suppliers VALUES("8","AGREKKO AGROVET LTD","x","x","45000");



DROP TABLE suppliertrans;

CREATE TABLE `suppliertrans` (
  `AutoNo` int(11) NOT NULL AUTO_INCREMENT,
  `SupplierId` int(11) DEFAULT NULL,
  `SupplierName` varchar(200) DEFAULT NULL,
  `DateTrans` date DEFAULT NULL,
  `ReceiptNo` varchar(200) DEFAULT '0',
  `Amount` double DEFAULT NULL,
  `EntryBy` varchar(200) DEFAULT NULL,
  `TransType` varchar(200) DEFAULT NULL,
  `PayMode` varchar(200) DEFAULT 'NONE',
  `Credit` double DEFAULT '0',
  `Debit` double DEFAULT '0',
  `creditbal` double DEFAULT '0',
  `Debitbal` double DEFAULT '0',
  `Refx` varchar(200) DEFAULT '',
  `T_Sta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `CurrAmt` double DEFAULT '0',
  `CurrRate` double DEFAULT '1',
  `CurrName` varchar(200) DEFAULT 'KENYA SHILINGS',
  `Staff_ID` int(11) DEFAULT '0',
  PRIMARY KEY (`AutoNo`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;

INSERT INTO suppliertrans VALUES("1","4","AFRIMAS GENERAL SUPPLIER","2016-11-11","4","12325","","DEBIT","NONE","0","12325","0","0","","2016-11-11 10:41:20","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("2","4","AFRIMAS GENERAL SUPPLIER","2016-11-11","0","0","","CREDIT","NONE","12350","0","0","0","","2016-11-11 11:19:57","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("3","4","AFRIMAS GENERAL SUPPLIER","2016-11-11","0","0","","CREDIT","NONE","12350","0","0","0","","2016-11-11 11:21:43","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("4","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","5","0","","DEBIT","NONE","0","13200","0","0","","2016-11-18 09:30:11","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("5","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","5","0","","DEBIT","NONE","0","13200","0","0","","2016-11-18 09:30:43","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("6","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","5","0","","DEBIT","NONE","0","13200","0","0","Purchase of raw Material","2016-11-18 09:33:57","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("7","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","6","0","","DEBIT","NONE","0","5000","0","0","Purchase of raw Material","2016-11-18 10:44:06","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("8","4","AFRIMAS GENERAL SUPPLIER","2016-11-18","7","0","","DEBIT","NONE","0","12000","0","0","Purchase of raw Material","2016-11-18 10:49:57","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("9","2","CHALESTONE GENERAL SUPPLIES","2016-11-21","8","0","","DEBIT","NONE","0","6500","0","0","Purchase of raw Material","2016-12-29 14:04:46","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("10","1","MUNGUKU SUPPLIER","2016-12-29","9","0","","DEBIT","NONE","0","360","0","0","Purchase of raw Material","2016-12-29 14:14:00","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("11","4","AFRIMAS GENERAL SUPPLIER","2016-12-29","10","0","","DEBIT","NONE","0","8120","0","0","Purchase of raw Material","2016-12-29 14:40:40","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("12","1","MUNGUKU SUPPLIER","2016-12-29","11","0","","DEBIT","NONE","0","150000","0","0","Purchase of raw Material","2016-12-29 14:42:20","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("13","2","CHALESTONE GENERAL SUPPLIES","2016-12-29","12","0","","DEBIT","NONE","0","8500","0","0","Purchase of raw Material","2016-12-29 14:52:43","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("14","1","MUNGUKU SUPPLIER","2017-01-17","0","0","","CREDIT","NONE","120000","0","0","0","Account Name RTRETRET(RTRETRET) ChequeNo: 4455433","2017-01-17 14:31:06","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("15","2","CHALESTONE GENERAL SUPPLIES","2017-01-08","13","0","","DEBIT","NONE","0","7200","0","0","Purchase of raw Material","2017-02-27 14:40:50","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("16","5","DAVID WASIKE","2017-02-27","14","0","","DEBIT","NONE","0","-4250","0","0","Purchase of raw Material","2017-02-27 14:44:22","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("17","6","KENVINE PETROLEUM LTD","2017-03-02","0000","0","","DEBIT","NONE","0","97500","0","0","Delivery of Fuel","2017-03-02 09:24:31","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("18","6","KENVINE PETROLEUM LTD","2017-03-02","0000","0","","DEBIT","NONE","0","675000","0","0","Delivery of Fuel 15000 Litres @45","2017-03-02 09:29:41","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("19","5","DAVID WASIKE","2017-03-08","0000","0","","DEBIT","NONE","0","700000","0","0","Delivery of Fuel 14000 Litres @50","2017-03-08 11:07:38","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("20","7","TONYTECH EQUIPMENTS","2017-03-09","15","0","","DEBIT","NONE","0","18050","0","0","Purchase of raw Material","2017-03-09 08:29:43","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("21","8","AGREKKO AGROVET LTD","2017-03-09","0","0","","DEBIT","NONE","0","45000","0","0","Opening Balance","2017-03-09 15:21:49","0","1","KENYA SHILINGS","0");
INSERT INTO suppliertrans VALUES("22","7","TONYTECH EQUIPMENTS","2017-03-10","0","0","","CREDIT","NONE","18050","0","0","0","Account Name RTRETRET(RTRETRET) ChequeNo: 00","2017-03-10 08:17:39","0","1","KENYA SHILINGS","6");



DROP TABLE tank_reading;

CREATE TABLE `tank_reading` (
  `reading_ID` int(11) NOT NULL AUTO_INCREMENT,
  `reading_Date` date DEFAULT NULL,
  `reading_ItemCode` int(11) DEFAULT NULL,
  `reading_Value` double DEFAULT '0',
  `reading_By` varchar(200) DEFAULT NULL,
  `reading_ltrs` double DEFAULT '0',
  `reading_Diff` double DEFAULT '0',
  `reading_ItemName` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`reading_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO tank_reading VALUES("1","2017-02-17","17","0","1","400","400","PETROL");
INSERT INTO tank_reading VALUES("2","2017-02-17","17","7","2","35","365","PETROL");
INSERT INTO tank_reading VALUES("3","2017-02-17","17","7","6","35","330","PETROL");



DROP TABLE tankcalibration;

CREATE TABLE `tankcalibration` (
  `cal_ID` int(11) NOT NULL AUTO_INCREMENT,
  `cal_CM` double DEFAULT '0',
  `cal_By` varchar(200) DEFAULT NULL,
  `cal_Litres` double DEFAULT '0',
  `cal_Date` date DEFAULT NULL,
  PRIMARY KEY (`cal_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO tankcalibration VALUES("1","7","POS USER","35","2017-02-16");
INSERT INTO tankcalibration VALUES("2","0","POS USER","400","2017-02-17");
INSERT INTO tankcalibration VALUES("3","2","POS USER","150","2017-02-17");



DROP TABLE tankstbl;

CREATE TABLE `tankstbl` (
  `tankID` int(11) NOT NULL AUTO_INCREMENT,
  `tank_Name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`tankID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

INSERT INTO tankstbl VALUES("1","TANK A");
INSERT INTO tankstbl VALUES("2","TANK B");
INSERT INTO tankstbl VALUES("3","TANK C");
INSERT INTO tankstbl VALUES("4","TANK D");
INSERT INTO tankstbl VALUES("5","TANK E");



DROP TABLE trialbalance;

CREATE TABLE `trialbalance` (
  `TransID` int(11) NOT NULL AUTO_INCREMENT,
  `AcountName` varchar(200) DEFAULT NULL,
  `Debit` double DEFAULT '0',
  `Credit` double DEFAULT '0',
  PRIMARY KEY (`TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

INSERT INTO trialbalance VALUES("1","Cash","53292","0");
INSERT INTO trialbalance VALUES("2","Accounts Receivables","29000","0");
INSERT INTO trialbalance VALUES("3","Inventory","0","0");
INSERT INTO trialbalance VALUES("4","Accounts Payable","0","0");
INSERT INTO trialbalance VALUES("5","Revenues","0","88792");
INSERT INTO trialbalance VALUES("6","Cost of Goods Sold","38310","0");
INSERT INTO trialbalance VALUES("7","ELEC","1200","0");



DROP TABLE unique_package;

CREATE TABLE `unique_package` (
  `unique_TransID` int(11) NOT NULL AUTO_INCREMENT,
  `unique_TransDate` date DEFAULT NULL,
  `unique_ItemCode` int(11) DEFAULT NULL,
  `unique_ItemName` varchar(200) DEFAULT NULL,
  `unique_Qty` double DEFAULT '0',
  `unique_LocID` int(11) DEFAULT NULL,
  `unique_parentCode` int(11) DEFAULT '0',
  `unique_parentid` int(11) DEFAULT '0',
  PRIMARY KEY (`unique_TransID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

INSERT INTO unique_package VALUES("1","2017-01-20","1","MARBLE CAKE-1KG","12","1","1","216");
INSERT INTO unique_package VALUES("2","2017-01-20","3","CHICKEN QUATER","4","1","3","216");



DROP TABLE user_levels;

CREATE TABLE `user_levels` (
  `level_Id` int(11) NOT NULL AUTO_INCREMENT,
  `level_Name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`level_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;

INSERT INTO user_levels VALUES("1","Admin");
INSERT INTO user_levels VALUES("2","Manager");
INSERT INTO user_levels VALUES("3","Supervisor");
INSERT INTO user_levels VALUES("4","User");
INSERT INTO user_levels VALUES("15"," Manager1");
INSERT INTO user_levels VALUES("16"," Manager2");
INSERT INTO user_levels VALUES("17"," Supervisor1");
INSERT INTO user_levels VALUES("18"," Supervisor2");
INSERT INTO user_levels VALUES("19"," User1");



DROP TABLE vattbl;

CREATE TABLE `vattbl` (
  `VatNo` int(11) NOT NULL AUTO_INCREMENT,
  `Descrip` varchar(200) DEFAULT NULL,
  `Perc` double DEFAULT NULL,
  PRIMARY KEY (`VatNo`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO vattbl VALUES("1","STANDARD TAX","16");
INSERT INTO vattbl VALUES("2","VARIANT","12");
INSERT INTO vattbl VALUES("3","ZERO RATED","0");



