fix: retrocompatibilità osm < 2.4.20

This commit is contained in:
valentina 2024-11-21 13:02:08 +01:00
parent 86abaf3276
commit 4e4526bcb4
1 changed files with 2 additions and 4 deletions

View File

@ -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();