Files
star-erp/app/Modules/Inventory/Models/InventoryTransferItem.php
sky121113 613eb555ba
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 59s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped
feat(inventory): 強化調撥單功能,支援販賣機貨道欄位、開放商品重複加入及優化過帳庫存檢核
2026-02-09 16:52:35 +08:00

37 lines
769 B
PHP

<?php
namespace App\Modules\Inventory\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class InventoryTransferItem extends Model
{
use HasFactory;
protected $fillable = [
'transfer_order_id',
'product_id',
'batch_number',
'quantity',
'position',
'snapshot_quantity',
'notes',
];
protected $casts = [
'quantity' => 'decimal:2',
];
public function order(): BelongsTo
{
return $this->belongsTo(InventoryTransferOrder::class, 'transfer_order_id');
}
public function product(): BelongsTo
{
return $this->belongsTo(Product::class);
}
}