diff --git a/app/Helpers/Mail/GmailTransport.php b/app/Helpers/Mail/GmailTransport.php index 8edfa1aab38a..3c929f00d9ba 100644 --- a/app/Helpers/Mail/GmailTransport.php +++ b/app/Helpers/Mail/GmailTransport.php @@ -70,7 +70,7 @@ class GmailTransport extends Transport if($child->getContentType() != 'text/plain') { - $this->gmail->attach(TempFile::filePath($child->getBody(), $child->getHeaders()->get('Content-Type')->getParameter('name') )); + $this->gmail->attach(TempFile::filePath($child->getBody(), $child->getHeaders()->get('Content-Type')->getParameter('name') )); } diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 3c17614da0a8..065d6a1aa6f8 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -334,7 +334,7 @@ class BaseController extends Controller }, 'company.expense_categories'=> function ($query) use ($updated_at, $user) { - $query->where('updated_at', '>=', $updated_at); + $query->whereNotNull('updated_at'); }, 'company.task_statuses'=> function ($query) use ($updated_at, $user) { $query->whereNotNull('updated_at'); @@ -568,7 +568,7 @@ class BaseController extends Controller }, 'company.expense_categories'=> function ($query) use ($created_at, $user) { - $query->where('created_at', '>=', $created_at); + $query->whereNotNull('created_at'); }, 'company.task_statuses'=> function ($query) use ($created_at, $user) { diff --git a/app/Jobs/Credit/ApplyCreditPayment.php b/app/Jobs/Credit/ApplyCreditPayment.php index 2b342f03319e..05b9ca6566b8 100644 --- a/app/Jobs/Credit/ApplyCreditPayment.php +++ b/app/Jobs/Credit/ApplyCreditPayment.php @@ -69,6 +69,7 @@ class ApplyCreditPayment implements ShouldQueue $this->credit ->service() + ->markSent() ->setStatus(Credit::STATUS_APPLIED) ->adjustBalance($this->amount * -1) ->updatePaidToDate($this->amount) @@ -78,6 +79,7 @@ class ApplyCreditPayment implements ShouldQueue $this->credit ->service() + ->markSent() ->setStatus(Credit::STATUS_PARTIAL) ->adjustBalance($this->amount * -1) ->updatePaidToDate($this->amount) diff --git a/app/Mail/Engine/InvoiceEmailEngine.php b/app/Mail/Engine/InvoiceEmailEngine.php index 9ede43715dc8..afe907d348b6 100644 --- a/app/Mail/Engine/InvoiceEmailEngine.php +++ b/app/Mail/Engine/InvoiceEmailEngine.php @@ -136,4 +136,4 @@ class InvoiceEmailEngine extends BaseEmailEngine return $this; } -} +} \ No newline at end of file diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index 69557674a4f7..4f8e221b0634 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -18,6 +18,7 @@ use App\Models\ClientContact; use App\Models\User; use App\Services\PdfMaker\Designs\Utilities\DesignHelpers; use App\Utils\HtmlEngine; +use App\Utils\Ninja; use App\Utils\TemplateEngine; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; @@ -114,6 +115,10 @@ class TemplateEmail extends Mailable $message->invitation = $this->invitation; }); + /*In the hosted platform we need to slow things down a little for Storage to catch up.*/ + if(Ninja::isHosted()) + sleep(1); + foreach ($this->build_email->getAttachments() as $file) { if(is_string($file))