@silexpert/core 1.1.400 → 1.1.402

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.
Files changed (90) hide show
  1. package/dist/cjs/types/Enum/CommercialManagement.d.ts +4 -0
  2. package/dist/cjs/types/Enum/CommercialManagement.d.ts.map +1 -1
  3. package/dist/cjs/types/Enum/CommercialManagement.js +6 -1
  4. package/dist/cjs/types/Enum/CommercialManagement.js.map +1 -1
  5. package/dist/cjs/types/Interface/api/PaymentRecovery/Create.d.ts +1 -1
  6. package/dist/cjs/types/Interface/api/PaymentRecovery/Create.d.ts.map +1 -1
  7. package/dist/cjs/types/Interface/api/PaymentRecovery/Create.js +3 -3
  8. package/dist/cjs/types/Interface/api/PaymentRecovery/Create.js.map +1 -1
  9. package/dist/cjs/types/Interface/api/PaymentRecovery/Read.d.ts +3 -0
  10. package/dist/cjs/types/Interface/api/PaymentRecovery/Read.d.ts.map +1 -1
  11. package/dist/cjs/types/Interface/api/PaymentRecovery/Read.js.map +1 -1
  12. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +4 -1
  13. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  14. package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  15. package/dist/cjs/types/Interface/api/commercialManagement/Read.d.ts +2 -0
  16. package/dist/cjs/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  17. package/dist/cjs/types/Interface/api/commercialManagement/Read.js.map +1 -1
  18. package/dist/cjs/types/Interface/models/IBankAccount.d.ts +0 -1
  19. package/dist/cjs/types/Interface/models/IBankAccount.d.ts.map +1 -1
  20. package/dist/cjs/types/Interface/models/IBankAccount.js.map +1 -1
  21. package/dist/cjs/types/Interface/models/IEstimateInvoice.d.ts +2 -1
  22. package/dist/cjs/types/Interface/models/IEstimateInvoice.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/models/IEstimateInvoice.js.map +1 -1
  24. package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
  25. package/dist/cjs/utils/commercialManagement/document.js +18 -12
  26. package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
  27. package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts +3 -0
  28. package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -0
  29. package/dist/cjs/utils/commercialManagement/internationalization/choices.js +417 -0
  30. package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -0
  31. package/dist/cjs/utils/commercialManagement/internationalization/type.d.ts +144 -0
  32. package/dist/cjs/utils/commercialManagement/internationalization/type.d.ts.map +1 -0
  33. package/dist/cjs/utils/commercialManagement/internationalization/type.js +3 -0
  34. package/dist/cjs/utils/commercialManagement/internationalization/type.js.map +1 -0
  35. package/dist/cjs/utils/commercialManagement/templates/body.js +15 -15
  36. package/dist/cjs/utils/commercialManagement/templates/body.js.map +1 -1
  37. package/dist/cjs/utils/commercialManagement/templates/common.js +37 -37
  38. package/dist/cjs/utils/commercialManagement/templates/common.js.map +1 -1
  39. package/dist/mjs/types/Enum/CommercialManagement.d.ts +4 -0
  40. package/dist/mjs/types/Enum/CommercialManagement.d.ts.map +1 -1
  41. package/dist/mjs/types/Enum/CommercialManagement.js +5 -0
  42. package/dist/mjs/types/Enum/CommercialManagement.js.map +1 -1
  43. package/dist/mjs/types/Interface/api/PaymentRecovery/Create.d.ts +1 -1
  44. package/dist/mjs/types/Interface/api/PaymentRecovery/Create.d.ts.map +1 -1
  45. package/dist/mjs/types/Interface/api/PaymentRecovery/Create.js +3 -3
  46. package/dist/mjs/types/Interface/api/PaymentRecovery/Create.js.map +1 -1
  47. package/dist/mjs/types/Interface/api/PaymentRecovery/Read.d.ts +3 -0
  48. package/dist/mjs/types/Interface/api/PaymentRecovery/Read.d.ts.map +1 -1
  49. package/dist/mjs/types/Interface/api/PaymentRecovery/Read.js.map +1 -1
  50. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +4 -1
  51. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  52. package/dist/mjs/types/Interface/api/commercialManagement/Create.js +2 -0
  53. package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  54. package/dist/mjs/types/Interface/api/commercialManagement/Read.d.ts +2 -0
  55. package/dist/mjs/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  56. package/dist/mjs/types/Interface/api/commercialManagement/Read.js.map +1 -1
  57. package/dist/mjs/types/Interface/models/IBankAccount.d.ts +0 -1
  58. package/dist/mjs/types/Interface/models/IBankAccount.d.ts.map +1 -1
  59. package/dist/mjs/types/Interface/models/IBankAccount.js.map +1 -1
  60. package/dist/mjs/types/Interface/models/IEstimateInvoice.d.ts +2 -1
  61. package/dist/mjs/types/Interface/models/IEstimateInvoice.d.ts.map +1 -1
  62. package/dist/mjs/types/Interface/models/IEstimateInvoice.js.map +1 -1
  63. package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
  64. package/dist/mjs/utils/commercialManagement/document.js +8 -1
  65. package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
  66. package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts +3 -0
  67. package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -0
  68. package/dist/mjs/utils/commercialManagement/internationalization/choices.js +414 -0
  69. package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -0
  70. package/dist/mjs/utils/commercialManagement/internationalization/type.d.ts +144 -0
  71. package/dist/mjs/utils/commercialManagement/internationalization/type.d.ts.map +1 -0
  72. package/dist/mjs/utils/commercialManagement/internationalization/type.js +2 -0
  73. package/dist/mjs/utils/commercialManagement/internationalization/type.js.map +1 -0
  74. package/dist/mjs/utils/commercialManagement/templates/body.js +15 -15
  75. package/dist/mjs/utils/commercialManagement/templates/body.js.map +1 -1
  76. package/dist/mjs/utils/commercialManagement/templates/common.js +37 -37
  77. package/dist/mjs/utils/commercialManagement/templates/common.js.map +1 -1
  78. package/package.json +1 -1
  79. package/ts/types/Enum/CommercialManagement.ts +6 -1
  80. package/ts/types/Interface/api/PaymentRecovery/Create.ts +3 -3
  81. package/ts/types/Interface/api/PaymentRecovery/Read.ts +1 -0
  82. package/ts/types/Interface/api/commercialManagement/Create.ts +4 -1
  83. package/ts/types/Interface/api/commercialManagement/Read.ts +2 -0
  84. package/ts/types/Interface/models/IBankAccount.ts +0 -1
  85. package/ts/types/Interface/models/IEstimateInvoice.ts +2 -1
  86. package/ts/utils/commercialManagement/document.ts +10 -0
  87. package/ts/utils/commercialManagement/internationalization/choices.ts +421 -0
  88. package/ts/utils/commercialManagement/internationalization/type.ts +156 -0
  89. package/ts/utils/commercialManagement/templates/body.ts +15 -15
  90. package/ts/utils/commercialManagement/templates/common.ts +37 -37
@@ -5,6 +5,7 @@ import * as dayjs from 'dayjs';
5
5
  import { ReadCommercialDocumentTemplate, ReadDocumentEditing, ReadVatEditing } from '../../types/Interface/api/commercialManagement/Read';
6
6
  import {
7
7
  AccountingCategoryList, FontIds, fontList,
8
+ InvoiceLanguage,
8
9
  } from '../../types/Enum/CommercialManagement';
9
10
  import { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';
10
11
  import { Vat } from '../../types/Enum/Vat';
@@ -18,6 +19,7 @@ import {
18
19
  } from '../../types';
19
20
  import { thirdPartyToReadThirdPartyEditing } from './thirdParty';
20
21
  import { getBrandConfig } from '../brands';
22
+ import { internationalizationChoices } from './internationalization/choices';
21
23
 
22
24
  const ejs = require('ejs');
23
25
  require('dayjs/locale/fr');
@@ -54,6 +56,10 @@ export function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoic
54
56
 
55
57
  const totalTaxIncluded = _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount');
56
58
 
59
+ const locale = payload.language ?? InvoiceLanguage.FR;
60
+ const languageOption = internationalizationChoices[locale];
61
+
62
+
57
63
  const data: ReadDocumentEditing & { brandColors: brandColorType, brandName: string, shouldHideBrandName: boolean } = {
58
64
  ...payload,
59
65
  thirdParty,
@@ -106,6 +112,7 @@ export function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoic
106
112
  brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv })}`,
107
113
  shouldHideBrandName,
108
114
  paymentType: payload.paymentType,
115
+ languageTemplate: languageOption,
109
116
  };
110
117
 
111
118
  const commonTemplate = new CommercialDocumentCommonHTML();
@@ -142,6 +149,8 @@ export function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoic
142
149
  }
143
150
 
144
151
  export function generateMailHeader(params: CreateMailHeader, shouldHideBrandName = false, nodeEnv: string | undefined = undefined): ReadCommercialMailTemplate {
152
+ const locale = params.payload.language ?? InvoiceLanguage.FR;
153
+ const languageOption = internationalizationChoices[locale];
145
154
  dayjs.locale('fr');
146
155
  const data = {
147
156
  ...params.payload,
@@ -157,6 +166,7 @@ export function generateMailHeader(params: CreateMailHeader, shouldHideBrandName
157
166
  // @ts-ignore
158
167
  brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,
159
168
  shouldHideBrandName,
169
+ languageMail: languageOption,
160
170
  };
161
171
 
162
172
  const mailTemplate = new CommercialDocumentMailHTML();
@@ -0,0 +1,421 @@
1
+ import { AccountingCategoryId } from '../../../types/Enum/CommercialManagement';
2
+ import { InternationalizationChoicesType } from './type';
3
+
4
+
5
+ export const internationalizationChoices: InternationalizationChoicesType = {
6
+ fr: {
7
+ inputLists: {
8
+ headers: {
9
+ termsOfPayment: [
10
+ 'À la livraison',
11
+ 'À la commande',
12
+ 'À réception de la facture',
13
+ 'Exigible sous 14 jours',
14
+ 'Exigible sous 30 jours',
15
+ '30 jours à réception de la facture',
16
+ '45 jours à réception de la facture',
17
+ '60 jours à réception de la facture',
18
+ ],
19
+ accountingCategories: [
20
+ { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Livraison de biens' },
21
+ { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Prestation de services' },
22
+ { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Prestation de services et livraison de biens' },
23
+ ],
24
+ },
25
+ options: {
26
+ penalties: [
27
+ 'Non applicable',
28
+ '3 fois le taux légal',
29
+ 'Taux directeur de la BCE + 10 points',
30
+ ],
31
+ discount: [
32
+ 'Non applicable',
33
+ 'Aucun escompte en cas de paiement anticipé',
34
+ ],
35
+ vatMention: [
36
+ 'Non concerné',
37
+ 'Non applicable',
38
+ 'TVA non applicable, art. 293 B du CGI',
39
+ 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',
40
+ 'Non soumis à TVA selon l\'article 261C du CGI',
41
+ 'Article 261 D du code général des impôts (CGI)',
42
+ 'Exonération de TVA, article 283-2 du Code général des impôts',
43
+ 'Exonération de la TVA : Article 262 ter I du CGI',
44
+ 'Mention de TVA 261.4.4 1 du CGI',
45
+ 'Régime particulier – Biens d\'occasion - article 297 A du CGI et directive communautaire 2006/112/CE',
46
+ 'Régime particulier – Objets d\'art - article 297 A du CGI et directive communautaire 2006/112/CE',
47
+ 'Régime particulier – Objets de collection ou d\'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE',
48
+ 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',
49
+ 'Facture soumise au régime de l’auto-liquidation de la TVA',
50
+ ],
51
+ recoveryCost: [
52
+ 'Non applicable',
53
+ '40€',
54
+ ],
55
+ paymentType: [
56
+ 'Carte bancaire',
57
+ 'Chèque',
58
+ 'Espèces',
59
+ 'Prélèvement',
60
+ 'Virement bancaire',
61
+ ],
62
+ },
63
+ },
64
+ template: {
65
+ common: {
66
+ headers: {
67
+ emissionDate: 'Date d\'émission',
68
+ accountingCategory: {
69
+ title: 'Catégorie de l\'opération',
70
+ choices: [
71
+ { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Livraison de biens' },
72
+ { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Prestation de services' },
73
+ { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Prestation de services et livraison de biens' },
74
+ ],
75
+ },
76
+ },
77
+ footer: {
78
+ capital: 'au capital de',
79
+ siren: 'immatriculée sous le SIREN',
80
+ vatCode: 'N° TVA',
81
+ marginVat: 'Régime TVA sur marge',
82
+ legalVatMention: 'ART 297-A du CGI ou directive 2006-212 CE',
83
+ shouldPayTaxAfterDebit: 'Option pour le paiement de la taxe d\'après les débits',
84
+ penalties: 'Pénalités en cas de retard',
85
+ discount: 'Escompte',
86
+ recoveryCosts: 'Indemnités forfaitaire en cas de retard',
87
+ generate: 'Généré par',
88
+ },
89
+ options: {
90
+ vatMention: 'Mention TVA',
91
+ paymentType: 'Mode de paiement',
92
+ bank: 'BANQUE',
93
+ approval: 'Bon pour accord',
94
+ comment: 'Commentaire',
95
+ },
96
+ table: {
97
+ headers: {
98
+ product: 'Article',
99
+ quantity: 'Quantité',
100
+ unitPrice: 'P.U HT',
101
+ unitPriceWithoutVat: 'P.U',
102
+ discount: 'Remise',
103
+ vat: 'TVA',
104
+ amount: 'Montant HT',
105
+ amountWithoutVat: 'Montant',
106
+ base: 'Base',
107
+ rate: 'Taux',
108
+ vatAmount: 'Montant TVA',
109
+ recap: 'Récapitulatif',
110
+ },
111
+ lines: {
112
+ totalHt: 'Total HT',
113
+ vat: 'TVA',
114
+ totalTTC: 'Total TTC',
115
+ totalWhitoutVat: 'Total',
116
+ deposit: 'Acompte',
117
+ remainderToPay: 'Reste à payer',
118
+ netToPay: 'Net à payer',
119
+ },
120
+ },
121
+ },
122
+ invoice: {
123
+ headers: {
124
+ title: 'Facture',
125
+ dueDate: 'Date d\'échéance',
126
+ termsOfPayment: 'Date limite de règlement',
127
+ },
128
+ },
129
+ estimate: {
130
+ headers: {
131
+ title: 'Devis',
132
+ dueDate: 'Valide jusq\'au',
133
+ termsOfPayment: 'Conditions de règlement',
134
+ },
135
+ },
136
+ orderForm: {
137
+ headers: {
138
+ title: 'Bon de commande',
139
+ dueDate: 'Date d\'échéance',
140
+ termsOfPayment: 'Conditions de règlement',
141
+ },
142
+
143
+ },
144
+ deposit: {
145
+ headers: {
146
+ title: 'Accompte',
147
+ expirationDate: 'Date d\'expiration',
148
+ termsOfPayment: 'Date limite de règlement',
149
+ },
150
+ },
151
+ asset: {
152
+ headers: {
153
+ title: 'Avoir',
154
+ dueDate: 'Date d\'échéance',
155
+ termsOfPayment: 'Date limite de règlement',
156
+ },
157
+ },
158
+ remainder: {
159
+ headers: {
160
+ title: 'reste',
161
+ dueDate: 'Date d\'échéance',
162
+ termsOfPayment: 'Date limite de règlement',
163
+ },
164
+ },
165
+ draft: {
166
+ headers: {
167
+ title: 'Brouillon',
168
+ dueDate: 'Date d\'échéance',
169
+ termsOfPayment: 'Date limite de règlement',
170
+ },
171
+ },
172
+ },
173
+ mail: {
174
+ common: {
175
+ dueDate: 'Échéance',
176
+ generate: 'Généré par',
177
+ displayDocument: 'Afficher le document',
178
+ totalHt: 'Total HT',
179
+ totalVat: 'Total TVA',
180
+ totalTtc: 'Total TTC',
181
+ },
182
+ invoice: {
183
+ title: 'cette facture',
184
+ subTitle: 'Facture',
185
+ },
186
+ estimate: {
187
+ title: 'ce devis',
188
+ subTitle: 'Devis',
189
+ },
190
+ orderForm: {
191
+ title: 'ce bon de commande',
192
+ subTitle: 'Bon de commande',
193
+ },
194
+ deposit: {
195
+ title: 'cet acompte',
196
+ subTitle: 'Acompte',
197
+ },
198
+ asset: {
199
+ title: 'cet avoir',
200
+ subTitle: 'Avoir',
201
+ },
202
+ remainder: {
203
+ title: 'cette facture',
204
+ subTitle: 'Facture',
205
+ },
206
+ default: {
207
+ title: 'ce document',
208
+ subTitle: 'Document',
209
+ },
210
+
211
+ },
212
+ },
213
+ en: {
214
+ inputLists: {
215
+ headers: {
216
+ termsOfPayment: [
217
+ 'On delivery',
218
+ 'On order',
219
+ 'Upon receipt of invoice',
220
+ 'Due within 14 days',
221
+ 'Due within 30 days',
222
+ '30 days upon receipt of invoice',
223
+ '45 days upon receipt of invoice',
224
+ '60 days upon receipt of invoice',
225
+ ],
226
+ accountingCategories: [
227
+ { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Delivery of goods' },
228
+ { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services delivery' },
229
+ { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services and goods delivery' },
230
+ ],
231
+ },
232
+ options: {
233
+ penalties: [
234
+ 'Not applicable',
235
+ '3 times the legal rate',
236
+ 'ECB key rate + 10 points',
237
+ ],
238
+ discount: [
239
+ 'Not applicable',
240
+ 'No discount for early payment',
241
+ ],
242
+ vatMention: [
243
+ 'Not affected',
244
+ 'Not applicable',
245
+ 'VAT not applicable, art. 293 B of the FGTC',
246
+ 'VAT not applicable - Exports outside the EU - Art. 259-1 FGTC',
247
+ 'Not subject to VAT under article 261C of the FGTC',
248
+ 'Article 261 D of the French General Tax Code (FGTC)',
249
+ 'VAT exemption, article 283-2 of the French General Tax Code',
250
+ 'VAT exemption: Article 262 ter I of the FGTC',
251
+ 'VAT notice 261.4.4 1 of the FGTC',
252
+ 'Special regime - Second-hand goods - article 297 A of the FGTC and EC directive 2006/112/EC',
253
+ 'Special regime - Works of art - article 297 A of the FGTC and EC directive 2006/112/EC',
254
+ 'Special regime – Collector\'s items and antiques - article 297 A of the FGTC and EC directive 2006/112/EC',
255
+ 'Special regime - Travel agencies - article 297 A of the FGTC and EC directive 2006/112/EC',
256
+ 'Invoice subject to VAT reverse charge system',
257
+ ],
258
+ recoveryCost: [
259
+ 'Not applicable',
260
+ '40€',
261
+ ],
262
+ paymentType: [
263
+ 'Credit card',
264
+ 'Check',
265
+ 'Cash',
266
+ 'Withdrawal',
267
+ 'Bank transfer',
268
+ ],
269
+ },
270
+ },
271
+ template: {
272
+ common: {
273
+ headers: {
274
+ emissionDate: 'Emission date',
275
+ accountingCategory: {
276
+ title: 'Accounting category',
277
+ choices: [
278
+ { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Delivery of goods' },
279
+ { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services delivery' },
280
+ { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services and goods delivery' },
281
+ ],
282
+ },
283
+ },
284
+ footer: {
285
+ capital: 'with capital of',
286
+ siren: 'registered under SIREN',
287
+ vatCode: 'VAT number',
288
+ marginVat: 'VAT margin scheme',
289
+ legalVatMention: 'ART 297-A of the FGTC or directive 2006-212 EC',
290
+ shouldPayTaxAfterDebit: 'Option to pay tax on debits',
291
+ penalties: 'Late payment penalties',
292
+ discount: 'discount',
293
+ recoveryCosts: 'Recovery cost for delays',
294
+ generate: 'Created by',
295
+ },
296
+ options: {
297
+ vatMention: 'VAT mention',
298
+ paymentType: 'payment type',
299
+ bank: 'BANK',
300
+ approval: 'For apprval',
301
+ comment: 'Comment',
302
+
303
+ },
304
+ table: {
305
+ headers: {
306
+ product: 'Product',
307
+ quantity: 'Quantity',
308
+ unitPrice: 'Excl. tax unit price',
309
+ unitPriceWithoutVat: 'Unit price',
310
+ discount: 'Discount',
311
+ vat: 'VAT',
312
+ amount: 'Amount excl. tax',
313
+ amountWithoutVat: 'Amount',
314
+ base: 'Base',
315
+ rate: 'Rate',
316
+ vatAmount: 'VAT amount',
317
+ recap: 'Recap',
318
+ },
319
+ lines: {
320
+ totalHt: 'Amount excl. tax',
321
+ vat: 'VAT',
322
+ totalTTC: 'Amount incl. tax',
323
+ totalWhitoutVat: 'Amount',
324
+ deposit: 'Deposit',
325
+ remainderToPay: 'Remainder to pay',
326
+ netToPay: 'Net to pay',
327
+ },
328
+ },
329
+ },
330
+ invoice: {
331
+ headers: {
332
+ title: 'Invoice',
333
+ dueDate: 'Due date',
334
+ termsOfPayment: 'Deadline for payment',
335
+ },
336
+ },
337
+ estimate: {
338
+ headers: {
339
+ title: 'Estimate',
340
+ dueDate: 'Valid until',
341
+ termsOfPayment: 'Term of payment',
342
+ },
343
+ },
344
+ orderForm: {
345
+ headers: {
346
+ title: 'Order form',
347
+ dueDate: 'Valid until',
348
+ termsOfPayment: 'Term of payment',
349
+ },
350
+
351
+ },
352
+ deposit: {
353
+ headers: {
354
+ title: 'Deposit',
355
+ expirationDate: 'Expiration date',
356
+ termsOfPayment: 'Deadline for payment',
357
+ },
358
+ },
359
+ asset: {
360
+ headers: {
361
+ title: 'Asset',
362
+ dueDate: 'Due date',
363
+ termsOfPayment: 'Deadline for payment',
364
+ },
365
+ },
366
+ remainder: {
367
+ headers: {
368
+ title: 'Remainder',
369
+ dueDate: 'Due date',
370
+ termsOfPayment: 'Deadline for payment',
371
+ },
372
+ },
373
+ draft: {
374
+ headers: {
375
+ title: 'Draft',
376
+ dueDate: 'Due date',
377
+ termsOfPayment: 'Deadline for payment',
378
+ },
379
+ },
380
+ },
381
+ mail: {
382
+ common: {
383
+ dueDate: 'Due date',
384
+ generate: 'Created by',
385
+ displayDocument: 'Display document',
386
+ totalHt: 'Total excl. tax',
387
+ totalVat: 'Total VAT',
388
+ totalTtc: 'Total incl. tax',
389
+ },
390
+ invoice: {
391
+ title: 'this invoice',
392
+ subTitle: 'Invoice',
393
+ },
394
+ estimate: {
395
+ title: 'this estimate',
396
+ subTitle: 'Estimate',
397
+ },
398
+ orderForm: {
399
+ title: 'this order form',
400
+ subTitle: 'Order form',
401
+ },
402
+ deposit: {
403
+ title: 'this deposit',
404
+ subTitle: 'Deposit',
405
+ },
406
+ asset: {
407
+ title: 'this asset',
408
+ subTitle: 'Asset',
409
+ },
410
+ remainder: {
411
+ title: 'this invoice',
412
+ subTitle: 'Invoice',
413
+ },
414
+ default: {
415
+ title: 'this document',
416
+ subTitle: 'Document',
417
+ },
418
+
419
+ },
420
+ },
421
+ };
@@ -0,0 +1,156 @@
1
+ import { AccountingCategoryId } from '../../../types/Enum/CommercialManagement';
2
+
3
+ export type InternationalizationChoicesHeaders = {
4
+ termsOfPayment: string[];
5
+ accountingCategories: Array<{ label: string; id: AccountingCategoryId }>;
6
+ };
7
+
8
+ export type InternationalizationChoicesOptions = {
9
+ penalties: string[];
10
+ vatMention: string[];
11
+ discount: string[];
12
+ recoveryCost: string[];
13
+ paymentType: string[];
14
+ };
15
+
16
+ export type InternationalizationChoiceInputList = {
17
+ headers: InternationalizationChoicesHeaders;
18
+ options: InternationalizationChoicesOptions;
19
+ };
20
+
21
+ export type InternationalizationChoicesTemplateCommonHeader = {
22
+ emissionDate: string;
23
+ accountingCategory: {
24
+ title: string;
25
+ choices: Array<{ label: string; id: AccountingCategoryId }>;
26
+ },
27
+ };
28
+
29
+ export type InternationalizationChoiceTemplateSpecificHeader = {
30
+ title: string;
31
+ dueDate: string;
32
+ termsOfPayment: string;
33
+ };
34
+
35
+ export type InternationlizationChoiceTemplateSpecificDepositHeader = {
36
+ title: string;
37
+ expirationDate: string
38
+ termsOfPayment: string;
39
+ };
40
+
41
+ export type InternationalizationChoiceTemplateFooter = {
42
+ penalties: string;
43
+ discount: string;
44
+ recoveryCosts: string;
45
+ capital: string;
46
+ siren: string;
47
+ vatCode: string;
48
+ marginVat: string;
49
+ legalVatMention: string;
50
+ shouldPayTaxAfterDebit: string;
51
+ generate: string;
52
+ };
53
+
54
+
55
+ export type InternationalizationChoiceTemplateOptions = {
56
+ vatMention: string;
57
+ paymentType: string;
58
+ bank: string;
59
+ approval: string;
60
+ comment: string;
61
+
62
+ };
63
+
64
+ export type InternationalizationChoiceTemplateTable = {
65
+ headers: {
66
+ product:string;
67
+ quantity: string;
68
+ unitPrice: string;
69
+ unitPriceWithoutVat: string;
70
+ discount: string;
71
+ vat: string;
72
+ amount: string;
73
+ amountWithoutVat: string;
74
+ base: string;
75
+ rate: string;
76
+ vatAmount: string;
77
+ recap: string;
78
+ },
79
+ lines: {
80
+ totalHt: string;
81
+ vat: string;
82
+ totalTTC: string;
83
+ totalWhitoutVat: string;
84
+ netToPay: string;
85
+ remainderToPay: string;
86
+ deposit: string
87
+ },
88
+ };
89
+
90
+ export type InternationalizationChoiceTemplateCommon = {
91
+ headers: InternationalizationChoicesTemplateCommonHeader;
92
+ footer: InternationalizationChoiceTemplateFooter;
93
+ options: InternationalizationChoiceTemplateOptions;
94
+ table: InternationalizationChoiceTemplateTable;
95
+ };
96
+
97
+ export type InternationalizationChoiceTemplate = {
98
+ common: InternationalizationChoiceTemplateCommon,
99
+ invoice: {
100
+ headers: InternationalizationChoiceTemplateSpecificHeader,
101
+ },
102
+ estimate: {
103
+ headers: InternationalizationChoiceTemplateSpecificHeader,
104
+ },
105
+ orderForm: {
106
+ headers: InternationalizationChoiceTemplateSpecificHeader,
107
+ },
108
+ deposit: {
109
+ headers: InternationlizationChoiceTemplateSpecificDepositHeader,
110
+ },
111
+ asset: {
112
+ headers: InternationalizationChoiceTemplateSpecificHeader,
113
+ },
114
+ remainder: {
115
+ headers: InternationalizationChoiceTemplateSpecificHeader,
116
+ },
117
+ draft: {
118
+ headers: InternationalizationChoiceTemplateSpecificHeader,
119
+ },
120
+ };
121
+
122
+ export type InternationalizationChoiceMailCommon = {
123
+ dueDate: string;
124
+ generate: string;
125
+ displayDocument: string;
126
+ totalHt: string
127
+ totalVat: string;
128
+ totalTtc: string;
129
+ };
130
+
131
+ export type InternationalizationChoiceMailSpecific = {
132
+ title: string;
133
+ subTitle: string;
134
+ };
135
+
136
+ export type InternationalizationChoiceMail = {
137
+ common: InternationalizationChoiceMailCommon;
138
+ invoice: InternationalizationChoiceMailSpecific;
139
+ estimate: InternationalizationChoiceMailSpecific;
140
+ orderForm: InternationalizationChoiceMailSpecific;
141
+ deposit: InternationalizationChoiceMailSpecific;
142
+ asset: InternationalizationChoiceMailSpecific;
143
+ remainder: InternationalizationChoiceMailSpecific;
144
+ default: InternationalizationChoiceMailSpecific;
145
+ };
146
+
147
+ export type InternationalizationChoices = {
148
+ inputLists: InternationalizationChoiceInputList;
149
+ template: InternationalizationChoiceTemplate;
150
+ mail: InternationalizationChoiceMail;
151
+
152
+ };
153
+
154
+ export type InternationalizationChoicesType = {
155
+ [key: string]: InternationalizationChoices
156
+ };