From 19b968913d84548cba968dccc282888738615f27 Mon Sep 17 00:00:00 2001 From: loviuz Date: Thu, 15 Apr 2021 18:22:44 +0200 Subject: [PATCH] Aggiunto tipo documento in menu di aggiunta fattura --- modules/fatture/add.php | 2 +- modules/fatture/edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/fatture/add.php b/modules/fatture/add.php index 739d62751..8e8e1ecae 100755 --- a/modules/fatture/add.php +++ b/modules/fatture/add.php @@ -70,7 +70,7 @@ $idtipodocumento = $dbo->selectOne('co_tipidocumento', ['id'], [
- {[ "type": "select", "label": "", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, descrizione FROM co_tipidocumento WHERE enabled = 1 AND dir = '' ORDER BY descrizione", "value": "" ]} + {[ "type": "select", "label": "", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, CONCAT(codice_tipo_documento_fe, ' - ', descrizione) AS descrizione FROM co_tipidocumento WHERE enabled = 1 AND dir = '' ORDER BY codice_tipo_documento_fe", "value": "" ]}
diff --git a/modules/fatture/edit.php b/modules/fatture/edit.php index 04bb1a61e..13b474e9d 100755 --- a/modules/fatture/edit.php +++ b/modules/fatture/edit.php @@ -278,7 +278,7 @@ elseif ($record['stato'] == 'Bozza') {
- {[ "type": "select", "label": "", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, CONCAT_WS(\" - \",codice_tipo_documento_fe, descrizione) AS descrizione FROM co_tipidocumento WHERE dir='' AND (reversed = 0 OR id = )", "value": "$idtipodocumento$", "readonly": , "help": "fetchOne('SELECT tipo FROM an_anagrafiche WHERE idanagrafica = '.prepare($record['idanagrafica']))['tipo'] == 'Ente pubblico') ? 'FPA12 - fattura verso PA (Ente pubblico)' : 'FPR12 - fattura verso soggetti privati (Azienda o Privato)'; ?>" ]} + {[ "type": "select", "label": "", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, CONCAT_WS(\" - \",codice_tipo_documento_fe, descrizione) AS descrizione FROM co_tipidocumento WHERE dir='' AND (reversed = 0 OR id = ) ORDER BY codice_tipo_documento_fe", "value": "$idtipodocumento$", "readonly": , "help": "fetchOne('SELECT tipo FROM an_anagrafiche WHERE idanagrafica = '.prepare($record['idanagrafica']))['tipo'] == 'Ente pubblico') ? 'FPA12 - fattura verso PA (Ente pubblico)' : 'FPR12 - fattura verso soggetti privati (Azienda o Privato)'; ?>" ]}