Make invoices editable and build possibility to send them manually.

This commit is contained in:
2025-01-14 17:47:50 +01:00
parent 671981000f
commit bfb5b8f56e
6 changed files with 642 additions and 79 deletions

View File

@@ -5,9 +5,6 @@
{{ __('invoice.Invoice') }} {{ $invoice->number }} ({{ $invoice->localized_state }})
</h2>
<p class="relative flex flex-row">
@if ($invoice->status === 'created')
<x-mail-icon class="cursor-pointer mr-4" onclick="window.location.href = '{{ route('invoice.mail', $invoice->id) }}'"/>
@endif
<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>
@@ -93,6 +90,18 @@
</div>
</div>
@if ($invoice->status === 'created')
<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">
<x-primary-button onclick="window.location.href = '{{ route('invoice.mail', $invoice->id) }}'"><x-mail-icon class="mr-4"/>{{ __('form.Send') }}</x-primary-button>
<x-primary-button onclick="window.location.href = '{{ route('invoice.edit', $invoice->id) }}'"><x-edit-icon class="mr-4"/>{{ __('form.Edit') }}</x-primary-button>
</div>
</div>
</div>
@endif
</div>
</div>