1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #4667 from beganovich/v5-fix-minimum-enter-submitting

(v5) Improvements on payments page
This commit is contained in:
David Bomba 2021-01-12 08:19:45 +11:00 committed by GitHub
commit a0cbfd350a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@
@endpush
@section('body')
<form action="{{ route('client.payments.process') }}" method="post" id="payment-form">
<form action="{{ route('client.payments.process') }}" method="post" id="payment-form" onkeypress="return event.keyCode != 13;">
@csrf
<input type="hidden" name="company_gateway_id" id="company_gateway_id">
<input type="hidden" name="payment_method_id" id="payment_method_id">
@ -118,21 +118,28 @@
<!-- App\Utils\Number::formatMoney($invoice->amount, $invoice->client) -->
<!-- Disabled input field don't send it's value with request. -->
@if(!$settings->client_portal_allow_under_payment && !$settings->client_portal_allow_over_payment)
<input
name="payable_invoices[{{$key}}][amount]"
value="{{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }}"
class="mt-1 text-sm text-gray-800"
readonly />
<label>
{{ $invoice->client->currency()->code }} ({{ $invoice->client->currency()->symbol }})
<input
name="payable_invoices[{{$key}}][amount]"
value="{{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }}"
class="mt-1 text-sm text-gray-800"
readonly />
</label>
@else
<div class="flex items-center">
<input
type="text"
class="input mt-0 mr-4 relative"
name="payable_invoices[{{$key}}][amount]"
value="{{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }}"/>
<label>
<span class="mt-2">{{ $invoice->client->currency()->code }} ({{ $invoice->client->currency()->symbol }})</span>
<input
type="text"
class="input mt-0 mr-4 relative"
name="payable_invoices[{{$key}}][amount]"
value="{{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }}"/>
</label>
</div>
@endif
@endif
@if($settings->client_portal_allow_under_payment)
<span class="mt-1 text-sm text-gray-800">{{ ctrans('texts.minimum_payment') }}: {{ $settings->client_portal_under_payment_minimum }}</span>
@ -156,4 +163,4 @@
@push('footer')
<script src="{{ asset('js/clients/invoices/payment.js') }}"></script>
@endpush
@endpush