@ekwo-ai/trial-balance 0.12.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/open-items.d.ts +61 -0
- package/dist/open-items.d.ts.map +1 -0
- package/dist/open-items.js +132 -0
- package/dist/open-items.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,9 +62,48 @@ written. What is not a trial balance at all — no account column, a debit
|
|
|
62
62
|
column beside a balance column, an amount that is not one — is thrown as a
|
|
63
63
|
`BooksFileError` with a `code`.
|
|
64
64
|
|
|
65
|
+
## The open items beside it
|
|
66
|
+
|
|
67
|
+
The trial balance says what the receivable account holds; the aged balance
|
|
68
|
+
printed beside it says who owes it, under which number. `readOpenItems()`
|
|
69
|
+
reads that list, one row per invoice or credit note still open:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { readOpenItems } from '@ekwo-ai/trial-balance';
|
|
73
|
+
|
|
74
|
+
const { items, contacts, violations } = readOpenItems(bytesOrString);
|
|
75
|
+
|
|
76
|
+
items; // [{ type: 'sale_invoice', number: 'F2025-0412', contact: 'C0001', amount: '1200.00',
|
|
77
|
+
// documentDate: '2025-12-12', dueDate: '2026-01-11', paymentReference: '+++090/9337/55493+++', … }]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
| Column | Names accepted | |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| type | `type`, `document type` | required: `sale_invoice`, `sale_credit_note`, `purchase_invoice` or `purchase_credit_note` |
|
|
83
|
+
| number | `number`, `document number`, `invoice number` | required |
|
|
84
|
+
| contact | `contact`, `party` | required: the code the balance names the party by |
|
|
85
|
+
| contact name | `contact name`, `party name` | optional |
|
|
86
|
+
| amount | `amount`, `open amount`, `amount open` | required: what is still open, positive — the type says the side |
|
|
87
|
+
| document date | `document date`, `issue date`, `date` | required, `YYYY-MM-DD` |
|
|
88
|
+
| due date | `due date` | optional, `YYYY-MM-DD` |
|
|
89
|
+
| payment reference | `payment reference`, `structured reference` | optional |
|
|
90
|
+
| supplier reference | `supplier reference` | optional |
|
|
91
|
+
| label | `label`, `description` | optional |
|
|
92
|
+
|
|
93
|
+
A day is written `YYYY-MM-DD` and nothing else: one written in digits only is
|
|
94
|
+
read differently on each side of an ocean, and is refused rather than guessed.
|
|
95
|
+
A row that lacks a required value comes back in `violations` and is left out;
|
|
96
|
+
an unknown type, a signed amount or a day that is not one is thrown as a
|
|
97
|
+
`BooksFileError`. Separator, decimal mark and encoding are read as for the
|
|
98
|
+
balance.
|
|
99
|
+
|
|
100
|
+
## Where it goes
|
|
101
|
+
|
|
65
102
|
It knows no chart of accounts. The codes are the ones the file wrote; which
|
|
66
103
|
account of another chart each becomes is the importer's business. In
|
|
67
104
|
[Ekwo OS](https://github.com/Ekwo-ai/ekwo-os) that is `ekwo import
|
|
68
|
-
trial-balance <file> --opening-date <
|
|
105
|
+
trial-balance <file> --opening-date <day> [--open-items <file>]`, where the day
|
|
106
|
+
is the first of a year or the day inside it the books were taken over, and
|
|
107
|
+
each open item becomes a posted document.
|
|
69
108
|
|
|
70
109
|
MIT.
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type { ImportedBooks, ReadOptions } from './types.js';
|
|
12
12
|
export * from './types.js';
|
|
13
13
|
export { BooksFileError, type BooksFileErrorCode } from './errors.js';
|
|
14
|
+
export { OPEN_ITEM_COLUMNS, OPEN_ITEM_TYPES, readOpenItems, type ImportedOpenItem, type ImportedOpenItems, type OpenItemType, } from './open-items.js';
|
|
14
15
|
/**
|
|
15
16
|
* The columns this reader knows, each under the names it accepts in a header.
|
|
16
17
|
* Compared without regard to case, and without the `*` some exports put on a
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAmB,aAAa,EAAiC,WAAW,EAAa,MAAM,YAAY,CAAC;AAExH,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAmB,aAAa,EAAiC,WAAW,EAAa,MAAM,YAAY,CAAC;AAExH,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC;AAIzB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;CASxB,CAAC;AAIX;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,OAAO,GAAE,WAAgB,GAAG,aAAa,CAwGrG"}
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { formatDecimal, parseDecimal } from './decimal.js';
|
|
|
13
13
|
import { BooksFileError } from './errors.js';
|
|
14
14
|
export * from './types.js';
|
|
15
15
|
export { BooksFileError } from './errors.js';
|
|
16
|
+
export { OPEN_ITEM_COLUMNS, OPEN_ITEM_TYPES, readOpenItems, } from './open-items.js';
|
|
16
17
|
const DEFAULTS = { encoding: 'utf-8', maxBytes: 64 * 1024 * 1024 };
|
|
17
18
|
/**
|
|
18
19
|
* The columns this reader knows, each under the names it accepts in a header.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoB,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAA2B,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoB,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAA2B,MAAM,aAAa,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,GAId,MAAM,iBAAiB,CAAC;AAEzB,MAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,EAAW,CAAC;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;IAC9B,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,CAA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EAAE,CAAC;QACvB,UAAU,CAAC,IAAI,CAAC;YACd,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,yBAAyB,aAAa,CAAC,MAAM,CAAC,eAAe,aAAa,CAAC,OAAO,CAAC,mCAAmC;YAC/H,GAAG,EAAE,IAAI;SACV,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QAChC,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QAChC,OAAO,EAAE,EAAE;QACX,OAAO;QACP,UAAU;KACX,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,MAAgB;IAC9B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACnC,MAAM,EAAE,GAAoC,EAAE,CAAC;IAC/C,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAkC,EAAE,CAAC;QACrG,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3D,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The open items that go with a trial balance, written as CSV: one row per
|
|
3
|
+
* invoice or credit note still open on the day the balance is drawn up — its
|
|
4
|
+
* number, the party, the amount still open, the day it was issued, the day it
|
|
5
|
+
* falls due, the reference a payment of it will quote.
|
|
6
|
+
*
|
|
7
|
+
* It is the aged balance every package prints beside its trial balance. The
|
|
8
|
+
* trial balance says what the receivable account holds; this says who owes
|
|
9
|
+
* it, under which number. Like the balance, it reads no database and knows no
|
|
10
|
+
* chart: whatever takes it decides which account an item falls on.
|
|
11
|
+
*/
|
|
12
|
+
import type { Decimal, ImportedContact, IsoDate, ReadOptions, Violation } from './types.js';
|
|
13
|
+
/** What an open item is, in the words of the documents it becomes. */
|
|
14
|
+
export declare const OPEN_ITEM_TYPES: readonly ["sale_invoice", "sale_credit_note", "purchase_invoice", "purchase_credit_note"];
|
|
15
|
+
export type OpenItemType = (typeof OPEN_ITEM_TYPES)[number];
|
|
16
|
+
/** One invoice or credit note still open on the day the balance is drawn up. */
|
|
17
|
+
export interface ImportedOpenItem {
|
|
18
|
+
type: OpenItemType;
|
|
19
|
+
number: string;
|
|
20
|
+
/** The `code` of an {@link ImportedContact}. */
|
|
21
|
+
contact: string;
|
|
22
|
+
/** What is still open of it, never negative: the type says the side. */
|
|
23
|
+
amount: Decimal;
|
|
24
|
+
/** The day it was issued. */
|
|
25
|
+
documentDate: IsoDate;
|
|
26
|
+
dueDate: IsoDate | null;
|
|
27
|
+
/** The reference a payment of it quotes — a structured one where the country has them. */
|
|
28
|
+
paymentReference: string | null;
|
|
29
|
+
/** On a purchase, the supplier's own number. */
|
|
30
|
+
supplierReference: string | null;
|
|
31
|
+
label: string | null;
|
|
32
|
+
/** The row of the file, from 1, for a message. */
|
|
33
|
+
row: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ImportedOpenItems {
|
|
36
|
+
items: ImportedOpenItem[];
|
|
37
|
+
contacts: ImportedContact[];
|
|
38
|
+
violations: Violation[];
|
|
39
|
+
}
|
|
40
|
+
/** The columns this reader knows, each under the names it accepts in a header. */
|
|
41
|
+
export declare const OPEN_ITEM_COLUMNS: {
|
|
42
|
+
readonly type: readonly ["type", "document type"];
|
|
43
|
+
readonly number: readonly ["number", "document number", "invoice number"];
|
|
44
|
+
readonly contact: readonly ["contact", "party"];
|
|
45
|
+
readonly contactName: readonly ["contact name", "party name"];
|
|
46
|
+
readonly amount: readonly ["amount", "open amount", "amount open"];
|
|
47
|
+
readonly documentDate: readonly ["document date", "issue date", "date"];
|
|
48
|
+
readonly dueDate: readonly ["due date"];
|
|
49
|
+
readonly paymentReference: readonly ["payment reference", "structured reference"];
|
|
50
|
+
readonly supplierReference: readonly ["supplier reference"];
|
|
51
|
+
readonly label: readonly ["label", "description"];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Reads the file. A date is written `YYYY-MM-DD` and nothing else: a day
|
|
55
|
+
* written in digits only is read differently on each side of an ocean, and is
|
|
56
|
+
* refused rather than guessed. An amount is positive; the type says the side.
|
|
57
|
+
* A row that lacks a value the item needs comes back as a violation and is
|
|
58
|
+
* left out, so that nothing is booked from a list that does not read whole.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readOpenItems(input: string | Uint8Array, options?: ReadOptions): ImportedOpenItems;
|
|
61
|
+
//# sourceMappingURL=open-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-items.d.ts","sourceRoot":"","sources":["../src/open-items.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAI5F,sEAAsE;AACtE,eAAO,MAAM,eAAe,2FAA4F,CAAC;AACzH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAC;IAChB,6BAA6B;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,0FAA0F;IAC1F,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gDAAgD;IAChD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,kFAAkF;AAClF,eAAO,MAAM,iBAAiB;;;;;;;;;;;CAWpB,CAAC;AAMX;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,OAAO,GAAE,WAAgB,GAAG,iBAAiB,CAiGtG"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The open items that go with a trial balance, written as CSV: one row per
|
|
3
|
+
* invoice or credit note still open on the day the balance is drawn up — its
|
|
4
|
+
* number, the party, the amount still open, the day it was issued, the day it
|
|
5
|
+
* falls due, the reference a payment of it will quote.
|
|
6
|
+
*
|
|
7
|
+
* It is the aged balance every package prints beside its trial balance. The
|
|
8
|
+
* trial balance says what the receivable account holds; this says who owes
|
|
9
|
+
* it, under which number. Like the balance, it reads no database and knows no
|
|
10
|
+
* chart: whatever takes it decides which account an item falls on.
|
|
11
|
+
*/
|
|
12
|
+
import { decode, headerKey, parseCsv, separatorOf } from './csv.js';
|
|
13
|
+
import { formatDecimal, parseDecimal } from './decimal.js';
|
|
14
|
+
import { BooksFileError } from './errors.js';
|
|
15
|
+
const DEFAULTS = { encoding: 'utf-8', maxBytes: 64 * 1024 * 1024 };
|
|
16
|
+
/** What an open item is, in the words of the documents it becomes. */
|
|
17
|
+
export const OPEN_ITEM_TYPES = ['sale_invoice', 'sale_credit_note', 'purchase_invoice', 'purchase_credit_note'];
|
|
18
|
+
/** The columns this reader knows, each under the names it accepts in a header. */
|
|
19
|
+
export const OPEN_ITEM_COLUMNS = {
|
|
20
|
+
type: ['type', 'document type'],
|
|
21
|
+
number: ['number', 'document number', 'invoice number'],
|
|
22
|
+
contact: ['contact', 'party'],
|
|
23
|
+
contactName: ['contact name', 'party name'],
|
|
24
|
+
amount: ['amount', 'open amount', 'amount open'],
|
|
25
|
+
documentDate: ['document date', 'issue date', 'date'],
|
|
26
|
+
dueDate: ['due date'],
|
|
27
|
+
paymentReference: ['payment reference', 'structured reference'],
|
|
28
|
+
supplierReference: ['supplier reference'],
|
|
29
|
+
label: ['label', 'description'],
|
|
30
|
+
};
|
|
31
|
+
const REQUIRED = ['type', 'number', 'contact', 'amount', 'documentDate'];
|
|
32
|
+
/**
|
|
33
|
+
* Reads the file. A date is written `YYYY-MM-DD` and nothing else: a day
|
|
34
|
+
* written in digits only is read differently on each side of an ocean, and is
|
|
35
|
+
* refused rather than guessed. An amount is positive; the type says the side.
|
|
36
|
+
* A row that lacks a value the item needs comes back as a violation and is
|
|
37
|
+
* left out, so that nothing is booked from a list that does not read whole.
|
|
38
|
+
*/
|
|
39
|
+
export function readOpenItems(input, options = {}) {
|
|
40
|
+
const text = decode(input, options.encoding ?? DEFAULTS.encoding, options.maxBytes ?? DEFAULTS.maxBytes);
|
|
41
|
+
const firstLine = text.split(/\r?\n/, 1)[0] ?? '';
|
|
42
|
+
const separator = separatorOf(firstLine);
|
|
43
|
+
const rows = parseCsv(text, separator);
|
|
44
|
+
const header = rows.shift();
|
|
45
|
+
if (header === undefined)
|
|
46
|
+
throw new BooksFileError('empty_file', 'the file is empty');
|
|
47
|
+
const keys = header.fields.map(headerKey);
|
|
48
|
+
const at = {};
|
|
49
|
+
for (const [column, names] of Object.entries(OPEN_ITEM_COLUMNS)) {
|
|
50
|
+
const found = keys.findIndex((key) => names.includes(key));
|
|
51
|
+
if (found !== -1)
|
|
52
|
+
at[column] = found;
|
|
53
|
+
}
|
|
54
|
+
for (const column of REQUIRED) {
|
|
55
|
+
if (at[column] === undefined) {
|
|
56
|
+
throw new BooksFileError('missing_column', `the header names no ${OPEN_ITEM_COLUMNS[column][0]} column; it needs one of: ${OPEN_ITEM_COLUMNS[column].join(', ')}`, header.row);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (rows.length === 0)
|
|
60
|
+
throw new BooksFileError('empty_file', 'the file has a header and no row under it', header.row);
|
|
61
|
+
const marks = separator === ',' ? ['.'] : ['.', ','];
|
|
62
|
+
const cell = (fields, column) => {
|
|
63
|
+
const index = at[column];
|
|
64
|
+
return index === undefined ? '' : (fields[index] ?? '').trim();
|
|
65
|
+
};
|
|
66
|
+
const date = (fields, column, row) => {
|
|
67
|
+
const raw = cell(fields, column);
|
|
68
|
+
if (raw === '')
|
|
69
|
+
return null;
|
|
70
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(raw);
|
|
71
|
+
const day = match === null ? null : new Date(`${raw}T00:00:00Z`);
|
|
72
|
+
if (day === null || Number.isNaN(day.getTime()) || day.toISOString().slice(0, 10) !== raw) {
|
|
73
|
+
throw new BooksFileError('invalid_value', `"${raw}" in the ${OPEN_ITEM_COLUMNS[column][0]} column is not a day written YYYY-MM-DD`, row);
|
|
74
|
+
}
|
|
75
|
+
return raw;
|
|
76
|
+
};
|
|
77
|
+
const items = [];
|
|
78
|
+
const contacts = new Map();
|
|
79
|
+
const violations = [];
|
|
80
|
+
for (const { row, fields } of rows) {
|
|
81
|
+
if (fields.every((field) => field.trim() === ''))
|
|
82
|
+
continue;
|
|
83
|
+
const missing = REQUIRED.filter((column) => cell(fields, column) === '');
|
|
84
|
+
if (missing.length > 0) {
|
|
85
|
+
violations.push({
|
|
86
|
+
rule: 'item_incomplete',
|
|
87
|
+
message: `an open item has no ${missing.map((column) => OPEN_ITEM_COLUMNS[column][0]).join(', ')} and was left out`,
|
|
88
|
+
row,
|
|
89
|
+
});
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const type = cell(fields, 'type');
|
|
93
|
+
if (!OPEN_ITEM_TYPES.includes(type)) {
|
|
94
|
+
throw new BooksFileError('invalid_value', `"${type}" in the type column is not one of ${OPEN_ITEM_TYPES.join(', ')}`, row);
|
|
95
|
+
}
|
|
96
|
+
const raw = cell(fields, 'amount');
|
|
97
|
+
const amount = parseDecimal(raw, marks);
|
|
98
|
+
if (amount === null || amount <= 0n) {
|
|
99
|
+
throw new BooksFileError('invalid_value', `"${raw}" in the amount column is not a positive amount: the type of the item says its side, never a sign`, row);
|
|
100
|
+
}
|
|
101
|
+
const contact = cell(fields, 'contact');
|
|
102
|
+
if (!contacts.has(contact)) {
|
|
103
|
+
const contactName = cell(fields, 'contactName');
|
|
104
|
+
contacts.set(contact, {
|
|
105
|
+
code: contact,
|
|
106
|
+
name: contactName === '' ? contact : contactName,
|
|
107
|
+
vatNumber: null,
|
|
108
|
+
registrationNumber: null,
|
|
109
|
+
email: null,
|
|
110
|
+
country: null,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const optional = (column) => {
|
|
114
|
+
const value = cell(fields, column);
|
|
115
|
+
return value === '' ? null : value;
|
|
116
|
+
};
|
|
117
|
+
items.push({
|
|
118
|
+
type: type,
|
|
119
|
+
number: cell(fields, 'number'),
|
|
120
|
+
contact,
|
|
121
|
+
amount: formatDecimal(amount),
|
|
122
|
+
documentDate: date(fields, 'documentDate', row),
|
|
123
|
+
dueDate: date(fields, 'dueDate', row),
|
|
124
|
+
paymentReference: optional('paymentReference'),
|
|
125
|
+
supplierReference: optional('supplierReference'),
|
|
126
|
+
label: optional('label'),
|
|
127
|
+
row,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return { items, contacts: [...contacts.values()], violations };
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=open-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-items.js","sourceRoot":"","sources":["../src/open-items.ts"],"names":[],"mappings":"AAAA;;;;;;;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CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC;YACrC,gBAAgB,EAAE,QAAQ,CAAC,kBAAkB,CAAC;YAC9C,iBAAiB,EAAE,QAAQ,CAAC,mBAAmB,CAAC;YAChD,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;YACxB,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekwo-ai/trial-balance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Reads a trial balance written as CSV — account, debit, credit — into the plain shape an opening balance is made of, in TypeScript: amounts as decimal strings, and what does not add up. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"trial-balance",
|