diff --git a/modules/preventivi/add.php b/modules/preventivi/add.php index f1cca7645..80e0732d8 100755 --- a/modules/preventivi/add.php +++ b/modules/preventivi/add.php @@ -23,7 +23,7 @@ use Modules\Preventivi\Stato; $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : ''; -$stati = get('pianificabile') ? 'SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`title` as descrizione FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi`.`id` = `co_statipreventivi_lang`.`id_record` AND `co_statipreventivi_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `is_pianificabile`=1' : 'SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`title` as descrizione FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi`.`id` = `co_statipreventivi_lang`.`id_record` AND `co_statipreventivi_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).')'; +$stati = get('pianificabile') ? 'SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`title` as descrizione FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi`.`id` = `co_statipreventivi_lang`.`id_record` AND `co_statipreventivi_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `is_pianificabile`=1 AND `co_statipreventivi`.`deleted_at` is NULL ORDER BY `title`' : 'SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`title` as descrizione FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi`.`id` = `co_statipreventivi_lang`.`id_record` AND `co_statipreventivi_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `co_statipreventivi`.`deleted_at` is NULL ORDER BY `title`'; $stato = Stato::where('name', 'Bozza')->first()->id; diff --git a/modules/preventivi/edit.php b/modules/preventivi/edit.php index 69d22beaa..52f4fd6a2 100755 --- a/modules/preventivi/edit.php +++ b/modules/preventivi/edit.php @@ -42,7 +42,7 @@ if (count($preventivo->revisioni) > 1) {
- {[ "type": "select", "label": "", "name": "idstato", "required": 1, "values": "query=SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`title` AS descrizione, `colore` AS _bgcolor_ FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi_lang`.`id_record` = `co_statipreventivi`.`id` AND `co_statipreventivi_lang`.`id_lang` = id); ?>) ORDER BY `title`", "value": "$idstato$", "class": "unblockable" ]} + {[ "type": "select", "label": "", "name": "idstato", "required": 1, "values": "query=SELECT `co_statipreventivi`.`id`, `co_statipreventivi_lang`.`title` AS descrizione, `colore` AS _bgcolor_ FROM `co_statipreventivi` LEFT JOIN `co_statipreventivi_lang` ON (`co_statipreventivi_lang`.`id_record` = `co_statipreventivi`.`id` AND `co_statipreventivi_lang`.`id_lang` = id); ?>) AND `co_statipreventivi`.`deleted_at` is NULL ORDER BY `title`", "value": "$idstato$", "class": "unblockable" ]}