芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/RecurringInvoice.php
'datetime', 'due_date' => 'datetime', 'next_invoice_date' => 'datetime', ]; protected $appends = ['total_amount', 'issue_on']; protected $with = ['client']; const ROTATION_COLOR = [ 'daily' => 'success', 'weekly' => 'info', 'bi-weekly' => 'warning', 'monthly' => 'secondary', 'quarterly' => 'light', 'half-yearly' => 'dark', 'annually' => 'success', ]; public function recurrings(): HasMany { return $this->hasMany(Invoice::class, 'invoice_recurring_id'); } public function project(): BelongsTo { return $this->belongsTo(Project::class, 'project_id'); } public function client(): BelongsTo { return $this->belongsTo(User::class, 'client_id')->withoutGlobalScope(ActiveScope::class); } public function clientdetails(): BelongsTo { return $this->belongsTo(ClientDetails::class, 'client_id', 'user_id'); } public function items(): HasMany { return $this->hasMany(RecurringInvoiceItems::class, 'invoice_recurring_id'); } public function currency(): BelongsTo { return $this->belongsTo(Currency::class, 'currency_id')->withoutGlobalScope(ActiveScope::class); } public function getTotalAmountAttribute() { if (!is_null($this->total) && !is_null($this->currency->currency_symbol)) { return $this->currency->currency_symbol . $this->total; } return ''; } public function getIssueOnAttribute() { if (is_null($this->issue_date)) { return ''; } return Carbon::parse($this->issue_date)->format('d F, Y'); } public function units(): BelongsTo { return $this->belongsTo(UnitType::class, 'unit_id'); } }