@silexpert/core 1.3.85-0 → 1.3.86
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/dist/cjs/api/resources/Payment.d.ts +1 -1
- package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Payment.js +1 -1
- package/dist/cjs/api/resources/Payment.js.map +1 -1
- package/dist/cjs/api/resources/PaymentExpectation.d.ts +2 -1
- package/dist/cjs/api/resources/PaymentExpectation.d.ts.map +1 -1
- package/dist/cjs/api/resources/PaymentExpectation.js +3 -0
- package/dist/cjs/api/resources/PaymentExpectation.js.map +1 -1
- package/dist/cjs/types/Enum/Log.d.ts +3 -1
- package/dist/cjs/types/Enum/Log.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Log.js +2 -0
- package/dist/cjs/types/Enum/Log.js.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Params.d.ts +14 -1
- package/dist/cjs/types/Interface/api/payment/Params.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Params.js +84 -0
- package/dist/cjs/types/Interface/api/payment/Params.js.map +1 -1
- package/dist/cjs/types/Interface/models/IPayment.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IPayment.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IPayment.js.map +1 -1
- package/dist/cjs/utils/vat/3310/century23.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3310/century23.js +38 -60
- package/dist/cjs/utils/vat/3310/century23.js.map +1 -1
- package/dist/cjs/utils/vat/3310/century24.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3310/century24.js +38 -60
- package/dist/cjs/utils/vat/3310/century24.js.map +1 -1
- package/dist/cjs/utils/vat/3310/century25.d.ts.map +1 -1
- package/dist/cjs/utils/vat/3310/century25.js +41 -63
- package/dist/cjs/utils/vat/3310/century25.js.map +1 -1
- package/dist/cjs/utils/vat/utils.d.ts +1 -1
- package/dist/cjs/utils/vat/utils.d.ts.map +1 -1
- package/dist/cjs/utils/vat/utils.js +5 -5
- package/dist/cjs/utils/vat/utils.js.map +1 -1
- package/dist/mjs/api/resources/Payment.d.ts +1 -1
- package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Payment.js +1 -1
- package/dist/mjs/api/resources/Payment.js.map +1 -1
- package/dist/mjs/api/resources/PaymentExpectation.d.ts +2 -1
- package/dist/mjs/api/resources/PaymentExpectation.d.ts.map +1 -1
- package/dist/mjs/api/resources/PaymentExpectation.js +3 -0
- package/dist/mjs/api/resources/PaymentExpectation.js.map +1 -1
- package/dist/mjs/types/Enum/Log.d.ts +3 -1
- package/dist/mjs/types/Enum/Log.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Log.js +2 -0
- package/dist/mjs/types/Enum/Log.js.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Params.d.ts +14 -1
- package/dist/mjs/types/Interface/api/payment/Params.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Params.js +98 -1
- package/dist/mjs/types/Interface/api/payment/Params.js.map +1 -1
- package/dist/mjs/types/Interface/models/IPayment.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IPayment.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IPayment.js.map +1 -1
- package/dist/mjs/utils/vat/3310/century23.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3310/century23.js +19 -41
- package/dist/mjs/utils/vat/3310/century23.js.map +1 -1
- package/dist/mjs/utils/vat/3310/century24.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3310/century24.js +19 -41
- package/dist/mjs/utils/vat/3310/century24.js.map +1 -1
- package/dist/mjs/utils/vat/3310/century25.d.ts.map +1 -1
- package/dist/mjs/utils/vat/3310/century25.js +18 -40
- package/dist/mjs/utils/vat/3310/century25.js.map +1 -1
- package/dist/mjs/utils/vat/utils.d.ts +1 -1
- package/dist/mjs/utils/vat/utils.d.ts.map +1 -1
- package/dist/mjs/utils/vat/utils.js +5 -5
- package/dist/mjs/utils/vat/utils.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Payment.ts +1 -1
- package/ts/api/resources/PaymentExpectation.ts +5 -0
- package/ts/types/Enum/Log.ts +2 -0
- package/ts/types/Interface/api/payment/Params.ts +74 -3
- package/ts/types/Interface/models/IPayment.ts +2 -0
- package/ts/utils/vat/3310/century23.ts +19 -41
- package/ts/utils/vat/3310/century24.ts +19 -41
- package/ts/utils/vat/3310/century25.ts +19 -40
- package/ts/utils/vat/utils.ts +6 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import * as dayjs from 'dayjs';
|
|
2
3
|
import { isDefined } from 'class-validator';
|
|
3
4
|
import { round as _round, flatten, uniqBy, maxBy } from 'lodash';
|
|
@@ -965,33 +966,11 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
965
966
|
key: 'BA',
|
|
966
967
|
value: null,
|
|
967
968
|
isMultiple: false,
|
|
968
|
-
tags: [
|
|
969
|
-
{
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
},
|
|
974
|
-
{
|
|
975
|
-
tag: 'TexteLibre2',
|
|
976
|
-
description: 'FTX Commentaires type 1, ligne 2 2ème zone de 512',
|
|
977
|
-
value: comment && (comment?.length ?? 0) > 512 ? textFormatting(comment.slice(512, 1024)) : null,
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
tag: 'TexteLibre3',
|
|
981
|
-
description: 'FTX Commentaires type 1, ligne 3 3ème zone de 512',
|
|
982
|
-
value: comment && (comment?.length ?? 0) > 1024 ? textFormatting(comment.slice(1024, 1536)) : null,
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
tag: 'TexteLibre4',
|
|
986
|
-
description: 'FTX Commentaires type 1, ligne 4 4ème zone de 512',
|
|
987
|
-
value: comment && (comment?.length ?? 0) > 1536 ? textFormatting(comment.slice(1536, 2048)) : null,
|
|
988
|
-
},
|
|
989
|
-
{
|
|
990
|
-
tag: 'TexteLibre5',
|
|
991
|
-
description: 'FTX Commentaires type 1, ligne 5 5ème zone de 512',
|
|
992
|
-
value: comment && (comment?.length ?? 0) > 2048 ? textFormatting(comment.slice(2048, 2560)) : null,
|
|
993
|
-
},
|
|
994
|
-
],
|
|
969
|
+
tags: [1, 2, 3, 4, 5].map((i) => ({
|
|
970
|
+
tag: `TexteLibre${i}` as 'TexteLibre1',
|
|
971
|
+
description: `FTX Commentaires type ${i}`,
|
|
972
|
+
value: textFormatting(comment, 512, 512 * (i - 1)) || null,
|
|
973
|
+
})),
|
|
995
974
|
},
|
|
996
975
|
{
|
|
997
976
|
key: 'BB',
|
|
@@ -1075,7 +1054,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1075
1054
|
tag: 'Valeur',
|
|
1076
1055
|
isMultiple: false,
|
|
1077
1056
|
description:
|
|
1078
|
-
|
|
1057
|
+
"MOA Livraisons d'electricité, de gaz naturel, de chaleur ou de froid imposables en France, base hors taxe",
|
|
1079
1058
|
value: data.taxedOperations.energyDelivery,
|
|
1080
1059
|
},
|
|
1081
1060
|
{
|
|
@@ -1083,7 +1062,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1083
1062
|
tag: 'Valeur',
|
|
1084
1063
|
isMultiple: false,
|
|
1085
1064
|
description:
|
|
1086
|
-
|
|
1065
|
+
"MOA Achats de biens ou de prestations de services réalisés auprès d'un assujetti non établi en France, art 283-1 du CGI",
|
|
1087
1066
|
value: data.taxedOperations.purchaseOfServicesNotInFrance,
|
|
1088
1067
|
},
|
|
1089
1068
|
|
|
@@ -1147,7 +1126,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1147
1126
|
key: 'DC',
|
|
1148
1127
|
tag: 'Valeur',
|
|
1149
1128
|
isMultiple: false,
|
|
1150
|
-
description:
|
|
1129
|
+
description: "MOA Livraisons intracommunautaires à destination d'une personne assujettie 100077",
|
|
1151
1130
|
value: data.untaxedOperations.intracommunityDelivery,
|
|
1152
1131
|
},
|
|
1153
1132
|
{
|
|
@@ -1169,7 +1148,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1169
1148
|
tag: 'Valeur',
|
|
1170
1149
|
isMultiple: false,
|
|
1171
1150
|
description:
|
|
1172
|
-
|
|
1151
|
+
"MOA Livraisons d'electricité, de gaz naturel, de chaleur ou de froid non imposables en France 100122",
|
|
1173
1152
|
value: data.untaxedOperations.energyDelivery,
|
|
1174
1153
|
},
|
|
1175
1154
|
{
|
|
@@ -1376,7 +1355,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1376
1355
|
tag: 'Valeur',
|
|
1377
1356
|
isMultiple: false,
|
|
1378
1357
|
description:
|
|
1379
|
-
|
|
1358
|
+
"PCD Pourcentage de déduction applicable pour la période s'il est différent de 100% Valeur entière et au plus 2 décimales",
|
|
1380
1359
|
value:
|
|
1381
1360
|
isDefined(data.vat.deductible.coefficient) && data.vat.deductible.coefficient !== 100
|
|
1382
1361
|
? data.vat.deductible.coefficient
|
|
@@ -1407,7 +1386,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1407
1386
|
key: 'HJ',
|
|
1408
1387
|
tag: 'Valeur',
|
|
1409
1388
|
isMultiple: false,
|
|
1410
|
-
description:
|
|
1389
|
+
description: "CCITBX Mention membre d'un groupe Table TBX avec X pour sélectionné, CCI/7037 = CAV/1131 =",
|
|
1411
1390
|
value: null,
|
|
1412
1391
|
},
|
|
1413
1392
|
{
|
|
@@ -1614,7 +1593,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1614
1593
|
tag: 'Valeur',
|
|
1615
1594
|
isMultiple: false,
|
|
1616
1595
|
description:
|
|
1617
|
-
|
|
1596
|
+
"CCITBX Mention de qualité de représentant d'un assujetti unique Table TBX avec X pour sélectionné, CCI/7037 = CAV/1131 =",
|
|
1618
1597
|
value: null,
|
|
1619
1598
|
},
|
|
1620
1599
|
{
|
|
@@ -1635,7 +1614,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1635
1614
|
key: 'MD',
|
|
1636
1615
|
tag: 'Valeur',
|
|
1637
1616
|
isMultiple: false,
|
|
1638
|
-
description:
|
|
1617
|
+
description: "MOA Retenue de TVA sur droits d'auteur taxe due",
|
|
1639
1618
|
value: data.vat.otherRate.author.tax,
|
|
1640
1619
|
},
|
|
1641
1620
|
{
|
|
@@ -1656,7 +1635,7 @@ export function getCerfa3310Century25RegistrationFields(data: Cerfa3310_2025): A
|
|
|
1656
1635
|
key: 'MG',
|
|
1657
1636
|
tag: 'Valeur',
|
|
1658
1637
|
isMultiple: false,
|
|
1659
|
-
description:
|
|
1638
|
+
description: "MOA Retenue de TVA sur droits d'auteur base HT",
|
|
1660
1639
|
value: data.vat.otherRate.oldRate.base,
|
|
1661
1640
|
},
|
|
1662
1641
|
{
|
|
@@ -1872,12 +1851,12 @@ export const cerfa3310Century25Fields: CerfaPayloadForm[] = [
|
|
|
1872
1851
|
type: 'number',
|
|
1873
1852
|
},
|
|
1874
1853
|
{
|
|
1875
|
-
label:
|
|
1854
|
+
label: "B3 - Achats d'electricité, de gaz naturel, de chaleur ou de froid imposables en France",
|
|
1876
1855
|
key: 'taxedOperations.energyDelivery',
|
|
1877
1856
|
type: 'number',
|
|
1878
1857
|
},
|
|
1879
1858
|
{
|
|
1880
|
-
label:
|
|
1859
|
+
label: "B4 - Achats de biens ou de prestations de services réalisés auprès d'un assujetti non établi en France",
|
|
1881
1860
|
key: 'taxedOperations.regularizations',
|
|
1882
1861
|
type: 'number',
|
|
1883
1862
|
},
|
|
@@ -1907,7 +1886,7 @@ export const cerfa3310Century25Fields: CerfaPayloadForm[] = [
|
|
|
1907
1886
|
type: 'number',
|
|
1908
1887
|
},
|
|
1909
1888
|
{
|
|
1910
|
-
label:
|
|
1889
|
+
label: "F3 - Livraisons d'électricité, de gaz naturel, de chaleur ou de froid non imposables en France",
|
|
1911
1890
|
key: 'untaxedOperations.energyDelivery',
|
|
1912
1891
|
type: 'number',
|
|
1913
1892
|
},
|
|
@@ -2024,7 +2003,7 @@ export const cerfa3310Century25Fields: CerfaPayloadForm[] = [
|
|
|
2024
2003
|
type: 'number',
|
|
2025
2004
|
},
|
|
2026
2005
|
{
|
|
2027
|
-
label:
|
|
2006
|
+
label: "29 - Taxes assimilées calculées sur l'annexe n° 3310 A",
|
|
2028
2007
|
key: 'credit.assimiledTaxes',
|
|
2029
2008
|
type: 'number',
|
|
2030
2009
|
},
|
package/ts/utils/vat/utils.ts
CHANGED
|
@@ -52,7 +52,7 @@ export function getTaxAmountByAccountNumber(
|
|
|
52
52
|
accountingEntry.account.number.toString().startsWith(number)
|
|
53
53
|
) {
|
|
54
54
|
// eslint-disable-next-line no-console
|
|
55
|
-
if (logging) console.log('
|
|
55
|
+
if (logging) console.log("''");
|
|
56
56
|
// eslint-disable-next-line no-console
|
|
57
57
|
if (logging) console.log(accountingEntry);
|
|
58
58
|
|
|
@@ -68,19 +68,20 @@ export function getTaxAmountByAccountNumber(
|
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export function textFormatting(value: any, length: number | null = null): string | null {
|
|
71
|
+
export function textFormatting(value: any, length: number | null = null, start?: number): string | null {
|
|
72
72
|
if (value && typeof value === 'string') {
|
|
73
|
-
let formattedValue = value.replace(/[\u2018\u2019]/g, '
|
|
73
|
+
let formattedValue = value.replace(/[\u2018\u2019]/g, "'"); // Suppression des "Curly Quotes"
|
|
74
74
|
formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &
|
|
75
75
|
formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !
|
|
76
76
|
formattedValue = formattedValue.replace(/[\t]/g, ''); // Suppression des tabulations
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
formattedValue = formattedValue.replace(/`/g, "'"); // Suppression des `
|
|
78
79
|
formattedValue = formattedValue.replace(/"/g, ''); // Suppression des "
|
|
79
80
|
formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début
|
|
80
81
|
formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin
|
|
81
82
|
formattedValue = formattedValue.replace(/€/g, 'EUR');
|
|
82
83
|
formattedValue = formattedValue.replace(/œ/g, 'oe');
|
|
83
|
-
if (length) formattedValue = formattedValue.slice(0, length);
|
|
84
|
+
if (length) formattedValue = formattedValue.slice(start ?? 0, (start ?? 0) + length);
|
|
84
85
|
return formattedValue;
|
|
85
86
|
}
|
|
86
87
|
return null;
|