Technical Details:
Each nonblank source line becomes one billing row. Each quantity times rate is rounded to cents, with exact half-cent ties rounded away from zero. The subtotal adds those rounded line amounts. Tax is calculated from that subtotal and rounded to cents by the same rule before it is added to the total. Negative adjustments are preserved.
Transformation Core
Rows are split at line breaks, then each row is split at commas. Leading and trailing spaces are removed before the three fields are interpreted.
How billing line text becomes calculated fields
| Position | Meaning | Fallback | Limit |
| First | Item name | Item 1, Item 2, and so on | Commas inside a name are not supported |
| Second | Quantity | 1 when blank or not numeric | Absolute value no greater than 1,000,000 |
| Third | Rate | 0 when blank or not numeric | Absolute value no greater than 1,000,000,000 |
Only the first three comma-separated parts affect a row. The source accepts up to 100 nonblank rows and 10,000 characters. Because a missing or invalid quantity and rate fall back rather than stopping the draft, the parsed ledger is the decisive review surface.
Formula Core
Let R round an amount to cents, with half-cent ties rounded away from zero. Line extension, subtotal, tax, and grand total follow these rules.
q is quantity, r is rate, L is a line amount, S is subtotal, t is the entered tax percentage, T is tax, and G is total. Negative tax rates are converted to 0 and flagged. Rates above 1,000% are rejected.
For Consulting, 6, 150 and Hosting, 1, 80, the line amounts are 900 and 80. The subtotal is 980. At 8%, tax is 78.40 and the total is 1,058.40. For A, 1, 0.005 and B, 1, 0.005 at 0% tax, each line rounds to 0.01, so the subtotal and total are 0.02. A line of Credit, 1, -0.005 rounds to -0.01. Confirm that the official system uses the same rounding policy.
The Total concentration chart measures each row's share of gross billed value: the sum of absolute line amounts plus absolute tax, rather than the signed grand total. It ranks line rows by absolute amount, keeps the ten largest, groups any remainder as Other N lines, and appends tax only when nonzero.
Charges, credits, grouped lines, and tax are distinguished; zero-amount rows use a diamond at 0%. The cumulative share adds these shares in chart order, with an 80% marker to show where most of the gross value is concentrated. The chart CSV includes share and cumulative share. This grouping changes only the chart; it does not change the ledger or total.