From 4cb7c9f02245dcc38252210ffff0b339862eedb8 Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 14 Nov 2018 12:44:24 +0100 Subject: [PATCH] =?UTF-8?q?In=20fase=20di=20rinnovo=20contratto=20cambio?= =?UTF-8?q?=20stato=20precedente=20contratto=20in=20concluso=20(non=20pi?= =?UTF-8?q?=C3=B9=20pianificabile)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/contratti/actions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/contratti/actions.php b/modules/contratti/actions.php index 285e21fc7..a4ae3ef18 100644 --- a/modules/contratti/actions.php +++ b/modules/contratti/actions.php @@ -344,8 +344,12 @@ switch (post('op')) { 'id_plugin' => Plugins::get('Pianificazione interventi')['id'], 'id_record' => $id_promemoria, ]); + } - + + // Cambio stato precedente contratto in concluso (non piĆ¹ pianificabile) + $dbo->query('UPDATE `co_contratti` SET `rinnovabile`= 0, `idstato`= (SELECT id FROM co_staticontratti WHERE pianificabile = 0 AND fatturabile = 1 AND descrizione = \'Concluso\') WHERE `id` = '.prepare($id_record)); + flash()->info(tr('Contratto rinnovato!')); $id_record = $new_idcontratto;