-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `energy95_sphinx1`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addbranch` (IN `br_name` VARCHAR(200), IN `br_loc` LONGTEXT, IN `br_tel1` VARCHAR(50), IN `br_tel2` VARCHAR(50), IN `br_mob` VARCHAR(50), IN `br_fax` VARCHAR(50), IN `br_note` VARCHAR(200))  NO SQL
BEGIN  
                INSERT INTO 
                branch
                (br_name, br_loc,br_tel1,br_tel2,br_mob,br_fax,br_note) VALUES 
                (br_name,br_loc,br_tel1,br_tel2,br_mob,br_fax,br_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addclient` (IN `cli_name` VARCHAR(250), IN `cli_mob` VARCHAR(25), IN `cli_resp` VARCHAR(25), IN `cli_address` LONGTEXT, IN `cli_tel` VARCHAR(25), IN `cli_note` VARCHAR(250))  NO SQL
BEGIN
INSERT INTO client (cli_name,cli_mob,cli_resp,cli_address,cli_tel,cli_note) VALUES (cli_name,cli_mob,cli_resp,cli_address,cli_tel,cli_note);
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addclientSurvay` (IN `cli_id` INT(11), IN `clis_id` INT(11), IN `cliservay_date1` DATE, IN `cliservay_date2` DATE, IN `cliservay_date3` DATE, IN `cliservay_cost1` DOUBLE, IN `cliservay_cost2` DOUBLE, IN `cliservay_cost3` DOUBLE, IN `cliservay_note` VARCHAR(500), IN `emp_id` INT(11), IN `br_id` INT(11))  NO SQL
BEGIN  
                INSERT INTO 
                cliservay
                (cli_id,clis_id,cliservay_date1,cliservay_date2,cliservay_date3,cliservay_cost1,cliservay_cost2,cliservay_cost3,cliservay_note,emp_id,br_id) VALUES 
                (cli_id,clis_id,cliservay_date1,cliservay_date2,cliservay_date3,cliservay_cost1,cliservay_cost2,cliservay_cost3,cliservay_note,emp_id,br_id);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addcliser` (IN `clis_name` LONGTEXT, IN `clis_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                cliser
                (clis_name, clis_note) VALUES 
                (clis_name, clis_note);   
                END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addPayCash` (IN `emp_id` INT(11), IN `br_id` INT(11), IN `suppay_id` INT(11), IN `pays_date` DATE, IN `pays_value` DOUBLE, IN `pays_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                paymentcash
                (emp_id, br_id,suppay_id,pays_date,pays_value,pays_note) VALUES 
               (emp_id, br_id,suppay_id,pays_date,pays_value,pays_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addpayment` (IN `pay_name` VARCHAR(250), IN `pay_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                payment
                (pay_name, pay_note) VALUES 
                (pay_name, pay_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addpaymentclient` (IN `cli_id` INT(11), IN `clis_id` INT(11), IN `paycli_cost` DOUBLE, IN `paycli_tax` DOUBLE, IN `paycli_deposit` DOUBLE, IN `paycli_remine` DOUBLE, IN `paycli_date` DATE, IN `paycli_note` VARCHAR(500), IN `emp_id` INT(11), IN `br_id` INT(11))  NO SQL
BEGIN  
                INSERT INTO 
                payclient
                (cli_id,clis_id,paycli_cost,paycli_tax,paycli_deposit,paycli_remine,paycli_date,paycli_note,emp_id,br_id) VALUES 
                (cli_id,clis_id,paycli_cost,paycli_tax,paycli_deposit,paycli_remine,paycli_date,paycli_note,emp_id,br_id);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addpaymentsupplier` (IN `supp_id` INT(11), IN `supps_id` INT(11), IN `paysupp_cost` DOUBLE, IN `paysupp_deposit` DOUBLE, IN `paysupp_remine` DOUBLE, IN `paysupp_date` DATE, IN `paysupp_note` VARCHAR(250), IN `emp_id` INT(11), IN `br_id` INT(11))  NO SQL
BEGIN  
                INSERT INTO 
                paysupplier
                (supp_id, supps_id,paysupp_cost,paysupp_deposit,paysupp_remine,paysupp_date,paysupp_note,emp_id,br_id) VALUES 
               (supp_id, supps_id,paysupp_cost,paysupp_deposit,paysupp_remine,paysupp_date,paysupp_note,emp_id,br_id);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addServicesClient` (IN `cli_id` INT(11), IN `clis_id` INT(11), IN `sercli_cost` DOUBLE, IN `sercli_date` DATE, IN `emp_id` INT(11), IN `br_id` INT(11), IN `sercli_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                ser_client
                (cli_id, clis_id,sercli_cost,sercli_date,emp_id,br_id,sercli_note) VALUES 
                (cli_id, clis_id,sercli_cost,sercli_date,emp_id,br_id,sercli_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addServicesSupplier` (IN `supp_id` INT(11), IN `supps_id` INT(11), IN `asuppser_value` DOUBLE, IN `asuppser_date` DATE, IN `emp_id` INT(11), IN `asuppser_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                asuppser
                (supp_id, supps_id,asuppser_value,asuppser_date,emp_id,asuppser_note) VALUES 
                (supp_id,supps_id,asuppser_value,asuppser_date,emp_id,asuppser_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addssupplier` (IN `supp_name` VARCHAR(250), IN `suppc_id` INT(11), IN `supp_resp` VARCHAR(250), IN `supp_address` LONGTEXT, IN `supp_mob` VARCHAR(25), IN `supp_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                supplier
 (supp_name,suppc_id,supp_resp,supp_address,supp_mob,supp_note) 
 VALUES 
 (supp_name,suppc_id,supp_resp,supp_address,supp_mob,supp_note) ;   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addsuppay` (IN `pay_id` INT(11), IN `suppay_name` VARCHAR(250), IN `suppay_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                suppayment
                (pay_id,suppay_name,suppay_note) VALUES 
                (pay_id,suppay_name,suppay_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addsuppcat` (IN `suppc_name` VARCHAR(250), IN `suppc_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                suppcat
                (suppc_name, suppc_note) VALUES 
                (suppc_name, suppc_note);   
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `addsuppser` (IN `supps_name` VARCHAR(250), IN `supps_note` VARCHAR(250))  NO SQL
BEGIN  
                INSERT INTO 
                suppser 
                (supps_name , supps_note)
                VALUES
                (supps_name , supps_note);
                END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletebranch` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM branch WHERE br_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deleteclient` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM client WHERE cli_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deleteClientSurvay` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM cliservay WHERE cliservay_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletecliser` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM cliser WHERE clis_id = id;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletepayment` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM payment WHERE pay_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletepaymentCash` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM paymentcash WHERE pays_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletepaymentClient` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM payclient WHERE paycli_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletepaymentSupplier` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM paysupplier WHERE paysupp_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deleteservicesclient` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM ser_client WHERE sercli_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deleteservicessupplier` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM asuppser WHERE asuppser_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletesuppay` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM suppayment WHERE suppay_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletesuppcat` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM suppcat WHERE suppc_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletesupplier` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM supplier WHERE supp_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `deletesuppser` (IN `id` INT(11))  NO SQL
BEGIN
DELETE FROM suppser WHERE supps_id = id;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectBranch` ()  NO SQL
BEGIN
SELECT * FROM branch ORDER BY br_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectClient` ()  NO SQL
BEGIN
SELECT * FROM client ORDER BY cli_id DESC ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectClientSurvay` ()  NO SQL
BEGIN
SELECT * FROM cliservay ORDER BY cliservay_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectCliser` ()  NO SQL
BEGIN
SELECT * FROM cliser ORDER BY clis_id DESC;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectPayment` ()  NO SQL
BEGIN
SELECT * FROM payment ORDER BY pay_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectPaymentCash` ()  NO SQL
BEGIN
SELECT * FROM paymentcash ORDER BY pays_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectPaymentClient` ()  NO SQL
BEGIN
SELECT * FROM payclient where paycli_remine > 0 ORDER BY paycli_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectPaymentSupplier` ()  NO SQL
BEGIN
SELECT * FROM paysupplier where paysupp_remine > 0 ORDER BY paysupp_id DESC;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectreport1incoming` (IN `id1` INT(11), IN `date1` DATE, IN `date2` DATE)  NO SQL
BEGIN
select * from client,branch,payclient,cliser where 
 payclient.cli_id=client.cli_id
and payclient.br_id=branch.br_id
and payclient.clis_id=cliser.clis_id
and payclient.br_id=id1
and payclient.paycli_date BETWEEN date1 and date2;

END$$
END$$
END$$
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectreport2incoming` (IN `id1` INT(11), IN `date1` DATE, IN `date2` DATE)  NO SQL
BEGIN
select * from branch,cliservay where 
 cliservay.br_id=branch.br_id
and cliservay.br_id=id1
and (cliservay.cliservay_date1 BETWEEN date1 and date2 
     or cliservay.cliservay_date2 BETWEEN date1 and date2 
     or cliservay.cliservay_date3 BETWEEN date1 and date2);

END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectreport2Sales` (IN `id1` INT(11), IN `date1` DATE, IN `date2` DATE)  NO SQL
BEGIN
select * from cliser , client , payclient, branch 
where 
payclient.br_id=branch.br_id 
and payclient.clis_id=cliser.clis_id 
and payclient.cli_id=client.cli_id 
and payclient.br_id=id1 
and payclient.paycli_date BETWEEN date1 and date2;
END$$
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectreport3incoming` (IN `date1` DATE, IN `date2` DATE)  NO SQL
BEGIN
select * from branch,cliservay where 
 cliservay.br_id=branch.br_id
and (cliservay.cliservay_date1 BETWEEN date1 and date2 
     or cliservay.cliservay_date2 BETWEEN date1 and date2 
     or cliservay.cliservay_date3 BETWEEN date1 and date2);

END$$
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectreport4incoming` (IN `date1` DATE, IN `date2` DATE)  NO SQL
BEGIN
select * from client,branch,payclient,cliser where 
 payclient.cli_id=client.cli_id
and payclient.br_id=branch.br_id
and payclient.clis_id=cliser.clis_id
and payclient.paycli_date BETWEEN date1 and date2;

END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectserclient` ()  NO SQL
BEGIN
SELECT * FROM ser_client ORDER BY sercli_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectsersupplier` ()  NO SQL
BEGIN
SELECT * FROM asuppser ORDER BY asuppser_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectSuppay` ()  NO SQL
BEGIN
SELECT * FROM suppayment ORDER BY suppay_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectSuppcat` ()  NO SQL
BEGIN
SELECT * FROM suppcat ORDER BY suppc_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectSupplier` ()  NO SQL
BEGIN
SELECT * FROM supplier ORDER BY supp_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `selectSuppser` ()  NO SQL
BEGIN
SELECT * FROM suppser ORDER BY supps_id DESC;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showBranch` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM branch WHERE br_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showClient` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM client WHERE cli_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showClientSurvay` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM cliservay WHERE cliservay_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showCliser` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM cliser WHERE clis_id = id ;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showPayment` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM payment WHERE pay_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showpaymentCash` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM paymentcash WHERE pays_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showPaymentClient` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM payclient WHERE paycli_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showPaymentSupplier` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM paysupplier WHERE paysupp_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showservicesClient` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM ser_client WHERE sercli_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showservicesSupplier` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM asuppser WHERE asuppser_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showSuppay` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM suppayment WHERE suppay_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showSuppcat` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM suppcat WHERE suppc_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showSupplier` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM supplier WHERE supp_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `showSuppser` (IN `id` INT(11))  NO SQL
BEGIN
SELECT * FROM suppser WHERE supps_id = id ;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateBranch` (IN `id` INT(11), IN `br_name` VARCHAR(250), IN `br_loc` LONGTEXT, IN `br_tel1` VARCHAR(50), IN `br_tel2` VARCHAR(50), IN `br_mob` VARCHAR(50), IN `br_fax` VARCHAR(50), IN `br_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE branch SET 
br_name=br_name,
br_loc=br_loc,
br_tel1=br_tel1,
br_tel2=br_tel2,
br_mob=br_mob,
br_fax=br_fax,
br_note=br_note
where br_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateClient` (IN `id` INT(11), IN `cli_name` VARCHAR(250), IN `cli_mob` VARCHAR(50), IN `cli_resp` VARCHAR(250), IN `cli_address` LONGTEXT, IN `cli_tel` VARCHAR(50), IN `cli_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE client SET 
cli_name=cli_name,
cli_mob=cli_mob,
cli_resp=cli_resp,
cli_address=cli_address,
cli_tel=cli_tel,
cli_note=cli_note
where cli_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateClientSurvay` (IN `id` INT(11), IN `cli_id` INT(11), IN `clis_id` INT(11), IN `cliservay_date1` DATE, IN `cliservay_date2` DATE, IN `cliservay_date3` DATE, IN `cliservay_cost1` DOUBLE, IN `cliservay_cost2` DOUBLE, IN `cliservay_cost3` DOUBLE, IN `emp_id` INT(11), IN `br_id` INT(11), IN `cliservay_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE cliservay SET 
cli_id=cli_id,
clis_id=clis_id,
cliservay_date1=cliservay_date1,
cliservay_date2=cliservay_date2,
cliservay_date3=cliservay_date3,
cliservay_cost1=cliservay_cost1,
cliservay_cost2=cliservay_cost2,
cliservay_cost3=cliservay_cost3,
emp_id=emp_id,
br_id=br_id,
cliservay_note=cliservay_note
where cliservay_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateCliser` (IN `id` INT(11), IN `clis_name` LONGTEXT, IN `clis_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE cliser SET 
clis_name=clis_name,
clis_note=clis_note
where clis_id = id;
END$$
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updatePayment` (IN `id` INT(11), IN `pay_name` VARCHAR(250), IN `pay_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE payment SET
pay_name = pay_name,
pay_note = pay_note
WHERE pay_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updatePaymentCash` (IN `id` INT(11), IN `emp_id` INT(11), IN `br_id` INT(11), IN `suppay_id` INT(11), IN `pays_value` DOUBLE, IN `pays_date` DATE, IN `pays_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE paymentcash SET 
emp_id=emp_id,
br_id=br_id,
suppay_id=suppay_id,
pays_value=pays_value,
pays_date=pays_date,
pays_note=pays_note
where pays_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updatePaymentClient` (IN `id` INT(11), IN `cli_id` INT(11), IN `clis_id` INT(11), IN `paycli_cost` DOUBLE, IN `paycli_tax` DOUBLE, IN `paycli_deposit` DOUBLE, IN `paycli_remine` DOUBLE, IN `paycli_date` DATE, IN `paycli_note` VARCHAR(500), IN `emp_id` INT(11), IN `br_id` INT(11))  NO SQL
BEGIN
UPDATE payclient SET 
cli_id=cli_id,
clis_id=clis_id,
paycli_cost=paycli_cost,
paycli_tax=paycli_tax,
paycli_deposit=paycli_deposit,
paycli_remine=paycli_remine,
paycli_date=paycli_date,
paycli_note=paycli_note,
emp_id=emp_id,
br_id=br_id
where paycli_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updatePaymentSupplier` (IN `id` INT(11), IN `supp_id` INT(11), IN `supps_id` INT(11), IN `paysupp_cost` DOUBLE, IN `paysupp_deposit` DOUBLE, IN `paysupp_remine` DOUBLE, IN `paysupp_date` DATE, IN `paysupp_note` VARCHAR(250), IN `emp_id` INT(11), IN `br_id` INT(11))  NO SQL
BEGIN
UPDATE paysupplier SET 
supp_id=supp_id,
supps_id=supps_id,
paysupp_cost=paysupp_cost,
paysupp_deposit=paysupp_deposit,
paysupp_remine=paysupp_remine,
paysupp_date=paysupp_date,
paysupp_note=paysupp_note,
emp_id=emp_id,
br_id=br_id
where paysupp_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateServicesClient` (IN `id2` INT(11), IN `cli_id` INT(11), IN `clis_id` INT(11), IN `sercli_cost` DOUBLE, IN `sercli_date` DATE, IN `emp_id` INT(11), IN `br_id` INT(11), IN `sercli_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE ser_client SET 
cli_id=cli_id,
clis_id=clis_id,
sercli_cost=sercli_cost,
sercli_date=sercli_date,
emp_id=emp_id,
br_id=br_id,
sercli_note=sercli_note
where sercli_id = id2;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateServicesSupplier` (IN `id` INT(11), IN `supp_id` INT(11), IN `supps_id` INT(11), IN `asuppser_value` DOUBLE, IN `asuppser_date` DATE, IN `emp_id` INT(11), IN `asuppser_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE asuppser SET 
supp_id=supp_id,
supps_id=supps_id,
asuppser_value=asuppser_value,
asuppser_date=asuppser_date,
emp_id=emp_id,
asuppser_note=asuppser_note
where asuppser_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateSppcat` (IN `id` INT(11), IN `suppc_name` VARCHAR(250), IN `suppc_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE suppcat SET 
suppc_name=suppc_name,
suppc_note=suppc_note
where suppc_id = id;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateSuppay` (IN `id` INT(11), IN `pay_id` INT(11), IN `suppay_name` VARCHAR(250), IN `suppay_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE suppayment SET
pay_id = pay_id,
suppay_name =suppay_name,
suppay_note=suppay_note
WHERE suppay_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateSupplier` (IN `id` INT(11), IN `supp_name` VARCHAR(250), IN `suppc_id` INT(11), IN `supp_resp` VARCHAR(250), IN `supp_address` LONGTEXT, IN `supp_mob` VARCHAR(25), IN `supp_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE supplier SET
supp_name = supp_name,
suppc_id = suppc_id,
supp_resp = supp_resp, 
supp_address = supp_address,
supp_mob = supp_mob,
supp_note=supp_note
WHERE supp_id = id ;
END$$

CREATE DEFINER=`energy95`@`localhost` PROCEDURE `updateSuppser` (IN `id` INT(11), IN `supps_name` VARCHAR(250), IN `supps_note` VARCHAR(250))  NO SQL
BEGIN
UPDATE suppser SET
supps_name =supps_name,
supps_note=supps_note
WHERE supps_id = id ;
END$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `asuppser`
--

CREATE TABLE `asuppser` (
  `asuppser_id` int(11) NOT NULL,
  `supp_id` int(11) NOT NULL,
  `supps_id` int(11) NOT NULL,
  `asuppser_value` double NOT NULL,
  `asuppser_date` date NOT NULL,
  `emp_id` int(11) NOT NULL,
  `asuppser_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `asuppser`
--

INSERT INTO `asuppser` (`asuppser_id`, `supp_id`, `supps_id`, `asuppser_value`, `asuppser_date`, `emp_id`, `asuppser_note`) VALUES
(5, 4, 23, 100, '2019-12-25', 10, ''),
(6, 9, 11, 0, '2019-12-20', 10, ''),
(7, 4, 23, 100, '2019-12-25', 10, ''),
(8, 8, 10, 20, '0000-00-00', 10, '');

-- --------------------------------------------------------

--
-- Table structure for table `branch`
--

CREATE TABLE `branch` (
  `br_id` int(11) NOT NULL,
  `br_name` varchar(200) NOT NULL,
  `br_loc` longtext NOT NULL,
  `br_tel1` varchar(50) NOT NULL,
  `br_tel2` varchar(50) NOT NULL,
  `br_mob` varchar(50) NOT NULL,
  `br_fax` varchar(50) NOT NULL,
  `br_note` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `branch`
--

INSERT INTO `branch` (`br_id`, `br_name`, `br_loc`, `br_tel1`, `br_tel2`, `br_mob`, `br_fax`, `br_note`) VALUES
(12, 'Alexandria ', 'Alexandria ', '', '', '', '', ''),
(13, 'Cairo', 'Cairo', '', '', '', '', ''),
(14, 'Port Said', 'Port Said ', '0663211429 ', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `client`
--

CREATE TABLE `client` (
  `cli_id` int(11) NOT NULL,
  `cli_name` varchar(250) NOT NULL,
  `cli_mob` varchar(25) NOT NULL,
  `cli_resp` varchar(250) NOT NULL,
  `cli_address` longtext NOT NULL,
  `cli_tel` varchar(25) NOT NULL,
  `cli_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `client`
--

INSERT INTO `client` (`cli_id`, `cli_name`, `cli_mob`, `cli_resp`, `cli_address`, `cli_tel`, `cli_note`) VALUES
(6, 'ucmasskills', '', 'habib / haysam - cairo', '', '', ''),
(7, 'glopal marine agencies glomar', '', '', '', '', ''),
(10, 'AL MADINA FOR TRADING EXCHANGE', '0 109 935 7266', 'Eng. Mahmoud metwally', '25 MOHAMED BEY EL SARIFI ST., NO 37 THIRD FLOOR, SIDI BISHR', '', 'Sohir '),
(11, ' Art Link Printing Company', '01227321699', 'Eng. Mahmoud metwally', 'HEAD OFFICE: EGYPT, AELXANDRIA, MOSTAFA KAMEL, 09 EBRAHIMEL-SHERIF ST., KIROSIZ ADMIN BUILDING 6TH FLOOR. WORK SHOP: EGYPT, AELXANDRIA KM 26, ALEX-CAIRO DESERT ROAD ', '', 'Guirguis Khairy'),
(12, 'TECHNOPLAST EGYPT', '01127766002', 'Eng. Mahmoud metwally', 'Monofia', '', 'mustafa el-esawy');

-- --------------------------------------------------------

--
-- Table structure for table `cliser`
--

CREATE TABLE `cliser` (
  `clis_id` int(11) NOT NULL,
  `clis_name` longtext NOT NULL,
  `clis_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `cliser`
--

INSERT INTO `cliser` (`clis_id`, `clis_name`, `clis_note`) VALUES
(1, 'ISO 14001:2015 Certification', 'Certification'),
(2, 'ISO 9001:2015 Certification', 'Certification'),
(3, 'ISO 45001:2018 Certification', 'Certification'),
(4, 'ISO 22000:2018 Certification', 'Certification'),
(5, 'ISO 21001:2018 Certification', 'Certification'),
(6, 'ISO 13485:2016 Certification', 'Certification'),
(7, 'OHSAS 18001:2007 Certification', 'Certification'),
(8, 'ISO 22000:2005 Certification', 'Certification'),
(9, 'ISO 27001:2013 Certification', 'Certification'),
(10, 'ISO 37001:2016 Certification', 'Certification'),
(11, 'ISO 22000:2005 Preparation ', ''),
(12, 'ISO 45001:2018 Preparation ', ''),
(13, 'ISO 45001:2018 Upgrade ', ''),
(14, 'ISO 22000:2018 Preparation', ''),
(15, 'ISO 22000:2018 Upgrade', ''),
(16, 'ISO 9001:2015 Preparation', ''),
(17, 'ISO 14001:2015 Preparation	', ''),
(18, 'HACCP Preparation', ''),
(19, 'HACCP Certification', ''),
(20, 'GAP ANALYSIS ', ''),
(21, 'ISO 14026:2017 Certification', ''),
(22, 'ISO 45001:2018 1st surveillance ', ''),
(23, 'ISO 22000:2018 1st surveillance ', ''),
(24, 'ISO 13485:2016 1st surveillance', ''),
(25, 'ISO 13485:2016 2nd surveillance', ''),
(26, 'ISO 22000:2018 2nd surveillance	', ''),
(27, 'ISO 45001:2018 2nd surveillance	', ''),
(28, 'HACCP 1st surveillance', ''),
(29, 'HACCP 2nd surveillance', ''),
(30, 'GMP certification	', ''),
(31, 'GMP 1st surveillance	', ''),
(32, 'GMP 2nd surveillance	', ''),
(33, 'ISO 22000:2005 1st surveillance	', ''),
(34, 'ISO 22000:2005 2nd surveillance	', ''),
(35, 'ISO 27001:2013 1st surveillance	', ''),
(36, 'ISO 27001:2013 2nd surveillance	', ''),
(37, 'ISO 14001:2015 1st surveillance	', ''),
(38, 'ISO 14001:2015 2nd surveillance	', ''),
(39, 'ISO 9001:2015 1st surveillance	', ''),
(40, 'ISO 9001:2015 2nd surveillance	', ''),
(41, 'brc v.8', ''),
(42, 'brc iop	', ''),
(43, 'CE-MARK', '');

-- --------------------------------------------------------

--
-- Table structure for table `cliservay`
--

CREATE TABLE `cliservay` (
  `cliservay_id` int(11) NOT NULL,
  `cli_id` int(11) NOT NULL,
  `clis_id` int(11) NOT NULL,
  `cliservay_date1` date NOT NULL,
  `cliservay_date2` date NOT NULL,
  `cliservay_date3` date NOT NULL,
  `cliservay_cost1` double NOT NULL,
  `cliservay_cost2` double NOT NULL,
  `cliservay_cost3` double NOT NULL,
  `emp_id` int(11) NOT NULL,
  `br_id` int(11) NOT NULL,
  `cliservay_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `cliservay`
--

INSERT INTO `cliservay` (`cliservay_id`, `cli_id`, `clis_id`, `cliservay_date1`, `cliservay_date2`, `cliservay_date3`, `cliservay_cost1`, `cliservay_cost2`, `cliservay_cost3`, `emp_id`, `br_id`, `cliservay_note`) VALUES
(5, 6, 2, '2019-12-20', '2020-12-20', '2021-12-20', 7000, 3500, 3500, 10, 14, 'المراجعه غير مذكوره بالعقد'),
(6, 6, 16, '2019-12-20', '0000-00-00', '0000-00-00', 10000, 0, 0, 10, 14, ''),
(8, 7, 2, '2018-12-12', '2019-12-15', '2020-12-15', 7000, 3500, 3500, 10, 14, ''),
(11, 10, 2, '2019-04-01', '2020-04-06', '2020-04-05', 12000, 4000, 4000, 7, 12, ''),
(12, 11, 7, '2020-03-03', '2021-03-02', '2022-03-01', 7000, 3000, 3000, 7, 12, ''),
(13, 12, 40, '2018-04-03', '2019-04-03', '2020-04-03', 6000, 6000, 6000, 7, 12, ''),
(14, 12, 7, '2018-04-03', '2019-04-03', '2020-04-03', 6000, 6000, 6000, 7, 12, '');

-- --------------------------------------------------------

--
-- Table structure for table `payclient`
--

CREATE TABLE `payclient` (
  `paycli_id` int(11) NOT NULL,
  `cli_id` int(11) NOT NULL,
  `clis_id` int(11) NOT NULL,
  `paycli_cost` double NOT NULL,
  `paycli_tax` double NOT NULL,
  `paycli_deposit` double NOT NULL,
  `paycli_remine` double NOT NULL,
  `paycli_date` date NOT NULL,
  `br_id` int(11) NOT NULL,
  `emp_id` int(11) NOT NULL,
  `paycli_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `payclient`
--

INSERT INTO `payclient` (`paycli_id`, `cli_id`, `clis_id`, `paycli_cost`, `paycli_tax`, `paycli_deposit`, `paycli_remine`, `paycli_date`, `br_id`, `emp_id`, `paycli_note`) VALUES
(3, 2, 2, 6000, 600, 6600, 0, '2019-07-07', 4, 2, ''),
(4, 4, 2, 4000, 0, 4000, 0, '2019-09-20', 14, 5, ''),
(9, 6, 2, 7000, 0, 3500, 3500, '2019-12-20', 14, 17, ''),
(11, 6, 16, 10000, 0, 5000, 5000, '2019-12-20', 14, 17, ''),
(15, 7, 39, 3500, 0, 3500, 0, '2019-12-15', 14, 7, ''),
(18, 10, 39, 4000, 0, 0, 4000, '2020-04-07', 12, 16, ''),
(19, 11, 7, 7000, 0, 0, 7000, '2020-03-03', 12, 7, ''),
(20, 12, 40, 6000, 0, 0, 6000, '2020-03-04', 12, 7, ''),
(21, 12, 7, 6000, 0, 0, 6000, '2020-03-04', 12, 7, '');

-- --------------------------------------------------------

--
-- Table structure for table `payment`
--

CREATE TABLE `payment` (
  `pay_id` int(11) NOT NULL,
  `pay_name` varchar(250) NOT NULL,
  `pay_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `payment`
--

INSERT INTO `payment` (`pay_id`, `pay_name`, `pay_note`) VALUES
(2, 'office Rent', ''),
(4, 'Electrcity', ''),
(6, 'salary', ''),
(10, 'commission ', ''),
(11, 'advertisement', ''),
(12, 'building security ', ''),
(13, 'middle east ( shipping )', ''),
(14, 'phone payment', ''),
(15, 'orange mobile payment ', ''),
(16, 'vodafone mobile payment ', ''),
(17, 'internet payment ', ''),
(18, 'office supplement', ''),
(19, 'kitchen\'s office supplement (tea,coffee,sugar ....)	', ''),
(20, 'accommodation ', ''),
(22, 'man-day ', ''),
(23, 'traveling cost', ''),
(25, 'repairing ', ''),
(26, 'Purchasing Appliances', ''),
(27, 'Advances', ''),
(28, 'mohamed yehia', ''),
(29, 'egac fees', '');

-- --------------------------------------------------------

--
-- Table structure for table `paymentcash`
--

CREATE TABLE `paymentcash` (
  `pays_id` int(11) NOT NULL,
  `emp_id` int(11) NOT NULL,
  `br_id` int(11) NOT NULL,
  `suppay_id` int(11) NOT NULL,
  `pays_value` double NOT NULL,
  `pays_date` date NOT NULL,
  `pays_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `paymentcash`
--

INSERT INTO `paymentcash` (`pays_id`, `emp_id`, `br_id`, `suppay_id`, `pays_value`, `pays_date`, `pays_note`) VALUES
(7, 17, 13, 42, 10000, '2020-01-31', ''),
(8, 7, 12, 23, 216, '2020-01-03', ''),
(9, 7, 12, 31, 35, '2020-03-01', '');

-- --------------------------------------------------------

--
-- Table structure for table `paysupplier`
--

CREATE TABLE `paysupplier` (
  `paysupp_id` int(11) NOT NULL,
  `supp_id` int(11) NOT NULL,
  `supps_id` int(11) NOT NULL,
  `paysupp_cost` double NOT NULL,
  `paysupp_deposit` double NOT NULL,
  `paysupp_remine` double NOT NULL,
  `paysupp_date` date NOT NULL,
  `emp_id` int(11) NOT NULL,
  `br_id` int(11) NOT NULL,
  `paysupp_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `paysupplier`
--

INSERT INTO `paysupplier` (`paysupp_id`, `supp_id`, `supps_id`, `paysupp_cost`, `paysupp_deposit`, `paysupp_remine`, `paysupp_date`, `emp_id`, `br_id`, `paysupp_note`) VALUES
(3, 3, 2, 3000, 3000, 0, '2019-08-01', 2, 4, ''),
(5, 9, 11, 0, 0, 0, '2019-12-20', 10, 14, ''),
(6, 4, 10, 100, 0, 0, '2019-12-25', 10, 14, ''),
(7, 9, 11, 0, 0, 0, '2019-12-20', 10, 14, ''),
(8, 9, 46, 0, 0, 0, '2019-12-12', 17, 13, ''),
(9, 8, 10, 20, 20, 0, '2019-12-12', 10, 14, ''),
(11, 6, 43, 1500, 0, 1500, '2020-03-15', 10, 14, '');

-- --------------------------------------------------------

--
-- Table structure for table `ser_client`
--

CREATE TABLE `ser_client` (
  `sercli_id` int(11) NOT NULL,
  `cli_id` int(11) NOT NULL,
  `clis_id` int(11) NOT NULL,
  `sercli_cost` double NOT NULL,
  `sercli_date` date NOT NULL,
  `emp_id` int(11) NOT NULL,
  `br_id` int(11) NOT NULL,
  `sercli_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ser_client`
--

INSERT INTO `ser_client` (`sercli_id`, `cli_id`, `clis_id`, `sercli_cost`, `sercli_date`, `emp_id`, `br_id`, `sercli_note`) VALUES
(11, 6, 2, 7000, '2019-12-20', 10, 14, ''),
(13, 6, 16, 10000, '2019-12-20', 10, 14, '9001,21001 preparation '),
(14, 7, 39, 3500, '2019-12-15', 10, 14, ''),
(17, 10, 39, 4000, '2020-03-03', 7, 12, ''),
(18, 11, 7, 7000, '2020-03-03', 7, 12, 'recertification'),
(19, 12, 40, 6000, '2020-03-04', 7, 12, ''),
(20, 12, 7, 6000, '2020-04-03', 7, 12, '');

-- --------------------------------------------------------

--
-- Table structure for table `suppayment`
--

CREATE TABLE `suppayment` (
  `suppay_id` int(11) NOT NULL,
  `pay_id` int(11) NOT NULL,
  `suppay_name` varchar(250) NOT NULL,
  `suppay_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `suppayment`
--

INSERT INTO `suppayment` (`suppay_id`, `pay_id`, `suppay_name`, `suppay_note`) VALUES
(6, 23, 'people traveling cost	', 'مصاريÙ السÙ للعاملين'),
(7, 23, 'car traveling cost	', 'تكلÙة السÙر بالسياره'),
(8, 22, 'man-day for certification ', ''),
(9, 22, 'man-day for preparation ', ''),
(14, 18, 'paper', ''),
(15, 18, 'ink filling ', ''),
(16, 18, 'printer cartage ', ''),
(17, 18, 'pens', ''),
(18, 18, 'certificates paper', ''),
(19, 18, 'Detergents', ''),
(20, 25, 'repairing', ''),
(21, 20, 'accommodation	', ''),
(22, 19, 'kitchen\'s office supplement (tea,coffee,sugar ....)	', ''),
(23, 18, 'office supplement	', ''),
(24, 17, 'internet payment	', ''),
(26, 26, 'Purchasing Appliances	', ''),
(27, 16, 'vodafone mobile payment	', ''),
(28, 15, 'orange mobile payment	', ''),
(29, 14, 'phone payment	', ''),
(30, 13, 'middle east ( shipping )	', ''),
(31, 12, 'building security	', ''),
(32, 11, 'advertisement	', ''),
(33, 10, 'salma commission	', ''),
(34, 10, 'yassmin commission	', ''),
(35, 10, ' eng. mahmoud metwaly commission	', ''),
(36, 10, 'eng. eman taher commission	', ''),
(37, 10, 'lora commission	', ''),
(38, 10, 'eng. amr moawed commission	', ''),
(39, 4, 'Electrcity	', ''),
(40, 2, 'office Rent	', ''),
(41, 27, 'Advances', ''),
(42, 6, 'mohamed habib salary', ''),
(43, 6, 'mahmoud metwaly salary', ''),
(44, 6, 'eman taher salary', ''),
(45, 6, 'amr moawed salary', ''),
(46, 6, 'yassmin salary', ''),
(47, 6, 'lora salary', ''),
(48, 6, 'salma salary', ''),
(49, 6, 'mahmoud salem salary', ''),
(51, 10, 'mahmoud salem commission', ''),
(52, 28, 'mohamed yehia', ''),
(53, 28, 'madam eman', ''),
(54, 28, 'installment', ''),
(55, 29, 'fawzy fahim', ''),
(56, 29, 'invoices', '');

-- --------------------------------------------------------

--
-- Table structure for table `suppcat`
--

CREATE TABLE `suppcat` (
  `suppc_id` int(11) NOT NULL,
  `suppc_name` varchar(250) NOT NULL,
  `suppc_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `suppcat`
--

INSERT INTO `suppcat` (`suppc_id`, `suppc_name`, `suppc_note`) VALUES
(3, 'Certification', ''),
(4, 'Calibration', ''),
(5, 'Preparation', '');

-- --------------------------------------------------------

--
-- Table structure for table `supplier`
--

CREATE TABLE `supplier` (
  `supp_id` int(11) NOT NULL,
  `supp_name` varchar(250) NOT NULL,
  `suppc_id` int(11) NOT NULL,
  `supp_resp` varchar(250) NOT NULL,
  `supp_address` longtext NOT NULL,
  `supp_mob` varchar(25) NOT NULL,
  `supp_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `supplier`
--

INSERT INTO `supplier` (`supp_id`, `supp_name`, `suppc_id`, `supp_resp`, `supp_address`, `supp_mob`, `supp_note`) VALUES
(4, 'Intercert (IAS)', 3, '', '', '', ''),
(5, 'Unicert (DAKKS)', 3, '', '', '', ''),
(6, 'OSS (EGAC)', 3, '', '', '', ''),
(8, 'OSS ( AQAI )', 3, '', '', '', ''),
(9, 'MILLENNIUM', 5, '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `suppser`
--

CREATE TABLE `suppser` (
  `supps_id` int(11) NOT NULL,
  `supps_name` varchar(250) NOT NULL,
  `supps_note` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `suppser`
--

INSERT INTO `suppser` (`supps_id`, `supps_name`, `supps_note`) VALUES
(5, 'GAP ANALYSIS	', ''),
(6, 'HACCP Certification	', ''),
(7, 'HACCP Preparation	', ''),
(8, 'ISO 14001:2015 Preparation	', ''),
(9, 'ISO 14001:2015 Certification	', ''),
(10, 'ISO 9001:2015 Certification	', ''),
(11, 'ISO 9001:2015 Preparation	', ''),
(12, 'ISO 22000:2018 Preparation	', ''),
(13, 'ISO 45001:2018 Upgrade	', ''),
(14, 'ISO 22000:2018 Certification	', ''),
(15, 'ISO 22000:2018 Upgrade', ''),
(16, 'ISO 22000:2005 Preparation	', ''),
(17, 'ISO 22000:2005 Certification	', ''),
(18, 'ISO 45001:2018 Preparation	', ''),
(19, 'ISO 45001:2018 Certification', ''),
(20, 'ISO 37001:2016 Certification	', ''),
(21, 'ISO 27001:2013 Certification	', ''),
(22, 'ISO 13485:2016 Certification	', ''),
(23, 'ISO 21001:2018 Certification	', ''),
(24, 'ISO 14026:2017 Certification', ''),
(25, 'ISO 45001:2018 1st surveillance ', ''),
(26, 'ISO 22000:2018 1st surveillance	', ''),
(27, 'ISO 13485:2016 2nd surveillance	', ''),
(28, 'ISO 13485:2016 1st surveillance	', ''),
(29, 'ISO 22000:2018 2nd surveillance	', ''),
(30, 'ISO 45001:2018 2nd surveillance	', ''),
(31, 'HACCP 1st surveillance', ''),
(32, 'HACCP 2nd surveillance', ''),
(33, 'GMP certification', ''),
(34, 'GMP 1st surveillance', ''),
(35, 'GMP 2nd surveillance	', ''),
(36, 'ISO 22000:2005 1st surveillance	', ''),
(37, 'ISO 22000:2005 2nd surveillance	', ''),
(38, 'ISO 27001:2013 1st surveillance', ''),
(39, 'ISO 27001:2013 2nd surveillance	', ''),
(40, 'ISO 14001:2015 1st surveillance', ''),
(41, 'ISO 14001:2015 2nd surveillance	', ''),
(42, 'ISO 9001:2015 1st surveillance	', ''),
(43, 'ISO 9001:2015 2nd surveillance	', ''),
(44, 'brc iop', ''),
(45, 'brc v.8', ''),
(46, 'CE-MARK', '');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `asuppser`
--
ALTER TABLE `asuppser`
  ADD PRIMARY KEY (`asuppser_id`);

--
-- Indexes for table `branch`
--
ALTER TABLE `branch`
  ADD PRIMARY KEY (`br_id`);

--
-- Indexes for table `client`
--
ALTER TABLE `client`
  ADD PRIMARY KEY (`cli_id`);

--
-- Indexes for table `cliser`
--
ALTER TABLE `cliser`
  ADD PRIMARY KEY (`clis_id`);

--
-- Indexes for table `cliservay`
--
ALTER TABLE `cliservay`
  ADD PRIMARY KEY (`cliservay_id`);

--
-- Indexes for table `payclient`
--
ALTER TABLE `payclient`
  ADD PRIMARY KEY (`paycli_id`);

--
-- Indexes for table `payment`
--
ALTER TABLE `payment`
  ADD PRIMARY KEY (`pay_id`);

--
-- Indexes for table `paymentcash`
--
ALTER TABLE `paymentcash`
  ADD PRIMARY KEY (`pays_id`);

--
-- Indexes for table `paysupplier`
--
ALTER TABLE `paysupplier`
  ADD PRIMARY KEY (`paysupp_id`);

--
-- Indexes for table `ser_client`
--
ALTER TABLE `ser_client`
  ADD PRIMARY KEY (`sercli_id`);

--
-- Indexes for table `suppayment`
--
ALTER TABLE `suppayment`
  ADD PRIMARY KEY (`suppay_id`);

--
-- Indexes for table `suppcat`
--
ALTER TABLE `suppcat`
  ADD PRIMARY KEY (`suppc_id`);

--
-- Indexes for table `supplier`
--
ALTER TABLE `supplier`
  ADD PRIMARY KEY (`supp_id`);

--
-- Indexes for table `suppser`
--
ALTER TABLE `suppser`
  ADD PRIMARY KEY (`supps_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `asuppser`
--
ALTER TABLE `asuppser`
  MODIFY `asuppser_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `branch`
--
ALTER TABLE `branch`
  MODIFY `br_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `client`
--
ALTER TABLE `client`
  MODIFY `cli_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `cliser`
--
ALTER TABLE `cliser`
  MODIFY `clis_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;

--
-- AUTO_INCREMENT for table `cliservay`
--
ALTER TABLE `cliservay`
  MODIFY `cliservay_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `payclient`
--
ALTER TABLE `payclient`
  MODIFY `paycli_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
  MODIFY `pay_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT for table `paymentcash`
--
ALTER TABLE `paymentcash`
  MODIFY `pays_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `paysupplier`
--
ALTER TABLE `paysupplier`
  MODIFY `paysupp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `ser_client`
--
ALTER TABLE `ser_client`
  MODIFY `sercli_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `suppayment`
--
ALTER TABLE `suppayment`
  MODIFY `suppay_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=57;

--
-- AUTO_INCREMENT for table `suppcat`
--
ALTER TABLE `suppcat`
  MODIFY `suppc_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `supplier`
--
ALTER TABLE `supplier`
  MODIFY `supp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `suppser`
--
ALTER TABLE `suppser`
  MODIFY `supps_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
COMMIT;

