--Vkladam nastaveni ini
INSERT INTO INI(ID,popis,typ) VALUES(1,'Faktura','FAK');
INSERT INTO INI(ID,popis,typ) VALUES(2,'Zalohova faktura','ZFA');
INSERT INTO INI(ID,popis,typ) VALUES(3,'Paragon','PAR');
INSERT INTO INI(ID,popis,typ) VALUES(4,'Bankovni vypis','VYP');
INSERT INTO INI(ID,popis,vp) VALUES(5,'Vydej castky','V');
INSERT INTO INI(ID,popis,vp) VALUES(6,'Prijem castky','P');
INSERT INTO INI(ID,popis,platba) VALUES(7,'Hotove','H');
INSERT INTO INI(ID,popis,platba) VALUES(8,'Prevodem na BU','U');
INSERT INTO INI(ID,popis,platba) VALUES(9,'Vymena produktu','V');
INSERT INTO INI(ID,popis,dph) VALUES(10,'Bez sazby DPH',0);
INSERT INTO INI(ID,popis,dph) VALUES(11,'Nizsi sazba DPH',5);
INSERT INTO INI(ID,popis,dph) VALUES(12,'Vyssi sazba DPH',22);

--Vkladam kody
INSERT INTO KOD(ID,TEXT) VALUES(1,'Nakup DKP');
INSERT INTO KOD(ID,TEXT) VALUES(2,'Uroky');
INSERT INTO KOD(ID,TEXT) VALUES(3,'Vedeni uctu sporitelne');
INSERT INTO KOD(ID,TEXT) VALUES(4,'Nakup rezie');
INSERT INTO KOD(ID,TEXT) VALUES(5,'Prodej sluzby');
INSERT INTO KOD(ID,TEXT) VALUES(6,'Prodej zbozi');
INSERT INTO KOD(ID,TEXT) VALUES(7,'Nakup materialu');
INSERT INTO KOD(ID,TEXT) VALUES(8,'Nakup sluzby');
INSERT INTO KOD(ID,TEXT) VALUES(9,'Nakup zbozi');

--Vkladam jednotky
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(1,'ks');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(2,'m');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(3,'mm');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(4,'l');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(5,'ml');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(6,'kg');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(7,'g');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(8,'m2');
INSERT INTO JEDN(IDJ,JMENOJ) VALUES(9,'mm2');

--Vkladam 1 zaznam do deniku a DKP a POLDKP****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(1,TO_DATE('01.01.2000','dd.mm.yyyy'),'PAR',1,100,'V','H',0,22,1);
INSERT INTO DKP(RADEKDKP,NAZEVDKP,FKR_DENIK) VALUES(1,'Kancelarske potreby',1);
INSERT INTO POLDKP(ID,Jmeno,PocetJ,castka,dph,zustatek,zmena,FK_DKP,FK_JEDN) VALUES(1,'Sesit A4 ctvereckovany',5,8,22,5,TO_DATE('01.01.2000','dd.mm.yyyy'),1,1);
INSERT INTO POLDKP(ID,Jmeno,PocetJ,castka,dph,zustatek,zmena,FK_DKP,FK_JEDN) VALUES(2,'Sesit A4 bily',5,8,22,5,TO_DATE('01.01.2000','dd.mm.yyyy'),1,1);
INSERT INTO POLDKP(ID,Jmeno,PocetJ,castka,dph,zustatek,zmena,FK_DKP,FK_JEDN) VALUES(3,'Tuzky',4,5,22,5,TO_DATE('01.01.2000','dd.mm.yyyy'),1,1);
Update DENIK set FK_DKP=1 where RadekD=1;

--Vkladam 2,3 zaznamy do deniku****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(2,TO_DATE('01.01.2000','dd.mm.yyyy'),'FAK',1,1000,'P','H',0,5,5);
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(3,TO_DATE('05.01.2000','dd.mm.yyyy'),'FAK',2,2000,'P','U',2,22,6);

--Vkladam 4 zaznam do deniku a REZIE a POLREZIE****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(4,TO_DATE('20.01.2000','dd.mm.yyyy'),'PAR',2,200,'V','H',0,5,4);
INSERT INTO REZIE(RADEKR,NAZEVR,FKR_DENIK) VALUES(1,'GSM telefon',4);
INSERT INTO POLREZIE(ID,JMENO,castka,DPH,FK_REZIE) VALUES(1,'GSM telefon Leden',200,5,1);
Update DENIK set FK_REZIE=1 where RadekD=4;

--Vkladam 5,6 zaznamy do deniku****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(5,TO_DATE('31.01.2000','dd.mm.yyyy'),'VYP',1,1.62,'P','U',0,0,2);
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(6,TO_DATE('31.01.2000','dd.mm.yyyy'),'VYP',1,180,'V','U',0,0,3);

--Vkladam 7 zaznam do deniku a DKP a POLDKP****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(7,TO_DATE('12.02.2000','dd.mm.yyyy'),'PAR',3,300,'V','H',0,22,1);
INSERT INTO DKP(RADEKDKP,NAZEVDKP,FKR_DENIK) VALUES(2,'Videokazety',7);
INSERT INTO POLDKP(ID,Jmeno,PocetJ,castka,dph,zustatek,zmena,FK_DKP,FK_JEDN) VALUES(4,'Basf 240',5,60,22,5,TO_DATE('12.02.2000','dd.mm.yyyy'),2,1);
Update DENIK set FK_DKP=2 where RadekD=7;

--Vkladam 8 zaznam do deniku a REZIE a POLREZIE****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(8,TO_DATE('20.02.2000','dd.mm.yyyy'),'PAR',4,200,'V','H',0,5,4);
INSERT INTO REZIE(RADEKR,NAZEVR,FKR_DENIK) VALUES(2,'GSM telefon',8);
INSERT INTO POLREZIE(ID,JMENO,castka,DPH,FK_REZIE) VALUES(2,'GSM telefon unor',200,5,2);
Update DENIK set FK_REZIE=2 where RadekD=8;

--Vkladam 9 zaznamy do deniku****************************************************************************************************
INSERT INTO DENIK(RADEKD,Datum,Typ,doklad,castka,vp,platba,poplatek,dph,FK_KOD) VALUES(9,TO_DATE('25.02.2000','dd.mm.yyyy'),'FAK',3,3000,'P','H',0,22,5);

