mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 00:44:35 -04:00
Adjustments for recurring invoice cron
This commit is contained in:
parent
d33eb77fad
commit
033e221d2f
@ -43,6 +43,15 @@ trait VerifiesUserEmail
|
|||||||
$user->confirmation_code = null;
|
$user->confirmation_code = null;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
if(isset($user->oauth_user_id)){
|
||||||
|
|
||||||
|
return $this->render('auth.confirmed', [
|
||||||
|
'root' => 'themes',
|
||||||
|
'message' => ctrans('texts.security_confirmation'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (is_null($user->password) || empty($user->password) || Hash::check('', $user->password)) {
|
if (is_null($user->password) || empty($user->password) || Hash::check('', $user->password)) {
|
||||||
return $this->render('auth.confirmation_with_password', ['root' => 'themes', 'user_id' => $user->hashed_id]);
|
return $this->render('auth.confirmation_with_password', ['root' => 'themes', 'user_id' => $user->hashed_id]);
|
||||||
}
|
}
|
||||||
|
@ -68,15 +68,6 @@ class SendRecurring implements ShouldQueue
|
|||||||
->fillDefaults()
|
->fillDefaults()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
nlog("Invoice {$invoice->number} created");
|
|
||||||
|
|
||||||
$invoice->invitations->each(function ($invitation) use ($invoice) {
|
|
||||||
if ($invitation->contact && strlen($invitation->contact->email) >=1) {
|
|
||||||
EmailEntity::dispatch($invitation, $invoice->company);
|
|
||||||
nlog("Firing email for invoice {$invoice->number}");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
nlog("updating recurring invoice dates");
|
nlog("updating recurring invoice dates");
|
||||||
/* Set next date here to prevent a recurring loop forming */
|
/* Set next date here to prevent a recurring loop forming */
|
||||||
$this->recurring_invoice->next_send_date = $this->recurring_invoice->nextSendDate()->format('Y-m-d');
|
$this->recurring_invoice->next_send_date = $this->recurring_invoice->nextSendDate()->format('Y-m-d');
|
||||||
@ -99,6 +90,15 @@ class SendRecurring implements ShouldQueue
|
|||||||
$invoice->entityEmailEvent($invoice->invitations->first(), 'invoice', 'email_template_invoice');
|
$invoice->entityEmailEvent($invoice->invitations->first(), 'invoice', 'email_template_invoice');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nlog("Invoice {$invoice->number} created");
|
||||||
|
|
||||||
|
$invoice->invitations->each(function ($invitation) use ($invoice) {
|
||||||
|
if ($invitation->contact && strlen($invitation->contact->email) >=1) {
|
||||||
|
EmailEntity::dispatch($invitation, $invoice->company);
|
||||||
|
nlog("Firing email for invoice {$invoice->number}");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if ($invoice->client->getSetting('auto_bill_date') == 'on_send_date' && $this->recurring_invoice->auto_bill_enabled) {
|
if ($invoice->client->getSetting('auto_bill_date') == 'on_send_date' && $this->recurring_invoice->auto_bill_enabled) {
|
||||||
nlog("attempting to autobill {$invoice->number}");
|
nlog("attempting to autobill {$invoice->number}");
|
||||||
$invoice->service()->autoBill()->save();
|
$invoice->service()->autoBill()->save();
|
||||||
|
@ -154,13 +154,14 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'sentinel-default' => array_merge(
|
'sentinel-default' => array_merge(
|
||||||
array_map(
|
[
|
||||||
function ($a, $b) {
|
"host" => "v5db1",
|
||||||
return ["host" => $a,"port" => $b];
|
"port" => "26379",
|
||||||
},
|
],
|
||||||
explode(',', env('REDIS_HOST', 'localhost')),
|
[
|
||||||
explode(',', env('REDIS_PORT', 26379))
|
"host" => "v5db2",
|
||||||
),
|
"port" => "26379",
|
||||||
|
],
|
||||||
['options' => [
|
['options' => [
|
||||||
'replication' => 'sentinel',
|
'replication' => 'sentinel',
|
||||||
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
||||||
@ -172,13 +173,14 @@ return [
|
|||||||
),
|
),
|
||||||
|
|
||||||
'sentinel-cache' => array_merge(
|
'sentinel-cache' => array_merge(
|
||||||
array_map(
|
[
|
||||||
function ($a, $b) {
|
"host" => "v5db1",
|
||||||
return ["host" => $a,"port" => $b];
|
"port" => "26379",
|
||||||
},
|
],
|
||||||
explode(',', env('REDIS_HOST', 'localhost')),
|
[
|
||||||
explode(',', env('REDIS_PORT', 26379))
|
"host" => "v5db2",
|
||||||
),
|
"port" => "26379",
|
||||||
|
],
|
||||||
['options' => [
|
['options' => [
|
||||||
'replication' => 'sentinel',
|
'replication' => 'sentinel',
|
||||||
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user