# JournalEntry

> Debit and credit as two columns. No signed-column variant.

Source: https://lopifi.com/components/journal-entry
Part of: Lopifi — US GAAP books on autopilot, reviewed by a CPA (https://lopifi.com)

---

- **Family:** Accounting core (GL) — 
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/09-accounting-core

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/journal-entry
```

## Specification

> Debit and credit as **two columns**. There is no single-signed-column variant.

```
  JE-2026-0841 · 30 Sep 2026 · Adjusting · Posted        [Reverse] [Audit trail]
  Accrue September professional fees

  Account                         Dept    Debit       Credit
  6410 · Professional fees        G&A    12,000.00
  2150 · Accrued liabilities                        12,000.00
                                        ─────────   ─────────
                                        12,000.00   12,000.00   ✓ balanced
  ⟲ Reverses 1 Oct 2026 · Evidence: Baker & Co engagement letter.pdf
```

**Layer 4:** 3 sizes (`title-md` header · `body` labels · `figure-sm` amounts), 2 weights. `tnum` + `case` on both amount columns; the columns are independently right-aligned and each hugs its own gutter.

**Rules:** balance check always visible · unbalanced is a prominent error with the difference stated · source and status on the header · **no delete action on a posted entry — absent, not disabled** · reversal linked bidirectionally, both entries remain visible · evidence inline.

**Motion:** none. Server-safe (no `"use client"`) — a 400-line entry renders on the server.

## Rules this component obeys

Money is minor units, never floats. `null` is not `0` and neither is redacted. Negatives render in accounting parentheses with the parenthesis column reserved on both sides. Debit and credit are two columns. Per-currency decimal places. Polarity is explicit — up is not always good. Every figure states its period, entity, currency, basis and as-of.
