From 6a786640f99e1f8e9aef95d3fd9ef6177fe1d6d5 Mon Sep 17 00:00:00 2001 From: loviuz Date: Thu, 7 Jan 2021 12:21:17 +0100 Subject: [PATCH] Fix per visualizzazione scadenze multiple in periodi diversi e pagate parzialmente --- modules/scadenzario/edit.php | 11 ++++++++++- modules/scadenzario/init.php | 4 ---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/scadenzario/edit.php b/modules/scadenzario/edit.php index efc8719ea..d99399878 100755 --- a/modules/scadenzario/edit.php +++ b/modules/scadenzario/edit.php @@ -190,7 +190,16 @@ if ($totale_da_pagare != 0) { -{( "name": "filelist_and_upload", "id_module": "$id_module$", "id_record": "$id_record$" )} +fetchOne('SELECT id FROM co_scadenziario WHERE iddocumento='.prepare($documento->id).' ORDER BY id')['id']; +} +?> + +{( "name": "filelist_and_upload", "id_module": "$id_module$", "id_record": "" )} {( "name": "log_email", "id_module": "$id_module$", "id_record": "$id_record$" )} diff --git a/modules/scadenzario/init.php b/modules/scadenzario/init.php index 920a5dbe6..54cfe57f2 100755 --- a/modules/scadenzario/init.php +++ b/modules/scadenzario/init.php @@ -33,8 +33,4 @@ if (isset($id_record)) { $scadenze = $dbo->fetchArray('SELECT * FROM co_scadenziario WHERE id = '.prepare($id_record).' ORDER BY scadenza ASC'); $totale_da_pagare = sum(array_column($scadenze, 'da_pagare')); } - - if ($scadenze[0]['id'] != $id_record) { - redirect(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$scadenze[0]['id']); - } }