OPEN DATABASE f:\fin2009\baze\fin
USE f:\fin2009\baze\konplan ALIAS konplan IN 0

OPEN DATABASE c:\2009\robno\baze\belcar 
USE c:\2009\robno\baze\kupdob ALIAS kupdob IN 0

USE c:\c\proba ALIAS proba IN 0

SELECT konplan
GOTO top
DO WHILE !EOF()
IF SUBSTR(konto,1,3)<>"150" .and. SUBSTR(konto,1,3)<>"202" .and. ;
	SUBSTR(konto,1,3)<>"203" .and. SUBSTR(konto,1,3)<>"209" .and. ;
	SUBSTR(konto,1,3)<>"433" .and. SUBSTR(konto,1,3)<>"434" 
	
	SKIP
	LOOP
ENDIF
a1=SUBSTR(konplan.analitika,1,6)
a2=konplan.naziv
SELECT kupdob
SET ORDER TO tag kupdob
GOTO top
SEEK a1
IF !FOUND()
	SELECT proba
	APPEND BLANK
	replace sifra WITH a1
	replace naziv WITH a2
ENDIF
SELECT konplan
SKIP
ENDDO
RETURN
	
	

