mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
improvements for validation of over/under payments
This commit is contained in:
parent
0605154d73
commit
78f79a341e
@ -83,4 +83,4 @@ class ProcessPayment extends Component
|
|||||||
|
|
||||||
return render($this->payment_view, $this->payment_data_payload);
|
return render($this->payment_view, $this->payment_data_payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,4 +75,4 @@ class UnderOverPayment extends Component
|
|||||||
{
|
{
|
||||||
return render('flow2.under-over-payments');
|
return render('flow2.under-over-payments');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,8 @@ class InvoicePay extends Component
|
|||||||
$client = $invite->contact->client;
|
$client = $invite->contact->client;
|
||||||
$settings = $client->getMergedSettings();
|
$settings = $client->getMergedSettings();
|
||||||
$this->context['settings'] = $settings;
|
$this->context['settings'] = $settings;
|
||||||
|
$this->context['db'] = $this->db;
|
||||||
|
|
||||||
$invoices = Invoice::find($this->transformKeys($this->invoices));
|
$invoices = Invoice::find($this->transformKeys($this->invoices));
|
||||||
$invoices = $invoices->filter(function ($i){
|
$invoices = $invoices->filter(function ($i){
|
||||||
|
|
||||||
@ -166,7 +167,6 @@ class InvoicePay extends Component
|
|||||||
//under-over / payment
|
//under-over / payment
|
||||||
|
|
||||||
//required fields
|
//required fields
|
||||||
|
|
||||||
$this->terms_accepted = !$settings->show_accept_invoice_terms;
|
$this->terms_accepted = !$settings->show_accept_invoice_terms;
|
||||||
$this->signature_accepted = !$settings->require_invoice_signature;
|
$this->signature_accepted = !$settings->require_invoice_signature;
|
||||||
$this->under_over_payment = $settings->client_portal_allow_over_payment || $settings->client_portal_allow_under_payment;
|
$this->under_over_payment = $settings->client_portal_allow_over_payment || $settings->client_portal_allow_under_payment;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div x-data="{ payableInvoices: @entangle('payableInvoices'), errors: @entangle('errors') }" class="px-4 py-5 bg-white sm:gap-4 sm:px-6">
|
<div x-data="{ payableInvoices: @entangle('payableInvoices'), errors: @entangle('errors') }" class="px-4 py-5 bg-white sm:gap-4 sm:px-6">
|
||||||
|
|
||||||
<dt class="text-sm font-medium leading-5 text-gray-500">
|
<dt class="text-sm font-medium leading-5 text-gray-500 mb-3">
|
||||||
{{ ctrans('texts.payment_amount') }}
|
{{ ctrans('texts.payment_amount') }}
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2 flex flex-col">
|
<dd class="text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2 flex flex-col">
|
||||||
@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
<template x-for="(invoice, index) in payableInvoices" :key="index">
|
<template x-for="(invoice, index) in payableInvoices" :key="index">
|
||||||
|
|
||||||
<div class="flex items-center">
|
<div class="flex items-center mb-2">
|
||||||
<label>
|
<label>
|
||||||
<span x-text="'{{ ctrans('texts.invoice') }} ' + invoice.number" class="mt-2"></span>
|
<span x-text="'{{ ctrans('texts.invoice') }} ' + invoice.number" class="mt-2"></span>
|
||||||
<span>{{ $currency->code }} ({{ $currency->symbol }})</span>
|
<span class="pr-2">{{ $currency->code }} ({{ $currency->symbol }})</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="input mt-0 mr-4 relative"
|
class="input mt-0 mr-4 relative"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user