*       *       *       *       *       *       *       *       *       *       *       *       *       *       *       *       *       *       
*
*  2021-06-09 - sloupec SHOW_ON_WEB posilam natvrdo TRUE (pouzilo se jen v parlamentu)
*             - adresu datastoru bere z m.datastore_add
*             - name a descript se posilaji z ktexty.meno1 a meno2, odtud si je bere uz editacni formular jidelaku
*
*       *       *       *       *       *     #> ver. 2022-11-11 <#     *       *       *       *       *       *       *       *       *      


USE (m.gchom_path + "jidelak") IN 0 noupdate

IF FSIZE("name") # 0 .and. FSIZE("descript") # 0
    SELECT LEFT(TTOC(datum, 3), 10) as date, canteen, s_o_v2course(s_o_v) as course, cislojidla as number, cislopril, c_karty, m.course_P + " " as add_course, ;
           name, descript ;
           WHERE datum >= DATE() AND BETWEEN(cislojidla, 1, 19) FROM jidelak INTO CURSOR jidelak_local READWRITE 
ELSE 
    SELECT LEFT(TTOC(datum, 3), 10) as date, canteen, s_o_v2course(s_o_v) as course, cislojidla as number, cislopril, c_karty, m.course_P + " " as add_course, ;
           PADR(nazev, 250) as name, SPACE(250) as descript ;
           WHERE datum >= DATE() AND BETWEEN(cislojidla, 1, 19) FROM jidelak INTO CURSOR jidelak_local READWRITE 
ENDIF 

jidelak_export_odeslani()

