Fixes for missing download actions for e-docs

This commit is contained in:
David Bomba 2024-03-28 07:40:56 +11:00
parent db50774b00
commit 53d1c55acf
3 changed files with 8 additions and 8 deletions

View File

@ -914,7 +914,7 @@ class QuoteController extends BaseController
$contact = $invitation->contact;
$quote = $invitation->quote;
$file = $quote->service()->getEInvoice($contact);
$file = $quote->service()->getEQuote($contact);
$file_name = $quote->getFileName("xml");
$headers = ['Content-Type' => 'application/xml'];

View File

@ -108,7 +108,7 @@ class PdfSlot extends Component
}
public function downloadEInvoice()
public function downloadEDocument()
{
$file_name = $this->entity->numberFormatter().'.xml';

View File

@ -10,9 +10,9 @@
</div>
</button>
@if($entity_type == 'invoice' && $settings->enable_e_invoice)
<button wire:loading.attr="disabled" wire:click="downloadEInvoice" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<button wire:loading.attr="disabled" wire:click="downloadEDocument" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<span>{{ ctrans('texts.download_e_invoice') }}</span>
<div wire:loading wire:target="downloadEInvoice">
<div wire:loading wire:target="downloadEDocument">
<svg class="animate-spin h-5 w-5 text-blue" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
@ -21,9 +21,9 @@
</button>
@endif
@if($entity_type == 'credit' && $settings->enable_e_invoice)
<button wire:loading.attr="disabled" wire:click="downloadECreit" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<button wire:loading.attr="disabled" wire:click="downloadEDocument" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<span>{{ ctrans('texts.download_e_credit') }}</span>
<div wire:loading wire:target="downloadECredit">
<div wire:loading wire:target="downloadEDocument">
<svg class="animate-spin h-5 w-5 text-blue" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
@ -32,9 +32,9 @@
</button>
@endif
@if($entity_type == 'quote' && $settings->enable_e_invoice)
<button wire:loading.attr="disabled" wire:click="downloadEQuote" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<button wire:loading.attr="disabled" wire:click="downloadEDocument" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<span>{{ ctrans('texts.download_e_quote') }}</span>
<div wire:loading wire:target="downloadEQuote">
<div wire:loading wire:target="downloadEDocument">
<svg class="animate-spin h-5 w-5 text-blue" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>