@silexpert/core 1.1.42 → 1.1.43

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.
@@ -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;AAKhG,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,CAgV1K;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAg5B9F;AAED,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAiLrD,CAAC"}
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;AAKhG,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAG/F,wBAAgB,4BAA4B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,GAAE,iBAAsB,GAAG,cAAc,CAiV1K;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,cAAc,GAAG,gBAAgB,CAo7B9F;AAED,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAiLrD,CAAC"}
@@ -47,7 +47,7 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
47
47
  const taxedImportAccounts = ['6'];
48
48
  const taxedImport = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0, true));
49
49
  const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607'];
50
- const taxedIntracommunityAcquisitions = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true));
50
+ const taxedIntracommunityAcquisitions = getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), [...intracommunityAccounts2, ...intracommunityServiceAccounts], 0, true);
51
51
  // Opérations non taxées
52
52
  const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
53
53
  const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true));
@@ -82,7 +82,7 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
82
82
  const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
83
83
  const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
84
84
  const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
85
- const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2]));
85
+ const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
86
86
  // TVA Déductible
87
87
  const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2']));
88
88
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6']));
@@ -329,6 +329,106 @@ export function getCerfa3310Century23Payload(accountingEntries, payload, updated
329
329
  export function getCerfa3310Century23RegistrationFields(data) {
330
330
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
331
331
  const comment = textFormatting(data.declaration.comment);
332
+ const importFields = [];
333
+ if (data.vat.oilProducts.normalRate20.base > 0) {
334
+ importFields.push({
335
+ key: 'GS',
336
+ tag: 'Valeur',
337
+ isMultiple: false,
338
+ description: 'MOA Opérations imposables au taux normal 20 % sur les produits pétroliers : base HT',
339
+ value: data.vat.oilProducts.normalRate20.base,
340
+ });
341
+ }
342
+ if (data.taxedOperations.import > 0) {
343
+ importFields.push({
344
+ key: 'DK',
345
+ tag: 'Valeur',
346
+ isMultiple: false,
347
+ description: 'MOA Opérations taxées HT - Importations (autres que les produits pétroliers',
348
+ value: data.taxedOperations.import,
349
+ });
350
+ }
351
+ if (data.vat.oilProducts.normalRate20.tax > 0) {
352
+ importFields.push({
353
+ key: 'GT',
354
+ tag: 'Valeur',
355
+ isMultiple: false,
356
+ description: 'MOA Opérations imposables au taux normal 20 % sur les produits pétroliers : taxe due',
357
+ value: data.vat.oilProducts.normalRate20.tax,
358
+ });
359
+ }
360
+ if (data.vat.oilProducts.reduceRate13.base > 0) {
361
+ importFields.push({
362
+ key: 'GU',
363
+ tag: 'Valeur',
364
+ isMultiple: false,
365
+ description: 'MOA Opérations imposables au taux réduit 13 % sur les produits pétroliers : base HT',
366
+ value: data.vat.oilProducts.reduceRate13.base,
367
+ });
368
+ }
369
+ if (data.vat.oilProducts.reduceRate13.tax > 0) {
370
+ importFields.push({
371
+ key: 'GV',
372
+ tag: 'Valeur',
373
+ isMultiple: false,
374
+ description: 'MOA Opérations imposables au taux réduit 13 % sur les produits pétroliers : taxe due',
375
+ value: data.vat.oilProducts.reduceRate13.tax,
376
+ });
377
+ }
378
+ if (data.vat.importations.normalRate20.base > 0) {
379
+ importFields.push({
380
+ key: 'LB',
381
+ tag: 'Valeur',
382
+ isMultiple: false,
383
+ description: 'MOA Importations - Taux normal 20 % Base HT',
384
+ value: data.vat.importations.normalRate20.base,
385
+ });
386
+ }
387
+ if (data.vat.importations.reduceRate10.base > 0) {
388
+ importFields.push({
389
+ key: 'LD',
390
+ tag: 'Valeur',
391
+ isMultiple: false,
392
+ description: 'MOA Importations - Taux réduit 10 % Base HT',
393
+ value: data.vat.importations.reduceRate10.base,
394
+ });
395
+ }
396
+ if (data.vat.importations.reduceRate8Dot5.base > 0) {
397
+ importFields.push({
398
+ key: 'LF',
399
+ tag: 'Valeur',
400
+ isMultiple: false,
401
+ description: 'MOA Importations - Taux réduit 8,5 % Base HT',
402
+ value: data.vat.importations.reduceRate8Dot5.base,
403
+ });
404
+ }
405
+ if (data.vat.importations.reduceRate5Dot5.base > 0) {
406
+ importFields.push({
407
+ key: 'LH',
408
+ tag: 'Valeur',
409
+ isMultiple: false,
410
+ description: 'MOA Importations - Taux réduit 5,5 % Base HT',
411
+ value: data.vat.importations.reduceRate5Dot5.base,
412
+ });
413
+ }
414
+ if (data.vat.importations.reduceRate2Dot1.base > 0) {
415
+ importFields.push({
416
+ key: 'LK',
417
+ tag: 'Valeur',
418
+ isMultiple: false,
419
+ description: 'MOA Importations - Taux réduit 2,1 % Base HT',
420
+ value: data.vat.importations.reduceRate2Dot1.base,
421
+ });
422
+ }
423
+ if (data.vat.importations.reduceRate1Dot05.base > 0) {
424
+ importFields.push({
425
+ key: 'LM',
426
+ tag: 'Valeur',
427
+ isMultiple: false,
428
+ description: 'MOA Importations - Taux réduit 1,05 % Base HT',
429
+ value: data.vat.importations.reduceRate1Dot05.base,
430
+ });
431
+ }
332
432
  return [{
333
433
  name: '3310CA3',
334
434
  fields: [
@@ -549,13 +649,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
549
649
  description: 'MOA Opérations non taxées - Mises à la consommation de produits pétroliers 910759',
550
650
  value: data.untaxedOperations.oilProductsConsumption,
551
651
  },
552
- {
553
- key: 'DK',
554
- tag: 'Valeur',
555
- isMultiple: false,
556
- description: 'MOA Opérations taxées HT - Importations (autres que les produits pétroliers',
557
- value: data.taxedOperations.import,
558
- },
559
652
  {
560
653
  key: 'FB',
561
654
  tag: 'Valeur',
@@ -703,34 +796,7 @@ export function getCerfa3310Century23RegistrationFields(data) {
703
796
  description: 'MOA Opérations imposables au taux réduit de 10% en France métropolitaine : Taxe due',
704
797
  value: data.vat.carrieredOutInFrance.reduceRate10.tax,
705
798
  },
706
- {
707
- key: 'GS',
708
- tag: 'Valeur',
709
- isMultiple: false,
710
- description: 'MOA Opérations imposables au taux normal 20 % sur les produits pétroliers : base HT',
711
- value: data.vat.oilProducts.normalRate20.base,
712
- },
713
- {
714
- key: 'GT',
715
- tag: 'Valeur',
716
- isMultiple: false,
717
- description: 'MOA Opérations imposables au taux normal 20 % sur les produits pétroliers : taxe due',
718
- value: data.vat.oilProducts.normalRate20.tax,
719
- },
720
- {
721
- key: 'GU',
722
- tag: 'Valeur',
723
- isMultiple: false,
724
- description: 'MOA Opérations imposables au taux réduit 13 % sur les produits pétroliers : base HT',
725
- value: data.vat.oilProducts.reduceRate13.base,
726
- },
727
- {
728
- key: 'GV',
729
- tag: 'Valeur',
730
- isMultiple: false,
731
- description: 'MOA Opérations imposables au taux réduit 13 % sur les produits pétroliers : taxe due',
732
- value: data.vat.oilProducts.reduceRate13.tax,
733
- },
799
+ ...importFields,
734
800
  {
735
801
  key: 'HA',
736
802
  tag: 'Valeur',
@@ -934,13 +1000,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
934
1000
  description: 'MOA Opérations non taxées - Importations de produits pétroliers placées sous régime fiscal suspensif 911595',
935
1001
  value: data.untaxedOperations.importPetrolInSuspensiveSystem,
936
1002
  },
937
- {
938
- key: 'LB',
939
- tag: 'Valeur',
940
- isMultiple: false,
941
- description: 'MOA Importations - Taux normal 20 % Base HT',
942
- value: data.vat.importations.normalRate20.base,
943
- },
944
1003
  {
945
1004
  key: 'LC',
946
1005
  tag: 'Valeur',
@@ -948,13 +1007,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
948
1007
  description: 'MOA Importations - Taux normal 20 % Taxe due',
949
1008
  value: data.vat.importations.normalRate20.tax,
950
1009
  },
951
- {
952
- key: 'LD',
953
- tag: 'Valeur',
954
- isMultiple: false,
955
- description: 'MOA Importations - Taux réduit 10 % Base HT',
956
- value: data.vat.importations.reduceRate10.base,
957
- },
958
1010
  {
959
1011
  key: 'LE',
960
1012
  tag: 'Valeur',
@@ -962,13 +1014,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
962
1014
  description: 'MOA Importations - Taux réduit 10 % Taxe due',
963
1015
  value: data.vat.importations.reduceRate10.tax,
964
1016
  },
965
- {
966
- key: 'LF',
967
- tag: 'Valeur',
968
- isMultiple: false,
969
- description: 'MOA Importations - Taux réduit 8,5 % Base HT',
970
- value: data.vat.importations.reduceRate8Dot5.base,
971
- },
972
1017
  {
973
1018
  key: 'LG',
974
1019
  tag: 'Valeur',
@@ -976,13 +1021,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
976
1021
  description: 'MOA Importations - Taux réduit 8,5 % Taxe due',
977
1022
  value: data.vat.importations.reduceRate8Dot5.tax,
978
1023
  },
979
- {
980
- key: 'LH',
981
- tag: 'Valeur',
982
- isMultiple: false,
983
- description: 'MOA Importations - Taux réduit 5,5 % Base HT',
984
- value: data.vat.importations.reduceRate5Dot5.base,
985
- },
986
1024
  {
987
1025
  key: 'LJ',
988
1026
  tag: 'Valeur',
@@ -990,13 +1028,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
990
1028
  description: 'MOA Importations - Taux réduit 5,5 % Taxe due',
991
1029
  value: data.vat.importations.reduceRate5Dot5.tax,
992
1030
  },
993
- {
994
- key: 'LK',
995
- tag: 'Valeur',
996
- isMultiple: false,
997
- description: 'MOA Importations - Taux réduit 2,1 % Base HT',
998
- value: data.vat.importations.reduceRate2Dot1.base,
999
- },
1000
1031
  {
1001
1032
  key: 'LL',
1002
1033
  tag: 'Valeur',
@@ -1004,13 +1035,6 @@ export function getCerfa3310Century23RegistrationFields(data) {
1004
1035
  description: 'MOA Importations - Taux réduit 2,1 % Taxe due',
1005
1036
  value: data.vat.importations.reduceRate2Dot1.tax,
1006
1037
  },
1007
- {
1008
- key: 'LM',
1009
- tag: 'Valeur',
1010
- isMultiple: false,
1011
- description: 'MOA Importations - Taux réduit 1,05 % Base HT',
1012
- value: data.vat.importations.reduceRate1Dot05.base,
1013
- },
1014
1038
  {
1015
1039
  key: 'LN',
1016
1040
  tag: 'Valeur',
@@ -1032,13 +1056,13 @@ export function getCerfa3310Century23RegistrationFields(data) {
1032
1056
  description: 'MOA TVA antérieurement déduite à reverser, dont TVA sur les produits importés hors produits',
1033
1057
  value: data.vat.previouslyDeductedToBeReturned.otherThanOilProducts,
1034
1058
  },
1035
- {
1036
- key: 'LR',
1037
- tag: 'Valeur',
1038
- isMultiple: false,
1039
- description: 'MOA Opérations internes réalisées entre membres d\'un assujetti unique 912152',
1040
- value: data.untaxedOperations.internalUniq,
1041
- },
1059
+ // {
1060
+ // key: 'LR',
1061
+ // tag: 'Valeur',
1062
+ // isMultiple: false,
1063
+ // description: 'MOA Opérations internes réalisées entre membres d\'un assujetti unique 912152',
1064
+ // value: data.untaxedOperations.internalUniq,
1065
+ // },
1042
1066
  {
1043
1067
  key: 'LS',
1044
1068
  tag: 'Valeur',