Expenses — Admin

Expenses

Add Expense

This Month

{fmt.format((data.monthTotal ?? 0) / 100)}

This Year

{fmt.format((data.yearTotal ?? 0) / 100)}

Filtered Total

{fmt.format((data.filteredTotal ?? 0) / 100)}

handleFilterChange('category', e.currentTarget.value)} class="w-full px-3 py-2.5 rounded-lg border border-gray-200 bg-white text-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary" />
handleFilterChange('startDate', e.currentTarget.value)} class="px-3 py-2.5 rounded-lg border border-gray-200 bg-white text-sm focus:outline-none focus:ring-2 focus:ring-primary" />
handleFilterChange('endDate', e.currentTarget.value)} class="px-3 py-2.5 rounded-lg border border-gray-200 bg-white text-sm focus:outline-none focus:ring-2 focus:ring-primary" />

{data.total} expense{data.total !== 1 ? 's' : ''} found

{#snippet row(expense)} {expense.description || 'No description'} {fmt.format(expense.amount / 100)} {#if expense.category} {expense.category} {:else} — {/if} {expense.petName ?? '—'} {expense.vetName ?? '—'} {formatDate(expense.date)} Edit {/snippet}