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

minor fixes

This commit is contained in:
David Bomba 2021-09-03 12:25:41 +10:00
parent 2c550671c6
commit 95641177cc
3 changed files with 5 additions and 4 deletions

View File

@ -89,7 +89,7 @@ class RecurringInvoicesCron
->with('company')
->cursor();
nlog(now()->format('Y-m-d') . ' Sending Recurring Invoices. Count = '.$recurring_invoices->count().' On Database # '.$db);
nlog(now()->format('Y-m-d') . ' Sending Recurring Invoices. Count = '.$recurring_invoices->count());
$recurring_invoices->each(function ($recurring_invoice, $key) {
nlog("Current date = " . now()->format("Y-m-d") . " Recurring date = " .$recurring_invoice->next_send_date ." Recurring #id = ". $recurring_invoice->id);
@ -100,7 +100,7 @@ class RecurringInvoicesCron
SendRecurring::dispatchNow($recurring_invoice, $recurring_invoice->company->db);
}
catch(\Exception $e){
nlog("Unable to sending recurring invoice {$recurring_invoice->id} on db {$db}");
nlog("Unable to sending recurring invoice {$recurring_invoice->id}");
}
}
});

View File

@ -358,11 +358,11 @@ class Account extends BaseModel
if($this->isPaid()){
$limit = $this->paid_plan_email_quota;
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
}
else{
$limit = $this->free_plan_email_quota;
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
}
return min($limit, 5000);

View File

@ -205,6 +205,7 @@ class BaseDriver extends AbstractPaymentDriver
$invoices->each(function ($invoice) use ($payment) {
event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars()));
$invoice->service()->workFlow();
});
return $payment->service()->applyNumber()->save();