1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 17:01:33 +02:00
invoiceninja/resources/views/portal/ninja2020/invoices/show.blade.php

80 lines
4.3 KiB
PHP
Raw Normal View History

2020-03-23 18:10:42 +01:00
@extends('portal.ninja2020.layout.app')
@section('meta_title', ctrans('texts.view_invoice'))
@push('head')
2021-02-18 13:37:27 +01:00
<meta name="show-invoice-terms" content="{{ $settings->show_accept_invoice_terms ? true : false }}">
<meta name="require-invoice-signature" content="{{ $client->user->account->hasFeature(\App\Models\Account::FEATURE_INVOICE_SETTINGS) && $settings->require_invoice_signature }}">
2021-02-18 13:37:27 +01:00
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
@endpush
2020-03-23 18:10:42 +01:00
@section('body')
2020-11-16 15:37:09 +01:00
@if(!$invoice->isPayable() && $client->getSetting('custom_message_paid_invoice'))
@component('portal.ninja2020.components.message')
2020-11-16 15:37:09 +01:00
{{ $client->getSetting('custom_message_paid_invoice') }}
@endcomponent
@endif
2020-03-23 18:10:42 +01:00
@if($invoice->isPayable())
2021-02-18 13:37:27 +01:00
<form action="{{ ($settings->client_portal_allow_under_payment || $settings->client_portal_allow_over_payment) ? route('client.invoices.bulk') : route('client.payments.process') }}" method="post" id="payment-form">
2020-03-23 18:10:42 +01:00
@csrf
2021-02-18 13:37:27 +01:00
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
<input type="hidden" name="action" value="payment">
<input type="hidden" name="company_gateway_id" id="company_gateway_id">
<input type="hidden" name="payment_method_id" id="payment_method_id">
<input type="hidden" name="signature">
<input type="hidden" name="payable_invoices[0][amount]" value="{{ $invoice->partial > 0 ? \App\Utils\Number::formatValue($invoice->partial, $invoice->client->currency()) : \App\Utils\Number::formatValue($invoice->balance, $invoice->client->currency()) }}">
<input type="hidden" name="payable_invoices[0][invoice_id]" value="{{ $invoice->hashed_id }}">
2020-03-23 18:10:42 +01:00
<div class="bg-white shadow sm:rounded-lg mb-4" translate>
<div class="px-4 py-5 sm:p-6">
<div class="sm:flex sm:items-start sm:justify-between">
<div>
<h3 class="text-lg leading-6 font-medium text-gray-900">
2021-02-18 13:37:27 +01:00
{{ ctrans('texts.invoice_number_placeholder', ['invoice' => $invoice->number])}}
- {{ ctrans('texts.unpaid') }}
2020-03-23 18:10:42 +01:00
</h3>
</div>
2021-06-17 17:12:43 +02:00
<div class="mt-5 sm:mt-0 sm:ml-6 flex justify-end">
2020-03-23 18:10:42 +01:00
<div class="inline-flex rounded-md shadow-sm">
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
<input type="hidden" name="action" value="payment">
2021-02-18 13:37:27 +01:00
@if($settings->client_portal_allow_under_payment || $settings->client_portal_allow_over_payment)
<button class="button button-primary bg-primary">{{ ctrans('texts.pay_now') }}</button>
@else
@livewire('pay-now-dropdown', ['total' => $invoice->partial > 0 ? $invoice->partial : $invoice->balance, 'company' => $company])
2021-02-18 13:37:27 +01:00
@endif
2020-03-23 18:10:42 +01:00
</div>
</div>
</div>
</div>
</div>
</form>
@else
2021-02-18 13:37:27 +01:00
<div class="bg-white shadow sm:rounded-lg mb-4">
<div class="px-4 py-5 sm:p-6">
<div class="sm:flex sm:items-start sm:justify-between">
<div>
<h3 class="text-lg leading-6 font-medium text-gray-900">
{{ ctrans('texts.invoice_number_placeholder', ['invoice' => $invoice->number])}}
2021-03-22 11:06:42 +01:00
- {{ \App\Models\Invoice::stringStatus($invoice->status_id) }}
2021-02-18 13:37:27 +01:00
</h3>
</div>
</div>
</div>
</div>
2020-03-23 18:10:42 +01:00
@endif
2021-06-30 20:41:03 +02:00
@include('portal.ninja2020.components.entity-documents', ['entity' => $invoice])
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $invoice])
2021-02-18 13:37:27 +01:00
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$invoice], 'entity_type' => ctrans('texts.invoice')])
@include('portal.ninja2020.invoices.includes.signature')
@endsection
2020-03-23 18:10:42 +01:00
@section('footer')
2021-02-18 13:37:27 +01:00
<script src="{{ asset('js/clients/invoices/payment.js') }}"></script>
2020-03-23 18:10:42 +01:00
@endsection