mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-25 06:55:05 +01:00
Fix minore
This commit is contained in:
parent
b2b39cbff4
commit
5d11a63c18
@ -89,10 +89,10 @@ class Anagrafica extends Model
|
||||
|
||||
public static function fromTipo($type)
|
||||
{
|
||||
$tipologia = TipoAnagrafica::where('name', $type)->first();
|
||||
$tipologia = (new TipoAnagrafica())->getByName($type)->id_record;
|
||||
|
||||
$anagrafiche = self::whereHas('tipi', function ($query) use ($tipologia) {
|
||||
$query->where('`an_tipianagrafiche`.`id`', '=', $tipologia->id);
|
||||
$query->where('an_tipianagrafiche.id', '=', $tipologia->id);
|
||||
});
|
||||
|
||||
return $anagrafiche;
|
||||
|
Loading…
Reference in New Issue
Block a user