SET DELETED ON
SET DATE GERMAN
SET CENTURY on

OPEN DATABASE d:\sasa\baze\str

USE d:\sasa\kis\zagrac ALIAS zagrac3 IN 0
**USE zagrac ALIAS zagrac3 IN 0
USE vipkup ALIAS vipkup IN 0

SELECT zagrac3
GOTO top
DO WHILE !EOF()
IF MONTH(datum)<>10
	SKIP
	LOOP
ENDIF
IF EMPTY(klubkart)
	SKIP
	LOOP
ENDIF
a1=zagrac3.klubkart
a2=zagrac3.pvred
SELECT vipkup
SET ORDER TO tag barkod
GOTO top
SEEK a1
IF FOUND()
	replace vipkup.kupio WITH vipkup.kupio+a2
ENDIF
SELECT zagrac3
SKIP
ENDDO
			
