DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

PerryLink /

PerryLink/dsh-invoice-ledger

Verified

核对发票台账:重复报销、价税勾稽、抬头、日期、模板占位符,输出异常清单与规范化台账。

★ 0 Stars0 Forks4 IssuesN/A Community rating0 Confirmed installs
View on GitHubProject homepage
READMESource: main@f9cd3e8a

dsh-invoice-ledger — Invoice ledger

English · 简体中文 · Español · Português · हिन्दी

dshfind

dsh-invoice-ledger checks an invoice ledger for duplicates, arithmetic consistency, payer mismatch, date anomalies and template placeholders left in a cell, and emits an anomaly list plus a workbook.

Two things are deliberate. A duplicate is keyed on code + number, never on the amount, so an amount typo still surfaces as a duplicate. And the report lists, by name, every rule this version could not execute: a ledger with four findings and fourteen unexecuted rules is not four problems.

Install

dsh plugin --profile <name> add dsh-invoice-ledger
dsh --profile <name> --dump-config | grep 'dsh-invoice-ledger'

What it looks like

Workflow diagram for dsh-invoice-ledger: document → rule pack → findings.

Workflow overview: document → rule pack → findings.

Boundary: this checks the ledger against itself and against the invoice face. It does not decide whether an invoice is fake, does not verify business substance, does not query the tax authority, and does not replace a finance review. Rate-versus-goods, consecutive numbering and same-day clustering are risk prompts, not conclusions. The 数电票 number is kept as a string throughout: 20 digits exceed JavaScript's safe integer range, and converting loses the last digits — which would make two different invoices compare equal.

What it answers

  • Is the same invoice recorded twice, possibly across two reimbursement forms?
  • Does the total equal amount plus tax, within the configured tolerance?
  • Is the buyer actually this company, or a registered branch?
  • Is the issue date in the period, not in the future, and inside the internal deadline?
  • Which cells still hold template text such as XX公司?

And, explicitly: which rules did not run?

Standards it follows

The pack cites the documents its rules come from, verbatim. For example:

  • 数电票 numbering: 国家税务总局公告 2024 年第 11 号 第四条 — a 20-digit number whose first two digits are the year, digits 3–4 the provincial region, digit 5 the issuance channel, 6–20 a sequence.
  • The arithmetic identities (total = amount + tax) are marked arithmetic rather than given a fabricated citation, because they are identities, not regulations.
  • Rules with no citable clause say so in their own excerpt rather than inventing one.

Compatibility

Surface Status
Harness peer range >=0.1.2-rc.1 <0.2.0 || >=0.2.0-0 <0.3.0
Node `^22.19.0
Platforms all (pure ESM; no native code, no network, no model call)

What it does

The pack declares params.check.kind per rule. This version implements: invoiceKey, moneyEquation, uniqueInvoice, duplicateAcross, dateWindow, partyMatch, partyCompare, placeholderScan. Everything else is reported as not executed, with its kind named.

A difference that a recognised special case explains — 差额征税, 通行费, 成品油 in the remark — is downgraded to a warning, not hidden: the reader still sees the number and decides.

Configuration

Key Default Meaning
rulesFile rules/invoice-ledger.yaml 规则库路径

Material format

One row per invoice. Fields read by the shipped pack include invoiceCode, invoiceNumber, docType, issueDate, amount, tax, total, buyerName, buyerTaxId, sellerName, sellerTaxId, formNo, reimburser, remark.

The workbook has three sheets: 汇总, 异常清单 (one row per finding) and 未执行规则.

Rule sources

Quotations live in the pack, next to the rule that uses them, and check:citations verifies each appears verbatim.

A defect in the shipped pack is worth recording: its placeholder patterns included an unanchored 00000000, which matches the sequential part of almost every 20-digit 数电票 number. Every invoice would have been flagged as a template placeholder. The patterns are now anchored, and a test asserts that a real number is not flagged.

Troubleshooting

  • The plugin installs but the tool never appears: check that main resolves to lib/index.mjs and that pnpm run build produced it.
  • dsh plugin add rejects the package: the peer range covers 0.1.x and 0.2.x; outside it, grant an explicit exemption.
  • A rule did not run: read the skipped array.

Development

pnpm install
pnpm run typecheck
pnpm test
pnpm run build
node ../scripts/sync-shared.mjs dsh-invoice-ledger

PerryLink DSH Plugin Family

This project is part of the DeepSeek Harness plugin family from PerryLink. The roster stays collapsed below so every README keeps a short first screen; expand it to see every row and its status.

Expand all plugins
Plugin Status
dsh-aqua-input-check
dsh-archive-check
dsh-auto-review
dsh-autotier
dsh-bid-ca-precheck
dsh-bid-qual-check
dsh-cert-mcp
dsh-checkpoint-rewind
dsh-click
dsh-composer-history
dsh-contract-stance
dsh-customs-doc-check
dsh-data-quality
dsh-demurrage-ledger
dsh-doublecheck
dsh-drill-script-check
dsh-eia-guide-check
dsh-emergency-plan
dsh-essay-rubric-check
dsh-evidence-check
dsh-export-ctl-check
dsh-fast
dsh-fmea-table-check
dsh-forecast-penalty
dsh-fund-research
dsh-github
dsh-gongwen-flow-check
dsh-gongwen-word-check
dsh-guard-plan-qc
dsh-hazchem-check
dsh-hazplan-check
dsh-hidden-risk-map
dsh-hs-classify
dsh-icd-rule-check
dsh-industry-research
dsh-lawcite-adapter
dsh-laya
dsh-lc-doc-check
dsh-learning-gap-check
dsh-library
dsh-local-ai
dsh-lsp-actions
dsh-mask
dsh-mcp-panel
dsh-medrec-qc
dsh-memento
dsh-nsfc-form-check
dsh-nurse-record-check
dsh-observe
dsh-origin-rvc-check
dsh-ota-review-check
dsh-output-styles
dsh-paper-doc-adapter
dsh-permission-rules
dsh-permit-report-check
dsh-pipeline-check
dsh-pleading-draft
dsh-plugin-doctor
dsh-plugin-guide
dsh-plugin-kit
dsh-plugin-upgrade
dsh-policy-brief-draft
dsh-power-loss-split
dsh-power-ticket-check
dsh-ppap-check
dsh-protest-deadline
dsh-railway-window
dsh-repair-order-qc
dsh-research-report
dsh-review-reply-check
dsh-rulefile-check
dsh-safety-brief-check
dsh-score
dsh-session-sync
dsh-site-log-check
dsh-skill-pack-security
dsh-soe-decision-check
dsh-soilwater-check
dsh-sop-sync-check
dsh-spc-gbt-adapter
dsh-talk
dsh-tender-extract
dsh-tender-matrix
dsh-test-drive
dsh-ticktick
dsh-translate
dsh-warranty-calc
dsh-budget 🧊 FROZEN — see the repo README
dsh-claude-move 🧊 FROZEN — see the repo README
dsh-defend 🧊 FROZEN — see the repo README
dsh-draw 🧊 FROZEN — see the repo README
dsh-reach 🧊 FROZEN — see the repo README
dsh-background-agents 🚫 RETIRED — see the repo README
dsh-session-pin 🚫 RETIRED — see the repo README
dsh-team-rooms 🚫 RETIRED — see the repo README

License

Apache License 2.0 © 2026 dsh-invoice-ledger contributors.

—/ 5

No ratings yet

Verified DSH bundle

Commit f9cd3e8a6d38

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout