SET DATE GERMAN
SET century on
SET DELETED on
SET DEFAULT TO d:\2020\baze
USE zagrac ALIAS zagrac IN 0
USE virman ALIAS virman IN 0
SELECT zagrac
SET ORDER TO DATUM   && DATUM
GOTO top
SEEK CTOD("08.08.2020")
DO WHILE !EOF()
IF zagrac.datum<CTOD("08.08.2020") 
	SKIP
ENDIF
IF zagrac.datum>CTOD("10.08.2020") 
	EXIT
ENDIF
IF zagrac.vrstazad<>"P"
	SKIP
	LOOP
endif	
a1=zagrac.brdok
a2=zagrac.datum
a3=zagrac.vreme
a4=zagrac.pvred
a5=zagrac.kupdob
a6=zagrac.radnik
SELECT virman
SET ORDER TO BRDOK   && BRDOK
GOTO top
SEEK a1
IF !FOUND()
APPEND BLANK
	replace virman.brdok WITH a1
	replace virman.datum WITH a2
	replace virman.vreme WITH a3
	replace virman.duguje WITH a4
	replace virman.kupdob WITH a5
	replace virman.radnik WITH a6
endif
SELECT zagrac
SKIP
ENDDO
RETURN
