Files
bookspec/examples/p3-party-gift-card-is-a-promise.toml
T
swaitsandClaude Opus 5.5 52555262a8 P3: party totals by what moved the money, once (defects 14, 11, 24)
Each party's part of an entry is signed as its own account would show it,
with a direction and its cash and in-kind amounts; a reversal is its
original negated. Totals on a cash or all basis: for a member, all equals
the members' equity statement and cash the K-1's cash. Money is cash,
cards and the financing accounts, and a liability credit never pays its
own creditor (creditor_of), so accruals and declared distributions count
once. tin_last4 from the TIN or W-9 facts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
2026-10-21 12:12:26 -06:00

93 lines
2.6 KiB
TOML

# P3 defect 24 and the card rule (found in review, 2026-10-21): the
# company's cards are the liabilities whose names say "card", so a gift
# card the company sold (deferred revenue) read as money: received when
# sold and again when redeemed. Regression
# test: ledger-core tests/spec_party_totals.rs
# defect24_a_gift_card_sold_is_received_once.
# The shape: bookspec/README.md.
id = "p3-party-gift-card-is-a-promise"
title = "A gift card the company sold is a promise, not a card it pays with"
rule = """
The company's cards are liability accounts whose names say "card", but not
"gift card": gift cards the company sold are revenue it owes its customers
in service (deferred revenue), a promise. Selling one is money received
from the buyer; redeeming it moves no money and counts nothing.
"""
status = "CONVENTION"
sources = [
"DECISION (owner, 2026-10-20): money is cash, cards, the members' financing and loans; every other liability is a promise, counted when settled (wanderbooks rules.md B-35 item 5)",
"Helvering v. Price, 309 U.S. 409, 412-413 (1940): a promise to pay is not payment (docs/spec/sources/helvering-v-price-1940.md)",
]
tags = ["parties", "cards", "deferred-revenue", "money"]
[setup]
currency = "USD"
fiscal_year_start = "01-01"
basis = "accrual"
rounding = "half-even"
cash_accounts = ["1000"]
[[setup.accounts]]
code = "1000"
name = "Checking"
type = "asset"
[[setup.accounts]]
code = "2050"
name = "Business Card"
type = "liability"
[[setup.accounts]]
code = "2410"
name = "Gift Card Liability"
type = "liability"
[[setup.accounts]]
code = "4000"
name = "Revenue"
type = "revenue"
[[setup.parties]]
name = "Riley Chen"
roles = ["customer"]
[[events]]
date = "2026-03-01"
description = "Gift card sold"
parties = [{ party = "Riley Chen" }]
lines = [
{ account = "1000", side = "debit", amount = "100.00" },
{ account = "2410", side = "credit", amount = "100.00" },
]
[[events]]
date = "2026-03-05"
description = "Gift card redeemed"
parties = [{ party = "Riley Chen" }]
lines = [
{ account = "2410", side = "debit", amount = "100.00" },
{ account = "4000", side = "credit", amount = "100.00" },
]
[[expect]]
query = "party_part"
entry = 1
party = "Riley Chen"
values = { resolved = "-100.00", direction = "received", cash = "-100.00", in_kind = "0.00" }
[[expect]]
query = "party_part"
entry = 2
party = "Riley Chen"
values = { resolved = "100.00", direction = "neither", cash = "0.00", in_kind = "0.00" }
# Before the review: 200.00.
[[expect]]
query = "party_totals"
party = "Riley Chen"
basis = "all"
from = "2026-01-01"
to = "2026-12-31"
values = { paid = "0.00", received = "100.00" }