@silexpert/core 1.1.91 → 1.1.93
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/api/resources/Checklist.d.ts +5 -2
- package/es/api/resources/Checklist.d.ts.map +1 -1
- package/es/api/resources/Checklist.js +6 -0
- package/es/api/resources/Checklist.js.map +1 -1
- package/es/types/Enum/ChecklistType.d.ts +4 -0
- package/es/types/Enum/ChecklistType.d.ts.map +1 -1
- package/es/types/Enum/ChecklistType.js +5 -0
- package/es/types/Enum/ChecklistType.js.map +1 -1
- package/es/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/es/types/Enum/TaskResponseType.js +11 -0
- package/es/types/Enum/TaskResponseType.js.map +1 -1
- package/es/types/Enum/TimeCounterType.d.ts +7 -0
- package/es/types/Enum/TimeCounterType.d.ts.map +1 -1
- package/es/types/Enum/TimeCounterType.js +7 -0
- package/es/types/Enum/TimeCounterType.js.map +1 -1
- package/es/types/Interface/api/checklist/Query.d.ts +15 -0
- package/es/types/Interface/api/checklist/Query.d.ts.map +1 -1
- package/es/types/Interface/api/checklist/Query.js +44 -1
- package/es/types/Interface/api/checklist/Query.js.map +1 -1
- package/es/types/Interface/api/checklist/Read.d.ts +23 -0
- package/es/types/Interface/api/checklist/Read.d.ts.map +1 -1
- package/es/types/Interface/api/checklist/Read.js.map +1 -1
- package/es/types/Interface/models/IChecklist.d.ts +2 -1
- package/es/types/Interface/models/IChecklist.d.ts.map +1 -1
- package/es/types/Interface/models/IChecklist.js.map +1 -1
- package/es/types/Interface/models/IUser.d.ts +2 -0
- package/es/types/Interface/models/IUser.d.ts.map +1 -1
- package/es/types/Interface/models/IUser.js.map +1 -1
- package/es/utils/vat/3310/century23.js +18 -18
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/js/api/resources/Checklist.js +14 -0
- package/js/api/resources/Checklist.js.map +1 -1
- package/js/types/Enum/ChecklistType.js +5 -0
- package/js/types/Enum/ChecklistType.js.map +1 -1
- package/js/types/Enum/TaskResponseType.js +10 -0
- package/js/types/Enum/TaskResponseType.js.map +1 -1
- package/js/types/Enum/TimeCounterType.js +7 -0
- package/js/types/Enum/TimeCounterType.js.map +1 -1
- package/js/types/Interface/api/checklist/Query.js +13 -1
- package/js/types/Interface/api/checklist/Query.js.map +1 -1
- package/js/types/Interface/api/checklist/Read.js.map +1 -1
- package/js/types/Interface/models/IChecklist.js.map +1 -1
- package/js/types/Interface/models/IUser.js.map +1 -1
- package/js/utils/vat/3310/century23.js +18 -18
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Checklist.ts +18 -2
- package/ts/types/Enum/ChecklistType.ts +5 -0
- package/ts/types/Enum/TaskResponseType.ts +11 -0
- package/ts/types/Enum/TimeCounterType.ts +7 -0
- package/ts/types/Interface/api/checklist/Query.ts +38 -1
- package/ts/types/Interface/api/checklist/Read.ts +24 -1
- package/ts/types/Interface/models/IChecklist.ts +2 -1
- package/ts/types/Interface/models/IUser.ts +2 -0
- package/ts/utils/vat/3310/century23.ts +18 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.93",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { CancelToken } from 'axios';
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
+
BasePaginate,
|
|
4
|
+
IChecklist, IChecklistType, QueryChecklistStatistic, QueryChecklistWallet, QueryGetAllBlockingIssues, QueryGetAllDeadlines, QueryGetAllQuestions, ReadChecklistDeadline, ReadChecklistWallet, UpdateAnswer,
|
|
3
5
|
} from '../../types';
|
|
4
6
|
import { getAllBlockingIssues } from '../../utils/checklist';
|
|
5
7
|
import { Resource } from '../Resource';
|
|
@@ -21,7 +23,7 @@ export class Checklist extends Resource {
|
|
|
21
23
|
return this.axios.$post('/checklists', payload);
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
update(id: number, payload: Partial<IChecklist>) {
|
|
26
|
+
update(id: number, payload: Partial<IChecklist>): Promise<IChecklist> {
|
|
25
27
|
return this.axios.$put(`/checklists/${id}`, payload);
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -29,6 +31,20 @@ export class Checklist extends Resource {
|
|
|
29
31
|
return getAllBlockingIssues(checklist, meta);
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
getAllToDo(params: QueryChecklistWallet, cancelToken?: CancelToken): Promise<BasePaginate<ReadChecklistWallet>> {
|
|
35
|
+
return this.axios.$get('/checklists/to-do', {
|
|
36
|
+
...(cancelToken ? { cancelToken } : {}),
|
|
37
|
+
params,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
getStatisticsByAccountant(params: QueryChecklistStatistic, cancelToken?: CancelToken): Promise<ReadChecklistWallet> {
|
|
42
|
+
return this.axios.$get('/checklists/statistics', {
|
|
43
|
+
...(cancelToken ? { cancelToken } : {}),
|
|
44
|
+
params,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
32
48
|
/**
|
|
33
49
|
* QUESTIONS
|
|
34
50
|
*/
|
|
@@ -444,6 +444,17 @@ export const TaskResponseType = {
|
|
|
444
444
|
responseType: null,
|
|
445
445
|
description: 'Faire le pointage du compte bancaire afin de préparer le bilan',
|
|
446
446
|
},
|
|
447
|
+
{
|
|
448
|
+
id: 36,
|
|
449
|
+
label: 'RDV client calendly',
|
|
450
|
+
role: Role.CUSTOMER_SUCCESS,
|
|
451
|
+
deadline: Deadline,
|
|
452
|
+
isForWholeRole: false,
|
|
453
|
+
backToClient: true,
|
|
454
|
+
goToCalendar: true,
|
|
455
|
+
responseType: ResponseType.CALL,
|
|
456
|
+
description: 'Motif',
|
|
457
|
+
},
|
|
447
458
|
],
|
|
448
459
|
|
|
449
460
|
},
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
IsArray,
|
|
2
3
|
IsBoolean,
|
|
3
|
-
IsDateString, IsEnum, IsNumber, IsOptional, IsPositive,
|
|
4
|
+
IsDateString, IsEnum, IsNumber, IsOptional, IsPositive, IsString,
|
|
4
5
|
} from 'class-validator';
|
|
5
6
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
6
7
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
8
|
import { ChecklistTypeEnum } from '../../../Enum/ChecklistType';
|
|
8
9
|
import { IChecklistDetail } from '../../models/IChecklistDetail';
|
|
9
10
|
import { IChecklistType } from '../../models/IChecklistType';
|
|
11
|
+
import { RequiredQueryPaginate } from '../BasePaginate';
|
|
10
12
|
|
|
11
13
|
export class QueryGetAllDeadlines {
|
|
12
14
|
@ApiProperty()
|
|
@@ -31,6 +33,41 @@ export class QueryGetAllDeadlines {
|
|
|
31
33
|
byExercices?: boolean;
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
export class QueryChecklistStatistic {
|
|
37
|
+
@ApiProperty()
|
|
38
|
+
@IsDateString()
|
|
39
|
+
date: string;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional()
|
|
42
|
+
@IsNumber()
|
|
43
|
+
@IsOptional()
|
|
44
|
+
idUser: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export class QueryChecklistWallet extends RequiredQueryPaginate {
|
|
48
|
+
@ApiProperty()
|
|
49
|
+
@IsArray()
|
|
50
|
+
idUser: number[];
|
|
51
|
+
|
|
52
|
+
@ApiProperty()
|
|
53
|
+
@IsDateString()
|
|
54
|
+
date: string;
|
|
55
|
+
|
|
56
|
+
@ApiPropertyOptional()
|
|
57
|
+
@IsString()
|
|
58
|
+
@IsOptional()
|
|
59
|
+
search?: string;
|
|
60
|
+
|
|
61
|
+
@ApiPropertyOptional()
|
|
62
|
+
@IsArray()
|
|
63
|
+
@IsOptional()
|
|
64
|
+
idVatRegimes?: number[];
|
|
65
|
+
|
|
66
|
+
@ApiPropertyOptional()
|
|
67
|
+
@IsOptional()
|
|
68
|
+
revisionRange?: { min: number; max: number; };
|
|
69
|
+
}
|
|
70
|
+
|
|
34
71
|
export class QueryGetAllQuestions {
|
|
35
72
|
@ApiPropertyOptional()
|
|
36
73
|
@IsOptional()
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ChecklistDetailValue } from '../../../Enum/ChecklistType';
|
|
2
2
|
import { IChecklist } from '../../models/IChecklist';
|
|
3
|
+
import { IExercice } from '../../models/IExercice';
|
|
4
|
+
import { ISociety } from '../../models/ISociety';
|
|
5
|
+
import { IUser } from '../../models/IUser';
|
|
3
6
|
|
|
4
7
|
export type ReadChecklistDeadline = {
|
|
5
8
|
date: string;
|
|
@@ -7,4 +10,24 @@ export type ReadChecklistDeadline = {
|
|
|
7
10
|
checklist: IChecklist | null;
|
|
8
11
|
};
|
|
9
12
|
|
|
10
|
-
export type ReadValue = { name: string; value: ChecklistDetailValue | null | string };
|
|
13
|
+
export type ReadValue = { name: string; value: ChecklistDetailValue | null | string };
|
|
14
|
+
|
|
15
|
+
export type ReadChecklistWallet = {
|
|
16
|
+
exercice: IExercice,
|
|
17
|
+
society: ISociety;
|
|
18
|
+
deadline: ReadChecklistDeadline;
|
|
19
|
+
revised: number;
|
|
20
|
+
users: IUser[]
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type ChecklistDeadlinesToDo = Array<{ idExercice: number; deadline: ReadChecklistDeadline }>;
|
|
24
|
+
|
|
25
|
+
export type ReadChecklistStatistic = {
|
|
26
|
+
id: number;
|
|
27
|
+
firstname: string;
|
|
28
|
+
lastname: string;
|
|
29
|
+
statistics: {
|
|
30
|
+
total: number;
|
|
31
|
+
done: number;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -2,7 +2,7 @@ import { IChecklistDetail } from './IChecklistDetail';
|
|
|
2
2
|
import { IUser } from './IUser';
|
|
3
3
|
import { IExercice } from './IExercice';
|
|
4
4
|
import { ICustomerVat } from './ICustomerVat';
|
|
5
|
-
import { ChecklistTypeEnum } from '../../Enum/ChecklistType';
|
|
5
|
+
import { ChecklistCallState, ChecklistTypeEnum } from '../../Enum/ChecklistType';
|
|
6
6
|
import { IMailRelation } from '../..';
|
|
7
7
|
|
|
8
8
|
// checklist
|
|
@@ -13,6 +13,7 @@ export interface IChecklist {
|
|
|
13
13
|
isConfirmed: boolean;
|
|
14
14
|
date: Date | null;
|
|
15
15
|
type: ChecklistTypeEnum;
|
|
16
|
+
callState?: ChecklistCallState;
|
|
16
17
|
startDate?: Date | null;
|
|
17
18
|
endDate?: Date | null;
|
|
18
19
|
notifyFront?: boolean;
|
|
@@ -17,6 +17,7 @@ import { IMobile } from './IMobile';
|
|
|
17
17
|
import { IRoleUser } from './IRoleUser';
|
|
18
18
|
import { ITimeRecorder } from './ITimeRecorder';
|
|
19
19
|
import { EntityType } from '../../Enum/EntityType';
|
|
20
|
+
import { IMailAddress } from './IMailAddress';
|
|
20
21
|
|
|
21
22
|
type isAny<T> = T | any;
|
|
22
23
|
|
|
@@ -108,4 +109,5 @@ export interface IUser {
|
|
|
108
109
|
usersTest?: IUserTest;
|
|
109
110
|
mobile?: IMobile;
|
|
110
111
|
timeRecorders?: ITimeRecorder[];
|
|
112
|
+
mailAddresses?: IMailAddress[];
|
|
111
113
|
}
|
|
@@ -49,8 +49,8 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
49
49
|
// Opérations taxées -
|
|
50
50
|
const taxedServicesEntries = vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
51
51
|
const servicesAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
52
|
-
const taxedServicesFromFrance = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries, servicesAccounts, 0
|
|
53
|
-
const taxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withTaxVat.includes(ae.idVat)), ['775'], 0
|
|
52
|
+
const taxedServicesFromFrance = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries, servicesAccounts, 0));
|
|
53
|
+
const taxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withTaxVat.includes(ae.idVat)), ['775'], 0));
|
|
54
54
|
const intracommunityServiceAccounts = ['604', '611', '612', '613', '614', '615', '616', '617', '618', '619', '62'];
|
|
55
55
|
const intracommunityServiceEntries = vatEntries.filter((ae) => withTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat));
|
|
56
56
|
|
|
@@ -59,50 +59,50 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
59
59
|
|
|
60
60
|
const taxedImportEntries = vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
61
61
|
const taxedImportAccounts = ['6'];
|
|
62
|
-
const taxedImport = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0
|
|
62
|
+
const taxedImport = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0));
|
|
63
63
|
|
|
64
64
|
const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607', '651'];
|
|
65
65
|
const taxedIntracommunityAcquisitions = getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), [...intracommunityAccounts2, ...intracommunityServiceAccounts], 0, true);
|
|
66
66
|
|
|
67
67
|
// Opérations non taxées
|
|
68
|
-
const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0
|
|
68
|
+
const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0));
|
|
69
69
|
const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['70', '71', '72', '73', '75', '77', '78', '790', '792', '793', '794', '795', '796', '797', '798', '799'], 0, true)); // 02/08/23 - ne plus prendre en compte les comptes 76,74,791 - Chloé R.
|
|
70
|
-
const untaxedImport = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0
|
|
71
|
-
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0
|
|
72
|
-
const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0
|
|
70
|
+
const untaxedImport = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0));
|
|
71
|
+
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0));
|
|
72
|
+
const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0));
|
|
73
73
|
// TVA brute
|
|
74
|
-
const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0
|
|
74
|
+
const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0)
|
|
75
75
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
76
76
|
|
|
77
77
|
const normalRateTax = _round(normalRate * 0.2);
|
|
78
78
|
|
|
79
|
-
const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0
|
|
79
|
+
const reducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0)
|
|
80
80
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
81
81
|
const reducedRate5Dot5Tax = _round(reducedRate5Dot5 * 0.055);
|
|
82
82
|
|
|
83
|
-
const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0
|
|
83
|
+
const reducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0)
|
|
84
84
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
85
85
|
const reducedRate10Tax = _round(reducedRate10 * 0.1);
|
|
86
86
|
|
|
87
|
-
const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0
|
|
87
|
+
const reducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0)
|
|
88
88
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
89
89
|
const reducedRate8Dot5Tax = _round(reducedRate8Dot5 * 0.085);
|
|
90
90
|
|
|
91
|
-
const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0
|
|
91
|
+
const reducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0)
|
|
92
92
|
+ getAmountByAccountNumber(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true));
|
|
93
93
|
const reducedRate2Dot1Tax = _round(reducedRate2Dot1 * 0.021);
|
|
94
94
|
|
|
95
|
-
const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0
|
|
95
|
+
const importNormalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0));
|
|
96
96
|
const importNormalRateTax = _round(importNormalRate * 0.2);
|
|
97
|
-
const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0
|
|
97
|
+
const importReducedRate10 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0));
|
|
98
98
|
const importReducedRate10Tax = _round(importReducedRate10 * 0.1);
|
|
99
|
-
const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0
|
|
99
|
+
const importReducedRate8Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0));
|
|
100
100
|
const importReducedRate8Dot5Tax = _round(importReducedRate8Dot5 * 0.085);
|
|
101
|
-
const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0
|
|
101
|
+
const importReducedRate5Dot5 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0));
|
|
102
102
|
const importReducedRate5Dot5Tax = _round(importReducedRate8Dot5 * 0.055);
|
|
103
|
-
const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0
|
|
103
|
+
const importReducedRate2Dot1 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0));
|
|
104
104
|
const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
|
|
105
|
-
const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0
|
|
105
|
+
const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0));
|
|
106
106
|
const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
|
|
107
107
|
const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
|
|
108
108
|
|