@silexpert/core 1.1.153 → 1.1.154
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/types/Enum/BrandPourcentage.d.ts +16 -0
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.js +15 -3
- package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/cjs/utils/vat/3310/century23.js +58 -58
- package/dist/cjs/utils/vat/3310/century23.js.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts +16 -0
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.js +15 -3
- package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/mjs/utils/vat/3310/century23.js +5 -5
- package/dist/mjs/utils/vat/3310/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/BrandPourcentage.ts +15 -3
- package/ts/utils/vat/3310/century23.ts +5 -5
|
@@ -7,7 +7,7 @@ const lodash_1 = require("lodash");
|
|
|
7
7
|
const Vat_1 = require("../../../types/Enum/Vat");
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries = []) {
|
|
10
|
-
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, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222;
|
|
10
|
+
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, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, _231, _232, _233, _234, _235, _236, _237;
|
|
11
11
|
const shouldHaveVatCode = (0, class_validator_1.isDefined)((_a = payload.setting) === null || _a === void 0 ? void 0 : _a.tvaCode) && (0, class_validator_1.isDefined)(payload.society.siret);
|
|
12
12
|
const vats = Object.values(Vat_1.Vat);
|
|
13
13
|
const frenchVat = vats.filter((v) => !v.isVatImportation && !v.isVatIntracom).map((v) => v.id);
|
|
@@ -60,43 +60,43 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
60
60
|
const untaxedIntracommunityDelivery = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
|
|
61
61
|
// TVA brute
|
|
62
62
|
const normalRate = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
63
|
-
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((_33 = (_32 = (_31 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _31 === void 0 ? void 0 : _31.france) === null || _32 === void 0 ? void 0 : _32.base20) !== null && _33 !== void 0 ? _33 : 0);
|
|
63
|
+
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((_33 = (_32 = (_31 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _31 === void 0 ? void 0 : _31.france) === null || _32 === void 0 ? void 0 : _32.base20) !== null && _33 !== void 0 ? _33 : 0) + ((_36 = (_35 = (_34 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _34 === void 0 ? void 0 : _34.other) === null || _35 === void 0 ? void 0 : _35.base20) !== null && _36 !== void 0 ? _36 : 0);
|
|
64
64
|
const normalRateTax = (0, lodash_1.round)(normalRate * 0.2);
|
|
65
65
|
const reducedRate5Dot5 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
66
|
-
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((
|
|
66
|
+
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((_39 = (_38 = (_37 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _37 === void 0 ? void 0 : _37.france) === null || _38 === void 0 ? void 0 : _38.base5Dot5) !== null && _39 !== void 0 ? _39 : 0) + ((_42 = (_41 = (_40 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _40 === void 0 ? void 0 : _40.other) === null || _41 === void 0 ? void 0 : _41.base5Dot5) !== null && _42 !== void 0 ? _42 : 0);
|
|
67
67
|
const reducedRate5Dot5Tax = (0, lodash_1.round)(reducedRate5Dot5 * 0.055);
|
|
68
68
|
const reducedRate10 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
69
|
-
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((
|
|
69
|
+
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((_45 = (_44 = (_43 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _43 === void 0 ? void 0 : _43.france) === null || _44 === void 0 ? void 0 : _44.base10) !== null && _45 !== void 0 ? _45 : 0) + ((_48 = (_47 = (_46 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _46 === void 0 ? void 0 : _46.other) === null || _47 === void 0 ? void 0 : _47.base10) !== null && _48 !== void 0 ? _48 : 0);
|
|
70
70
|
const reducedRate10Tax = (0, lodash_1.round)(reducedRate10 * 0.1);
|
|
71
71
|
const reducedRate8Dot5 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
72
|
-
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((
|
|
72
|
+
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((_51 = (_50 = (_49 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _49 === void 0 ? void 0 : _49.france) === null || _50 === void 0 ? void 0 : _50.base8Dot5) !== null && _51 !== void 0 ? _51 : 0) + ((_54 = (_53 = (_52 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _52 === void 0 ? void 0 : _52.other) === null || _53 === void 0 ? void 0 : _53.base5Dot5) !== null && _54 !== void 0 ? _54 : 0);
|
|
73
73
|
const reducedRate8Dot5Tax = (0, lodash_1.round)(reducedRate8Dot5 * 0.085);
|
|
74
74
|
const reducedRate2Dot1 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
75
|
-
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((
|
|
75
|
+
+ (0, utils_1.getAmountByAccountNumber)(intracommunityServiceEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), ['6'], 0, true)) + ((_57 = (_56 = (_55 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _55 === void 0 ? void 0 : _55.france) === null || _56 === void 0 ? void 0 : _56.base2Dot1) !== null && _57 !== void 0 ? _57 : 0) + ((_60 = (_59 = (_58 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _58 === void 0 ? void 0 : _58.other) === null || _59 === void 0 ? void 0 : _59.base2Dot1) !== null && _60 !== void 0 ? _60 : 0);
|
|
76
76
|
const reducedRate2Dot1Tax = (0, lodash_1.round)(reducedRate2Dot1 * 0.021);
|
|
77
|
-
const importNormalRate = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((
|
|
77
|
+
const importNormalRate = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((_63 = (_62 = (_61 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _61 === void 0 ? void 0 : _61.importations) === null || _62 === void 0 ? void 0 : _62.base20) !== null && _63 !== void 0 ? _63 : 0);
|
|
78
78
|
const importNormalRateTax = (0, lodash_1.round)(importNormalRate * 0.2);
|
|
79
|
-
const importReducedRate10 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((
|
|
79
|
+
const importReducedRate10 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 10).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((_66 = (_65 = (_64 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _64 === void 0 ? void 0 : _64.importations) === null || _65 === void 0 ? void 0 : _65.base10) !== null && _66 !== void 0 ? _66 : 0);
|
|
80
80
|
const importReducedRate10Tax = (0, lodash_1.round)(importReducedRate10 * 0.1);
|
|
81
|
-
const importReducedRate8Dot5 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((
|
|
81
|
+
const importReducedRate8Dot5 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 8.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((_69 = (_68 = (_67 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _67 === void 0 ? void 0 : _67.importations) === null || _68 === void 0 ? void 0 : _68.base8Dot5) !== null && _69 !== void 0 ? _69 : 0);
|
|
82
82
|
const importReducedRate8Dot5Tax = (0, lodash_1.round)(importReducedRate8Dot5 * 0.085);
|
|
83
|
-
const importReducedRate5Dot5 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((
|
|
83
|
+
const importReducedRate5Dot5 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 5.5).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((_72 = (_71 = (_70 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _70 === void 0 ? void 0 : _70.importations) === null || _71 === void 0 ? void 0 : _71.base5Dot5) !== null && _72 !== void 0 ? _72 : 0);
|
|
84
84
|
const importReducedRate5Dot5Tax = (0, lodash_1.round)(importReducedRate8Dot5 * 0.055);
|
|
85
|
-
const importReducedRate2Dot1 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((
|
|
85
|
+
const importReducedRate2Dot1 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 2.1).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true)) + ((_75 = (_74 = (_73 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _73 === void 0 ? void 0 : _73.importations) === null || _74 === void 0 ? void 0 : _74.base2Dot1) !== null && _75 !== void 0 ? _75 : 0);
|
|
86
86
|
const importReducedRate2Dot1Tax = (0, lodash_1.round)(importReducedRate2Dot1 * 0.021);
|
|
87
87
|
const importReducedRate1Dot05 = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getAmountByAccountNumber)(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
88
88
|
const importReducedRate1Dot05Tax = (0, lodash_1.round)(importReducedRate1Dot05 * 0.0105);
|
|
89
89
|
const intracommunityTax = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2], 0));
|
|
90
90
|
// TVA Déductible
|
|
91
|
-
const immobilizationTax = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(vatEntries, ['2'])) + ((
|
|
92
|
-
const otherGoodsAndServices = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + ((
|
|
93
|
-
const otherDeductibles = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + ((
|
|
94
|
-
const report = (((
|
|
95
|
-
const coefficient = (0, lodash_1.round)((
|
|
91
|
+
const immobilizationTax = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(vatEntries, ['2'])) + ((_78 = (_77 = (_76 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _76 === void 0 ? void 0 : _76.deducted) === null || _77 === void 0 ? void 0 : _77.immobilization) !== null && _78 !== void 0 ? _78 : 0);
|
|
92
|
+
const otherGoodsAndServices = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + ((_81 = (_80 = (_79 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _79 === void 0 ? void 0 : _79.deducted) === null || _80 === void 0 ? void 0 : _80.abs) !== null && _81 !== void 0 ? _81 : 0);
|
|
93
|
+
const otherDeductibles = (0, utils_1.setZeroIfIsNegative)((0, utils_1.getTaxAmountByAccountNumber)(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + ((_84 = (_83 = (_82 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _82 === void 0 ? void 0 : _82.deducted) === null || _83 === void 0 ? void 0 : _83.other) !== null && _84 !== void 0 ? _84 : 0);
|
|
94
|
+
const report = (((_86 = (_85 = payload.vat) === null || _85 === void 0 ? void 0 : _85.deductible) === null || _86 === void 0 ? void 0 : _86.toReport) && ((_88 = (_87 = payload.vat) === null || _87 === void 0 ? void 0 : _87.deductible) === null || _88 === void 0 ? void 0 : _88.toReport) > 0 ? (0, lodash_1.round)((_91 = (_90 = (_89 = payload.vat) === null || _89 === void 0 ? void 0 : _89.deductible) === null || _90 === void 0 ? void 0 : _90.toReport) !== null && _91 !== void 0 ? _91 : 0) : (_94 = (_93 = (_92 = payload.previousVatDeclaration) === null || _92 === void 0 ? void 0 : _92.credit) === null || _93 === void 0 ? void 0 : _93.toReport) !== null && _94 !== void 0 ? _94 : 0) + ((_97 = (_96 = (_95 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _95 === void 0 ? void 0 : _95.deducted) === null || _96 === void 0 ? void 0 : _96.reported) !== null && _97 !== void 0 ? _97 : 0);
|
|
95
|
+
const coefficient = (0, lodash_1.round)((_100 = (_99 = (_98 = payload.vat) === null || _98 === void 0 ? void 0 : _98.deductible) === null || _99 === void 0 ? void 0 : _99.coefficient) !== null && _100 !== void 0 ? _100 : 100, 2);
|
|
96
96
|
const isNil = payload.isNil === true;
|
|
97
97
|
const isHolidayDeposit = payload.isHolidayDeposit === true;
|
|
98
|
-
const sumToAdd = (0, utils_1.setZeroIfIsNegative)(isNil ? 0 : isHolidayDeposit ? ((0, lodash_1.round)(((
|
|
99
|
-
const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(
|
|
98
|
+
const sumToAdd = (0, utils_1.setZeroIfIsNegative)(isNil ? 0 : isHolidayDeposit ? ((0, lodash_1.round)(((_103 = (_102 = (_101 = payload.previousVatDeclaration) === null || _101 === void 0 ? void 0 : _101.toPay) === null || _102 === void 0 ? void 0 : _102.total) !== null && _103 !== void 0 ? _103 : 0) * 0.8)) : ((0, lodash_1.round)((_105 = (_104 = payload.vat) === null || _104 === void 0 ? void 0 : _104.sumToAdd) !== null && _105 !== void 0 ? _105 : 0) + mxToAdd)) + ((_108 = (_107 = (_106 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _106 === void 0 ? void 0 : _106.regularisations) === null || _107 === void 0 ? void 0 : _107.case5B) !== null && _108 !== void 0 ? _108 : 0);
|
|
99
|
+
const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_109 = payload.comment) !== null && _109 !== void 0 ? _109 : ''}` : ((_110 = payload.comment) !== null && _110 !== void 0 ? _110 : null);
|
|
100
100
|
const initialPayload = {
|
|
101
101
|
isNil,
|
|
102
102
|
isDGE: false,
|
|
@@ -109,7 +109,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
109
109
|
full: `${payload.society.address}\n${payload.society.zipCode} ${payload.society.city}`,
|
|
110
110
|
},
|
|
111
111
|
numbers: {
|
|
112
|
-
SIE: (
|
|
112
|
+
SIE: (_112 = (_111 = payload.sie) === null || _111 === void 0 ? void 0 : _111.sages) !== null && _112 !== void 0 ? _112 : null,
|
|
113
113
|
folder: null,
|
|
114
114
|
key: null,
|
|
115
115
|
period: null,
|
|
@@ -121,7 +121,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
121
121
|
},
|
|
122
122
|
service: {
|
|
123
123
|
address: {
|
|
124
|
-
full: (0, class_validator_1.isDefined)((
|
|
124
|
+
full: (0, class_validator_1.isDefined)((_114 = (_113 = payload.sie) === null || _113 === void 0 ? void 0 : _113.address) === null || _114 === void 0 ? void 0 : _114.address1) ? `${(_115 = payload.sie) === null || _115 === void 0 ? void 0 : _115.address.address1}\n${(_116 = payload.sie) === null || _116 === void 0 ? void 0 : _116.address.address2}\n${(_117 = payload.sie) === null || _117 === void 0 ? void 0 : _117.address.address3}\n${(_118 = payload.sie) === null || _118 === void 0 ? void 0 : _118.address.address4}\n${(_119 = payload.sie) === null || _119 === void 0 ? void 0 : _119.address.address5}` : null,
|
|
125
125
|
},
|
|
126
126
|
},
|
|
127
127
|
period: {
|
|
@@ -137,13 +137,13 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
137
137
|
},
|
|
138
138
|
},
|
|
139
139
|
siret: {
|
|
140
|
-
first: (0, class_validator_1.isDefined)(payload.society.siret) ? ((
|
|
141
|
-
second: (0, class_validator_1.isDefined)(payload.society.siret) ? ((
|
|
140
|
+
first: (0, class_validator_1.isDefined)(payload.society.siret) ? ((_121 = (_120 = payload.society.siret) === null || _120 === void 0 ? void 0 : _120.slice(0, 9)) !== null && _121 !== void 0 ? _121 : null) : null,
|
|
141
|
+
second: (0, class_validator_1.isDefined)(payload.society.siret) ? ((_123 = (_122 = payload.society.siret) === null || _122 === void 0 ? void 0 : _122.slice(-5)) !== null && _123 !== void 0 ? _123 : null) : null,
|
|
142
142
|
},
|
|
143
143
|
intracommunityVat: {
|
|
144
|
-
first: shouldHaveVatCode ? ((
|
|
145
|
-
second: shouldHaveVatCode ? ((
|
|
146
|
-
third: shouldHaveVatCode ? ((
|
|
144
|
+
first: shouldHaveVatCode ? ((_126 = (_125 = (_124 = payload.setting) === null || _124 === void 0 ? void 0 : _124.tvaCode) === null || _125 === void 0 ? void 0 : _125.slice(0, 2)) !== null && _126 !== void 0 ? _126 : null) : null,
|
|
145
|
+
second: shouldHaveVatCode ? ((_129 = (_128 = (_127 = payload.setting) === null || _127 === void 0 ? void 0 : _127.tvaCode) === null || _128 === void 0 ? void 0 : _128.slice(2, 4)) !== null && _129 !== void 0 ? _129 : null) : null,
|
|
146
|
+
third: shouldHaveVatCode ? ((_131 = (_130 = payload.society.siret) === null || _130 === void 0 ? void 0 : _130.slice(0, 9)) !== null && _131 !== void 0 ? _131 : null) : null,
|
|
147
147
|
},
|
|
148
148
|
payment: {
|
|
149
149
|
date: dayjs().format('YYYY-MM-DD'),
|
|
@@ -157,29 +157,29 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
157
157
|
other: isNil || isHolidayDeposit ? 0 : taxedOther,
|
|
158
158
|
purchaseOfIntracommunityServiceProvision: isNil || isHolidayDeposit ? 0 : taxedPurchaseOfIntracommunityService,
|
|
159
159
|
import: isNil || isHolidayDeposit ? 0 : taxedImport,
|
|
160
|
-
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
161
|
-
releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
160
|
+
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_133 = (_132 = payload.taxedOperations) === null || _132 === void 0 ? void 0 : _132.withdrawSuspensiveRegime) !== null && _133 !== void 0 ? _133 : 0),
|
|
161
|
+
releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_135 = (_134 = payload.taxedOperations) === null || _134 === void 0 ? void 0 : _134.releaseFromConsumption) !== null && _135 !== void 0 ? _135 : 0),
|
|
162
162
|
intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : taxedIntracommunityAcquisitions,
|
|
163
|
-
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
164
|
-
purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
165
|
-
regularizations: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
163
|
+
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_137 = (_136 = payload.taxedOperations) === null || _136 === void 0 ? void 0 : _136.energyDelivery) !== null && _137 !== void 0 ? _137 : 0),
|
|
164
|
+
purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_139 = (_138 = payload.taxedOperations) === null || _138 === void 0 ? void 0 : _138.purchaseOfServicesNotInFrance) !== null && _139 !== void 0 ? _139 : 0),
|
|
165
|
+
regularizations: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_141 = (_140 = payload.taxedOperations) === null || _140 === void 0 ? void 0 : _140.regularizations) !== null && _141 !== void 0 ? _141 : 0) + ((_144 = (_143 = (_142 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _142 === void 0 ? void 0 : _142.regularisations) === null || _143 === void 0 ? void 0 : _143.base20) !== null && _144 !== void 0 ? _144 : 0) + ((_147 = (_146 = (_145 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _145 === void 0 ? void 0 : _145.regularisations) === null || _146 === void 0 ? void 0 : _146.base10) !== null && _147 !== void 0 ? _147 : 0) + ((_150 = (_149 = (_148 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _148 === void 0 ? void 0 : _148.regularisations) === null || _149 === void 0 ? void 0 : _149.base5Dot5) !== null && _150 !== void 0 ? _150 : 0) + ((_153 = (_152 = (_151 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _151 === void 0 ? void 0 : _151.regularisations) === null || _152 === void 0 ? void 0 : _152.base2Dot1) !== null && _153 !== void 0 ? _153 : 0),
|
|
166
166
|
},
|
|
167
167
|
untaxedOperations: {
|
|
168
168
|
exportationNotInEurope: isNil || isHolidayDeposit ? 0 : untaxedExportationNotInEurope,
|
|
169
169
|
other: isNil || isHolidayDeposit ? 0 : untaxedOther,
|
|
170
|
-
distanceSelling: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
170
|
+
distanceSelling: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_155 = (_154 = payload.untaxedOperations) === null || _154 === void 0 ? void 0 : _154.distanceSelling) !== null && _155 !== void 0 ? _155 : 0),
|
|
171
171
|
import: isNil || isHolidayDeposit ? 0 : untaxedImport,
|
|
172
|
-
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
173
|
-
importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
172
|
+
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_157 = (_156 = payload.untaxedOperations) === null || _156 === void 0 ? void 0 : _156.withdrawSuspensiveRegime) !== null && _157 !== void 0 ? _157 : 0),
|
|
173
|
+
importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_159 = (_158 = payload.untaxedOperations) === null || _158 === void 0 ? void 0 : _158.importInSuspensiveSystem) !== null && _159 !== void 0 ? _159 : 0),
|
|
174
174
|
intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : untaxedIntracomunity,
|
|
175
175
|
intracommunityDelivery: isNil || isHolidayDeposit ? 0 : untaxedIntracommunityDelivery,
|
|
176
|
-
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
177
|
-
oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
178
|
-
importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
179
|
-
purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
180
|
-
saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
181
|
-
regularizations: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
182
|
-
internalUniq: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
176
|
+
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_161 = (_160 = payload.untaxedOperations) === null || _160 === void 0 ? void 0 : _160.energyDelivery) !== null && _161 !== void 0 ? _161 : 0),
|
|
177
|
+
oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_163 = (_162 = payload.untaxedOperations) === null || _162 === void 0 ? void 0 : _162.oilProductsConsumption) !== null && _163 !== void 0 ? _163 : 0),
|
|
178
|
+
importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_165 = (_164 = payload.untaxedOperations) === null || _164 === void 0 ? void 0 : _164.importPetrolInSuspensiveSystem) !== null && _165 !== void 0 ? _165 : 0),
|
|
179
|
+
purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_167 = (_166 = payload.untaxedOperations) === null || _166 === void 0 ? void 0 : _166.purchaseInFranchise) !== null && _167 !== void 0 ? _167 : 0),
|
|
180
|
+
saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_169 = (_168 = payload.untaxedOperations) === null || _168 === void 0 ? void 0 : _168.saleOfServicesNotInFrance) !== null && _169 !== void 0 ? _169 : 0),
|
|
181
|
+
regularizations: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_171 = (_170 = payload.untaxedOperations) === null || _170 === void 0 ? void 0 : _170.regularizations) !== null && _171 !== void 0 ? _171 : 0) + ((_174 = (_173 = (_172 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _172 === void 0 ? void 0 : _172.untaxed) === null || _173 === void 0 ? void 0 : _173.regularisation) !== null && _174 !== void 0 ? _174 : 0),
|
|
182
|
+
internalUniq: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_176 = (_175 = payload.untaxedOperations) === null || _175 === void 0 ? void 0 : _175.internalUniq) !== null && _176 !== void 0 ? _176 : 0),
|
|
183
183
|
},
|
|
184
184
|
vat: {
|
|
185
185
|
carrieredOutInFrance: {
|
|
@@ -208,12 +208,12 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
208
208
|
},
|
|
209
209
|
oilProducts: {
|
|
210
210
|
normalRate20: {
|
|
211
|
-
base: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
212
|
-
tax: isNil || isHolidayDeposit ? 0 : ((0, lodash_1.round)((
|
|
211
|
+
base: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_180 = (_179 = (_178 = (_177 = payload.vat) === null || _177 === void 0 ? void 0 : _177.oilProducts) === null || _178 === void 0 ? void 0 : _178.normalRate20) === null || _179 === void 0 ? void 0 : _179.base) !== null && _180 !== void 0 ? _180 : 0),
|
|
212
|
+
tax: isNil || isHolidayDeposit ? 0 : ((0, lodash_1.round)((_184 = (_183 = (_182 = (_181 = payload.vat) === null || _181 === void 0 ? void 0 : _181.oilProducts) === null || _182 === void 0 ? void 0 : _182.normalRate20) === null || _183 === void 0 ? void 0 : _183.base) !== null && _184 !== void 0 ? _184 : 0) * 0.02),
|
|
213
213
|
},
|
|
214
214
|
reduceRate13: {
|
|
215
|
-
base: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
216
|
-
tax: isNil || isHolidayDeposit ? 0 : ((0, lodash_1.round)((
|
|
215
|
+
base: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_188 = (_187 = (_186 = (_185 = payload.vat) === null || _185 === void 0 ? void 0 : _185.oilProducts) === null || _186 === void 0 ? void 0 : _186.reduceRate13) === null || _187 === void 0 ? void 0 : _187.base) !== null && _188 !== void 0 ? _188 : 0),
|
|
216
|
+
tax: isNil || isHolidayDeposit ? 0 : ((0, lodash_1.round)((_192 = (_191 = (_190 = (_189 = payload.vat) === null || _189 === void 0 ? void 0 : _189.oilProducts) === null || _190 === void 0 ? void 0 : _190.reduceRate13) === null || _191 === void 0 ? void 0 : _191.base) !== null && _192 !== void 0 ? _192 : 0) * 0.013),
|
|
217
217
|
},
|
|
218
218
|
},
|
|
219
219
|
importations: {
|
|
@@ -243,34 +243,34 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
243
243
|
},
|
|
244
244
|
},
|
|
245
245
|
previouslyDeductedToBeReturned: {
|
|
246
|
-
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
247
|
-
otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
248
|
-
total: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
246
|
+
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_195 = (_194 = (_193 = payload.vat) === null || _193 === void 0 ? void 0 : _193.previouslyDeductedToBeReturned) === null || _194 === void 0 ? void 0 : _194.onOilProducts) !== null && _195 !== void 0 ? _195 : 0),
|
|
247
|
+
otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_198 = (_197 = (_196 = payload.vat) === null || _196 === void 0 ? void 0 : _196.previouslyDeductedToBeReturned) === null || _197 === void 0 ? void 0 : _197.otherThanOilProducts) !== null && _198 !== void 0 ? _198 : 0),
|
|
248
|
+
total: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_201 = (_200 = (_199 = payload.vat) === null || _199 === void 0 ? void 0 : _199.previouslyDeductedToBeReturned) === null || _200 === void 0 ? void 0 : _200.total) !== null && _201 !== void 0 ? _201 : 0),
|
|
249
249
|
},
|
|
250
250
|
sumToAdd,
|
|
251
251
|
grossDue: 0,
|
|
252
252
|
onIntracommunityAcquisition: isNil || isHolidayDeposit ? 0 : intracommunityTax,
|
|
253
|
-
toMonaco: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
253
|
+
toMonaco: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_203 = (_202 = payload.vat) === null || _202 === void 0 ? void 0 : _202.toMonaco) !== null && _203 !== void 0 ? _203 : 0),
|
|
254
254
|
deductible: {
|
|
255
255
|
immobilizations: isNil || isHolidayDeposit ? 0 : (immobilizationTax !== null && immobilizationTax !== void 0 ? immobilizationTax : 0),
|
|
256
256
|
otherGoodsAndServices: isNil || isHolidayDeposit ? 0 : (otherGoodsAndServices !== null && otherGoodsAndServices !== void 0 ? otherGoodsAndServices : 0),
|
|
257
257
|
other: {
|
|
258
|
-
oil: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
258
|
+
oil: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_207 = (_206 = (_205 = (_204 = payload.vat) === null || _204 === void 0 ? void 0 : _204.deductible) === null || _205 === void 0 ? void 0 : _205.other) === null || _206 === void 0 ? void 0 : _206.oil) !== null && _207 !== void 0 ? _207 : 0),
|
|
259
259
|
thanOilProducts: 0,
|
|
260
260
|
collected: 0,
|
|
261
261
|
total: isNil || isHolidayDeposit ? 0 : otherDeductibles,
|
|
262
262
|
},
|
|
263
263
|
report,
|
|
264
|
-
toImpute: isNil || isHolidayDeposit ? 0 : ((0, lodash_1.round)((
|
|
264
|
+
toImpute: isNil || isHolidayDeposit ? 0 : ((0, lodash_1.round)((_210 = (_209 = (_208 = payload.vat) === null || _208 === void 0 ? void 0 : _208.deductible) === null || _209 === void 0 ? void 0 : _209.toImpute) !== null && _210 !== void 0 ? _210 : 0) + mxToSub) + ((_213 = (_212 = (_211 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _211 === void 0 ? void 0 : _211.deducted) === null || _212 === void 0 ? void 0 : _212.case2C) !== null && _213 !== void 0 ? _213 : 0),
|
|
265
265
|
total: 0,
|
|
266
266
|
onImportOtherThanOilProducts: isNil || isHolidayDeposit ? 0 : otherDeductibles,
|
|
267
267
|
coefficient: isNil || isHolidayDeposit ? 100 : coefficient,
|
|
268
|
-
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
268
|
+
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_216 = (_215 = (_214 = payload.vat) === null || _214 === void 0 ? void 0 : _214.deductible) === null || _215 === void 0 ? void 0 : _215.onOilProducts) !== null && _216 !== void 0 ? _216 : 0),
|
|
269
269
|
},
|
|
270
270
|
otherRate: {
|
|
271
271
|
oldRate: {
|
|
272
|
-
base: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
273
|
-
tax: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
272
|
+
base: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_220 = (_219 = (_218 = (_217 = payload.vat) === null || _217 === void 0 ? void 0 : _217.otherRate) === null || _218 === void 0 ? void 0 : _218.oldRate) === null || _219 === void 0 ? void 0 : _219.base) !== null && _220 !== void 0 ? _220 : 0),
|
|
273
|
+
tax: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_224 = (_223 = (_222 = (_221 = payload.vat) === null || _221 === void 0 ? void 0 : _221.otherRate) === null || _222 === void 0 ? void 0 : _222.oldRate) === null || _223 === void 0 ? void 0 : _223.tax) !== null && _224 !== void 0 ? _224 : 0),
|
|
274
274
|
},
|
|
275
275
|
at1Dot75: {
|
|
276
276
|
base: 0,
|
|
@@ -304,16 +304,16 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
304
304
|
},
|
|
305
305
|
credit: {
|
|
306
306
|
amount: 0,
|
|
307
|
-
refundAsked: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
308
|
-
transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
309
|
-
assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
307
|
+
refundAsked: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_226 = (_225 = payload.credit) === null || _225 === void 0 ? void 0 : _225.refundAsked) !== null && _226 !== void 0 ? _226 : 0) + ((_228 = (_227 = payload === null || payload === void 0 ? void 0 : payload.vatControl) === null || _227 === void 0 ? void 0 : _227.refundAsked) !== null && _228 !== void 0 ? _228 : 0),
|
|
308
|
+
transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_230 = (_229 = payload.credit) === null || _229 === void 0 ? void 0 : _229.transferedToSocietyHeadOfGroup) !== null && _230 !== void 0 ? _230 : 0),
|
|
309
|
+
assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_232 = (_231 = payload.credit) === null || _231 === void 0 ? void 0 : _231.assimiledTaxes) !== null && _232 !== void 0 ? _232 : 0),
|
|
310
310
|
toReport: 0,
|
|
311
311
|
ticRefund: 0,
|
|
312
312
|
ticTransfered: 0,
|
|
313
313
|
},
|
|
314
314
|
toPay: {
|
|
315
315
|
netDue: 0,
|
|
316
|
-
acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((
|
|
316
|
+
acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, lodash_1.round)((_234 = (_233 = payload.toPay) === null || _233 === void 0 ? void 0 : _233.acquittedBySocietyHeadOfGroup) !== null && _234 !== void 0 ? _234 : 0),
|
|
317
317
|
total: 0,
|
|
318
318
|
},
|
|
319
319
|
tic: {
|
|
@@ -348,7 +348,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
348
348
|
initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
|
|
349
349
|
initialPayload.toPay.netDue = initialPayload.vat.grossDue - initialPayload.vat.deductible.total > 0 ? initialPayload.vat.grossDue - initialPayload.vat.deductible.total : 0;
|
|
350
350
|
initialPayload.credit.toReport = initialPayload.credit.amount - initialPayload.credit.refundAsked - initialPayload.credit.transferedToSocietyHeadOfGroup;
|
|
351
|
-
initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((
|
|
351
|
+
initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((_237 = (_236 = (_235 = initialPayload.tic) === null || _235 === void 0 ? void 0 : _235.total) === null || _236 === void 0 ? void 0 : _236.tax) !== null && _237 !== void 0 ? _237 : 0) - initialPayload.toPay.acquittedBySocietyHeadOfGroup;
|
|
352
352
|
return initialPayload;
|
|
353
353
|
}
|
|
354
354
|
exports.getCerfa3310Century23Payload = getCerfa3310Century23Payload;
|