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