. */ include_once __DIR__.'/../../core.php'; $module = Modules::get($id_module); if ($module['name'] == 'Ddt di vendita') { $dir = 'entrata'; $id_tipoddt = $dbo->fetchOne("SELECT id FROM dt_tipiddt WHERE descrizione='Ddt in uscita'")['id']; $tipo_anagrafica = tr('Cliente'); $label = tr('Destinatario'); } else { $dir = 'uscita'; $id_tipoddt = $dbo->fetchOne("SELECT id FROM dt_tipiddt WHERE descrizione='Ddt in entrata'")['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') : get(''); ?>
{[ "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||tipoanagrafica=" ]}
{[ "type": "select", "label": "", "name": "idtipoddt", "required": 1, "values": "query=SELECT id, descrizione FROM dt_tipiddt WHERE dir=''", "value": "" ]}
{[ "type": "select", "label": "", "name": "idcausalet", "required": 1, "value": "", "ajax-source": "causali", "icon-after": "add||||" ]}
{[ "type": "select", "label": "", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": $id_module, 'is_sezionale' => 1]); ?>, "value": "" ]}