Skip to content

Commit 7fb0a33

Browse files
committed
fix: impostazione stato bozza nei ddt
1 parent a2826c2 commit 7fb0a33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/ddt/edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@
103103
if (setting('Cambia automaticamente stato ddt fatturati')) {
104104
$id_stato_fatt = Stato::where('name', 'Fatturato')->first()->id;
105105
$id_stato_parz_fatt = Stato::where('name', 'Parzialmente fatturato')->first()->id;
106-
106+
$id_stato_bozza = Stato::where('name', 'Bozza')->first()->id;
107107
if ($ddt->stato->id == $id_stato_fatt || $ddt->stato->id == $id_stato_parz_fatt) {
108108
echo '
109109
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatoddt", "required": 1, "values": "query=SELECT `dt_statiddt`.*, `dt_statiddt_lang`.`title` as descrizione, `colore` AS _bgcolor_ FROM `dt_statiddt` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang`= '.prepare(Models\Locale::getDefault()->id).') ORDER BY `title`", "value": "$idstatoddt$", "extra": "readonly", "class": "unblockable" ]}';
110110
} else {
111111
echo '
112-
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatoddt", "required": 1, "values": "query=SELECT `dt_statiddt`.*, `dt_statiddt_lang`.`title` as descrizione, `colore` AS _bgcolor_ FROM `dt_statiddt` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang`= '.prepare(Models\Locale::getDefault()->id).') WHERE `dt_statiddt`.`is_fatturabile` = 1 ORDER BY `title`", "value": "$idstatoddt$", "class": "unblockable" ]}';
112+
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatoddt", "required": 1, "values": "query=SELECT `dt_statiddt`.*, `dt_statiddt_lang`.`title` as descrizione, `colore` AS _bgcolor_ FROM `dt_statiddt` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang`= '.prepare(Models\Locale::getDefault()->id).') WHERE `dt_statiddt`.`is_fatturabile` = 1 OR `dt_statiddt`.`id` = '.prepare($id_stato_bozza).' ORDER BY `title`", "value": "$idstatoddt$", "class": "unblockable" ]}';
113113
}
114114
} else {
115115
echo '

0 commit comments

Comments
 (0)