Implementacion de modulo de pedidos
This commit is contained in:
30
app/Models/Producto.php
Normal file
30
app/Models/Producto.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Producto extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'linea',
|
||||
'codigo',
|
||||
'descripcion',
|
||||
// 'prefijo',
|
||||
'ruta_id',
|
||||
'cantidad',
|
||||
'precio_unitario',
|
||||
];
|
||||
|
||||
public function ruta()
|
||||
{
|
||||
return $this->belongsTo(Ruta::class);
|
||||
}
|
||||
// public function total()
|
||||
// {
|
||||
// return (is_int($this->cantidad) && is_int($this->precio_unitario))?$this->cantidad * $this->precio_unitario:'';
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user