{# app/templates/store/invoices.html #} {% extends "store/base.html" %} {% from 'shared/macros/headers.html' import page_header_flex, refresh_button %} {% from 'shared/macros/tables.html' import table_wrapper, table_header, simple_pagination %} {% from 'shared/macros/modals.html' import form_modal, confirm_modal_dynamic %} {% block title %}Invoices{% endblock %} {% block alpine_data %}storeInvoices(){% endblock %} {% block extra_scripts %} {% endblock %} {% block content %} {% call page_header_flex(title='Invoices', subtitle='Create and manage invoices for your orders') %} {{ refresh_button(loading_var='loading', onclick='refreshData()', variant='secondary') }} {% endcall %}

{# noqa: FE-003 - Uses dismissible close button not supported by error_state macro #}

Error

Invoice Settings Required

Configure your merchant details and invoice preferences before creating invoices.

Total Invoices

Draft

Issued

Paid

{% call table_wrapper() %} {{ table_header(['Invoice #', 'Customer', 'Date', 'Amount', 'Status', 'Actions']) }} {% endcall %} {{ simple_pagination(page_var='page', total_var='totalInvoices', limit_var='perPage', on_change='loadInvoices()') }}

Invoice Settings

Configure your merchant details and preferences for invoice generation.

Merchant Information

Invoice Numbering

Example: INV-2024-00001

Bank Details

Invoice Footer

{{ confirm_modal_dynamic('updateStatusConfirm', 'Update Invoice Status', "'Are you sure you want to ' + ({'issued': 'mark as issued', 'paid': 'mark as paid', 'cancelled': 'cancel'}[pendingNewStatus] || pendingNewStatus) + ' this invoice?'", 'updateStatus(pendingStatusInvoice, pendingNewStatus)', 'showUpdateStatusConfirm', 'Confirm', 'Cancel', 'warning') }} {% call form_modal('createInvoiceModal', 'Create Invoice', show_var='showCreateModal', submit_action='createInvoice()', submit_text='Create Invoice', loading_var='creatingInvoice', loading_text='Creating...', size='sm') %}
{# noqa: FE-008 - Order ID is a reference field, not a quantity stepper #}

Enter the order ID to generate an invoice for

{% endcall %} {% endblock %}