@stamhoofd/structures 2.110.0 → 2.112.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/LICENSE.md +32 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/src/BalanceItem.d.ts +10 -0
- package/dist/src/BalanceItem.d.ts.map +1 -1
- package/dist/src/BalanceItem.js +35 -4
- package/dist/src/BalanceItem.js.map +1 -1
- package/dist/src/BalanceItemDetailed.d.ts +8 -0
- package/dist/src/BalanceItemDetailed.d.ts.map +1 -1
- package/dist/src/BalanceItemDetailed.js +11 -4
- package/dist/src/BalanceItemDetailed.js.map +1 -1
- package/dist/src/Company.d.ts +1 -0
- package/dist/src/Company.d.ts.map +1 -1
- package/dist/src/Company.js +23 -0
- package/dist/src/Company.js.map +1 -1
- package/dist/src/PaymentCustomer.d.ts +1 -0
- package/dist/src/PaymentCustomer.d.ts.map +1 -1
- package/dist/src/PaymentCustomer.js +23 -0
- package/dist/src/PaymentCustomer.js.map +1 -1
- package/dist/src/Version.d.ts +1 -1
- package/dist/src/Version.js +1 -1
- package/dist/src/addresses/Address.d.ts +1 -0
- package/dist/src/addresses/Address.d.ts.map +1 -1
- package/dist/src/addresses/Address.js +3 -0
- package/dist/src/addresses/Address.js.map +1 -1
- package/dist/src/billing/Invoice.d.ts +39 -4
- package/dist/src/billing/Invoice.d.ts.map +1 -1
- package/dist/src/billing/Invoice.js +196 -13
- package/dist/src/billing/Invoice.js.map +1 -1
- package/dist/src/billing/Invoice.test.d.ts +2 -0
- package/dist/src/billing/Invoice.test.d.ts.map +1 -0
- package/dist/src/billing/Invoice.test.js +188 -0
- package/dist/src/billing/Invoice.test.js.map +1 -0
- package/dist/src/billing/InvoicedBalanceItem.d.ts +5 -3
- package/dist/src/billing/InvoicedBalanceItem.d.ts.map +1 -1
- package/dist/src/billing/InvoicedBalanceItem.js +25 -10
- package/dist/src/billing/InvoicedBalanceItem.js.map +1 -1
- package/dist/src/billing/InvoicedBalanceItem.test.js +31 -12
- package/dist/src/billing/InvoicedBalanceItem.test.js.map +1 -1
- package/dist/src/billing/index.d.ts +1 -0
- package/dist/src/billing/index.d.ts.map +1 -1
- package/dist/src/billing/index.js +4 -0
- package/dist/src/billing/index.js.map +1 -1
- package/dist/src/email/Email.d.ts +2 -1
- package/dist/src/email/Email.d.ts.map +1 -1
- package/dist/src/email/Email.js +2 -1
- package/dist/src/email/Email.js.map +1 -1
- package/dist/src/email/EmailTemplate.d.ts +2 -0
- package/dist/src/email/EmailTemplate.d.ts.map +1 -1
- package/dist/src/email/EmailTemplate.js +20 -0
- package/dist/src/email/EmailTemplate.js.map +1 -1
- package/dist/src/endpoints/UitpasNumbersGetDetailsRequest.d.ts +10 -0
- package/dist/src/endpoints/UitpasNumbersGetDetailsRequest.d.ts.map +1 -0
- package/dist/src/endpoints/UitpasNumbersGetDetailsRequest.js +38 -0
- package/dist/src/endpoints/UitpasNumbersGetDetailsRequest.js.map +1 -0
- package/dist/src/members/MemberDetails.d.ts +4 -1
- package/dist/src/members/MemberDetails.d.ts.map +1 -1
- package/dist/src/members/MemberDetails.js +39 -10
- package/dist/src/members/MemberDetails.js.map +1 -1
- package/dist/src/members/MemberDetails.test.js +144 -0
- package/dist/src/members/MemberDetails.test.js.map +1 -1
- package/dist/src/members/Payment.d.ts +1 -0
- package/dist/src/members/Payment.d.ts.map +1 -1
- package/dist/src/members/Payment.js +4 -0
- package/dist/src/members/Payment.js.map +1 -1
- package/dist/src/members/PlatformMember.d.ts.map +1 -1
- package/dist/src/members/PlatformMember.js +1 -1
- package/dist/src/members/PlatformMember.js.map +1 -1
- package/dist/src/members/ReviewTime.d.ts.map +1 -1
- package/dist/src/members/ReviewTime.js +1 -1
- package/dist/src/members/ReviewTime.js.map +1 -1
- package/dist/src/members/UitpasNumberDetails.d.ts +40 -0
- package/dist/src/members/UitpasNumberDetails.d.ts.map +1 -0
- package/dist/src/members/UitpasNumberDetails.js +95 -0
- package/dist/src/members/UitpasNumberDetails.js.map +1 -0
- package/dist/src/members/checkout/RegisterItem.d.ts +0 -1
- package/dist/src/members/checkout/RegisterItem.d.ts.map +1 -1
- package/dist/src/members/checkout/RegisterItem.js +0 -4
- package/dist/src/members/checkout/RegisterItem.js.map +1 -1
- package/esm/dist/index.d.ts +2 -0
- package/esm/dist/index.d.ts.map +1 -1
- package/esm/dist/index.js +2 -0
- package/esm/dist/index.js.map +1 -1
- package/esm/dist/src/BalanceItem.d.ts +10 -0
- package/esm/dist/src/BalanceItem.d.ts.map +1 -1
- package/esm/dist/src/BalanceItem.js +36 -5
- package/esm/dist/src/BalanceItem.js.map +1 -1
- package/esm/dist/src/BalanceItemDetailed.d.ts +8 -0
- package/esm/dist/src/BalanceItemDetailed.d.ts.map +1 -1
- package/esm/dist/src/BalanceItemDetailed.js +11 -4
- package/esm/dist/src/BalanceItemDetailed.js.map +1 -1
- package/esm/dist/src/Company.d.ts +1 -0
- package/esm/dist/src/Company.d.ts.map +1 -1
- package/esm/dist/src/Company.js +23 -0
- package/esm/dist/src/Company.js.map +1 -1
- package/esm/dist/src/PaymentCustomer.d.ts +1 -0
- package/esm/dist/src/PaymentCustomer.d.ts.map +1 -1
- package/esm/dist/src/PaymentCustomer.js +23 -0
- package/esm/dist/src/PaymentCustomer.js.map +1 -1
- package/esm/dist/src/Version.d.ts +1 -1
- package/esm/dist/src/Version.js +1 -1
- package/esm/dist/src/addresses/Address.d.ts +1 -0
- package/esm/dist/src/addresses/Address.d.ts.map +1 -1
- package/esm/dist/src/addresses/Address.js +3 -0
- package/esm/dist/src/addresses/Address.js.map +1 -1
- package/esm/dist/src/billing/Invoice.d.ts +39 -4
- package/esm/dist/src/billing/Invoice.d.ts.map +1 -1
- package/esm/dist/src/billing/Invoice.js +195 -13
- package/esm/dist/src/billing/Invoice.js.map +1 -1
- package/esm/dist/src/billing/InvoicedBalanceItem.d.ts +5 -3
- package/esm/dist/src/billing/InvoicedBalanceItem.d.ts.map +1 -1
- package/esm/dist/src/billing/InvoicedBalanceItem.js +25 -10
- package/esm/dist/src/billing/InvoicedBalanceItem.js.map +1 -1
- package/esm/dist/src/billing/index.d.ts +1 -0
- package/esm/dist/src/billing/index.d.ts.map +1 -1
- package/esm/dist/src/billing/index.js +2 -0
- package/esm/dist/src/billing/index.js.map +1 -1
- package/esm/dist/src/email/Email.d.ts +2 -1
- package/esm/dist/src/email/Email.d.ts.map +1 -1
- package/esm/dist/src/email/Email.js +2 -1
- package/esm/dist/src/email/Email.js.map +1 -1
- package/esm/dist/src/email/EmailTemplate.d.ts +2 -0
- package/esm/dist/src/email/EmailTemplate.d.ts.map +1 -1
- package/esm/dist/src/email/EmailTemplate.js +20 -0
- package/esm/dist/src/email/EmailTemplate.js.map +1 -1
- package/esm/dist/src/endpoints/UitpasNumbersGetDetailsRequest.d.ts +10 -0
- package/esm/dist/src/endpoints/UitpasNumbersGetDetailsRequest.d.ts.map +1 -0
- package/esm/dist/src/endpoints/UitpasNumbersGetDetailsRequest.js +34 -0
- package/esm/dist/src/endpoints/UitpasNumbersGetDetailsRequest.js.map +1 -0
- package/esm/dist/src/members/MemberDetails.d.ts +4 -1
- package/esm/dist/src/members/MemberDetails.d.ts.map +1 -1
- package/esm/dist/src/members/MemberDetails.js +39 -10
- package/esm/dist/src/members/MemberDetails.js.map +1 -1
- package/esm/dist/src/members/Payment.d.ts +1 -0
- package/esm/dist/src/members/Payment.d.ts.map +1 -1
- package/esm/dist/src/members/Payment.js +4 -0
- package/esm/dist/src/members/Payment.js.map +1 -1
- package/esm/dist/src/members/PlatformMember.d.ts.map +1 -1
- package/esm/dist/src/members/PlatformMember.js +1 -1
- package/esm/dist/src/members/PlatformMember.js.map +1 -1
- package/esm/dist/src/members/ReviewTime.d.ts.map +1 -1
- package/esm/dist/src/members/ReviewTime.js +1 -1
- package/esm/dist/src/members/ReviewTime.js.map +1 -1
- package/esm/dist/src/members/UitpasNumberDetails.d.ts +40 -0
- package/esm/dist/src/members/UitpasNumberDetails.d.ts.map +1 -0
- package/esm/dist/src/members/UitpasNumberDetails.js +90 -0
- package/esm/dist/src/members/UitpasNumberDetails.js.map +1 -0
- package/esm/dist/src/members/checkout/RegisterItem.d.ts +0 -1
- package/esm/dist/src/members/checkout/RegisterItem.d.ts.map +1 -1
- package/esm/dist/src/members/checkout/RegisterItem.js +0 -4
- package/esm/dist/src/members/checkout/RegisterItem.js.map +1 -1
- package/package.json +2 -2
- package/LICENSE +0 -665
package/dist/src/Version.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// -------------------------------------------------------------
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Version = void 0;
|
|
10
|
-
exports.Version =
|
|
10
|
+
exports.Version = 392;
|
|
11
11
|
/**
|
|
12
12
|
* Use this in development when making changes to fields.
|
|
13
13
|
* On release, the version will get bumped and the usages of NextVersion will be replaced by that version.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../src/addresses/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoC,MAAM,6BAA6B,CAAC;AAG5F,OAAO,EAAE,OAAO,EAAiC,MAAM,qBAAqB,CAAC;AAE7E,qBAAa,OAAQ,SAAQ,WAAW;IACpC,IAAI,EAAE,WAEL;IAED,MAAM,CAAC,eAAe;;;;;IAKtB,MAAM,SAAM;IAGZ,MAAM,SAAM;IAGZ,UAAU,SAAM;IAGhB,IAAI,SAAM;IAGV,OAAO,EAAE,OAAO,CAAC;IAEjB,QAAQ,IAAI,MAAM;IAIlB,WAAW,IAAI,MAAM;IAIrB,WAAW;IAIX,eAAe,CAAC,cAAc,GAAE,OAAuB,GAAG,MAAM;IAOhE;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,GAAE,OAAuB,GAAG,OAAO;IAU/D;;OAEG;IACH,SAAS,IAAI,IA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,qBAAa,gBAAiB,SAAQ,OAAO;IAEzC,MAAM,EAAE,MAAM,CAAC;IAGf,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,UAAU,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -35,6 +35,9 @@ class Address extends simple_encoding_1.AutoEncoder {
|
|
|
35
35
|
}
|
|
36
36
|
return this.street + ', ' + this.city + ' (' + CountryDecoder_js_1.CountryHelper.getName(this.country) + ')';
|
|
37
37
|
}
|
|
38
|
+
equals(other) {
|
|
39
|
+
return this.toString() === other.toString();
|
|
40
|
+
}
|
|
38
41
|
/**
|
|
39
42
|
* @deprecated
|
|
40
43
|
* Use .create({}) instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.js","sourceRoot":"","sources":["../../../src/addresses/Address.ts"],"names":[],"mappings":";;;;AAAA,iEAA4F;AAC5F,6DAAwD;AACxD,gDAA8D;AAC9D,2DAA6E;AAE7E,MAAa,OAAQ,SAAQ,6BAAW;IAAxC;;QAUI,WAAM,GAAG,EAAE,CAAC;QAGZ,WAAM,GAAG,EAAE,CAAC;QAGZ,eAAU,GAAG,EAAE,CAAC;QAGhB,SAAI,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Address.js","sourceRoot":"","sources":["../../../src/addresses/Address.ts"],"names":[],"mappings":";;;;AAAA,iEAA4F;AAC5F,6DAAwD;AACxD,gDAA8D;AAC9D,2DAA6E;AAE7E,MAAa,OAAQ,SAAQ,6BAAW;IAAxC;;QAUI,WAAM,GAAG,EAAE,CAAC;QAGZ,WAAM,GAAG,EAAE,CAAC;QAGZ,eAAU,GAAG,EAAE,CAAC;QAGhB,SAAI,GAAG,EAAE,CAAC;IAqOd,CAAC;IAvPG,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI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AG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;wCACrD;AAoOrB,MAAa,gBAAiB,SAAQ,OAAO;CAS5C;AATD,4CASC;AAPG;IADC,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,+BAAa,EAAE,CAAC;gDACnB;AAGf;IADC,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,+BAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sDACtB;AAG5B;IADC,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,+BAAa,EAAE,CAAC;oDACf"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { AutoEncoder } from '@simonbackx/simple-encoding';
|
|
2
|
+
import { VATExcemptReason } from '../BalanceItem.js';
|
|
2
3
|
import { Company } from '../Company.js';
|
|
3
4
|
import { PaymentCustomer } from '../PaymentCustomer.js';
|
|
5
|
+
import { PriceBreakdown } from '../PriceBreakdown.js';
|
|
4
6
|
import { File } from '../files/File.js';
|
|
7
|
+
import { PaymentGeneral } from '../members/PaymentGeneral.js';
|
|
5
8
|
import { InvoicedBalanceItem } from './InvoicedBalanceItem.js';
|
|
6
|
-
import { VATExcemptReason } from '../BalanceItem.js';
|
|
7
9
|
export declare class VATSubtotal extends AutoEncoder {
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
11
|
+
* For tax ecempt items, this should be zero but it is ignored anyway
|
|
10
12
|
*/
|
|
11
|
-
VATPercentage: number
|
|
13
|
+
VATPercentage: number;
|
|
12
14
|
VATExcempt: VATExcemptReason | null;
|
|
13
15
|
/**
|
|
14
16
|
* Value on which the VAT is calculated (taxable amount)
|
|
@@ -16,6 +18,13 @@ export declare class VATSubtotal extends AutoEncoder {
|
|
|
16
18
|
taxablePrice: number;
|
|
17
19
|
VAT: number;
|
|
18
20
|
}
|
|
21
|
+
export declare enum InvoiceType {
|
|
22
|
+
Invoice = "Invoice",
|
|
23
|
+
CreditNote = "CreditNote"
|
|
24
|
+
}
|
|
25
|
+
export declare class InvoiceTypeHelper {
|
|
26
|
+
static getName(type: InvoiceType): string;
|
|
27
|
+
}
|
|
19
28
|
export declare class Invoice extends AutoEncoder {
|
|
20
29
|
id: string;
|
|
21
30
|
/**
|
|
@@ -46,6 +55,14 @@ export declare class Invoice extends AutoEncoder {
|
|
|
46
55
|
* The balance items that are invoiced, with their original price. This does not always correspond to the total price of the invoice, or the item prices on the invoice because prices are converted to prices excluding VAT and with PEPPOL rounding rules.
|
|
47
56
|
*/
|
|
48
57
|
items: InvoicedBalanceItem[];
|
|
58
|
+
/**
|
|
59
|
+
* The total sum of an invoice should always match the total sum of the payments connected to it.
|
|
60
|
+
* On top of that, the amounts related to each balance item in the payments, should match the invoiced balance amount in each item in the invoice.
|
|
61
|
+
*
|
|
62
|
+
* Note, that this is a limitation. A payment can only be related to a single invoice. But an invoice can be for multiple payments.
|
|
63
|
+
* More flexibility is often unneeded and makes reconciliation unnecessary complex.
|
|
64
|
+
*/
|
|
65
|
+
payments: PaymentGeneral[];
|
|
49
66
|
get totalWithoutVAT(): number;
|
|
50
67
|
get totalBalanceInvoicedAmount(): number;
|
|
51
68
|
/**
|
|
@@ -67,8 +84,11 @@ export declare class Invoice extends AutoEncoder {
|
|
|
67
84
|
/**
|
|
68
85
|
* The difference between the totalWithVAT of the invoice and the sum of all balanceInvoicedAmount of the invoiced balance items.
|
|
69
86
|
* totalBalanceInvoicedAmount + balanceRoundingAmount = totalWithVAT
|
|
87
|
+
*
|
|
88
|
+
* Best viewed as a virtual extra balance item linked to the invoice to compensate.
|
|
89
|
+
*
|
|
70
90
|
* This is used to explain and report why there is a difference between the sum of the balance item's prices and the actually invoiced price, comparable with roundingAmount on payments.
|
|
71
|
-
* - Say we invoice 3 items of 0,242 euro. The sum would be 0,726. The invoice total price might be 0,73 because of rounding rules. Then the balanceRoundingAmount would be
|
|
91
|
+
* - Say we invoice 3 items of 0,242 euro. The sum would be 0,726. The invoice total price might be 0,73 because of rounding rules. Then the balanceRoundingAmount would be 0,004.
|
|
72
92
|
*/
|
|
73
93
|
get balanceRoundingAmount(): number;
|
|
74
94
|
/**
|
|
@@ -93,6 +113,21 @@ export declare class Invoice extends AutoEncoder {
|
|
|
93
113
|
reference: string | null;
|
|
94
114
|
pdf: File | null;
|
|
95
115
|
xml: File | null;
|
|
116
|
+
negativeInvoiceId: string | null;
|
|
117
|
+
didSendPeppol: boolean;
|
|
118
|
+
invoicedAt: Date | null;
|
|
119
|
+
dueAt: Date | null;
|
|
120
|
+
createdAt: Date;
|
|
121
|
+
updatedAt: Date;
|
|
122
|
+
validateVATRates(): void;
|
|
96
123
|
calculateVAT(): void;
|
|
124
|
+
addItem(item: InvoicedBalanceItem): void;
|
|
125
|
+
get type(): InvoiceType;
|
|
126
|
+
get theme(): "theme-error" | undefined;
|
|
127
|
+
get priceBreakdown(): PriceBreakdown;
|
|
128
|
+
/**
|
|
129
|
+
* Call this method after changing the payments related to an invoice.
|
|
130
|
+
*/
|
|
131
|
+
buildFromPayments(): void;
|
|
97
132
|
}
|
|
98
133
|
//# sourceMappingURL=Invoice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../src/billing/Invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,
|
|
1
|
+
{"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../src/billing/Invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAkF,MAAM,6BAA6B,CAAC;AAGxJ,OAAO,EAAe,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8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,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGtC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGhC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAQ;IAGxB,GAAG,EAAE,IAAI,GAAG,IAAI,CAAQ;IAGxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGxC,aAAa,UAAS;IAGtB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAQ;IAG/B,KAAK,EAAE,IAAI,GAAG,IAAI,CAAQ;IAG1B,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;IAE7B,gBAAgB;IAmChB,YAAY;IAoCZ,OAAO,CAAC,IAAI,EAAE,mBAAmB;IAKjC,IAAI,IAAI,gBAKP;IAED,IAAI,KAAK,8BAIR;IAED,IAAI,cAAc,IAAI,cAAc,CAuBnC;IAED;;OAEG;IACH,iBAAiB;CA0CpB"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Invoice = exports.VATSubtotal = void 0;
|
|
3
|
+
exports.Invoice = exports.InvoiceTypeHelper = exports.InvoiceType = exports.VATSubtotal = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const simple_encoding_1 = require("@simonbackx/simple-encoding");
|
|
6
|
+
const simple_errors_1 = require("@simonbackx/simple-errors");
|
|
6
7
|
const uuid_1 = require("uuid");
|
|
8
|
+
const BalanceItem_js_1 = require("../BalanceItem.js");
|
|
7
9
|
const Company_js_1 = require("../Company.js");
|
|
8
10
|
const PaymentCustomer_js_1 = require("../PaymentCustomer.js");
|
|
9
11
|
const File_js_1 = require("../files/File.js");
|
|
12
|
+
const PaymentGeneral_js_1 = require("../members/PaymentGeneral.js");
|
|
10
13
|
const InvoicedBalanceItem_js_1 = require("./InvoicedBalanceItem.js");
|
|
11
|
-
const
|
|
14
|
+
const utility_1 = require("@stamhoofd/utility");
|
|
12
15
|
class VATSubtotal extends simple_encoding_1.AutoEncoder {
|
|
13
16
|
constructor() {
|
|
14
17
|
super(...arguments);
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
19
|
+
* For tax ecempt items, this should be zero but it is ignored anyway
|
|
17
20
|
*/
|
|
18
|
-
this.VATPercentage =
|
|
21
|
+
this.VATPercentage = 0;
|
|
19
22
|
this.VATExcempt = null;
|
|
20
23
|
/**
|
|
21
24
|
* Value on which the VAT is calculated (taxable amount)
|
|
@@ -26,7 +29,7 @@ class VATSubtotal extends simple_encoding_1.AutoEncoder {
|
|
|
26
29
|
}
|
|
27
30
|
exports.VATSubtotal = VATSubtotal;
|
|
28
31
|
tslib_1.__decorate([
|
|
29
|
-
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.IntegerDecoder
|
|
32
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.IntegerDecoder })
|
|
30
33
|
], VATSubtotal.prototype, "VATPercentage", void 0);
|
|
31
34
|
tslib_1.__decorate([
|
|
32
35
|
(0, simple_encoding_1.field)({ decoder: new simple_encoding_1.EnumDecoder(BalanceItem_js_1.VATExcemptReason), nullable: true })
|
|
@@ -37,13 +40,46 @@ tslib_1.__decorate([
|
|
|
37
40
|
tslib_1.__decorate([
|
|
38
41
|
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.IntegerDecoder })
|
|
39
42
|
], VATSubtotal.prototype, "VAT", void 0);
|
|
43
|
+
var InvoiceType;
|
|
44
|
+
(function (InvoiceType) {
|
|
45
|
+
InvoiceType["Invoice"] = "Invoice";
|
|
46
|
+
InvoiceType["CreditNote"] = "CreditNote";
|
|
47
|
+
})(InvoiceType || (exports.InvoiceType = InvoiceType = {}));
|
|
48
|
+
class InvoiceTypeHelper {
|
|
49
|
+
static getName(type) {
|
|
50
|
+
switch (type) {
|
|
51
|
+
case InvoiceType.Invoice: return $t('fbf8fca6-33f0-4ecc-8317-0033f256827e');
|
|
52
|
+
case InvoiceType.CreditNote: return $t('4578aaf4-a15a-4c53-ad46-768b91d96a4e');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.InvoiceTypeHelper = InvoiceTypeHelper;
|
|
40
57
|
class Invoice extends simple_encoding_1.AutoEncoder {
|
|
41
58
|
constructor() {
|
|
42
59
|
super(...arguments);
|
|
60
|
+
/**
|
|
61
|
+
* Set if the invoice number is official. This number is unique per seller
|
|
62
|
+
*/
|
|
63
|
+
this.number = null;
|
|
64
|
+
/**
|
|
65
|
+
* Can be null if it is not linked to an organization.
|
|
66
|
+
* This is only used to allow the payer to list their (incoming) invoices.
|
|
67
|
+
*
|
|
68
|
+
* In the future we could expand this with members, users, and/or orders
|
|
69
|
+
*/
|
|
70
|
+
this.payingOrganizationId = null;
|
|
43
71
|
/**
|
|
44
72
|
* The balance items that are invoiced, with their original price. This does not always correspond to the total price of the invoice, or the item prices on the invoice because prices are converted to prices excluding VAT and with PEPPOL rounding rules.
|
|
45
73
|
*/
|
|
46
74
|
this.items = [];
|
|
75
|
+
/**
|
|
76
|
+
* The total sum of an invoice should always match the total sum of the payments connected to it.
|
|
77
|
+
* On top of that, the amounts related to each balance item in the payments, should match the invoiced balance amount in each item in the invoice.
|
|
78
|
+
*
|
|
79
|
+
* Note, that this is a limitation. A payment can only be related to a single invoice. But an invoice can be for multiple payments.
|
|
80
|
+
* More flexibility is often unneeded and makes reconciliation unnecessary complex.
|
|
81
|
+
*/
|
|
82
|
+
this.payments = [];
|
|
47
83
|
/**
|
|
48
84
|
* This is the rounding amount in cents that is applied to the normal calculation of the invoiced balance items (prices exluding VAT) to come to the actual total price of the invoice.
|
|
49
85
|
*
|
|
@@ -73,6 +109,12 @@ class Invoice extends simple_encoding_1.AutoEncoder {
|
|
|
73
109
|
this.reference = null;
|
|
74
110
|
this.pdf = null;
|
|
75
111
|
this.xml = null;
|
|
112
|
+
this.negativeInvoiceId = null;
|
|
113
|
+
this.didSendPeppol = false;
|
|
114
|
+
this.invoicedAt = null;
|
|
115
|
+
this.dueAt = null;
|
|
116
|
+
this.createdAt = new Date();
|
|
117
|
+
this.updatedAt = new Date();
|
|
76
118
|
}
|
|
77
119
|
get totalWithoutVAT() {
|
|
78
120
|
return this.items.reduce((sum, item) => sum + item.totalWithoutVAT, 0);
|
|
@@ -83,8 +125,11 @@ class Invoice extends simple_encoding_1.AutoEncoder {
|
|
|
83
125
|
/**
|
|
84
126
|
* The difference between the totalWithVAT of the invoice and the sum of all balanceInvoicedAmount of the invoiced balance items.
|
|
85
127
|
* totalBalanceInvoicedAmount + balanceRoundingAmount = totalWithVAT
|
|
128
|
+
*
|
|
129
|
+
* Best viewed as a virtual extra balance item linked to the invoice to compensate.
|
|
130
|
+
*
|
|
86
131
|
* This is used to explain and report why there is a difference between the sum of the balance item's prices and the actually invoiced price, comparable with roundingAmount on payments.
|
|
87
|
-
* - Say we invoice 3 items of 0,242 euro. The sum would be 0,726. The invoice total price might be 0,73 because of rounding rules. Then the balanceRoundingAmount would be
|
|
132
|
+
* - Say we invoice 3 items of 0,242 euro. The sum would be 0,726. The invoice total price might be 0,73 because of rounding rules. Then the balanceRoundingAmount would be 0,004.
|
|
88
133
|
*/
|
|
89
134
|
get balanceRoundingAmount() {
|
|
90
135
|
return this.totalWithVAT - this.totalBalanceInvoicedAmount;
|
|
@@ -102,21 +147,54 @@ class Invoice extends simple_encoding_1.AutoEncoder {
|
|
|
102
147
|
get totalWithVAT() {
|
|
103
148
|
return this.totalWithoutVAT + this.VATTotalAmount + this.payableRoundingAmount;
|
|
104
149
|
}
|
|
150
|
+
validateVATRates() {
|
|
151
|
+
let intra = false;
|
|
152
|
+
if (this.customer.company && this.customer.company.VATNumber && this.customer.company.address) {
|
|
153
|
+
if (this.seller.VATNumber && this.seller.address) {
|
|
154
|
+
// Reverse charged vat applicable?
|
|
155
|
+
if (this.customer.company.address.country !== this.seller.address.country) {
|
|
156
|
+
intra = true;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (intra) {
|
|
161
|
+
for (const item of this.items) {
|
|
162
|
+
if (item.VATExcempt !== BalanceItem_js_1.VATExcemptReason.IntraCommunity) {
|
|
163
|
+
throw new simple_errors_1.SimpleError({
|
|
164
|
+
code: 'missing_vat_excemption',
|
|
165
|
+
message: 'Missing IntraCommunity VAT excemption',
|
|
166
|
+
human: $t('8b562a1d-e7c0-4110-b320-db535f0ea0e9'),
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
for (const item of this.items) {
|
|
173
|
+
if (item.VATExcempt === BalanceItem_js_1.VATExcemptReason.IntraCommunity) {
|
|
174
|
+
throw new simple_errors_1.SimpleError({
|
|
175
|
+
code: 'erroneous_vat_excemption',
|
|
176
|
+
message: 'IntraCommunity VAT excemption should not apply to this item',
|
|
177
|
+
human: $t('d2c3f57f-ffae-45ea-97ce-3f4f30839cd6'),
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
105
183
|
calculateVAT() {
|
|
106
184
|
// For every VAT category, calculate the taxable amount and VAT amount
|
|
107
185
|
const categories = new Map();
|
|
108
186
|
for (const item of this.items) {
|
|
109
187
|
let key;
|
|
110
|
-
if (item.
|
|
188
|
+
if (item.VATExcempt === null) {
|
|
111
189
|
key = `vat_${item.VATPercentage}`;
|
|
112
190
|
}
|
|
113
191
|
else {
|
|
114
|
-
key = `excempt_${item.VATExcempt}`;
|
|
192
|
+
key = `excempt_${item.VATExcempt}_${item.VATExcempt}`;
|
|
115
193
|
}
|
|
116
194
|
let category = categories.get(key);
|
|
117
195
|
if (!category) {
|
|
118
196
|
category = new VATSubtotal();
|
|
119
|
-
category.VATPercentage = item.VATPercentage;
|
|
197
|
+
category.VATPercentage = item.VATExcempt === null ? item.VATPercentage : 0;
|
|
120
198
|
category.VATExcempt = item.VATExcempt;
|
|
121
199
|
categories.set(key, category);
|
|
122
200
|
}
|
|
@@ -124,8 +202,8 @@ class Invoice extends simple_encoding_1.AutoEncoder {
|
|
|
124
202
|
}
|
|
125
203
|
// Calculate VAT amount for each category and round to 1 cent
|
|
126
204
|
for (const category of categories.values()) {
|
|
127
|
-
if (category.
|
|
128
|
-
category.VAT =
|
|
205
|
+
if (!category.VATExcempt) {
|
|
206
|
+
category.VAT = utility_1.STMath.round(category.taxablePrice * category.VATPercentage / 10000) * 100;
|
|
129
207
|
}
|
|
130
208
|
else {
|
|
131
209
|
category.VAT = 0;
|
|
@@ -133,20 +211,107 @@ class Invoice extends simple_encoding_1.AutoEncoder {
|
|
|
133
211
|
}
|
|
134
212
|
this.VATTotal = Array.from(categories.values());
|
|
135
213
|
}
|
|
214
|
+
addItem(item) {
|
|
215
|
+
this.items.push(item);
|
|
216
|
+
this.calculateVAT();
|
|
217
|
+
}
|
|
218
|
+
get type() {
|
|
219
|
+
if (this.totalWithVAT < 0) {
|
|
220
|
+
return InvoiceType.CreditNote;
|
|
221
|
+
}
|
|
222
|
+
return InvoiceType.Invoice;
|
|
223
|
+
}
|
|
224
|
+
get theme() {
|
|
225
|
+
if (this.type === InvoiceType.CreditNote) {
|
|
226
|
+
return 'theme-error';
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
get priceBreakdown() {
|
|
230
|
+
return [
|
|
231
|
+
{
|
|
232
|
+
name: $t(`d642f190-1607-4f54-8530-7af2f15c651b`),
|
|
233
|
+
price: this.totalWithoutVAT,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: $t(`13c04b8f-80f5-4274-9ea1-badb0f88a091`),
|
|
237
|
+
price: this.VATTotalAmount,
|
|
238
|
+
},
|
|
239
|
+
...(this.payableRoundingAmount !== 0
|
|
240
|
+
? [
|
|
241
|
+
{
|
|
242
|
+
name: $t(`dafd5091-0698-4117-bc5a-db8ba05cefcd`),
|
|
243
|
+
price: this.payableRoundingAmount,
|
|
244
|
+
},
|
|
245
|
+
]
|
|
246
|
+
: []),
|
|
247
|
+
{
|
|
248
|
+
name: $t(`0376551a-9af8-44b7-8ab3-d343384dc900`),
|
|
249
|
+
price: this.totalWithVAT,
|
|
250
|
+
},
|
|
251
|
+
];
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Call this method after changing the payments related to an invoice.
|
|
255
|
+
*/
|
|
256
|
+
buildFromPayments() {
|
|
257
|
+
if (this.number) {
|
|
258
|
+
throw new simple_errors_1.SimpleError({
|
|
259
|
+
code: 'invoice_has_number',
|
|
260
|
+
message: 'An invoice is immutable after it has been generated',
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
// Keep the sum of all balance items.
|
|
264
|
+
const balanceItemsMap = new Map();
|
|
265
|
+
for (const payment of this.payments) {
|
|
266
|
+
for (const item of payment.balanceItemPayments) {
|
|
267
|
+
let data = balanceItemsMap.get(item.balanceItem.id);
|
|
268
|
+
if (!data) {
|
|
269
|
+
data = {
|
|
270
|
+
balanceItem: item.balanceItem,
|
|
271
|
+
amount: 0,
|
|
272
|
+
};
|
|
273
|
+
balanceItemsMap.set(item.balanceItem.id, data);
|
|
274
|
+
}
|
|
275
|
+
data.amount += item.price;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
const invoicedItems = [];
|
|
279
|
+
for (const item of balanceItemsMap.values()) {
|
|
280
|
+
const invoiced = InvoicedBalanceItem_js_1.InvoicedBalanceItem.createFor(item.balanceItem, item.amount);
|
|
281
|
+
invoicedItems.push(invoiced);
|
|
282
|
+
}
|
|
283
|
+
invoicedItems.sort((a, b) => {
|
|
284
|
+
return utility_1.Sorter.stack(utility_1.Sorter.byNumberValue(a.totalWithoutVAT, b.totalWithoutVAT), utility_1.Sorter.byStringValue(a.name || a.description, b.name || b.description));
|
|
285
|
+
});
|
|
286
|
+
this.items = invoicedItems;
|
|
287
|
+
this.calculateVAT();
|
|
288
|
+
}
|
|
136
289
|
}
|
|
137
290
|
exports.Invoice = Invoice;
|
|
138
291
|
tslib_1.__decorate([
|
|
139
292
|
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.StringDecoder, defaultValue: () => (0, uuid_1.v4)() })
|
|
140
293
|
], Invoice.prototype, "id", void 0);
|
|
141
294
|
tslib_1.__decorate([
|
|
142
|
-
(0, simple_encoding_1.field)({ decoder:
|
|
295
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.StringDecoder, nullable: true })
|
|
296
|
+
], Invoice.prototype, "number", void 0);
|
|
297
|
+
tslib_1.__decorate([
|
|
298
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.StringDecoder })
|
|
299
|
+
], Invoice.prototype, "organizationId", void 0);
|
|
300
|
+
tslib_1.__decorate([
|
|
301
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.StringDecoder, nullable: true })
|
|
302
|
+
], Invoice.prototype, "payingOrganizationId", void 0);
|
|
303
|
+
tslib_1.__decorate([
|
|
304
|
+
(0, simple_encoding_1.field)({ decoder: Company_js_1.Company, defaultValue: () => Company_js_1.Company.create({}) })
|
|
143
305
|
], Invoice.prototype, "seller", void 0);
|
|
144
306
|
tslib_1.__decorate([
|
|
145
|
-
(0, simple_encoding_1.field)({ decoder: PaymentCustomer_js_1.PaymentCustomer })
|
|
307
|
+
(0, simple_encoding_1.field)({ decoder: PaymentCustomer_js_1.PaymentCustomer, defaultValue: () => PaymentCustomer_js_1.PaymentCustomer.create({}) })
|
|
146
308
|
], Invoice.prototype, "customer", void 0);
|
|
147
309
|
tslib_1.__decorate([
|
|
148
310
|
(0, simple_encoding_1.field)({ decoder: new simple_encoding_1.ArrayDecoder(InvoicedBalanceItem_js_1.InvoicedBalanceItem) })
|
|
149
311
|
], Invoice.prototype, "items", void 0);
|
|
312
|
+
tslib_1.__decorate([
|
|
313
|
+
(0, simple_encoding_1.field)({ decoder: new simple_encoding_1.ArrayDecoder(PaymentGeneral_js_1.PaymentGeneral) })
|
|
314
|
+
], Invoice.prototype, "payments", void 0);
|
|
150
315
|
tslib_1.__decorate([
|
|
151
316
|
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.IntegerDecoder })
|
|
152
317
|
], Invoice.prototype, "payableRoundingAmount", void 0);
|
|
@@ -171,4 +336,22 @@ tslib_1.__decorate([
|
|
|
171
336
|
tslib_1.__decorate([
|
|
172
337
|
(0, simple_encoding_1.field)({ decoder: File_js_1.File, nullable: true })
|
|
173
338
|
], Invoice.prototype, "xml", void 0);
|
|
339
|
+
tslib_1.__decorate([
|
|
340
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.StringDecoder, nullable: true })
|
|
341
|
+
], Invoice.prototype, "negativeInvoiceId", void 0);
|
|
342
|
+
tslib_1.__decorate([
|
|
343
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.BooleanDecoder, optional: true })
|
|
344
|
+
], Invoice.prototype, "didSendPeppol", void 0);
|
|
345
|
+
tslib_1.__decorate([
|
|
346
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.DateDecoder, nullable: true })
|
|
347
|
+
], Invoice.prototype, "invoicedAt", void 0);
|
|
348
|
+
tslib_1.__decorate([
|
|
349
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.DateDecoder, nullable: true })
|
|
350
|
+
], Invoice.prototype, "dueAt", void 0);
|
|
351
|
+
tslib_1.__decorate([
|
|
352
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.DateDecoder })
|
|
353
|
+
], Invoice.prototype, "createdAt", void 0);
|
|
354
|
+
tslib_1.__decorate([
|
|
355
|
+
(0, simple_encoding_1.field)({ decoder: simple_encoding_1.DateDecoder })
|
|
356
|
+
], Invoice.prototype, "updatedAt", void 0);
|
|
174
357
|
//# sourceMappingURL=Invoice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Invoice.js","sourceRoot":"","sources":["../../../src/billing/Invoice.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Invoice.js","sourceRoot":"","sources":["../../../src/billing/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