From b2ba848a7f93295e9676d23867206f6597cc81ab Mon Sep 17 00:00:00 2001 From: valentina Date: Mon, 24 Jun 2024 11:58:32 +0200 Subject: [PATCH] Fix controllo valori fatture di acquisto --- modules/fatture/actions.php | 2 +- modules/fatture/edit.php | 2 +- modules/fatture/src/Fattura.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index e5be4cac9..b6d59bb86 100755 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -301,7 +301,7 @@ switch ($op) { } $totale_documento = abs($totale_documento); - $totale_documento = $dati_generali['ImportoTotaleDocumento'] ?: $totale_documento; + $totale_documento = abs($dati_generali['ImportoTotaleDocumento']) ?: $totale_documento; } catch (Exception) { } diff --git a/modules/fatture/edit.php b/modules/fatture/edit.php index 1e7d01176..fe025f1e5 100755 --- a/modules/fatture/edit.php +++ b/modules/fatture/edit.php @@ -492,7 +492,7 @@ if ($fattura->stato->id != $id_stato_bozza && $fattura->stato->id != $id_stato_a '.Modules::link('Scadenzario', $scadenze[0]['id'], tr(''), '', 'class="btn btn-xs btn-primary"'); // Ricalcola scadenze disponibile solo per fatture di acquisto - if ($fattura->isFE() && $ricalcola && $module->getTranslation('title', \Models\Locale()->getPredefined()->id) == 'Fatture di acquisto') { + if ($fattura->isFE() && $ricalcola && !empty($module->where('name', 'Fatture di acquisto')->first()->id)) { echo '