Fix classi 2.4.10 per installazione

This commit is contained in:
Luca 2020-03-03 22:10:36 +01:00
parent fda1bca710
commit dbc132a3bc
2 changed files with 34 additions and 1 deletions

View File

@ -284,4 +284,11 @@ class Anagrafica extends Model
$this->ragione_sociale = $this->cognome.' '.$this->nome;
}
}
// Attributi Eloquent
public function getModuleAttribute()
{
return 'Anagrafiche';
}
}

View File

@ -574,5 +574,31 @@ class Fattura extends Document
$riga->idconto = setting('Conto predefinito per la marca da bollo');
$riga->save();
}
}
// Opzioni di riferimento
public function getReferenceName()
{
return $this->tipo->descrizione;
}
public function getReferenceNumber()
{
return $this->numero_esterno ?: $this->numero;
}
public function getReferenceDate()
{
return $this->data;
}
public function getReference(){
$name = $this->getReferenceName();
$number = $this->getReferenceNumber();
$date = $this->getReferenceDate();
}
}