mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
minor fixes
This commit is contained in:
parent
2c550671c6
commit
95641177cc
@ -89,7 +89,7 @@ class RecurringInvoicesCron
|
|||||||
->with('company')
|
->with('company')
|
||||||
->cursor();
|
->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) {
|
$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);
|
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);
|
SendRecurring::dispatchNow($recurring_invoice, $recurring_invoice->company->db);
|
||||||
}
|
}
|
||||||
catch(\Exception $e){
|
catch(\Exception $e){
|
||||||
nlog("Unable to sending recurring invoice {$recurring_invoice->id} on db {$db}");
|
nlog("Unable to sending recurring invoice {$recurring_invoice->id}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -358,11 +358,11 @@ class Account extends BaseModel
|
|||||||
|
|
||||||
if($this->isPaid()){
|
if($this->isPaid()){
|
||||||
$limit = $this->paid_plan_email_quota;
|
$limit = $this->paid_plan_email_quota;
|
||||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
|
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$limit = $this->free_plan_email_quota;
|
$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);
|
return min($limit, 5000);
|
||||||
|
@ -205,6 +205,7 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
|
|
||||||
$invoices->each(function ($invoice) use ($payment) {
|
$invoices->each(function ($invoice) use ($payment) {
|
||||||
event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars()));
|
event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars()));
|
||||||
|
$invoice->service()->workFlow();
|
||||||
});
|
});
|
||||||
|
|
||||||
return $payment->service()->applyNumber()->save();
|
return $payment->service()->applyNumber()->save();
|
||||||
|
Loading…
Reference in New Issue
Block a user