1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
This commit is contained in:
David Bomba 2021-02-11 22:37:58 +11:00
parent c934c09b67
commit c2527c56b5
3 changed files with 13 additions and 8 deletions

View File

@ -304,13 +304,13 @@ class CheckData extends Command
}
// 10/02/21
// foreach ($client->payments as $payment) {
// $credit_total_applied += $payment->paymentables->where('paymentable_type', App\Models\Credit::class)->sum(DB::raw('amount'));
// }
foreach ($client->payments as $payment) {
$credit_total_applied += $payment->paymentables->where('paymentable_type', App\Models\Credit::class)->sum(DB::raw('amount'));
}
// if ($credit_total_applied < 0) {
// $total_invoice_payments += $credit_total_applied;
// }
if ($credit_total_applied < 0) {
$total_invoice_payments += $credit_total_applied;
}
if (round($total_invoice_payments, 2) != round($client->paid_to_date, 2)) {

View File

@ -5,6 +5,7 @@ namespace App\Helpers\Mail;
use Illuminate\Mail\MailManager;
use App\CustomMailDriver\CustomTransport;
use Dacastro4\LaravelGmail\Services\Message\Mail;
use Illuminate\Support\Facades\Config;
class GmailTransportManager extends MailManager
@ -12,7 +13,8 @@ class GmailTransportManager extends MailManager
protected function createGmailTransport()
{
$token = $this->app['config']->get('services.gmail.token', []);
//$token = $this->app['config']->get('services.gmail.token', []);
$token =Config::get('services.gmail.token');
$mail = new Mail;
return new GmailTransport($mail, $token);

View File

@ -86,6 +86,9 @@ class BaseMailerJob implements ShouldQueue
Config::set('mail.from.name', $user->present()->name());
(new MailServiceProvider(app()))->register();
nlog("after registering mail service provider");
nlog(Config::set('services.gmail.token'));
}
public function logMailError($errors, $recipient_object)