mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #6316 from turbo124/v5-develop
Fixes for notifications
This commit is contained in:
commit
540e1a53cf
@ -69,8 +69,6 @@ class SetupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($check['system_health'] === false) {
|
if ($check['system_health'] === false) {
|
||||||
nlog($check);
|
|
||||||
|
|
||||||
return response('Oops, something went wrong. Check your logs.'); /* We should never reach this block, but just in case. */
|
return response('Oops, something went wrong. Check your logs.'); /* We should never reach this block, but just in case. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,8 +193,6 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
return $this->setMailDriver();
|
return $this->setMailDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that our token is refreshed and valid we can boot the
|
* Now that our token is refreshed and valid we can boot the
|
||||||
* mail driver at runtime and also set the token which will persist
|
* mail driver at runtime and also set the token which will persist
|
||||||
|
@ -175,7 +175,7 @@ class ReminderJob implements ShouldQueue
|
|||||||
$invoice = $invoice->calc()->getInvoice();
|
$invoice = $invoice->calc()->getInvoice();
|
||||||
|
|
||||||
$invoice->client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save();
|
$invoice->client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save();
|
||||||
$invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$this->invoice->number}");
|
$invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}");
|
||||||
|
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,9 @@ class InvoiceEmailedNotification implements ShouldQueue
|
|||||||
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']);
|
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']);
|
||||||
|
|
||||||
/* If one of the methods is email then we fire the EntitySentMailer */
|
/* If one of the methods is email then we fire the EntitySentMailer */
|
||||||
if (($key = array_search('mail', $methods))) {
|
if (($key = array_search('mail', $methods)) !== false) {
|
||||||
unset($methods[$key]);
|
unset($methods[$key]);
|
||||||
|
|
||||||
|
|
||||||
$nmo->to_user = $user;
|
$nmo->to_user = $user;
|
||||||
|
|
||||||
NinjaMailerJob::dispatch($nmo);
|
NinjaMailerJob::dispatch($nmo);
|
||||||
|
@ -58,7 +58,7 @@ class InvoiceFailedEmailNotification
|
|||||||
|
|
||||||
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']);
|
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']);
|
||||||
|
|
||||||
if (($key = array_search('mail', $methods))) {
|
if (($key = array_search('mail', $methods)) !== false) {
|
||||||
unset($methods[$key]);
|
unset($methods[$key]);
|
||||||
|
|
||||||
$nmo->to_user = $user;
|
$nmo->to_user = $user;
|
||||||
|
@ -60,7 +60,7 @@ class QuoteCreatedNotification implements ShouldQueue
|
|||||||
$methods = $this->findUserNotificationTypes($quote->invitations()->first(), $company_user, 'quote', ['all_notifications', 'quote_created', 'quote_created_all']);
|
$methods = $this->findUserNotificationTypes($quote->invitations()->first(), $company_user, 'quote', ['all_notifications', 'quote_created', 'quote_created_all']);
|
||||||
|
|
||||||
/* If one of the methods is email then we fire the EntitySentMailer */
|
/* If one of the methods is email then we fire the EntitySentMailer */
|
||||||
if (($key = array_search('mail', $methods))) {
|
if (($key = array_search('mail', $methods)) !== false) {
|
||||||
unset($methods[$key]);
|
unset($methods[$key]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ class ACH
|
|||||||
$token = ClientGatewayToken::find($this->decodePrimaryKey($request->input('source')));
|
$token = ClientGatewayToken::find($this->decodePrimaryKey($request->input('source')));
|
||||||
$token_meta = $token->meta;
|
$token_meta = $token->meta;
|
||||||
|
|
||||||
if($token_meta->state != "authorized")
|
if(!property_exists($token_meta, 'state') || $token_meta->state != "authorized")
|
||||||
return redirect()->route('client.payment_methods.verification', ['payment_method' => $token->hashed_id, 'method' => GatewayType::BANK_TRANSFER]);
|
return redirect()->route('client.payment_methods.verification', ['payment_method' => $token->hashed_id, 'method' => GatewayType::BANK_TRANSFER]);
|
||||||
|
|
||||||
$app_fee = (config('ninja.wepay.fee_ach_multiplier') * $this->wepay_payment_driver->payment_hash->data->amount_with_fee) + config('ninja.wepay.fee_fixed');
|
$app_fee = (config('ninja.wepay.fee_ach_multiplier') * $this->wepay_payment_driver->payment_hash->data->amount_with_fee) + config('ninja.wepay.fee_fixed');
|
||||||
|
@ -1750,6 +1750,7 @@ $LANG = array(
|
|||||||
'lang_Danish' => 'Danish',
|
'lang_Danish' => 'Danish',
|
||||||
'lang_Dutch' => 'Dutch',
|
'lang_Dutch' => 'Dutch',
|
||||||
'lang_English' => 'English',
|
'lang_English' => 'English',
|
||||||
|
'lang_English - United States' => 'English',
|
||||||
'lang_French' => 'French',
|
'lang_French' => 'French',
|
||||||
'lang_French - Canada' => 'French - Canada',
|
'lang_French - Canada' => 'French - Canada',
|
||||||
'lang_German' => 'German',
|
'lang_German' => 'German',
|
||||||
|
@ -100,7 +100,6 @@ class CompanyTest extends TestCase
|
|||||||
$settings->invoice_design_id = '2';
|
$settings->invoice_design_id = '2';
|
||||||
$settings->quote_design_id = '1';
|
$settings->quote_design_id = '1';
|
||||||
|
|
||||||
nlog($settings);
|
|
||||||
$company->settings = $settings;
|
$company->settings = $settings;
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
Loading…
Reference in New Issue
Block a user