对QuickBooks Online的资产负债表进行Controller级别深度分析,提取当期及前期资产负债表,计算3个月滚动均值,钻取GL明细以进行匹配
Controller-level Balance Sheet deep analysis from QuickBooks Online. Mirrors the P&L Deep Analysis pattern but for the balance sheet — pulls current + prior period BS, runs 3-month rolling averages, GL drill-down for material changes, and generates a 7-tab Excel workbook with actionable findings.
Use when:
NOT for:
pl-deep-analysis.pytext
scripts/pipelines/bs-deep-analysis.py
Cache directory: .cache/bs-deep-analysis/{slug}.json
bash
# Current month-end vs. auto prior month-end
python3 scripts/pipelines/bs-deep-analysis.py \
--slug sb-paulson --current-end 2026-03-31
# Explicit prior period
python3 scripts/pipelines/bs-deep-analysis.py \
--slug sb-paulson \
--current-end 2026-03-31 --prior-end 2026-02-28
# Skip GL drill-down (faster, no vendor-level detail)
python3 scripts/pipelines/bs-deep-analysis.py \
--slug sb-paulson --current-end 2026-03-31 --skip-gl
# Custom output directory
python3 scripts/pipelines/bs-deep-analysis.py \
--slug glowlabs --current-end 2026-03-31 --out ~/Desktop/reports
# QBO sandbox
python3 scripts/pipelines/bs-deep-analysis.py \
--slug sb-paulson --current-end 2026-03-31 --sandbox
ArgumentRequiredDescription--slug✅QBO company slug (must be connected in qbo-client)--current-end✅As-of date for current BS (YYYY-MM-DD)--prior-end❌Prior period as-of date (auto = prior month-end)--skip-gl❌Skip GL drill-down (faster)--out❌Output directory (default: ~/Desktop)--sandbox❌Use QBO sandbox environment
--skip-gl)GL_MAX_ROWS_PER_ACCOUNT)text
Beginning Equity
+ Net Income
− Distributions / Owner Draws
+ New Contributions / Paid-in Capital
= Computed Ending Equity
vs. Ending Equity per BS (reconciling difference flagged if ≥ $500)
.cache/bs-deep-analysis/{slug}.jsonTabContentsSummaryKPI table, key ratios, controller findings, action proposalsDetailFull BS with prior/current/delta/rolling avg per account**⚠ FlagsMaterial change accounts + findings summaryGL Drill-DownTransaction-level detail for flagged accountsCommon-Size AnalysisVertical analysis: each line as % of total assetsEquity RollforwardPeriod reconciliation + retained earnings bridgeCDC Log**Balance changes vs. last pipeline run
MetricThresholdAbsolute change≥ $2,500Percentage change≥ 10%Equity change (tighter)≥ 5%Working capital watchCurrent ratio < 1.5xWorking capital criticalCurrent ratio < 1.0xST debt concentration warningST debt > 60% of totalEquity rollforward diff flag≥ $500
text
pip install openpyxl
Node.js QBO client with valid auth token
QBO auth token must be set (same as all other pipelines).
PipelineFileWhen to UseP&L Deep Analysispl-deep-analysis.pyIncome statement controller reviewFinancial Ratiosfinancial-ratios.pyFull ratio suite (uses BS data)BS Deep Analysisbs-deep-analysis.pyThis pipeline — balance sheet focus
Decimal — no float rounding errors--prior-end is omitted (always safe for monthly close)--skip-gl reduces runtime significantly; use for quick runs when vendor detail is not needed