14 $ct[
'etc'][
'table'] =
'documenti_amministrativi';
18 $ct[
'etc'][
'id_iva'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM iva_view' );
21 $ct[
'etc'][
'id_modalita_pagamento'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM modalita_pagamento_view' );
25 $ct[
'etc'][
'id_emittente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_azienda_gestita = 1' );
28 if( isset(
$_REQUEST[
$ct[
'etc'][
'table'] ][
'id_emittente'] ) ) {
29 $ct[
'etc'][
'id_sede_emittente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM indirizzi_view WHERE id_anagrafica = ?', array( array(
's' =>
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_emittente'] ) ) );
33 $ct[
'etc'][
'id_referente_emittente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view' );
36 $ct[
'etc'][
'id_agente_emittente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_agente = 1' );
41 $ct[
'etc'][
'id_cliente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_clienti_view' );
44 if( isset(
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_cliente'] ) ) {
45 $ct[
'etc'][
'id_sede_cliente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM indirizzi_view WHERE id_anagrafica = ?', array( array(
's' =>
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_cliente'] ) ) );
49 $ct[
'etc'][
'id_referente_cliente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view' );
53 $ct[
'etc'][
'id_fornitore'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_fornitore = 1' );
58 timerCheck(
$cf[
'speed'],
' -> fine generazione tendina clienti' );
60 if( isset(
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_agente'] ) ) {print_r(
'cia');
61 $ct[
'etc'][
'id_agente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE '.( ( isset( $idAgente ) ) ?
' id = '.$idAgente : NULL ).
' OR id = ?', array( array(
's' =>
$_REQUEST[ $ct[
'etc'][
'table'] ][
'id_agente'] ) ) );
63 $ct[
'etc'][
'id_agente'] =
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT id, __label__ FROM anagrafica_view WHERE se_agente = 1 '.( ( isset( $idAgente ) ) ?
' AND id = '.$idAgente : NULL ) );
67 timerCheck(
$cf[
'speed'],
' -> fine generazione tendina clienti' );
$cf['ricerca']['template']
$_REQUEST['__view__'][ $ct['view']['id']]['__restrict__']['id_progetto']['EQ']