mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for bulk quote approval
This commit is contained in:
parent
9af4d3fe6c
commit
5dfb031621
@ -96,7 +96,7 @@ class QuoteController extends Controller
|
||||
$client_contact = auth()->user();
|
||||
|
||||
$data['quotes'] = Quote::whereIn('id', $ids)
|
||||
->whereClientId($client_contact->client->id)
|
||||
->where('client_id', $client_contact->client_id)
|
||||
->withTrashed()
|
||||
->get();
|
||||
|
||||
@ -195,10 +195,10 @@ class QuoteController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
if (count($ids) == 1) {
|
||||
if ($quotes->count() == 1) {
|
||||
//forward client to the invoice if it exists
|
||||
if ($quote->invoice()->exists()) {
|
||||
return redirect()->route('client.invoice.show', $quote->invoice->hashed_id);
|
||||
if ($quotes->first()->invoice()->exists()) {
|
||||
return redirect()->route('client.invoice.show', $quotes->first()->invoice->hashed_id);
|
||||
}
|
||||
|
||||
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
|
||||
|
@ -17,5 +17,5 @@ parameters:
|
||||
ignoreErrors:
|
||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::company\(\)#'
|
||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::entityFilter\(\)#'
|
||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::withTrashed()\(\)#'
|
||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::withTrashed\(\)#'
|
||||
- '#Undefined method#'
|
@ -4,6 +4,7 @@
|
||||
@push('head')
|
||||
<meta name="show-quote-terms" content="{{ $settings->show_accept_quote_terms ? true : false }}">
|
||||
<meta name="require-quote-signature" content="{{ $client->company->account->hasFeature(\App\Models\Account::FEATURE_INVOICE_SETTINGS) && $settings->require_quote_signature }}">
|
||||
<meta name="accept-user-input" content="{{ $client->getSetting('accept_client_input_quote_approval') }}">
|
||||
<script src="{{ asset('vendor/signature_pad@2.3.2/signature_pad.min.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@ -41,7 +42,7 @@
|
||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg mb-4">
|
||||
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||
{{ ctrans('texts.invoice') }}
|
||||
{{ ctrans('texts.quote') }}
|
||||
<a class="button-link text-primary" href="{{ route('client.quote.show', $quote->hashed_id) }}">
|
||||
({{ $quote->number }})
|
||||
</a>
|
||||
@ -82,11 +83,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
@include('portal.ninja2020.quotes.includes.user-input')
|
||||
@include('portal.ninja2020.invoices.includes.terms', ['entities' => $quotes, 'entity_type' => ctrans('texts.quote')])
|
||||
@include('portal.ninja2020.invoices.includes.signature')
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
@push('footer')
|
||||
|
Loading…
x
Reference in New Issue
Block a user