24 lines
452 B
PHP
24 lines
452 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PurchaseReturnItemTax extends Model
|
|
{
|
|
protected $fillable = [
|
|
'item_id',
|
|
'tax_name',
|
|
'tax_rate'
|
|
];
|
|
|
|
protected $casts = [
|
|
'tax_rate' => 'decimal:2'
|
|
];
|
|
|
|
public function item(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PurchaseReturnItem::class, 'item_id');
|
|
}
|
|
} |