. */ include_once __DIR__.'/../../core.php'; use Modules\DDT\Tipo; use Models\Module; $module = Module::find($id_module); if ($module->name == 'Ddt di vendita') { $dir = 'entrata'; $id_tipoddt = (new Tipo())->getByName('Ddt in uscita')->id_record; $tipo_anagrafica = tr('Cliente'); $label = tr('Destinatario'); } else { $dir = 'uscita'; $id_tipoddt = (new Tipo())->getByName('Ddt in entrata')->id_record; $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|getByName('Anagrafiche')->id_record; ?>|tipoanagrafica=" ]}
{[ "type": "select", "label": "", "name": "idtipoddt", "required": 1, "values": "query=SELECT `dt_tipiddt`.`id`, `dt_tipiddt_lang`.`name` 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`= ) WHERE `dir`=''", "value": "" ]}
{[ "type": "select", "label": "", "name": "idcausalet", "required": 1, "value": "", "ajax-source": "causali", "icon-after": "add|getByName('Causali')->id_record; ?>|||" ]}
{[ "type": "select", "label": "", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": $id_module, 'is_sezionale' => 1]); ?>, "value": "" ]}