@extends('layouts.invoice') @section('site_title', formatTitle([__('Invoice'), config('settings.title')])) @section('content')

{{ config('settings.title') }}

{{ __('Invoice') }}

{{ __('Date') }}: {{ $invoice->date()->format(__('Y-m-d')) }}
{{ __('Product') }}: {{ $product }}
{{ __('Invoice number') }}: {{ $invoice->number }}
{{ __('Vendor') }}
{{ __('Name') }}: {{ config('settings.invoice_vendor') ?? config('settings.title') }}
@if (config('settings.invoice_address'))
{{ __('Address') }}: {{ config('settings.invoice_address') }}
@endif @if (config('settings.invoice_city'))
{{ __('City') }}: {{ config('settings.invoice_city') }}
@endif @if (config('settings.invoice_state'))
{{ __('State') }}: {{ config('settings.invoice_state') }}
@endif @if (config('settings.invoice_postal_code'))
{{ __('Postal code') }}: {{ config('settings.invoice_postal_code') }}
@endif @if (config('settings.invoice_country'))
{{ __('Country') }}: {{ config('settings.invoice_country') }}
@endif @if (config('settings.invoice_phone'))
{{ __('Phone') }}: {{ config('settings.invoice_phone') }}
@endif @if (config('settings.invoice_vat_number'))
{{ __('VAT number') }}: {{ config('settings.invoice_vat_number') }}
@endif
{{ __('Client') }}
@if($invoice->customer_name)
{{ __('Name') }}: {{ $invoice->customer_name }}
@endif @if ($invoice->customer_address->line1)
{{ __('Address') }}: {{ $invoice->customer_address->line1 }}
@endif @if ($invoice->customer_address->city)
{{ __('City') }}: {{ $invoice->customer_address->city }}
@endif @if ($invoice->customer_address->state)
{{ __('State') }}: {{ $invoice->customer_address->state }}
@endif @if ($invoice->customer_address->postal_code)
{{ __('Postal code') }}: {{ $invoice->customer_address->postal_code }}
@endif @if ($invoice->customer_address->country)
{{ __('Country') }}: {{ $invoice->customer_address->country }}
@endif @if ($invoice->customer_phone)
{{ __('Phone') }}: {{ $invoice->customer_phone }}
@endif
{{ __('Description') }}
{{ __('Date') }}
{{ __('Amount') }}
@foreach ($invoice->invoiceItems() as $item)
{{ $item->description }}
{{ formatMoney($item->amount, $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endforeach @foreach ($invoice->subscriptions() as $subscription)
{{ __('Subscription') }} ({{ $subscription->quantity }})
{{ $subscription->startDateAsCarbon()->tz(Auth::user()->timezone ?? config('app.timezone'))->format(__('Y-m-d')) }}
{{ $subscription->endDateAsCarbon()->tz(Auth::user()->timezone ?? config('app.timezone'))->format(__('Y-m-d')) }}
{{ formatMoney($subscription->amount, $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endforeach @if ($invoice->hasDiscount() || $invoice->tax_percent || $invoice->hasStartingBalance())
{{ __('Subtotal') }}
{{ formatMoney($invoice->subtotal, $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endif @if ($invoice->hasDiscount())
@if ($invoice->discountIsPercentage()) {{ $invoice->coupon() }} ({{ $invoice->percentOff() }}% {{ __('Discount') }}) @else {{ $invoice->coupon() }} ({{ formatMoney($invoice->discount->coupon->amount_off, $invoice->currency) }} {{ strtoupper($invoice->currency) }} {{ __('Discount') }}) @endif
-{{ formatMoney((int) round($invoice->subtotal * ($invoice->percentOff() / 100)), $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endif @unless ($invoice->isNotTaxExempt()) @if ($invoice->isTaxExempt()) {{ __('Tax is exempted') }} @else {{ __('Tax to be paid on reverse charge basis') }} @endif @else @foreach ($invoice->taxes() as $tax)
{{ $tax->display_name }} {{ $tax->jurisdiction ? ' - ' . $tax->jurisdiction : '' }} ({{ $tax->percentage }}% {{ $tax->inclusive ? __('incl.') : __('excl.') }})
{{ formatMoney($tax->rawAmount(), $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endforeach @endunless @if ($invoice->hasStartingBalance())
{{ __('Customer balance') }}
{{ formatMoney($invoice->rawStartingBalance(), $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endif
{{ __('Total') }}
{{ formatMoney($invoice->rawTotal(), $invoice->currency) }} {{ strtoupper($invoice->currency) }}
@endsection