mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 08:56:48 +01:00
Miglioramento filtro documenti di riferimento in importFE
This commit is contained in:
parent
fa33ff2369
commit
5d9cddd82e
@ -15,13 +15,13 @@ switch ($resource) {
|
||||
}
|
||||
|
||||
$query_ordini = "SELECT or_ordini.id,
|
||||
CONCAT('Ordine num. ', IF(numero_esterno != '', numero_esterno, numero), ' del ', DATE_FORMAT(data, '%d-%m-%Y'), ' [', (SELECT descrizione FROM or_statiordine WHERE id = idstatoordine) , ']') AS text,
|
||||
CONCAT('Ordine num. ', IF(numero_esterno != '', numero_esterno, numero), ' del ', DATE_FORMAT(data, '%d/%m/%Y'), ' [', (SELECT descrizione FROM or_statiordine WHERE id = idstatoordine) , ']') AS text,
|
||||
'Ordini' AS optgroup,
|
||||
'ordine' AS tipo
|
||||
FROM or_ordini
|
||||
WHERE idanagrafica = ".prepare($id_anagrafica)." AND
|
||||
idstatoordine IN (
|
||||
SELECT id FROM or_statiordine WHERE descrizione IN ('Bozza', 'Accettato', 'Parzialmente evaso', 'Parzialmente fatturato')
|
||||
SELECT id FROM or_statiordine WHERE descrizione!='Fatturato'
|
||||
) AND
|
||||
idtipoordine IN (
|
||||
SELECT id FROM or_tipiordine WHERE dir = ".prepare($direzione).'
|
||||
@ -29,13 +29,13 @@ switch ($resource) {
|
||||
ORDER BY data DESC, numero DESC';
|
||||
|
||||
$query_ddt = "SELECT dt_ddt.id,
|
||||
CONCAT('DDT num. ', IF(numero_esterno != '', numero_esterno, numero), ' del ', DATE_FORMAT(data, '%d-%m-%Y'), ' [', (SELECT descrizione FROM dt_statiddt WHERE id = idstatoddt) , ']') AS text,
|
||||
CONCAT('DDT num. ', IF(numero_esterno != '', numero_esterno, numero), ' del ', DATE_FORMAT(data, '%d/%m/%Y'), ' [', (SELECT descrizione FROM dt_statiddt WHERE id = idstatoddt) , ']') AS text,
|
||||
'DDT' AS optgroup,
|
||||
'ddt' AS tipo
|
||||
FROM dt_ddt
|
||||
WHERE idanagrafica = ".prepare($id_anagrafica)." AND
|
||||
idstatoddt IN (
|
||||
SELECT id FROM dt_statiddt WHERE descrizione IN ('Bozza', 'Parzialmente evaso', 'Parzialmente fatturato')
|
||||
SELECT id FROM dt_statiddt WHERE descrizione!='Fatturato'
|
||||
) AND
|
||||
idtipoddt IN (
|
||||
SELECT id FROM dt_tipiddt WHERE dir=".prepare($direzione).'
|
||||
|
Loading…
x
Reference in New Issue
Block a user