@silexpert/core 1.1.33 → 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.map +1 -1
- package/es/utils/vat/3310/century23.js +2 -2
- 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/js/types/Interface/api/registration/ReadRegistration.js.map +1 -1
- package/js/utils/vat/3310/century23.js +1 -1
- 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/package.json +1 -1
- package/ts/types/Interface/api/registration/ReadRegistration.ts +4 -1
- package/ts/utils/vat/3310/century23.ts +3 -2
- package/ts/utils/vat/3517/century23.ts +8 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadRegistration.js","names":[],"sources":["../../../../../ts/types/Interface/api/registration/ReadRegistration.ts"],"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","names":[],"sources":["../../../../../ts/types/Interface/api/registration/ReadRegistration.ts"],"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[];"],"mappings":""}
|
|
@@ -23,7 +23,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
23
23
|
const intracomVat = vats.filter(v => v.isVatIntracom && !v.isVatImportation).map(v => v.id);
|
|
24
24
|
const withoutTaxVat = vats.filter(v => v.value === 0).map(v => v.id);
|
|
25
25
|
const importationVat = vats.filter(v => v.isVatImportation && !v.isVatIntracom).map(v => v.id);
|
|
26
|
-
const vatEntries = accountingEntries.filter(ae => typeof ae.idVat === 'number');
|
|
26
|
+
const vatEntries = (0, _lodash.uniqBy)(accountingEntries.filter(ae => typeof ae.idVat === 'number'), 'id');
|
|
27
27
|
const oldEntries = (0, _lodash.flatten)(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map(u => u.old));
|
|
28
28
|
const newEntries = (0, _lodash.flatten)(updatedEntries === null || updatedEntries === void 0 ? void 0 : updatedEntries.map(u => u.new));
|
|
29
29
|
const collectedOldAmount = (0, _utils.getAmountByAccountNumber)(oldEntries, ['4457'], 0);
|