Terminadas standarizaciones
This commit is contained in:
@@ -13,13 +13,12 @@ class Product extends Model
|
||||
|
||||
public function hasLowStock(): bool
|
||||
{
|
||||
//cambiar
|
||||
return $this->stock_quantity <= $this->min_stock_alert;
|
||||
}
|
||||
|
||||
public function supplier()
|
||||
{
|
||||
return $this->belongsTo(Suppliers::class);
|
||||
return $this->belongsTo(Supplier::class);
|
||||
}
|
||||
|
||||
// Opción 1: Relación directa con los detalles (Renglones de ticket)
|
||||
|
||||
@@ -6,11 +6,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Supplier extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'nombre',
|
||||
'telefono',
|
||||
'email'
|
||||
];
|
||||
protected $fillable = [ 'name', 'phone', 'email' ];
|
||||
|
||||
public function products()
|
||||
{
|
||||
return $this->hasMany(Product::class);
|
||||
|
||||
Reference in New Issue
Block a user