@silexpert/core 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/resources/ExercicePrestation.d.ts +7 -1
- package/dist/cjs/api/resources/ExercicePrestation.d.ts.map +1 -1
- package/dist/cjs/api/resources/ExercicePrestation.js +8 -0
- package/dist/cjs/api/resources/ExercicePrestation.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts +3 -3
- package/dist/cjs/types/Enum/BalanceSheet.js +3 -3
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.js +2 -0
- package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/cjs/types/Enum/CommercialManagement.d.ts +1 -0
- package/dist/cjs/types/Enum/CommercialManagement.d.ts.map +1 -1
- package/dist/cjs/types/Enum/CommercialManagement.js +5 -0
- package/dist/cjs/types/Enum/CommercialManagement.js.map +1 -1
- package/dist/cjs/types/Enum/InternalService.d.ts +1 -5
- package/dist/cjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/cjs/types/Enum/InternalService.js +7 -7
- package/dist/cjs/types/Enum/InternalService.js.map +1 -1
- package/dist/cjs/types/Enum/JobTitle.d.ts +1 -1
- package/dist/cjs/types/Enum/JobTitle.d.ts.map +1 -1
- package/dist/cjs/types/Enum/JobTitle.js +2 -2
- package/dist/cjs/types/Enum/JobTitle.js.map +1 -1
- package/dist/cjs/types/Enum/Role.d.ts +1 -2
- package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Role.js +3 -4
- package/dist/cjs/types/Enum/Role.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +1 -11
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +13 -13
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Enum/Supervision.d.ts +3 -1
- package/dist/cjs/types/Enum/Supervision.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Supervision.js +15 -1
- package/dist/cjs/types/Enum/Supervision.js.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.js +4 -4
- package/dist/cjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/cjs/types/Enum/TimeCounterType.js +6 -6
- package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
- package/dist/cjs/types/Enum/TimeSlot.js +1 -1
- package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/cjs/types/Interface/api/balanceSheet/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/balanceSheet/Query.js +9 -1
- package/dist/cjs/types/Interface/api/balanceSheet/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/exercicePrestation/Query.d.ts +6 -0
- package/dist/cjs/types/Interface/api/exercicePrestation/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/exercicePrestation/Query.js +28 -1
- package/dist/cjs/types/Interface/api/exercicePrestation/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/file/Create.d.ts +1 -0
- package/dist/cjs/types/Interface/api/file/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/file/Create.js +8 -0
- package/dist/cjs/types/Interface/api/file/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/toDoExpress/Query.d.ts +13 -6
- package/dist/cjs/types/Interface/api/toDoExpress/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/toDoExpress/Query.js +59 -12
- package/dist/cjs/types/Interface/api/toDoExpress/Query.js.map +1 -1
- package/dist/cjs/utils/brands.d.ts +2 -0
- package/dist/cjs/utils/brands.d.ts.map +1 -1
- package/dist/cjs/utils/brands.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
- package/dist/cjs/utils/commercialManagement/document.js +21 -11
- package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts +4 -0
- package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
- package/dist/cjs/utils/commercialManagement/internationalization/choices.js +112 -2
- package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/templates/common.js +1 -1
- package/dist/cjs/utils/commercialManagement/templates/common.js.map +1 -1
- package/dist/cjs/utils/email.d.ts.map +1 -1
- package/dist/cjs/utils/email.js +25 -11
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/cjs/utils/task.d.ts.map +1 -1
- package/dist/cjs/utils/task.js +3 -7
- package/dist/cjs/utils/task.js.map +1 -1
- package/dist/cjs/utils/vat/3517/century23.js +1 -1
- package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
- package/dist/cjs/utils/vat/centuries.js +1 -1
- package/dist/cjs/utils/vat/centuries.js.map +1 -1
- package/dist/cjs/utils/webmail.d.ts.map +1 -1
- package/dist/cjs/utils/webmail.js +3 -7
- package/dist/cjs/utils/webmail.js.map +1 -1
- package/dist/mjs/api/resources/ExercicePrestation.d.ts +7 -1
- package/dist/mjs/api/resources/ExercicePrestation.d.ts.map +1 -1
- package/dist/mjs/api/resources/ExercicePrestation.js +8 -0
- package/dist/mjs/api/resources/ExercicePrestation.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts +3 -3
- package/dist/mjs/types/Enum/BalanceSheet.js +3 -3
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.js +2 -0
- package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/mjs/types/Enum/CommercialManagement.d.ts +1 -0
- package/dist/mjs/types/Enum/CommercialManagement.d.ts.map +1 -1
- package/dist/mjs/types/Enum/CommercialManagement.js +5 -0
- package/dist/mjs/types/Enum/CommercialManagement.js.map +1 -1
- package/dist/mjs/types/Enum/InternalService.d.ts +1 -5
- package/dist/mjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/mjs/types/Enum/InternalService.js +7 -7
- package/dist/mjs/types/Enum/InternalService.js.map +1 -1
- package/dist/mjs/types/Enum/JobTitle.d.ts +1 -1
- package/dist/mjs/types/Enum/JobTitle.d.ts.map +1 -1
- package/dist/mjs/types/Enum/JobTitle.js +2 -2
- package/dist/mjs/types/Enum/JobTitle.js.map +1 -1
- package/dist/mjs/types/Enum/Role.d.ts +1 -2
- package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Role.js +3 -4
- package/dist/mjs/types/Enum/Role.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +1 -11
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +13 -13
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Enum/Supervision.d.ts +3 -1
- package/dist/mjs/types/Enum/Supervision.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Supervision.js +15 -1
- package/dist/mjs/types/Enum/Supervision.js.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.js +4 -4
- package/dist/mjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/mjs/types/Enum/TimeCounterType.js +6 -6
- package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
- package/dist/mjs/types/Enum/TimeSlot.js +1 -1
- package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/mjs/types/Interface/api/balanceSheet/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/balanceSheet/Query.js +9 -1
- package/dist/mjs/types/Interface/api/balanceSheet/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/exercicePrestation/Query.d.ts +6 -0
- package/dist/mjs/types/Interface/api/exercicePrestation/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/exercicePrestation/Query.js +31 -1
- package/dist/mjs/types/Interface/api/exercicePrestation/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/file/Create.d.ts +1 -0
- package/dist/mjs/types/Interface/api/file/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/file/Create.js +11 -2
- package/dist/mjs/types/Interface/api/file/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/toDoExpress/Query.d.ts +13 -6
- package/dist/mjs/types/Interface/api/toDoExpress/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/toDoExpress/Query.js +66 -12
- package/dist/mjs/types/Interface/api/toDoExpress/Query.js.map +1 -1
- package/dist/mjs/utils/brands.d.ts +2 -0
- package/dist/mjs/utils/brands.d.ts.map +1 -1
- package/dist/mjs/utils/brands.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
- package/dist/mjs/utils/commercialManagement/document.js +17 -6
- package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts +4 -0
- package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
- package/dist/mjs/utils/commercialManagement/internationalization/choices.js +110 -2
- package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/templates/common.js +1 -1
- package/dist/mjs/utils/commercialManagement/templates/common.js.map +1 -1
- package/dist/mjs/utils/email.d.ts.map +1 -1
- package/dist/mjs/utils/email.js +31 -11
- package/dist/mjs/utils/email.js.map +1 -1
- package/dist/mjs/utils/task.d.ts.map +1 -1
- package/dist/mjs/utils/task.js +3 -7
- package/dist/mjs/utils/task.js.map +1 -1
- package/dist/mjs/utils/vat/3517/century23.js +1 -1
- package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
- package/dist/mjs/utils/vat/centuries.js +1 -1
- package/dist/mjs/utils/vat/centuries.js.map +1 -1
- package/dist/mjs/utils/webmail.d.ts.map +1 -1
- package/dist/mjs/utils/webmail.js +3 -7
- package/dist/mjs/utils/webmail.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/ExercicePrestation.ts +10 -1
- package/ts/types/Enum/BalanceSheet.ts +3 -3
- package/ts/types/Enum/BrandClementine.ts +2 -0
- package/ts/types/Enum/CommercialManagement.ts +6 -1
- package/ts/types/Enum/InternalService.ts +7 -7
- package/ts/types/Enum/JobTitle.ts +2 -2
- package/ts/types/Enum/Role.ts +3 -4
- package/ts/types/Enum/RoleDetail.ts +13 -13
- package/ts/types/Enum/Supervision.ts +15 -1
- package/ts/types/Enum/TaskResponseType.ts +4 -4
- package/ts/types/Enum/TimeCounterType.ts +6 -6
- package/ts/types/Enum/TimeSlot.ts +1 -1
- package/ts/types/Interface/api/balanceSheet/Query.ts +9 -1
- package/ts/types/Interface/api/exercicePrestation/Query.ts +23 -1
- package/ts/types/Interface/api/file/Create.ts +9 -2
- package/ts/types/Interface/api/toDoExpress/Query.ts +52 -12
- package/ts/utils/brands.ts +2 -0
- package/ts/utils/commercialManagement/document.ts +17 -6
- package/ts/utils/commercialManagement/internationalization/choices.ts +124 -2
- package/ts/utils/commercialManagement/templates/common.ts +1 -1
- package/ts/utils/email.ts +29 -12
- package/ts/utils/task.ts +3 -6
- package/ts/utils/vat/3517/century23.ts +1 -1
- package/ts/utils/vat/centuries.ts +1 -1
- package/ts/utils/webmail.ts +3 -6
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../types';
|
|
22
22
|
import { thirdPartyToReadThirdPartyEditing } from './thirdParty';
|
|
23
23
|
import { getBrandConfig } from '../brands';
|
|
24
|
-
import { internationalizationChoices } from './internationalization/choices';
|
|
24
|
+
import { internationalizationChoices, internationalizationConsistency } from './internationalization/choices';
|
|
25
25
|
|
|
26
26
|
import * as ejs from 'ejs';
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
@@ -77,10 +77,19 @@ export function generateCommercialDocument(
|
|
|
77
77
|
paymentLink: payload.paymentLink ?? '#',
|
|
78
78
|
idEstimateInvoiceType,
|
|
79
79
|
title: payload.title ?? null,
|
|
80
|
-
penalties: payload.penalties
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
penalties: payload.penalties
|
|
81
|
+
? (internationalizationConsistency(locale, payload.penalties, 'penalties') ?? null)
|
|
82
|
+
: null,
|
|
83
|
+
termsOfPayment: payload.termsOfPayment
|
|
84
|
+
? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? null)
|
|
85
|
+
: null,
|
|
86
|
+
compensation: payload.compensation
|
|
87
|
+
? (internationalizationConsistency(locale, payload.compensation, 'recoveryCost') ?? null)
|
|
88
|
+
: null,
|
|
89
|
+
discount: payload.discount ? (internationalizationConsistency(locale, payload.discount, 'discount') ?? null) : null,
|
|
90
|
+
vatMention: payload.vatMention
|
|
91
|
+
? (internationalizationConsistency(locale, payload.vatMention, 'vatMention') ?? null)
|
|
92
|
+
: null,
|
|
84
93
|
phoneContact: payload.settings?.phoneContact ?? null,
|
|
85
94
|
products,
|
|
86
95
|
vats,
|
|
@@ -119,7 +128,9 @@ export function generateCommercialDocument(
|
|
|
119
128
|
brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,
|
|
120
129
|
brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv }) as unknown as string}`,
|
|
121
130
|
shouldHideBrandName,
|
|
122
|
-
paymentType: payload.paymentType
|
|
131
|
+
paymentType: payload.paymentType
|
|
132
|
+
? internationalizationConsistency(locale, payload.paymentType, 'paymentType')
|
|
133
|
+
: null,
|
|
123
134
|
languageTemplate: languageOption,
|
|
124
135
|
};
|
|
125
136
|
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { AccountingCategoryId } from '../../../types/Enum/CommercialManagement';
|
|
1
|
+
import { AccountingCategoryId, InvoiceLanguage } from '../../../types/Enum/CommercialManagement';
|
|
2
2
|
import { InternationalizationChoicesType } from './type';
|
|
3
3
|
|
|
4
|
+
type InternationalizationConsistencyKey =
|
|
5
|
+
| 'penalties'
|
|
6
|
+
| 'discount'
|
|
7
|
+
| 'vatMention'
|
|
8
|
+
| 'recoveryCost'
|
|
9
|
+
| 'paymentType'
|
|
10
|
+
| 'termsOfPayment';
|
|
11
|
+
|
|
4
12
|
export const internationalizationChoices: InternationalizationChoicesType = {
|
|
5
13
|
fr: {
|
|
6
14
|
inputLists: {
|
|
@@ -228,7 +236,7 @@ export const internationalizationChoices: InternationalizationChoicesType = {
|
|
|
228
236
|
'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
229
237
|
'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
230
238
|
'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
231
|
-
'
|
|
239
|
+
'Invoice subject to VAT reverse charge system',
|
|
232
240
|
],
|
|
233
241
|
recoveryCost: ['Not applicable', '40€'],
|
|
234
242
|
paymentType: ['Credit card', 'Check', 'Cash', 'Direct debit', 'Bank transfer'],
|
|
@@ -383,3 +391,117 @@ export const internationalizationChoices: InternationalizationChoicesType = {
|
|
|
383
391
|
},
|
|
384
392
|
},
|
|
385
393
|
};
|
|
394
|
+
|
|
395
|
+
const internationalizationMatching: { [key: string]: { fr: string; en: string }[] } = {
|
|
396
|
+
penalties: [
|
|
397
|
+
{ fr: 'Non applicable', en: 'Not applicable' },
|
|
398
|
+
{ fr: '3 fois le taux légal', en: '3 times the legal rate' },
|
|
399
|
+
{ fr: 'Taux directeur de la BCE + 10 points', en: 'ECB key rate + 10 points' },
|
|
400
|
+
],
|
|
401
|
+
discount: [
|
|
402
|
+
{ fr: 'Non applicable', en: 'Not applicable' },
|
|
403
|
+
{ fr: 'Aucun escompte en cas de paiement anticipé', en: 'No discount for early payment' },
|
|
404
|
+
],
|
|
405
|
+
recoveryCost: [
|
|
406
|
+
{ fr: 'Non applicable', en: 'Not applicable' },
|
|
407
|
+
{ fr: '40€', en: '40€' },
|
|
408
|
+
],
|
|
409
|
+
paymentType: [
|
|
410
|
+
{ fr: 'Carte bancaire', en: 'Credit card' },
|
|
411
|
+
{ fr: 'Chèque', en: 'Check' },
|
|
412
|
+
{ fr: 'Espèces', en: 'Cash' },
|
|
413
|
+
{ fr: 'Prélèvement', en: 'Direct debit' },
|
|
414
|
+
{ fr: 'Virement bancaire', en: 'Bank transfer' },
|
|
415
|
+
],
|
|
416
|
+
vatMention: [
|
|
417
|
+
{ fr: 'Non concerné', en: 'Not affected' },
|
|
418
|
+
{ fr: 'Non applicable', en: 'Not applicable' },
|
|
419
|
+
{
|
|
420
|
+
fr: 'TVA non applicable, art. 293 B du CGI',
|
|
421
|
+
en: 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
fr: 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',
|
|
425
|
+
en: 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
fr: "Non soumis à TVA selon l'article 261C du CGI",
|
|
429
|
+
en: 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',
|
|
430
|
+
},
|
|
431
|
+
{ fr: 'Article 261 D du code général des impôts (CGI)', en: 'Article 261D of the French General Tax Code (FGTC)' },
|
|
432
|
+
{
|
|
433
|
+
fr: 'Exonération de TVA, article 283-2 du Code général des impôts',
|
|
434
|
+
en: 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
fr: 'Exonération de la TVA : Article 262 ter I du CGI',
|
|
438
|
+
en: 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',
|
|
439
|
+
},
|
|
440
|
+
{ fr: 'Mention de TVA 261.4.4 1 du CGI', en: 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)' },
|
|
441
|
+
{
|
|
442
|
+
fr: "Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE",
|
|
443
|
+
en: 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
fr: "Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE",
|
|
447
|
+
en: 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
fr: "Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE",
|
|
451
|
+
en: 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
fr: 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',
|
|
455
|
+
en: 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
fr: 'Facture soumise au régime de l’auto-liquidation de la TVA',
|
|
459
|
+
en: 'Invoice subject to VAT reverse charge system',
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
termsOfPayment: [
|
|
463
|
+
{
|
|
464
|
+
fr: 'À la livraison',
|
|
465
|
+
en: 'On delivery',
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
fr: 'À la command',
|
|
469
|
+
en: 'On order',
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
fr: 'À réception de la facture',
|
|
473
|
+
en: 'Upon receipt of invoice',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
fr: 'Exigible sous 14 jours',
|
|
477
|
+
en: 'Due within 14 days',
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
fr: 'Exigible sous 30 jours',
|
|
481
|
+
en: 'Due within 30 days',
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
fr: '30 jours à réception de la facture',
|
|
485
|
+
en: '30 days upon receipt of invoice',
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
fr: '45 jours à réception de la facture',
|
|
489
|
+
en: '45 days upon receipt of invoice',
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
fr: '60 jours à réception de la facture',
|
|
493
|
+
en: '60 days upon receipt of invoice',
|
|
494
|
+
},
|
|
495
|
+
],
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
export const internationalizationConsistency = (
|
|
499
|
+
language: InvoiceLanguage,
|
|
500
|
+
value: string,
|
|
501
|
+
key: InternationalizationConsistencyKey,
|
|
502
|
+
): string | undefined => {
|
|
503
|
+
const keyObjectToMacht = internationalizationMatching[key];
|
|
504
|
+
return language === InvoiceLanguage.FR
|
|
505
|
+
? keyObjectToMacht.find((obj) => obj.fr === value)?.fr
|
|
506
|
+
: keyObjectToMacht.find((obj) => obj.fr === value)?.en;
|
|
507
|
+
};
|
|
@@ -9,7 +9,7 @@ export class CommercialDocumentCommonHTML {
|
|
|
9
9
|
<% } %>`;
|
|
10
10
|
|
|
11
11
|
footer = `<div style="font-size: 8px !important; color: #838384; text-align: center; padding: 0 40px; display: block; width: 100%;">
|
|
12
|
-
<% if (freeText) { %><%- freeText %><br/><br/><% } %><% if (accountingCategoryFormatted) {%><%= accountingCategoryFormatted %> | <%}%><% if(marginVats.length > 0) { %><%= languageTemplate.template.common.footer.marginVat %> - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) %><%= languageTemplate.template.common.footer.legalVatMention %> | <% } %><% if(penalties || compensation || discount) { %><%= penalties ? languageTemplate.template.common.footer.penalties + ' : ' + penalties : ''%><%= penalties && compensation ? ' | ' : ''%><%= compensation ? languageTemplate.template.common.footer.recoveryCosts + ' : ' + compensation + ' ' : '' %><%= (compensation || penalties) && discount ? ' | ' : '' %><%= discount ? discount + ' ' : '' %><%= shouldPayTaxAfterDebit ? "| " + languageTemplate.template.common.footer.shouldPayTaxAfterDebit : '' %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% } %><%= name %><%= name && (legalForm || capital || siren || rcs) ? ', ' : ''%><%= legalForm %><%= capital ? ' ' + languageTemplate.template.common.footer.capital + ' ' + capitalFormatted + ' €' : '' %><%= siren ? ' ' + languageTemplate.template.common.footer.siren + ' ' + siren : ''%><%= rcs ? '| RCS ' + rcs : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? languageTemplate.template.common.footer.vatCode + ' ' +vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>
|
|
12
|
+
<% if (freeText) { %><%- freeText %><br/><br/><% } %><% if (accountingCategoryFormatted) {%><%= accountingCategoryFormatted %> | <%}%><% if(marginVats.length > 0) { %><%= languageTemplate.template.common.footer.marginVat %> - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) %><%= languageTemplate.template.common.footer.legalVatMention %> | <% } %><% if(penalties || compensation || discount) { %><%= penalties ? languageTemplate.template.common.footer.penalties + ' : ' + penalties : ''%><%= penalties && compensation ? ' | ' : ''%><%= compensation ? languageTemplate.template.common.footer.recoveryCosts + ' : ' + compensation + ' ' : '' %><%= (compensation || penalties) && discount ? ' | ' : '' %><%= discount ? languageTemplate.template.common.footer.discount + ' : ' + discount : '' %><%= shouldPayTaxAfterDebit ? "| " + languageTemplate.template.common.footer.shouldPayTaxAfterDebit : '' %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% } %><%= name %><%= name && (legalForm || capital || siren || rcs) ? ', ' : ''%><%= legalForm %><%= capital ? ' ' + languageTemplate.template.common.footer.capital + ' ' + capitalFormatted + ' €' : '' %><%= siren ? ' ' + languageTemplate.template.common.footer.siren + ' ' + siren : ''%><%= rcs ? '| RCS ' + rcs : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? languageTemplate.template.common.footer.vatCode + ' ' +vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>
|
|
13
13
|
<% if (["Clementine", "Pourcentage", "Comptalib"].includes(brandName) && !shouldHideBrandName) { %>
|
|
14
14
|
<div style="display: grid; place-items: center;"><div style="background-color: <%= brandColors.primary50 %>; color: <%= brandColors.primary500 %>; display: flex; gap: 3px; max-width: fit-content; border-radius: 4px; padding: 4px 8px; margin-top: 8px; align-items: center; font-size: 9px; line-height: 140%; font-family: 'circular std', sans serif; font-weight: 450;">
|
|
15
15
|
<%= languageTemplate.template.common.footer.generate %>
|
package/ts/utils/email.ts
CHANGED
|
@@ -34,9 +34,7 @@ function getRoleSignature(user: any) {
|
|
|
34
34
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
35
35
|
const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
37
|
-
const
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
39
|
-
const isLitige = user.roles.map((r: any) => r.id).includes(Role.LITIGE);
|
|
37
|
+
const isSatisfaction = user.roles.map((r: any) => r.id).includes(Role.SATISFACTION);
|
|
40
38
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
41
39
|
const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);
|
|
42
40
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
@@ -77,20 +75,13 @@ function getRoleSignature(user: any) {
|
|
|
77
75
|
return `Chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
if (
|
|
78
|
+
if (isSatisfaction && isManager) {
|
|
81
79
|
return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;
|
|
82
80
|
}
|
|
83
|
-
if (
|
|
81
|
+
if (isSatisfaction) {
|
|
84
82
|
return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;
|
|
85
83
|
}
|
|
86
84
|
|
|
87
|
-
if (isLitige && isManager) {
|
|
88
|
-
return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`;
|
|
89
|
-
}
|
|
90
|
-
if (isLitige) {
|
|
91
|
-
return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
85
|
if (isDataOfficer && isManager) {
|
|
95
86
|
return 'Responsable aide comptable';
|
|
96
87
|
}
|
|
@@ -275,6 +266,14 @@ export function generateSignature(params: any): string {
|
|
|
275
266
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
276
267
|
objectWaited: 'listMails.gestion',
|
|
277
268
|
}) as unknown as string;
|
|
269
|
+
const satisfactionMail = getBrandConfig({
|
|
270
|
+
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
271
|
+
objectWaited: 'listMails.satisfaction',
|
|
272
|
+
}) as unknown as string;
|
|
273
|
+
const resiliationMail = getBrandConfig({
|
|
274
|
+
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
275
|
+
objectWaited: 'listMails.resiliation',
|
|
276
|
+
}) as unknown as string;
|
|
278
277
|
const supportMail = getBrandConfig({
|
|
279
278
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
280
279
|
objectWaited: 'listMails.support',
|
|
@@ -338,6 +337,24 @@ export function generateSignature(params: any): string {
|
|
|
338
337
|
};
|
|
339
338
|
mailSignature = bonjourMail;
|
|
340
339
|
roleSignature = '';
|
|
340
|
+
} else if (forceRole === 'satisfaction') {
|
|
341
|
+
// Signature satisfaction
|
|
342
|
+
user = {
|
|
343
|
+
firstname: 'Service satisfaction clients',
|
|
344
|
+
isAll: true,
|
|
345
|
+
};
|
|
346
|
+
mailSignature = satisfactionMail;
|
|
347
|
+
roleSignature = '';
|
|
348
|
+
phoneSignature = standardPhoneSignature;
|
|
349
|
+
} else if (forceRole === 'resiliation') {
|
|
350
|
+
// Signature resiliation
|
|
351
|
+
user = {
|
|
352
|
+
firstname: 'Service satisfaction clients',
|
|
353
|
+
isAll: true,
|
|
354
|
+
};
|
|
355
|
+
mailSignature = resiliationMail;
|
|
356
|
+
roleSignature = '';
|
|
357
|
+
phoneSignature = standardPhoneSignature;
|
|
341
358
|
} else if (forceRole === 'social') {
|
|
342
359
|
// Signature social
|
|
343
360
|
user = {
|
package/ts/utils/task.ts
CHANGED
|
@@ -23,10 +23,8 @@ const getIdRoleUsedForTask = (listRoles: Role[]): Role => {
|
|
|
23
23
|
idRole = Role.TECHNICAL_ADVISOR;
|
|
24
24
|
} else if (listRoles.includes(Role.ON_BOARDER)) {
|
|
25
25
|
idRole = Role.ON_BOARDER;
|
|
26
|
-
} else if (listRoles.includes(Role.
|
|
27
|
-
idRole = Role.
|
|
28
|
-
} else if (listRoles.includes(Role.LITIGE)) {
|
|
29
|
-
idRole = Role.LITIGE;
|
|
26
|
+
} else if (listRoles.includes(Role.SATISFACTION)) {
|
|
27
|
+
idRole = Role.SATISFACTION;
|
|
30
28
|
} else if (listRoles.includes(Role.FRONT_OFFICE)) {
|
|
31
29
|
idRole = Role.FRONT_OFFICE;
|
|
32
30
|
} else if (listRoles.includes(Role.DATA_OFFICER)) {
|
|
@@ -66,8 +64,7 @@ const getListIdRolesUsedForTask = (listRoles: Role[]): Role[] => {
|
|
|
66
64
|
Role.CUSTOMER_SUCCESS,
|
|
67
65
|
Role.TECHNICAL_ADVISOR,
|
|
68
66
|
Role.ON_BOARDER,
|
|
69
|
-
Role.
|
|
70
|
-
Role.LITIGE,
|
|
67
|
+
Role.SATISFACTION,
|
|
71
68
|
Role.FRONT_OFFICE,
|
|
72
69
|
Role.DATA_OFFICER,
|
|
73
70
|
].includes(r));
|
|
@@ -103,7 +103,7 @@ export function getCerfa3517Century23Payload(
|
|
|
103
103
|
);
|
|
104
104
|
|
|
105
105
|
const prestation2Entries = vatEntries.filter((ae) => intracomVat.includes(ae.idVat));
|
|
106
|
-
const presta2Accounts = ['604', '61', '62', '607', '651', '601', '602']; // Ajout suite à la demande de Ben x Angelo
|
|
106
|
+
const presta2Accounts = ['604', '61', '62', '607', '651', '601', '602', '606']; // Ajout suite à la demande de Ben x Angelo, 606 Angelo
|
|
107
107
|
const prestation2Base = setZeroIfIsNegative(getAmountByAccountNumber(prestation2Entries, presta2Accounts, 0, true));
|
|
108
108
|
const prestation2AmountOfVat = setZeroIfIsNegative(
|
|
109
109
|
getTaxAmountByAccountNumber(prestation2Entries, presta2Accounts, 0, false, true),
|
|
@@ -75,7 +75,7 @@ const vatDocuments: VatDocument[] = [
|
|
|
75
75
|
fileName: '3310-2024',
|
|
76
76
|
annex: {
|
|
77
77
|
name: '3519',
|
|
78
|
-
century: '
|
|
78
|
+
century: dayjs().month() === 0 ? dayjs().subtract(1, 'month').format('YY') : dayjs().format('YY'),
|
|
79
79
|
shouldInclude: (data: Cerfa3310_2023) => Boolean(data.credit?.refundAsked && data.credit.refundAsked > 0),
|
|
80
80
|
payload: (amount: number, payload: PayloadCerfa3519_2017) => getCerfa3519Century17Payload(amount, payload),
|
|
81
81
|
asponePayload: (data: Cerfa3519_2017) => getCerfa3519Century23RegistrationFields(data),
|
package/ts/utils/webmail.ts
CHANGED
|
@@ -24,10 +24,8 @@ const getIdRoleUsedForEmail = (listRoles: number[]): Role => {
|
|
|
24
24
|
idRole = Role.SOCIAL;
|
|
25
25
|
} else if (listRoles.includes(Role.ON_BOARDER)) {
|
|
26
26
|
idRole = Role.ON_BOARDER;
|
|
27
|
-
} else if (listRoles.includes(Role.
|
|
28
|
-
idRole = Role.
|
|
29
|
-
} else if (listRoles.includes(Role.LITIGE)) {
|
|
30
|
-
idRole = Role.LITIGE;
|
|
27
|
+
} else if (listRoles.includes(Role.SATISFACTION)) {
|
|
28
|
+
idRole = Role.SATISFACTION;
|
|
31
29
|
}
|
|
32
30
|
return idRole;
|
|
33
31
|
};
|
|
@@ -46,8 +44,7 @@ const getListIdRolesUsedForEmail = (listRoles: number[]): Role[] => {
|
|
|
46
44
|
Role.JURIDIC,
|
|
47
45
|
Role.SOCIAL,
|
|
48
46
|
Role.ON_BOARDER,
|
|
49
|
-
Role.
|
|
50
|
-
Role.LITIGE
|
|
47
|
+
Role.SATISFACTION
|
|
51
48
|
].includes(r));
|
|
52
49
|
return listIdRoles;
|
|
53
50
|
};
|