|CompanyAccountPayable newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable newQuery() * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable query() * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereDiscount($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereDueDate($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereFinancialPlanAccountId($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereFine($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereHistory($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereObs($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereOrigin($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable wherePaidValue($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable wherePaymentDate($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable whereValue($value) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|CompanyAccountPayable withoutTrashed() * @mixin \Eloquent */ class CompanyAccountPayable extends Model { use HasFactory, SoftDeletes; public const ORIGIN_MANUAL = 'manual'; protected $table = 'company_account_payables'; 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 planAccount(): BelongsTo { return $this->belongsTo(FinancialPlanAccount::class, 'financial_plan_account_id'); } }