partial update transaction work with stock product

This commit is contained in:
2025-06-24 19:42:19 +07:00
parent 33502e905d
commit c3233ea6b2
20 changed files with 3432 additions and 239 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class WorkProduct extends Model
{
use HasFactory;
protected $fillable = [
'work_id',
'product_id',
'quantity_required',
'notes'
];
protected $casts = [
'quantity_required' => 'decimal:2'
];
public function work()
{
return $this->belongsTo(Work::class);
}
public function product()
{
return $this->belongsTo(Product::class);
}
}