Add a CSV download of created billing materials
Management downloads a created billing material as a semicolon CSV with decimal commas and a UTF-8 BOM for Excel: one row per invoice line with the invoice's customer, billing unit, e-invoice details and reference, the job, the line and its net, VAT and gross amounts. Consumers' full personal identity codes are included only for those who may see them, the response is not cached, and cells Excel would read as formulas are escaped. The columns follow Fennoa's import format once a sample exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -321,6 +321,13 @@ new class extends Component
|
||||
<p class="text-sm font-medium">
|
||||
{{ __('billing.export.summary', ['invoices' => count($export->invoices), 'jobs' => $export->jobCount(), 'net' => $this->money($export->totals->netCents)]) }}
|
||||
</p>
|
||||
|
||||
@if (! $export->isDraft())
|
||||
<div class="space-y-2">
|
||||
<x-button :href="route('billing.csv', $export->id)" icon="arrow-down-tray" :text="__('billing.csv.download')" />
|
||||
<p class="max-w-3xl text-sm">{{ __('billing.csv.sensitive') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<p id="billing-status" tabindex="-1" role="status" aria-live="polite" class="text-sm font-medium focus:outline-none">{{ $statusMessage }}</p>
|
||||
|
||||
@@ -74,6 +74,7 @@ new class extends Component
|
||||
['index' => 'invoices', 'label' => __('billing.index.columns.invoices'), 'sortable' => false, 'align' => 'right'],
|
||||
['index' => 'jobs', 'label' => __('billing.index.columns.jobs'), 'sortable' => false, 'align' => 'right'],
|
||||
['index' => 'net', 'label' => __('billing.index.columns.net'), 'sortable' => false, 'align' => 'right'],
|
||||
['index' => 'file', 'label' => __('billing.index.columns.file'), 'sortable' => false],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -138,6 +139,12 @@ new class extends Component
|
||||
@interact('column_net', $export)
|
||||
<span class="whitespace-nowrap">{{ $export->netCents === null ? '' : $this->money($export->netCents) }}</span>
|
||||
@endinteract
|
||||
|
||||
@interact('column_file', $export)
|
||||
@if ($export->status->value === 'created')
|
||||
<x-link :href="route('billing.csv', $export->id)" icon="arrow-down-tray" :aria-label="__('billing.csv.download_named', ['number' => $export->id])">{{ __('billing.csv.download_short') }}</x-link>
|
||||
@endif
|
||||
@endinteract
|
||||
</x-table>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user