mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Allow draft quotes to be approved if accessed directly
This commit is contained in:
parent
8fbab48019
commit
f6686c7df5
@ -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();
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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]))
|
||||
<div class="mb-4">
|
||||
@include('portal.ninja2020.quotes.includes.actions', ['quote' => $quote])
|
||||
</div>
|
||||
@elseif($quote->status_id === \App\Models\Quote::STATUS_APPROVED)
|
||||
<p class="text-right text-gray-900 text-sm mb-4">{{ ctrans('texts.approved') }}</p>
|
||||
@else
|
||||
<p class="text-right text-gray-900 text-sm mb-4">{{ ctrans('texts.quotes_with_status_sent_can_be_approved') }}</p>
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $quote])
|
||||
|
Loading…
x
Reference in New Issue
Block a user