mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
7c2cc7d86f
@ -303,14 +303,14 @@ class CheckData extends Command
|
||||
$total_invoice_payments += ($total_amount - $total_refund);
|
||||
}
|
||||
|
||||
//10/02/21
|
||||
// foreach ($client->payments as $payment) {
|
||||
// $credit_total_applied += $payment->paymentables->where('paymentable_type', App\Models\Credit::class)->sum(DB::raw('amount'));
|
||||
// }
|
||||
// 10/02/21
|
||||
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)) {
|
||||
|
@ -148,6 +148,7 @@ class CompanySettings extends BaseSettings
|
||||
public $gmail_sending_user_id = '0'; //@implemented
|
||||
|
||||
public $reply_to_email = ''; //@TODO
|
||||
public $reply_to_name = ''; //@TODO
|
||||
public $bcc_email = ''; //@TODO
|
||||
public $pdf_email_attachment = false; //@implemented
|
||||
public $ubl_email_attachment = false; //@implemented
|
||||
@ -261,6 +262,7 @@ class CompanySettings extends BaseSettings
|
||||
public $hide_empty_columns_on_pdf = false;
|
||||
|
||||
public static $casts = [
|
||||
'reply_to_name' => 'string',
|
||||
'hide_empty_columns_on_pdf' => 'bool',
|
||||
'enable_reminder_endless' => 'bool',
|
||||
'use_credits_payment' => 'string',
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user