. */ include_once __DIR__.'/../../core.php'; use Models\Module; use Modules\DDT\Tipo; $module = Module::find($id_module); if ($module->name == 'Ddt in uscita') { $dir = 'entrata'; $id_tipoddt = Tipo::where('name', 'Ddt in uscita')->first()->id; $tipo_anagrafica = tr('Cliente'); $label = tr('Destinatario'); } else { $dir = 'uscita'; $id_tipoddt = Tipo::where('name', 'Ddt in entrata')->first()->id; $tipo_anagrafica = tr('Fornitore'); $label = tr('Mittente'); } $id_causalet = $dbo->fetchOne('SELECT `id` FROM `dt_causalet` WHERE `predefined`=1')['id']; $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : ''; ?>
{[ "type": "date", "label": "", "name": "data", "required": 1, "value": "-now-" ]}
{[ "type": "select", "label": "", "name": "idanagrafica", "id": "idanagrafica_add", "required": 1, "value": "", "ajax-source": "clienti_fornitori", "icon-after": "add|first()->id; ?>|tipoanagrafica=" ]}
{[ "type": "select", "label": "", "name": "idtipoddt", "required": 1, "values": "query=SELECT `dt_tipiddt`.`id`, `dt_tipiddt_lang`.`title` as descrizione FROM `dt_tipiddt` LEFT JOIN `dt_tipiddt_lang` ON (`dt_tipiddt`.`id`=`dt_tipiddt_lang`.`id_record` AND `dt_tipiddt_lang`.`id_lang`= id); ?>) WHERE `dir`=''", "value": "" ]}
{[ "type": "select", "label": "", "name": "idcausalet", "required": 1, "value": "", "ajax-source": "causali", "icon-after": "add|first()->id; ?>|||" ]}
{[ "type": "select", "label": "", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": $id_module, 'is_sezionale' => 1]); ?>, "value": "" ]}