1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Type fixes

This commit is contained in:
David Bomba 2024-02-15 18:23:43 +11:00
parent 86550de39c
commit 8128b3c080
3 changed files with 4 additions and 8 deletions

View File

@ -48,7 +48,7 @@ class RecurringInvoicesCron
Auth::logout(); Auth::logout();
if (! config('ninja.db.multi_db_enabled')) { if (! config('ninja.db.multi_db_enabled')) {
$recurring_invoices = RecurringInvoice::query()->where('status_id', RecurringInvoice::STATUS_ACTIVE) $recurring_invoices = RecurringInvoice::where('status_id', RecurringInvoice::STATUS_ACTIVE)
->where('is_deleted', false) ->where('is_deleted', false)
->where('remaining_cycles', '!=', '0') ->where('remaining_cycles', '!=', '0')
->whereNotNull('next_send_date') ->whereNotNull('next_send_date')
@ -66,7 +66,7 @@ class RecurringInvoicesCron
nlog(now()->format('Y-m-d').' Sending Recurring Invoices. Count = '.$recurring_invoices->count()); nlog(now()->format('Y-m-d').' Sending Recurring Invoices. Count = '.$recurring_invoices->count());
$recurring_invoices->each(function ($recurring_invoice, $key) { $recurring_invoices->each(function (RecurringInvoice $recurring_invoice, $key) {
// nlog('Current date = '.now()->format('Y-m-d').' Recurring date = '.$recurring_invoice->next_send_date); // nlog('Current date = '.now()->format('Y-m-d').' Recurring date = '.$recurring_invoice->next_send_date);
nlog("Trying to send {$recurring_invoice->number}"); nlog("Trying to send {$recurring_invoice->number}");

View File

@ -141,7 +141,6 @@ use Illuminate\Support\Carbon;
* @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withTrashed() * @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withoutTrashed() * @method static \Illuminate\Database\Eloquent\Builder|RecurringExpense withoutTrashed()
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
* @mixin \Eloquent * @mixin \Eloquent
*/ */
class RecurringExpense extends BaseModel class RecurringExpense extends BaseModel
@ -223,7 +222,7 @@ class RecurringExpense extends BaseModel
return $this->belongsTo(User::class, 'assigned_user_id', 'id'); return $this->belongsTo(User::class, 'assigned_user_id', 'id');
} }
public function company() public function company():\Illuminate\Database\Eloquent\Relations\BelongsTo
{ {
return $this->belongsTo(Company::class); return $this->belongsTo(Company::class);
} }

View File

@ -294,10 +294,7 @@ class RecurringInvoice extends BaseModel
return $this->hasManyThrough(Backup::class, Activity::class); return $this->hasManyThrough(Backup::class, Activity::class);
} }
/** public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<Company>
*/
public function company()
{ {
return $this->belongsTo(Company::class); return $this->belongsTo(Company::class);
} }