@silexpert/core 1.1.28 → 1.1.29
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/types/Enum/AdjustmentType.d.ts +4 -0
- package/es/types/Enum/AdjustmentType.d.ts.map +1 -1
- package/es/types/Enum/AdjustmentType.js +4 -0
- package/es/types/Enum/AdjustmentType.js.map +1 -1
- package/es/types/Interface/api/cerfa/3310.d.ts +4 -0
- package/es/types/Interface/api/cerfa/3310.d.ts.map +1 -1
- package/es/types/Interface/api/cerfa/3310.js.map +1 -1
- package/es/utils/vat/3310/century23.js +43 -43
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/es/utils/vat/3517/century23.js +3 -3
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/es/utils/vat/utils.d.ts +1 -1
- package/es/utils/vat/utils.d.ts.map +1 -1
- package/es/utils/vat/utils.js +3 -3
- package/es/utils/vat/utils.js.map +1 -1
- package/js/types/Enum/AdjustmentType.js +7 -0
- package/js/types/Enum/AdjustmentType.js.map +1 -1
- package/js/types/Interface/api/cerfa/3310.js.map +1 -1
- package/js/utils/vat/3310/century23.js +43 -43
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/js/utils/vat/3517/century23.js +3 -3
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/js/utils/vat/utils.js +3 -3
- package/js/utils/vat/utils.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/AdjustmentType.ts +5 -0
- package/ts/types/Interface/api/cerfa/3310.ts +4 -0
- package/ts/utils/vat/3310/century23.ts +2 -2
- package/ts/utils/vat/3517/century23.ts +3 -3
- package/ts/utils/vat/utils.ts +3 -3
package/es/utils/vat/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';
|
|
2
|
-
export declare function getAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision?: number,
|
|
2
|
+
export declare function getAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision?: number, isAbs?: boolean): number;
|
|
3
3
|
export declare function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision?: number): number;
|
|
4
4
|
export declare function textFormatting(value: any, length?: number | null): string | null;
|
|
5
5
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,KAAK,UAAQ,GAAG,MAAM,CAc9I;AAED,wBAAgB,2BAA2B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,GAAG,MAAM,CAalI;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,GAAG,IAAI,CActF"}
|
package/es/utils/vat/utils.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { round as _round, uniqBy as _uniqBy } from 'lodash';
|
|
2
2
|
import { Vat } from '../../types/Enum/Vat';
|
|
3
|
-
export function getAmountByAccountNumber(accountingEntries, accountsNumber, precision = 0,
|
|
3
|
+
export function getAmountByAccountNumber(accountingEntries, accountsNumber, precision = 0, isAbs = false) {
|
|
4
4
|
const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');
|
|
5
5
|
const result = _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {
|
|
6
6
|
let accTmp = acc;
|
|
7
7
|
accountsNumber.some((number) => {
|
|
8
8
|
if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {
|
|
9
|
-
accTmp +=
|
|
9
|
+
accTmp += accountingEntry.debit - accountingEntry.credit;
|
|
10
10
|
return true;
|
|
11
11
|
}
|
|
12
12
|
return false;
|
|
13
13
|
});
|
|
14
14
|
return accTmp;
|
|
15
15
|
}, 0), precision);
|
|
16
|
-
return result;
|
|
16
|
+
return isAbs ? Math.abs(result) : result;
|
|
17
17
|
}
|
|
18
18
|
export function getTaxAmountByAccountNumber(accountingEntries, accountsNumber, precision = 0) {
|
|
19
19
|
const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,UAAU,wBAAwB,CAAC,iBAAqC,EAAE,cAAwB,EAAE,SAAS,GAAG,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"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","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, isAbs = false): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0), precision);\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n accTmp += ((accountingEntry.debit - accountingEntry.credit) * (((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100)));\n return true;\n }\n return false;\n });\n return accTmp;\n }, precision));\n}\n\nexport function textFormatting(value: any, length: number | null = null): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n if (length) formattedValue = formattedValue.slice(0, length);\n return formattedValue;\n }\n return null;\n}"]}
|
|
@@ -35,4 +35,11 @@ const AdjustmentTypeList = exports.AdjustmentTypeList = [{
|
|
|
35
35
|
key: 'vat.deductible.toImpute',
|
|
36
36
|
inputKey: 'adjustment.notEnoughDeducted'
|
|
37
37
|
}];
|
|
38
|
+
const VatDeclarationMxAdjustment = exports.VatDeclarationMxAdjustment = [{
|
|
39
|
+
key: 'mx.collected',
|
|
40
|
+
label: 'Opérations modifiées M-X (collecté)'
|
|
41
|
+
}, {
|
|
42
|
+
key: 'mx.deducted',
|
|
43
|
+
label: 'Opérations modifiées M-X (déductible)'
|
|
44
|
+
}];
|
|
38
45
|
//# sourceMappingURL=AdjustmentType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdjustmentType.js","names":["AdjustmentTypeId","exports","undefined","AdjustmentTypeList","id","TOO_MUCH_COLLECTED","label","centuries","key","inputKey","NOT_ENOUGH_COLLECTED","TOO_MUCH_DEDUCTED","NOT_ENOUGH_DEDUCTED"],"sources":["../../../ts/types/Enum/AdjustmentType.ts"],"sourcesContent":["export enum AdjustmentTypeId {\n TOO_MUCH_COLLECTED = 1,\n NOT_ENOUGH_COLLECTED = 2,\n TOO_MUCH_DEDUCTED = 3,\n NOT_ENOUGH_DEDUCTED = 4,\n}\n\nexport const AdjustmentTypeList: Array<{ id:AdjustmentTypeId; label: string; centuries: number[], key: string; inputKey: string; }> = [\n {\n id: AdjustmentTypeId.TOO_MUCH_COLLECTED,\n label: 'TVA trop collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.tooMuchCollected',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_COLLECTED,\n label: 'TVA pas assez collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.notEnoughCollected',\n },\n {\n id: AdjustmentTypeId.TOO_MUCH_DEDUCTED,\n label: 'TVA trop déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.tooMuchDeducted',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_DEDUCTED,\n label: 'TVA pas assez déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.notEnoughDeducted',\n },\n];"],"mappings":";;;;;AAAA,IAAYA,gBAKX,GAAAC,OAAA,CALWD,gBAKX,GAAAE,SAAA;AALD,WAAYF,gBAAgB;EAC1BA,gBAAA,CAAAA,gBAAA,kDAAsB;EACtBA,gBAAA,CAAAA,gBAAA,sDAAwB;EACxBA,gBAAA,CAAAA,gBAAA,gDAAqB;EACrBA,gBAAA,CAAAA,gBAAA,oDAAuB;AACzB,CAAC,EALWA,gBAAgB,KAAAC,OAAA,CAAhBD,gBAKX,GALWA,gBAAgB;AAOrB,MAAMG,kBAAkB,GAAAF,OAAA,CAAlBE,kBAAkB,GAAuG,CACpI;EACEC,EAAE,EAAEJ,gBAAgB,CAACK,kBAAkB;EACvCC,KAAK,EAAE,oBAAoB;EAC3BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACU,oBAAoB;EACzCJ,KAAK,EAAE,yBAAyB;EAChCC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACW,iBAAiB;EACtCL,KAAK,EAAE,kBAAkB;EACzBC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACY,mBAAmB;EACxCN,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,CACF"}
|
|
1
|
+
{"version":3,"file":"AdjustmentType.js","names":["AdjustmentTypeId","exports","undefined","AdjustmentTypeList","id","TOO_MUCH_COLLECTED","label","centuries","key","inputKey","NOT_ENOUGH_COLLECTED","TOO_MUCH_DEDUCTED","NOT_ENOUGH_DEDUCTED","VatDeclarationMxAdjustment"],"sources":["../../../ts/types/Enum/AdjustmentType.ts"],"sourcesContent":["export enum AdjustmentTypeId {\n TOO_MUCH_COLLECTED = 1,\n NOT_ENOUGH_COLLECTED = 2,\n TOO_MUCH_DEDUCTED = 3,\n NOT_ENOUGH_DEDUCTED = 4,\n}\n\nexport const AdjustmentTypeList: Array<{ id:AdjustmentTypeId; label: string; centuries: number[], key: string; inputKey: string; }> = [\n {\n id: AdjustmentTypeId.TOO_MUCH_COLLECTED,\n label: 'TVA trop collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.tooMuchCollected',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_COLLECTED,\n label: 'TVA pas assez collectée',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.notEnoughCollected',\n },\n {\n id: AdjustmentTypeId.TOO_MUCH_DEDUCTED,\n label: 'TVA trop déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.sumToAdd',\n inputKey: 'adjustment.tooMuchDeducted',\n },\n {\n id: AdjustmentTypeId.NOT_ENOUGH_DEDUCTED,\n label: 'TVA pas assez déduite',\n centuries: [2022, 2023, 2024, 2025],\n key: 'vat.deductible.toImpute',\n inputKey: 'adjustment.notEnoughDeducted',\n },\n];\n\nexport const VatDeclarationMxAdjustment: Array<{ key: string; label: string; }> = [\n { key: 'mx.collected', label: 'Opérations modifiées M-X (collecté)' },\n { key: 'mx.deducted', label: 'Opérations modifiées M-X (déductible)' },\n];"],"mappings":";;;;;AAAA,IAAYA,gBAKX,GAAAC,OAAA,CALWD,gBAKX,GAAAE,SAAA;AALD,WAAYF,gBAAgB;EAC1BA,gBAAA,CAAAA,gBAAA,kDAAsB;EACtBA,gBAAA,CAAAA,gBAAA,sDAAwB;EACxBA,gBAAA,CAAAA,gBAAA,gDAAqB;EACrBA,gBAAA,CAAAA,gBAAA,oDAAuB;AACzB,CAAC,EALWA,gBAAgB,KAAAC,OAAA,CAAhBD,gBAKX,GALWA,gBAAgB;AAOrB,MAAMG,kBAAkB,GAAAF,OAAA,CAAlBE,kBAAkB,GAAuG,CACpI;EACEC,EAAE,EAAEJ,gBAAgB,CAACK,kBAAkB;EACvCC,KAAK,EAAE,oBAAoB;EAC3BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACU,oBAAoB;EACzCJ,KAAK,EAAE,yBAAyB;EAChCC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACW,iBAAiB;EACtCL,KAAK,EAAE,kBAAkB;EACzBC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,cAAc;EACnBC,QAAQ,EAAE;CACX,EACD;EACEL,EAAE,EAAEJ,gBAAgB,CAACY,mBAAmB;EACxCN,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,GAAG,EAAE,yBAAyB;EAC9BC,QAAQ,EAAE;CACX,CACF;AAEM,MAAMI,0BAA0B,GAAAZ,OAAA,CAA1BY,0BAA0B,GAA2C,CAChF;EAAEL,GAAG,EAAE,cAAc;EAAEF,KAAK,EAAE;AAAqC,CAAE,EACrE;EAAEE,GAAG,EAAE,aAAa;EAAEF,KAAK,EAAE;AAAuC,CAAE,CACvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3310.js","names":[],"sources":["../../../../../ts/types/Interface/api/cerfa/3310.ts"],"sourcesContent":["import { ISociety } from '../../models/ISociety';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { ServiceOfTax } from '../tax/ReadTax';\n\ntype BaseAndTax = {\n base: number;\n tax: number;\n};\n\ntype Tic = {\n credit?: number;\n refund?: number;\n imputed?: number;\n tax?: number;\n};\n\nexport interface Cerfa3310_2023 {\n declaration: {\n recipient: {\n name: string | null;\n address: {\n full: string;\n }\n numbers: {\n SIE: string | null;\n folder: string | null;\n key: string | null;\n period: string | null;\n CM: string | null;\n OPT: string | null;\n service: string | null;\n system: string | null;\n }\n }\n period: {\n start: {\n day: string;\n month: string;\n year: string;\n },\n end: {\n day: string;\n month: string;\n year: string;\n }\n },\n service: {\n address: {\n full: string | null;\n }\n },\n siret: {\n first: string | null;\n second: string | null;\n },\n intracommunityVat: {\n first: string | null;\n second: string | null;\n third: string | null;\n },\n comment: string | null;\n payment: {\n date: string | null;\n phone: string | null;\n isPayment: boolean;\n byImputation: boolean;\n }\n },\n isNil: boolean;\n untaxedOperations: {\n exportationNotInEurope: number;\n other: number;\n distanceSelling: number;\n import: number;\n withdrawSuspensiveRegime: number;\n importInSuspensiveSystem: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery: number;\n oilProductsConsumption: number;\n importPetrolInSuspensiveSystem: number;\n purchaseInFranchise: number;\n saleOfServicesNotInFrance: number;\n regularizations: number;\n internalUniq: number;\n },\n taxedOperations: {\n services: number;\n other: number;\n purchaseOfIntracommunityServiceProvision: number;\n import: number;\n withdrawSuspensiveRegime: number;\n releaseFromConsumption: number;\n intracommunityAcquisitions: number;\n energyDelivery: number;\n purchaseOfServicesNotInFrance: number;\n regularizations: number;\n },\n vat: {\n carrieredOutInFrance: {\n normalRate20: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate10: BaseAndTax,\n },\n overseasDepartment: {\n reduceRate8Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax\n },\n oilProducts: {\n normalRate20: BaseAndTax,\n reduceRate13: BaseAndTax\n },\n importations: {\n normalRate20: BaseAndTax,\n reduceRate10: BaseAndTax,\n reduceRate8Dot5: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax,\n reduceRate1Dot05: BaseAndTax,\n },\n previouslyDeductedToBeReturned: {\n onOilProducts: number;\n otherThanOilProducts: number;\n total: number;\n },\n sumToAdd: number;\n grossDue: number;\n onIntracommunityAcquisition: number;\n toMonaco: number;\n deductible: {\n other: {\n oil: number;\n thanOilProducts: number;\n collected: number;\n total: number;\n }\n immobilizations: number;\n otherGoodsAndServices: number;\n report: number;\n toImpute: number;\n total: number;\n onImportOtherThanOilProducts: number;\n coefficient: number;\n onOilProducts: number;\n },\n otherRate: {\n oldRate: BaseAndTax,\n at1Dot75: BaseAndTax,\n at1Dot05: BaseAndTax,\n at10: BaseAndTax,\n atCorse2Dot1: BaseAndTax,\n atCorse0Dot9: BaseAndTax,\n at2Dot1: BaseAndTax,\n author: BaseAndTax,\n }\n },\n credit: {\n amount: number;\n refundAsked: number;\n transferedToSocietyHeadOfGroup: number;\n assimiledTaxes: number;\n toReport: number;\n ticRefund: number;\n ticTransfered: number;\n },\n toPay: {\n netDue: number;\n acquittedBySocietyHeadOfGroup: number;\n total: number;\n },\n isDGE: boolean;\n isUniq: boolean;\n tic?: {\n ticfe?: Tic,\n ticgn?: Tic,\n ticc?: Tic,\n total?: Tic,\n }\n}\n\nexport type PayloadCerfa3310_2023 = {\n isHolidayDeposit: boolean;\n startDate: string;\n endDate: string;\n society: ISociety;\n setting: ISocietyGescom | null;\n isNil: boolean;\n previousVatDeclaration: Cerfa3310_2023 | null;\n sie: ServiceOfTax | null;\n comment?: string;\n taxedOperations?: {\n withdrawSuspensiveRegime?: number;\n releaseFromConsumption?: number;\n energyDelivery?: number;\n purchaseOfServicesNotInFrance?: number;\n regularizations?: number;\n };\n untaxedOperations?: {\n distanceSelling?: number;\n withdrawSuspensiveRegime?: number;\n importInSuspensiveSystem?: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery?: number;\n oilProductsConsumption?: number;\n importPetrolInSuspensiveSystem?: number;\n purchaseInFranchise?: number;\n saleOfServicesNotInFrance?: number;\n regularizations?: number;\n internalUniq?: number;\n },\n vat?: {\n oilProducts?: {\n normalRate20?: { base?: number }\n reduceRate13?: { base?: number }\n },\n previouslyDeductedToBeReturned?: {\n onOilProducts?: number;\n otherThanOilProducts?: number;\n total?: number;\n },\n toMonaco?: number;\n deductible?: {\n other?: {\n oil?: number;\n },\n toImpute?: number;\n onOilProducts?: number;\n coefficient?: number;\n },\n otherRate?: {\n oldRate?: {\n tax?: number;\n base?: number;\n },\n },\n sumToAdd?: number;\n },\n credit?: {\n transferedToSocietyHeadOfGroup?: number;\n assimiledTaxes?: number;\n refundAsked?: number;\n },\n toPay?: {\n acquittedBySocietyHeadOfGroup?: number;\n },\n};"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"3310.js","names":[],"sources":["../../../../../ts/types/Interface/api/cerfa/3310.ts"],"sourcesContent":["import { ISociety } from '../../models/ISociety';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { ServiceOfTax } from '../tax/ReadTax';\n\ntype BaseAndTax = {\n base: number;\n tax: number;\n};\n\ntype Tic = {\n credit?: number;\n refund?: number;\n imputed?: number;\n tax?: number;\n};\n\nexport interface Cerfa3310_2023 {\n declaration: {\n recipient: {\n name: string | null;\n address: {\n full: string;\n }\n numbers: {\n SIE: string | null;\n folder: string | null;\n key: string | null;\n period: string | null;\n CM: string | null;\n OPT: string | null;\n service: string | null;\n system: string | null;\n }\n }\n period: {\n start: {\n day: string;\n month: string;\n year: string;\n },\n end: {\n day: string;\n month: string;\n year: string;\n }\n },\n service: {\n address: {\n full: string | null;\n }\n },\n siret: {\n first: string | null;\n second: string | null;\n },\n intracommunityVat: {\n first: string | null;\n second: string | null;\n third: string | null;\n },\n comment: string | null;\n payment: {\n date: string | null;\n phone: string | null;\n isPayment: boolean;\n byImputation: boolean;\n }\n },\n isNil: boolean;\n untaxedOperations: {\n exportationNotInEurope: number;\n other: number;\n distanceSelling: number;\n import: number;\n withdrawSuspensiveRegime: number;\n importInSuspensiveSystem: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery: number;\n oilProductsConsumption: number;\n importPetrolInSuspensiveSystem: number;\n purchaseInFranchise: number;\n saleOfServicesNotInFrance: number;\n regularizations: number;\n internalUniq: number;\n },\n taxedOperations: {\n services: number;\n other: number;\n purchaseOfIntracommunityServiceProvision: number;\n import: number;\n withdrawSuspensiveRegime: number;\n releaseFromConsumption: number;\n intracommunityAcquisitions: number;\n energyDelivery: number;\n purchaseOfServicesNotInFrance: number;\n regularizations: number;\n },\n vat: {\n carrieredOutInFrance: {\n normalRate20: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate10: BaseAndTax,\n },\n overseasDepartment: {\n reduceRate8Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax\n },\n oilProducts: {\n normalRate20: BaseAndTax,\n reduceRate13: BaseAndTax\n },\n importations: {\n normalRate20: BaseAndTax,\n reduceRate10: BaseAndTax,\n reduceRate8Dot5: BaseAndTax,\n reduceRate5Dot5: BaseAndTax,\n reduceRate2Dot1: BaseAndTax,\n reduceRate1Dot05: BaseAndTax,\n },\n previouslyDeductedToBeReturned: {\n onOilProducts: number;\n otherThanOilProducts: number;\n total: number;\n },\n sumToAdd: number;\n grossDue: number;\n onIntracommunityAcquisition: number;\n toMonaco: number;\n deductible: {\n other: {\n oil: number;\n thanOilProducts: number;\n collected: number;\n total: number;\n }\n immobilizations: number;\n otherGoodsAndServices: number;\n report: number;\n toImpute: number;\n total: number;\n onImportOtherThanOilProducts: number;\n coefficient: number;\n onOilProducts: number;\n },\n otherRate: {\n oldRate: BaseAndTax,\n at1Dot75: BaseAndTax,\n at1Dot05: BaseAndTax,\n at10: BaseAndTax,\n atCorse2Dot1: BaseAndTax,\n atCorse0Dot9: BaseAndTax,\n at2Dot1: BaseAndTax,\n author: BaseAndTax,\n }\n },\n credit: {\n amount: number;\n refundAsked: number;\n transferedToSocietyHeadOfGroup: number;\n assimiledTaxes: number;\n toReport: number;\n ticRefund: number;\n ticTransfered: number;\n },\n toPay: {\n netDue: number;\n acquittedBySocietyHeadOfGroup: number;\n total: number;\n },\n isDGE: boolean;\n isUniq: boolean;\n tic?: {\n ticfe?: Tic,\n ticgn?: Tic,\n ticc?: Tic,\n total?: Tic,\n }\n}\n\nexport type PayloadCerfa3310_2023 = {\n isHolidayDeposit: boolean;\n startDate: string;\n endDate: string;\n society: ISociety;\n setting: ISocietyGescom | null;\n isNil: boolean;\n previousVatDeclaration: Cerfa3310_2023 | null;\n sie: ServiceOfTax | null;\n mx: {\n collected: number;\n deducted: number;\n };\n comment?: string;\n taxedOperations?: {\n withdrawSuspensiveRegime?: number;\n releaseFromConsumption?: number;\n energyDelivery?: number;\n purchaseOfServicesNotInFrance?: number;\n regularizations?: number;\n };\n untaxedOperations?: {\n distanceSelling?: number;\n withdrawSuspensiveRegime?: number;\n importInSuspensiveSystem?: number;\n intracommunityAcquisitions: number;\n intracommunityDelivery: number;\n energyDelivery?: number;\n oilProductsConsumption?: number;\n importPetrolInSuspensiveSystem?: number;\n purchaseInFranchise?: number;\n saleOfServicesNotInFrance?: number;\n regularizations?: number;\n internalUniq?: number;\n },\n vat?: {\n oilProducts?: {\n normalRate20?: { base?: number }\n reduceRate13?: { base?: number }\n },\n previouslyDeductedToBeReturned?: {\n onOilProducts?: number;\n otherThanOilProducts?: number;\n total?: number;\n },\n toMonaco?: number;\n deductible?: {\n other?: {\n oil?: number;\n },\n toImpute?: number;\n onOilProducts?: number;\n coefficient?: number;\n },\n otherRate?: {\n oldRate?: {\n tax?: number;\n base?: number;\n },\n },\n sumToAdd?: number;\n },\n credit?: {\n transferedToSocietyHeadOfGroup?: number;\n assimiledTaxes?: number;\n refundAsked?: number;\n },\n toPay?: {\n acquittedBySocietyHeadOfGroup?: number;\n },\n};"],"mappings":""}
|
|
@@ -15,7 +15,7 @@ var _utils = require("../utils");
|
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
18
|
-
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;
|
|
18
|
+
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;
|
|
19
19
|
const shouldHaveVatCode = (0, _classValidator.isDefined)((_a = payload.setting) === null || _a === void 0 ? void 0 : _a.tvaCode) && (0, _classValidator.isDefined)(payload.society.siret);
|
|
20
20
|
const vats = Object.values(_Vat.Vat);
|
|
21
21
|
const frenchVat = vats.filter(v => !v.isVatImportation && !v.isVatIntracom).map(v => v.id);
|
|
@@ -74,8 +74,8 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
74
74
|
const coefficient = (0, _lodash.round)((_g = (_f = (_e = payload.vat) === null || _e === void 0 ? void 0 : _e.deductible) === null || _f === void 0 ? void 0 : _f.coefficient) !== null && _g !== void 0 ? _g : 100, 2);
|
|
75
75
|
const isNil = payload.isNil === true;
|
|
76
76
|
const isHolidayDeposit = payload.isHolidayDeposit === true;
|
|
77
|
-
const sumToAdd = isNil ? 0 : isHolidayDeposit ? (0, _lodash.round)(((_k = (_j = (_h = payload.previousVatDeclaration) === null || _h === void 0 ? void 0 : _h.toPay) === null || _j === void 0 ? void 0 : _j.total) !== null && _k !== void 0 ? _k : 0) * 0.8, 2) : (0, _lodash.round)((_m = (_l = payload.vat) === null || _l === void 0 ? void 0 : _l.sumToAdd) !== null && _m !== void 0 ? _m : 0);
|
|
78
|
-
const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(
|
|
77
|
+
const sumToAdd = isNil ? 0 : isHolidayDeposit ? (0, _lodash.round)(((_k = (_j = (_h = payload.previousVatDeclaration) === null || _h === void 0 ? void 0 : _h.toPay) === null || _j === void 0 ? void 0 : _j.total) !== null && _k !== void 0 ? _k : 0) * 0.8, 2) : (0, _lodash.round)((_m = (_l = payload.vat) === null || _l === void 0 ? void 0 : _l.sumToAdd) !== null && _m !== void 0 ? _m : 0) + (0, _lodash.round)((_p = (_o = payload.mx) === null || _o === void 0 ? void 0 : _o.collected) !== null && _p !== void 0 ? _p : 0);
|
|
78
|
+
const comment = isHolidayDeposit ? `ACOMPTE CONGES ${(_q = payload.comment) !== null && _q !== void 0 ? _q : ''}` : (_r = payload.comment) !== null && _r !== void 0 ? _r : null;
|
|
79
79
|
const initialPayload = {
|
|
80
80
|
isNil,
|
|
81
81
|
isDGE: false,
|
|
@@ -88,7 +88,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
88
88
|
full: `${payload.society.address}\n${payload.society.zipCode} ${payload.society.city}`
|
|
89
89
|
},
|
|
90
90
|
numbers: {
|
|
91
|
-
SIE: (
|
|
91
|
+
SIE: (_t = (_s = payload.sie) === null || _s === void 0 ? void 0 : _s.sages) !== null && _t !== void 0 ? _t : null,
|
|
92
92
|
folder: null,
|
|
93
93
|
key: null,
|
|
94
94
|
period: null,
|
|
@@ -100,7 +100,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
100
100
|
},
|
|
101
101
|
service: {
|
|
102
102
|
address: {
|
|
103
|
-
full: (0, _classValidator.isDefined)((
|
|
103
|
+
full: (0, _classValidator.isDefined)((_v = (_u = payload.sie) === null || _u === void 0 ? void 0 : _u.address) === null || _v === void 0 ? void 0 : _v.address1) ? `${(_w = payload.sie) === null || _w === void 0 ? void 0 : _w.address.address1}\n${(_x = payload.sie) === null || _x === void 0 ? void 0 : _x.address.address2}\n${(_y = payload.sie) === null || _y === void 0 ? void 0 : _y.address.address3}\n${(_z = payload.sie) === null || _z === void 0 ? void 0 : _z.address.address4}\n${(_0 = payload.sie) === null || _0 === void 0 ? void 0 : _0.address.address5}` : null
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
period: {
|
|
@@ -116,13 +116,13 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
siret: {
|
|
119
|
-
first: (0, _classValidator.isDefined)(payload.society.siret) ? (
|
|
120
|
-
second: (0, _classValidator.isDefined)(payload.society.siret) ? (
|
|
119
|
+
first: (0, _classValidator.isDefined)(payload.society.siret) ? (_2 = (_1 = payload.society.siret) === null || _1 === void 0 ? void 0 : _1.slice(0, 9)) !== null && _2 !== void 0 ? _2 : null : null,
|
|
120
|
+
second: (0, _classValidator.isDefined)(payload.society.siret) ? (_4 = (_3 = payload.society.siret) === null || _3 === void 0 ? void 0 : _3.slice(5)) !== null && _4 !== void 0 ? _4 : null : null
|
|
121
121
|
},
|
|
122
122
|
intracommunityVat: {
|
|
123
|
-
first: shouldHaveVatCode ? (
|
|
124
|
-
second: shouldHaveVatCode ? (
|
|
125
|
-
third: shouldHaveVatCode ? (
|
|
123
|
+
first: shouldHaveVatCode ? (_7 = (_6 = (_5 = payload.setting) === null || _5 === void 0 ? void 0 : _5.tvaCode) === null || _6 === void 0 ? void 0 : _6.slice(0, 2)) !== null && _7 !== void 0 ? _7 : null : null,
|
|
124
|
+
second: shouldHaveVatCode ? (_10 = (_9 = (_8 = payload.setting) === null || _8 === void 0 ? void 0 : _8.tvaCode) === null || _9 === void 0 ? void 0 : _9.slice(2, 4)) !== null && _10 !== void 0 ? _10 : null : null,
|
|
125
|
+
third: shouldHaveVatCode ? (_12 = (_11 = payload.society.siret) === null || _11 === void 0 ? void 0 : _11.slice(0, 9)) !== null && _12 !== void 0 ? _12 : null : null
|
|
126
126
|
},
|
|
127
127
|
payment: {
|
|
128
128
|
date: dayjs().format('YYYY-MM-DD'),
|
|
@@ -136,29 +136,29 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
136
136
|
other: isNil || isHolidayDeposit ? 0 : taxedOther,
|
|
137
137
|
purchaseOfIntracommunityServiceProvision: isNil || isHolidayDeposit ? 0 : taxedPurchaseOfIntracommunityService,
|
|
138
138
|
import: isNil || isHolidayDeposit ? 0 : taxedImport,
|
|
139
|
-
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
140
|
-
releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
139
|
+
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_14 = (_13 = payload.taxedOperations) === null || _13 === void 0 ? void 0 : _13.withdrawSuspensiveRegime) !== null && _14 !== void 0 ? _14 : 0),
|
|
140
|
+
releaseFromConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_16 = (_15 = payload.taxedOperations) === null || _15 === void 0 ? void 0 : _15.releaseFromConsumption) !== null && _16 !== void 0 ? _16 : 0),
|
|
141
141
|
intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : taxedIntracommunityAcquisitions,
|
|
142
|
-
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
143
|
-
purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
144
|
-
regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
142
|
+
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_18 = (_17 = payload.taxedOperations) === null || _17 === void 0 ? void 0 : _17.energyDelivery) !== null && _18 !== void 0 ? _18 : 0),
|
|
143
|
+
purchaseOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_20 = (_19 = payload.taxedOperations) === null || _19 === void 0 ? void 0 : _19.purchaseOfServicesNotInFrance) !== null && _20 !== void 0 ? _20 : 0),
|
|
144
|
+
regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_22 = (_21 = payload.taxedOperations) === null || _21 === void 0 ? void 0 : _21.regularizations) !== null && _22 !== void 0 ? _22 : 0)
|
|
145
145
|
},
|
|
146
146
|
untaxedOperations: {
|
|
147
147
|
exportationNotInEurope: isNil || isHolidayDeposit ? 0 : untaxedExportationNotInEurope,
|
|
148
148
|
other: isNil || isHolidayDeposit ? 0 : untaxedOther,
|
|
149
|
-
distanceSelling: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
149
|
+
distanceSelling: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_24 = (_23 = payload.untaxedOperations) === null || _23 === void 0 ? void 0 : _23.distanceSelling) !== null && _24 !== void 0 ? _24 : 0),
|
|
150
150
|
import: isNil || isHolidayDeposit ? 0 : untaxedImport,
|
|
151
|
-
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
152
|
-
importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
151
|
+
withdrawSuspensiveRegime: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_26 = (_25 = payload.untaxedOperations) === null || _25 === void 0 ? void 0 : _25.withdrawSuspensiveRegime) !== null && _26 !== void 0 ? _26 : 0),
|
|
152
|
+
importInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_28 = (_27 = payload.untaxedOperations) === null || _27 === void 0 ? void 0 : _27.importInSuspensiveSystem) !== null && _28 !== void 0 ? _28 : 0),
|
|
153
153
|
intracommunityAcquisitions: isNil || isHolidayDeposit ? 0 : untaxedIntracomunity,
|
|
154
154
|
intracommunityDelivery: isNil || isHolidayDeposit ? 0 : untaxedIntracommunityDelivery,
|
|
155
|
-
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
156
|
-
oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
157
|
-
importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
158
|
-
purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
159
|
-
saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
160
|
-
regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
161
|
-
internalUniq: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
155
|
+
energyDelivery: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_30 = (_29 = payload.untaxedOperations) === null || _29 === void 0 ? void 0 : _29.energyDelivery) !== null && _30 !== void 0 ? _30 : 0),
|
|
156
|
+
oilProductsConsumption: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_32 = (_31 = payload.untaxedOperations) === null || _31 === void 0 ? void 0 : _31.oilProductsConsumption) !== null && _32 !== void 0 ? _32 : 0),
|
|
157
|
+
importPetrolInSuspensiveSystem: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_34 = (_33 = payload.untaxedOperations) === null || _33 === void 0 ? void 0 : _33.importPetrolInSuspensiveSystem) !== null && _34 !== void 0 ? _34 : 0),
|
|
158
|
+
purchaseInFranchise: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_36 = (_35 = payload.untaxedOperations) === null || _35 === void 0 ? void 0 : _35.purchaseInFranchise) !== null && _36 !== void 0 ? _36 : 0),
|
|
159
|
+
saleOfServicesNotInFrance: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_38 = (_37 = payload.untaxedOperations) === null || _37 === void 0 ? void 0 : _37.saleOfServicesNotInFrance) !== null && _38 !== void 0 ? _38 : 0),
|
|
160
|
+
regularizations: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_40 = (_39 = payload.untaxedOperations) === null || _39 === void 0 ? void 0 : _39.regularizations) !== null && _40 !== void 0 ? _40 : 0),
|
|
161
|
+
internalUniq: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_42 = (_41 = payload.untaxedOperations) === null || _41 === void 0 ? void 0 : _41.internalUniq) !== null && _42 !== void 0 ? _42 : 0)
|
|
162
162
|
},
|
|
163
163
|
vat: {
|
|
164
164
|
carrieredOutInFrance: {
|
|
@@ -187,12 +187,12 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
187
187
|
},
|
|
188
188
|
oilProducts: {
|
|
189
189
|
normalRate20: {
|
|
190
|
-
base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
191
|
-
tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
190
|
+
base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_46 = (_45 = (_44 = (_43 = payload.vat) === null || _43 === void 0 ? void 0 : _43.oilProducts) === null || _44 === void 0 ? void 0 : _44.normalRate20) === null || _45 === void 0 ? void 0 : _45.base) !== null && _46 !== void 0 ? _46 : 0),
|
|
191
|
+
tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_50 = (_49 = (_48 = (_47 = payload.vat) === null || _47 === void 0 ? void 0 : _47.oilProducts) === null || _48 === void 0 ? void 0 : _48.normalRate20) === null || _49 === void 0 ? void 0 : _49.base) !== null && _50 !== void 0 ? _50 : 0) * 0.02
|
|
192
192
|
},
|
|
193
193
|
reduceRate13: {
|
|
194
|
-
base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
195
|
-
tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
194
|
+
base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_54 = (_53 = (_52 = (_51 = payload.vat) === null || _51 === void 0 ? void 0 : _51.oilProducts) === null || _52 === void 0 ? void 0 : _52.reduceRate13) === null || _53 === void 0 ? void 0 : _53.base) !== null && _54 !== void 0 ? _54 : 0),
|
|
195
|
+
tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_58 = (_57 = (_56 = (_55 = payload.vat) === null || _55 === void 0 ? void 0 : _55.oilProducts) === null || _56 === void 0 ? void 0 : _56.reduceRate13) === null || _57 === void 0 ? void 0 : _57.base) !== null && _58 !== void 0 ? _58 : 0) * 0.013
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
importations: {
|
|
@@ -222,34 +222,34 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
previouslyDeductedToBeReturned: {
|
|
225
|
-
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
226
|
-
otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
227
|
-
total: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
225
|
+
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_61 = (_60 = (_59 = payload.vat) === null || _59 === void 0 ? void 0 : _59.previouslyDeductedToBeReturned) === null || _60 === void 0 ? void 0 : _60.onOilProducts) !== null && _61 !== void 0 ? _61 : 0),
|
|
226
|
+
otherThanOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_64 = (_63 = (_62 = payload.vat) === null || _62 === void 0 ? void 0 : _62.previouslyDeductedToBeReturned) === null || _63 === void 0 ? void 0 : _63.otherThanOilProducts) !== null && _64 !== void 0 ? _64 : 0),
|
|
227
|
+
total: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_67 = (_66 = (_65 = payload.vat) === null || _65 === void 0 ? void 0 : _65.previouslyDeductedToBeReturned) === null || _66 === void 0 ? void 0 : _66.total) !== null && _67 !== void 0 ? _67 : 0)
|
|
228
228
|
},
|
|
229
229
|
sumToAdd,
|
|
230
230
|
grossDue: 0,
|
|
231
231
|
onIntracommunityAcquisition: isNil || isHolidayDeposit ? 0 : intracommunityTax,
|
|
232
|
-
toMonaco: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
232
|
+
toMonaco: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_69 = (_68 = payload.vat) === null || _68 === void 0 ? void 0 : _68.toMonaco) !== null && _69 !== void 0 ? _69 : 0),
|
|
233
233
|
deductible: {
|
|
234
234
|
immobilizations: isNil || isHolidayDeposit ? 0 : immobilizationTax !== null && immobilizationTax !== void 0 ? immobilizationTax : 0,
|
|
235
235
|
otherGoodsAndServices: isNil || isHolidayDeposit ? 0 : otherGoodsAndServices !== null && otherGoodsAndServices !== void 0 ? otherGoodsAndServices : 0,
|
|
236
236
|
other: {
|
|
237
|
-
oil: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
237
|
+
oil: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_73 = (_72 = (_71 = (_70 = payload.vat) === null || _70 === void 0 ? void 0 : _70.deductible) === null || _71 === void 0 ? void 0 : _71.other) === null || _72 === void 0 ? void 0 : _72.oil) !== null && _73 !== void 0 ? _73 : 0),
|
|
238
238
|
thanOilProducts: 0,
|
|
239
239
|
collected: 0,
|
|
240
240
|
total: isNil || isHolidayDeposit ? 0 : otherDeductibles
|
|
241
241
|
},
|
|
242
242
|
report,
|
|
243
|
-
toImpute: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
243
|
+
toImpute: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_76 = (_75 = (_74 = payload.vat) === null || _74 === void 0 ? void 0 : _74.deductible) === null || _75 === void 0 ? void 0 : _75.toImpute) !== null && _76 !== void 0 ? _76 : 0) + (0, _lodash.round)((_78 = (_77 = payload.mx) === null || _77 === void 0 ? void 0 : _77.deducted) !== null && _78 !== void 0 ? _78 : 0),
|
|
244
244
|
total: 0,
|
|
245
245
|
onImportOtherThanOilProducts: isNil || isHolidayDeposit ? 0 : otherDeductibles,
|
|
246
246
|
coefficient: isNil || isHolidayDeposit ? 100 : coefficient,
|
|
247
|
-
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
247
|
+
onOilProducts: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_81 = (_80 = (_79 = payload.vat) === null || _79 === void 0 ? void 0 : _79.deductible) === null || _80 === void 0 ? void 0 : _80.onOilProducts) !== null && _81 !== void 0 ? _81 : 0)
|
|
248
248
|
},
|
|
249
249
|
otherRate: {
|
|
250
250
|
oldRate: {
|
|
251
|
-
base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
252
|
-
tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
251
|
+
base: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_85 = (_84 = (_83 = (_82 = payload.vat) === null || _82 === void 0 ? void 0 : _82.otherRate) === null || _83 === void 0 ? void 0 : _83.oldRate) === null || _84 === void 0 ? void 0 : _84.base) !== null && _85 !== void 0 ? _85 : 0),
|
|
252
|
+
tax: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_89 = (_88 = (_87 = (_86 = payload.vat) === null || _86 === void 0 ? void 0 : _86.otherRate) === null || _87 === void 0 ? void 0 : _87.oldRate) === null || _88 === void 0 ? void 0 : _88.tax) !== null && _89 !== void 0 ? _89 : 0)
|
|
253
253
|
},
|
|
254
254
|
at1Dot75: {
|
|
255
255
|
base: 0,
|
|
@@ -283,16 +283,16 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
283
283
|
},
|
|
284
284
|
credit: {
|
|
285
285
|
amount: 0,
|
|
286
|
-
refundAsked: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
287
|
-
transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
288
|
-
assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
286
|
+
refundAsked: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_91 = (_90 = payload.credit) === null || _90 === void 0 ? void 0 : _90.refundAsked) !== null && _91 !== void 0 ? _91 : 0),
|
|
287
|
+
transferedToSocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_93 = (_92 = payload.credit) === null || _92 === void 0 ? void 0 : _92.transferedToSocietyHeadOfGroup) !== null && _93 !== void 0 ? _93 : 0),
|
|
288
|
+
assimiledTaxes: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_95 = (_94 = payload.credit) === null || _94 === void 0 ? void 0 : _94.assimiledTaxes) !== null && _95 !== void 0 ? _95 : 0),
|
|
289
289
|
toReport: 0,
|
|
290
290
|
ticRefund: 0,
|
|
291
291
|
ticTransfered: 0
|
|
292
292
|
},
|
|
293
293
|
toPay: {
|
|
294
294
|
netDue: 0,
|
|
295
|
-
acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((
|
|
295
|
+
acquittedBySocietyHeadOfGroup: isNil || isHolidayDeposit ? 0 : (0, _lodash.round)((_97 = (_96 = payload.toPay) === null || _96 === void 0 ? void 0 : _96.acquittedBySocietyHeadOfGroup) !== null && _97 !== void 0 ? _97 : 0),
|
|
296
296
|
total: 0
|
|
297
297
|
},
|
|
298
298
|
tic: {
|
|
@@ -306,7 +306,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload) {
|
|
|
306
306
|
initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
|
|
307
307
|
initialPayload.toPay.netDue = initialPayload.vat.grossDue - initialPayload.vat.deductible.total > 0 ? initialPayload.vat.grossDue - initialPayload.vat.deductible.total : 0;
|
|
308
308
|
initialPayload.credit.toReport = initialPayload.credit.amount - initialPayload.credit.refundAsked - initialPayload.credit.transferedToSocietyHeadOfGroup;
|
|
309
|
-
initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((
|
|
309
|
+
initialPayload.toPay.total = initialPayload.toPay.netDue + initialPayload.credit.assimiledTaxes + ((_100 = (_99 = (_98 = initialPayload.tic) === null || _98 === void 0 ? void 0 : _98.total) === null || _99 === void 0 ? void 0 : _99.tax) !== null && _100 !== void 0 ? _100 : 0) - initialPayload.toPay.acquittedBySocietyHeadOfGroup;
|
|
310
310
|
return initialPayload;
|
|
311
311
|
}
|
|
312
312
|
function getCerfa3310Century23RegistrationFields(data) {
|