mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 19:14:35 -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();
|
$client_contact = auth()->user();
|
||||||
|
|
||||||
$data['quotes'] = Quote::whereIn('id', $ids)
|
$data['quotes'] = Quote::whereIn('id', $ids)
|
||||||
->whereClientId($client_contact->client->id)
|
->where('client_id', $client_contact->client_id)
|
||||||
->withTrashed()
|
->withTrashed()
|
||||||
->get();
|
->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
|
//forward client to the invoice if it exists
|
||||||
if ($quote->invoice()->exists()) {
|
if ($quotes->first()->invoice()->exists()) {
|
||||||
return redirect()->route('client.invoice.show', $quote->invoice->hashed_id);
|
return redirect()->route('client.invoice.show', $quotes->first()->invoice->hashed_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
|
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
|
||||||
|
@ -17,5 +17,5 @@ parameters:
|
|||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::company\(\)#'
|
- '#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\\_]+::entityFilter\(\)#'
|
||||||
- '#Call to an undefined method [a-zA-Z0-9\\_]+::withTrashed()\(\)#'
|
- '#Call to an undefined method [a-zA-Z0-9\\_]+::withTrashed\(\)#'
|
||||||
- '#Undefined method#'
|
- '#Undefined method#'
|
@ -4,6 +4,7 @@
|
|||||||
@push('head')
|
@push('head')
|
||||||
<meta name="show-quote-terms" content="{{ $settings->show_accept_quote_terms ? true : false }}">
|
<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="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>
|
<script src="{{ asset('vendor/signature_pad@2.3.2/signature_pad.min.js') }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@ -41,7 +42,7 @@
|
|||||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg mb-4">
|
<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">
|
<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">
|
<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) }}">
|
<a class="button-link text-primary" href="{{ route('client.quote.show', $quote->hashed_id) }}">
|
||||||
({{ $quote->number }})
|
({{ $quote->number }})
|
||||||
</a>
|
</a>
|
||||||
@ -82,11 +83,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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.terms', ['entities' => $quotes, 'entity_type' => ctrans('texts.quote')])
|
||||||
@include('portal.ninja2020.invoices.includes.signature')
|
@include('portal.ninja2020.invoices.includes.signature')
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user