USE C:\APOTEKA\BAZE\KALKSTAV ALIAS KALKSTAV IN 0
USE C:\APOTEKA\A\PROBA ALIAS PROBA IN 0
SET CENTURY ON
SET DATE GERMAN
SELECT PROBA
GOTO TOP
DO WHILE !EOF()
A=SIFROB
B=KOLICINA
C=NABCEN
D=PROCEN
E=TARIFA
SELECT KALKSTAV
APPEND BLANK
REPLACE SIFROB WITH A
REPLACE KOLICINA WITH B
REPLACE NCENA WITH C
REPLACE DOBCEN WITH C
REPLACE PCENA WITH D
REPLACE TARIFA WITH E
REPLACE DATUM WITH CTOD("09.06.2004")
IF E="11"
	REPLACE STOPA WITH 20
ELSE
	REPLACE STOPA WITH 0
ENDIF
SELECT PROBA
SKIP
ENDDO
RETURN
		