Runs a period-over-period variance analysis on the Balance Sheet (BS) pulled directly from QuickBooks Online. Outputs a 4-tab Excel workbook: Summary | Detail | Flags | CDC Log.
Mirrors the pl-quick-compare and scf-quick-compare patterns but for the Balance Sheet — Assets / Liabilities / Equity sections, accounting equation validation, and BS-specific analysis notes on flagged items tying changes to SCF, AR/AP aging, capex, debt schedule, and equity activity.
Use when:
NOT for:
pl-quick-compare.pyscf-quick-compare.pyar-collectionscash-flow-forecast.pytext
scripts/pipelines/bs-quick-compare.py
pip install openpyxl (already installed in workspace)bash
# Current month-end vs. prior month-end (auto-detects prior)
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson \
--current-end 2026-03-31
# Explicit prior period
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson \
--current-end 2026-02-28 --prior-end 2026-01-31
# YTD (as of end of last completed month vs. same date prior year)
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson --ytd --year 2026
# Full date control (for QBO BS reports needing explicit start dates)
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson \
--current-start 2026-01-01 --current-end 2026-03-31 \
--prior-start 2025-01-01 --prior-end 2025-03-31
# Custom output directory
python3 scripts/pipelines/bs-quick-compare.py \
--slug glowlabs \
--current-end 2026-03-31 \
--out ~/Desktop/reports
# Sandbox mode (QBO sandbox environment)
python3 scripts/pipelines/bs-quick-compare.py \
--slug glowlabs \
--current-end 2026-03-31 \
--sandbox
FlagRequiredDescription--slug✅Company slug (must be connected in qbo-client)--current-end✅*Current period "as of" date (YYYY-MM-DD)--current-start❌Current period start (default: Jan 1 same year)--prior-end❌Prior period "as of" date (default: 1 month back)--prior-start❌Prior period start (default: Jan 1 same year as prior-end)--ytd✅*YTD mode (alternative to explicit dates)--year❌Year for --ytd (default: current year)--out❌Output directory (default: ~/Desktop)--sandbox❌Use QBO sandbox environment
*Either --current-end OR --ytd is required.
Balance Sheet date note: BS is a point-in-time statement. --current-end and --prior-end are the "as of" dates. The QBO CLI requires start/end dates even for BS — the script defaults --current-start to Jan 1 of the same year if omitted.
Excel file: BS_QuickCompare_{slug}_{as-of-date}.xlsx saved to Desktop (or --out directory).
Total Assets = Total Liabilities + Total Equity (both periods, ≤$1 tolerance).cache/bs-quick-compare/{slug}.jsonEach QBO BS row is classified into sections by keyword matching:
Children inherit their parent section classification.
SectionIncrease =Decrease =Assets✓ Favorable✗ UnfavorableLiabilities✗ Unfavorable✓ FavorableEquity✓ Favorable✗ Unfavorable
Strategic exceptions (new LOC for growth, timely AP buildup) are noted in the analysis notes column.
text
Total Assets = Total Liabilities + Total Equity (≤$1 tolerance)
Runs on both periods and displayed in Summary tab with pass/fail icons.
--ytd: Current = as of end of last completed month. Prior = same date in prior year.
Example: run on March 17, 2026 → Current = as of Feb 28, 2026 | Prior = as of Feb 28, 2025.
The Flags tab includes an Analysis Note column with BS-specific interpretation for each material change:
Line ItemAnalysis Note FocusCash / BankTie to SCF — identify source: operating CF, capex, debt, distributionAccounts ReceivableRun AR aging — check DSO, past-due balances, collection trendsInventoryMonitor turnover — buildup vs. drawdown relative to sales pacePrepaid ExpensesAmortization vs. new prepaid spendFixed Assets / PP&ECapex vs. disposal — verify depreciation schedule updatedAccumulated DepreciationConfirm D&A add-back in SCF operating sectionRelated-party ReceivablesRepayment terms and tax treatment of officer/shareholder loansAccounts PayableRun AP aging — confirm no overdue payables; payment terms intactCredit CardsFull payment schedule; confirm all charges categorizedLoans / Notes PayableNew borrowing vs. paydown — tie to SCF financing; verify debt scheduleLine of CreditDraw vs. paydown — monitor utilization rate and available capacityMortgageNormal amortization vs. lump-sum payment — confirm against scheduleDeferred RevenueCash received vs. revenue not yet earned — monitor recognition schedulePayroll / AccruedSettlement timing — verify no aged accruals outstandingSales Tax PayableConfirm remittance current; no penaltiesRetained EarningsTie to net income in P&LCurrent Year Net IncomeDeep-dive in P&L quick compareDistributions / DrawsVerify cash availability; tie to SCF financing sectionEquity ContributionsTie to SCF financing; confirm cap table updatedOpening Balance EquityShould zero out once books are fully set up
text
.cache/bs-quick-compare/{slug}.json
Stores the flat map of all BS line names → balances for the most recent run. On re-run, diffs against the prior cache and shows exactly what changed. Useful for catching mid-month QBO adjustments, journal entries, or bank feed imports.
All calculations use Python Decimal with ROUND_HALF_UP — no floating-point rounding errors in financial outputs.
Run all three compare pipelines for a complete monthly close package:
PipelineScriptWhat it coversP&L Quick Comparepl-quick-compare.pyRevenue, COGS, expenses, net incomeSCF Quick Comparescf-quick-compare.pyCash flows: operating, investing, financingBS Quick Comparebs-quick-compare.pyAssets, liabilities, equity positions
Cross-reference flags across all three: