@silexpert/core 1.1.68 → 1.1.70
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/Country.d.ts +4 -2
- package/es/types/Enum/Country.d.ts.map +1 -1
- package/es/types/Enum/Country.js +9 -5
- package/es/types/Enum/Country.js.map +1 -1
- package/es/types/Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer.d.ts.map +1 -1
- package/es/types/Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer.js +14 -0
- package/es/types/Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer.js.map +1 -1
- package/es/types/Interface/api/stripe/QueryStripe.d.ts +2 -2
- package/es/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
- package/es/types/Interface/api/stripe/QueryStripe.js +20 -1
- package/es/types/Interface/api/stripe/QueryStripe.js.map +1 -1
- package/es/utils/brands.js +1 -1
- package/es/utils/brands.js.map +1 -1
- package/es/utils/vat/3310/century23.d.ts.map +1 -1
- package/es/utils/vat/3310/century23.js +23 -2
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/es/utils/vat/3517/century23.js +22 -22
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/js/types/Enum/Country.js +14 -5
- package/js/types/Enum/Country.js.map +1 -1
- package/js/types/Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer.js +13 -0
- package/js/types/Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer.js.map +1 -1
- package/js/types/Interface/api/stripe/QueryStripe.js +16 -0
- package/js/types/Interface/api/stripe/QueryStripe.js.map +1 -1
- package/js/utils/brands.js +2 -1
- package/js/utils/brands.js.map +1 -1
- package/js/utils/vat/3310/century23.js +33 -1
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/js/utils/vat/3517/century23.js +22 -22
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/Country.ts +9 -5
- package/ts/types/Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer.ts +2 -1
- package/ts/types/Interface/api/stripe/QueryStripe.ts +7 -2
- package/ts/utils/brands.ts +1 -1
- package/ts/utils/vat/3310/century23.ts +29 -2
- package/ts/utils/vat/3517/century23.ts +22 -22
|
@@ -3,4 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.RetrieveUpcomingInvoiceParams = undefined;
|
|
7
|
+
var _utils = require("../../../../utils");
|
|
8
|
+
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
9
|
+
var c = arguments.length,
|
|
10
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
11
|
+
d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
var __metadata = undefined && undefined.__metadata || function (k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
};
|
|
18
|
+
class RetrieveUpcomingInvoiceParams {}
|
|
19
|
+
exports.RetrieveUpcomingInvoiceParams = RetrieveUpcomingInvoiceParams;
|
|
20
|
+
__decorate([(0, _utils.ApiProperty)(), __metadata("design:type", String)], RetrieveUpcomingInvoiceParams.prototype, "customerId", void 0);
|
|
21
|
+
__decorate([(0, _utils.ApiProperty)(), __metadata("design:type", String)], RetrieveUpcomingInvoiceParams.prototype, "subscriptionId", void 0);
|
|
6
22
|
//# sourceMappingURL=QueryStripe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryStripe.js","names":[],"sources":["../../../../../ts/types/Interface/api/stripe/QueryStripe.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"QueryStripe.js","names":["_utils","require","RetrieveUpcomingInvoiceParams","exports","__decorate","ApiProperty"],"sources":["../../../../../ts/types/Interface/api/stripe/QueryStripe.ts"],"sourcesContent":["import { ApiProperty } from '../../../../utils';\n\nexport class RetrieveUpcomingInvoiceParams {\n @ApiProperty()\n customerId: string;\n\n @ApiProperty()\n subscriptionId: string;\n}"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;;;;;;;;;;;AAEM,MAAOC,6BAA6B;AAMzCC,OAAA,CANYD,6BAA6B,GAA7BA,6BAA6B;AACxCE,UAAA,EAAC,IAAAC,kBAAW,GAAE,E,kGACK;AAEnBD,UAAA,EAAC,IAAAC,kBAAW,GAAE,E,sGACS"}
|
package/js/utils/brands.js
CHANGED
|
@@ -63,7 +63,8 @@ const getBrandConfig = params => {
|
|
|
63
63
|
BrandLegalstart: _BrandLegalstart.BrandLegalstart,
|
|
64
64
|
BrandComptalib: _BrandComptalib.BrandComptalib,
|
|
65
65
|
BrandPourcentage: _BrandPourcentage.BrandPourcentage,
|
|
66
|
-
BrandClems: _BrandClems.BrandClems
|
|
66
|
+
BrandClems: _BrandClems.BrandClems,
|
|
67
|
+
BrandStatutsExpress: _BrandStatutsExpress.BrandStatutsExpress
|
|
67
68
|
};
|
|
68
69
|
// @ts-ignore
|
|
69
70
|
const currentConfigFile = listEnvEnum[`Brand${currentEnvName}`];
|
package/js/utils/brands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.js","names":["_lodash","require","_BrandClementine","_BrandLegalstart","_BrandComptalib","_BrandPourcentage","_BrandClems","_BrandStatutsExpress","getBrandNameByNodeEnv","nodeEnv","env","_a","process","NODE_ENV","API_HOST","indexOf","getAllBrandByNodeEnv","nodeEnvUsed","currentEnvName","listEnvEnum","BrandClementine","BrandLegalstart","BrandComptalib","BrandPourcentage","BrandClems","BrandStatutsExpress","currentConfigFile","brand","getBrandConfig","params","idTypeBrand","objectWaited","find","b","sort","a","objectToReturn","getLodash","brandDefault","name","getBrandByEmail","email","exports"],"sources":["../../ts/utils/brands.ts"],"sourcesContent":["import { get as getLodash } from 'lodash';\nimport { BrandClementine } from '../types/Enum/BrandClementine';\nimport { BrandLegalstart } from '../types/Enum/BrandLegalstart';\nimport { BrandComptalib } from '../types/Enum/BrandComptalib';\nimport { BrandPourcentage } from '../types/Enum/BrandPourcentage';\nimport { BrandClems } from '../types/Enum/BrandClems';\nimport { BrandStatutsExpress } from '../types/Enum/BrandStatutsExpress';\n\ntype brand = {\n idTypeBrand: number,\n colors: {\n primary: string,\n },\n listMails: {\n bonjour: string,\n },\n listPhones: {\n contact: string,\n },\n name: string,\n urlApi1?: string,\n urlClient?: string,\n urlApp?: string,\n offices?: {\n LAXOU: {\n id : number,\n },\n HOME_OFFICE: {\n id : number,\n }\n },\n};\n\ntype getBrandConfigParams = {\n idTypeBrand?: number,\n objectWaited?: string,\n nodeEnv?: string\n};\n\nconst getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Clems' | 'StatutsExpress' => {\n const env = nodeEnv ?? process.env.NODE_ENV ?? process.env.API_HOST;\n if (env) {\n if (env.indexOf('legalstart') > -1 || env.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (env.indexOf('comptalib') > -1 || env.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (env.indexOf('pourcentage') > -1 || env.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n if (env.indexOf('clems') > -1 || env.indexOf('Clems') > -1) {\n return 'Clems';\n }\n if (env.indexOf('statuts') > -1 || env.indexOf('Statuts') > -1) {\n return 'StatutsExpress';\n }\n }\n return 'Clementine';\n};\n\nconst getAllBrandByNodeEnv = (nodeEnv?: string): Array<brand> => {\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems, BrandStatutsExpress,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n const brand = currentConfigFile;\n\n return brand;\n};\n\nconst getBrandConfig = (params: getBrandConfigParams): brand => {\n const {\n idTypeBrand = null, objectWaited = null, nodeEnv,\n } = params;\n let brand;\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n if (idTypeBrand) {\n // Récupération de la brand via idTypeBrand\n brand = currentConfigFile.find((b: brand) => b.idTypeBrand === idTypeBrand);\n }\n // else if (idSociety) {\n // Récupération de la brand via l'idSociety -> impossible directement depuis le core (pas d'accès au resources, ni au token pour l'appel via fetch)\n\n if (!brand) {\n // Si aucune brand trouvée, on passe par défaut la première brand de la liste\n [brand] = currentConfigFile.sort((a: brand, b: brand) => a.idTypeBrand - b.idTypeBrand);\n }\n\n if (objectWaited) {\n // Si on attend un attribut particulier de la brand, on le parcourt\n let objectToReturn = getLodash(brand, objectWaited);\n // Si aucun attribut trouvé, on renvoit celui de Clementine par défaut\n if (!objectToReturn) {\n const brandDefault = currentConfigFile.find((b: brand) => b.name === currentEnvName);\n objectToReturn = getLodash(brandDefault, objectWaited);\n }\n return objectToReturn;\n }\n\n return brand;\n};\n\nconst getBrandByEmail = (email: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Lecomptablefrancais' | null => {\n if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';\n if (email.indexOf('comptalib.com') > -1) return 'Comptalib';\n if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';\n if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('lecomptablefrancais.fr') > -1) return 'Lecomptablefrancais';\n return null;\n};\n\nexport {\n getBrandConfig, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail,\n};"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAiCA,MAAMO,qBAAqB,GAAIC,OAAgB,IAA4F;;EACzI,MAAMC,GAAG,GAAG,CAAAC,EAAA,GAAAF,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAIG,OAAO,CAACF,GAAG,CAACG,QAAQ,cAAAF,EAAA,cAAAA,EAAA,GAAIC,OAAO,CAACF,GAAG,CAACI,QAAQ;EACnE,IAAIJ,GAAG,EAAE;IACP,IAAIA,GAAG,CAACK,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAIL,GAAG,CAACK,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE;MACpE,OAAO,YAAY;;IAErB,IAAIL,GAAG,CAACK,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAIL,GAAG,CAACK,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE;MAClE,OAAO,WAAW;;IAEpB,IAAIL,GAAG,CAACK,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAIL,GAAG,CAACK,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE;MACtE,OAAO,aAAa;;IAEtB,IAAIL,GAAG,CAACK,OAAO,CAAC,OAAO,CAAC,GAAG,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AAEC,gBAAgB,EAAhBA,kCAAgB;IAAEC,UAAU,EAAVA;
|
|
1
|
+
{"version":3,"file":"brands.js","names":["_lodash","require","_BrandClementine","_BrandLegalstart","_BrandComptalib","_BrandPourcentage","_BrandClems","_BrandStatutsExpress","getBrandNameByNodeEnv","nodeEnv","env","_a","process","NODE_ENV","API_HOST","indexOf","getAllBrandByNodeEnv","nodeEnvUsed","currentEnvName","listEnvEnum","BrandClementine","BrandLegalstart","BrandComptalib","BrandPourcentage","BrandClems","BrandStatutsExpress","currentConfigFile","brand","getBrandConfig","params","idTypeBrand","objectWaited","find","b","sort","a","objectToReturn","getLodash","brandDefault","name","getBrandByEmail","email","exports"],"sources":["../../ts/utils/brands.ts"],"sourcesContent":["import { get as getLodash } from 'lodash';\nimport { BrandClementine } from '../types/Enum/BrandClementine';\nimport { BrandLegalstart } from '../types/Enum/BrandLegalstart';\nimport { BrandComptalib } from '../types/Enum/BrandComptalib';\nimport { BrandPourcentage } from '../types/Enum/BrandPourcentage';\nimport { BrandClems } from '../types/Enum/BrandClems';\nimport { BrandStatutsExpress } from '../types/Enum/BrandStatutsExpress';\n\ntype brand = {\n idTypeBrand: number,\n colors: {\n primary: string,\n },\n listMails: {\n bonjour: string,\n },\n listPhones: {\n contact: string,\n },\n name: string,\n urlApi1?: string,\n urlClient?: string,\n urlApp?: string,\n offices?: {\n LAXOU: {\n id : number,\n },\n HOME_OFFICE: {\n id : number,\n }\n },\n};\n\ntype getBrandConfigParams = {\n idTypeBrand?: number,\n objectWaited?: string,\n nodeEnv?: string\n};\n\nconst getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Clems' | 'StatutsExpress' => {\n const env = nodeEnv ?? process.env.NODE_ENV ?? process.env.API_HOST;\n if (env) {\n if (env.indexOf('legalstart') > -1 || env.indexOf('Legalstart') > -1) {\n return 'Legalstart';\n }\n if (env.indexOf('comptalib') > -1 || env.indexOf('Comptalib') > -1) {\n return 'Comptalib';\n }\n if (env.indexOf('pourcentage') > -1 || env.indexOf('Pourcentage') > -1) {\n return 'Pourcentage';\n }\n if (env.indexOf('clems') > -1 || env.indexOf('Clems') > -1) {\n return 'Clems';\n }\n if (env.indexOf('statuts') > -1 || env.indexOf('Statuts') > -1) {\n return 'StatutsExpress';\n }\n }\n return 'Clementine';\n};\n\nconst getAllBrandByNodeEnv = (nodeEnv?: string): Array<brand> => {\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems, BrandStatutsExpress,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n const brand = currentConfigFile;\n\n return brand;\n};\n\nconst getBrandConfig = (params: getBrandConfigParams): brand => {\n const {\n idTypeBrand = null, objectWaited = null, nodeEnv,\n } = params;\n let brand;\n const nodeEnvUsed = nodeEnv ?? process.env.NODE_ENV;\n const currentEnvName = getBrandNameByNodeEnv(nodeEnvUsed);\n const listEnvEnum = {\n BrandClementine, BrandLegalstart, BrandComptalib, BrandPourcentage, BrandClems, BrandStatutsExpress,\n };\n // @ts-ignore\n const currentConfigFile:brand[] = listEnvEnum[`Brand${currentEnvName}`];\n\n if (idTypeBrand) {\n // Récupération de la brand via idTypeBrand\n brand = currentConfigFile.find((b: brand) => b.idTypeBrand === idTypeBrand);\n }\n // else if (idSociety) {\n // Récupération de la brand via l'idSociety -> impossible directement depuis le core (pas d'accès au resources, ni au token pour l'appel via fetch)\n\n if (!brand) {\n // Si aucune brand trouvée, on passe par défaut la première brand de la liste\n [brand] = currentConfigFile.sort((a: brand, b: brand) => a.idTypeBrand - b.idTypeBrand);\n }\n\n if (objectWaited) {\n // Si on attend un attribut particulier de la brand, on le parcourt\n let objectToReturn = getLodash(brand, objectWaited);\n // Si aucun attribut trouvé, on renvoit celui de Clementine par défaut\n if (!objectToReturn) {\n const brandDefault = currentConfigFile.find((b: brand) => b.name === currentEnvName);\n objectToReturn = getLodash(brandDefault, objectWaited);\n }\n return objectToReturn;\n }\n\n return brand;\n};\n\nconst getBrandByEmail = (email: string): 'Legalstart' | 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Lecomptablefrancais' | null => {\n if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';\n if (email.indexOf('comptalib.com') > -1) return 'Comptalib';\n if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';\n if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('clementine.fr') > -1) return 'Clementine';\n if (email.indexOf('lecomptablefrancais.fr') > -1) return 'Lecomptablefrancais';\n return null;\n};\n\nexport {\n getBrandConfig, getAllBrandByNodeEnv, getBrandNameByNodeEnv, getBrandByEmail,\n};"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAiCA,MAAMO,qBAAqB,GAAIC,OAAgB,IAA4F;;EACzI,MAAMC,GAAG,GAAG,CAAAC,EAAA,GAAAF,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAIG,OAAO,CAACF,GAAG,CAACG,QAAQ,cAAAF,EAAA,cAAAA,EAAA,GAAIC,OAAO,CAACF,GAAG,CAACI,QAAQ;EACnE,IAAIJ,GAAG,EAAE;IACP,IAAIA,GAAG,CAACK,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAIL,GAAG,CAACK,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE;MACpE,OAAO,YAAY;;IAErB,IAAIL,GAAG,CAACK,OAAO,CAAC,WAAW,CAAC,GAAG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AAe,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,YAAY;EAC5D,IAAI0B,KAAK,CAAC1B,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,WAAW;EAC3D,IAAI0B,KAAK,CAAC1B,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,aAAa;EAC9D,IAAI0B,KAAK,CAAC1B,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,YAAY;EACnE,IAAI0B,KAAK,CAAC1B,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,YAAY;EAC5D,IAAI0B,KAAK,CAAC1B,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,qBAAqB;EAC9E,OAAO,IAAI;AACb,CAAC;AAAC2B,OAAA,CAGAd,cAAc,GAAdA,cAAc;AAAAc,OAAA,CAAE1B,oBAAoB,GAApBA,oBAAoB;AAAA0B,OAAA,CAAElC,qBAAqB,GAArBA,qBAAqB;AAAAkC,OAAA,CAAEF,eAAe,GAAfA,eAAe"}
|
|
@@ -141,7 +141,7 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
141
141
|
},
|
|
142
142
|
siret: {
|
|
143
143
|
first: (0, _classValidator.isDefined)(payload.society.siret) ? (_7 = (_6 = payload.society.siret) === null || _6 === void 0 ? void 0 : _6.slice(0, 9)) !== null && _7 !== void 0 ? _7 : null : null,
|
|
144
|
-
second: (0, _classValidator.isDefined)(payload.society.siret) ? (_9 = (_8 = payload.society.siret) === null || _8 === void 0 ? void 0 : _8.slice(
|
|
144
|
+
second: (0, _classValidator.isDefined)(payload.society.siret) ? (_9 = (_8 = payload.society.siret) === null || _8 === void 0 ? void 0 : _8.slice(-4)) !== null && _9 !== void 0 ? _9 : null : null
|
|
145
145
|
},
|
|
146
146
|
intracommunityVat: {
|
|
147
147
|
first: shouldHaveVatCode ? (_12 = (_11 = (_10 = payload.setting) === null || _10 === void 0 ? void 0 : _10.tvaCode) === null || _11 === void 0 ? void 0 : _11.slice(0, 2)) !== null && _12 !== void 0 ? _12 : null : null,
|
|
@@ -325,6 +325,38 @@ function getCerfa3310Century23Payload(accountingEntries, payload, updatedEntries
|
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
|
+
const totalCadreA = initialPayload.taxedOperations.services + initialPayload.taxedOperations.other + initialPayload.taxedOperations.purchaseOfIntracommunityServiceProvision + initialPayload.taxedOperations.intracommunityAcquisitions + initialPayload.taxedOperations.energyDelivery + initialPayload.taxedOperations.purchaseOfServicesNotInFrance;
|
|
329
|
+
const totalCadreB = initialPayload.vat.carrieredOutInFrance.normalRate20.base + initialPayload.vat.carrieredOutInFrance.reduceRate5Dot5.base + initialPayload.vat.carrieredOutInFrance.reduceRate10.base + initialPayload.vat.overseasDepartment.reduceRate8Dot5.base + initialPayload.vat.overseasDepartment.reduceRate2Dot1.base + initialPayload.vat.otherRate.at1Dot75.base + initialPayload.vat.otherRate.at1Dot05.base + initialPayload.vat.otherRate.at10.base + initialPayload.vat.otherRate.atCorse2Dot1.base + initialPayload.vat.otherRate.atCorse0Dot9.base + initialPayload.vat.otherRate.at2Dot1.base + initialPayload.vat.otherRate.author.base + initialPayload.vat.otherRate.oldRate.base;
|
|
330
|
+
// On tolère une différence de 3, dans ce cas on force le champ
|
|
331
|
+
if (totalCadreA !== totalCadreB) {
|
|
332
|
+
const difference = totalCadreB - totalCadreA;
|
|
333
|
+
if (difference >= -3 && difference <= 3) {
|
|
334
|
+
const cadreAFields = [{
|
|
335
|
+
key: 'services',
|
|
336
|
+
value: initialPayload.taxedOperations.services
|
|
337
|
+
}, {
|
|
338
|
+
key: 'other',
|
|
339
|
+
value: initialPayload.taxedOperations.other
|
|
340
|
+
}, {
|
|
341
|
+
key: 'purchaseOfIntracommunityServiceProvision',
|
|
342
|
+
value: initialPayload.taxedOperations.purchaseOfIntracommunityServiceProvision
|
|
343
|
+
}, {
|
|
344
|
+
key: 'intracommunityAcquisitions',
|
|
345
|
+
value: initialPayload.taxedOperations.intracommunityAcquisitions
|
|
346
|
+
}, {
|
|
347
|
+
key: 'energyDelivery',
|
|
348
|
+
value: initialPayload.taxedOperations.energyDelivery
|
|
349
|
+
}, {
|
|
350
|
+
key: 'purchaseOfServicesNotInFrance;',
|
|
351
|
+
value: initialPayload.taxedOperations.purchaseOfServicesNotInFrance
|
|
352
|
+
}];
|
|
353
|
+
const biggestValue = (0, _lodash.maxBy)(cadreAFields, 'value');
|
|
354
|
+
if (biggestValue) {
|
|
355
|
+
// @ts-ignore
|
|
356
|
+
initialPayload.taxedOperations[biggestValue.key] += difference;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
328
360
|
initialPayload.vat.grossDue = initialPayload.vat.carrieredOutInFrance.normalRate20.tax + initialPayload.vat.carrieredOutInFrance.reduceRate5Dot5.tax + initialPayload.vat.carrieredOutInFrance.reduceRate10.tax + initialPayload.vat.overseasDepartment.reduceRate8Dot5.tax + initialPayload.vat.overseasDepartment.reduceRate2Dot1.tax + initialPayload.vat.otherRate.at1Dot75.tax + initialPayload.vat.otherRate.at1Dot05.tax + initialPayload.vat.otherRate.at10.tax + initialPayload.vat.otherRate.atCorse2Dot1.tax + initialPayload.vat.otherRate.atCorse0Dot9.tax + initialPayload.vat.otherRate.at2Dot1.tax + initialPayload.vat.otherRate.author.tax + initialPayload.vat.otherRate.oldRate.tax + initialPayload.vat.oilProducts.normalRate20.tax + initialPayload.vat.oilProducts.reduceRate13.tax + initialPayload.vat.importations.normalRate20.tax + initialPayload.vat.importations.reduceRate10.tax + initialPayload.vat.importations.reduceRate8Dot5.tax + initialPayload.vat.importations.reduceRate5Dot5.tax + initialPayload.vat.importations.reduceRate2Dot1.tax + initialPayload.vat.importations.reduceRate1Dot05.tax + initialPayload.vat.previouslyDeductedToBeReturned.total + initialPayload.vat.sumToAdd;
|
|
329
361
|
initialPayload.vat.deductible.total = initialPayload.vat.deductible.immobilizations + initialPayload.vat.deductible.otherGoodsAndServices + initialPayload.vat.deductible.other.total + initialPayload.vat.deductible.report + initialPayload.vat.deductible.toImpute;
|
|
330
362
|
initialPayload.credit.amount = initialPayload.vat.grossDue - initialPayload.vat.deductible.total < 0 ? Math.abs(initialPayload.vat.grossDue - initialPayload.vat.deductible.total) : 0;
|