@silexpert/core 1.1.54 → 1.1.55
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/TextMessage.d.ts +2 -1
- package/es/api/resources/TextMessage.d.ts.map +1 -1
- package/es/api/resources/TextMessage.js +3 -0
- package/es/api/resources/TextMessage.js.map +1 -1
- package/es/api/resources/prestation.d.ts +2 -1
- package/es/api/resources/prestation.d.ts.map +1 -1
- package/es/api/resources/prestation.js +3 -0
- package/es/api/resources/prestation.js.map +1 -1
- package/es/types/Interface/api/cerfa/3517.d.ts +7 -0
- package/es/types/Interface/api/cerfa/3517.d.ts.map +1 -1
- package/es/types/Interface/api/cerfa/3517.js.map +1 -1
- package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.d.ts +9 -0
- package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.d.ts.map +1 -0
- package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js +57 -0
- package/es/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js.map +1 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts +1 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts.map +1 -1
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +6 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -1
- package/es/types/Interface/api/textMessage/Create.d.ts +5 -0
- package/es/types/Interface/api/textMessage/Create.d.ts.map +1 -1
- package/es/types/Interface/api/textMessage/Create.js +17 -0
- package/es/types/Interface/api/textMessage/Create.js.map +1 -1
- package/es/types/index.d.ts +1 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +1 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/vat/3517/century23.d.ts.map +1 -1
- package/es/utils/vat/3517/century23.js +103 -94
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/js/api/resources/TextMessage.js +3 -0
- package/js/api/resources/TextMessage.js.map +1 -1
- package/js/api/resources/prestation.js +5 -0
- package/js/api/resources/prestation.js.map +1 -1
- package/js/types/Interface/api/cerfa/3517.js.map +1 -1
- package/js/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js +41 -0
- package/js/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.js.map +1 -0
- package/js/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +1 -0
- package/js/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -1
- package/js/types/Interface/api/textMessage/Create.js +6 -1
- package/js/types/Interface/api/textMessage/Create.js.map +1 -1
- package/js/types/index.js +10 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/vat/3517/century23.js +115 -95
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/TextMessage.ts +5 -0
- package/ts/api/resources/prestation.ts +6 -1
- package/ts/types/Interface/api/cerfa/3517.ts +7 -0
- package/ts/types/Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation.ts +40 -0
- package/ts/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.ts +5 -0
- package/ts/types/Interface/api/textMessage/Create.ts +14 -0
- package/ts/types/index.ts +1 -0
- package/ts/utils/vat/3517/century23.ts +17 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.55",
|
|
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",
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
QueryTextMessageGrouped,
|
|
8
8
|
SendTextMessage,
|
|
9
9
|
UpdateTextMessage,
|
|
10
|
+
SendAnnouncementTextMessage,
|
|
10
11
|
} from '../../types';
|
|
11
12
|
import { ReadPaginatedTextMessage, ReadPaginatedTextMessageGrouped } from '../../types/Interface/api/textMessage/Read';
|
|
12
13
|
|
|
@@ -27,6 +28,10 @@ export class TextMessage extends Resource {
|
|
|
27
28
|
return this.axios.$post('/text-messages', payload);
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
sendAnnouncement(payload: SendAnnouncementTextMessage): Promise<true> {
|
|
32
|
+
return this.axios.$post('/text-messages/announcements', payload);
|
|
33
|
+
}
|
|
34
|
+
|
|
30
35
|
update(id: number, payload: UpdateTextMessage): Promise<{ data: ISms }> {
|
|
31
36
|
return this.axios.patch(`/text-messages/${id}`, payload);
|
|
32
37
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import { Resource } from '../Resource';
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
BasePaginate,
|
|
5
|
+
IPrestation, ISociety, PrestationType, QueryGetPaginatedSocietiesFromPrestation, QueryPrestation,
|
|
5
6
|
} from '../../types';
|
|
6
7
|
|
|
7
8
|
export class Prestation extends Resource {
|
|
@@ -14,6 +15,10 @@ export class Prestation extends Resource {
|
|
|
14
15
|
return this.axios.$get(`/prestation/society/${id}/juridicals`);
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
public getPaginatedSocietiesFromPrestation(params: QueryGetPaginatedSocietiesFromPrestation): Promise<BasePaginate<ISociety>> {
|
|
19
|
+
return this.axios.$get('/prestation/societies', { params });
|
|
20
|
+
}
|
|
21
|
+
|
|
17
22
|
public getAllFromSociety(id: number, params?: QueryPrestation, cancelToken?: CancelToken): Promise<IPrestation[]> {
|
|
18
23
|
return this.axios.$get(`/societies/${id}/prestations`, { ...(cancelToken ? { cancelToken } : {}), params });
|
|
19
24
|
}
|
|
@@ -65,6 +65,7 @@ export interface Cerfa3517_2023 {
|
|
|
65
65
|
untaxedOperation: {
|
|
66
66
|
buy: number;
|
|
67
67
|
exported: number;
|
|
68
|
+
distance?: number;
|
|
68
69
|
other: number;
|
|
69
70
|
petrol: number;
|
|
70
71
|
intracomunauty: number;
|
|
@@ -264,6 +265,12 @@ export type PayloadCerfa3517_2023 = {
|
|
|
264
265
|
sumToImpute: number | null;
|
|
265
266
|
vatDeductible: number | null;
|
|
266
267
|
};
|
|
268
|
+
untaxedOperation?: {
|
|
269
|
+
distance?: number | null;
|
|
270
|
+
petrol?: number | null;
|
|
271
|
+
salesGoodsOrServices?: number | null;
|
|
272
|
+
delivery?: number | null;
|
|
273
|
+
};
|
|
267
274
|
advance1: { toPay: number; };
|
|
268
275
|
advance2: { toPay: number; };
|
|
269
276
|
tax: {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsArray, IsBoolean, IsNumber, IsOptional, IsString,
|
|
3
|
+
} from 'class-validator';
|
|
4
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
5
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
|
+
|
|
7
|
+
export class QueryGetPaginatedSocietiesFromPrestation {
|
|
8
|
+
@ApiProperty({
|
|
9
|
+
required: true,
|
|
10
|
+
type: [Number],
|
|
11
|
+
})
|
|
12
|
+
@IsArray()
|
|
13
|
+
prestationListIds: number[];
|
|
14
|
+
|
|
15
|
+
@ApiPropertyOptional()
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
search?: string;
|
|
19
|
+
|
|
20
|
+
@ApiPropertyOptional()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
@IsArray()
|
|
23
|
+
juridicIds?: number[];
|
|
24
|
+
|
|
25
|
+
@ApiPropertyOptional({ default: false })
|
|
26
|
+
@IsOptional()
|
|
27
|
+
@IsBoolean()
|
|
28
|
+
@ToBoolean()
|
|
29
|
+
withArchived? = false;
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional({ default: 25 })
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsNumber()
|
|
34
|
+
limit?: number;
|
|
35
|
+
|
|
36
|
+
@ApiPropertyOptional({ default: 1 })
|
|
37
|
+
@IsOptional()
|
|
38
|
+
@IsNumber()
|
|
39
|
+
page?: number;
|
|
40
|
+
}
|
|
@@ -6,6 +6,11 @@ import { CountryId } from '../../../Enum/Country';
|
|
|
6
6
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
7
|
|
|
8
8
|
export class CreateBusinessPartnersAndUsersParamsUser {
|
|
9
|
+
@ApiPropertyOptional()
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsString()
|
|
12
|
+
idUser?: number;
|
|
13
|
+
|
|
9
14
|
@ApiPropertyOptional()
|
|
10
15
|
@IsOptional()
|
|
11
16
|
@IsString()
|
|
@@ -22,4 +22,18 @@ export class SendTextMessage {
|
|
|
22
22
|
@ApiProperty()
|
|
23
23
|
@IsEnum(TextMessageType)
|
|
24
24
|
idTextMessageType: TextMessageType;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class SendAnnouncementTextMessage {
|
|
28
|
+
@ApiProperty()
|
|
29
|
+
@IsNumber()
|
|
30
|
+
idCollaborater: number;
|
|
31
|
+
|
|
32
|
+
@ApiProperty()
|
|
33
|
+
@IsNumber()
|
|
34
|
+
idSociety: number;
|
|
35
|
+
|
|
36
|
+
@ApiProperty()
|
|
37
|
+
@IsString()
|
|
38
|
+
content: string;
|
|
25
39
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -891,6 +891,7 @@ export * from './Interface/api/wallet/UpdateAttribution';
|
|
|
891
891
|
export * from './Interface/api/prestation/CreatePrestation';
|
|
892
892
|
export * from './Interface/api/prestation/QueryPrestation';
|
|
893
893
|
export * from './Interface/api/prestation/QueryCreatePrestationSocieties';
|
|
894
|
+
export * from './Interface/api/prestation/QueryGetPaginatedSocietiesFromPrestation';
|
|
894
895
|
export * from './Interface/api/paymentExpectation/QueryPaymentExpectation';
|
|
895
896
|
export * from './Interface/api/legalNotice/UpdateLegalNotice';
|
|
896
897
|
export * from './Interface/api/wallet/QueryWallet';
|
|
@@ -25,6 +25,11 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
|
|
|
25
25
|
const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
26
26
|
const importationVat = vats.filter((v) => v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
27
27
|
|
|
28
|
+
const untaxedOperationBuy = 0; // FIXME: "TOTAL COMPTE" sur CDC
|
|
29
|
+
const untaxedOperationExported = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && importationVat.includes(ae.idVat)), ['701', '702', '703', '704', '705', '706', '707', '708'], 0, true));
|
|
30
|
+
const untaxedOperationOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && !importationVat.includes(ae.idVat) && !intracomVat.includes(ae.idVat)), ['7'], 0, true));
|
|
31
|
+
const untaxedOperationIntracomunauty = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '702', '703', '704', '705', '706', '707'], 0, true));
|
|
32
|
+
|
|
28
33
|
const taxedOperationsAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
29
34
|
|
|
30
35
|
const vatNormalRate20 = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => ae.idVat === Vat.TX_20.id), taxedOperationsAccounts, 0, true));
|
|
@@ -97,13 +102,14 @@ export function getCerfa3517Century23Payload(accountingEntries: IAccountingEntry
|
|
|
97
102
|
isPayment: true,
|
|
98
103
|
},
|
|
99
104
|
untaxedOperation: {
|
|
100
|
-
buy:
|
|
101
|
-
exported:
|
|
102
|
-
other:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
buy: untaxedOperationBuy,
|
|
106
|
+
exported: untaxedOperationExported,
|
|
107
|
+
other: untaxedOperationOther,
|
|
108
|
+
distance: _round(payload?.untaxedOperation?.distance ?? 0),
|
|
109
|
+
petrol: _round(payload?.untaxedOperation?.petrol ?? 0),
|
|
110
|
+
intracomunauty: untaxedOperationIntracomunauty,
|
|
111
|
+
salesGoodsOrServices: _round(payload?.untaxedOperation?.salesGoodsOrServices ?? 0),
|
|
112
|
+
delivery: _round(payload?.untaxedOperation?.delivery ?? 0),
|
|
107
113
|
},
|
|
108
114
|
vat: {
|
|
109
115
|
normalRate20: {
|
|
@@ -1669,6 +1675,10 @@ export const cerfa3517Century23Fields: CerfaPayloadForm[] = [{
|
|
|
1669
1675
|
{
|
|
1670
1676
|
sectionName: 'TVA brute',
|
|
1671
1677
|
childrens: [
|
|
1678
|
+
{ label: '3A - Ventes à distance taxables dans un autre État membre au profit de personnes non assujetties', key: 'untaxedOperation.distance', type: 'number' },
|
|
1679
|
+
{ label: '3B - Mises à la consommation de produits pétroliers', key: 'untaxedOperation.petrol', type: 'number' },
|
|
1680
|
+
{ label: '4B - Ventes de biens ou prestations de services réalisées par un assujetti non établi en France (article 283-1 du code général des impôts)', key: 'untaxedOperation.salesGoodsOrServices', type: 'number' },
|
|
1681
|
+
{ label: '4D - Livraisons d’électricité, de gaz naturel, de chaleur ou de froid non imposables en France', key: 'untaxedOperation.delivery', type: 'number' },
|
|
1672
1682
|
{ label: '5B - Taux normal 20 % sur les produits pétroliers', key: 'vat.normalRate20OnPetrol', type: 'number' },
|
|
1673
1683
|
{ label: '09 - Taux particulier, base', key: 'vat.particularRate.base', type: 'number' },
|
|
1674
1684
|
{ label: '09 - Taux particulier, taxe', key: 'vat.particularRate.tax', type: 'number' },
|