From 4e4526bcb4a93a8e07d9e129546e7ca6ccd0881c Mon Sep 17 00:00:00 2001 From: valentina Date: Thu, 21 Nov 2024 13:02:08 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20retrocompatibilit=C3=A0=20osm=20<=202.4.?= =?UTF-8?q?20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Components/Accounting.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Common/Components/Accounting.php b/src/Common/Components/Accounting.php index d67a55def..053809534 100644 --- a/src/Common/Components/Accounting.php +++ b/src/Common/Components/Accounting.php @@ -424,10 +424,8 @@ abstract class Accounting extends Component $this->attributes['iva'] = $this->iva; $iva = Aliquota::Find($this->idiva); - $descrizione = $iva ? $iva->getTranslation('title') : ''; - - if (!empty($descrizione)) { - $this->attributes['desc_iva'] = $descrizione; + if (database()->isConnected() && database()->tableExists('co_iva_lang')) { + $this->attributes['desc_iva'] = $iva ? $iva->getTranslation('title') : ''; } $this->fixIvaIndetraibile();