95 lines
4.7 KiB
PHP
95 lines
4.7 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<div class="flex flex-row w-full">
|
|
<h2 class="grow font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
|
{{ __('invoice.Invoice') }} {{ $invoice->number }}
|
|
</h2>
|
|
<p class="relative flex flex-row">
|
|
<x-pdf-icon class="text-gray-800 cursor-pointer" onclick="window.open('/invoice/{{ $invoice->id }}/pdf-download', '_blank', 'popup=true')"/>
|
|
<x-e-icon class="cursor-pointer" onclick="window.open('/invoice/{{ $invoice->id }}/xml-download', '_blank', 'popup=true')"/>
|
|
</p>
|
|
</div>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
|
|
<!-- Customer and addresses -->
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('customer.Customer') }}: {{ $invoice->customer->name }} ({{ $invoice->customer->email }})
|
|
</h2>
|
|
<div class="grid grid-cols-2 mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
<div>{{ __("customer.Invoice Address") }}</div>
|
|
<div>{{ __("customer.Delivery Address") }}</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="grid grid-cols-2">
|
|
<div>
|
|
<x-php-card :address="$invoice->address"/>
|
|
</div>
|
|
<div>
|
|
<x-php-card :address="$invoice->delivery"/>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Invoice items -->
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<section>
|
|
<header>
|
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
|
{{ __('invoice.Invoice items') }}
|
|
</h2>
|
|
<div class="flex flex-row items-end gap-2 w-full mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
<x-input-label for="invoice_item.amount" :value="__('invoice.Amount')" class="w-1/12"/>
|
|
<x-input-label for="invoice_item.name" :value="__('invoice.Name')" class="w-2/3"/>
|
|
<x-input-label for="invoice_item.price" :value="__('invoice.Price')" class="w-1/12 text-right"/>
|
|
<x-input-label for="invoice_item.tax" :value="__('invoice.Tax')" class="w-1/12 text-right"/>
|
|
<x-input-label for="invoice_item.tax" :value="__('invoice.Sum')" class="w-1/12 text-right"/>
|
|
</div>
|
|
</header>
|
|
|
|
<div>
|
|
@foreach($invoice->items as $item)
|
|
<x-invoice-item :item="$item"/>
|
|
@endforeach
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Invoice information -->
|
|
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
|
<div class="max-w">
|
|
<div class="flex flex-row items-end gap-2 w-full">
|
|
<div class="w-1/12"></div>
|
|
<div class="mt-1 block w-2/3">{{ __('invoice.Net') }}</div>
|
|
<div class="w-1/4 text-right">{{ \Illuminate\Support\Number::currency($invoice->sum - $invoice->tax) }}</div>
|
|
</div>
|
|
<div class="flex flex-row items-end gap-2 w-full">
|
|
<div class="w-1/12"></div>
|
|
<div class="mt-1 block w-2/3">{{ __('invoice.Tax') }}</div>
|
|
<div class="w-1/4 text-right">{{ \Illuminate\Support\Number::currency($invoice->tax) }}</div>
|
|
</div>
|
|
<div class="flex flex-row items-end gap-2 w-full">
|
|
<div class="w-1/12"></div>
|
|
<div class="mt-1 block w-2/3">{{ __('invoice.Sum') }}</div>
|
|
<div class="w-1/4 text-right">{{ \Illuminate\Support\Number::currency($invoice->sum) }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</x-app-layout>
|