*:*********************************************************************
PROCEDURE logy
IF FILE (m.hom_path + "food_log.dbf")
	SELECT DISTINCT fl.ID, fd.id_zkratka FROM (m.hom_path + "food_log") fl, (m.hom_path + "food_dat") fd;
		WHERE fd.ID == fl.ID ORDER BY 1 INTO CURSOR pgm
	DEFINE POPUP pgm FROM 2,5 TO MIN( 3+RECC(), SROW()-3),36 PROMPT FIELD ID + "³" + id_zkratka ;
		TITLE " "+jaz("prg_stredisko_ttl_popup")+" " MESSAGE jaz("prg_vyber_str_enter_esc_mssg")
	ON SELECT POPUP pgm DO log_prohl
	ACTIVATE POPUP pgm
	RELEASE POPUP pgm
	DO clos_data
ENDIF

*:*********************************************************************
PROCEDURE log_prohl
ID = LEFT(PROMPT(),2)
SELECT * FROM (m.hom_path + "food_log") WHERE ID = m.id INTO CURSOR chyby
INDEX ON LEFT(cas, 8) TO m.pri_path + "casuniq" UNIQ
GO BOTT
SKIP -7
DEFINE POPUP odkdy FROM 4,33 PROMPT FIELD " " + LEFT(cas, 8) TITLE " "+jaz("prg_odkdy_ttl_popup")+" "
ON SELECT POPUP odkdy DEACTI POPUP
ACTIVATE POPUP odkdy
odkdy = ALLT(PROMPT())
RELEASE POPUP odkdy
SET ORDER TO
SET FILT TO cas >= m.odkdy
DO pr_report WITH "food_log"
USE
SELE pgm

