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

Merge pull request #6316 from turbo124/v5-develop

Fixes for notifications
This commit is contained in:
David Bomba 2021-07-23 17:28:08 +10:00 committed by GitHub
commit 540e1a53cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 6 additions and 11 deletions

View File

@ -69,8 +69,6 @@ class SetupController extends Controller
}
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. */
}

View File

@ -193,8 +193,6 @@ class NinjaMailerJob implements ShouldQueue
return $this->setMailDriver();
}
/*
* Now that our token is refreshed and valid we can boot the
* mail driver at runtime and also set the token which will persist

View File

@ -175,7 +175,7 @@ class ReminderJob implements ShouldQueue
$invoice = $invoice->calc()->getInvoice();
$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;
}

View File

@ -63,10 +63,9 @@ class InvoiceEmailedNotification implements ShouldQueue
$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 (($key = array_search('mail', $methods))) {
if (($key = array_search('mail', $methods)) !== false) {
unset($methods[$key]);
$nmo->to_user = $user;
NinjaMailerJob::dispatch($nmo);

View File

@ -58,7 +58,7 @@ class InvoiceFailedEmailNotification
$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]);
$nmo->to_user = $user;

View File

@ -60,7 +60,7 @@ class QuoteCreatedNotification implements ShouldQueue
$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 (($key = array_search('mail', $methods))) {
if (($key = array_search('mail', $methods)) !== false) {
unset($methods[$key]);

View File

@ -194,7 +194,7 @@ class ACH
$token = ClientGatewayToken::find($this->decodePrimaryKey($request->input('source')));
$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]);
$app_fee = (config('ninja.wepay.fee_ach_multiplier') * $this->wepay_payment_driver->payment_hash->data->amount_with_fee) + config('ninja.wepay.fee_fixed');

View File

@ -1750,6 +1750,7 @@ $LANG = array(
'lang_Danish' => 'Danish',
'lang_Dutch' => 'Dutch',
'lang_English' => 'English',
'lang_English - United States' => 'English',
'lang_French' => 'French',
'lang_French - Canada' => 'French - Canada',
'lang_German' => 'German',

View File

@ -100,7 +100,6 @@ class CompanyTest extends TestCase
$settings->invoice_design_id = '2';
$settings->quote_design_id = '1';
nlog($settings);
$company->settings = $settings;
$response = $this->withHeaders([