mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 14:57:46 +01:00
Fix stato dei Preventivi selezionabili
This commit is contained in:
parent
9882a7348e
commit
eeca4811d9
@ -27,6 +27,7 @@ if (!empty($id_documento)) {
|
|||||||
$id_anagrafica = $documento_finale->idanagrafica;
|
$id_anagrafica = $documento_finale->idanagrafica;
|
||||||
|
|
||||||
$_SESSION['superselect']['idanagrafica'] = $id_anagrafica;
|
$_SESSION['superselect']['idanagrafica'] = $id_anagrafica;
|
||||||
|
$_SESSION['superselect']['stato'] = 'is_fatturabile';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -28,6 +28,7 @@ if (!empty($id_documento)) {
|
|||||||
$id_anagrafica = $documento_finale->idanagrafica;
|
$id_anagrafica = $documento_finale->idanagrafica;
|
||||||
|
|
||||||
$_SESSION['superselect']['idanagrafica'] = $id_anagrafica;
|
$_SESSION['superselect']['idanagrafica'] = $id_anagrafica;
|
||||||
|
$_SESSION['superselect']['stato'] = 'is_fatturabile';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -15,7 +15,7 @@ switch ($resource) {
|
|||||||
$where[] = 'an_anagrafiche.idanagrafica='.prepare($superselect['idanagrafica']);
|
$where[] = 'an_anagrafiche.idanagrafica='.prepare($superselect['idanagrafica']);
|
||||||
$where[] = 'co_preventivi.default_revision=1';
|
$where[] = 'co_preventivi.default_revision=1';
|
||||||
|
|
||||||
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'is_fatturabile';
|
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'is_pianificabile';
|
||||||
$where[] = 'idstato IN (SELECT `id` FROM `co_statipreventivi` WHERE '.$stato.' = 1)';
|
$where[] = 'idstato IN (SELECT `id` FROM `co_statipreventivi` WHERE '.$stato.' = 1)';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,18 +30,5 @@ switch ($resource) {
|
|||||||
$custom['sconto'] = 'sconto';
|
$custom['sconto'] = 'sconto';
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'preventivi_aperti':
|
|
||||||
$query = 'SELECT co_preventivi.id AS id, CONCAT(numero, " ", co_preventivi.nome, " (", ragione_sociale, ")") AS descrizione FROM co_preventivi INNER JOIN an_anagrafiche ON co_preventivi.idanagrafica=an_anagrafiche.idanagrafica |where| ORDER BY id';
|
|
||||||
|
|
||||||
foreach ($elements as $element) {
|
|
||||||
$filter[] = 'idpreventivo='.prepare($element);
|
|
||||||
}
|
|
||||||
$where[] = 'idstato IN (1)';
|
|
||||||
if (!empty($search)) {
|
|
||||||
$search_fields[] = 'nome LIKE '.prepare('%'.$search.'%');
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user