mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Fix #722
This commit is contained in:
@@ -16,7 +16,7 @@ class Intervento extends Document
|
|||||||
protected $info = [];
|
protected $info = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crea un nuovo intrevento.
|
* Crea un nuovo intervento.
|
||||||
*
|
*
|
||||||
* @param Anagrafica $anagrafica
|
* @param Anagrafica $anagrafica
|
||||||
* @param TipoSessione $tipo_sessione
|
* @param TipoSessione $tipo_sessione
|
||||||
@@ -119,6 +119,11 @@ class Intervento extends Document
|
|||||||
return $this->belongsTo(Stato::class, 'idstatointervento');
|
return $this->belongsTo(Stato::class, 'idstatointervento');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tipo()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Tipo::class, 'idtipointervento');
|
||||||
|
}
|
||||||
|
|
||||||
public function tipoSessione()
|
public function tipoSessione()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(TipoSessione::class, 'idtipointervento');
|
return $this->belongsTo(TipoSessione::class, 'idtipointervento');
|
||||||
|
16
modules/interventi/src/Tipo.php
Normal file
16
modules/interventi/src/Tipo.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Interventi;
|
||||||
|
|
||||||
|
use Common\Model;
|
||||||
|
|
||||||
|
class Tipo extends Model
|
||||||
|
{
|
||||||
|
protected $primaryKey = 'idtipointervento';
|
||||||
|
protected $table = 'in_tipiintervento';
|
||||||
|
|
||||||
|
public function interventi()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Intervento::class, 'idtipointervento');
|
||||||
|
}
|
||||||
|
}
|
@@ -83,7 +83,7 @@ echo '
|
|||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">
|
<td colspan="4">
|
||||||
<b>'.tr('Tipo intervento').':</b> '.$documento['tipointervento'].'
|
<b>'.tr('Tipo intervento').':</b> '.$documento->tipo->descrizione.'
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user