2025-01-07 17:23:42 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class BudgetControl extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
|
|
|
|
protected $table = 'budget_control';
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'cabang_id',
|
|
|
|
|
'sender_id',
|
|
|
|
|
'receiver_id',
|
|
|
|
|
'amount',
|
|
|
|
|
'remarks',
|
|
|
|
|
'periode_month',
|
|
|
|
|
'periode_year',
|
|
|
|
|
'transferred_at',
|
|
|
|
|
'closing_at',
|
|
|
|
|
'status',
|
2026-06-01 15:01:03 +07:00
|
|
|
'transfer_proof',
|
|
|
|
|
'transfer_status',
|
2025-01-07 17:23:42 +07:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Admin::class, 'user_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function cabang()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Cabang::class, 'cabang_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function sender()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Admin::class, 'sender_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function receiver()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Admin::class, 'receiver_id');
|
|
|
|
|
}
|
|
|
|
|
}
|