USE d:\2009\pod\robno\promet ALIAS promet IN 0
USE d:\2009\robno\baze\kalkstav ALIAS kalkstav IN 0
SELECT kalkstav
*ZAP

SELECT promet
GOTO top
DO WHILE !EOF()
IF ALLTRIM(preduzece)<>"1"
	SKIP
	LOOP
ENDIF
*IF ALLTRIM(magacin)<>"001"
*	SKIP
*	LOOP
*ENDIF
IF ALLTRIM(ps)<>"1"
	SKIP
	LOOP
ENDIF
msif=promet.sifrob
mkol=promet.ulaz
mnce=promet.cena
mmag=promet.magacin
SELECT kalkstav
APPEND BLANK
replace kalkstav.brdok 		WITH "PS"
replace kalkstav.magacin 	with mmag
replace kalkstav.sifrob		WITH msif
replace kalkstav.ncena		WITH mnce
replace kalkstav.kolicina	WITH mkol
replace kalkstav.pcena		WITH mnce
replace kalkstav.datum		WITH CTOD("01.01.2009")
replace kalkstav.stopa 		WITH 18
replace kalkstav.tarifa		WITH "18"
SELECT promet
SKIP
ENDDO

