@ekwo-ai/core 0.13.0 → 0.15.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/dist/books/analytics.d.ts +32 -0
- package/dist/books/analytics.d.ts.map +1 -0
- package/dist/books/analytics.js +94 -0
- package/dist/books/analytics.js.map +1 -0
- package/dist/books/columns.d.ts.map +1 -1
- package/dist/books/columns.js +5 -0
- package/dist/books/columns.js.map +1 -1
- package/dist/books/contacts.d.ts +43 -0
- package/dist/books/contacts.d.ts.map +1 -1
- package/dist/books/contacts.js +61 -0
- package/dist/books/contacts.js.map +1 -1
- package/dist/books/index.d.ts +3 -0
- package/dist/books/index.d.ts.map +1 -1
- package/dist/books/index.js +3 -0
- package/dist/books/index.js.map +1 -1
- package/dist/books/lines.d.ts +38 -0
- package/dist/books/lines.d.ts.map +1 -0
- package/dist/books/lines.js +73 -0
- package/dist/books/lines.js.map +1 -0
- package/dist/books/matching.d.ts +65 -0
- package/dist/books/matching.d.ts.map +1 -0
- package/dist/books/matching.js +95 -0
- package/dist/books/matching.js.map +1 -0
- package/dist/einvoicing/fiscalisation.d.ts +296 -0
- package/dist/einvoicing/fiscalisation.d.ts.map +1 -0
- package/dist/einvoicing/fiscalisation.js +642 -0
- package/dist/einvoicing/fiscalisation.js.map +1 -0
- package/dist/einvoicing/formats.d.ts +16 -0
- package/dist/einvoicing/formats.d.ts.map +1 -1
- package/dist/einvoicing/formats.js +110 -0
- package/dist/einvoicing/formats.js.map +1 -1
- package/dist/einvoicing/index.d.ts +4 -1
- package/dist/einvoicing/index.d.ts.map +1 -1
- package/dist/einvoicing/index.js +4 -1
- package/dist/einvoicing/index.js.map +1 -1
- package/dist/einvoicing/issue.d.ts +20 -1
- package/dist/einvoicing/issue.d.ts.map +1 -1
- package/dist/einvoicing/issue.js +54 -9
- package/dist/einvoicing/issue.js.map +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +1 -1
- package/dist/types.d.ts +12 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -14
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matching open items of one counterparty: what settles what, several lines in
|
|
3
|
+
* one gesture, a small difference booked, and a line left unnamed on purpose.
|
|
4
|
+
*
|
|
5
|
+
* `suggest_item_combinations()` proposes, `reconcile_many()` and
|
|
6
|
+
* `reconcile_with_difference()` match, `leave_line_unnamed()` and its undo
|
|
7
|
+
* record a decision about a line (decisions 0071 and 0072). The search, the
|
|
8
|
+
* accounts a difference is booked on, the tolerance and every refusal are the
|
|
9
|
+
* schema's; this file asks for them and shapes the answer.
|
|
10
|
+
*/
|
|
11
|
+
import { money, moneyFields } from './format.js';
|
|
12
|
+
import { only } from './shared.js';
|
|
13
|
+
/**
|
|
14
|
+
* What lines of one counterparty and one account could settle each other, line
|
|
15
|
+
* by line: an exact pair, several lines to the cent, or — when nothing is
|
|
16
|
+
* exact — a pair or several lines within the company's difference tolerance.
|
|
17
|
+
*/
|
|
18
|
+
export async function suggestItemCombinations(backend, args) {
|
|
19
|
+
const found = await backend.rpc('suggest_item_combinations', {
|
|
20
|
+
p_company_id: args.company_id,
|
|
21
|
+
...(args.contact_id === undefined ? {} : { p_contact_id: args.contact_id }),
|
|
22
|
+
});
|
|
23
|
+
const proposals = found.map((row) => ({
|
|
24
|
+
proposal_id: String(row['proposal_id']),
|
|
25
|
+
ordinal: Number(row['ordinal']),
|
|
26
|
+
contact_id: String(row['contact_id']),
|
|
27
|
+
account_id: String(row['account_id']),
|
|
28
|
+
line_id: String(row['line_id']),
|
|
29
|
+
side: String(row['side']),
|
|
30
|
+
amount: money(row['amount']),
|
|
31
|
+
kind: String(row['kind']),
|
|
32
|
+
line_ids: (row['line_ids'] ?? []).map(String),
|
|
33
|
+
total: money(row['total']),
|
|
34
|
+
difference: money(row['difference']),
|
|
35
|
+
because: String(row['because']),
|
|
36
|
+
alternatives: Number(row['alternatives']),
|
|
37
|
+
}));
|
|
38
|
+
return {
|
|
39
|
+
proposals,
|
|
40
|
+
count: proposals.length,
|
|
41
|
+
note: 'Nothing is matched by a proposal. A difference other than 0.00 is closed only by reconcile_with_difference, with a reason, once the user has seen the difference and said so; reconcile_many matches a proposal whose difference is 0.00.',
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** The reasons a difference may be booked for, with their accounts, and the largest difference the company books. */
|
|
45
|
+
export async function matchingDifferenceOptions(backend, args) {
|
|
46
|
+
const [tolerance] = await backend.rpc('matching_difference_tolerance', { p_company_id: args.company_id });
|
|
47
|
+
const reasons = await backend.rpc('matching_difference_reasons', { p_company_id: args.company_id });
|
|
48
|
+
return {
|
|
49
|
+
tolerance: tolerance === undefined
|
|
50
|
+
? null
|
|
51
|
+
: {
|
|
52
|
+
units: Number(tolerance['tolerance_units']),
|
|
53
|
+
amount: money(tolerance['tolerance']),
|
|
54
|
+
currency_code: tolerance['currency_code'] ?? null,
|
|
55
|
+
},
|
|
56
|
+
reasons,
|
|
57
|
+
note: 'side says which difference a reason answers: charge when the lines carry more debit than credit, income the other way, either for both. A reason that is not available has no account to be booked on, and is refused.',
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function matched(rows, what) {
|
|
61
|
+
return only(moneyFields(rows, ['amount', 'difference']), what);
|
|
62
|
+
}
|
|
63
|
+
/** Matches several lines together, their open debits and credits equal to the cent. */
|
|
64
|
+
export async function reconcileMany(backend, args) {
|
|
65
|
+
const done = matched(await backend.rpc('reconcile_many', { p_line_ids: args.line_ids }), 'the lines were not matched');
|
|
66
|
+
return {
|
|
67
|
+
matching: done,
|
|
68
|
+
note: 'The lines are matched under one letter, pair by pair through reconcile(). unreconcile undoes one matching at a time.',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** Books the difference on the account of the reason and matches everything. */
|
|
72
|
+
export async function reconcileWithDifference(backend, args) {
|
|
73
|
+
const done = matched(await backend.rpc('reconcile_with_difference', { p_line_ids: args.line_ids, p_reason: args.reason }), 'the lines were not matched');
|
|
74
|
+
return {
|
|
75
|
+
matching: done,
|
|
76
|
+
note: 'The difference is booked in a posted entry (adjustment_entry_id) on the same account and counterparty, against the account the pack gives for the reason, and every line is matched under one letter. unreconcile of the matching of the difference line takes the entry back with its mirror.',
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** Records that a line names nobody on purpose: it is no longer proposed a contact. */
|
|
80
|
+
export async function leaveLineUnnamed(backend, args) {
|
|
81
|
+
const left = only(await backend.rpc('leave_line_unnamed', { p_line_id: args.line_id, p_reason: args.reason }), `line ${args.line_id} was not left unnamed`);
|
|
82
|
+
return {
|
|
83
|
+
left_unnamed: left,
|
|
84
|
+
note: 'The line is no longer proposed a contact. It is still an open item, it can still be matched or named, and undo_leave_line_unnamed takes the decision back.',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** Takes back `leave_line_unnamed()`: the line is proposed a contact again. */
|
|
88
|
+
export async function undoLeaveLineUnnamed(backend, args) {
|
|
89
|
+
const removed = only(await backend.rpc('undo_leave_line_unnamed', { p_line_id: args.line_id }), `line ${args.line_id} was not left unnamed`);
|
|
90
|
+
return {
|
|
91
|
+
removed,
|
|
92
|
+
note: 'The line is proposed a contact again.',
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=matching.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matching.js","sourceRoot":"","sources":["../../src/books/matching.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAwCnC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAgB,EAChB,IAAiC;IAEjC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAM,2BAA2B,EAAE;QAChE,YAAY,EAAE,IAAI,CAAC,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GAAG,OAAO,CAClB,MAAM,OAAO,CAAC,GAAG,CAAM,2BAA2B,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,EACzG,4BAA4B,CAC7B,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,gSAAgS;KACvS,CAAC;AACJ,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAgB,EAAE,IAA0B;IACjF,MAAM,IAAI,GAAG,IAAI,CACf,MAAM,OAAO,CAAC,GAAG,CAAM,oBAAoB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,EAChG,QAAQ,IAAI,CAAC,OAAO,uBAAuB,CAC5C,CAAC;IACF,OAAO;QACL,YAAY,EAAE,IAAI;QAClB,IAAI,EAAE,4JAA4J;KACnK,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAgB,EAAE,IAAyB;IACpF,MAAM,OAAO,GAAG,IAAI,CAClB,MAAM,OAAO,CAAC,GAAG,CAAM,yBAAyB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,EAC9E,QAAQ,IAAI,CAAC,OAAO,uBAAuB,CAC5C,CAAC;IACF,OAAO;QACL,OAAO;QACP,IAAI,EAAE,uCAAuC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fiscalisation: the chained record a country requires the invoicing
|
|
3
|
+
* software to leave for every invoice it issues.
|
|
4
|
+
*
|
|
5
|
+
* A capability of the `einvoicing` module, and the same shape as issuing an
|
|
6
|
+
* electronic invoice: a posted sale, an artefact a brick writes, a state the
|
|
7
|
+
* database records. Here the artefact is a fiscal record, and what the
|
|
8
|
+
* database keeps is a chain — each record carries the hash of the one before
|
|
9
|
+
* it, in one company and one invoicing system.
|
|
10
|
+
*
|
|
11
|
+
* **The core knows no country.** Whether a company has such a regime, and
|
|
12
|
+
* every rule of it, is the `einvoicing.fiscalisation` block of its country
|
|
13
|
+
* pack, which the socle compiles into `country_defaults.einvoice_fiscalisation`
|
|
14
|
+
* and `einvoicing.fiscal_regime()` reads back. Which brick writes the record
|
|
15
|
+
* is the pack's `format`, looked up in `FISCALISATION_FORMATS` — the same
|
|
16
|
+
* pattern as `EINVOICE_FORMATS` — and a format no brick of this release writes
|
|
17
|
+
* is refused by name, `format_without_brick`.
|
|
18
|
+
*
|
|
19
|
+
* **The gesture is explicit.** Nothing here runs on posting. A posted sale of
|
|
20
|
+
* a company whose pack declares a regime and that has no record is named by
|
|
21
|
+
* `fiscalisationStatus()`, and `fiscaliseDocument()` is called by somebody who
|
|
22
|
+
* decided to chain it — `ekwo einvoice fiscalise`, `einvoicing_fiscalise`.
|
|
23
|
+
*
|
|
24
|
+
* What only a program can do is here: run the brick, read the tail of the
|
|
25
|
+
* chain, read the hashed fields back out of the text the brick hashed. What
|
|
26
|
+
* can be checked without trusting this code is checked again by
|
|
27
|
+
* `einvoicing.append_fiscal_record()`: the regime, the digest, the fields, the
|
|
28
|
+
* tail, a record made once.
|
|
29
|
+
*
|
|
30
|
+
* **A clearance regime chains nothing.** There the authority validates every
|
|
31
|
+
* invoice before it is issued, and what the books keep is the submission and
|
|
32
|
+
* the answer: `recordClearanceSubmission()` and `recordClearanceAnswer()`
|
|
33
|
+
* write them through `einvoicing.record_clearance_submission()` and
|
|
34
|
+
* `einvoicing.record_clearance_answer()`, which check every transition. The
|
|
35
|
+
* call to the authority is the host's; nothing here dials anybody.
|
|
36
|
+
*/
|
|
37
|
+
import { type Backend, type Row } from '../books/backend.js';
|
|
38
|
+
import { type EinvoiceViolation } from './formats.js';
|
|
39
|
+
/** How the records of an invoicing system reach the authority. */
|
|
40
|
+
export type FiscalSubmissionMode = 'realtime' | 'batch' | 'none';
|
|
41
|
+
export declare const FISCAL_SUBMISSION_MODES: readonly ["realtime", "batch", "none"];
|
|
42
|
+
/** What a record says of its invoice: issued, or its record cancelled. */
|
|
43
|
+
export type FiscalRecordKind = 'alta' | 'anulacion';
|
|
44
|
+
export declare const FISCAL_RECORD_KINDS: readonly ["alta", "anulacion"];
|
|
45
|
+
/**
|
|
46
|
+
* The invoicing system that generates the record. Every field is a fact of
|
|
47
|
+
* the product or of its installation that the operator states, and none is
|
|
48
|
+
* invented here. The three booleans are facts a regime may ask of the
|
|
49
|
+
* product — whether it can only send, whether it can keep the books of
|
|
50
|
+
* several taxpayers, whether it does now; a brick whose regime does not ask
|
|
51
|
+
* ignores them.
|
|
52
|
+
*/
|
|
53
|
+
export interface FiscalSystem {
|
|
54
|
+
name: string;
|
|
55
|
+
id: string;
|
|
56
|
+
version: string;
|
|
57
|
+
installation: string;
|
|
58
|
+
producerName: string;
|
|
59
|
+
producerTaxId: string;
|
|
60
|
+
verifactuOnly?: boolean;
|
|
61
|
+
multipleTaxpayers?: boolean;
|
|
62
|
+
multipleTaxpayersNow?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/** One record to write: the document as the books publish it, and what only the system knows. */
|
|
65
|
+
export interface FiscalRecordInput {
|
|
66
|
+
header: Row;
|
|
67
|
+
lines: Row[];
|
|
68
|
+
taxes: Row[];
|
|
69
|
+
kind: FiscalRecordKind;
|
|
70
|
+
/** ISO 8601 with its offset: `2027-01-04T10:15:00+01:00`. */
|
|
71
|
+
generatedAt: string;
|
|
72
|
+
system: FiscalSystem;
|
|
73
|
+
/** The record before it in this system, or null for the first. */
|
|
74
|
+
previous: {
|
|
75
|
+
taxId: string;
|
|
76
|
+
series: string;
|
|
77
|
+
number: string;
|
|
78
|
+
issuedOn: string;
|
|
79
|
+
hash: string;
|
|
80
|
+
} | null;
|
|
81
|
+
}
|
|
82
|
+
/** What a brick of `packages/formats/` provides for one fiscalisation format. */
|
|
83
|
+
export interface FiscalisationFormat {
|
|
84
|
+
/** The name a pack declares in `einvoicing.fiscalisation.format`. */
|
|
85
|
+
format: string;
|
|
86
|
+
/** The package that writes it, by its published name. */
|
|
87
|
+
brick: string;
|
|
88
|
+
/** What the record declares it follows. */
|
|
89
|
+
specification: string;
|
|
90
|
+
/** The exact text the regime hashes. */
|
|
91
|
+
hashInput(input: FiscalRecordInput): string;
|
|
92
|
+
/** Its digest, as the record carries it. */
|
|
93
|
+
hash(input: FiscalRecordInput): string;
|
|
94
|
+
write(input: FiscalRecordInput): {
|
|
95
|
+
content: string;
|
|
96
|
+
filename: string;
|
|
97
|
+
mediaType: string;
|
|
98
|
+
violations: EinvoiceViolation[];
|
|
99
|
+
};
|
|
100
|
+
/** What the QR code of the invoice encodes, for a mode of submission. */
|
|
101
|
+
verificationUrl(input: FiscalRecordInput, mode: FiscalSubmissionMode, environment?: 'production' | 'test'): string;
|
|
102
|
+
}
|
|
103
|
+
/** Every fiscalisation format a brick of this release writes, by the name a pack declares it under. */
|
|
104
|
+
export declare const FISCALISATION_FORMATS: Readonly<Record<string, FiscalisationFormat>>;
|
|
105
|
+
/**
|
|
106
|
+
* The format of a pack's regime, or the refusal that names the missing brick.
|
|
107
|
+
* Nothing is written in the nearest format that exists: a record in another
|
|
108
|
+
* format is a record the authority refuses.
|
|
109
|
+
*/
|
|
110
|
+
export declare function fiscalisationFormat(format: string, formats?: Readonly<Record<string, FiscalisationFormat>>): FiscalisationFormat;
|
|
111
|
+
/** An annual turnover or revenue, as the law states it. */
|
|
112
|
+
export interface FiscalTurnover {
|
|
113
|
+
amount: number;
|
|
114
|
+
currency: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The regime of a company as the socle compiled it from its pack, or null
|
|
118
|
+
* where it has none. `chained`: a record for every invoice, chained by a
|
|
119
|
+
* hash. `clearance`: every invoice validated by the authority before it is
|
|
120
|
+
* issued, nothing chained. `reporting`: the documents' data reported to the
|
|
121
|
+
* authority, no hash, nothing chained — the core keeps no chain for it.
|
|
122
|
+
*/
|
|
123
|
+
export interface FiscalRegime {
|
|
124
|
+
kind: 'chained' | 'clearance' | 'reporting';
|
|
125
|
+
format: string;
|
|
126
|
+
/** Empty while the obligation is only announced. `turnover_above` where the law phases it by size. */
|
|
127
|
+
mandatory_from: {
|
|
128
|
+
who: string | null;
|
|
129
|
+
from: string;
|
|
130
|
+
turnover_above?: FiscalTurnover;
|
|
131
|
+
}[];
|
|
132
|
+
/** The thresholds of exemption, oldest first; absent where the pack declares none. */
|
|
133
|
+
exemption?: {
|
|
134
|
+
turnover_below: FiscalTurnover;
|
|
135
|
+
valid_from: string;
|
|
136
|
+
legal_reference: string;
|
|
137
|
+
source: string | null;
|
|
138
|
+
}[];
|
|
139
|
+
/** What a clearance regime says of the authority's answer; absent for the other two. */
|
|
140
|
+
clearance?: {
|
|
141
|
+
verification: 'returned' | 'computed' | 'none';
|
|
142
|
+
cancellation_window: string | null;
|
|
143
|
+
rejection_window: string | null;
|
|
144
|
+
legal_reference: string | null;
|
|
145
|
+
source: string | null;
|
|
146
|
+
};
|
|
147
|
+
/** A day only announced, no text in force: it binds nobody. */
|
|
148
|
+
announced_from: string | null;
|
|
149
|
+
announced_by: string | null;
|
|
150
|
+
announced_on: string | null;
|
|
151
|
+
hash: {
|
|
152
|
+
algorithm: string;
|
|
153
|
+
separator: string | null;
|
|
154
|
+
fields: Partial<Record<FiscalRecordKind | '*', string[]>>;
|
|
155
|
+
} | null;
|
|
156
|
+
qr: {
|
|
157
|
+
size_mm: {
|
|
158
|
+
min: number;
|
|
159
|
+
max: number;
|
|
160
|
+
};
|
|
161
|
+
error_correction: string;
|
|
162
|
+
label: string | null;
|
|
163
|
+
} | null;
|
|
164
|
+
mention: {
|
|
165
|
+
text: string;
|
|
166
|
+
alternatives: string[];
|
|
167
|
+
modes: FiscalSubmissionMode[];
|
|
168
|
+
}[];
|
|
169
|
+
submission: {
|
|
170
|
+
mode: FiscalSubmissionMode;
|
|
171
|
+
modes: FiscalSubmissionMode[];
|
|
172
|
+
channel: string | null;
|
|
173
|
+
cadence: Row[];
|
|
174
|
+
};
|
|
175
|
+
events: {
|
|
176
|
+
summary_every_hours: number;
|
|
177
|
+
modes: FiscalSubmissionMode[];
|
|
178
|
+
} | null;
|
|
179
|
+
reported: {
|
|
180
|
+
what: string;
|
|
181
|
+
by: ('supplier' | 'customer')[];
|
|
182
|
+
}[];
|
|
183
|
+
tax_attributes: Record<string, Record<string, string>>;
|
|
184
|
+
/** What the brick needs on every line that the books do not record; absent where the pack declares none. */
|
|
185
|
+
line_attributes?: Record<string, string>;
|
|
186
|
+
legal_reference: string;
|
|
187
|
+
source: string;
|
|
188
|
+
}
|
|
189
|
+
/** The fiscalisation regime of a company's fiscal country, or null. */
|
|
190
|
+
export declare function fiscalRegime(backend: Backend, companyId: string): Promise<FiscalRegime | null>;
|
|
191
|
+
/**
|
|
192
|
+
* The fields a hash covers, read back out of the text the brick hashed, in
|
|
193
|
+
* the order the pack names them: `name=value` joined by the pack's separator.
|
|
194
|
+
* Null where the text does not hold them in that order — the pack and the
|
|
195
|
+
* brick then disagree about what is hashed, and nothing is chained.
|
|
196
|
+
*/
|
|
197
|
+
export declare function hashedFields(text: string, fields: readonly string[], separator: string): Record<string, string> | null;
|
|
198
|
+
/** Now, as ISO 8601 with the offset of this machine: what a record says it was generated at. */
|
|
199
|
+
export declare function generatedNow(at?: Date): string;
|
|
200
|
+
/** The chain a system keeps for a company: its identifier and its installation. */
|
|
201
|
+
export declare const fiscalSystemId: (system: FiscalSystem) => string;
|
|
202
|
+
export interface FiscaliseOptions {
|
|
203
|
+
system: FiscalSystem;
|
|
204
|
+
/** `alta` (the default) when the invoice is issued, `anulacion` when its record is cancelled. */
|
|
205
|
+
kind?: FiscalRecordKind;
|
|
206
|
+
/** One of the modes the pack allows; the pack's default when left out. */
|
|
207
|
+
mode?: FiscalSubmissionMode;
|
|
208
|
+
/** When the record is generated, ISO 8601 with its offset. Now, on this machine, when left out. */
|
|
209
|
+
generatedAt?: string;
|
|
210
|
+
/** Which service of the authority the verification URL points at. */
|
|
211
|
+
environment?: 'production' | 'test';
|
|
212
|
+
/** Why a credit note rectifies, in the regime's own code, where it asks and the books do not say. */
|
|
213
|
+
rectification?: string;
|
|
214
|
+
/** Write the record and say what is wrong with it; chain nothing. */
|
|
215
|
+
dryRun?: boolean;
|
|
216
|
+
/** Hand the file back too. */
|
|
217
|
+
includeFile?: boolean;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Writes the fiscal record of a posted sale with the brick its pack's regime
|
|
221
|
+
* names, and — unless it breaks a rule or `dryRun` is asked — chains it after
|
|
222
|
+
* the tail of the system's chain and keeps its file. A document whose record
|
|
223
|
+
* is in the chain already is answered with that record, not chained twice.
|
|
224
|
+
*/
|
|
225
|
+
export declare function fiscaliseDocument(backend: Backend, documentId: string, options: FiscaliseOptions, formats?: Readonly<Record<string, FiscalisationFormat>>): Promise<Row>;
|
|
226
|
+
/** The threshold of exemption that holds on a day, or null where the pack declares none that does. */
|
|
227
|
+
export declare function exemptionOn(regime: FiscalRegime, day: string): NonNullable<FiscalRegime['exemption']>[number] | null;
|
|
228
|
+
/**
|
|
229
|
+
* Where the fiscal records of a company stand: its regime, each chain
|
|
230
|
+
* verified, the records still to be sent, the posted sales without a record,
|
|
231
|
+
* and the latest events. A posted sale without a record is named here and
|
|
232
|
+
* never fiscalised on the way.
|
|
233
|
+
*/
|
|
234
|
+
export declare function fiscalisationStatus(backend: Backend, companyId: string, options?: {
|
|
235
|
+
limit?: number;
|
|
236
|
+
}): Promise<Row>;
|
|
237
|
+
/** Where one submission of an invoice to the authority stands. */
|
|
238
|
+
export type ClearanceState = 'submitted' | 'validated' | 'rejected' | 'cancelled';
|
|
239
|
+
export declare const CLEARANCE_STATES: readonly ["submitted", "validated", "rejected", "cancelled"];
|
|
240
|
+
/** What the authority, the buyer or the issuer can bring a submission to. */
|
|
241
|
+
export declare const CLEARANCE_ANSWERS: readonly ["validated", "rejected", "cancelled"];
|
|
242
|
+
/** A submission somebody made to the authority, as the host that made it reports it. */
|
|
243
|
+
export interface ClearanceSubmission {
|
|
244
|
+
/** What the authority named the submission on receipt, where it named it. */
|
|
245
|
+
reference?: string;
|
|
246
|
+
/** The electronic invoice submitted, where `einvoicing.issues` keeps it. */
|
|
247
|
+
issueId?: string;
|
|
248
|
+
/** When it was submitted, ISO 8601. Now when left out. */
|
|
249
|
+
submittedAt?: string;
|
|
250
|
+
/** What the authority said on receipt, as it said it. */
|
|
251
|
+
answer?: Row;
|
|
252
|
+
}
|
|
253
|
+
/** What came back about the latest submission of a document. */
|
|
254
|
+
export interface ClearanceAnswer {
|
|
255
|
+
state: (typeof CLEARANCE_ANSWERS)[number];
|
|
256
|
+
/** The identifier the authority gave the invoice: required on validation. */
|
|
257
|
+
identifier?: string;
|
|
258
|
+
/** When the authority validated it, ISO 8601: required on validation. */
|
|
259
|
+
validatedAt?: string;
|
|
260
|
+
/** The link to its verification, which the invoice carries, where the regime has one. */
|
|
261
|
+
verificationUrl?: string;
|
|
262
|
+
/** Why it was rejected or cancelled, as it was said: required for both. */
|
|
263
|
+
reason?: string;
|
|
264
|
+
/** Who rejected it: the authority (the default) or the buyer. */
|
|
265
|
+
by?: 'authority' | 'buyer';
|
|
266
|
+
/** When the answer came, ISO 8601. Now when left out; the windows of the regime are read against it. */
|
|
267
|
+
at?: string;
|
|
268
|
+
/** The answer itself, as the authority gave it. */
|
|
269
|
+
answer?: Row;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Records that a posted sale was submitted to the authority under its
|
|
273
|
+
* company's clearance regime. Calls nobody: the submission is the host's,
|
|
274
|
+
* and this keeps what it reports. The database refuses a second submission
|
|
275
|
+
* while one waits, after a validation or after a cancellation.
|
|
276
|
+
*/
|
|
277
|
+
export declare function recordClearanceSubmission(backend: Backend, documentId: string, submission?: ClearanceSubmission): Promise<Row>;
|
|
278
|
+
/**
|
|
279
|
+
* Records what came back about the latest submission of a document: its
|
|
280
|
+
* validation, with the identifier and the moment the authority gave it; a
|
|
281
|
+
* rejection by the authority or, within the regime's window, by the buyer;
|
|
282
|
+
* its cancellation by the issuer, within the regime's window. Every
|
|
283
|
+
* transition is checked by `einvoicing.record_clearance_answer()`, which
|
|
284
|
+
* raises on one that cannot have happened.
|
|
285
|
+
*/
|
|
286
|
+
export declare function recordClearanceAnswer(backend: Backend, documentId: string, answer: ClearanceAnswer): Promise<Row>;
|
|
287
|
+
/** The variable the command line and the MCP server read the invoicing system from, as JSON. */
|
|
288
|
+
export declare const FISCAL_SYSTEM_ENV = "EKWO_FISCAL_SYSTEM";
|
|
289
|
+
/**
|
|
290
|
+
* The invoicing system, from the JSON an operator wrote: every text field
|
|
291
|
+
* present and not blank, the three booleans booleans where given. Nothing is
|
|
292
|
+
* filled in — a producer's tax number guessed is a record the authority
|
|
293
|
+
* attributes to somebody else.
|
|
294
|
+
*/
|
|
295
|
+
export declare function parseFiscalSystem(value: unknown, where?: string): FiscalSystem;
|
|
296
|
+
//# sourceMappingURL=fiscalisation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiscalisation.d.ts","sourceRoot":"","sources":["../../src/einvoicing/fiscalisation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EAAc,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKxE,kEAAkE;AAClE,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,eAAO,MAAM,uBAAuB,wCAAyC,CAAC;AAE9E,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,WAAW,CAAC;AAEpD,eAAO,MAAM,mBAAmB,gCAAiC,CAAC;AAElE;;;;;;;GAOG;AAC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