diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 6feca01c1727..1e64f0ec1c10 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -471,12 +471,12 @@ class CompanySettings extends BaseSettings public $client_initiated_payments_minimum = 0; - public $client_initiated_payments_recurring = false; + // public $client_initiated_payments_recurring = false; public $sync_invoice_quote_columns = true; public static $casts = [ - 'client_initiated_payments_recurring'=> 'bool', + // 'client_initiated_payments_recurring'=> 'bool', 'client_initiated_payments' => 'bool', 'client_initiated_payments_minimum' => 'float', 'sync_invoice_quote_columns' => 'bool', @@ -505,7 +505,6 @@ class CompanySettings extends BaseSettings 'purchase_order_design_id' => 'string', 'purchase_order_footer' => 'string', 'purchase_order_number_pattern' => 'string', - 'purchase_order_number_counter' => 'int', 'page_numbering_alignment' => 'string', 'page_numbering' => 'bool', 'auto_archive_invoice_cancelled' => 'bool', @@ -537,7 +536,6 @@ class CompanySettings extends BaseSettings 'reminder_send_time' => 'int', 'email_sending_method' => 'string', 'gmail_sending_user_id' => 'string', - 'currency_id' => 'string', 'counter_number_applied' => 'string', 'quote_number_applied' => 'string', 'email_subject_custom1' => 'string', diff --git a/app/Export/CSV/InvoiceItemExport.php b/app/Export/CSV/InvoiceItemExport.php index 5a58f78ab356..10841508ab62 100644 --- a/app/Export/CSV/InvoiceItemExport.php +++ b/app/Export/CSV/InvoiceItemExport.php @@ -34,6 +34,8 @@ class InvoiceItemExport extends BaseExport 'amount' => 'amount', 'balance' => 'balance', 'client' => 'client_id', + 'client_number' => 'client.number', + 'client_id_number' => 'client.id_number', 'custom_surcharge1' => 'custom_surcharge1', 'custom_surcharge2' => 'custom_surcharge2', 'custom_surcharge3' => 'custom_surcharge3', @@ -198,6 +200,8 @@ class InvoiceItemExport extends BaseExport // if(in_array('client_id', $this->input['report_keys'])) $entity['client'] = $invoice->client->present()->name(); + $entity['client_id_number'] = $invoice->client->id_number; + $entity['client_number'] = $invoice->client->number; // if(in_array('status_id', $this->input['report_keys'])) $entity['status'] = $invoice->stringStatus($invoice->status_id); diff --git a/app/Http/Controllers/ClientPortal/PrePaymentController.php b/app/Http/Controllers/ClientPortal/PrePaymentController.php index 1fb91c04a5ab..107cbac6d95e 100644 --- a/app/Http/Controllers/ClientPortal/PrePaymentController.php +++ b/app/Http/Controllers/ClientPortal/PrePaymentController.php @@ -38,11 +38,16 @@ class PrePaymentController extends Controller */ public function index() { + $client = auth()->guard('contact')->user()->client; + $minimum = $client->getSetting('client_initiated_payments_minimum'); + $minimum_amount = $minimum == 0 ? "" : Number::formatMoney($minimum, $client); + $data = [ - 'title' => ctrans('texts.amount'). " " .auth()->guard('contact')->user()->client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")", - 'allows_recurring' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_recurring'), + 'title' => ctrans('texts.amount'). " " .$client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")", + // 'allows_recurring' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_recurring'), 'allows_recurring' => true, - 'minimum_amount' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_minimum'), + 'minimum' => $minimum, + 'minimum_amount' => $minimum_amount, ]; return $this->render('pre_payments.index', $data); diff --git a/app/Http/Controllers/ClientPortal/SubscriptionController.php b/app/Http/Controllers/ClientPortal/SubscriptionController.php index 73a32f6b47de..17d910fe0ea3 100644 --- a/app/Http/Controllers/ClientPortal/SubscriptionController.php +++ b/app/Http/Controllers/ClientPortal/SubscriptionController.php @@ -19,22 +19,28 @@ use App\Utils\Ninja; class SubscriptionController extends Controller { + /** + * This function is used to display the subscription page. + * + * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory + */ + public function index() { - if (Ninja::isHosted()) { - $count = RecurringInvoice::query() - ->where('client_id', auth()->guard('contact')->user()->client->id) - ->where('company_id', auth()->guard('contact')->user()->client->company_id) - ->where('status_id', RecurringInvoice::STATUS_ACTIVE) - ->where('is_deleted', 0) - ->whereNotNull('subscription_id') - ->withTrashed() - ->count(); + // if (Ninja::isHosted()) { + // $count = RecurringInvoice::query() + // ->where('client_id', auth()->guard('contact')->user()->client->id) + // ->where('company_id', auth()->guard('contact')->user()->client->company_id) + // ->where('status_id', RecurringInvoice::STATUS_ACTIVE) + // ->where('is_deleted', 0) + // ->whereNotNull('subscription_id') + // ->withTrashed() + // ->count(); - if ($count == 0) { - return redirect()->route('client.ninja_contact_login', ['contact_key' => auth()->guard('contact')->user()->contact_key, 'company_key' => auth()->guard('contact')->user()->company->company_key]); - } - } + // if ($count == 0) { + // return redirect()->route('client.ninja_contact_login', ['contact_key' => auth()->guard('contact')->user()->contact_key, 'company_key' => auth()->guard('contact')->user()->company->company_key]); + // } + // } return render('subscriptions.index'); } @@ -44,7 +50,6 @@ class SubscriptionController extends Controller * * @param ShowRecurringInvoiceRequest $request * @param RecurringInvoice $recurring_invoice - * @return Factory|View */ public function show(ShowRecurringInvoiceRequest $request, RecurringInvoice $recurring_invoice) { diff --git a/app/Http/Controllers/EmailController.php b/app/Http/Controllers/EmailController.php index 3899dbf76620..6eb974f33161 100644 --- a/app/Http/Controllers/EmailController.php +++ b/app/Http/Controllers/EmailController.php @@ -136,7 +136,7 @@ class EmailController extends BaseController $mo->email_template_body = $request->input('template'); $mo->email_template_subject = str_replace("template", "subject", $request->input('template')); - if ($request->has('cc_email')) { + if ($request->has('cc_email') && $request->cc_email) { $mo->cc[] = new Address($request->cc_email); } diff --git a/app/Http/Requests/ClientPortal/PrePayments/StorePrePaymentRequest.php b/app/Http/Requests/ClientPortal/PrePayments/StorePrePaymentRequest.php index f596ef2e6295..baa5e2a903f5 100644 --- a/app/Http/Requests/ClientPortal/PrePayments/StorePrePaymentRequest.php +++ b/app/Http/Requests/ClientPortal/PrePayments/StorePrePaymentRequest.php @@ -26,7 +26,17 @@ class StorePrePaymentRequest extends FormRequest { return [ 'notes' => 'required|bail|', - 'amount' => 'required|bail|', + 'amount' => 'required|bail|gte:minimum_amount', + 'minimum_amount' => '', ]; } + + public function prepareForValidation() + { + $input = $this->all(); + + + $this->replace($input); + + } } diff --git a/app/Http/Requests/Email/SendEmailRequest.php b/app/Http/Requests/Email/SendEmailRequest.php index c6d16d54c604..66a80e3f61eb 100644 --- a/app/Http/Requests/Email/SendEmailRequest.php +++ b/app/Http/Requests/Email/SendEmailRequest.php @@ -43,7 +43,7 @@ class SendEmailRequest extends Request 'template' => 'bail|required', 'entity' => 'bail|required', 'entity_id' => 'bail|required', - 'cc_email' => 'bail|sometimes|email', + 'cc_email' => 'bail|sometimes|email|nullable', ]; } diff --git a/app/Http/ViewComposers/PortalComposer.php b/app/Http/ViewComposers/PortalComposer.php index 4ab484917709..2f618b5277f8 100644 --- a/app/Http/ViewComposers/PortalComposer.php +++ b/app/Http/ViewComposers/PortalComposer.php @@ -138,9 +138,9 @@ class PortalComposer $data[] = ['title' => ctrans('texts.subscriptions'), 'url' => 'client.subscriptions.index', 'icon' => 'calendar']; } - // if (property_exists($this->settings, 'client_initiated_payments') && $this->settings->client_initiated_payments) { + if (auth()->guard('contact')->user()->client->getSetting('client_initiated_payments')) { $data[] = ['title' => ctrans('texts.pre_payment'), 'url' => 'client.pre_payments.index', 'icon' => 'dollar-sign']; - // } + } return $data; } diff --git a/app/Jobs/Mail/PaymentFailedMailer.php b/app/Jobs/Mail/PaymentFailedMailer.php index c5fa3c14dbcc..4408637ba2b1 100644 --- a/app/Jobs/Mail/PaymentFailedMailer.php +++ b/app/Jobs/Mail/PaymentFailedMailer.php @@ -65,8 +65,8 @@ class PaymentFailedMailer implements ShouldQueue */ public function handle() { - if (!is_string($this->error)) { - $this->error = "Payment failed, no reason given."; + if (!is_string($this->error) || strlen($this->error) <=1) { + $this->error = ""; } //Set DB diff --git a/app/Jobs/Subscription/CleanStaleInvoiceOrder.php b/app/Jobs/Subscription/CleanStaleInvoiceOrder.php index 6d042ccd8209..f0912aefbcfc 100644 --- a/app/Jobs/Subscription/CleanStaleInvoiceOrder.php +++ b/app/Jobs/Subscription/CleanStaleInvoiceOrder.php @@ -37,6 +37,8 @@ class CleanStaleInvoiceOrder implements ShouldQueue */ public function handle(InvoiceRepository $repo) : void { + nlog("Cleaning Stale Invoices:"); + if (! config('ninja.db.multi_db_enabled')) { Invoice::query() ->withTrashed() diff --git a/app/Mail/Admin/ClientPaymentFailureObject.php b/app/Mail/Admin/ClientPaymentFailureObject.php index ee62778f6bd0..d8516e02f6d7 100644 --- a/app/Mail/Admin/ClientPaymentFailureObject.php +++ b/app/Mail/Admin/ClientPaymentFailureObject.php @@ -124,6 +124,10 @@ class ClientPaymentFailureObject 'company' => $this->company, ]; + if (strlen($this->error > 1)) { + $data['content'] .= "\n\n".$this->error; + } + return $data; } } diff --git a/app/Mail/Admin/PaymentFailureObject.php b/app/Mail/Admin/PaymentFailureObject.php index 8b484be26ee8..3d0297cd212f 100644 --- a/app/Mail/Admin/PaymentFailureObject.php +++ b/app/Mail/Admin/PaymentFailureObject.php @@ -120,6 +120,10 @@ class PaymentFailureObject 'additional_info' => $this->error, ]; + if (strlen($this->error > 1)) { + $data['content'] .= "\n\n".$this->error; + } + return $data; } diff --git a/app/PaymentDrivers/GoCardless/ACH.php b/app/PaymentDrivers/GoCardless/ACH.php index f84b319e9199..66e24ba2dc3e 100644 --- a/app/PaymentDrivers/GoCardless/ACH.php +++ b/app/PaymentDrivers/GoCardless/ACH.php @@ -30,6 +30,7 @@ use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; +//@deprecated class ACH implements MethodInterface { use MakesHash; @@ -172,10 +173,13 @@ class ACH implements MethodInterface $description = "Amount {$request->amount} from client {$this->go_cardless->client->present()->name()}"; } + $amount = $this->go_cardless->convertToGoCardlessAmount($this->go_cardless->payment_hash?->amount_with_fee(), $this->go_cardless->client->currency()->precision); + try { $payment = $this->go_cardless->gateway->payments()->create([ 'params' => [ - 'amount' => $request->amount, + // 'amount' => $request->amount, + 'amount' => $amount, 'currency' => $request->currency, 'description' => $description, 'metadata' => [ diff --git a/app/PaymentDrivers/GoCardless/DirectDebit.php b/app/PaymentDrivers/GoCardless/DirectDebit.php index 4de93dc8dfc8..81bb8c105b78 100644 --- a/app/PaymentDrivers/GoCardless/DirectDebit.php +++ b/app/PaymentDrivers/GoCardless/DirectDebit.php @@ -49,37 +49,97 @@ class DirectDebit implements MethodInterface * @return Redirector|RedirectResponse|void */ public function authorizeView(array $data) + { + return $this->billingRequestFlows($data); + // $session_token = \Illuminate\Support\Str::uuid()->toString(); + + // try { + // $redirect = $this->go_cardless->gateway->redirectFlows()->create([ + // 'params' => [ + // 'session_token' => $session_token, + // 'success_redirect_url' => route('client.payment_methods.confirm', [ + // 'method' => GatewayType::DIRECT_DEBIT, + // 'session_token' => $session_token, + // ]), + // 'prefilled_customer' => [ + // 'given_name' => auth()->guard('contact')->user()->first_name ?: '', + // 'family_name' => auth()->guard('contact')->user()->last_name ?: '', + // 'email' => auth()->guard('contact')->user()->email ?: '', + // 'address_line1' => auth()->guard('contact')->user()->client->address1 ?: '', + // 'city' => auth()->guard('contact')->user()->client->city ?: '', + // 'postal_code' => auth()->guard('contact')->user()->client->postal_code ?: '', + // 'country_code' => auth()->guard('contact')->user()->client->country->iso_3166_2, + // ], + // ], + // ]); + + // return redirect( + // $redirect->redirect_url + // ); + // } catch (\Exception $exception) { + // return $this->processUnsuccessfulAuthorization($exception); + // } + } + + /** + * Response + * { + * "billing_request_flows": { + * "authorisation_url": "https://pay.gocardless.com/flow/static/billing_request?id=", + * "lock_customer_details": false, + * "lock_bank_account": false, + * "auto_fulfil": true, + * "created_at": "2021-03-30T16:23:10.679Z", + * "expires_at": "2021-04-06T16:23:10.679Z", + * "redirect_uri": "https://my-company.com/completed", + * "links": { + * "billing_request": "BRQ123" + * } + * } + * } + * + * + */ + public function billingRequestFlows(array $data) { $session_token = \Illuminate\Support\Str::uuid()->toString(); + $exit_uri = route('client.payment_methods.index'); + + $response = $this->go_cardless->gateway->billingRequests()->create([ + "params" => [ + "mandate_request" => [ + "currency" => auth()->guard('contact')->user()->client->currency()->code + ] + ] + ]); try { - $redirect = $this->go_cardless->gateway->redirectFlows()->create([ - 'params' => [ - 'session_token' => $session_token, - 'success_redirect_url' => route('client.payment_methods.confirm', [ - 'method' => GatewayType::DIRECT_DEBIT, - 'session_token' => $session_token, - ]), - 'prefilled_customer' => [ - 'given_name' => auth()->guard('contact')->user()->first_name ?: '', - 'family_name' => auth()->guard('contact')->user()->last_name ?: '', - 'email' => auth()->guard('contact')->user()->email ?: '', - 'address_line1' => auth()->guard('contact')->user()->client->address1 ?: '', - 'city' => auth()->guard('contact')->user()->client->city ?: '', - 'postal_code' => auth()->guard('contact')->user()->client->postal_code ?: '', - 'country_code' => auth()->guard('contact')->user()->client->country->iso_3166_2, + $brf = $this->go_cardless->gateway->billingRequestFlows()->create([ + "params" => [ + "redirect_uri" => route('client.payment_methods.confirm', [ + 'method' => GatewayType::DIRECT_DEBIT, + 'session_token' => $session_token, + 'billing_request' => $response->id, + ]), + "exit_uri" => $exit_uri, + "links" => [ + "billing_request" => $response->id ], - ], + "show_redirect_buttons" => true, + "show_success_redirect_button" => true, + ] ]); - return redirect( - $redirect->redirect_url - ); + return redirect($brf->authorisation_url); + } catch (\Exception $exception) { + nlog($exception->getMessage()); return $this->processUnsuccessfulAuthorization($exception); } + } + /** * Handle unsuccessful authorization. * @@ -109,37 +169,68 @@ class DirectDebit implements MethodInterface */ public function authorizeResponse(Request $request) { - try { - $redirect_flow = $this->go_cardless->gateway->redirectFlows()->complete( - $request->redirect_flow_id, - ['params' => [ - 'session_token' => $request->session_token, - ]], - ); + + try{ + + $billing_request = $this->go_cardless->gateway->billingRequests()->get($request->billing_request); $payment_meta = new \stdClass; - $payment_meta->brand = ctrans('texts.payment_type_direct_debit'); - $payment_meta->type = GatewayType::DIRECT_DEBIT; - $payment_meta->state = 'authorized'; + $payment_meta->brand = $billing_request->resources->customer_bank_account->bank_name; + $payment_meta->type = $this->resolveScheme($billing_request->mandate_request->scheme); + $payment_meta->state = 'pending'; + $payment_meta->last4 = $billing_request->resources->customer_bank_account->account_number_ending; $data = [ 'payment_meta' => $payment_meta, - 'token' => $redirect_flow->links->mandate, - 'payment_method_id' => $this->resolveScheme($redirect_flow->scheme), + 'token' => $billing_request->mandate_request->links->mandate, + 'payment_method_id' => $this->resolveScheme($billing_request->mandate_request->scheme), ]; - $payment_method = $this->go_cardless->storeGatewayToken($data, ['gateway_customer_reference' => $redirect_flow->links->customer]); + $payment_method = $this->go_cardless->storeGatewayToken($data, ['gateway_customer_reference' => $billing_request->resources->customer->id]); + + $mandate = $this->go_cardless->gateway->mandates()->get($billing_request->mandate_request->links->mandate); + + nlog($mandate); return redirect()->route('client.payment_methods.show', $payment_method->hashed_id); - } catch (\Exception $exception) { + + } + catch (\Exception $exception) { return $this->processUnsuccessfulAuthorization($exception); } + + // try { + // $redirect_flow = $this->go_cardless->gateway->redirectFlows()->complete( + // $request->redirect_flow_id, + // ['params' => [ + // 'session_token' => $request->session_token, + // ]], + // ); + + // $payment_meta = new \stdClass; + // $payment_meta->brand = ctrans('texts.payment_type_direct_debit'); + // $payment_meta->type = GatewayType::DIRECT_DEBIT; + // $payment_meta->state = 'authorized'; + + // $data = [ + // 'payment_meta' => $payment_meta, + // 'token' => $redirect_flow->links->mandate, + // 'payment_method_id' => $this->resolveScheme($redirect_flow->scheme), + // ]; + + // $payment_method = $this->go_cardless->storeGatewayToken($data, ['gateway_customer_reference' => $redirect_flow->links->customer]); + + // return redirect()->route('client.payment_methods.show', $payment_method->hashed_id); + // } catch (\Exception $exception) { + // return $this->processUnsuccessfulAuthorization($exception); + // } } private function resolveScheme(string $scheme): int { match ($scheme) { 'sepa_core' => $type = GatewayType::SEPA, + 'ach' => $type = GatewayType::BANK_TRANSFER, default => $type = GatewayType::DIRECT_DEBIT, }; @@ -176,10 +267,13 @@ class DirectDebit implements MethodInterface $description = "Amount {$request->amount} from client {$this->go_cardless->client->present()->name()}"; } + $amount = $this->go_cardless->convertToGoCardlessAmount($this->go_cardless->payment_hash?->amount_with_fee(), $this->go_cardless->client->currency()->precision); + try { $payment = $this->go_cardless->gateway->payments()->create([ 'params' => [ - 'amount' => $request->amount, + // 'amount' => $request->amount, + 'amount' => $amount, 'currency' => $request->currency, 'description' => $description, 'metadata' => [ diff --git a/app/PaymentDrivers/GoCardless/SEPA.php b/app/PaymentDrivers/GoCardless/SEPA.php index c4950314d491..1a96bcc9fcde 100644 --- a/app/PaymentDrivers/GoCardless/SEPA.php +++ b/app/PaymentDrivers/GoCardless/SEPA.php @@ -172,10 +172,12 @@ class SEPA implements MethodInterface $description = "Amount {$request->amount} from client {$this->go_cardless->client->present()->name()}"; } + $amount = $this->go_cardless->convertToGoCardlessAmount($this->go_cardless->payment_hash?->amount_with_fee(), $this->go_cardless->client->currency()->precision); + try { $payment = $this->go_cardless->gateway->payments()->create([ 'params' => [ - 'amount' => $request->amount, + 'amount' => $amount, 'currency' => $request->currency, 'description' => $description, 'metadata' => [ diff --git a/app/PaymentDrivers/GoCardlessPaymentDriver.php b/app/PaymentDrivers/GoCardlessPaymentDriver.php index 869924adebf8..433ab7230f33 100644 --- a/app/PaymentDrivers/GoCardlessPaymentDriver.php +++ b/app/PaymentDrivers/GoCardlessPaymentDriver.php @@ -14,6 +14,7 @@ namespace App\PaymentDrivers; use App\Factory\ClientContactFactory; use App\Factory\ClientFactory; use App\Http\Requests\Payments\PaymentWebhookRequest; +use App\Jobs\Mail\PaymentFailedMailer; use App\Jobs\Util\SystemLogger; use App\Models\Client; use App\Models\ClientGatewayToken; @@ -46,7 +47,7 @@ class GoCardlessPaymentDriver extends BaseDriver private bool $completed = true; public static $methods = [ - GatewayType::BANK_TRANSFER => \App\PaymentDrivers\GoCardless\ACH::class, + GatewayType::BANK_TRANSFER => \App\PaymentDrivers\GoCardless\DirectDebit::class, GatewayType::DIRECT_DEBIT => \App\PaymentDrivers\GoCardless\DirectDebit::class, GatewayType::SEPA => \App\PaymentDrivers\GoCardless\SEPA::class, GatewayType::INSTANT_BANK_PAY => \App\PaymentDrivers\GoCardless\InstantBankPay::class, @@ -79,7 +80,7 @@ class GoCardlessPaymentDriver extends BaseDriver $this->client && isset($this->client->country) // && in_array($this->client->country->iso_3166_3, ['GBR']) - && in_array($this->client->currency()->code, ['EUR', 'GBP','DKK','SEK','AUD','NZD','USD']) + && in_array($this->client->currency()->code, ['EUR', 'GBP','DKK','SEK','AUD','NZD']) ) { $types[] = GatewayType::DIRECT_DEBIT; } @@ -242,7 +243,6 @@ class GoCardlessPaymentDriver extends BaseDriver $this->init(); nlog('GoCardless Event'); - nlog($request->all()); if (! $request->has('events')) { nlog('No GoCardless events to process in response?'); @@ -278,9 +278,26 @@ class GoCardlessPaymentDriver extends BaseDriver ->first(); if ($payment) { + if ($payment->status_id == Payment::STATUS_PENDING) { + $payment->service()->deletePayment(); + } + $payment->status_id = Payment::STATUS_FAILED; $payment->save(); - nlog('GoCardless completed'); + + $payment_hash = PaymentHash::where('payment_id', $payment->id)->first(); + $error = ''; + + if (isset($event['details']['description'])) { + $error = $event['details']['description']; + } + + PaymentFailedMailer::dispatch( + $payment_hash, + $payment->client->company, + $payment->client, + $error + ); } } diff --git a/resources/views/email/client/generic.blade.php b/resources/views/email/client/generic.blade.php index b54c9cbea741..187630d27fd9 100644 --- a/resources/views/email/client/generic.blade.php +++ b/resources/views/email/client/generic.blade.php @@ -21,17 +21,29 @@ @endisset @isset($url) - - - - +
- - {{ ctrans($button) }} +
+ + + + + -
+ + {{ ctrans($button) }} -
+
+ + @endisset diff --git a/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay.blade.php b/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay.blade.php index da00715475fa..ac8071c3563b 100644 --- a/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay.blade.php @@ -22,7 +22,7 @@ @endforeach diff --git a/resources/views/portal/ninja2020/pre_payments/index.blade.php b/resources/views/portal/ninja2020/pre_payments/index.blade.php index 0e3498850c35..29300554b66a 100644 --- a/resources/views/portal/ninja2020/pre_payments/index.blade.php +++ b/resources/views/portal/ninja2020/pre_payments/index.blade.php @@ -34,16 +34,16 @@ @endif @endcomponent + @component('portal.ninja2020.components.general.card-element', ['title' => $title]) + placeholder=""/> - @if($minimum_amount > 0) + @if($minimum > 0)

{{ ctrans('texts.minimum_required_payment', ['amount' => $minimum_amount])}}

@endif @@ -62,9 +62,9 @@
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.number_of_payments')])