partial update opnames and detail table
This commit is contained in:
30
app/Models/OpnameDetail.php
Normal file
30
app/Models/OpnameDetail.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class OpnameDetail extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $fillable = [
|
||||
'opname_id',
|
||||
'product_id',
|
||||
'physical_stock',
|
||||
'system_stock',
|
||||
'difference',
|
||||
'note',
|
||||
];
|
||||
|
||||
public function opname()
|
||||
{
|
||||
return $this->belongsTo(Opname::class);
|
||||
}
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo(Product::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user