@silexpert/core 1.2.10 → 1.2.12

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 (75) hide show
  1. package/dist/cjs/api/resources/Society.d.ts +0 -1
  2. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Society.js +0 -3
  4. package/dist/cjs/api/resources/Society.js.map +1 -1
  5. package/dist/cjs/types/Enum/BalanceSheet.d.ts +2 -0
  6. package/dist/cjs/types/Enum/BalanceSheet.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/BalanceSheet.js +3 -1
  8. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  9. package/dist/cjs/types/Enum/ReasonTerminationType.d.ts +2 -1
  10. package/dist/cjs/types/Enum/ReasonTerminationType.d.ts.map +1 -1
  11. package/dist/cjs/types/Enum/ReasonTerminationType.js +6 -0
  12. package/dist/cjs/types/Enum/ReasonTerminationType.js.map +1 -1
  13. package/dist/cjs/types/Enum/StatusRating.d.ts.map +1 -1
  14. package/dist/cjs/types/Enum/StatusRating.js +1 -0
  15. package/dist/cjs/types/Enum/StatusRating.js.map +1 -1
  16. package/dist/cjs/types/Enum/TimeCounterType.d.ts +8 -0
  17. package/dist/cjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  18. package/dist/cjs/types/Enum/TimeCounterType.js +8 -0
  19. package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
  20. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts +1 -0
  21. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js +6 -0
  23. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js.map +1 -1
  24. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js +2 -2
  25. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  26. package/dist/cjs/utils/checklist.js +1 -1
  27. package/dist/cjs/utils/checklist.js.map +1 -1
  28. package/dist/cjs/utils/commercialManagement/internationalization/choices.js +27 -27
  29. package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
  30. package/dist/cjs/utils/payment.d.ts.map +1 -1
  31. package/dist/cjs/utils/payment.js +8 -1
  32. package/dist/cjs/utils/payment.js.map +1 -1
  33. package/dist/mjs/api/resources/Society.d.ts +0 -1
  34. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  35. package/dist/mjs/api/resources/Society.js +0 -3
  36. package/dist/mjs/api/resources/Society.js.map +1 -1
  37. package/dist/mjs/types/Enum/BalanceSheet.d.ts +2 -0
  38. package/dist/mjs/types/Enum/BalanceSheet.d.ts.map +1 -1
  39. package/dist/mjs/types/Enum/BalanceSheet.js +3 -1
  40. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  41. package/dist/mjs/types/Enum/ReasonTerminationType.d.ts +2 -1
  42. package/dist/mjs/types/Enum/ReasonTerminationType.d.ts.map +1 -1
  43. package/dist/mjs/types/Enum/ReasonTerminationType.js +6 -0
  44. package/dist/mjs/types/Enum/ReasonTerminationType.js.map +1 -1
  45. package/dist/mjs/types/Enum/StatusRating.d.ts.map +1 -1
  46. package/dist/mjs/types/Enum/StatusRating.js +1 -0
  47. package/dist/mjs/types/Enum/StatusRating.js.map +1 -1
  48. package/dist/mjs/types/Enum/TimeCounterType.d.ts +8 -0
  49. package/dist/mjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  50. package/dist/mjs/types/Enum/TimeCounterType.js +8 -0
  51. package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
  52. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts +1 -0
  53. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts.map +1 -1
  54. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js +7 -0
  55. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js.map +1 -1
  56. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js +2 -2
  57. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  58. package/dist/mjs/utils/checklist.js +1 -1
  59. package/dist/mjs/utils/checklist.js.map +1 -1
  60. package/dist/mjs/utils/commercialManagement/internationalization/choices.js +27 -27
  61. package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
  62. package/dist/mjs/utils/payment.d.ts.map +1 -1
  63. package/dist/mjs/utils/payment.js +8 -1
  64. package/dist/mjs/utils/payment.js.map +1 -1
  65. package/package.json +1 -1
  66. package/ts/api/resources/Society.ts +0 -3
  67. package/ts/types/Enum/BalanceSheet.ts +6 -1
  68. package/ts/types/Enum/ReasonTerminationType.ts +6 -0
  69. package/ts/types/Enum/StatusRating.ts +1 -0
  70. package/ts/types/Enum/TimeCounterType.ts +8 -0
  71. package/ts/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.ts +5 -0
  72. package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +2 -2
  73. package/ts/utils/checklist.ts +1 -1
  74. package/ts/utils/commercialManagement/internationalization/choices.ts +27 -27
  75. package/ts/utils/payment.ts +9 -1
@@ -1 +1 @@
1
- {"version":3,"file":"choices.js","sourceRoot":"","sources":["../../../../../ts/utils/commercialManagement/internationalization/choices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAIhF,MAAM,CAAC,MAAM,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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W;gBACrB,QAAQ,EAAE,iBAAiB;gBAC3B,IAAI,EAAE,UAAU;aACjB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,cAAc;gBACrB,QAAQ,EAAE,SAAS;aACpB;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,eAAe;gBACtB,QAAQ,EAAE,UAAU;aACrB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,iBAAiB;gBACxB,QAAQ,EAAE,YAAY;aACvB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,cAAc;gBACrB,QAAQ,EAAE,SAAS;aACpB;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,YAAY;gBACnB,QAAQ,EAAE,OAAO;aAClB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,cAAc;gBACrB,QAAQ,EAAE,SAAS;aACpB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,eAAe;gBACtB,QAAQ,EAAE,UAAU;aACrB;SAEF;KACF;CACF,CAAC","sourcesContent":["import { AccountingCategoryId } from '../../../types/Enum/CommercialManagement';\nimport { InternationalizationChoicesType } from './type';\n\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: [\n 'Non applicable',\n '3 fois le taux légal',\n 'Taux directeur de la BCE + 10 points',\n ],\n discount: [\n 'Non applicable',\n 'Aucun escompte en cas de paiement anticipé',\n ],\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: [\n 'Non applicable',\n '40€',\n ],\n paymentType: [\n 'Carte bancaire',\n 'Chèque',\n 'Espèces',\n 'Prélèvement',\n 'Virement bancaire',\n ],\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 jusq\\'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 },\n deposit: {\n headers: {\n title: 'Accompte',\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: 'reste',\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 },\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: [\n 'Not applicable',\n '3 times the legal rate',\n 'ECB key rate + 10 points',\n ],\n discount: [\n 'Not applicable',\n 'No discount for early payment',\n ],\n vatMention: [\n 'Not affected',\n 'Not applicable',\n 'VAT not applicable, art. 293 B of the FGTC',\n 'VAT not applicable - Exports outside the EU - Art. 259-1 FGTC',\n 'Not subject to VAT under article 261C of the FGTC',\n 'Article 261 D of the French General Tax Code (FGTC)',\n 'VAT exemption, article 283-2 of the French General Tax Code',\n 'VAT exemption: Article 262 ter I of the FGTC',\n 'VAT notice 261.4.4 1 of the FGTC',\n 'Special regime - Second-hand goods - article 297 A of the FGTC and EC directive 2006/112/EC',\n 'Special regime - Works of art - article 297 A of the FGTC and EC directive 2006/112/EC',\n 'Special regime – Collector\\'s items and antiques - article 297 A of the FGTC and EC directive 2006/112/EC',\n 'Special regime - Travel agencies - article 297 A of the FGTC and EC directive 2006/112/EC',\n 'Invoice subject to VAT reverse charge system',\n ],\n recoveryCost: [\n 'Not applicable',\n '40€',\n ],\n paymentType: [\n 'Credit card',\n 'Check',\n 'Cash',\n 'Withdrawal',\n 'Bank transfer',\n ],\n },\n },\n template: {\n common: {\n headers: {\n emissionDate: 'Emission date',\n accountingCategory: {\n title: 'Accounting category',\n choices: [\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 },\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 payment penalties', \n discount: 'discount',\n recoveryCosts: 'Recovery cost for delays',\n generate: 'Created by',\n },\n options: { \n vatMention: 'VAT mention',\n paymentType: 'payment type',\n bank: 'BANK',\n approval: 'For apprval',\n comment: 'Comment',\n \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: 'Recap',\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: 'Estimate',\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 },\n deposit: {\n headers: {\n title: 'Deposit',\n expirationDate: 'Expiration date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n asset: {\n headers: {\n title: 'Asset',\n dueDate: 'Due date',\n termsOfPayment: 'Deadline for payment',\n },\n },\n remainder: {\n headers: {\n title: 'Remainder',\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};"]}
1
+ {"version":3,"file":"choices.js","sourceRoot":"","sources":["../../../../../ts/utils/commercialManagement/internationalization/choices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAIhF,MAAM,CAAC,MAAM,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,oBAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,oBAAoB,EAAE;oBAC1E,EAAE,EAAE,EAAE,oBAAoB,CAAC,gBAAgB,EAAE,KAAK,EAAE,wBAAwB,EAAE;oBAC9E,EAAE,EAAE,EAAE,oBAAoB,CAAC,gBAAgB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AAU;aACrB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,iBAAiB;gBACxB,QAAQ,EAAE,YAAY;aACvB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,cAAc;gBACrB,QAAQ,EAAE,SAAS;aACpB;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,YAAY;gBACnB,QAAQ,EAAE,OAAO;aAClB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,cAAc;gBACrB,QAAQ,EAAE,SAAS;aACpB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,eAAe;gBACtB,QAAQ,EAAE,UAAU;aACrB;SAEF;KACF;CACF,CAAC","sourcesContent":["import { AccountingCategoryId } from '../../../types/Enum/CommercialManagement';\nimport { InternationalizationChoicesType } from './type';\n\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: [\n 'Non applicable',\n '3 fois le taux légal',\n 'Taux directeur de la BCE + 10 points',\n ],\n discount: [\n 'Non applicable',\n 'Aucun escompte en cas de paiement anticipé',\n ],\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: [\n 'Non applicable',\n '40€',\n ],\n paymentType: [\n 'Carte bancaire',\n 'Chèque',\n 'Espèces',\n 'Prélèvement',\n 'Virement bancaire',\n ],\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 jusq\\'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 },\n deposit: {\n headers: {\n title: 'Accompte',\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: 'reste',\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 },\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: [\n 'Not applicable',\n '3 times the legal rate',\n 'ECB key rate + 10 points',\n ],\n discount: [\n 'Not applicable',\n 'No discount for early payment',\n ],\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: [\n 'Not applicable',\n '40€',\n ],\n paymentType: [\n 'Credit card',\n 'Check',\n 'Cash',\n 'Direct debit',\n 'Bank transfer',\n ],\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 },\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 },\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};"]}
@@ -1 +1 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../ts/utils/payment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAe,qBAAqB,EAAiB,WAAW,EAA0B,MAAM,UAAU,CAAC;AAK5H,UAAU,gBAAiB,SAAQ,QAAQ;IACzC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7D,YAAY,EAAE,QAAQ,EAAE,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,0BAA0B,aAAc,QAAQ,EAAE,UAAS,CAAC,aAAa,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC,EAAE,KAA2D,gBAAgB,EAoCrM,CAAC;AAoBF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,qBAAqB,WAAY,qBAAqB,KAAE,WAAW,EA2QxE,CAAC;AAEF,OAAO,EACL,0BAA0B,EAAE,qBAAqB,GAClD,CAAC"}
1
+ {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../ts/utils/payment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAe,qBAAqB,EAAiB,WAAW,EAA0B,MAAM,UAAU,CAAC;AAK5H,UAAU,gBAAiB,SAAQ,QAAQ;IACzC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7D,YAAY,EAAE,QAAQ,EAAE,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,0BAA0B,aAAc,QAAQ,EAAE,UAAS,CAAC,aAAa,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC,EAAE,KAA2D,gBAAgB,EAoCrM,CAAC;AAoBF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,qBAAqB,WAAY,qBAAqB,KAAE,WAAW,EAmRxE,CAAC;AAEF,OAAO,EACL,0BAA0B,EAAE,qBAAqB,GAClD,CAAC"}
@@ -188,7 +188,7 @@ const calculatePaymentsAuto = (params) => {
188
188
  }
189
189
  //express : on étale en countExpressMonthlyPayment (nb de mensualités)
190
190
  let remainingAmountByExercicePrestation = remainingAmount; //TTC
191
- let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 3; //TTC
191
+ let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 1; //TTC
192
192
  //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)
193
193
  if (indexEP === 0 && sumRegulations > 0)
194
194
  countExpressMonthlyPayment -= 1;
@@ -230,6 +230,13 @@ const calculatePaymentsAuto = (params) => {
230
230
  let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
231
231
  if (countMonthsBeforeExerciceEnd < 3)
232
232
  countMonthsBeforeExerciceEnd = 3;
233
+ // Si un client signe un Express dans les 3 derniers mois de l'année (par exemple en décembre 2024)
234
+ // on ne doit pas générer l'année 2025 sur 13 mois à partir du 12/24
235
+ // mais on doit attendre le début de l'exercice concerné (ici, 01/25)
236
+ if (countMonthsBeforeExerciceEnd > 12) {
237
+ paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
238
+ continue;
239
+ }
233
240
  const exoAmount = isFirstNonExpress ? yearlyAmountNonExpressClone : nextYearlyAmountNonExpress;
234
241
  const remainingBeforeThisExo = remainingAmount;
235
242
  remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);
@@ -1 +1 @@
1
- {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../ts/utils/payment.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAgD,aAAa,EAAe,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAC5H,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOtE;;;;;;;;;GASG;AACH,MAAM,0BAA0B,GAAG,CAAC,QAAoB,EAAE,QAAoE,CAAC,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,CAAC,EAAsB,EAAE;IACzM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,IAAI,KAAK,CAAC,CAAC;IAChH,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,IAAI,EAAE,EAAE,mBAAmB,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC3J,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,IAAI,EAAE,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;IACjK,MAAM,WAAW,G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;AACtB,CAAC,CAAC;AAEF,OAAO,EACL,0BAA0B,EAAE,qBAAqB,GAClD,CAAC","sourcesContent":["'use strict';\n\nimport { IPayment, IRegulation, ParamsForPaymentsAuto, PaymentMethod, PaymentAuto, getTaxesIncludedAmount } from '../types';\nimport * as dayjs from 'dayjs';\nimport { PartialExercicePrestationExpress } from '../types/Interface/api/payment/Util';\nimport { getApplicationFeesAmount, getPriceGrid } from './prestation';\n\ninterface PaymentsWithList extends IPayment {\n type: 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther',\n listPayments: IPayment[]\n}\n\n/**\n * A partir d'une liste de payment (avec include jusqu'à prestationList, \n * avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')\n * permet de récupérer uniquement le premier paiement de chaque type \n * et les autres payments dans listPayments\n * avec possibilité de filtrer avec le tableau de filtres\n * @param payments \n * @param types \n * @returns \n */\nconst groupPaymentsByServiceType = (payments: IPayment[], types: ('isComptable' | 'isJuridique' | 'isSocial' | 'isOther')[] = ['isComptable', 'isJuridique', 'isSocial', 'isOther']): PaymentsWithList[] => {\n const prestaComptable = payments.filter((el) => el?.paymentsPrestations?.prestationsList?.isComptable ?? false);\n const prestaSocial = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isSocial);\n const prestaJuridique = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isJuridique);\n const prestaOther = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && !el?.paymentsPrestations?.prestationsList?.isJuridique && !el?.paymentsPrestations?.prestationsList?.isSocial);\n \n const societyPayment: PaymentsWithList[] = [];\n if (prestaComptable.length && types.includes('isComptable')) {\n societyPayment.push({\n ...prestaComptable[0], // Données de base\n type: 'isComptable',\n listPayments: prestaComptable,\n });\n }\n if (prestaSocial.length && types.includes('isSocial')) {\n societyPayment.push({\n ...prestaSocial[0], // Données de base\n type: 'isSocial',\n listPayments: prestaSocial,\n });\n }\n if (prestaJuridique.length && types.includes('isJuridique')) {\n societyPayment.push({\n ...prestaJuridique[0], // Données de base\n type: 'isJuridique',\n listPayments: prestaJuridique,\n });\n }\n if (prestaOther.length && types.includes('isOther')) {\n societyPayment.push({\n ...prestaOther[0], // Données de base\n type: 'isOther',\n listPayments: prestaOther,\n });\n }\n return societyPayment;\n};\n\nconst calculateFees = (amount: number, paymentDate: Date):number => {\n const yearlyPriceIncreasing = 1.0275;\n\n // Commenté car en fin d'année, pour appliquer le taux d'inflation annuel, \n // un script enlève les 2,75€ appliqués pour appliquer le bon taux\n // const oneYearLessIfIn3LastMonthsOfYear = dayjs(goToClient).month() >= 9 ? 1 : 0;\n\n if (dayjs(paymentDate).year() - dayjs().year() > 0) {\n const nbYearsMore = dayjs(paymentDate).year() - dayjs().year()/* - oneYearLessIfIn3LastMonthsOfYear */;\n // on applique X fois l'augmentation\n // ex. : si on lance l'appel en 2024, et qu'on génére un paiement pour 2026, on applique 2 fois l'augmentation\n // soit amount * yearlyPriceIncreasing * yearlyPriceIncreasing\n // soit amount * yearlyPriceIncreasing ^ nbYearsMore\n amount = amount * Math.pow(yearlyPriceIncreasing, nbYearsMore);\n }\n return amount;\n};\n\n/**\n// * @param {number} firstPaymentAmount - amount of the first payment (first regulation of the customer)\n * @param {Date} firstExerciceNonExpresssEndDate - end date of the first exercice non express\n * @param {number} idPrestation - prestation id\n * @param {number} idLegalForm - legal form id of the society\n * @param {boolean} isWithApplicationFees - if the prestation has application fees to paid\n * @param {IPrestationList} prestationList - type of prestation (hidden: 0, isCatalog: 1, isComptable: 1)\n * @param {number} idVat - vat id of society linked\n * @param {number} yearlyAmountNonExpress - yearly amount of non express prestation (HT)\n * @param {number} nextYearlyAmountNonExpress - yearly amount of non express prestation for next years (HT)\n * @param {PartialExercicePrestationExpress[]} listPartialExercicePrestationExpress - list of exercicePrestation linked to idPrestation -> used to get express\n * @param {IRegulation[]} listRegulations - list of regulations linked to idPrestation (TTC)\n * @param {Date} recoveryDate - date of recovery of the society\n * @returns { IPayment[] } list of payment to create for billing auto, after each presta go to onBoarding\n */\nconst calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {\n const { idTypeBrand, isWithApplicationFees, firstExerciceNonExpresssEndDate, idPrestation, idLegalForm, prestationList, idVat, yearlyAmountNonExpress, nextYearlyAmountNonExpress, listPartialExercicePrestationExpress, listRegulations, recoveryDate } = params;\n \n if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');\n\n let initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 15 */\n ? dayjs().add(2, 'month').startOf('month').toDate()\n : dayjs().add(1, 'month').startOf('month').toDate();\n \n //Si date de reprise, alors on initialise à cette date\n if (recoveryDate && dayjs(recoveryDate).isAfter(dayjs(), 'month')) {\n initializedPaymentDate = dayjs(recoveryDate).startOf('month').toDate();\n }\n\n // On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC \n // et pour connaitre le montant du coût de l'app\n if (!prestationList.id) throw new Error('idPrestationList manquant');\n const priceGrid = getPriceGrid(idTypeBrand, prestationList.id);\n if (!priceGrid) throw new Error('Impossible de trouver la grille tarifaire correspondante');\n const { applicationCost, priceWithTaxesIncluded } = priceGrid;\n const applicationCostTotalTTC = (priceWithTaxesIncluded ? applicationCost : getTaxesIncludedAmount(applicationCost, idVat)) * 12;\n const applicationFeesAmountTTC = getApplicationFeesAmount(idLegalForm, idVat);\n\n if (prestationList?.isCatalog || !prestationList?.isComptable) throw new Error('Ce type de prestation ne correspond pas aux conditions attendues.');\n if (listPartialExercicePrestationExpress.length && listPartialExercicePrestationExpress?.some((ep: PartialExercicePrestationExpress) => !ep?.startDate)) throw new Error('Start date of some exercice are missing');\n \n let yearlyAmountNonExpressClone = yearlyAmountNonExpress;\n if (isWithApplicationFees) {\n yearlyAmountNonExpressClone -= getApplicationFeesAmount(idLegalForm); //HT\n }\n\n const nbExoExpress = listPartialExercicePrestationExpress.length;\n const listPayments:PaymentAuto[] = [];\n\n // on récupère le/les premiers réglements effectués, non alloués\n // const isApplicationFeesAlreadyPaid = false;\n const sumRegulations = listRegulations.reduce((acc: number, r:IRegulation) => {\n //Si la regulation est rattachée à un paymentExpectation, on récupère le détail\n // et on ne prend que les frais de dossier (applicationFee) + le montant de la compta (accountingFee)\n \n // Commenté temporairement :\n // Pour l'instant, on ne prend plus en compte les paymentExpectation :\n // On part du principe que si isWithApplicationFees = true, alors les regulations contiennent les frais de dossier\n // sinon, ils sont offerts et n'apparaissent pas\n /* if (r.paymentsExpectation?.payload) {\n const payload = JSON.parse(r.paymentsExpectation?.payload);\n if (+payload?.applicationFee > 0) {\n isApplicationFeesAlreadyPaid = true;\n acc += +payload?.applicationFee;\n }\n if (+payload?.accountingFee > 0) acc += +payload?.accountingFee;\n return acc;\n } else {\n return acc + r.amount - r.amountUsed;\n } */\n return acc + r.amount - r.amountUsed;\n }, 0);\n let remainingAmount = -sumRegulations; //TTC\n let paymentDate = initializedPaymentDate;\n\n //On order les exercicePrestation par startDate ASC et id ASC\n listPartialExercicePrestationExpress.sort((a, b) => {\n const aStartDate = a?.startDate as Date;\n const bStartDate = b?.startDate as Date;\n return dayjs(aStartDate).diff(bStartDate);\n });\n\n // Si les frais de dossiers sont facturés, on ajoute un paiement sur le mois en cours\n if (isWithApplicationFees) {\n listPayments.push({\n amount: applicationFeesAmountTTC, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: listPartialExercicePrestationExpress?.length ? listPartialExercicePrestationExpress[0].endDate : firstExerciceNonExpresssEndDate,\n comment: 'Frais de dossier',\n });\n remainingAmount += applicationFeesAmountTTC;\n }\n \n // =========================\n // EXPRESS\n // =========================\n listPartialExercicePrestationExpress.forEach((exercicePrestation:PartialExercicePrestationExpress, indexEP: number) => {\n const remainingBeforeThisExo = remainingAmount;\n\n remainingAmount += !priceWithTaxesIncluded \n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat) \n : exercicePrestation.totalAmount; //TTC\n \n \n // Si le premier règlement couvre le coût de cet exercicePrestation, \n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount: Math.round(100 * (!priceWithTaxesIncluded \n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat) \n : exercicePrestation.totalAmount)) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n return;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo \n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n }\n \n //express : on étale en countExpressMonthlyPayment (nb de mensualités)\n let remainingAmountByExercicePrestation = remainingAmount; //TTC\n let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 3; //TTC\n //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)\n if (indexEP === 0 && sumRegulations > 0) countExpressMonthlyPayment -= 1;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countExpressMonthlyPayment; //TTC\n for (let index = 1; index <= countExpressMonthlyPayment; index++) {\n // On arrondis les 11 premières mensualités, mais on récupère le reste pour la dernière mensualité, pour éviter les centimes perdus en arrondis\n // et on applique le taux de tva de la société\n const amount = index < countExpressMonthlyPayment ? monthlyAmount : remainingAmountByExercicePrestation; //TTC\n \n // On évite les paiements de moins d'0,01 € (pour les paymentsExpectations ayant une différence de 1 cents)\n if (amount >= 0.005)\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount; \n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n remainingAmount = 0;\n });\n\n // =========================\n // NON EXPRESS\n // =========================\n // on lisse sur le nb de mois restants (avec au minimum 3 mensualités)\n // Si un seul exo express, alors on met les paiements de l'exo actuel en parallèle\n // sinon, ils sont à la suite des express\n if (nbExoExpress <= 1) paymentDate = initializedPaymentDate;\n let exerciceEndDate = dayjs(firstExerciceNonExpresssEndDate).toDate();\n\n let hasGeneratedWholeYear = false;\n let isFirstNonExpress = true;\n let countNonExpressGenerated = 0;\n \n // On génère des paiements jusqu'à ce qu'un exercice soit entier (12 mois), non express\n // et qu'au moins 13 mois de paiements ont été générés depuis la date de reprise\n while (!hasGeneratedWholeYear || countNonExpressGenerated < 2) {\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n const exoAmount = isFirstNonExpress ? yearlyAmountNonExpressClone : nextYearlyAmountNonExpress;\n const remainingBeforeThisExo = remainingAmount;\n remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);\n\n // Si le premier règlement couvre le coût de cet exercicePrestation, \n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount: Math.round(100 * (priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat))) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n continue;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo \n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n }\n\n let remainingAmountByExercicePrestation = remainingAmount;\n\n // - frais d'application dès les second exo non express\n if (!isFirstNonExpress) remainingAmountByExercicePrestation += applicationCostTotalTTC;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC\n\n if (monthlyAmount > 0) {\n for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {\n let amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;\n \n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n amount = calculateFees(amount, paymentDate);\n \n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount; \n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n }\n remainingAmount = 0;\n if (countMonthsBeforeExerciceEnd === 12) hasGeneratedWholeYear = true;\n isFirstNonExpress = false;\n countNonExpressGenerated += 1;\n }\n\n remainingAmount = 0;\n\n // =========================\n // JUSQU'EN DECEMBRE\n // =========================\n // On applique le taux de tva de la société, si besoin, selon la grille tarifaire\n remainingAmount += priceWithTaxesIncluded ? nextYearlyAmountNonExpress : getTaxesIncludedAmount(nextYearlyAmountNonExpress, idVat);\n\n let remainingAmountByExercicePrestation = remainingAmount;\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // - frais d'application dès les second exo non express\n remainingAmountByExercicePrestation += applicationCostTotalTTC;\n \n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;\n \n // Si aucun paiement généré, on stoppe là\n if (!listPayments.length) return [];\n\n while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11) {\n let amount = monthlyAmount;\n\n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n // - frais d'application dès les second exo non express\n amount = calculateFees(amount, paymentDate);\n\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n\n return listPayments;\n};\n\nexport {\n groupPaymentsByServiceType, calculatePaymentsAuto,\n};"]}
1
+ {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../ts/utils/payment.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAgD,aAAa,EAAe,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAC5H,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOtE;;;;;;;;;GASG;AACH,MAAM,0BAA0B,GAAG,CAAC,QAAoB,EAAE,QAAo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vE,uDAAuD;IACvD,mCAAmC,IAAI,uBAAuB,CAAC;IAE/D,MAAM,aAAa,GAAG,mCAAmC,GAAG,4BAA4B,CAAC;IAEzF,yCAAyC;IACzC,IAAI,CAAC,YAAY,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEpC,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;QACjE,IAAI,MAAM,GAAG,aAAa,CAAC;QAE3B,iDAAiD;QACjD,yGAAyG;QACzG,uDAAuD;QACvD,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAE5C,YAAY,CAAC,IAAI,CAAC;YAChB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG;YACtC,WAAW,EAAE,WAAW;YACxB,YAAY;YACZ,eAAe,EAAE,aAAa,CAAC,YAAY,CAAC,EAAE;YAC9C,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;QACH,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7E,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,OAAO,EACL,0BAA0B,EAAE,qBAAqB,GAClD,CAAC","sourcesContent":["'use strict';\n\nimport { IPayment, IRegulation, ParamsForPaymentsAuto, PaymentMethod, PaymentAuto, getTaxesIncludedAmount } from '../types';\nimport * as dayjs from 'dayjs';\nimport { PartialExercicePrestationExpress } from '../types/Interface/api/payment/Util';\nimport { getApplicationFeesAmount, getPriceGrid } from './prestation';\n\ninterface PaymentsWithList extends IPayment {\n type: 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther',\n listPayments: IPayment[]\n}\n\n/**\n * A partir d'une liste de payment (avec include jusqu'à prestationList, \n * avec en attributs 'isComptable' | 'isJuridique' | 'isSocial' | 'isOther')\n * permet de récupérer uniquement le premier paiement de chaque type \n * et les autres payments dans listPayments\n * avec possibilité de filtrer avec le tableau de filtres\n * @param payments \n * @param types \n * @returns \n */\nconst groupPaymentsByServiceType = (payments: IPayment[], types: ('isComptable' | 'isJuridique' | 'isSocial' | 'isOther')[] = ['isComptable', 'isJuridique', 'isSocial', 'isOther']): PaymentsWithList[] => {\n const prestaComptable = payments.filter((el) => el?.paymentsPrestations?.prestationsList?.isComptable ?? false);\n const prestaSocial = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isSocial);\n const prestaJuridique = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && el?.paymentsPrestations?.prestationsList?.isJuridique);\n const prestaOther = payments.filter((el) => !el?.paymentsPrestations?.prestationsList?.isComptable && !el?.paymentsPrestations?.prestationsList?.isJuridique && !el?.paymentsPrestations?.prestationsList?.isSocial);\n \n const societyPayment: PaymentsWithList[] = [];\n if (prestaComptable.length && types.includes('isComptable')) {\n societyPayment.push({\n ...prestaComptable[0], // Données de base\n type: 'isComptable',\n listPayments: prestaComptable,\n });\n }\n if (prestaSocial.length && types.includes('isSocial')) {\n societyPayment.push({\n ...prestaSocial[0], // Données de base\n type: 'isSocial',\n listPayments: prestaSocial,\n });\n }\n if (prestaJuridique.length && types.includes('isJuridique')) {\n societyPayment.push({\n ...prestaJuridique[0], // Données de base\n type: 'isJuridique',\n listPayments: prestaJuridique,\n });\n }\n if (prestaOther.length && types.includes('isOther')) {\n societyPayment.push({\n ...prestaOther[0], // Données de base\n type: 'isOther',\n listPayments: prestaOther,\n });\n }\n return societyPayment;\n};\n\nconst calculateFees = (amount: number, paymentDate: Date):number => {\n const yearlyPriceIncreasing = 1.0275;\n\n // Commenté car en fin d'année, pour appliquer le taux d'inflation annuel, \n // un script enlève les 2,75€ appliqués pour appliquer le bon taux\n // const oneYearLessIfIn3LastMonthsOfYear = dayjs(goToClient).month() >= 9 ? 1 : 0;\n\n if (dayjs(paymentDate).year() - dayjs().year() > 0) {\n const nbYearsMore = dayjs(paymentDate).year() - dayjs().year()/* - oneYearLessIfIn3LastMonthsOfYear */;\n // on applique X fois l'augmentation\n // ex. : si on lance l'appel en 2024, et qu'on génére un paiement pour 2026, on applique 2 fois l'augmentation\n // soit amount * yearlyPriceIncreasing * yearlyPriceIncreasing\n // soit amount * yearlyPriceIncreasing ^ nbYearsMore\n amount = amount * Math.pow(yearlyPriceIncreasing, nbYearsMore);\n }\n return amount;\n};\n\n/**\n// * @param {number} firstPaymentAmount - amount of the first payment (first regulation of the customer)\n * @param {Date} firstExerciceNonExpresssEndDate - end date of the first exercice non express\n * @param {number} idPrestation - prestation id\n * @param {number} idLegalForm - legal form id of the society\n * @param {boolean} isWithApplicationFees - if the prestation has application fees to paid\n * @param {IPrestationList} prestationList - type of prestation (hidden: 0, isCatalog: 1, isComptable: 1)\n * @param {number} idVat - vat id of society linked\n * @param {number} yearlyAmountNonExpress - yearly amount of non express prestation (HT)\n * @param {number} nextYearlyAmountNonExpress - yearly amount of non express prestation for next years (HT)\n * @param {PartialExercicePrestationExpress[]} listPartialExercicePrestationExpress - list of exercicePrestation linked to idPrestation -> used to get express\n * @param {IRegulation[]} listRegulations - list of regulations linked to idPrestation (TTC)\n * @param {Date} recoveryDate - date of recovery of the society\n * @returns { IPayment[] } list of payment to create for billing auto, after each presta go to onBoarding\n */\nconst calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {\n const { idTypeBrand, isWithApplicationFees, firstExerciceNonExpresssEndDate, idPrestation, idLegalForm, prestationList, idVat, yearlyAmountNonExpress, nextYearlyAmountNonExpress, listPartialExercicePrestationExpress, listRegulations, recoveryDate } = params;\n \n if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');\n\n let initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 15 */\n ? dayjs().add(2, 'month').startOf('month').toDate()\n : dayjs().add(1, 'month').startOf('month').toDate();\n \n //Si date de reprise, alors on initialise à cette date\n if (recoveryDate && dayjs(recoveryDate).isAfter(dayjs(), 'month')) {\n initializedPaymentDate = dayjs(recoveryDate).startOf('month').toDate();\n }\n\n // On récupère la grille tarifaire pour savoir si les tarifs sont HT ou TTC \n // et pour connaitre le montant du coût de l'app\n if (!prestationList.id) throw new Error('idPrestationList manquant');\n const priceGrid = getPriceGrid(idTypeBrand, prestationList.id);\n if (!priceGrid) throw new Error('Impossible de trouver la grille tarifaire correspondante');\n const { applicationCost, priceWithTaxesIncluded } = priceGrid;\n const applicationCostTotalTTC = (priceWithTaxesIncluded ? applicationCost : getTaxesIncludedAmount(applicationCost, idVat)) * 12;\n const applicationFeesAmountTTC = getApplicationFeesAmount(idLegalForm, idVat);\n\n if (prestationList?.isCatalog || !prestationList?.isComptable) throw new Error('Ce type de prestation ne correspond pas aux conditions attendues.');\n if (listPartialExercicePrestationExpress.length && listPartialExercicePrestationExpress?.some((ep: PartialExercicePrestationExpress) => !ep?.startDate)) throw new Error('Start date of some exercice are missing');\n \n let yearlyAmountNonExpressClone = yearlyAmountNonExpress;\n if (isWithApplicationFees) {\n yearlyAmountNonExpressClone -= getApplicationFeesAmount(idLegalForm); //HT\n }\n\n const nbExoExpress = listPartialExercicePrestationExpress.length;\n const listPayments:PaymentAuto[] = [];\n\n // on récupère le/les premiers réglements effectués, non alloués\n // const isApplicationFeesAlreadyPaid = false;\n const sumRegulations = listRegulations.reduce((acc: number, r:IRegulation) => {\n //Si la regulation est rattachée à un paymentExpectation, on récupère le détail\n // et on ne prend que les frais de dossier (applicationFee) + le montant de la compta (accountingFee)\n \n // Commenté temporairement :\n // Pour l'instant, on ne prend plus en compte les paymentExpectation :\n // On part du principe que si isWithApplicationFees = true, alors les regulations contiennent les frais de dossier\n // sinon, ils sont offerts et n'apparaissent pas\n /* if (r.paymentsExpectation?.payload) {\n const payload = JSON.parse(r.paymentsExpectation?.payload);\n if (+payload?.applicationFee > 0) {\n isApplicationFeesAlreadyPaid = true;\n acc += +payload?.applicationFee;\n }\n if (+payload?.accountingFee > 0) acc += +payload?.accountingFee;\n return acc;\n } else {\n return acc + r.amount - r.amountUsed;\n } */\n return acc + r.amount - r.amountUsed;\n }, 0);\n let remainingAmount = -sumRegulations; //TTC\n let paymentDate = initializedPaymentDate;\n\n //On order les exercicePrestation par startDate ASC et id ASC\n listPartialExercicePrestationExpress.sort((a, b) => {\n const aStartDate = a?.startDate as Date;\n const bStartDate = b?.startDate as Date;\n return dayjs(aStartDate).diff(bStartDate);\n });\n\n // Si les frais de dossiers sont facturés, on ajoute un paiement sur le mois en cours\n if (isWithApplicationFees) {\n listPayments.push({\n amount: applicationFeesAmountTTC, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: listPartialExercicePrestationExpress?.length ? listPartialExercicePrestationExpress[0].endDate : firstExerciceNonExpresssEndDate,\n comment: 'Frais de dossier',\n });\n remainingAmount += applicationFeesAmountTTC;\n }\n \n // =========================\n // EXPRESS\n // =========================\n listPartialExercicePrestationExpress.forEach((exercicePrestation:PartialExercicePrestationExpress, indexEP: number) => {\n const remainingBeforeThisExo = remainingAmount;\n\n remainingAmount += !priceWithTaxesIncluded \n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat) \n : exercicePrestation.totalAmount; //TTC\n \n \n // Si le premier règlement couvre le coût de cet exercicePrestation, \n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount: Math.round(100 * (!priceWithTaxesIncluded \n ? getTaxesIncludedAmount(exercicePrestation.totalAmount, idVat) \n : exercicePrestation.totalAmount)) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n return;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo \n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n }\n \n //express : on étale en countExpressMonthlyPayment (nb de mensualités)\n let remainingAmountByExercicePrestation = remainingAmount; //TTC\n let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 1; //TTC\n //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)\n if (indexEP === 0 && sumRegulations > 0) countExpressMonthlyPayment -= 1;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countExpressMonthlyPayment; //TTC\n for (let index = 1; index <= countExpressMonthlyPayment; index++) {\n // On arrondis les 11 premières mensualités, mais on récupère le reste pour la dernière mensualité, pour éviter les centimes perdus en arrondis\n // et on applique le taux de tva de la société\n const amount = index < countExpressMonthlyPayment ? monthlyAmount : remainingAmountByExercicePrestation; //TTC\n \n // On évite les paiements de moins d'0,01 € (pour les paymentsExpectations ayant une différence de 1 cents)\n if (amount >= 0.005)\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exercicePrestation.endDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount; \n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n remainingAmount = 0;\n });\n\n // =========================\n // NON EXPRESS\n // =========================\n // on lisse sur le nb de mois restants (avec au minimum 3 mensualités)\n // Si un seul exo express, alors on met les paiements de l'exo actuel en parallèle\n // sinon, ils sont à la suite des express\n if (nbExoExpress <= 1) paymentDate = initializedPaymentDate;\n let exerciceEndDate = dayjs(firstExerciceNonExpresssEndDate).toDate();\n\n let hasGeneratedWholeYear = false;\n let isFirstNonExpress = true;\n let countNonExpressGenerated = 0;\n \n // On génère des paiements jusqu'à ce qu'un exercice soit entier (12 mois), non express\n // et qu'au moins 13 mois de paiements ont été générés depuis la date de reprise\n while (!hasGeneratedWholeYear || countNonExpressGenerated < 2) {\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // Si un client signe un Express dans les 3 derniers mois de l'année (par exemple en décembre 2024)\n // on ne doit pas générer l'année 2025 sur 13 mois à partir du 12/24\n // mais on doit attendre le début de l'exercice concerné (ici, 01/25)\n if (countMonthsBeforeExerciceEnd > 12) {\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n continue;\n }\n\n const exoAmount = isFirstNonExpress ? yearlyAmountNonExpressClone : nextYearlyAmountNonExpress;\n const remainingBeforeThisExo = remainingAmount;\n remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);\n\n // Si le premier règlement couvre le coût de cet exercicePrestation, \n // on créé un paiement pour cet exo et on passe au suivant\n if (remainingAmount <= 0) {\n listPayments.push({\n amount: Math.round(100 * (priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat))) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n continue;\n } else if (remainingBeforeThisExo < 0 && remainingAmount > 0) {\n // Si le paiement couvre une partie du paiement, on créé un paiement pour cette partie lié à l'exo \n listPayments.push({\n amount: Math.round(100 * -remainingBeforeThisExo) / 100, //TTC\n isPaid: true,\n datePayment: dayjs().toDate(),\n idPrestation,\n idPaymentMethod: listRegulations[0]?.idPaymentMethod ?? PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n }\n\n let remainingAmountByExercicePrestation = remainingAmount;\n\n // - frais d'application dès les second exo non express\n if (!isFirstNonExpress) remainingAmountByExercicePrestation += applicationCostTotalTTC;\n\n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd; //TTC\n\n if (monthlyAmount > 0) {\n for (let index = 1; index <= countMonthsBeforeExerciceEnd; index++) {\n let amount = index < countMonthsBeforeExerciceEnd ? monthlyAmount : remainingAmountByExercicePrestation;\n \n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n amount = calculateFees(amount, paymentDate);\n \n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n remainingAmountByExercicePrestation -= monthlyAmount; \n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n exerciceEndDate = dayjs(exerciceEndDate).startOf('month').add(1, 'year').endOf('month').toDate();\n }\n remainingAmount = 0;\n if (countMonthsBeforeExerciceEnd === 12) hasGeneratedWholeYear = true;\n isFirstNonExpress = false;\n countNonExpressGenerated += 1;\n }\n\n remainingAmount = 0;\n\n // =========================\n // JUSQU'EN DECEMBRE\n // =========================\n // On applique le taux de tva de la société, si besoin, selon la grille tarifaire\n remainingAmount += priceWithTaxesIncluded ? nextYearlyAmountNonExpress : getTaxesIncludedAmount(nextYearlyAmountNonExpress, idVat);\n\n let remainingAmountByExercicePrestation = remainingAmount;\n //On compte le nb de mois restants entre la date à laquelle le paiement va être créé et la date de fin d'exercice\n let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));\n if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;\n\n // - frais d'application dès les second exo non express\n remainingAmountByExercicePrestation += applicationCostTotalTTC;\n \n const monthlyAmount = remainingAmountByExercicePrestation / countMonthsBeforeExerciceEnd;\n \n // Si aucun paiement généré, on stoppe là\n if (!listPayments.length) return [];\n\n while (dayjs(listPayments.slice(-1)[0].datePayment).month() < 11) {\n let amount = monthlyAmount;\n\n // Si besoin, on applique les frais nécessaires :\n // - 2,75% d'augmentation chaque année, sauf si souscriptiuon dans les 3 derniers mois de l'année civile)\n // - frais d'application dès les second exo non express\n amount = calculateFees(amount, paymentDate);\n\n listPayments.push({\n amount: Math.round(100 * amount) / 100,\n datePayment: paymentDate,\n idPrestation,\n idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,\n closingDate: exerciceEndDate,\n });\n paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();\n }\n\n return listPayments;\n};\n\nexport {\n groupPaymentsByServiceType, calculatePaymentsAuto,\n};"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -79,9 +79,6 @@ export class Society extends Resource {
79
79
  synchronize(id: number, params: CreateSynchronization): Promise<string> {
80
80
  return this.axios.$post(`/society/${id}/synchronize`, params);
81
81
  }
82
- autoImportationTransactions(): Promise<void> {
83
- return this.axios.$post('/society/bankAccount/autoImportationTransactions');
84
- }
85
82
  importBalanceBankAccount(idSociety: number, idBankAccount: number, params: CreateBudgetBalanceBankAccount): Promise<number> {
86
83
  return this.axios.$post(`/society/${idSociety}/bankAccount/${idBankAccount}/importBalance`, params);
87
84
  }
@@ -261,6 +261,9 @@ export type BalanceSheetField = {
261
261
  accounts?: string[];
262
262
  accountsDeducted?: string[]; // Liste des comptes pour la colonne "Amortissements et provisions"
263
263
 
264
+ accountsForceToDeduce?: string[]; // Liste des comptes qui doivent être déduit par rapport aux autres comptes
265
+ totalValueToDeduce?: number; // Liste des comptes qui doivent être déduit par rapport aux autres comptes
266
+
264
267
  isCategory?: boolean; // Ne calcule pas le total, affiché en gras sur le PDF
265
268
  isSubcategory?: boolean; // Ne calcule pas de montant
266
269
  isTotal?: boolean; // Affiche le total, affiché comme une catégorie
@@ -752,7 +755,9 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
752
755
  {
753
756
  name: 'Autres dettes',
754
757
  key: 'OtherDebts',
755
- accounts: ['411', '418', '4196', '4197', '4198', '464', '467', '4686', '471', '472', '478', '509'],
758
+ accounts: ['411', '418', '4196', '4197', '464', '467', '4686', '471', '472', '478', '509'],
759
+ accountsDeducted: ['4198'],
760
+ accountsForceToDeduce: ['4198'],
756
761
  // PASSIF Autres = lorsque l'entreprise doit de l'argent au client = somme débit > crédit (modifié)
757
762
  idThirdPartyTypeToAdd: [ThirdPartyType.CUSTOMER, MathematicalSign.LESS],
758
763
  isSubcategory: true,
@@ -22,6 +22,7 @@ export enum ReasonTerminationType {
22
22
  NA = 21,
23
23
  LACK_OF_COMMUNICATION = 22,
24
24
  NO_NEED_FOR_A_CERTIFIED_ACCOUNTANT = 23,
25
+ ERROR_ON_PRESTATION = 24,
25
26
  }
26
27
 
27
28
  export const ReasonTerminationTypeDetail = [
@@ -140,4 +141,9 @@ export const ReasonTerminationTypeDetail = [
140
141
  label: 'Plus besoin d\'un expert-comptable',
141
142
  active: true,
142
143
  },
144
+ {
145
+ id:ReasonTerminationType.ERROR_ON_PRESTATION,
146
+ label: 'Erreur sur prestation',
147
+ active: true,
148
+ },
143
149
  ];
@@ -4,4 +4,5 @@ export const StatusRating = [
4
4
  { value: 2, text: 'Avis supprimé' },
5
5
  { value: 3, text: 'Refus de supprimer' },
6
6
  { value: 4, text: 'Non concerné' },
7
+ { value: 5, text: 'Résolu' },
7
8
  ];
@@ -356,4 +356,12 @@ export const TimeCounterType = {
356
356
  color: 'guacamole',
357
357
  isOverlappable: true,
358
358
  },
359
+ PRO_ACTIVE_APPOINTMENT: {
360
+ id: 45,
361
+ label: 'Rdv client pro actif',
362
+ aberrantTime: 15,
363
+ limitedRoles: null,
364
+ color: 'fern-dark',
365
+ isOverlappable: false,
366
+ },
359
367
  };
@@ -83,6 +83,11 @@ export class MaritalStatusInfos {
83
83
  @IsString()
84
84
  notaryAddress?: string;
85
85
 
86
+ @ApiPropertyOptional()
87
+ @IsOptional()
88
+ @IsString()
89
+ spouseFirstname?: string;
90
+
86
91
  @ApiPropertyOptional()
87
92
  @IsOptional()
88
93
  @IsString()
@@ -76,7 +76,7 @@ export class CreateTerminationList {
76
76
 
77
77
  @ApiPropertyOptional()
78
78
  @IsOptional()
79
- @IsInt()
79
+ @IsNumber()
80
80
  monthOffer?: number;
81
81
 
82
82
  @ApiPropertyOptional()
@@ -173,7 +173,7 @@ export class UpdateTerminationList {
173
173
 
174
174
  @ApiPropertyOptional()
175
175
  @IsOptional()
176
- @IsInt()
176
+ @IsNumber()
177
177
  monthOffer?: number;
178
178
 
179
179
  @ApiPropertyOptional()
@@ -33,7 +33,7 @@ export function getAllBlockingIssues(checklist: IChecklist, meta: QueryGetAllBlo
33
33
  blockingIssues.push(question);
34
34
  }
35
35
  } else if ([ChecklistDetailType.SELECT as string, ChecklistDetailType.SWITCH].includes(question.type) && question.name !== ChecklistDetailName.HAS_POLICE) {
36
- if ((!answer.value && !(question.name === ChecklistDetailName.IS_WAITING_ACCOUNT_RESET || question.name === ChecklistDetailName.HAS_CLEARED_INTERNAL_TRANSFER) ) || answer.value === '0') {
36
+ if ((!answer.value && (question.name !== ChecklistDetailName.IS_WAITING_ACCOUNT_RESET && question.name !== ChecklistDetailName.HAS_CLEARED_INTERNAL_TRANSFER)) || answer.value === '0') {
37
37
  blockingIssues.push(question);
38
38
  }
39
39
  }
@@ -243,18 +243,18 @@ export const internationalizationChoices: InternationalizationChoicesType = {
243
243
  vatMention: [
244
244
  'Not affected',
245
245
  'Not applicable',
246
- 'VAT not applicable, art. 293 B of the FGTC',
247
- 'VAT not applicable - Exports outside the EU - Art. 259-1 FGTC',
248
- 'Not subject to VAT under article 261C of the FGTC',
249
- 'Article 261 D of the French General Tax Code (FGTC)',
250
- 'VAT exemption, article 283-2 of the French General Tax Code',
251
- 'VAT exemption: Article 262 ter I of the FGTC',
252
- 'VAT notice 261.4.4 1 of the FGTC',
253
- 'Special regime - Second-hand goods - article 297 A of the FGTC and EC directive 2006/112/EC',
254
- 'Special regime - Works of art - article 297 A of the FGTC and EC directive 2006/112/EC',
255
- 'Special regime – Collector\'s items and antiques - article 297 A of the FGTC and EC directive 2006/112/EC',
256
- 'Special regime - Travel agencies - article 297 A of the FGTC and EC directive 2006/112/EC',
257
- 'Invoice subject to VAT reverse charge system',
246
+ 'VAT not applicable, art. 293 B of the French General Tax Code (FGTC)',
247
+ 'VAT not applicable - Exports outside the EU - Art. 259-1 of the French General Tax Code (FGTC)',
248
+ 'Not subject to VAT according to article 261C of the French General Tax Code (FGTC)',
249
+ 'Article 261D of the French General Tax Code (FGTC)',
250
+ 'VAT exemption, article 283-2 of the French General Tax Code (FGTC)',
251
+ 'VAT exemption: Article 262 ter I of the French General Tax Code (FGTC)',
252
+ 'VAT notice 261.4.4 1 of the French General Tax Code (FGTC)',
253
+ 'Specific regime - Second-hand goods - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
254
+ 'Specific regime - Works of art - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
255
+ 'Specific regime – Collectibles and antiques - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
256
+ 'Specific regime - Travel agencies - article 297 A of the French General Tax Code (FGTC) and Community Directive 2006/112/EC',
257
+ ' Invoice subject to VAT reverse charge system',
258
258
  ],
259
259
  recoveryCost: [
260
260
  'Not applicable',
@@ -264,7 +264,7 @@ export const internationalizationChoices: InternationalizationChoicesType = {
264
264
  'Credit card',
265
265
  'Check',
266
266
  'Cash',
267
- 'Withdrawal',
267
+ 'Direct debit',
268
268
  'Bank transfer',
269
269
  ],
270
270
  },
@@ -272,13 +272,13 @@ export const internationalizationChoices: InternationalizationChoicesType = {
272
272
  template: {
273
273
  common: {
274
274
  headers: {
275
- emissionDate: 'Emission date',
275
+ emissionDate: 'Invoice date',
276
276
  accountingCategory: {
277
- title: 'Accounting category',
277
+ title: 'Transaction type',
278
278
  choices: [
279
- { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'Delivery of goods' },
280
- { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services delivery' },
281
- { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services and goods delivery' },
279
+ { id: AccountingCategoryId.DELIVERY_OF_GOOD, label: 'supply of goods' },
280
+ { id: AccountingCategoryId.SERVICE_DELIVERY, label: 'Services provision' },
281
+ { id: AccountingCategoryId.GOOD_AND_SERVICE, label: 'Services provision and supply of goods' },
282
282
  ],
283
283
  },
284
284
  },
@@ -289,16 +289,16 @@ export const internationalizationChoices: InternationalizationChoicesType = {
289
289
  marginVat: 'VAT margin scheme',
290
290
  legalVatMention: 'ART 297-A of the FGTC or directive 2006-212 EC',
291
291
  shouldPayTaxAfterDebit: 'Option to pay tax on debits',
292
- penalties: 'Late payment penalties',
292
+ penalties: 'Late fees',
293
293
  discount: 'discount',
294
- recoveryCosts: 'Recovery cost for delays',
294
+ recoveryCosts: 'flat-rate delay compensation',
295
295
  generate: 'Created by',
296
296
  },
297
297
  options: {
298
298
  vatMention: 'VAT mention',
299
299
  paymentType: 'payment type',
300
300
  bank: 'BANK',
301
- approval: 'For apprval',
301
+ approval: 'Agreed and signed',
302
302
  comment: 'Comment',
303
303
 
304
304
  },
@@ -315,7 +315,7 @@ export const internationalizationChoices: InternationalizationChoicesType = {
315
315
  base: 'Base',
316
316
  rate: 'Rate',
317
317
  vatAmount: 'VAT amount',
318
- recap: 'Recap',
318
+ recap: 'Summary',
319
319
  },
320
320
  lines: {
321
321
  totalHt: 'Amount excl. tax',
@@ -337,7 +337,7 @@ export const internationalizationChoices: InternationalizationChoicesType = {
337
337
  },
338
338
  estimate: {
339
339
  headers: {
340
- title: 'Estimate',
340
+ title: 'Quotation',
341
341
  dueDate: 'Valid until',
342
342
  termsOfPayment: 'Term of payment',
343
343
  },
@@ -352,21 +352,21 @@ export const internationalizationChoices: InternationalizationChoicesType = {
352
352
  },
353
353
  deposit: {
354
354
  headers: {
355
- title: 'Deposit',
356
- expirationDate: 'Expiration date',
355
+ title: 'Deposit invoice',
356
+ expirationDate: 'expiry date',
357
357
  termsOfPayment: 'Deadline for payment',
358
358
  },
359
359
  },
360
360
  asset: {
361
361
  headers: {
362
- title: 'Asset',
362
+ title: 'Credit note',
363
363
  dueDate: 'Due date',
364
364
  termsOfPayment: 'Deadline for payment',
365
365
  },
366
366
  },
367
367
  remainder: {
368
368
  headers: {
369
- title: 'Remainder',
369
+ title: 'Balance invoice',
370
370
  dueDate: 'Due date',
371
371
  termsOfPayment: 'Deadline for payment',
372
372
  },
@@ -211,7 +211,7 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
211
211
 
212
212
  //express : on étale en countExpressMonthlyPayment (nb de mensualités)
213
213
  let remainingAmountByExercicePrestation = remainingAmount; //TTC
214
- let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 3; //TTC
214
+ let countExpressMonthlyPayment = exercicePrestation?.countExpressMonthlyPayment ?? 1; //TTC
215
215
  //Si un premier règlement est généré avec le montant des regulations, on le considère comme une mensualité (unioquement pour le premier express et la première mensualité)
216
216
  if (indexEP === 0 && sumRegulations > 0) countExpressMonthlyPayment -= 1;
217
217
 
@@ -256,6 +256,14 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
256
256
  let countMonthsBeforeExerciceEnd = Math.ceil(dayjs(exerciceEndDate).diff(paymentDate, 'months', true));
257
257
  if (countMonthsBeforeExerciceEnd < 3) countMonthsBeforeExerciceEnd = 3;
258
258
 
259
+ // Si un client signe un Express dans les 3 derniers mois de l'année (par exemple en décembre 2024)
260
+ // on ne doit pas générer l'année 2025 sur 13 mois à partir du 12/24
261
+ // mais on doit attendre le début de l'exercice concerné (ici, 01/25)
262
+ if (countMonthsBeforeExerciceEnd > 12) {
263
+ paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
264
+ continue;
265
+ }
266
+
259
267
  const exoAmount = isFirstNonExpress ? yearlyAmountNonExpressClone : nextYearlyAmountNonExpress;
260
268
  const remainingBeforeThisExo = remainingAmount;
261
269
  remainingAmount += priceWithTaxesIncluded ? exoAmount : getTaxesIncludedAmount(exoAmount, idVat);