import { prisma } from "@/lib/prisma"; import { Plus, Search, Filter, ArrowUpRight, ArrowDownRight, Download, Calendar, Wallet, ArrowRightLeft } from "lucide-react"; import { Card } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { formatCurrency } from "@/lib/utils"; export default async function LedgerPage() { const transactions = await prisma.companyTransaction.findMany({ orderBy: { date: 'desc' }, include: { category: true, account: true } }); return (
Full transaction history and cash flow tracking.
{stat.label}
| Transaction | Account | Category | Amount | Date |
|---|---|---|---|---|
|
{tx.type === 'DEBIT' ?
{tx.description} TX-{tx.id.substring(0, 8).toUpperCase()} |
{tx.account.name} | {tx.category?.name || 'Uncategorized'} | {tx.type === 'DEBIT' ? '-' : '+'}{formatCurrency(tx.amount.toString())} |
{new Date(tx.date).toLocaleDateString()} 14:20 PM |
Start recording financial activities to see them here.