2025-07-28 18:47:00 +09:00
|
|
|
<?php
|
|
|
|
|
|
2025-07-29 13:00:25 +09:00
|
|
|
namespace App\Models\Materials;
|
2025-07-28 18:47:00 +09:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
2025-08-21 09:50:15 +09:00
|
|
|
/**
|
|
|
|
|
* @mixin IdeHelperMaterialReceipt
|
|
|
|
|
*/
|
2025-07-28 18:47:00 +09:00
|
|
|
class MaterialReceipt extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'material_id', 'receipt_date', 'lot_number', 'received_qty', 'unit',
|
|
|
|
|
'supplier_name', 'manufacturer_name', 'purchase_price_excl_vat',
|
2025-11-06 17:45:49 +09:00
|
|
|
'weight_kg', 'status_code', 'is_inspection', 'inspection_date', 'remarks',
|
2025-07-28 18:47:00 +09:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// 자재 마스터
|
|
|
|
|
public function material()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Material::class, 'material_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 수입검사 내역
|
|
|
|
|
public function inspections()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(MaterialInspection::class, 'receipt_id');
|
|
|
|
|
}
|
|
|
|
|
}
|