{[ "type": "select", "label": "", "name": "idanagrafica", "required": 1, "values": "query=SELECT an_anagrafiche.idanagrafica AS id, ragione_sociale AS descrizione FROM an_anagrafiche INNER JOIN (an_tipianagrafiche_anagrafiche INNER JOIN an_tipianagrafiche ON an_tipianagrafiche_anagrafiche.idtipoanagrafica=an_tipianagrafiche.idtipoanagrafica) ON an_anagrafiche.idanagrafica=an_tipianagrafiche_anagrafiche.idanagrafica WHERE descrizione='Cliente' AND deleted=0 ORDER BY ragione_sociale", "value": "$idanagrafica$", "ajax-source": "clienti", "extra": "" ]}
{[ "type": "select", "label": "", "name": "idsede", "values": "query=SELECT 0 AS id, 'Sede legale' AS descrizione UNION SELECT id, CONCAT_WS( ' - ', nomesede, citta ) AS descrizione FROM an_sedi WHERE idanagrafica='$idanagrafica$'", "value": "$idsede$", "ajax-source": "sedi", "extra": "" ]}
{[ "type": "select", "label": "", "name": "idclientefinale", "value": "$idclientefinale$", "ajax-source": "clienti", "extra": "" ]}
{[ "type": "select", "label": "", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "extra": "" ]}
{[ "type": "select", "label": "", "name": "idpreventivo", "value": "$idpreventivo$", "ajax-source": "preventivi", "extra": "" ]}
fetchArray('SELECT id, idcontratto FROM co_righe_contratti WHERE idintervento='.prepare($id_record)); if (count($rs) == 1) { $idcontratto = $rs[0]['idcontratto']; $idcontratto_riga = $rs[0]['id']; } else { $idcontratto = ''; $idcontratto_riga = ''; } if (($idcontratto != '')) { echo ' '.Modules::link('Contratti', $idcontratto, null, null, 'class="pull-right"'); } ?> {[ "type": "select", "label": "", "name": "idcontratto", "value": "", "ajax-source": "contratti", "extra": "" ]}

{[ "type": "span", "label": "", "name": "codice", "value": "$codice$", "extra": "" ]}
{[ "type": "date", "label": "", "name": "data_richiesta", "required": 1, "value": "$data_richiesta$", "extra": "" ]}
{[ "type": "select", "label": "", "name": "idzona", "values": "query=SELECT id, CONCAT_WS( ' - ', nome, descrizione) AS descrizione FROM an_zone ORDER BY nome", "value": "$idzona$" , "placeholder": "", "extra": "readonly" ]}
{[ "type": "select", "label": "", "name": "idtipointervento", "required": 1, "values": "query=SELECT idtipointervento AS id, descrizione FROM in_tipiintervento", "value": "$idtipointervento$", "extra": "" ]}
{[ "type": "select", "label": "", "name": "idstatointervento", "required": 1, "values": "query=SELECT idstatointervento AS id, descrizione, colore AS _bgcolor_ FROM in_statiintervento WHERE deleted = 0", "value": "$idstatointervento$" ]}
{[ "type": "select", "label": "", "name": "idautomezzo", "values": "query=SELECT id, CONCAT_WS( ')', CONCAT_WS( ' (', CONCAT_WS( ', ', nome, descrizione), targa ), '' ) AS descrizione FROM dt_automezzi", "help": "", "value": "$idautomezzo$", "extra": "" ]}
{[ "type": "textarea", "label": "", "name": "richiesta", "required": 1, "class": "autosize", "value": "$richiesta$", "extra": "rows='5' " ]}
{[ "type": "textarea", "label": "", "name": "descrizione", "class": "autosize", "value": "$descrizione$", "extra": "rows='10' " ]}
{[ "type": "textarea", "label": "", "name": "informazioniaggiuntive", "class": "autosize", "value": "$informazioniaggiuntive$", "extra": "rows='5'" ]}


{( "name": "filelist_and_upload", "id_module": "", "id_record": "" )}
'.tr('Questo intervento non è ancora stato firmato dal cliente').'.

'; } else { echo '
'.tr('Firmato il _DATE_ alle _TIME_ da _PERSON_', [ '_DATE_' => Translator::dateToLocale($records[0]['firma_data']), '_TIME_' => Translator::timeToLocale($records[0]['firma_data']), '_PERSON_' => ''.$records[0]['firma_nome'].'', ]).'
'; } ?>
fetchArray('SELECT `co_documenti`.*, `co_tipidocumento`.`descrizione` AS tipo_documento, `co_tipidocumento`.`dir` FROM `co_documenti` JOIN `co_tipidocumento` ON `co_tipidocumento`.`id` = `co_documenti`.`idtipodocumento` WHERE `co_documenti`.`id` IN (SELECT `iddocumento` FROM `co_righe_documenti` WHERE `idintervento` = '.prepare($id_record).') ORDER BY `data`'); if (!empty($fatture)) { echo '

'.tr('_NUM_ altr_I_ document_I_ collegat_I_', [ '_NUM_' => count($fatture), '_I_' => (count($fatture) > 1) ? tr('i') : tr('o'), ]).':

'.tr('Eliminando questo documento si potrebbero verificare problemi nelle altre sezioni del gestionale.').'

'; } ?>