33 lines
583 B
PHP
33 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PayrollAdjustment extends BaseModel
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'payroll_entry_id',
|
|
'type',
|
|
'name',
|
|
'amount',
|
|
'notes',
|
|
'created_by'
|
|
];
|
|
|
|
protected $casts = [
|
|
'amount' => 'decimal:2',
|
|
];
|
|
|
|
/**
|
|
* Get the payroll entry that owns the adjustment.
|
|
*/
|
|
public function payrollEntry()
|
|
{
|
|
return $this->belongsTo(PayrollEntry::class);
|
|
}
|
|
}
|