@ekwo-ai/intra-consignment

中文文档
0.25.2发布于 2026/11/13MITTypeScriptES Module零依赖构建来源已验证近 30 天下载 2533

The Belgian sales listing of supplies within the European Union for Intervat (IntraConsignment XML, schema NewICO-in v0.9) in TypeScript, from plain statement rows. Zero dependencies.

原始使用文档
文档目录5 节
  1. The specification this was written from
  2. The three codes
  3. What it refuses and what it reports
  4. The file name
  5. What is out of scope, on purpose

@ekwo-ai/intra-consignment

The Belgian sales listing of supplies within the European Union — the XML Intervat takes for form 723 — in TypeScript, with no dependencies.

Give it the rows of a recapitulative statement and it gives you the file, a name for it, and the list of what could not be put in it.

import { generateIntraConsignment } from '@ekwo-ai/intra-consignment';

const { file, filename, violations } = generateIntraConsignment(rows, {
  declarant: { vatNumber: '0999999999', name: 'Demo SRL', countryCode: 'BE' },
  period: { year: 2026, quarter: 3 },
});

StatementRow is the row shape of the ec_sales_list(company, from, to) function of Ekwo OS, declared here so that nothing is imported from it. Any book-keeping system that can produce those columns can use this package; it reads no database and knows no accounting.

The specification this was written from

WhatWhere
The schema, NewICO-in_v0_9.xsdhttps://finances.belgium.be/sites/default/files/downloads/NewICO-in_v0_9.zip
Its common typeshttps://finances.belgium.be/sites/default/files/downloads/IntervatInputCommon_v0_9-20240703.zip
Its ISO typeshttps://finances.belgium.be/sites/default/files/downloads/IntervatIsoTypes_v0_9-20240806.zip
Technical documentation, Intervat 14.xhttps://finances.belgium.be/fr/E-services/Intervat/documentation-technique
Directives for form 723, ref. 723.2, edition 2024https://finances.belgium.be/sites/default/files/downloads/165-723-directives-releve-intracommunautaire-2024.pdf
How the listing is filedhttps://finances.belgium.be/fr/E-services/Intervat/comment-utiliser-intervat/deposer-releve-intracommunautaire

The output of this package was checked against that schema with xmllint before it was committed. The schema is not shipped here — it belongs to the administration and it moves — so the test suite proves the shape of the document and not its validity; re-running the validation after a change to this package is a minute of work and worth it.

Two traps that cost an afternoon, written down so they cost nobody else one:

  • Take the dated archives of the common and ISO types. The undated URLs answer 200 and serve an older version, in which the declarant's number may not begin with a 1 — which refuses every enterprise number issued since.
  • The children of Declarant are in the InputCommon namespace, not in the listing's own. elementFormDefault is qualified in both schemas, so the validator refuses a Declarant whose children carry the listing's namespace, and no published example makes that obvious.

The three codes

From the directives, § 2.3.1.4 b: category I is L — exempt supplies of goods — category II is T, the supply in the Member State of arrival under a triangular operation, and category III is S, services taxed where the customer is. The enumeration in the schema is exactly {L, S, T}; the G that circulates in third-party documentation is refused by the validator.

The directives also say the three categories are never merged: a customer supplied both goods and services appears twice, with the same number and two codes. That is what the rows already are, and this package does not group them.

What it refuses and what it reports

An exception, because it would make the whole file meaningless:

  • a period that is neither one month nor one quarter;
  • a declarant number the schema cannot hold — ten digits, the BE removed.

A violation, because one line is wrong and the rest of the file is not:

codeWhy
whatever the producer flaggedThe row arrived with an issue on it: a customer with no VAT number recorded, or a number that is not in another Member State
unknown_natureA nature other than goods, services or a triangular operation
wrong_currencyThe listing is filed in euro and the line is not
no_vat_numberA client of the listing is identified by a number, and this line has none
vat_country_is_the_declarant_countryThe schema's MSCountryCodeExclBE, said without naming a country
vat_number_too_longMore than twelve characters after the country prefix
nil_balanceThe directives leave out a customer whose balance is 0,00 euro

AmountSum is the total of the lines that were kept, so a file with violations still balances against itself.

The file name

The administration imposes none. Intervat takes a bare .xml; only the ZIP archive that carries attachments has a fixed extension, .ic for this listing. The VATINTRA prefix that circulates comes from accounting software and appears nowhere in the published documentation. intraConsignmentFileName is therefore a name of ours — stable and readable — and a caller is free to pick another.

What is out of scope, on purpose

  • Part 2 of the listing, call-off stock. Since 1 January 2020 it is a separate electronic filing with a schema of its own, cos-in_v1_0_0.xsd and root COSConsignment. It reports movements of stock rather than supplies, and nothing in the rows this package reads describes one.
  • Corrections of an earlier period. The schema carries them as an ordinary client line with a signed delta and a CorrectingPeriod; producing one means knowing what was filed before, which is a question for the books and not for a file writer.
  • Filing. This package writes bytes. Uploading them, signing them and reading the acknowledgement are Intervat's business.

MIT.

版本与发布记录

@ekwo-ai/intra-consignment 共发布 32 个版本,首次发布于 2026/09/19;过去 12 个月发布了 32 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.25.2latest2026/11/13今天
0.25.02026/11/076 天前
0.24.12026/11/059 天前
0.24.02026/10/2816 天前
0.23.02026/10/2816 天前
0.22.02026/10/2817 天前

关于 @ekwo-ai/intra-consignment 的常见问题

@ekwo-ai/intra-consignment 是什么?

The Belgian sales listing of supplies within the European Union for Intervat (IntraConsignment XML, schema NewICO-in v0.9) in TypeScript, from plain statement rows. Zero dependencies.

如何安装 @ekwo-ai/intra-consignment?

在项目目录运行 npm install @ekwo-ai/intra-consignment,或使用 pnpm add / yarn add / bun add。

@ekwo-ai/intra-consignment 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ekwo-ai/intra-consignment 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ekwo-ai/intra-consignment 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ekwo-ai/intra-consignment 可以商用吗?

@ekwo-ai/intra-consignment 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ekwo-ai/intra-consignment 的下载量有多少?

根据 npm 官方下载统计,@ekwo-ai/intra-consignment 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,533 次,日均约 84 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ekwo-ai/intra-consignment 还在维护吗?

最新版本 0.25.2 发布于 2026/11/13(今天);至今共发布 32 个版本,其中过去 12 个月发布了 32 个;首次发布于 2026/09/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。