'use client' import React, { useState, useCallback, useMemo } from 'react' import Link from 'next/link' import { ChevronDown, ChevronRight, AlertCircle } from 'lucide-react' import { Skeleton } from '@/components/ui/skeleton' import { formatAmount, formatDate } from '@/lib/utils' import { formatVoucher } from '@/lib/bookkeeping/voucher-series-resolver' import { createSourceLoader, type ReportSourceLine, type ReportSourceFetcher, } from '@/lib/reports/source-lines' interface ReportRowExpansionProps { /** Lazy fetcher invoked the first time the row is expanded. */ fetcher: ReportSourceFetcher /** Column span used by the inline expansion `
| Verifikat | Datum | Beskrivning | Debet | Kredit |
|---|---|---|---|---|
| {line.journal_entry_id ? ( {formatVoucher(line)} ) : ( - )} | {line.date ? formatDate(line.date) : ''} | {line.description} | {line.debit > 0 ? formatAmount(line.debit) : ''} | {line.credit > 0 ? formatAmount(line.credit) : ''} |