. */ include_once __DIR__.'/../../core.php'; use Models\Module; use Modules\Preventivi\Stato; $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : ''; $stati = get('pianificabile') ? 'SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`name` as descrizione FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi`.`id` = `co_statipreventivi_lang`.`id_record` AND `co_statipreventivi_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `is_pianificabile`=1' : 'SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`name` as descrizione FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi`.`id` = `co_statipreventivi_lang`.`id_record` AND `co_statipreventivi_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).')'; $stato = (new Stato())->getByField('name', 'Bozza', Models\Locale::getPredefined()->id); ?>
{[ "type": "text", "label": "", "name": "nome", "required": 1 ]}
{[ "type": "select", "label": "", "name": "idanagrafica", "required": 1, "value": "", "ajax-source": "clienti", "icon-after": "add|getByField('name', 'Anagrafiche', Models\Locale::getPredefined()->id); ?>|tipoanagrafica=Cliente&readonly_tipo=1", "readonly": "" ]}
{[ "type": "select", "label": "", "name": "idsede", "ajax-source": "sedi", "select-options": $id_anagrafica]); ?>, "placeholder": "Sede legale" ]}
{[ "type": "date", "label": "", "name": "data_bozza", "value": "", "required": 1 ]}
{[ "type": "select", "label": "", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": $id_module, 'is_sezionale' => 1]); ?>, "value": "" ]}
{[ "type": "select", "label": "", "name": "idtipointervento", "required": 1, "ajax-source": "tipiintervento" ]}
{[ "type": "select", "label": "", "name": "idstato", "required": 1, "value": "", "values": "query=" ]}