This commit is contained in:
Dasc3er 2020-12-22 16:01:02 +01:00
parent 8d986d210d
commit 93e88fc448
3 changed files with 4 additions and 3 deletions

View File

@ -75,7 +75,7 @@ class Articolo extends Model
$data = ($data ?: date('Y-m-d H:i:s'));
$id = $this->registra($qta, $descrizone, $data, $manuale, $array);
if ($this->servizio == 0) {
if (empty($this->servizio)) {
$this->qta += $qta;
$this->save();

View File

@ -154,7 +154,7 @@ foreach ($primo_livello as $conto_primo) {
$id_anagrafica = $conto_terzo['idanagrafica'];
$anagrafica_deleted = $conto_terzo['deleted_at'];
if (isset($id_anagrafica)) {
echo Modules::link('Anagrafiche', $id_anagrafica, ' <i title="'.(isset($anagrafica_deleted) ? 'Anagrafica eliminata' : 'Visualizza anagrafica').'" class="btn btn-'.(isset($anagrafica_deleted) ? 'danger' : 'primary').' btn-xs fa fa-user" ></i>');
echo Modules::link('Anagrafiche', $id_anagrafica, ' <i title="'.(isset($anagrafica_deleted) ? tr('Anagrafica eliminata') : tr('Visualizza anagrafica')).'" class="btn btn-'.(isset($anagrafica_deleted) ? 'danger' : 'primary').' btn-xs fa fa-user" ></i>');
}
// Stampa mastrino

View File

@ -212,7 +212,8 @@ abstract class Article extends Accounting
public function articolo()
{
return $this->belongsTo(Original::class, 'idarticolo');
return $this->belongsTo(Original::class, 'idarticolo')
->withTrashed();
}
public function dettaglioFornitore()