|UnitAccountReceivable newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable newQuery() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable query() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereDiscount($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereDueDate($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereFinancialPlanAccountId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereFine($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereHistory($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereObs($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereOrigin($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable wherePaidValue($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable wherePaymentDate($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereStudentId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereUnitId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable whereValue($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountReceivable withoutTrashed() * @mixin \Eloquent */ class UnitAccountReceivable extends Model { use HasFactory, SoftDeletes; public const ORIGIN_MANUAL = 'manual'; protected $table = 'unit_account_receivables'; protected $guarded = ['id']; protected $casts = [ 'value' => 'decimal:2', 'paid_value' => 'decimal:2', 'discount' => 'decimal:2', 'fine' => 'decimal:2', 'due_date' => 'date', 'payment_date' => 'date', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', ]; public function unit(): BelongsTo { return $this->belongsTo(Unit::class, 'unit_id'); } public function student(): BelongsTo { return $this->belongsTo(Student::class, 'student_id'); } public function planAccount(): BelongsTo { return $this->belongsTo(FinancialPlanAccount::class, 'financial_plan_account_id'); } }