diff --git a/app/Factory/CloneQuoteToInvoiceFactory.php b/app/Factory/CloneQuoteToInvoiceFactory.php index 4b0eb4f91e62..936ca18c5706 100644 --- a/app/Factory/CloneQuoteToInvoiceFactory.php +++ b/app/Factory/CloneQuoteToInvoiceFactory.php @@ -46,7 +46,14 @@ class CloneQuoteToInvoiceFactory $invoice->date = now()->format('Y-m-d'); $invoice->balance = 0; $invoice->deleted_at = null; - + $invoice->next_send_date = null; + $invoice->reminder1_sent = null; + $invoice->reminder2_sent = null; + $invoice->reminder3_sent = null; + $invoice->reminder_last_sent = null; + $invoice->last_sent_date = null; + $invoice->last_viewed = null; + return $invoice; } } diff --git a/app/Http/Controllers/ClientPortal/DocumentController.php b/app/Http/Controllers/ClientPortal/DocumentController.php index 54d25ea99d90..fe48891b05bf 100644 --- a/app/Http/Controllers/ClientPortal/DocumentController.php +++ b/app/Http/Controllers/ClientPortal/DocumentController.php @@ -15,6 +15,7 @@ namespace App\Http\Controllers\ClientPortal; use App\Http\Controllers\Controller; use App\Http\Requests\ClientPortal\Documents\ShowDocumentRequest; use App\Http\Requests\Document\DownloadMultipleDocumentsRequest; +use App\Libraries\MultiDB; use App\Models\Document; use App\Utils\TempFile; use App\Utils\Traits\MakesHash; @@ -55,6 +56,8 @@ class DocumentController extends Controller public function publicDownload(string $document_hash) { + MultiDB::documentFindAndSetDb($document_hash); + $document = Document::where('hash', $document_hash)->firstOrFail(); $headers = []; diff --git a/app/Services/Quote/QuoteService.php b/app/Services/Quote/QuoteService.php index a16210bf5be1..dcc4016e802b 100644 --- a/app/Services/Quote/QuoteService.php +++ b/app/Services/Quote/QuoteService.php @@ -124,10 +124,10 @@ class QuoteService } - if ($this->quote->client->getSetting('auto_archive_quote')) { - $quote_repo = new QuoteRepository(); - $quote_repo->archive($this->quote); - } + // if ($this->quote->client->getSetting('auto_archive_quote')) { + // $quote_repo = new QuoteRepository(); + // $quote_repo->archive($this->quote); + // } return $this; }