@silexpert/core 1.2.81 → 1.2.82

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 (38) hide show
  1. package/dist/cjs/types/Enum/AppointmentState.d.ts +6 -1
  2. package/dist/cjs/types/Enum/AppointmentState.d.ts.map +1 -1
  3. package/dist/cjs/types/Enum/AppointmentState.js +5 -0
  4. package/dist/cjs/types/Enum/AppointmentState.js.map +1 -1
  5. package/dist/cjs/types/Enum/CommercialManagement.d.ts.map +1 -1
  6. package/dist/cjs/types/Enum/CommercialManagement.js +5 -36
  7. package/dist/cjs/types/Enum/CommercialManagement.js.map +1 -1
  8. package/dist/cjs/types/Enum/IncomeStatement.js +1 -1
  9. package/dist/cjs/types/Enum/IncomeStatement.js.map +1 -1
  10. package/dist/cjs/utils/commercialManagement/document.d.ts.map +1 -1
  11. package/dist/cjs/utils/commercialManagement/document.js +21 -16
  12. package/dist/cjs/utils/commercialManagement/document.js.map +1 -1
  13. package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts +1 -1
  14. package/dist/cjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
  15. package/dist/cjs/utils/commercialManagement/internationalization/choices.js +15 -1
  16. package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
  17. package/dist/mjs/types/Enum/AppointmentState.d.ts +6 -1
  18. package/dist/mjs/types/Enum/AppointmentState.d.ts.map +1 -1
  19. package/dist/mjs/types/Enum/AppointmentState.js +5 -0
  20. package/dist/mjs/types/Enum/AppointmentState.js.map +1 -1
  21. package/dist/mjs/types/Enum/CommercialManagement.d.ts.map +1 -1
  22. package/dist/mjs/types/Enum/CommercialManagement.js +5 -36
  23. package/dist/mjs/types/Enum/CommercialManagement.js.map +1 -1
  24. package/dist/mjs/types/Enum/IncomeStatement.js +1 -1
  25. package/dist/mjs/types/Enum/IncomeStatement.js.map +1 -1
  26. package/dist/mjs/utils/commercialManagement/document.d.ts.map +1 -1
  27. package/dist/mjs/utils/commercialManagement/document.js +10 -5
  28. package/dist/mjs/utils/commercialManagement/document.js.map +1 -1
  29. package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts +1 -1
  30. package/dist/mjs/utils/commercialManagement/internationalization/choices.d.ts.map +1 -1
  31. package/dist/mjs/utils/commercialManagement/internationalization/choices.js +15 -1
  32. package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
  33. package/package.json +1 -1
  34. package/ts/types/Enum/AppointmentState.ts +5 -0
  35. package/ts/types/Enum/CommercialManagement.ts +10 -36
  36. package/ts/types/Enum/IncomeStatement.ts +1 -1
  37. package/ts/utils/commercialManagement/document.ts +11 -5
  38. package/ts/utils/commercialManagement/internationalization/choices.ts +17 -2
@@ -1 +1 @@
1
- {"version":3,"file":"choices.js","sourceRoot":"","sources":["../../../../../ts/utils/commercialManagement/internationalization/choices.ts"],"names":[],"mappings":";;;AAAA,mFAAiG;AAWpF,QAAA,2BAA2B,GAAoC;IAC1E,EAAE,EAAE;QACF,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,cAAc,EAAE;oBACd,gBAAgB;oBAChB,eAAe;oBACf,2BAA2B;oBAC3B,wBAAwB;oBACxB,wBAAwB;oBACxB,oCAAoC;oBACpC,oCAAoC;oBACpC,oCAAoC;iBACrC;gBACD,oBAAoB,EAAE;oBACpB,EAAE,EAAE,EAAE,2CAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,oBAAoB,EAAE;oBAC1E,EAAE,EAAE,EAAE,2CAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,wBAAwB,EAAE;oBAC9E,EAAE,EAAE,EAAE,2CAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,8CAA8C,EAAE;iBACrG;aACF;YACD,OAAO,EAAE;gBACP,SAAS,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,sCAAsC,CAAC;gBAC7F,QAAQ,EAAE,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;gBAC1E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E,EAAE,EAAE,oCAAoC;YACxC,EAAE,EAAE,iCAAiC;SACtC;KACF;CACF,CAAC;AAEK,MAAM,+BAA+B,GAAG,CAC7C,QAAyB,EACzB,KAAa,EACb,GAAuC,EACnB,EAAE;;IACtB,MAAM,gBAAgB,GAAG,4BAA4B,CAAC,GAAG,CAAC,CAAC;IAC3D,OAAO,QAAQ,KAAK,sCAAe,CAAC,EAAE;QACpC,CAAC,CAAC,MAAA,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,0CAAE,EAAE;QACtD,CAAC,CAAC,MAAA,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,0CAAE,EAAE,CAAC;AAC3D,CAAC,CAAC;AATW,QAAA,+BAA+B,mCAS1C","sourcesContent":["import { AccountingCategoryId, InvoiceLanguage } from '../../../types/Enum/CommercialManagement';\nimport { InternationalizationChoicesType } from './type';\n\ntype InternationalizationConsistencyKey =\n | 'penalties'\n | 'discount'\n | 'vatMention'\n | 'recoveryCost'\n | 'paymentType'\n | 'termsOfPayment';\n\nexport const internationalizationChoices: InternationalizationChoicesType = {\n fr: {\n inputLists: {\n headers: {\n termsOfPayment: [\n 'À la livraison',\n 'À la commande',\n 'À réception de la facture',\n 'Exigible sous 14 jours',\n 'Exigible sous 30 jours',\n '30 jours à réception de la facture',\n '45 jours à réception de la facture',\n '60 jours à réception de la facture',\n ],\n accountingCategories: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Livraison de biens' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Prestation de services' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Prestation de services et livraison de biens' },\n ],\n },\n options: {\n penalties: ['Non applicable', '3 fois le taux légal', 'Taux directeur de la BCE + 10 points'],\n discount: ['Non applicable', 'Aucun escompte en cas de paiement anticipé'],\n vatMention: [\n 'Non concerné',\n 'Non applicable',\n 'TVA non applicable, art. 293 B du CGI',\n 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',\n \"Non soumis à TVA selon l'article 261C du CGI\",\n 'Article 261 D du code général des impôts (CGI)',\n 'Exonération de TVA, article 283-2 du Code général des impôts',\n 'Exonération de la TVA : Article 262 ter I du CGI',\n 'Mention de TVA 261.4.4 1 du CGI',\n \"Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE\",\n \"Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE\",\n \"Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE\",\n 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',\n 'Facture soumise au régime de l’auto-liquidation de la TVA',\n ],\n recoveryCost: ['Non applicable', '40€'],\n paymentType: ['Carte bancaire', 'Chèque', 'Espèces', 'Prélèvement', 'Virement bancaire'],\n },\n },\n template: {\n common: {\n headers: {\n emissionDate: \"Date d'émission\",\n accountingCategory: {\n title: \"Catégorie de l'opération\",\n choices: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Livraison de biens' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Prestation de services' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Prestation de services et livraison de biens' },\n ],\n },\n },\n footer: {\n capital: 'au capital de',\n siren: 'immatriculée sous le SIREN',\n vatCode: 'N° TVA',\n marginVat: 'Régime TVA sur marge',\n legalVatMention: 'ART 297-A du CGI ou directive 2006-212 CE',\n shouldPayTaxAfterDebit: \"Option pour le paiement de la taxe d'après les débits\",\n penalties: 'Pénalités en cas de retard',\n discount: 'Escompte',\n recoveryCosts: 'Indemnités forfaitaire en cas de retard',\n generate: 'Généré par',\n },\n options: {\n vatMention: 'Mention TVA',\n paymentType: 'Mode de paiement',\n bank: 'BANQUE',\n approval: 'Bon pour accord',\n comment: 'Commentaire',\n },\n table: {\n headers: {\n product: 'Article',\n quantity: 'Quantité',\n unitPrice: 'P.U HT',\n unitPriceWithoutVat: 'P.U',\n discount: 'Remise',\n vat: 'TVA',\n amount: 'Montant HT',\n amountWithoutVat: 'Montant',\n base: 'Base',\n rate: 'Taux',\n vatAmount: 'Montant TVA',\n recap: 'Récapitulatif',\n },\n lines: {\n totalHt: 'Total HT',\n vat: 'TVA',\n totalTTC: 'Total TTC',\n totalWhitoutVat: 'Total',\n deposit: 'Acompte',\n remainderToPay: 'Reste à payer',\n netToPay: 'Net à payer',\n },\n },\n },\n invoice: {\n headers: {\n title: 'Facture',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n estimate: {\n headers: {\n title: 'Devis',\n dueDate: \"Valide jusqu'au\",\n termsOfPayment: 'Conditions de règlement',\n },\n },\n orderForm: {\n headers: {\n title: 'Bon de commande',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Conditions de règlement',\n },\n },\n deposit: {\n headers: {\n title: \"Facture d'acompte\",\n expirationDate: \"Date d'expiration\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n asset: {\n headers: {\n title: 'Avoir',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n remainder: {\n headers: {\n title: 'Facture de solde',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n draft: {\n headers: {\n title: 'Brouillon',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n },\n mail: {\n common: {\n dueDate: 'Échéance',\n generate: 'Généré par',\n displayDocument: 'Afficher le document',\n totalHt: 'Total HT',\n totalVat: 'Total TVA',\n totalTtc: 'Total TTC',\n send: 'vous adresse',\n },\n invoice: {\n title: 'cette facture',\n subTitle: 'Facture',\n },\n estimate: {\n title: 'ce devis',\n subTitle: 'Devis',\n },\n orderForm: {\n title: 'ce bon de commande',\n subTitle: 'Bon de commande',\n },\n deposit: {\n title: 'cet acompte',\n subTitle: 'Acompte',\n },\n asset: {\n title: 'cet avoir',\n subTitle: 'Avoir',\n },\n remainder: {\n title: 'cette facture',\n subTitle: 'Facture',\n },\n default: {\n title: 'ce document',\n subTitle: 'Document',\n },\n },\n },\n en: {\n inputLists: {\n headers: {\n termsOfPayment: [\n 'On delivery',\n 'On order',\n 'Upon receipt of invoice',\n 'Due within 14 days',\n 'Due within 30 days',\n '30 days upon receipt of invoice',\n '45 days upon receipt of invoice',\n '60 days upon receipt of invoice',\n ],\n accountingCategories: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Delivery of goods' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services delivery' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services and goods delivery' },\n ],\n },\n options: {\n penalties: ['Not applicable', '3 times the legal rate', 'ECB key rate + 10 points'],\n discount: ['Not applicable', 'No discount for early payment'],\n vatMention: [\n 'Not affected',\n 'Not applicable',\n 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',\n 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',\n 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',\n 'Article 261D of the French General Tax Code (FGTC)',\n 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',\n 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',\n 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)',\n 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Invoice subject to VAT reverse charge system',\n ],\n recoveryCost: ['Not applicable', '40€'],\n paymentType: ['Credit card', 'Check', 'Cash', 'Direct debit', 'Bank transfer'],\n },\n },\n template: {\n common: {\n headers: {\n emissionDate: 'Invoice date',\n accountingCategory: {\n title: 'Transaction type',\n choices: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'supply of goods' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services provision' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services provision and supply of goods' },\n ],\n },\n },\n footer: {\n capital: 'with capital of',\n siren: 'registered under SIREN',\n vatCode: 'VAT number',\n marginVat: 'VAT margin scheme',\n legalVatMention: 'ART 297-A of the FGTC or directive 2006-212 EC',\n shouldPayTaxAfterDebit: 'Option to pay tax on debits',\n penalties: 'Late fees',\n discount: 'discount',\n recoveryCosts: 'flat-rate delay compensation',\n generate: 'Created by',\n },\n options: {\n vatMention: 'VAT mention',\n paymentType: 'payment type',\n bank: 'BANK',\n approval: 'Agreed and signed',\n comment: 'Comment',\n },\n table: {\n headers: {\n product: 'Product',\n quantity: 'Quantity',\n unitPrice: 'Excl. tax unit price',\n unitPriceWithoutVat: 'Unit price',\n discount: 'Discount',\n vat: 'VAT',\n amount: 'Amount excl. tax',\n amountWithoutVat: 'Amount',\n base: 'Base',\n rate: 'Rate',\n vatAmount: 'VAT amount',\n recap: 'Summary',\n },\n lines: {\n totalHt: 'Amount excl. tax',\n vat: 'VAT',\n totalTTC: 'Amount incl. tax',\n totalWhitoutVat: 'Amount',\n deposit: 'Deposit',\n remainderToPay: 'Remainder to pay',\n netToPay: 'Net to pay',\n },\n },\n },\n invoice: {\n headers: {\n title: 'Invoice',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n estimate: {\n headers: {\n title: 'Quotation',\n dueDate: 'Valid until',\n termsOfPayment: 'Term of payment',\n },\n },\n orderForm: {\n headers: {\n title: 'Order form',\n dueDate: 'Valid until',\n termsOfPayment: 'Term of payment',\n },\n },\n deposit: {\n headers: {\n title: 'Deposit invoice',\n expirationDate: 'expiry date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n asset: {\n headers: {\n title: 'Credit note',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n remainder: {\n headers: {\n title: 'Balance invoice',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n draft: {\n headers: {\n title: 'Draft',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n },\n mail: {\n common: {\n dueDate: 'Due date',\n generate: 'Created by',\n displayDocument: 'Display document',\n totalHt: 'Total excl. tax',\n totalVat: 'Total VAT',\n totalTtc: 'Total incl. tax',\n send: 'send you',\n },\n invoice: {\n title: 'this invoice',\n subTitle: 'Invoice',\n },\n estimate: {\n title: 'this estimate',\n subTitle: 'Estimate',\n },\n orderForm: {\n title: 'this order form',\n subTitle: 'Order form',\n },\n deposit: {\n title: 'this deposit',\n subTitle: 'Deposit',\n },\n asset: {\n title: 'this asset',\n subTitle: 'Asset',\n },\n remainder: {\n title: 'this invoice',\n subTitle: 'Invoice',\n },\n default: {\n title: 'this document',\n subTitle: 'Document',\n },\n },\n },\n};\n\nconst internationalizationMatching: { [key: string]: { fr: string; en: string }[] } = {\n penalties: [\n { fr: 'Non applicable', en: 'Not applicable' },\n { fr: '3 fois le taux légal', en: '3 times the legal rate' },\n { fr: 'Taux directeur de la BCE + 10 points', en: 'ECB key rate + 10 points' },\n ],\n discount: [\n { fr: 'Non applicable', en: 'Not applicable' },\n { fr: 'Aucun escompte en cas de paiement anticipé', en: 'No discount for early payment' },\n ],\n recoveryCost: [\n { fr: 'Non applicable', en: 'Not applicable' },\n { fr: '40€', en: '40€' },\n ],\n paymentType: [\n { fr: 'Carte bancaire', en: 'Credit card' },\n { fr: 'Chèque', en: 'Check' },\n { fr: 'Espèces', en: 'Cash' },\n { fr: 'Prélèvement', en: 'Direct debit' },\n { fr: 'Virement bancaire', en: 'Bank transfer' },\n ],\n vatMention: [\n { fr: 'Non concerné', en: 'Not affected' },\n { fr: 'Non applicable', en: 'Not applicable' },\n {\n fr: 'TVA non applicable, art. 293 B du CGI',\n en: 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',\n },\n {\n fr: 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',\n en: 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',\n },\n {\n fr: \"Non soumis à TVA selon l'article 261C du CGI\",\n en: 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',\n },\n { fr: 'Article 261 D du code général des impôts (CGI)', en: 'Article 261D of the French General Tax Code (FGTC)' },\n {\n fr: 'Exonération de TVA, article 283-2 du Code général des impôts',\n en: 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',\n },\n {\n fr: 'Exonération de la TVA : Article 262 ter I du CGI',\n en: 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',\n },\n { fr: 'Mention de TVA 261.4.4 1 du CGI', en: 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)' },\n {\n fr: \"Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE\",\n en: 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: \"Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE\",\n en: 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: \"Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE\",\n en: 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',\n en: 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: 'Facture soumise au régime de l’auto-liquidation de la TVA',\n en: 'Invoice subject to VAT reverse charge system',\n },\n ],\n termsOfPayment: [\n {\n fr: 'À la livraison',\n en: 'On delivery',\n },\n {\n fr: 'À la command',\n en: 'On order',\n },\n {\n fr: 'À réception de la facture',\n en: 'Upon receipt of invoice',\n },\n {\n fr: 'Exigible sous 14 jours',\n en: 'Due within 14 days',\n },\n {\n fr: 'Exigible sous 30 jours',\n en: 'Due within 30 days',\n },\n {\n fr: '30 jours à réception de la facture',\n en: '30 days upon receipt of invoice',\n },\n {\n fr: '45 jours à réception de la facture',\n en: '45 days upon receipt of invoice',\n },\n {\n fr: '60 jours à réception de la facture',\n en: '60 days upon receipt of invoice',\n },\n ],\n};\n\nexport const internationalizationConsistency = (\n language: InvoiceLanguage,\n value: string,\n key: InternationalizationConsistencyKey,\n): string | undefined => {\n const keyObjectToMacht = internationalizationMatching[key];\n return language === InvoiceLanguage.FR\n ? keyObjectToMacht.find((obj) => obj.fr === value)?.fr\n : keyObjectToMacht.find((obj) => obj.fr === value)?.en;\n};\n"]}
1
+ {"version":3,"file":"choices.js","sourceRoot":"","sources":["../../../../../ts/utils/commercialManagement/internationalization/choices.ts"],"names":[],"mappings":";;;AAAA,mFAAiG;AAYpF,QAAA,2BAA2B,GAAoC;IAC1E,EAAE,EAAE;QACF,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,cAAc,EAAE;oBACd,gBAAgB;oBAChB,eAAe;oBACf,2BAA2B;oBAC3B,wBAAwB;oBACxB,wBAAwB;oBACxB,oCAAoC;oBACpC,oCAAoC;oBACpC,oCAAoC;iBACrC;gBACD,oBAAoB,EAAE;oBACpB,EAAE,EAAE,EAAE,2CAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,oBAAoB,EAAE;oBAC1E,EAAE,EAAE,EAAE,2CAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,wBAAwB,EAAE;oBAC9E,EAAE,EAAE,EAAE,2CAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,8CAA8C,EAAE;iBACrG;aACF;YACD,OAAO,EAAE;gBACP,SAAS,EAAE,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E,oCAAoC;YACxC,EAAE,EAAE,iCAAiC;SACtC;QACD;YACE,EAAE,EAAE,oCAAoC;YACxC,EAAE,EAAE,iCAAiC;SACtC;QACD;YACE,EAAE,EAAE,oCAAoC;YACxC,EAAE,EAAE,iCAAiC;SACtC;KACF;IACD,kBAAkB,EAAE;QAClB;YACE,EAAE,EAAE,oBAAoB;YACxB,EAAE,EAAE,iBAAiB;SACtB;QACD;YACE,EAAE,EAAE,wBAAwB;YAC5B,EAAE,EAAE,oBAAoB;SACzB;QACD;YACE,EAAE,EAAE,8CAA8C;YAClD,EAAE,EAAE,wCAAwC;SAC7C;KACF;CACF,CAAC;AAEK,MAAM,+BAA+B,GAAG,CAC7C,QAAyB,EACzB,KAAa,EACb,GAAuC,EACnB,EAAE;;IACtB,MAAM,gBAAgB,GAAG,4BAA4B,CAAC,GAAG,CAAC,CAAC;IAC3D,OAAO,QAAQ,KAAK,sCAAe,CAAC,EAAE;QACpC,CAAC,CAAC,MAAA,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,0CAAE,EAAE;QACtD,CAAC,CAAC,MAAA,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,CAAC,0CAAE,EAAE,CAAC;AAC3D,CAAC,CAAC;AATW,QAAA,+BAA+B,mCAS1C","sourcesContent":["import { AccountingCategoryId, InvoiceLanguage } from '../../../types/Enum/CommercialManagement';\nimport { InternationalizationChoicesType } from './type';\n\ntype InternationalizationConsistencyKey =\n | 'penalties'\n | 'discount'\n | 'vatMention'\n | 'recoveryCost'\n | 'paymentType'\n | 'termsOfPayment'\n | 'accountingCategory';\n\nexport const internationalizationChoices: InternationalizationChoicesType = {\n fr: {\n inputLists: {\n headers: {\n termsOfPayment: [\n 'À la livraison',\n 'À la commande',\n 'À réception de la facture',\n 'Exigible sous 14 jours',\n 'Exigible sous 30 jours',\n '30 jours à réception de la facture',\n '45 jours à réception de la facture',\n '60 jours à réception de la facture',\n ],\n accountingCategories: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Livraison de biens' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Prestation de services' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Prestation de services et livraison de biens' },\n ],\n },\n options: {\n penalties: ['Non applicable', '3 fois le taux légal', 'Taux directeur de la BCE + 10 points'],\n discount: ['Non applicable', 'Aucun escompte en cas de paiement anticipé'],\n vatMention: [\n 'Non concerné',\n 'Non applicable',\n 'TVA non applicable, art. 293 B du CGI',\n 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',\n \"Non soumis à TVA selon l'article 261C du CGI\",\n 'Article 261 D du code général des impôts (CGI)',\n 'Exonération de TVA, article 283-2 du Code général des impôts',\n 'Exonération de la TVA : Article 262 ter I du CGI',\n 'Mention de TVA 261.4.4 1 du CGI',\n \"Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE\",\n \"Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE\",\n \"Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE\",\n 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',\n 'Facture soumise au régime de l’auto-liquidation de la TVA',\n ],\n recoveryCost: ['Non applicable', '40€'],\n paymentType: ['Carte bancaire', 'Chèque', 'Espèces', 'Prélèvement', 'Virement bancaire'],\n },\n },\n template: {\n common: {\n headers: {\n emissionDate: \"Date d'émission\",\n accountingCategory: {\n title: \"Catégorie de l'opération\",\n choices: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Livraison de biens' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Prestation de services' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Prestation de services et livraison de biens' },\n ],\n },\n },\n footer: {\n capital: 'au capital de',\n siren: 'immatriculée sous le SIREN',\n vatCode: 'N° TVA',\n marginVat: 'Régime TVA sur marge',\n legalVatMention: 'ART 297-A du CGI ou directive 2006-212 CE',\n shouldPayTaxAfterDebit: \"Option pour le paiement de la taxe d'après les débits\",\n penalties: 'Pénalités en cas de retard',\n discount: 'Escompte',\n recoveryCosts: 'Indemnités forfaitaire en cas de retard',\n generate: 'Généré par',\n },\n options: {\n vatMention: 'Mention TVA',\n paymentType: 'Mode de paiement',\n bank: 'BANQUE',\n approval: 'Bon pour accord',\n comment: 'Commentaire',\n },\n table: {\n headers: {\n product: 'Article',\n quantity: 'Quantité',\n unitPrice: 'P.U HT',\n unitPriceWithoutVat: 'P.U',\n discount: 'Remise',\n vat: 'TVA',\n amount: 'Montant HT',\n amountWithoutVat: 'Montant',\n base: 'Base',\n rate: 'Taux',\n vatAmount: 'Montant TVA',\n recap: 'Récapitulatif',\n },\n lines: {\n totalHt: 'Total HT',\n vat: 'TVA',\n totalTTC: 'Total TTC',\n totalWhitoutVat: 'Total',\n deposit: 'Acompte',\n remainderToPay: 'Reste à payer',\n netToPay: 'Net à payer',\n },\n },\n },\n invoice: {\n headers: {\n title: 'Facture',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n estimate: {\n headers: {\n title: 'Devis',\n dueDate: \"Valide jusqu'au\",\n termsOfPayment: 'Conditions de règlement',\n },\n },\n orderForm: {\n headers: {\n title: 'Bon de commande',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Conditions de règlement',\n },\n },\n deposit: {\n headers: {\n title: \"Facture d'acompte\",\n expirationDate: \"Date d'expiration\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n asset: {\n headers: {\n title: 'Avoir',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n remainder: {\n headers: {\n title: 'Facture de solde',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n draft: {\n headers: {\n title: 'Brouillon',\n dueDate: \"Date d'échéance\",\n termsOfPayment: 'Date limite de règlement',\n },\n },\n },\n mail: {\n common: {\n dueDate: 'Échéance',\n generate: 'Généré par',\n displayDocument: 'Afficher le document',\n totalHt: 'Total HT',\n totalVat: 'Total TVA',\n totalTtc: 'Total TTC',\n send: 'vous adresse',\n },\n invoice: {\n title: 'cette facture',\n subTitle: 'Facture',\n },\n estimate: {\n title: 'ce devis',\n subTitle: 'Devis',\n },\n orderForm: {\n title: 'ce bon de commande',\n subTitle: 'Bon de commande',\n },\n deposit: {\n title: 'cet acompte',\n subTitle: 'Acompte',\n },\n asset: {\n title: 'cet avoir',\n subTitle: 'Avoir',\n },\n remainder: {\n title: 'cette facture',\n subTitle: 'Facture',\n },\n default: {\n title: 'ce document',\n subTitle: 'Document',\n },\n },\n },\n en: {\n inputLists: {\n headers: {\n termsOfPayment: [\n 'On delivery',\n 'On order',\n 'Upon receipt of invoice',\n 'Due within 14 days',\n 'Due within 30 days',\n '30 days upon receipt of invoice',\n '45 days upon receipt of invoice',\n '60 days upon receipt of invoice',\n ],\n accountingCategories: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Delivery of goods' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services delivery' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services and goods delivery' },\n ],\n },\n options: {\n penalties: ['Not applicable', '3 times the legal rate', 'ECB key rate + 10 points'],\n discount: ['Not applicable', 'No discount for early payment'],\n vatMention: [\n 'Not affected',\n 'Not applicable',\n 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',\n 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',\n 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',\n 'Article 261D of the French General Tax Code (FGTC)',\n 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',\n 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',\n 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)',\n 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n 'Invoice subject to VAT reverse charge system',\n ],\n recoveryCost: ['Not applicable', '40€'],\n paymentType: ['Credit card', 'Check', 'Cash', 'Direct debit', 'Bank transfer'],\n },\n },\n template: {\n common: {\n headers: {\n emissionDate: 'Invoice date',\n accountingCategory: {\n title: 'Transaction type',\n choices: [\n { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Supply of goods' },\n { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services provision' },\n { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services provision and supply of goods' },\n ],\n },\n },\n footer: {\n capital: 'with capital of',\n siren: 'registered under SIREN',\n vatCode: 'VAT number',\n marginVat: 'VAT margin scheme',\n legalVatMention: 'ART 297-A of the FGTC or directive 2006-212 EC',\n shouldPayTaxAfterDebit: 'Option to pay tax on debits',\n penalties: 'Late fees',\n discount: 'discount',\n recoveryCosts: 'flat-rate delay compensation',\n generate: 'Created by',\n },\n options: {\n vatMention: 'VAT mention',\n paymentType: 'payment type',\n bank: 'BANK',\n approval: 'Agreed and signed',\n comment: 'Comment',\n },\n table: {\n headers: {\n product: 'Product',\n quantity: 'Quantity',\n unitPrice: 'Excl. tax unit price',\n unitPriceWithoutVat: 'Unit price',\n discount: 'Discount',\n vat: 'VAT',\n amount: 'Amount excl. tax',\n amountWithoutVat: 'Amount',\n base: 'Base',\n rate: 'Rate',\n vatAmount: 'VAT amount',\n recap: 'Summary',\n },\n lines: {\n totalHt: 'Amount excl. tax',\n vat: 'VAT',\n totalTTC: 'Amount incl. tax',\n totalWhitoutVat: 'Amount',\n deposit: 'Deposit',\n remainderToPay: 'Remainder to pay',\n netToPay: 'Net to pay',\n },\n },\n },\n invoice: {\n headers: {\n title: 'Invoice',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n estimate: {\n headers: {\n title: 'Quotation',\n dueDate: 'Valid until',\n termsOfPayment: 'Term of payment',\n },\n },\n orderForm: {\n headers: {\n title: 'Order form',\n dueDate: 'Valid until',\n termsOfPayment: 'Term of payment',\n },\n },\n deposit: {\n headers: {\n title: 'Deposit invoice',\n expirationDate: 'expiry date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n asset: {\n headers: {\n title: 'Credit note',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n remainder: {\n headers: {\n title: 'Balance invoice',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n draft: {\n headers: {\n title: 'Draft',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n },\n mail: {\n common: {\n dueDate: 'Due date',\n generate: 'Created by',\n displayDocument: 'Display document',\n totalHt: 'Total excl. tax',\n totalVat: 'Total VAT',\n totalTtc: 'Total incl. tax',\n send: 'send you',\n },\n invoice: {\n title: 'this invoice',\n subTitle: 'Invoice',\n },\n estimate: {\n title: 'this estimate',\n subTitle: 'Estimate',\n },\n orderForm: {\n title: 'this order form',\n subTitle: 'Order form',\n },\n deposit: {\n title: 'this deposit',\n subTitle: 'Deposit',\n },\n asset: {\n title: 'this asset',\n subTitle: 'Asset',\n },\n remainder: {\n title: 'this invoice',\n subTitle: 'Invoice',\n },\n default: {\n title: 'this document',\n subTitle: 'Document',\n },\n },\n },\n};\n\nconst internationalizationMatching: { [key: string]: { fr: string; en: string }[] } = {\n penalties: [\n { fr: 'Non applicable', en: 'Not applicable' },\n { fr: '3 fois le taux légal', en: '3 times the legal rate' },\n { fr: 'Taux directeur de la BCE + 10 points', en: 'ECB key rate + 10 points' },\n ],\n discount: [\n { fr: 'Non applicable', en: 'Not applicable' },\n { fr: 'Aucun escompte en cas de paiement anticipé', en: 'No discount for early payment' },\n ],\n recoveryCost: [\n { fr: 'Non applicable', en: 'Not applicable' },\n { fr: '40€', en: '40€' },\n ],\n paymentType: [\n { fr: 'Carte bancaire', en: 'Credit card' },\n { fr: 'Chèque', en: 'Check' },\n { fr: 'Espèces', en: 'Cash' },\n { fr: 'Prélèvement', en: 'Direct debit' },\n { fr: 'Virement bancaire', en: 'Bank transfer' },\n ],\n vatMention: [\n { fr: 'Non concerné', en: 'Not affected' },\n { fr: 'Non applicable', en: 'Not applicable' },\n {\n fr: 'TVA non applicable, art. 293 B du CGI',\n en: 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',\n },\n {\n fr: 'TVA non applicable - Exportation hors UE - Art. 259-1 du CGI',\n en: 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',\n },\n {\n fr: \"Non soumis à TVA selon l'article 261C du CGI\",\n en: 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',\n },\n { fr: 'Article 261 D du code général des impôts (CGI)', en: 'Article 261D of the French General Tax Code (FGTC)' },\n {\n fr: 'Exonération de TVA, article 283-2 du Code général des impôts',\n en: 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',\n },\n {\n fr: 'Exonération de la TVA : Article 262 ter I du CGI',\n en: 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',\n },\n { fr: 'Mention de TVA 261.4.4 1 du CGI', en: 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)' },\n {\n fr: \"Régime particulier – Biens d'occasion - article 297 A du CGI et directive communautaire 2006/112/CE\",\n en: 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: \"Régime particulier – Objets d'art - article 297 A du CGI et directive communautaire 2006/112/CE\",\n en: 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: \"Régime particulier – Objets de collection ou d'antiquité - article 297 A du CGI et directive communautaire 2006/112/CE\",\n en: 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: 'Régime particulier – Agences de voyage - article 297 A du CGI et directive communautaire 2006/112/CE',\n en: 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',\n },\n {\n fr: 'Facture soumise au régime de l’auto-liquidation de la TVA',\n en: 'Invoice subject to VAT reverse charge system',\n },\n ],\n termsOfPayment: [\n {\n fr: 'À la livraison',\n en: 'On delivery',\n },\n {\n fr: 'À la command',\n en: 'On order',\n },\n {\n fr: 'À réception de la facture',\n en: 'Upon receipt of invoice',\n },\n {\n fr: 'Exigible sous 14 jours',\n en: 'Due within 14 days',\n },\n {\n fr: 'Exigible sous 30 jours',\n en: 'Due within 30 days',\n },\n {\n fr: '30 jours à réception de la facture',\n en: '30 days upon receipt of invoice',\n },\n {\n fr: '45 jours à réception de la facture',\n en: '45 days upon receipt of invoice',\n },\n {\n fr: '60 jours à réception de la facture',\n en: '60 days upon receipt of invoice',\n },\n ],\n accountingCategory: [\n {\n fr: 'Livraison de biens',\n en: 'Supply of goods',\n },\n {\n fr: 'Prestation de services',\n en: 'Services provision',\n },\n {\n fr: 'Prestation de services et livraison de biens',\n en: 'Services provision and supply of goods',\n },\n ],\n};\n\nexport const internationalizationConsistency = (\n language: InvoiceLanguage,\n value: string,\n key: InternationalizationConsistencyKey,\n): string | undefined => {\n const keyObjectToMacht = internationalizationMatching[key];\n return language === InvoiceLanguage.FR\n ? keyObjectToMacht.find((obj) => obj.fr === value)?.fr\n : keyObjectToMacht.find((obj) => obj.fr === value)?.en;\n};\n"]}
@@ -3,7 +3,8 @@ export declare enum StateAppointment {
3
3
  CUSTOMER_ABROAD = 2,
4
4
  SOCIETY_CANCELLED = 3,
5
5
  MISSING_FILE = 4,
6
- BUSINESS_CONTRIBUTOR = 5
6
+ BUSINESS_CONTRIBUTOR = 5,
7
+ MANY_COMPANIES = 6
7
8
  }
8
9
  export declare const StateAppointmentDetail: {
9
10
  CUSTOMER_ON_LEAVE: {
@@ -26,5 +27,9 @@ export declare const StateAppointmentDetail: {
26
27
  id: StateAppointment;
27
28
  name: string;
28
29
  };
30
+ MANY_COMPANIES: {
31
+ id: StateAppointment;
32
+ name: string;
33
+ };
29
34
  };
30
35
  //# sourceMappingURL=AppointmentState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppointmentState.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/AppointmentState.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,iBAAiB,IAAI;IACrB,eAAe,IAAI;IACnB,iBAAiB,IAAI;IACrB,YAAY,IAAI;IAChB,oBAAoB,IAAI;CACzB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;CAqBlC,CAAC"}
1
+ {"version":3,"file":"AppointmentState.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/AppointmentState.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,iBAAiB,IAAI;IACrB,eAAe,IAAI;IACnB,iBAAiB,IAAI;IACrB,YAAY,IAAI;IAChB,oBAAoB,IAAI;IACxB,cAAc,IAAI;CACnB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;CAyBlC,CAAC"}
@@ -5,6 +5,7 @@ export var StateAppointment;
5
5
  StateAppointment[StateAppointment["SOCIETY_CANCELLED"] = 3] = "SOCIETY_CANCELLED";
6
6
  StateAppointment[StateAppointment["MISSING_FILE"] = 4] = "MISSING_FILE";
7
7
  StateAppointment[StateAppointment["BUSINESS_CONTRIBUTOR"] = 5] = "BUSINESS_CONTRIBUTOR";
8
+ StateAppointment[StateAppointment["MANY_COMPANIES"] = 6] = "MANY_COMPANIES";
8
9
  })(StateAppointment || (StateAppointment = {}));
9
10
  export const StateAppointmentDetail = {
10
11
  CUSTOMER_ON_LEAVE: {
@@ -27,5 +28,9 @@ export const StateAppointmentDetail = {
27
28
  id: StateAppointment.BUSINESS_CONTRIBUTOR,
28
29
  name: "Apporteur d'affaires",
29
30
  },
31
+ MANY_COMPANIES: {
32
+ id: StateAppointment.MANY_COMPANIES,
33
+ name: 'Multiples sociétés',
34
+ },
30
35
  };
31
36
  //# sourceMappingURL=AppointmentState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppointmentState.js","sourceRoot":"","sources":["../../../../ts/types/Enum/AppointmentState.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,iFAAqB,CAAA;IACrB,6EAAmB,CAAA;IACnB,iFAAqB,CAAA;IACrB,uEAAgB,CAAA;IAChB,uFAAwB,CAAA;AAC1B,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,iBAAiB,EAAE;QACjB,EAAE,EAAE,gBAAgB,CAAC,iBAAiB;QACtC,IAAI,EAAE,kBAAkB;KACzB;IACD,eAAe,EAAE;QACf,EAAE,EAAE,gBAAgB,CAAC,eAAe;QACpC,IAAI,EAAE,qBAAqB;KAC5B;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,gBAAgB,CAAC,iBAAiB;QACtC,IAAI,EAAE,iCAAiC;KACxC;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,gBAAgB,CAAC,YAAY;QACjC,IAAI,EAAE,qBAAqB;KAC5B;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,gBAAgB,CAAC,oBAAoB;QACzC,IAAI,EAAE,sBAAsB;KAC7B;CACF,CAAC","sourcesContent":["export enum StateAppointment {\n CUSTOMER_ON_LEAVE = 1,\n CUSTOMER_ABROAD = 2,\n SOCIETY_CANCELLED = 3,\n MISSING_FILE = 4,\n BUSINESS_CONTRIBUTOR = 5,\n}\n\nexport const StateAppointmentDetail = {\n CUSTOMER_ON_LEAVE: {\n id: StateAppointment.CUSTOMER_ON_LEAVE,\n name: 'Client en congés',\n },\n CUSTOMER_ABROAD: {\n id: StateAppointment.CUSTOMER_ABROAD,\n name: \"Client à l'étranger\",\n },\n SOCIETY_CANCELLED: {\n id: StateAppointment.SOCIETY_CANCELLED,\n name: 'Dossier en cours de résiliation',\n },\n MISSING_FILE: {\n id: StateAppointment.MISSING_FILE,\n name: 'Documents manquants',\n },\n BUSINESS_CONTRIBUTOR: {\n id: StateAppointment.BUSINESS_CONTRIBUTOR,\n name: \"Apporteur d'affaires\",\n },\n};\n"]}
1
+ {"version":3,"file":"AppointmentState.js","sourceRoot":"","sources":["../../../../ts/types/Enum/AppointmentState.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,iFAAqB,CAAA;IACrB,6EAAmB,CAAA;IACnB,iFAAqB,CAAA;IACrB,uEAAgB,CAAA;IAChB,uFAAwB,CAAA;IACxB,2EAAkB,CAAA;AACpB,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,iBAAiB,EAAE;QACjB,EAAE,EAAE,gBAAgB,CAAC,iBAAiB;QACtC,IAAI,EAAE,kBAAkB;KACzB;IACD,eAAe,EAAE;QACf,EAAE,EAAE,gBAAgB,CAAC,eAAe;QACpC,IAAI,EAAE,qBAAqB;KAC5B;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,gBAAgB,CAAC,iBAAiB;QACtC,IAAI,EAAE,iCAAiC;KACxC;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,gBAAgB,CAAC,YAAY;QACjC,IAAI,EAAE,qBAAqB;KAC5B;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,gBAAgB,CAAC,oBAAoB;QACzC,IAAI,EAAE,sBAAsB;KAC7B;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB,CAAC,cAAc;QACnC,IAAI,EAAE,oBAAoB;KAC3B;CACF,CAAC","sourcesContent":["export enum StateAppointment {\n CUSTOMER_ON_LEAVE = 1,\n CUSTOMER_ABROAD = 2,\n SOCIETY_CANCELLED = 3,\n MISSING_FILE = 4,\n BUSINESS_CONTRIBUTOR = 5,\n MANY_COMPANIES = 6,\n}\n\nexport const StateAppointmentDetail = {\n CUSTOMER_ON_LEAVE: {\n id: StateAppointment.CUSTOMER_ON_LEAVE,\n name: 'Client en congés',\n },\n CUSTOMER_ABROAD: {\n id: StateAppointment.CUSTOMER_ABROAD,\n name: \"Client à l'étranger\",\n },\n SOCIETY_CANCELLED: {\n id: StateAppointment.SOCIETY_CANCELLED,\n name: 'Dossier en cours de résiliation',\n },\n MISSING_FILE: {\n id: StateAppointment.MISSING_FILE,\n name: 'Documents manquants',\n },\n BUSINESS_CONTRIBUTOR: {\n id: StateAppointment.BUSINESS_CONTRIBUTOR,\n name: \"Apporteur d'affaires\",\n },\n MANY_COMPANIES: {\n id: StateAppointment.MANY_COMPANIES,\n name: 'Multiples sociétés',\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CommercialManagement.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/CommercialManagement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,oBAAY,OAAO;IACjB,YAAY,IAAI;IAChB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,OAAO,IAAI;IACX,KAAK,IAAI;CACV;AAED,eAAO,MAAM,QAAQ;;;;GAMpB,CAAC;AAEF,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,OA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,SAAS,CAAA;CAAE,CA0BvF,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAmEzE,CAAC"}
1
+ {"version":3,"file":"CommercialManagement.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/CommercialManagement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,oBAAY,OAAO;IACjB,YAAY,IAAI;IAChB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,OAAO,IAAI;IACX,KAAK,IAAI;CACV;AAED,eAAO,MAAM,QAAQ;;;;GAMpB,CAAC;AAEF,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,OAAO,qBAAqB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,YAAY;IACtB,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,oBAAY,mBAAmB;IAC7B,MAAM,IAAI;IACV,WAAW,IAAI;IACf,GAAG,IAAI;IACP,SAAS,IAAI;CACd;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,mBAAmB,CAAA;CAAE,CAiBjF,CAAC;AAEF,oBAAY,oBAAoB;IAC9B,OAAO,IAAI;IACX,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,oBAAoB,CAAA;CAAE,CAarF,CAAC;AAEF,oBAAY,eAAe;IACzB,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,oBAAY,qBAAqB;IAE/B,WAAW,eAAe;IAC1B,kBAAkB,uBAAuB;IACzC,8BAA8B,yBAAyB;IACvD,cAAc,mBAAmB;IACjC,kBAAkB,mBAAmB;CACtC;AAED,eAAO,MAAM,yBAAyB,UAUrC,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,KAAK,CAAC;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAsBA,CAAC;AAEF,oBAAY,SAAS;IACnB,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,UAAU,IAAI;IACd,iBAAiB,IAAI;IACrB,KAAK,IAAI;CACV;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,SAAS,CAAA;CAAE,CA0BvF,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAyCzE,CAAC"}
@@ -170,66 +170,35 @@ export const DefaultEmailTemplateList = [
170
170
  {
171
171
  name: 'modèle devis par défaut',
172
172
  subject: 'Votre devis',
173
- content: `<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p>
174
- <p>Vous trouverez ci-joint votre devis N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p>
175
- <p>Vous en souhaitant bonne réception.</p>
176
- <p>Cordialement,
177
- <span style="color: rgb(131, 131, 132);">[raison_sociale]</span>
178
- </p>`,
173
+ content: '<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p> <p>Vous trouverez ci-joint votre devis N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception. </p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
179
174
  type: EmailType.ESTIMATE,
180
175
  isDefault: false,
181
176
  },
182
177
  {
183
178
  name: 'modèle facture par défaut',
184
179
  subject: 'Votre facture',
185
- content: `<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p>
186
- <p>Vous trouverez ci-joint votre facture N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>.</p> <p>Vous en souhaitant bonne réception.</p>
187
- <p>Cordialement,
188
- <span style="color: rgb(131, 131, 132);">[raison_sociale]</span>
189
- </p>`,
180
+ content: '<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p> <p>Vous trouverez ci-joint votre facture N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>.</p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
190
181
  type: EmailType.INVOICE,
191
182
  isDefault: false,
192
183
  },
193
184
  {
194
185
  name: 'modèle bon de commande par défaut',
195
186
  subject: 'Votre bon de commande',
196
- content: `<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span></p>
197
- <p>Vous trouverez ci-joint votre bon de commande N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p>
198
- <p>Vous en souhaitant bonne réception.</p>
199
- <p>Cordialement,
200
- <span style="color: rgb(131, 131, 132);">[raison_sociale]</span>
201
- </p>`,
187
+ content: '<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span></p> <p>Vous trouverez ci-joint votre bon de commande N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
202
188
  type: EmailType.ORDER_FORM,
203
189
  isDefault: false,
204
190
  },
205
191
  {
206
192
  name: 'modèle avoir par défaut',
207
193
  subject: 'Votre avoir',
208
- content: `<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p>
209
- <p>Vous trouverez ci-joint votre facture.</p>
210
- <p>Vous trouverez ci-joint votre bon de commande N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p>
211
- <p>Vous en souhaitant bonne réception.</p>
212
- <p>Cordialement,
213
- <span style="color: rgb(131, 131, 132);">[raison_sociale]</span>
214
- </p>`,
194
+ content: '<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p> <p>Vous trouverez ci-joint votre facture.</p> <p>Vous trouverez ci-joint votre bon de commande N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
215
195
  type: EmailType.ASSET,
216
196
  isDefault: false,
217
197
  },
218
198
  {
219
199
  name: 'modèle relance par défaut',
220
200
  subject: 'Votre facture',
221
- content: `<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p>
222
- <p>
223
- Je me permets de revenir vers vous concernant la facture N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span> pour laquelle le paiement est toujours en attente.
224
- </p>
225
- <p>
226
- Je vous joins à nouveau le document en pièce jointe en cas de besoin.
227
- </p>
228
- <p>Vous en souhaitant bonne réception.</p>
229
- <p>
230
- Cordialement,
231
- <span style="color: rgb(131, 131, 132);">[raison_sociale]</span>
232
- </p>`,
201
+ content: '<p>Bonjour, <span style="color: rgb(131, 131, 132);">[nom_client]</span> </p> <p>Je me permets de revenir vers vous concernant la facture N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span> pour laquelle le paiement est toujours en attente. </p> <p>Je vous joins à nouveau le document en pièce jointe en cas de besoin.</p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
233
202
  type: EmailType.CUSTOMER_REMINDER,
234
203
  isDefault: false,
235
204
  },
@@ -1 +1 @@
1
- {"version":3,"file":"CommercialManagement.js","sourceRoot":"","sources":["../../../../ts/types/Enum/CommercialManagement.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,qDAAgB,CAAA;IAChB,yCAAU,CAAA;IACV,2CAAW,CAAA;IACX,2CAAW,CAAA;IACX,uCAAS,CAAA;AACX,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,EAAE,EAAE,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,6CAA6C,EAAE,IAAI,EAAE,cAAc,EAAE;IACvG,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,uCAAuC,EAAE,IAAI,EAAE,QAAQ,EAAE;IACrF,EAAE,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,wCAAwC,EAAE,IAAI,EAAE,SAAS,EAAE;IACxF,EAAE,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,0CAA0C,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1F,EAAE,EAAE,EAAE,OAAO,C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K;KACjB;IACD;QACE,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EAAE;;;;;SAKJ;QACL,IAAI,EAAE,SAAS,CAAC,UAAU;QAC1B,SAAS,EAAE,KAAK;KACjB;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE;;;;;;SAMJ;QACL,IAAI,EAAE,SAAS,CAAC,KAAK;QACrB,SAAS,EAAE,KAAK;KACjB;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE;;;;;;;;;;;SAWJ;QACL,IAAI,EAAE,SAAS,CAAC,iBAAiB;QACjC,SAAS,EAAE,KAAK;KACjB;CACF,CAAC","sourcesContent":["import { InfoToUseType } from '../../utils/commercialManagement/saleEmail';\nimport { ISaleEmail } from '../Interface/models/ISaleEmail';\n\nexport enum FontIds {\n CIRCULAR_STD = 1,\n ROBOTO = 2,\n POPPINS = 3,\n RALEWAY = 4,\n ZILLA = 5,\n}\n\nexport const fontList = [\n { id: FontIds.CIRCULAR_STD, link: 'https://fonts.cdnfonts.com/css/circular-std', name: 'Circular Std' },\n { id: FontIds.ROBOTO, link: 'https://fonts.cdnfonts.com/css/roboto', name: 'Roboto' },\n { id: FontIds.POPPINS, link: 'https://fonts.cdnfonts.com/css/poppins', name: 'Poppins' },\n { id: FontIds.RALEWAY, link: 'https://fonts.cdnfonts.com/css/raleway-5', name: 'Raleway' },\n { id: FontIds.ZILLA, link: 'https://fonts.cdnfonts.com/css/zilla-slab', name: 'Zilla Slab' },\n];\n\nexport enum LogoAlignment {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport enum InvoiceStatus {\n WAITING = 'waiting',\n UNPAID = 'unpaid',\n CANCELED = 'canceled',\n PAID = 'paid',\n}\n\nexport enum EstimateStatus {\n ACCEPTED = 'accepted',\n WAITING = 'waiting_estimate',\n REFUSED = 'refused',\n BILLED = 'billed',\n EXPIRED = 'expired',\n}\n\nexport enum DiscountType {\n PERCENT = 1,\n AMOUNT = 2,\n}\n\nexport enum VatMarginCategoryId {\n TRAVEL = 2,\n SECOND_HAND = 3,\n ART = 4,\n ANTIQUITY = 5,\n}\n\nexport const VatMarginCategyList: Array<{ label: string; id: VatMarginCategoryId }> = [\n {\n label: 'Agences de voyage',\n id: VatMarginCategoryId.TRAVEL,\n },\n {\n label: \"Bien d'occasion\",\n id: VatMarginCategoryId.SECOND_HAND,\n },\n {\n label: \"Objet d'art\",\n id: VatMarginCategoryId.ART,\n },\n {\n label: \"Objet de collection et d'antiquité\",\n id: VatMarginCategoryId.ANTIQUITY,\n },\n];\n\nexport enum AccountingCategoryId {\n DEFAULT = 0,\n DELIVERY_OF_GOOD = 1,\n SERVICE_DELIVERY = 2,\n GOOD_AND_SERVICE = 3,\n}\n\nexport const AccountingCategoryList: Array<{ label: string; id: AccountingCategoryId }> = [\n {\n label: 'Livraison de biens',\n id: AccountingCategoryId.DELIVERY_OF_GOOD,\n },\n {\n label: 'Prestation de services',\n id: AccountingCategoryId.SERVICE_DELIVERY,\n },\n {\n label: 'Prestation de services et livraison de biens',\n id: AccountingCategoryId.GOOD_AND_SERVICE,\n },\n];\n\nexport enum InvoiceLanguage {\n FR = 'fr',\n EN = 'en',\n}\n\nexport enum EmailTemplateVariable {\n // CLIENT_FIRST_NAME = 'prenom_client',\n CLIENT_NAME = 'nom_client',\n DOCUMENT_REFERENCE = 'reference_document',\n DOCUMENT_TOTAL_INCLUDED_AMOUNT = 'montant_ttc_document',\n DOCUMENT_TITLE = 'titre_document',\n OWNER_SOCIETY_NAME = 'raison_sociale',\n}\n\nexport const emailTemplateVariableList = [\n 'nom_client',\n 'reference_document',\n 'montant_ttc_document',\n 'titre_document',\n 'raison_sociale',\n\n // not used for now\n // 'lien_google',\n // 'lien_trustpilot',\n];\nexport const emailTemplateVariableAffiliatedData: Array<{\n name: string;\n data: Array<keyof InfoToUseType>;\n formatType?: string;\n}> = [\n {\n name: 'nom_client',\n data: ['fullname', 'company'],\n },\n {\n name: 'reference_document',\n data: ['reference'],\n },\n {\n name: 'montant_ttc_document',\n data: ['totalIncludedAmount'],\n formatType: 'amount',\n },\n {\n name: 'titre_document',\n data: ['title'],\n },\n {\n name: 'raison_sociale',\n data: ['societyName'],\n },\n];\n\nexport enum EmailType {\n ESTIMATE = 1,\n INVOICE = 2,\n ORDER_FORM = 3,\n CUSTOMER_REMINDER = 4,\n ASSET = 5,\n}\n\nexport const emailTypeList: Array<{ label: string; nameDocument: string; id: EmailType }> = [\n {\n label: 'Envoi de devis',\n nameDocument: 'devis',\n id: EmailType.ESTIMATE,\n },\n {\n label: 'Envoi de facture',\n nameDocument: 'facture',\n id: EmailType.INVOICE,\n },\n {\n label: 'Envoi de bons de commande',\n nameDocument: 'bon de commande',\n id: EmailType.ORDER_FORM,\n },\n {\n label: 'Relance client',\n nameDocument: 'relance',\n id: EmailType.CUSTOMER_REMINDER,\n },\n {\n label: 'Avoir',\n nameDocument: 'avoir',\n id: EmailType.ASSET,\n },\n];\n\nexport const DefaultEmailTemplateList: Array<Omit<ISaleEmail, 'idSociety'>> = [\n {\n name: 'modèle devis par défaut',\n subject: 'Votre devis',\n content: `<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p>\n <p>Vous trouverez ci-joint votre devis N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>. </p>\n <p>Vous en souhaitant bonne réception.</p>\n <p>Cordialement,\n <span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span>\n </p>`,\n type: EmailType.ESTIMATE,\n isDefault: false,\n },\n {\n name: 'modèle facture par défaut',\n subject: 'Votre facture',\n content: `<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p>\n <p>Vous trouverez ci-joint votre facture N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>.</p> <p>Vous en souhaitant bonne réception.</p>\n <p>Cordialement,\n <span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span>\n </p>`,\n type: EmailType.INVOICE,\n isDefault: false,\n },\n {\n name: 'modèle bon de commande par défaut',\n subject: 'Votre bon de commande',\n content: `<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span></p>\n <p>Vous trouverez ci-joint votre bon de commande N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>. </p>\n <p>Vous en souhaitant bonne réception.</p>\n <p>Cordialement,\n <span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span>\n </p>`,\n type: EmailType.ORDER_FORM,\n isDefault: false,\n },\n {\n name: 'modèle avoir par défaut',\n subject: 'Votre avoir',\n content: `<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p>\n <p>Vous trouverez ci-joint votre facture.</p>\n <p>Vous trouverez ci-joint votre bon de commande N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>. </p>\n <p>Vous en souhaitant bonne réception.</p>\n <p>Cordialement,\n <span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span>\n </p>`,\n type: EmailType.ASSET,\n isDefault: false,\n },\n {\n name: 'modèle relance par défaut',\n subject: 'Votre facture',\n content: `<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p>\n <p>\n Je me permets de revenir vers vous concernant la facture N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span> pour laquelle le paiement est toujours en attente.\n </p>\n <p>\n Je vous joins à nouveau le document en pièce jointe en cas de besoin.\n </p>\n <p>Vous en souhaitant bonne réception.</p>\n <p>\n Cordialement,\n <span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span>\n </p>`,\n type: EmailType.CUSTOMER_REMINDER,\n isDefault: false,\n },\n];\n"]}
1
+ {"version":3,"file":"CommercialManagement.js","sourceRoot":"","sources":["../../../../ts/types/Enum/CommercialManagement.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,qDAAgB,CAAA;IAChB,yCAAU,CAAA;IACV,2CAAW,CAAA;IACX,2CAAW,CAAA;IACX,uCAAS,CAAA;AACX,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,EAAE,EAAE,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,6CAA6C,EAAE,IAAI,EAAE,cAAc,EAAE;IACvG,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,uCAAuC,EAAE,IAAI,EAAE,QAAQ,EAAE;IACrF,EAAE,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,wCAAwC,EAAE,IAAI,EAAE,SAAS,EAAE;IACxF,EAAE,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,0CAA0C,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1F,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,2CAA2C,EAAE,IAAI,EAAE,YAAY,EAAE;CAC7F,CAAC;AAEF,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;AACf,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,cAMX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,CAAC,iBAAiB;QACjC,SAAS,EAAE,KAAK;KACjB;CACF,CAAC","sourcesContent":["import { InfoToUseType } from '../../utils/commercialManagement/saleEmail';\nimport { ISaleEmail } from '../Interface/models/ISaleEmail';\n\nexport enum FontIds {\n CIRCULAR_STD = 1,\n ROBOTO = 2,\n POPPINS = 3,\n RALEWAY = 4,\n ZILLA = 5,\n}\n\nexport const fontList = [\n { id: FontIds.CIRCULAR_STD, link: 'https://fonts.cdnfonts.com/css/circular-std', name: 'Circular Std' },\n { id: FontIds.ROBOTO, link: 'https://fonts.cdnfonts.com/css/roboto', name: 'Roboto' },\n { id: FontIds.POPPINS, link: 'https://fonts.cdnfonts.com/css/poppins', name: 'Poppins' },\n { id: FontIds.RALEWAY, link: 'https://fonts.cdnfonts.com/css/raleway-5', name: 'Raleway' },\n { id: FontIds.ZILLA, link: 'https://fonts.cdnfonts.com/css/zilla-slab', name: 'Zilla Slab' },\n];\n\nexport enum LogoAlignment {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport enum InvoiceStatus {\n WAITING = 'waiting',\n UNPAID = 'unpaid',\n CANCELED = 'canceled',\n PAID = 'paid',\n}\n\nexport enum EstimateStatus {\n ACCEPTED = 'accepted',\n WAITING = 'waiting_estimate',\n REFUSED = 'refused',\n BILLED = 'billed',\n EXPIRED = 'expired',\n}\n\nexport enum DiscountType {\n PERCENT = 1,\n AMOUNT = 2,\n}\n\nexport enum VatMarginCategoryId {\n TRAVEL = 2,\n SECOND_HAND = 3,\n ART = 4,\n ANTIQUITY = 5,\n}\n\nexport const VatMarginCategyList: Array<{ label: string; id: VatMarginCategoryId }> = [\n {\n label: 'Agences de voyage',\n id: VatMarginCategoryId.TRAVEL,\n },\n {\n label: \"Bien d'occasion\",\n id: VatMarginCategoryId.SECOND_HAND,\n },\n {\n label: \"Objet d'art\",\n id: VatMarginCategoryId.ART,\n },\n {\n label: \"Objet de collection et d'antiquité\",\n id: VatMarginCategoryId.ANTIQUITY,\n },\n];\n\nexport enum AccountingCategoryId {\n DEFAULT = 0,\n DELIVERY_OF_GOOD = 1,\n SERVICE_DELIVERY = 2,\n GOOD_AND_SERVICE = 3,\n}\n\nexport const AccountingCategoryList: Array<{ label: string; id: AccountingCategoryId }> = [\n {\n label: 'Livraison de biens',\n id: AccountingCategoryId.DELIVERY_OF_GOOD,\n },\n {\n label: 'Prestation de services',\n id: AccountingCategoryId.SERVICE_DELIVERY,\n },\n {\n label: 'Prestation de services et livraison de biens',\n id: AccountingCategoryId.GOOD_AND_SERVICE,\n },\n];\n\nexport enum InvoiceLanguage {\n FR = 'fr',\n EN = 'en',\n}\n\nexport enum EmailTemplateVariable {\n // CLIENT_FIRST_NAME = 'prenom_client',\n CLIENT_NAME = 'nom_client',\n DOCUMENT_REFERENCE = 'reference_document',\n DOCUMENT_TOTAL_INCLUDED_AMOUNT = 'montant_ttc_document',\n DOCUMENT_TITLE = 'titre_document',\n OWNER_SOCIETY_NAME = 'raison_sociale',\n}\n\nexport const emailTemplateVariableList = [\n 'nom_client',\n 'reference_document',\n 'montant_ttc_document',\n 'titre_document',\n 'raison_sociale',\n\n // not used for now\n // 'lien_google',\n // 'lien_trustpilot',\n];\nexport const emailTemplateVariableAffiliatedData: Array<{\n name: string;\n data: Array<keyof InfoToUseType>;\n formatType?: string;\n}> = [\n {\n name: 'nom_client',\n data: ['fullname', 'company'],\n },\n {\n name: 'reference_document',\n data: ['reference'],\n },\n {\n name: 'montant_ttc_document',\n data: ['totalIncludedAmount'],\n formatType: 'amount',\n },\n {\n name: 'titre_document',\n data: ['title'],\n },\n {\n name: 'raison_sociale',\n data: ['societyName'],\n },\n];\n\nexport enum EmailType {\n ESTIMATE = 1,\n INVOICE = 2,\n ORDER_FORM = 3,\n CUSTOMER_REMINDER = 4,\n ASSET = 5,\n}\n\nexport const emailTypeList: Array<{ label: string; nameDocument: string; id: EmailType }> = [\n {\n label: 'Envoi de devis',\n nameDocument: 'devis',\n id: EmailType.ESTIMATE,\n },\n {\n label: 'Envoi de facture',\n nameDocument: 'facture',\n id: EmailType.INVOICE,\n },\n {\n label: 'Envoi de bons de commande',\n nameDocument: 'bon de commande',\n id: EmailType.ORDER_FORM,\n },\n {\n label: 'Relance client',\n nameDocument: 'relance',\n id: EmailType.CUSTOMER_REMINDER,\n },\n {\n label: 'Avoir',\n nameDocument: 'avoir',\n id: EmailType.ASSET,\n },\n];\n\nexport const DefaultEmailTemplateList: Array<Omit<ISaleEmail, 'idSociety'>> = [\n {\n name: 'modèle devis par défaut',\n subject: 'Votre devis',\n content:\n '<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p> <p>Vous trouverez ci-joint votre devis N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception. </p> <p>Cordialement,</p><p><span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span></p>',\n type: EmailType.ESTIMATE,\n isDefault: false,\n },\n {\n name: 'modèle facture par défaut',\n subject: 'Votre facture',\n content:\n '<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p> <p>Vous trouverez ci-joint votre facture N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>.</p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span></p>',\n type: EmailType.INVOICE,\n isDefault: false,\n },\n {\n name: 'modèle bon de commande par défaut',\n subject: 'Votre bon de commande',\n content:\n '<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span></p> <p>Vous trouverez ci-joint votre bon de commande N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span></p>',\n type: EmailType.ORDER_FORM,\n isDefault: false,\n },\n {\n name: 'modèle avoir par défaut',\n subject: 'Votre avoir',\n content:\n '<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p> <p>Vous trouverez ci-joint votre facture.</p> <p>Vous trouverez ci-joint votre bon de commande N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span></p>',\n type: EmailType.ASSET,\n isDefault: false,\n },\n {\n name: 'modèle relance par défaut',\n subject: 'Votre facture',\n content:\n '<p>Bonjour, <span style=\"color: rgb(131, 131, 132);\">[nom_client]</span> </p> <p>Je me permets de revenir vers vous concernant la facture N°<span style=\"color: rgb(131, 131, 132);\">[reference_document]</span> d’un montant de <span style=\"color: rgb(131, 131, 132);\">[montant_ttc_document]</span> pour laquelle le paiement est toujours en attente. </p> <p>Je vous joins à nouveau le document en pièce jointe en cas de besoin.</p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style=\"color: rgb(131, 131, 132);\">[raison_sociale]</span></p>',\n type: EmailType.CUSTOMER_REMINDER,\n isDefault: false,\n },\n];\n"]}
@@ -301,7 +301,7 @@ export const INCOME_STATEMENT_LIST = [
301
301
  name: 'Impôt sur les bénéfices',
302
302
  total: 0,
303
303
  key: 'incomeTax',
304
- accounts: ['695'],
304
+ accounts: ['69'],
305
305
  },
306
306
  {
307
307
  name: "Résultat de l'exercice",
@@ -1 +1 @@
1
- {"version":3,"file":"IncomeStatement.js","sourceRoot":"","sources":["../../../../ts/types/Enum/IncomeStatement.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD;QACE,IAAI,EAAE,mCAAmC;QACzC,GAAG,EAAE,sBAAsB;QAC3B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E,CAAC,0BAA0B,CAAC;QAC5C,mBAAmB,EAAE,CAAC,0BAA0B,CAAC;QACjD,GAAG,EAAE,mBAAmB;KACzB;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE,CAAC,sBAAsB,EAAE,wBAAwB,EAAE,0BAA0B,CAAC;QAC9F,mBAAmB,EAAE,CAAC,wBAAwB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,WAAW,CAAC;QAClH,GAAG,EAAE,kBAAkB;KACxB;CACF,CAAC","sourcesContent":["type IncomeStatementField = {\n name: string;\n fields?: IncomeStatementField[];\n accounts?: string[];\n total: number;\n excludeAccounts?: string[];\n};\n\nexport type IncomeStatement = {\n name: string;\n fields?: IncomeStatementField[];\n total: number;\n accounts?: string[];\n excludeAccounts?: string[];\n key: string;\n calculation?: boolean; // Doit être calculé avec calculationAdd & calculationSubtract\n calculationAdd?: string[]; // Tableau des keys à additionner pour obtenir le total\n calculationSubtract?: string[]; // Tableau des keys à soustraire pour obtenir le total\n isProduct?: boolean; // Si c'est un produit, on fait x -1\n};\n\nexport const INCOME_STATEMENT_LIST: IncomeStatement[] = [\n {\n name: \"Total des produits d'exploitation\",\n key: 'totalOperatingIncome',\n total: 0,\n isProduct: true,\n fields: [\n {\n name: \"Chiffre d'Affaires\",\n total: 0,\n fields: [\n {\n name: 'Ventes de marchandises',\n total: 0,\n accounts: ['707'],\n },\n {\n name: 'Production vendue',\n total: 0,\n accounts: ['701', '702', '703', '704', '705', '706'],\n },\n {\n name: 'Produits des activités annexes',\n total: 0,\n accounts: ['708'],\n },\n {\n name: \"Rabais, remises, ristournes accordés par l'entreprise\",\n total: 0,\n accounts: ['709'],\n },\n ],\n },\n {\n name: 'Production stockée',\n total: 0,\n accounts: ['71'],\n },\n {\n name: 'Production immobilisée',\n total: 0,\n accounts: ['72'],\n },\n {\n name: \"Subventions d'exploitation\",\n total: 0,\n accounts: ['74'],\n },\n {\n name: 'Reprises sur provisions, dépréciations et amortissements, transferts de charges',\n total: 0,\n accounts: ['781', '791'],\n },\n {\n name: 'Autres produits de gestion courante',\n total: 0,\n accounts: ['75'],\n },\n ],\n },\n {\n name: \"Total des charges d'exploitation\",\n key: 'totalOperatingExpenses',\n total: 0,\n fields: [\n {\n name: 'Achats de marchandises',\n total: 0,\n accounts: ['607'],\n },\n {\n name: 'Variation des stocks de marchandises',\n total: 0,\n accounts: ['6037'],\n },\n {\n name: 'Achats de matières premieres et autres approvisionnements',\n total: 0,\n accounts: ['60'],\n excludeAccounts: ['607', '603', '606', '604'],\n },\n {\n name: 'Variation des stocks de matières premieres et autres approvisionnements',\n total: 0,\n accounts: ['603'],\n excludeAccounts: ['6037'],\n },\n {\n name: 'Autres achats et charges externes',\n total: 0,\n accounts: ['61', '62', '606', '604'],\n },\n {\n name: 'Impôts, taxes et versements assimilés',\n total: 0,\n accounts: ['63'],\n },\n {\n name: 'Salaires et traitements',\n total: 0,\n accounts: ['641', '642', '643', '644'],\n },\n {\n name: 'Charges sociales',\n total: 0,\n accounts: ['645', '646', '647', '648', '649'],\n },\n {\n name: 'Dotations aux amortissements et provisions',\n total: 0,\n accounts: ['681', '682', '683', '684', '685'],\n },\n {\n name: 'Autres charges de gestion courante',\n total: 0,\n accounts: ['65'],\n },\n ],\n },\n {\n name: \"Résultat d'exploitation\",\n key: 'operatingResult',\n total: 0,\n calculation: true,\n calculationAdd: ['totalOperatingIncome'],\n calculationSubtract: ['totalOperatingExpenses'],\n },\n {\n name: 'Total des produits financiers',\n key: 'totalFinancialProducts',\n total: 0,\n isProduct: true,\n fields: [\n {\n name: 'De participations',\n total: 0,\n accounts: ['761'],\n },\n {\n name: \"D'autres valeurs mobilières et créances de l'actif immobilisé\",\n total: 0,\n accounts: ['762'],\n },\n {\n name: 'Autres intérêts et produits assimilés',\n total: 0,\n accounts: ['760', '763', '764', '765', '768'],\n },\n {\n name: 'Reprises sur dépréciations, provisions et transferts de charges financières',\n total: 0,\n accounts: ['786', '796'],\n },\n {\n name: 'Différences positives de change',\n total: 0,\n accounts: ['766'],\n },\n {\n name: 'Produits nets sur cessions de valeurs mobilières de placement',\n total: 0,\n accounts: ['767'],\n },\n ],\n },\n {\n name: 'Total des charges financières',\n total: 0,\n key: 'totalFinancialExpenses',\n fields: [\n {\n name: 'Dotations aux amortissements, dépréciations et provisions',\n total: 0,\n accounts: ['686'],\n },\n {\n name: 'Intérêts et charges assimilés',\n total: 0,\n accounts: ['661', '664', '665', '668'],\n },\n {\n name: 'Différences négatives de change',\n total: 0,\n accounts: ['666'],\n },\n {\n name: 'Charges nettes sur cessions de valeurs mobilières de placement',\n total: 0,\n accounts: ['667'],\n },\n ],\n },\n {\n name: 'Résultat financier',\n total: 0,\n calculation: true,\n calculationAdd: ['totalFinancialProducts'],\n calculationSubtract: ['totalFinancialExpenses'],\n key: 'financialResult',\n },\n {\n name: 'Résultat courant avant impôt',\n total: 0,\n calculation: true,\n calculationAdd: ['totalOperatingIncome', 'totalFinancialProducts'],\n calculationSubtract: ['totalOperatingExpenses', 'totalFinancialExpenses'],\n key: 'profitBeforeTax',\n },\n {\n name: 'Total des produits exceptionnels',\n total: 0,\n key: 'totalExceptionalProducts',\n isProduct: true,\n fields: [\n {\n name: 'Sur opérations de gestion',\n total: 0,\n accounts: ['771', '772'],\n },\n {\n name: 'Sur opérations en capital',\n total: 0,\n fields: [\n {\n name: \"Produits des cessions d'éléments d'actifs\",\n total: 0,\n accounts: ['775'],\n },\n {\n name: \"Subventions d'investissement virées aux résultats de l'exercice\",\n total: 0,\n accounts: ['777'],\n },\n {\n name: 'Autre',\n total: 0,\n accounts: ['778'],\n },\n ],\n },\n {\n name: 'Reprises sur dépréciations, provisions et transferts de charges exceptionnelles',\n total: 0,\n accounts: ['787', '797'],\n },\n ],\n },\n {\n name: 'Total des charges exceptionnelles',\n total: 0,\n key: 'totalExceptionalExpenses',\n fields: [\n {\n name: 'Sur opérations de gestion',\n total: 0,\n accounts: ['671', '672'],\n },\n {\n name: 'Sur opérations en capital',\n total: 0,\n fields: [\n {\n name: 'Valeurs comptables des éléments immobilisés et financiers cédés',\n total: 0,\n accounts: ['675'],\n },\n {\n name: 'Autre',\n total: 0,\n accounts: ['678'],\n },\n ],\n },\n {\n name: 'Dotations aux amortissements, dépréciations et provisions',\n total: 0,\n fields: [\n {\n name: 'Dotations aux provisions réglementées',\n accounts: ['6872', '6873', '6874'],\n total: 0,\n },\n {\n name: 'Dotations aux amortissements, dépréciations et autres provisions',\n accounts: ['6871', '6875', '6876'],\n total: 0,\n },\n ],\n },\n ],\n },\n {\n name: 'Résultat exceptionnel',\n total: 0,\n calculation: true,\n calculationAdd: ['totalExceptionalProducts'],\n calculationSubtract: ['totalExceptionalExpenses'],\n key: 'exceptionalResult',\n },\n {\n name: 'Impôt sur les bénéfices',\n total: 0,\n key: 'incomeTax',\n accounts: ['695'],\n },\n {\n name: \"Résultat de l'exercice\",\n total: 0,\n calculation: true,\n calculationAdd: ['totalOperatingIncome', 'totalFinancialProducts', 'totalExceptionalProducts'],\n calculationSubtract: ['totalOperatingExpenses', 'totalFinancialExpenses', 'totalExceptionalExpenses', 'incomeTax'],\n key: 'resultOfExercise',\n },\n];\n"]}
1
+ {"version":3,"file":"IncomeStatement.js","sourceRoot":"","sources":["../../../../ts/types/Enum/IncomeStatement.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD;QACE,IAAI,EAAE,mCAAmC;QACzC,GAAG,EAAE,sBAAsB;QAC3B,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,IAAI;QACf,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE;oBACN;wBACE,IAAI,E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ACR,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,CAAC,IAAI,CAAC;KACjB;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE,CAAC,sBAAsB,EAAE,wBAAwB,EAAE,0BAA0B,CAAC;QAC9F,mBAAmB,EAAE,CAAC,wBAAwB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,WAAW,CAAC;QAClH,GAAG,EAAE,kBAAkB;KACxB;CACF,CAAC","sourcesContent":["type IncomeStatementField = {\n name: string;\n fields?: IncomeStatementField[];\n accounts?: string[];\n total: number;\n excludeAccounts?: string[];\n};\n\nexport type IncomeStatement = {\n name: string;\n fields?: IncomeStatementField[];\n total: number;\n accounts?: string[];\n excludeAccounts?: string[];\n key: string;\n calculation?: boolean; // Doit être calculé avec calculationAdd & calculationSubtract\n calculationAdd?: string[]; // Tableau des keys à additionner pour obtenir le total\n calculationSubtract?: string[]; // Tableau des keys à soustraire pour obtenir le total\n isProduct?: boolean; // Si c'est un produit, on fait x -1\n};\n\nexport const INCOME_STATEMENT_LIST: IncomeStatement[] = [\n {\n name: \"Total des produits d'exploitation\",\n key: 'totalOperatingIncome',\n total: 0,\n isProduct: true,\n fields: [\n {\n name: \"Chiffre d'Affaires\",\n total: 0,\n fields: [\n {\n name: 'Ventes de marchandises',\n total: 0,\n accounts: ['707'],\n },\n {\n name: 'Production vendue',\n total: 0,\n accounts: ['701', '702', '703', '704', '705', '706'],\n },\n {\n name: 'Produits des activités annexes',\n total: 0,\n accounts: ['708'],\n },\n {\n name: \"Rabais, remises, ristournes accordés par l'entreprise\",\n total: 0,\n accounts: ['709'],\n },\n ],\n },\n {\n name: 'Production stockée',\n total: 0,\n accounts: ['71'],\n },\n {\n name: 'Production immobilisée',\n total: 0,\n accounts: ['72'],\n },\n {\n name: \"Subventions d'exploitation\",\n total: 0,\n accounts: ['74'],\n },\n {\n name: 'Reprises sur provisions, dépréciations et amortissements, transferts de charges',\n total: 0,\n accounts: ['781', '791'],\n },\n {\n name: 'Autres produits de gestion courante',\n total: 0,\n accounts: ['75'],\n },\n ],\n },\n {\n name: \"Total des charges d'exploitation\",\n key: 'totalOperatingExpenses',\n total: 0,\n fields: [\n {\n name: 'Achats de marchandises',\n total: 0,\n accounts: ['607'],\n },\n {\n name: 'Variation des stocks de marchandises',\n total: 0,\n accounts: ['6037'],\n },\n {\n name: 'Achats de matières premieres et autres approvisionnements',\n total: 0,\n accounts: ['60'],\n excludeAccounts: ['607', '603', '606', '604'],\n },\n {\n name: 'Variation des stocks de matières premieres et autres approvisionnements',\n total: 0,\n accounts: ['603'],\n excludeAccounts: ['6037'],\n },\n {\n name: 'Autres achats et charges externes',\n total: 0,\n accounts: ['61', '62', '606', '604'],\n },\n {\n name: 'Impôts, taxes et versements assimilés',\n total: 0,\n accounts: ['63'],\n },\n {\n name: 'Salaires et traitements',\n total: 0,\n accounts: ['641', '642', '643', '644'],\n },\n {\n name: 'Charges sociales',\n total: 0,\n accounts: ['645', '646', '647', '648', '649'],\n },\n {\n name: 'Dotations aux amortissements et provisions',\n total: 0,\n accounts: ['681', '682', '683', '684', '685'],\n },\n {\n name: 'Autres charges de gestion courante',\n total: 0,\n accounts: ['65'],\n },\n ],\n },\n {\n name: \"Résultat d'exploitation\",\n key: 'operatingResult',\n total: 0,\n calculation: true,\n calculationAdd: ['totalOperatingIncome'],\n calculationSubtract: ['totalOperatingExpenses'],\n },\n {\n name: 'Total des produits financiers',\n key: 'totalFinancialProducts',\n total: 0,\n isProduct: true,\n fields: [\n {\n name: 'De participations',\n total: 0,\n accounts: ['761'],\n },\n {\n name: \"D'autres valeurs mobilières et créances de l'actif immobilisé\",\n total: 0,\n accounts: ['762'],\n },\n {\n name: 'Autres intérêts et produits assimilés',\n total: 0,\n accounts: ['760', '763', '764', '765', '768'],\n },\n {\n name: 'Reprises sur dépréciations, provisions et transferts de charges financières',\n total: 0,\n accounts: ['786', '796'],\n },\n {\n name: 'Différences positives de change',\n total: 0,\n accounts: ['766'],\n },\n {\n name: 'Produits nets sur cessions de valeurs mobilières de placement',\n total: 0,\n accounts: ['767'],\n },\n ],\n },\n {\n name: 'Total des charges financières',\n total: 0,\n key: 'totalFinancialExpenses',\n fields: [\n {\n name: 'Dotations aux amortissements, dépréciations et provisions',\n total: 0,\n accounts: ['686'],\n },\n {\n name: 'Intérêts et charges assimilés',\n total: 0,\n accounts: ['661', '664', '665', '668'],\n },\n {\n name: 'Différences négatives de change',\n total: 0,\n accounts: ['666'],\n },\n {\n name: 'Charges nettes sur cessions de valeurs mobilières de placement',\n total: 0,\n accounts: ['667'],\n },\n ],\n },\n {\n name: 'Résultat financier',\n total: 0,\n calculation: true,\n calculationAdd: ['totalFinancialProducts'],\n calculationSubtract: ['totalFinancialExpenses'],\n key: 'financialResult',\n },\n {\n name: 'Résultat courant avant impôt',\n total: 0,\n calculation: true,\n calculationAdd: ['totalOperatingIncome', 'totalFinancialProducts'],\n calculationSubtract: ['totalOperatingExpenses', 'totalFinancialExpenses'],\n key: 'profitBeforeTax',\n },\n {\n name: 'Total des produits exceptionnels',\n total: 0,\n key: 'totalExceptionalProducts',\n isProduct: true,\n fields: [\n {\n name: 'Sur opérations de gestion',\n total: 0,\n accounts: ['771', '772'],\n },\n {\n name: 'Sur opérations en capital',\n total: 0,\n fields: [\n {\n name: \"Produits des cessions d'éléments d'actifs\",\n total: 0,\n accounts: ['775'],\n },\n {\n name: \"Subventions d'investissement virées aux résultats de l'exercice\",\n total: 0,\n accounts: ['777'],\n },\n {\n name: 'Autre',\n total: 0,\n accounts: ['778'],\n },\n ],\n },\n {\n name: 'Reprises sur dépréciations, provisions et transferts de charges exceptionnelles',\n total: 0,\n accounts: ['787', '797'],\n },\n ],\n },\n {\n name: 'Total des charges exceptionnelles',\n total: 0,\n key: 'totalExceptionalExpenses',\n fields: [\n {\n name: 'Sur opérations de gestion',\n total: 0,\n accounts: ['671', '672'],\n },\n {\n name: 'Sur opérations en capital',\n total: 0,\n fields: [\n {\n name: 'Valeurs comptables des éléments immobilisés et financiers cédés',\n total: 0,\n accounts: ['675'],\n },\n {\n name: 'Autre',\n total: 0,\n accounts: ['678'],\n },\n ],\n },\n {\n name: 'Dotations aux amortissements, dépréciations et provisions',\n total: 0,\n fields: [\n {\n name: 'Dotations aux provisions réglementées',\n accounts: ['6872', '6873', '6874'],\n total: 0,\n },\n {\n name: 'Dotations aux amortissements, dépréciations et autres provisions',\n accounts: ['6871', '6875', '6876'],\n total: 0,\n },\n ],\n },\n ],\n },\n {\n name: 'Résultat exceptionnel',\n total: 0,\n calculation: true,\n calculationAdd: ['totalExceptionalProducts'],\n calculationSubtract: ['totalExceptionalExpenses'],\n key: 'exceptionalResult',\n },\n {\n name: 'Impôt sur les bénéfices',\n total: 0,\n key: 'incomeTax',\n accounts: ['69'],\n },\n {\n name: \"Résultat de l'exercice\",\n total: 0,\n calculation: true,\n calculationAdd: ['totalOperatingIncome', 'totalFinancialProducts', 'totalExceptionalProducts'],\n calculationSubtract: ['totalOperatingExpenses', 'totalFinancialExpenses', 'totalExceptionalExpenses', 'incomeTax'],\n key: 'resultOfExercise',\n },\n];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,8BAA8B,EAG/B,MAAM,qDAAqD,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAOvE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,aAAa,CAAC;AAkBrB,wBAAgB,0BAA0B,CACxC,qBAAqB,EAAE,mBAAmB,EAC1C,OAAO,EAAE,qBAAqB,GAAG,qBAAqB,EACtD,mBAAmB,UAAQ,EAC3B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,8BAA8B,CAmHhC;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EACxB,mBAAmB,UAAQ,EAC3B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,0BAA0B,CA4B5B"}
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,8BAA8B,EAG/B,MAAM,qDAAqD,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAOvE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,aAAa,CAAC;AAkBrB,wBAAgB,0BAA0B,CACxC,qBAAqB,EAAE,mBAAmB,EAC1C,OAAO,EAAE,qBAAqB,GAAG,qBAAqB,EACtD,mBAAmB,UAAQ,EAC3B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,8BAA8B,CAyHhC;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EACxB,mBAAmB,UAAQ,EAC3B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,0BAA0B,CA4B5B"}
@@ -36,6 +36,7 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload, shoul
36
36
  const totalTaxIncluded = _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount');
37
37
  const locale = payload.language ?? InvoiceLanguage.FR;
38
38
  const languageOption = internationalizationChoices[locale];
39
+ const accountingCategory = AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null;
39
40
  const data = {
40
41
  ...payload,
41
42
  thirdParty,
@@ -43,15 +44,17 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload, shoul
43
44
  idEstimateInvoiceType,
44
45
  title: payload.title ?? null,
45
46
  penalties: payload.penalties
46
- ? (internationalizationConsistency(locale, payload.penalties, 'penalties') ?? null)
47
+ ? (internationalizationConsistency(locale, payload.penalties, 'penalties') ?? payload.penalties)
47
48
  : null,
48
49
  termsOfPayment: payload.termsOfPayment
49
- ? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? null)
50
+ ? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? payload.termsOfPayment)
50
51
  : null,
51
52
  compensation: payload.compensation
52
- ? (internationalizationConsistency(locale, payload.compensation, 'recoveryCost') ?? null)
53
+ ? (internationalizationConsistency(locale, payload.compensation, 'recoveryCost') ?? payload.compensation)
54
+ : null,
55
+ discount: payload.discount
56
+ ? (internationalizationConsistency(locale, payload.discount, 'discount') ?? payload.discount)
53
57
  : null,
54
- discount: payload.discount ? (internationalizationConsistency(locale, payload.discount, 'discount') ?? null) : null,
55
58
  vatMention: payload.vatMention
56
59
  ? (internationalizationConsistency(locale, payload.vatMention, 'vatMention') ?? null)
57
60
  : null,
@@ -86,7 +89,9 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload, shoul
86
89
  shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),
87
90
  // @ts-ignore
88
91
  marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),
89
- accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,
92
+ accountingCategoryFormatted: accountingCategory
93
+ ? (internationalizationConsistency(locale, accountingCategory, 'accountingCategory') ?? null)
94
+ : null,
90
95
  // @ts-ignore
91
96
  brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }),
92
97
  brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv })}`,
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,IAAI,MAAM,EAAE,IAAI,IAAI,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AACnH,OAAO,KAAK,KAA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OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI;QACtG,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,aAAa;QACb,WAAW,EAAE,cAAc,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAmB;QAClF,mBAAmB;QACnB,YAAY,EAAE,cAAc;KAC7B,CAAC;IAEF,MAAM,YAAY,GAAG,IAAI,0BAA0B,EAAE,CAAC;IAEtD,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["import { orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq, round as _round } from 'lodash';\nimport * as dayjs from 'dayjs';\nimport {\n ReadCommercialDocumentTemplate,\n ReadDocumentEditing,\n ReadVatEditing,\n} from '../../types/Interface/api/commercialManagement/Read';\nimport { AccountingCategoryList, FontIds, fontList, InvoiceLanguage } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString, integerToFormattedAmountObject } from '../amount';\nimport { CommercialDocumentCommonHTML, CommercialDocumentMailHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport {\n CreateInvoiceDocument,\n CreateMailHeader,\n CreatePreSaleDocument,\n ReadCommercialMailTemplate,\n} from '../../types';\nimport { thirdPartyToReadThirdPartyEditing } from './thirdParty';\nimport { getBrandConfig } from '../brands';\nimport { internationalizationChoices, internationalizationConsistency } from './internationalization/choices';\n\nimport * as ejs from 'ejs';\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nrequire('dayjs/locale/fr');\n\ntype brandColorType = {\n primary: string;\n primary50: string;\n primary100: string;\n primary300: string;\n primary500: string;\n primary700: string;\n};\n\nexport function generateCommercialDocument(\n idEstimateInvoiceType: EstimateInvoiceType,\n payload: CreateInvoiceDocument | CreatePreSaleDocument,\n shouldHideBrandName = false,\n nodeEnv: string | undefined = undefined,\n): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(\n Object.values(_groupBy(products, 'vatFormatted')).map((v) => vatToReadVatEditing(v), 'value'),\n ).filter((v) => v.id !== Vat.MARGE.id);\n const thirdParty = thirdPartyToReadThirdPartyEditing(payload.thirdParty);\n\n let forcedVats: ReadVatEditing[] | undefined = undefined;\n\n if (payload.advanceProducts?.length) {\n const advanceVats = Object.values(_groupBy(payload.advanceProducts, 'vatFormatted'))\n .map((v) => vatToReadVatEditing(v), 'value')\n .filter((v) => v.id !== Vat.MARGE.id);\n\n forcedVats = vats.map((v) => {\n const base = v.base - (advanceVats.find((a) => a.id === v.id)?.base ?? 0);\n const toPay = v.toPay - (advanceVats.find((a) => a.id === v.id)?.toPay ?? 0);\n return {\n ...v,\n baseFormatted: integerToFormattedAmountString(base),\n amountFormatted: integerToFormattedAmountString(toPay),\n };\n });\n }\n\n const totalTaxIncluded = _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount');\n\n const locale = payload.language ?? InvoiceLanguage.FR;\n const languageOption = internationalizationChoices[locale];\n\n const data: ReadDocumentEditing & { brandColors: brandColorType; brandName: string; shouldHideBrandName: boolean } = {\n ...payload,\n thirdParty,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n title: payload.title ?? null,\n penalties: payload.penalties\n ? (internationalizationConsistency(locale, payload.penalties, 'penalties') ?? null)\n : null,\n termsOfPayment: payload.termsOfPayment\n ? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? null)\n : null,\n compensation: payload.compensation\n ? (internationalizationConsistency(locale, payload.compensation, 'recoveryCost') ?? null)\n : null,\n discount: payload.discount ? (internationalizationConsistency(locale, payload.discount, 'discount') ?? null) : null,\n vatMention: payload.vatMention\n ? (internationalizationConsistency(locale, payload.vatMention, 'vatMention') ?? null)\n : null,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'),\n totalTaxIncluded: _round(totalTaxIncluded),\n totalTaxAndDiscountIncluded: _round(totalTaxIncluded),\n generalDiscountFormatted: payload.generalDiscount2\n ? integerToFormattedAmountString(payload.generalDiscount2)\n : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')),\n totalTaxIncludedFormatted: integerToFormattedAmountString(totalTaxIncluded),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(\n totalTaxIncluded - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0),\n ),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n id: payload.settings?.idFont ?? FontIds.CIRCULAR_STD,\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital\n ? `${payload.capital}`\n .split('')\n .reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '')\n .trim()\n : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n // @ts-ignore\n brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,\n brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv }) as unknown as string}`,\n shouldHideBrandName,\n paymentType: payload.paymentType\n ? internationalizationConsistency(locale, payload.paymentType, 'paymentType')\n : null,\n languageTemplate: languageOption,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n const documentFreeText = [EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)\n ? payload?.settings?.freeEstimateText\n : payload?.settings?.freeInvoiceText;\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, {\n ...data,\n comment: data.comment && typeof data.comment === 'string' ? data.comment?.replace(/\\n/g, '<br/>') : null,\n products: data.products.map((p) => ({\n ...p,\n comment: p.comment && typeof p.comment === 'string' ? p.comment?.replace(/\\n/g, '<br/>') : null,\n })),\n vats: forcedVats ?? vats,\n }),\n footer: ejs.render(commonTemplate.footer, {\n ...data,\n freeText: documentFreeText ?? null,\n }),\n data,\n };\n}\n\nexport function generateMailHeader(\n params: CreateMailHeader,\n shouldHideBrandName = false,\n nodeEnv: string | undefined = undefined,\n): ReadCommercialMailTemplate {\n const locale = params.payload.language ?? InvoiceLanguage.FR;\n const languageOption = internationalizationChoices[locale];\n dayjs.locale('fr');\n const data = {\n ...params.payload,\n totalTaxExcludedFormatted: integerToFormattedAmountObject(params.payload.totalTaxExcluded),\n totalTaxIncludedFormatted: integerToFormattedAmountObject(params.payload.totalTaxIncluded),\n totalVatFormatted: integerToFormattedAmountObject(\n params.payload.totalTaxIncluded - params.payload.totalTaxExcluded,\n ),\n dueDateFormatted: params.payload.dueDate ? dayjs(params.payload.dueDate).format('DD MMMM YYYY') : null,\n hasVat: params.hasVat,\n hostS3: params.hostS3,\n logoUrl: params.logoUrl,\n companyName: params.companyName,\n fileUrl: params.fileUrl,\n // @ts-ignore\n brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,\n shouldHideBrandName,\n languageMail: languageOption,\n };\n\n const mailTemplate = new CommercialDocumentMailHTML();\n\n return {\n header: ejs.render(mailTemplate.header, data),\n };\n}\n"]}
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,IAAI,MAAM,EAAE,IAAI,IAAI,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AACnH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACnH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAO5C,OAAO,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAE9G,OAAO,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MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["import { orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq, round as _round } from 'lodash';\nimport * as dayjs from 'dayjs';\nimport {\n ReadCommercialDocumentTemplate,\n ReadDocumentEditing,\n ReadVatEditing,\n} from '../../types/Interface/api/commercialManagement/Read';\nimport { AccountingCategoryList, FontIds, fontList, InvoiceLanguage } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString, integerToFormattedAmountObject } from '../amount';\nimport { CommercialDocumentCommonHTML, CommercialDocumentMailHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport {\n CreateInvoiceDocument,\n CreateMailHeader,\n CreatePreSaleDocument,\n ReadCommercialMailTemplate,\n} from '../../types';\nimport { thirdPartyToReadThirdPartyEditing } from './thirdParty';\nimport { getBrandConfig } from '../brands';\nimport { internationalizationChoices, internationalizationConsistency } from './internationalization/choices';\n\nimport * as ejs from 'ejs';\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nrequire('dayjs/locale/fr');\n\ntype brandColorType = {\n primary: string;\n primary50: string;\n primary100: string;\n primary300: string;\n primary500: string;\n primary700: string;\n};\n\nexport function generateCommercialDocument(\n idEstimateInvoiceType: EstimateInvoiceType,\n payload: CreateInvoiceDocument | CreatePreSaleDocument,\n shouldHideBrandName = false,\n nodeEnv: string | undefined = undefined,\n): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(\n Object.values(_groupBy(products, 'vatFormatted')).map((v) => vatToReadVatEditing(v), 'value'),\n ).filter((v) => v.id !== Vat.MARGE.id);\n const thirdParty = thirdPartyToReadThirdPartyEditing(payload.thirdParty);\n\n let forcedVats: ReadVatEditing[] | undefined = undefined;\n\n if (payload.advanceProducts?.length) {\n const advanceVats = Object.values(_groupBy(payload.advanceProducts, 'vatFormatted'))\n .map((v) => vatToReadVatEditing(v), 'value')\n .filter((v) => v.id !== Vat.MARGE.id);\n\n forcedVats = vats.map((v) => {\n const base = v.base - (advanceVats.find((a) => a.id === v.id)?.base ?? 0);\n const toPay = v.toPay - (advanceVats.find((a) => a.id === v.id)?.toPay ?? 0);\n return {\n ...v,\n baseFormatted: integerToFormattedAmountString(base),\n amountFormatted: integerToFormattedAmountString(toPay),\n };\n });\n }\n\n const totalTaxIncluded = _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount');\n\n const locale = payload.language ?? InvoiceLanguage.FR;\n const languageOption = internationalizationChoices[locale];\n\n const accountingCategory = AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null;\n\n const data: ReadDocumentEditing & { brandColors: brandColorType; brandName: string; shouldHideBrandName: boolean } = {\n ...payload,\n thirdParty,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n title: payload.title ?? null,\n penalties: payload.penalties\n ? (internationalizationConsistency(locale, payload.penalties, 'penalties') ?? payload.penalties)\n : null,\n termsOfPayment: payload.termsOfPayment\n ? (internationalizationConsistency(locale, payload.termsOfPayment, 'termsOfPayment') ?? payload.termsOfPayment)\n : null,\n compensation: payload.compensation\n ? (internationalizationConsistency(locale, payload.compensation, 'recoveryCost') ?? payload.compensation)\n : null,\n discount: payload.discount\n ? (internationalizationConsistency(locale, payload.discount, 'discount') ?? payload.discount)\n : null,\n vatMention: payload.vatMention\n ? (internationalizationConsistency(locale, payload.vatMention, 'vatMention') ?? null)\n : null,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'),\n totalTaxIncluded: _round(totalTaxIncluded),\n totalTaxAndDiscountIncluded: _round(totalTaxIncluded),\n generalDiscountFormatted: payload.generalDiscount2\n ? integerToFormattedAmountString(payload.generalDiscount2)\n : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')),\n totalTaxIncludedFormatted: integerToFormattedAmountString(totalTaxIncluded),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(\n totalTaxIncluded - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0),\n ),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n id: payload.settings?.idFont ?? FontIds.CIRCULAR_STD,\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital\n ? `${payload.capital}`\n .split('')\n .reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '')\n .trim()\n : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n accountingCategoryFormatted: accountingCategory\n ? (internationalizationConsistency(locale, accountingCategory, 'accountingCategory') ?? null)\n : null,\n // @ts-ignore\n brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,\n brandName: `${getBrandConfig({ objectWaited: 'name', nodeEnv }) as unknown as string}`,\n shouldHideBrandName,\n paymentType: payload.paymentType\n ? internationalizationConsistency(locale, payload.paymentType, 'paymentType')\n : null,\n languageTemplate: languageOption,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n const documentFreeText = [EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)\n ? payload?.settings?.freeEstimateText\n : payload?.settings?.freeInvoiceText;\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, {\n ...data,\n comment: data.comment && typeof data.comment === 'string' ? data.comment?.replace(/\\n/g, '<br/>') : null,\n products: data.products.map((p) => ({\n ...p,\n comment: p.comment && typeof p.comment === 'string' ? p.comment?.replace(/\\n/g, '<br/>') : null,\n })),\n vats: forcedVats ?? vats,\n }),\n footer: ejs.render(commonTemplate.footer, {\n ...data,\n freeText: documentFreeText ?? null,\n }),\n data,\n };\n}\n\nexport function generateMailHeader(\n params: CreateMailHeader,\n shouldHideBrandName = false,\n nodeEnv: string | undefined = undefined,\n): ReadCommercialMailTemplate {\n const locale = params.payload.language ?? InvoiceLanguage.FR;\n const languageOption = internationalizationChoices[locale];\n dayjs.locale('fr');\n const data = {\n ...params.payload,\n totalTaxExcludedFormatted: integerToFormattedAmountObject(params.payload.totalTaxExcluded),\n totalTaxIncludedFormatted: integerToFormattedAmountObject(params.payload.totalTaxIncluded),\n totalVatFormatted: integerToFormattedAmountObject(\n params.payload.totalTaxIncluded - params.payload.totalTaxExcluded,\n ),\n dueDateFormatted: params.payload.dueDate ? dayjs(params.payload.dueDate).format('DD MMMM YYYY') : null,\n hasVat: params.hasVat,\n hostS3: params.hostS3,\n logoUrl: params.logoUrl,\n companyName: params.companyName,\n fileUrl: params.fileUrl,\n // @ts-ignore\n brandColors: getBrandConfig({ objectWaited: 'colors', nodeEnv }) as brandColorType,\n shouldHideBrandName,\n languageMail: languageOption,\n };\n\n const mailTemplate = new CommercialDocumentMailHTML();\n\n return {\n header: ejs.render(mailTemplate.header, data),\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { InvoiceLanguage } from '../../../types/Enum/CommercialManagement';
2
2
  import { InternationalizationChoicesType } from './type';
3
- type InternationalizationConsistencyKey = 'penalties' | 'discount' | 'vatMention' | 'recoveryCost' | 'paymentType' | 'termsOfPayment';
3
+ type InternationalizationConsistencyKey = 'penalties' | 'discount' | 'vatMention' | 'recoveryCost' | 'paymentType' | 'termsOfPayment' | 'accountingCategory';
4
4
  export declare const internationalizationChoices: InternationalizationChoicesType;
5
5
  export declare const internationalizationConsistency: (language: InvoiceLanguage, value: string, key: InternationalizationConsistencyKey) => string | undefined;
6
6
  export {};