diff --git a/app/Http/Controllers/ClientPortal/QuoteController.php b/app/Http/Controllers/ClientPortal/QuoteController.php index 1b0fa8214428..b58dd13b3425 100644 --- a/app/Http/Controllers/ClientPortal/QuoteController.php +++ b/app/Http/Controllers/ClientPortal/QuoteController.php @@ -160,7 +160,7 @@ class QuoteController extends Controller $quotes = Quote::whereIn('id', $ids) ->where('client_id', auth('contact')->user()->client->id) ->where('company_id', auth('contact')->user()->client->company_id) - ->where('status_id', Quote::STATUS_SENT) + ->whereIn('status_id', [Quote::STATUS_DRAFT, Quote::STATUS_SENT]) ->withTrashed() ->get(); diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index a38464c89a1d..50e7249d0b05 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -79,7 +79,7 @@ class InvoiceService public function setExchangeRate() { - if($this->invoice->exchange_rate != 0) + if($this->invoice->exchange_rate != 1) return $this; $client_currency = $this->invoice->client->getSetting('currency_id'); diff --git a/resources/views/portal/ninja2020/quotes/show.blade.php b/resources/views/portal/ninja2020/quotes/show.blade.php index 7d805fbab895..7a9b506338d1 100644 --- a/resources/views/portal/ninja2020/quotes/show.blade.php +++ b/resources/views/portal/ninja2020/quotes/show.blade.php @@ -21,14 +21,12 @@ @endcomponent @endif - @if($quote->status_id === \App\Models\Quote::STATUS_SENT) + @if(in_array($quote->status_id, [\App\Models\Quote::STATUS_SENT, \App\Models\Quote::STATUS_DRAFT]))
{{ ctrans('texts.approved') }}
- @else -{{ ctrans('texts.quotes_with_status_sent_can_be_approved') }}
@endif @include('portal.ninja2020.components.entity-documents', ['entity' => $quote])