@extends('admin/layouts/admin') @section('title', __('admin.credit_notes.title')) @section('scripts') @endsection @section('content')
@include('admin/shared/alerts')

{{ __('admin.credit_notes.kpi.count') }}

{{ $summaryTotals['count'] }}

{{ __('admin.credit_notes.kpi.amount') }}

@if ($summaryRows->count() === 0) {{ formatted_price(0, currency()) }} @elseif ($summaryRows->count() === 1) {{ formatted_price($summaryRows->first()->amount, $summaryRows->first()->currency) }} @else {{ __('admin.credit_notes.multi_currency') }} @endif

{{ __('admin.credit_notes.kpi.tax') }}

@if ($summaryRows->count() === 0) {{ formatted_price(0, currency()) }} @elseif ($summaryRows->count() === 1) {{ formatted_price($summaryRows->first()->tax, $summaryRows->first()->currency) }} @else {{ __('admin.credit_notes.multi_currency') }} @endif

{{ __('admin.credit_notes.kpi.total') }}

@if ($summaryRows->count() === 0) {{ formatted_price(0, currency()) }} @elseif ($summaryRows->count() === 1) {{ formatted_price($summaryRows->first()->total, $summaryRows->first()->currency) }} @else {{ __('admin.credit_notes.multi_currency') }} @endif

@if ($summaryRows->count() > 1)

{{ __('admin.credit_notes.kpi.by_currency') }}

@foreach ($summaryRows as $row)

{{ $row->currency }}

{{ __('admin.credit_notes.kpi.count') }}: {{ $row->count }}

{{ __('admin.credit_notes.kpi.total') }}: {{ formatted_price($row->total, $row->currency) }}

@endforeach
@endif

{{ __('admin.credit_notes.title') }}

{{ __('admin.credit_notes.subheading') }}

@include('admin/shared/mass_actions/header', [ 'searchFields' => $searchFields, 'search' => $search, 'searchField' => $searchField, 'filters' => $filters, 'checkedFilters' => $checkedFilters, 'filterField' => $filterField, ]) {{ __('admin.invoices.title') }}
@if (staff_has_permission('admin.manage_invoices'))
{{ __('admin.credit_notes.delete_balance_warning') }}
@endif
@forelse ($items as $creditNote) @empty @endforelse
{{ __('client.invoices.credit_note_number') }}
{{ __('global.customer') }}
{{ __('admin.credit_notes.original_invoice') }}
{{ __('admin.credit_notes.amount_ht') }}
{{ __('admin.credit_notes.tax') }}
{{ __('store.total') }}
{{ __('global.currency') }}
{{ __('global.date') }}
{{ __('admin.credit_notes.issued_by') }}
{{ __('global.actions') }}
{{ $creditNote->credit_note_number }} @if ($creditNote->customer) {{ $creditNote->customer->excerptFullName() }} @else ({{ __('global.deleted') }}) @endif @if ($creditNote->invoice) #{{ $creditNote->invoice->invoice_number }} @else - @endif {{ formatted_price($creditNote->amount, $creditNote->currency) }} {{ formatted_price($creditNote->tax, $creditNote->currency) }} {{ formatted_price($creditNote->amount + $creditNote->tax, $creditNote->currency) }} {{ $creditNote->currency }} {{ $creditNote->created_at->format('d/m/y') }} {{ $creditNote->admin?->username ?? '-' }} {{ __('global.show') }} {{ __('global.download') }} @if (staff_has_permission('admin.manage_invoices'))
@csrf @method('DELETE')
@endif

{{ __('global.no_results') }}

{{ $items->links('admin.shared.layouts.pagination') }}
@endsection