SET DATE GERMAN
SET CENTURY ON

SET DEFAULT TO \\Gozd1\e\2022\BAZE
USE CRTA ALIAS CRTA IN 0
USE CRTAPS ALIAS CRTAPS IN 0
SELECT CRTAPS
ZAP
SELECT CRTA
GOTO TOP
DO WHILE !EOF()
SCATTER MEMVAR
SELECT CRTAPS
SET ORDER TO TAG KUPDOB
GOTO TOP
SEEK M.KUPDOB
IF !FOUND()
	APPEND BLANK
	replace crtaps.kupdob WITH m.kupdob
ENDIF
	replace crtaps.datum 	WITH CTOD("01.01.2022")
	replace crtaps.duguje 	WITH m.duguje+crtaps.duguje
	replace crtaps.potrazuje WITH m.potrazuje+crtaps.potrazuje
	replace crtaps.brdok WITH "PS"
SELECT crta
SKIP
ENDDO
RETURN
		
