@silexpert/core 1.1.30 → 1.1.34
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/es/types/Interface/api/registration/ReadRegistration.d.ts +4 -2
- package/es/types/Interface/api/registration/ReadRegistration.d.ts.map +1 -1
- package/es/types/Interface/api/registration/ReadRegistration.js.map +1 -1
- package/es/utils/vat/3310/century23.d.ts +2 -2
- package/es/utils/vat/3310/century23.d.ts.map +1 -1
- package/es/utils/vat/3310/century23.js +4 -4
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/es/utils/vat/3517/century23.d.ts.map +1 -1
- package/es/utils/vat/3517/century23.js +8 -7
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/es/utils/vat/centuries.js +1 -1
- package/es/utils/vat/centuries.js.map +1 -1
- package/js/types/Interface/api/registration/ReadRegistration.js.map +1 -1
- package/js/utils/vat/3310/century23.js +3 -3
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/js/utils/vat/3517/century23.js +7 -6
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/js/utils/vat/centuries.js +1 -1
- package/js/utils/vat/centuries.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Interface/api/registration/ReadRegistration.ts +4 -1
- package/ts/utils/vat/3310/century23.ts +7 -6
- package/ts/utils/vat/3517/century23.ts +8 -7
- package/ts/utils/vat/centuries.ts +2 -2
|
@@ -21,6 +21,7 @@ export interface ReadRegistrationTick {
|
|
|
21
21
|
isPayment?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface ReadVatEntry {
|
|
24
|
+
isAsset: boolean;
|
|
24
25
|
idVat: number | null;
|
|
25
26
|
account: IAccount | null;
|
|
26
27
|
totalTaxIncluded: number;
|
|
@@ -32,8 +33,9 @@ export interface ReadVatEntry {
|
|
|
32
33
|
isRevised: boolean;
|
|
33
34
|
entry?: IAccountingEntry;
|
|
34
35
|
}
|
|
35
|
-
export type
|
|
36
|
+
export type UpdatedAnnotationObject = {
|
|
36
37
|
old: IAccountingEntry[];
|
|
37
38
|
new: IAccountingEntry[];
|
|
38
|
-
}
|
|
39
|
+
};
|
|
40
|
+
export type UpdatedAnnotation = UpdatedAnnotationObject[];
|
|
39
41
|
//# sourceMappingURL=ReadRegistration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadRegistration.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/registration/ReadRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,EACvF,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAAE,KAAK,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAA;CACzB;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"ReadRegistration.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/registration/ReadRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,EACvF,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAAE,KAAK,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAA;CACzB;AAED,MAAM,MAAM,uBAAuB,GAAG;IAAE,GAAG,EAAE,gBAAgB,EAAE,CAAC;IAAC,GAAG,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAE3F,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadRegistration.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/registration/ReadRegistration.ts"],"names":[],"mappings":"","sourcesContent":["import { IRegistration } from '../../models/IRegistration';\nimport {\n IAccount, IAccountingEntry, InterchangeState, RegistrationState, RegistrationTickState,\n} from '../../..';\n\nexport type ReadRegistration = IRegistration & { state: RegistrationState };\n\nexport interface ReadSynchronization {\n id: number;\n hasError: boolean;\n hasDepositError: boolean;\n isProcessFinished: boolean;\n hasPaymentError: boolean;\n isTimeOut: boolean;\n hasFailed: boolean;\n}\n\nexport type ReadRegistrationHistory = InterchangeState;\n\nexport interface ReadRegistrationTick {\n state: RegistrationTickState;\n title: string | null;\n details: InterchangeState,\n date: string | null;\n isPayment?: boolean;\n}\n\nexport interface ReadVatEntry {\n idVat: number | null;\n account: IAccount | null;\n totalTaxIncluded: number;\n totalTaxExcluded: number,\n totalTax: number,\n label: string,\n date: Date,\n idAccountingTransaction: number;\n isRevised: boolean;\n entry?: IAccountingEntry\n}\n\nexport type
|
|
1
|
+
{"version":3,"file":"ReadRegistration.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/registration/ReadRegistration.ts"],"names":[],"mappings":"","sourcesContent":["import { IRegistration } from '../../models/IRegistration';\nimport {\n IAccount, IAccountingEntry, InterchangeState, RegistrationState, RegistrationTickState,\n} from '../../..';\n\nexport type ReadRegistration = IRegistration & { state: RegistrationState };\n\nexport interface ReadSynchronization {\n id: number;\n hasError: boolean;\n hasDepositError: boolean;\n isProcessFinished: boolean;\n hasPaymentError: boolean;\n isTimeOut: boolean;\n hasFailed: boolean;\n}\n\nexport type ReadRegistrationHistory = InterchangeState;\n\nexport interface ReadRegistrationTick {\n state: RegistrationTickState;\n title: string | null;\n details: InterchangeState,\n date: string | null;\n isPayment?: boolean;\n}\n\nexport interface ReadVatEntry {\n isAsset: boolean;\n idVat: number | null;\n account: IAccount | null;\n totalTaxIncluded: number;\n totalTaxExcluded: number,\n totalTax: number,\n label: string,\n date: Date,\n idAccountingTransaction: number;\n isRevised: boolean;\n entry?: IAccountingEntry\n}\n\nexport type UpdatedAnnotationObject = { old: IAccountingEntry[]; new: IAccountingEntry[] };\n\nexport type UpdatedAnnotation = UpdatedAnnotationObject[];"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IAccountingEntry } from '../../../types/Interface/models/IAccountingEntry';
|
|
2
2
|
import { Cerfa3310_2023, PayloadCerfa3310_2023 } from '../../../types/Interface/api/cerfa/3310';
|
|
3
3
|
import { AsponeFormFields, CerfaPayloadForm } from '../../../types/Interface/api/cerfa/ReadCerfa';
|
|
4
|
-
import {
|
|
5
|
-
export declare function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry[], payload: PayloadCerfa3310_2023, updatedEntries?:
|
|
4
|
+
import { UpdatedAnnotation } from '../../../types/Interface/api/registration/ReadRegistration';
|
|
5
|
+
export declare function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry[], payload: PayloadCerfa3310_2023, updatedEntries?: UpdatedAnnotation): Cerfa3310_2023;
|
|
6
6
|
export declare function getCerfa3310Century23RegistrationFields(data: Cerfa3310_2023): AsponeFormFields;
|
|
7
7
|
export declare const cerfa3310Century23Fields: CerfaPayloadForm[];
|
|
8
8
|
//# sourceMappingURL=century23.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"century23.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/3310/century23.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAGhG,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"century23.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/3310/century23.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAGhG,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAE/F,wBAAgB,4BAA4B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,GAAE,iBAAsB,GAAG,cAAc,CA8U1K;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAg5B9F;AAED,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAiLrD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as dayjs from 'dayjs';
|
|
2
2
|
import { isDefined } from 'class-validator';
|
|
3
|
-
import { round as _round, flatten } from 'lodash';
|
|
3
|
+
import { round as _round, flatten, uniqBy } from 'lodash';
|
|
4
4
|
import { Vat } from '../../../types/Enum/Vat';
|
|
5
5
|
import { getAmountByAccountNumber, getTaxAmountByAccountNumber, textFormatting } from '../utils';
|
|
6
6
|
export function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries = []) {
|
|
@@ -12,9 +12,9 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
|
|
|
12
12
|
const intracomVat = vats.filter((v) => v.isVatIntracom && !v.isVatImportation).map((v) => v.id);
|
|
13
13
|
const withoutTaxVat = vats.filter((v) => v.value === 0).map((v) => v.id);
|
|
14
14
|
const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
15
|
-
const vatEntries = accountingEntries.filter((ae) => typeof ae.idVat === 'number');
|
|
16
|
-
const oldEntries = flatten(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map((u) => u.old
|
|
17
|
-
const newEntries = flatten(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map((u) => u.new
|
|
15
|
+
const vatEntries = uniqBy(accountingEntries.filter((ae) => typeof ae.idVat === 'number'), 'id');
|
|
16
|
+
const oldEntries = flatten(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map((u) => u.old));
|
|
17
|
+
const newEntries = flatten(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map((u) => u.new));
|
|
18
18
|
const collectedOldAmount = getAmountByAccountNumber(oldEntries, ['4457'], 0);
|
|
19
19
|
const collectedNewAmount = getAmountByAccountNumber(newEntries, ['4457'], 0);
|
|
20
20
|
const deductedOldAmount = getAmountByAccountNumber(oldEntries, ['4456'], 0);
|