@extends('layouts/client') @section('title', __('client.invoices.details')) @section('scripts') @section('content')
@include('shared/alerts')
{{ setting('app_name') }}

{{ __('global.invoice') }} #

{{ $invoice->identifier() }}
{!! nl2br(setting('app_address')) !!}

{{ __('client.invoices.billto', ['name' => $address[0]]) }}

@foreach ($address as $i => $line) @if ($i == 0) @continue @endif {{ $line }}
@endforeach
{{ __('client.invoices.invoice_date') }}:
{{ $invoice->created_at->format('d/m/y H:i') }}
{{ __('client.invoices.due_date') }}:
{{ $invoice->due_date->format('d/m/y H:i') }}
{{ __('global.status') }}:
@foreach ($invoice->items as $item)
{{ __('client.invoices.itemname') }}

{{ $item->name }}

@if ($item->canDisplayDescription())

{!! nl2br($item->description) !!}

@endif @if ($item->getDiscount(false) != null)

{{ $item->getDiscountLabel() }}

@endif
{{ __('client.invoices.qty') }}

{{ $item->quantity }}

{{ __('store.unit_price') }}

{{ formatted_price($item->unit_price_ht, $invoice->currency) }}

@if ($item->getDiscount() != null && $item->getDiscount(true)->sub_price != 0)

-{{ formatted_price($item->getDiscount()->sub_price, $invoice->currency) }}

@endif
{{ __('store.setup_price') }}

{{ formatted_price($item->unit_setup_ht, $invoice->currency) }}

@if ($item->getDiscount() != null && $item->getDiscount(true)->sub_setup != 0)

-{{ formatted_price($item->getDiscount()->sub_setup, $invoice->currency) }}

@endif
{{ __('store.price') }}

{{ formatted_price($item->price(), $invoice->currency) }}

@if ($item->getDiscount() != null && $item->getDiscount(true)->sub_setup != 0 || $item->getDiscount()->sub_price != 0)

-{{ formatted_price($item->getDiscount()->sub_price + $item->getDiscount()->sub_setup, $invoice->currency) }}

@endif
@endforeach
{{ __('store.subtotal') }}

{{ formatted_price($invoice->subtotal, $invoice->currency) }}

@if ($invoice->balance > 0)
{{ __('client.invoices.balance.title') }}

{{ formatted_price($invoice->balance, $invoice->currency) }}

@endif
{{ __('store.vat') }}

{{ formatted_price($invoice->tax, $invoice->currency) }}

{{ __('store.total') }}

{{ formatted_price($invoice->total, $invoice->currency) }}

@if ($invoice->external_id != null)
{{ __('client.invoices.paymethod') }} {{ __('client.invoices.paid_date') }} {{ __('admin.invoices.show.external_id') }}
{{ $invoice->gateway != null ? $invoice->gateway->name : $invoice->paymethod }} {{ $invoice->paid_at ? $invoice->paid_at->format('d/m/y H:i') : 'N/A' }} {{ $invoice->external_id }}
@endif
@if ($invoice->canPay())
@if ($invoice->total == 0) {{ __('client.invoices.pay') }} @else @if (auth('web')->user()->balance > 0 && setting('allow_add_balance_to_invoices'))

{{ __('client.invoices.pay_with_balance') }}

@csrf
@include('shared/input', ['name' => 'amount', 'value' => auth('web')->user()->balance > $invoice->total ? $invoice->total : auth('web')->user()->balance])
@endif @if (auth('web')->user()->paymentMethods()->isNotEmpty())
@csrf

{{ __('store.checkout.choose_payment_method') }}

@include('shared/select', [ 'name' => 'paymentmethod', 'options' => auth('web')->user()->getPaymentMethodsArray()->merge(['none' => __('store.checkout.not_use_payment_method')]), 'value' => 'none' ])
@endif
@endif
@endif
@if (!empty(setting("invoice_terms")))
{{ __('client.invoices.terms') }}

{!! nl2br(setting("invoice_terms", "You can change this details in Invoice configuration.")) !!}

@endif @if ($invoice->paymethod == 'bank_transfert' && $invoice->status != 'paid')

{{ __('client.invoices.banktransfer.title') }}

{!! nl2br(setting("bank_transfert_details", "You can change this details in Bank transfer configuration.")) !!}

@elseif ($invoice->status == 'paid')

{{ __('client.invoices.thank') }}

{{ __('client.invoices.thankmessage') }}

@endif

© {{ date('Y') }} {{ config('app.name') }}.

@endsection