CLI reference

rachuba sources

rachuba sources
rachuba sources ADAPTER --file REGISTER.csv [--commit]
rachuba sources log
rachuba sources forget --import ID [--yes]

Payroll history kept before Rachuba: a payroll provider's register of paychecks, exported as CSV, read into ledger runs. Every figure of a run is the provider's and is never recomputed. Every form of the command answers JSON, with or without --json.

The adapters

rachuba sources alone lists every adapter under adapters: its adapter id, its source, and either needs (--file <register.csv>) or discovers_only with a remedy, for a source no adapter imports.

AdapterSourceWhat it gives
IMP-RACH-01Gusto (payroll journal CSV)runs
IMP-RACH-02ADP (payroll register CSV)runs
IMP-RACH-03Rippling (payroll register CSV)runs
IMP-RACH-04Paychex (payroll journal CSV)runs
IMP-RACH-05QuickBooks Payroll (payroll details CSV)runs
IMP-RACH-06OnPay (payroll register CSV)runs
IMP-RACH-07Forms 941, 940, W-2 and state returnsnothing: import the year's register instead, and rachuba form and rachuba return give these filings' lines from it
IMP-RACH-08 to 10bank statements (CSV, OFX, CAMT.053)nothing: they record money that moved, so mark each run's deposit with rachuba deposited
IMP-RACH-11401(k) plan statementsnothing: they record what the plan received, so mark each run's remittance with rachuba remitted

Reading a register

rachuba sources ADAPTER --file REGISTER.csv reads the register and writes nothing. Each header is compared with the ledger's own field names, which rachuba sheet writes, and with the names payroll registers use, case and punctuation ignored. A pay date reads as YYYY-MM-DD, MM/DD/YYYY or MM/DD/YY; an empty figure reads as zero; a register without a kind column gives every run the kind imported. It answers:

  • runs: how many runs the register holds;
  • added: the pay dates of the runs the ledger does not hold yet;
  • held: how many it already records, on the same pay date with the same kind, and leaves as they are;
  • columns: each ledger field with the header it was read from;
  • left_out: the headers no field was read from;
  • rechecked: each added run paid again by Rachuba's engine from the register's gross, the configured elections and the runs before it, under runs, with its pay_date, the notes rachuba run would print and its differences: every figure where the register and Rachuba differ, as field, register, rachuba and difference (the register's less Rachuba's), empty when they agree to the cent; and, for a run of kind regular whose gross is not the configured employee.gross_per_period, configured_gross in the same shape, with the configured figure under rachuba (null when they agree or for any other kind). When the configuration cannot be read or is refused, a year's tax tables cannot be read or a run cannot be computed, not_recomputed says why instead. The ledger keeps the register's figures either way;
  • writes: whether --commit was given;
  • import: the id of the import, when it appended runs.

With --commit the runs under added are appended to the ledger, and an import that appended any is recorded in sources-log.jsonl beside the ledger, with the adapter, the register and the runs' pay dates.

The imports, and taking one back

rachuba sources log lists under imports every import that appended runs and was not taken back: import, adapter, register, runs and at.

rachuba sources forget --import ID answers the pay dates it would void under would_void and changes nothing. With --yes it voids those runs last first, as rachuba void does, and answers them under voided. When one of them is no longer the last run, or has its taxes deposited or its deferral remitted, the whole forget is refused and the ledger is left as it was.

Refusals

Exit 1, nothing written:

<id> is not an adapter of Rachuba; name one of <ids> (rachuba sources)

<adapter> reads a register <source> exports; name it with --file <register.csv>

reading <file> failed (<cause>); name the register the provider exported

<source> <why>, so this adapter imports nothing; <remedy>

not readable as <source>: <cause>

the register carries no column for <fields>; Rachuba keeps every figure of a run as the provider computed it, so export the register with those columns, or add them under the names rachuba sheet writes

row <number> of the register does not read as a run

pay date <date> is before the last recorded run on <date>. A backdated run would invalidate the wage bases already applied; record a correction dated today instead.

<id> is not an import the log beside the ledger records; the imports it records: <ids>

forgetting <id>: nothing was voided

The last is followed by the refusal of rachuba void that stopped it. And the ledger refusals on configuration.