
**   DEFINE POPUP vyroba MARGIN RELATIVE SHADOW COLOR SCHEME 4  - tohle je definovano ve spolecnem ceskoslovenskem menu_def.prg   **

DO nastav_nazvy_chodu

DO publikuj WITH "datastore_add", "neniii"
datastore_add = get_ini("datastores", m.gcpgm_id, "neniii", m.gchom_path + "datastores_adresses.ini")
IF m.datastore_add = "neniii"
    datastore_add = get_ini("datastores", "*"   , "neniii", m.gchom_path + "datastores_adresses.ini")
ENDIF 

is_stravovani = .T.
jmeno_programu_vyroby = ""
DO CASE 

CASE ATC("D_THERESIA", m.wi_zakaz) > 0
    jmeno_programu_vyroby = "Velim"
    DO def_menu_vyroba IN vyroba_velim

CASE ATC("D_SNEM", m.wi_zakaz) > 0                    &&CASE "D_SNEM" $ UPPE(m.gchom_path) .or. "FOOD_SNEM" $ UPPE(m.sqldatabaza)
    jmeno_programu_vyroby = "parlament"
    DO def_menu_vyroba IN vyroba_parlament

CASE "D_DTS" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "dts"
    DO def_menu_vyroba IN vyroba_dts

CASE "D_PLAZA" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "dts"
    DO def_menu_vyroba IN vyroba_dts

CASE "BUDVAR" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "budvar"
    DEFINE       BAR 2 OF vyroba PROMPT jaz("m_prov_vyr_jidelak") MESSAGE jaz("m_prov_vyr_davka_mssg")
    ON SELECTION BAR 2 OF vyroba DO FORM jidelak_budvar

CASE "D_HAJEK" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "hajek"
    DO def_menu_vyroba_hajek

CASE "D_AQUAPARK" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "aquapark"
    DO def_menu_vyroba_aquapark

CASE "D_LVI_DVUR" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "lvi dvur"
    DO def_menu_vyroba IN vyroba_lvi_dvur

CASE "D_OF_FAURECIA_BEZ" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "Bezdecin"
    DO def_menu_vyroba IN vyroba_bezdecin

CASE "D_OF_FAURECIA_MB" $ UPPE(m.gchom_path)
    jmeno_programu_vyroby = "sas"
    DO def_menu_vyroba IN vyroba_sas

CASE "D_OF_NYR" $ UPPE(m.gchom_path)
    DO def_menu_vyroba IN vyroba_nyrany

CASE ATC("D_ELFETEX", m.gchom_path + m.sqldatabaza) > 0
    jmeno_programu_vyroby = "elfetex"
    DO def_menu_vyroba IN vyroba_elfetex

CASE m.datastore_add # "neniii"
    DO def_menu_vyroba_default

OTHERWISE 
    is_stravovani = .F.

ENDCASE 

DEFINE BAR 90 OF vyroba PROMPT "\-"  
DEFINE BAR 95 OF vyroba PROMPT "\" + SUBSTR(m.datastore_add, AT("@", m.datastore_add)+1)

txt_prompt = m.jmeno_programu_vyroby
TRY 
    txt_prompt = m.txt_prompt + ":" + m.seznam_kantyn_txt
CATCH
ENDTRY  
DEFINE BAR 96 OF vyroba PROMPT "\" + m.txt_prompt

DEFINE BAR 99 OF vyroba PROMPT "\-"


*:*****************************************************************************
PROCEDURE nastav_nazvy_chodu
publikuj ("nazev_S", "Snídaně")
publikuj ("nazev_O", "Hlavní jídla")
publikuj ("nazev_P", "Příloha")
publikuj ("nazev_V", "Večeře")

publikuj ("course_S", "lunch_pre")
publikuj ("course_O", "lunch_main")
publikuj ("course_P", "lunch_side")
publikuj ("course_V", "dinner")


*:*****************************************************************************
PROCEDURE def_menu_vyroba_default

IF FILE(m.gchom_path + "jidelak.dbf")
    DEFINE       BAR 11 OF vyroba PROMPT "Jídelní lístek"
    ON SELECTION BAR 11 OF vyroba DO FORM jidelak_default
ENDIF 

DEFINE       BAR 22 OF vyroba PROMPT "Sestavy" 
DEFINE       BAR 44 OF vyroba PROMPT "Strávníci"
DEFINE       BAR 55 OF vyroba PROMPT "Nulování kreditu"


ON SELECTION BAR 22 OF vyroba DO FORM stravovani_sestavy
ON SELECTION BAR 44 OF vyroba DO FORM stravnici
ON SELECTION BAR 55 OF vyroba DO FORM nulovani_limitu


*:*****************************************************************************
PROCEDURE def_menu_vyroba_hajek
DEFINE       BAR 22 OF vyroba PROMPT "Sestavy" 
DEFINE       BAR 44 OF vyroba PROMPT "Strávníci"

ON SELECTION BAR 22 OF vyroba DO FORM stravovani_sestavy
ON SELECTION BAR 44 OF vyroba DO FORM stravnici


*:*****************************************************************************
PROCEDURE def_menu_vyroba_aquapark
DEFINE       BAR 22 OF vyroba PROMPT "Sestavy" 
ON SELECTION BAR 22 OF vyroba DO FORM stravovani_sestavy
publikuj("netahat_z_datastore", "orders")

