USE d:\struja\zajednicka\kupdob ALIAS kupdob IN 0
USE d:\struja\baze\brotp ALIAS brotp IN 0

SELECT kupdob
GOTO top
DO WHILE !EOF()
IF EMPTY(kupdob.otpremnica)
	SKIP
	LOOP
ENDIF
a1=kupdob.kupdob
a2=kupdob.otpremnica
SELECT brotp
SET ORDER TO tag kupdob
GOTO top
SEEK a1
IF !FOUND()
	APPEND BLANK
	replace brotp.kupdob WITH a1
	replace brotp.otpremnica WITH a2
ENDIF
SELECT kupdob
SKIP
ENDDO
RETURN
	