@extends('layouts.invoice') @section('site_title', formatTitle([__('Invoice'), config('settings.title')])) @section('content')
@if ($payment->status == 'cancelled')

{{ __('Cancelled') }}

@endif
@if($payment->seller->title)

{{ $payment->seller->title }}

@endif

{{ __('Invoice') }}

{{ __('Date') }}: {{ $payment->created_at->tz(Auth::user()->timezone ?? config('app.timezone'))->format(__('Y-m-d')) }}
{{ __('Invoice ID') }}: {{ $payment->invoice_id }}
{{ __('Vendor') }}
@if ($payment->seller->vendor)
{{ __('Name') }}: {{ $payment->seller->vendor }}
@endif @if ($payment->seller->address)
{{ __('Address') }}: {{ $payment->seller->address }}
@endif @if ($payment->seller->city)
{{ __('City') }}: {{ $payment->seller->city }}
@endif @if ($payment->seller->state)
{{ __('State') }}: {{ $payment->seller->state }}
@endif @if ($payment->seller->postal_code)
{{ __('Postal code') }}: {{ $payment->seller->postal_code }}
@endif @if ($payment->seller->country)
{{ __('Country') }}: {{ $payment->seller->country }}
@endif @if ($payment->seller->phone)
{{ __('Phone') }}: {{ $payment->seller->phone }}
@endif @if ($payment->seller->vat_number)
{{ __('VAT number') }}: {{ $payment->seller->vat_number }}
@endif
{{ __('Client') }}
@if($payment->customer->name)
{{ __('Name') }}: {{ $payment->customer->name }}
@endif @if ($payment->customer->address)
{{ __('Address') }}: {{ $payment->customer->address }}
@endif @if ($payment->customer->city)
{{ __('City') }}: {{ $payment->customer->city }}
@endif @if ($payment->customer->state)
{{ __('State') }}: {{ $payment->customer->state }}
@endif @if ($payment->customer->postal_code)
{{ __('Postal code') }}: {{ $payment->customer->postal_code }}
@endif @if ($payment->customer->country)
{{ __('Country') }}: {{ $payment->customer->country }}
@endif @if ($payment->customer->phone)
{{ __('Phone') }}: {{ $payment->customer->phone }}
@endif
{{ __('Description') }}
{{ __('Date') }}
{{ __('Amount') }}
{{ $payment->product->name }} ({{ $payment->interval == 'month' ? __('Month') : __('Year') }})
{{ $payment->created_at->tz(Auth::user()->timezone ?? config('app.timezone'))->format(__('Y-m-d')) }}
{{ formatMoney(($payment->interval == 'month' ? $payment->product->amount_month : $payment->product->amount_year), $payment->currency) }} {{ $payment->currency }}
@if ($payment->coupon || $payment->tax_rates)
{{ __('Subtotal') }}
{{ formatMoney(($payment->interval == 'month' ? $payment->product->amount_month : $payment->product->amount_year), $payment->currency) }} {{ strtoupper($payment->currency) }}
@endif @if ($payment->coupon)
{{ $payment->coupon->name }} ({{ $payment->coupon->percentage }}% {{ __('Discount') }})
-{{ formatMoney(calculateDiscount(($payment->interval == 'month' ? $payment->product->amount_month : $payment->product->amount_year), $payment->coupon->percentage), $payment->currency) }} {{ $payment->currency }}
@endif @foreach(collect($payment->tax_rates) as $taxRate)
{{ $taxRate->name }} ({{ $taxRate->percentage }}% {{ $taxRate->type ? __('excl.') : __('incl.') }})
@if($taxRate->type) {{ formatMoney(checkoutExclusiveTax(($payment->interval == 'month' ? $payment->product->amount_month : $payment->product->amount_year), $payment->coupon->percentage ?? null, $taxRate->percentage, $inclTaxRatesPercentage), $payment->currency) }} @else {{ formatMoney(calculateInclusiveTax(($payment->interval == 'month' ? $payment->product->amount_month : $payment->product->amount_year), $payment->coupon->percentage ?? null, $taxRate->percentage, $inclTaxRatesPercentage), $payment->currency) }} @endif {{ $payment->currency }}
@endforeach
{{ __('Total') }}
{{ formatMoney($payment->amount, $payment->currency) }} {{ $payment->currency }}
@endsection