@silexpert/core 1.0.5 → 1.0.8

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 (137) hide show
  1. package/es/api/resources/AccountingFiles.d.ts +1 -0
  2. package/es/api/resources/AccountingFiles.d.ts.map +1 -1
  3. package/es/api/resources/AccountingFiles.js +3 -0
  4. package/es/api/resources/AccountingFiles.js.map +1 -1
  5. package/es/api/resources/Invoice.d.ts +3 -1
  6. package/es/api/resources/Invoice.d.ts.map +1 -1
  7. package/es/api/resources/Invoice.js +6 -0
  8. package/es/api/resources/Invoice.js.map +1 -1
  9. package/es/api/resources/commercialDocument.d.ts +1 -4
  10. package/es/api/resources/commercialDocument.d.ts.map +1 -1
  11. package/es/api/resources/commercialDocument.js +0 -6
  12. package/es/api/resources/commercialDocument.js.map +1 -1
  13. package/es/types/Enum/CommercialManagement.d.ts +10 -0
  14. package/es/types/Enum/CommercialManagement.d.ts.map +1 -1
  15. package/es/types/Enum/CommercialManagement.js +25 -0
  16. package/es/types/Enum/CommercialManagement.js.map +1 -1
  17. package/es/types/Enum/Vat.js +1 -1
  18. package/es/types/Enum/Vat.js.map +1 -1
  19. package/es/types/Interface/api/commercialManagement/Create.d.ts +2 -0
  20. package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  21. package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
  22. package/es/types/Interface/api/commercialManagement/Query.d.ts +2 -2
  23. package/es/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  24. package/es/types/Interface/api/commercialManagement/Query.js +1 -1
  25. package/es/types/Interface/api/commercialManagement/Query.js.map +1 -1
  26. package/es/types/Interface/api/commercialManagement/Read.d.ts +3 -0
  27. package/es/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  28. package/es/types/Interface/api/commercialManagement/Read.js.map +1 -1
  29. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.d.ts +1 -0
  30. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.d.ts.map +1 -1
  31. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js +7 -1
  32. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js.map +1 -1
  33. package/es/types/Interface/api/product/CreateProduct.d.ts +2 -1
  34. package/es/types/Interface/api/product/CreateProduct.d.ts.map +1 -1
  35. package/es/types/Interface/api/product/CreateProduct.js +7 -1
  36. package/es/types/Interface/api/product/CreateProduct.js.map +1 -1
  37. package/es/types/Interface/api/thirdParty/QueryThirdParty.d.ts +1 -0
  38. package/es/types/Interface/api/thirdParty/QueryThirdParty.d.ts.map +1 -1
  39. package/es/types/Interface/api/thirdParty/QueryThirdParty.js +7 -1
  40. package/es/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
  41. package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -1
  42. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  43. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  44. package/es/types/Interface/models/IApiError.d.ts +1 -0
  45. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  46. package/es/types/Interface/models/IApiError.js +1 -0
  47. package/es/types/Interface/models/IApiError.js.map +1 -1
  48. package/es/types/Interface/models/ICommercialMail.d.ts +1 -3
  49. package/es/types/Interface/models/ICommercialMail.d.ts.map +1 -1
  50. package/es/types/Interface/models/ICommercialMail.js.map +1 -1
  51. package/es/types/Interface/models/IEngagementBankTransaction.d.ts +0 -2
  52. package/es/types/Interface/models/IEngagementBankTransaction.d.ts.map +1 -1
  53. package/es/types/Interface/models/IEngagementBankTransaction.js.map +1 -1
  54. package/es/types/Interface/models/IFile.d.ts +2 -0
  55. package/es/types/Interface/models/IFile.d.ts.map +1 -1
  56. package/es/types/Interface/models/IFile.js.map +1 -1
  57. package/es/types/Interface/models/ILoan.d.ts +2 -0
  58. package/es/types/Interface/models/ILoan.d.ts.map +1 -1
  59. package/es/types/Interface/models/ILoan.js.map +1 -1
  60. package/es/types/Interface/models/IPartnerTransaction.d.ts +0 -1
  61. package/es/types/Interface/models/IPartnerTransaction.d.ts.map +1 -1
  62. package/es/types/Interface/models/IPartnerTransaction.js.map +1 -1
  63. package/es/types/Interface/models/IProduct.d.ts +4 -2
  64. package/es/types/Interface/models/IProduct.d.ts.map +1 -1
  65. package/es/types/Interface/models/IProduct.js.map +1 -1
  66. package/es/types/Interface/models/IProductInvoice.d.ts +2 -0
  67. package/es/types/Interface/models/IProductInvoice.d.ts.map +1 -1
  68. package/es/types/Interface/models/IProductInvoice.js.map +1 -1
  69. package/es/utils/commercialManagement/document.d.ts.map +1 -1
  70. package/es/utils/commercialManagement/document.js +12 -8
  71. package/es/utils/commercialManagement/document.js.map +1 -1
  72. package/es/utils/commercialManagement/product.d.ts.map +1 -1
  73. package/es/utils/commercialManagement/product.js +3 -3
  74. package/es/utils/commercialManagement/product.js.map +1 -1
  75. package/es/utils/commercialManagement/templates/body.js +1 -1
  76. package/es/utils/commercialManagement/templates/body.js.map +1 -1
  77. package/es/utils/commercialManagement/templates/common.js +1 -1
  78. package/es/utils/commercialManagement/templates/common.js.map +1 -1
  79. package/es/utils/commercialManagement/vat.d.ts.map +1 -1
  80. package/es/utils/commercialManagement/vat.js +1 -0
  81. package/es/utils/commercialManagement/vat.js.map +1 -1
  82. package/js/api/resources/AccountingFiles.js +4 -0
  83. package/js/api/resources/AccountingFiles.js.map +1 -1
  84. package/js/api/resources/Invoice.js +8 -0
  85. package/js/api/resources/Invoice.js.map +1 -1
  86. package/js/api/resources/commercialDocument.js +0 -8
  87. package/js/api/resources/commercialDocument.js.map +1 -1
  88. package/js/types/Enum/CommercialManagement.js +23 -0
  89. package/js/types/Enum/CommercialManagement.js.map +1 -1
  90. package/js/types/Enum/Vat.js +1 -1
  91. package/js/types/Enum/Vat.js.map +1 -1
  92. package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
  93. package/js/types/Interface/api/commercialManagement/Query.js.map +1 -1
  94. package/js/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js +2 -0
  95. package/js/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js.map +1 -1
  96. package/js/types/Interface/api/product/CreateProduct.js +3 -1
  97. package/js/types/Interface/api/product/CreateProduct.js.map +1 -1
  98. package/js/types/Interface/api/thirdParty/QueryThirdParty.js +2 -0
  99. package/js/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
  100. package/js/types/Interface/models/IApiError.js +1 -0
  101. package/js/types/Interface/models/IApiError.js.map +1 -1
  102. package/js/utils/commercialManagement/document.js +16 -7
  103. package/js/utils/commercialManagement/document.js.map +1 -1
  104. package/js/utils/commercialManagement/product.js +3 -2
  105. package/js/utils/commercialManagement/product.js.map +1 -1
  106. package/js/utils/commercialManagement/templates/body.js +1 -1
  107. package/js/utils/commercialManagement/templates/body.js.map +1 -1
  108. package/js/utils/commercialManagement/templates/common.js +1 -1
  109. package/js/utils/commercialManagement/templates/common.js.map +1 -1
  110. package/js/utils/commercialManagement/vat.js +1 -0
  111. package/js/utils/commercialManagement/vat.js.map +1 -1
  112. package/package.json +1 -1
  113. package/ts/api/resources/AccountingFiles.ts +4 -0
  114. package/ts/api/resources/Invoice.ts +10 -0
  115. package/ts/api/resources/commercialDocument.ts +0 -10
  116. package/ts/types/Enum/CommercialManagement.ts +27 -1
  117. package/ts/types/Enum/Vat.ts +1 -1
  118. package/ts/types/Interface/api/commercialManagement/Create.ts +2 -0
  119. package/ts/types/Interface/api/commercialManagement/Query.ts +2 -2
  120. package/ts/types/Interface/api/commercialManagement/Read.ts +3 -0
  121. package/ts/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.ts +6 -1
  122. package/ts/types/Interface/api/product/CreateProduct.ts +6 -1
  123. package/ts/types/Interface/api/thirdParty/QueryThirdParty.ts +8 -1
  124. package/ts/types/Interface/models/IAccountingTransaction.ts +1 -1
  125. package/ts/types/Interface/models/IApiError.ts +1 -0
  126. package/ts/types/Interface/models/ICommercialMail.ts +1 -5
  127. package/ts/types/Interface/models/IEngagementBankTransaction.ts +0 -2
  128. package/ts/types/Interface/models/IFile.ts +2 -0
  129. package/ts/types/Interface/models/ILoan.ts +2 -0
  130. package/ts/types/Interface/models/IPartnerTransaction.ts +0 -1
  131. package/ts/types/Interface/models/IProduct.ts +4 -2
  132. package/ts/types/Interface/models/IProductInvoice.ts +2 -0
  133. package/ts/utils/commercialManagement/document.ts +10 -4
  134. package/ts/utils/commercialManagement/product.ts +2 -1
  135. package/ts/utils/commercialManagement/templates/body.ts +1 -1
  136. package/ts/utils/commercialManagement/templates/common.ts +1 -1
  137. package/ts/utils/commercialManagement/vat.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"product.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,UAAU,WAAW,CAAC,OAAwB;;IAClD,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAEtG,IAAI,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE;QACjD,OAAO,CAAC,CAAC,MAAA,OAAO,CAAC,gBAAgB,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;KACnF;IAAC,IAAI,OAAO,CAAC,YAAY,KAAK,YAAY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,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC3H,qBAAqB,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,8BAA8B,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAC/N;AACJ,CAAC","sourcesContent":["import { isDefined } from 'class-validator';\nimport { IProductInvoice, ReadProductEditing } from '../../types';\nimport { Unit } from '../../types/Enum/Unit';\nimport { DiscountType } from '../../types/Enum/CommercialManagement';\nimport { getById } from './vat';\nimport { integerToFormattedAmountString } from '../amount';\n\nexport function getDiscount(product: IProductInvoice): number {\n if (product.discount2 === null || product.discount2 === undefined || product.discount2 <= 0) return 0;\n\n if (product.discountType === DiscountType.PERCENT) {\n return ((product.priceTaxExcluded ?? 0) * ((product.discount2 ?? 0) / 100)) / 100;\n } if (product.discountType === DiscountType.AMOUNT) {\n return (product.discount2 ?? 0);\n }\n\n return 0;\n}\n\nexport function getTotalTaxExcluded(product: IProductInvoice): number {\n const discount = product.discount2 && product.discount2 > 0 ? getDiscount(product) : 0;\n return (product.priceTaxExcluded ?? 0) * (product.quantity ?? 1) - (discount * (product.quantity ?? 1));\n}\n\nexport function productToReadProductEditing(payload: IProductInvoice): ReadProductEditing {\n return {\n ...payload,\n totalTaxExcluded: getTotalTaxExcluded(payload),\n unitFormatted: Object.values(Unit).find((unit) => unit.id === payload.unit)?.shortName ?? '',\n vatFormatted: getById(payload.idVat)?.saleName ?? '',\n priceTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(payload.priceTaxExcluded) : null,\n totalTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(getTotalTaxExcluded(payload)) : null,\n discountFormatted: payload.discount2 && payload.discount2 > 0 ? integerToFormattedAmountString(getDiscount(payload)) : null,\n discountTypeFormatted: payload.discount2 && payload.discount2 > 0 ? payload.discountType === DiscountType.PERCENT ? `${(payload.discount2 / 100).toFixed(2)}%` : `${integerToFormattedAmountString(payload.discount2)}€` : null,\n };\n}"]}
1
+ {"version":3,"file":"product.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,UAAU,WAAW,CAAC,OAAwB;;IAClD,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAEtG,IAAI,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE;QACjD,OAAO,CAAC,CAAC,MAAA,OAAO,CAAC,gBAAgB,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;KACnF;IAAC,IAAI,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,MAAM,EAAE;QAClD,OAAO,CAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,CAAC,CA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C,8BAA8B,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC3H,qBAAqB,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,8BAA8B,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAC/N,kBAAkB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,MAAA,MAAA,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,aAAa,CAAC,0CAAE,KAAK,mCAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IACjI;AACJ,CAAC","sourcesContent":["import { isDefined } from 'class-validator';\nimport { IProductInvoice, ReadProductEditing } from '../../types';\nimport { Unit } from '../../types/Enum/Unit';\nimport { DiscountType, VatMarginCategyList } from '../../types/Enum/CommercialManagement';\nimport { getById } from './vat';\nimport { integerToFormattedAmountString } from '../amount';\n\nexport function getDiscount(product: IProductInvoice): number {\n if (product.discount2 === null || product.discount2 === undefined || product.discount2 <= 0) return 0;\n\n if (product.discountType === DiscountType.PERCENT) {\n return ((product.priceTaxExcluded ?? 0) * ((product.discount2 ?? 0) / 100)) / 100;\n } if (product.discountType === DiscountType.AMOUNT) {\n return (product.discount2 ?? 0);\n }\n\n return 0;\n}\n\nexport function getTotalTaxExcluded(product: IProductInvoice): number {\n const discount = product.discount2 && product.discount2 > 0 ? getDiscount(product) : 0;\n return (product.priceTaxExcluded ?? 0) * (product.quantity ?? 1) - (discount * (product.quantity ?? 1));\n}\n\nexport function productToReadProductEditing(payload: IProductInvoice): ReadProductEditing {\n return {\n ...payload,\n totalTaxExcluded: getTotalTaxExcluded(payload),\n unitFormatted: Object.values(Unit).find((unit) => unit.id === payload.unit)?.shortName ?? '',\n vatFormatted: getById(payload.idVat)?.saleName ?? '',\n priceTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(payload.priceTaxExcluded) : null,\n totalTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(getTotalTaxExcluded(payload)) : null,\n discountFormatted: payload.discount2 && payload.discount2 > 0 ? integerToFormattedAmountString(getDiscount(payload)) : null,\n discountTypeFormatted: payload.discount2 && payload.discount2 > 0 ? payload.discountType === DiscountType.PERCENT ? `${(payload.discount2 / 100).toFixed(2)}%` : `${integerToFormattedAmountString(payload.discount2)}€` : null,\n marginVatFormatted: payload.marginVatType ? VatMarginCategyList.find((c) => c.id === payload.marginVatType)?.label ?? null : null,\n };\n}"]}
@@ -86,7 +86,7 @@ export const bodyTemplate = `<html>
86
86
  </div>
87
87
 
88
88
  <% if ((settings && (settings.iban || settings.bic)) || isStripeAllowed) { %>
89
- <div class="row mt-30 space-between">
89
+ <div class="row mt-30 space-between" style="page-break-inside: avoid !important;">
90
90
  <div>
91
91
  <% if (settings && (settings.iban || settings.bic)) { %>
92
92
  <% if(settings.iban) { %>IBAN : <%= settings.iban %><br/><% } %>
@@ -1 +1 @@
1
- {"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/body.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,cAAc,GAAG,IAAI,4BAA4B,EAAE,CAAC;AAE1D,MAAM,cAAc,GAAG;;;YAGX,cAAc,CAAC,IAAI;YACnB,cAAc,CAAC,OAAO;;;4CAGU,cAAc,CAAC,OAAO;UACxD,cAAc,CAAC,IAAI;;;;;;;yCAOY,mBAAmB,CAAC,GAAG;;gDAEhB,mBAAmB,CAAC,KAAK;;gDAEzB,mBAAmB,CAAC,OAAO;;gDAE3B,mBAAmB,CAAC,KAAK;;gDAEzB,mBAAmB,CAAC,KAAK;;gDAEzB,mBAAmB,CAAC,OAAO;;;;;mDAKxB,mBAAmB,CAAC,OAAO;;oBAE1D,mBAAmB,CAAC,GAAG,KAAK,mBAAmB,CAAC,KAAK;;;;;;;2DAOd,mBAAmB,CAAC,OAAO;;;;mDAInC,mBAAmB,CAAC,GAAG,KAAK,mBAAmB,CAAC,KAAK;;;;;;;;;;;;SAY/F,CAAC;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG;;;;IAIxB,cAAc;;;;;;6BAMW,cAAc,CAAC,QAAQ;;;;;YAKxC,cAAc,CAAC,iBAAiB;;;;;;;;;QASpC,cAAc,CAAC,oBAAoB;;;;;;;;;;;;;2CAaA,cAAc,CAAC,aAAa;;;;;;;;;;;QAW/D,cAAc,CAAC,KAAK;;QAEpB,CAAC","sourcesContent":["import { EstimateInvoiceType } from '../../../types/Enum/EstimateInvoice';\nimport { CommercialDocumentCommonHTML } from './common';\n\nconst commonTemplate = new CommercialDocumentCommonHTML();\n\nconst headOfDocument = `<div class=\"row space-between\">\n <% if (settings && settings.logoAlignment === 'left') { %>\n <div class=\"society-informations\">\n ${commonTemplate.logo}\n ${commonTemplate.company}\n </div>\n <% } else { %>\n <div class=\"society-informations\">${commonTemplate.company}</div>\n ${commonTemplate.logo}\n <% } %>\n </div>\n\n <div class=\"row space-between items-end\" style=\"margin-top: 10px\">\n <div style=\"width: 45%; margin-top: auto;\">\n <span class=\"document-reference\">\n <% if (idEstimateInvoiceType === ${EstimateInvoiceType.BON}) { %>\n Bon de commande\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.DEVIS}) { %>\n Devis\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.FACTURE}) { %>\n Facture\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.AVOIR}) { %>\n Avoir\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.RESTE}) { %>\n Facture de solde\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.ACOMPTE}) { %>\n Facture d'acompte\n <% } %>\n <%= reference %></span><br/>\n <% if(emissionDate) {%><span class=\"document-emission-date\">Date d’émission : <%= emissionDateFormatted %></span><br/><% } %>\n <% if(dueDate && idEstimateInvoiceType !== ${EstimateInvoiceType.ACOMPTE}) {%>\n <span class=\"document-due-date\">\n <% if ([${EstimateInvoiceType.BON}, ${EstimateInvoiceType.DEVIS}].includes(idEstimateInvoiceType)) {%>\n Valide jusqu'au :\n <% } else { %>\n Date d'échéance :\n <% } %>\n <%= dueDateFormatted %></span>\n <% } %>\n <% if (expirationDate && idEstimateInvoiceType === ${EstimateInvoiceType.ACOMPTE}) {%>\n <span class=\"document-due-date\">Date d'expiration : <%= expirationDateFormatted %></span>\n <% } %>\n <% if(termsOfPayment) { %>\n <br/><p style=\"margin-bottom: 0px;\"><%= [${EstimateInvoiceType.BON}, ${EstimateInvoiceType.DEVIS}].includes(idEstimateInvoiceType) ? 'Conditions de règlement' : 'Date limite de règlement' %> : <%= termsOfPayment %></p>\n <% } %>\n </div>\n <div style=\"width: 40%; margin-top: auto;\">\n <p>Client</p>\n <div class=\"<%= settings && settings.isCoordinatesFrameDisplayed ? 'customer-border' : '' %>\">\n <% if(thirdParty.fullname) {%><%= thirdParty.fullname %><br/><% } %>\n <% if(thirdParty.company) {%><%= thirdParty.company %><br/><% } %>\n <% if(thirdParty.address) {%><%= thirdParty.address %><br/><% } %>\n <% if(thirdParty.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %>\n </div>\n </div>\n </div>`;\n\nexport const bodyTemplate = `<html>\n\n <body>\n\n ${headOfDocument}\n\n <div class=\"row mt-25\">\n <% if (title) { %>Titre : <%= title %><% } %>\n </div>\n\n <div class=\"row mt-10\">${commonTemplate.products}</div>\n\n <div class=\"row space-between mt-20\">\n <div style=\"max-width: 55%;\">\n <% if (disableVat !== true && vats.length) { %>\n ${commonTemplate.vatRecapitulation}\n <% } %>\n <% if (vatMention) { %><div class=\"vat-mention <%= disableVat !== true ? 'mt-20' : ''%>\"><%= vatMention %></div><% } %>\n <% if (comment) { %>\n <p class=\"mt-20\">Commentaire :<br/>\n <%= comment %>\n <% } %>\n </div>\n\n ${commonTemplate.amountRecapitulation}\n \n </div>\n\n <% if ((settings && (settings.iban || settings.bic)) || isStripeAllowed) { %>\n <div class=\"row mt-30 space-between\">\n <div>\n <% if (settings && (settings.iban || settings.bic)) { %>\n <% if(settings.iban) { %>IBAN : <%= settings.iban %><br/><% } %>\n <% if(settings.bic) { %>BIC : <%= settings.bic %><% } %>\n <% } %>\n </div>\n <% if (isStripeAllowed) { %>\n <div style=\"text-align: right\">${commonTemplate.paymentButton}</div>\n <% } %>\n </div>\n <% } %>\n\n <% if (cgv) { %>\n <%- cgv %>\n <% } %>\n </body>\n\n <style>\n ${commonTemplate.style}\n </style>\n</html>`;"]}
1
+ {"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/body.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,cAAc,GAAG,IAAI,4BAA4B,EAAE,CAAC;AAE1D,MAAM,cAAc,GAAG;;;YAGX,cAAc,CAAC,IAAI;YACnB,cAAc,CAAC,OAAO;;;4CAGU,cAAc,CAAC,OAAO;UACxD,cAAc,CAAC,IAAI;;;;;;;yCAOY,mBAAmB,CAAC,GAAG;;gDAEhB,mBAAmB,CAAC,KAAK;;gDAEzB,mBAAmB,CAAC,OAAO;;gDAE3B,mBAAmB,CAAC,KAAK;;gDAEzB,mBAAmB,CAAC,KAAK;;gDAEzB,mBAAmB,CAAC,OAAO;;;;;mDAKxB,mBAAmB,CAAC,OAAO;;oBAE1D,mBAAmB,CAAC,GAAG,KAAK,mBAAmB,CAAC,KAAK;;;;;;;2DAOd,mBAAmB,CAAC,OAAO;;;;mDAInC,mBAAmB,CAAC,GAAG,KAAK,mBAAmB,CAAC,KAAK;;;;;;;;;;;;SAY/F,CAAC;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG;;;;IAIxB,cAAc;;;;;;6BAMW,cAAc,CAAC,QAAQ;;;;;YAKxC,cAAc,CAAC,iBAAiB;;;;;;;;;QASpC,cAAc,CAAC,oBAAoB;;;;;;;;;;;;;2CAaA,cAAc,CAAC,aAAa;;;;;;;;;;;QAW/D,cAAc,CAAC,KAAK;;QAEpB,CAAC","sourcesContent":["import { EstimateInvoiceType } from '../../../types/Enum/EstimateInvoice';\nimport { CommercialDocumentCommonHTML } from './common';\n\nconst commonTemplate = new CommercialDocumentCommonHTML();\n\nconst headOfDocument = `<div class=\"row space-between\">\n <% if (settings && settings.logoAlignment === 'left') { %>\n <div class=\"society-informations\">\n ${commonTemplate.logo}\n ${commonTemplate.company}\n </div>\n <% } else { %>\n <div class=\"society-informations\">${commonTemplate.company}</div>\n ${commonTemplate.logo}\n <% } %>\n </div>\n\n <div class=\"row space-between items-end\" style=\"margin-top: 10px\">\n <div style=\"width: 45%; margin-top: auto;\">\n <span class=\"document-reference\">\n <% if (idEstimateInvoiceType === ${EstimateInvoiceType.BON}) { %>\n Bon de commande\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.DEVIS}) { %>\n Devis\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.FACTURE}) { %>\n Facture\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.AVOIR}) { %>\n Avoir\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.RESTE}) { %>\n Facture de solde\n <% } else if (idEstimateInvoiceType === ${EstimateInvoiceType.ACOMPTE}) { %>\n Facture d'acompte\n <% } %>\n <%= reference %></span><br/>\n <% if(emissionDate) {%><span class=\"document-emission-date\">Date d’émission : <%= emissionDateFormatted %></span><br/><% } %>\n <% if(dueDate && idEstimateInvoiceType !== ${EstimateInvoiceType.ACOMPTE}) {%>\n <span class=\"document-due-date\">\n <% if ([${EstimateInvoiceType.BON}, ${EstimateInvoiceType.DEVIS}].includes(idEstimateInvoiceType)) {%>\n Valide jusqu'au :\n <% } else { %>\n Date d'échéance :\n <% } %>\n <%= dueDateFormatted %></span>\n <% } %>\n <% if (expirationDate && idEstimateInvoiceType === ${EstimateInvoiceType.ACOMPTE}) {%>\n <span class=\"document-due-date\">Date d'expiration : <%= expirationDateFormatted %></span>\n <% } %>\n <% if(termsOfPayment) { %>\n <br/><p style=\"margin-bottom: 0px;\"><%= [${EstimateInvoiceType.BON}, ${EstimateInvoiceType.DEVIS}].includes(idEstimateInvoiceType) ? 'Conditions de règlement' : 'Date limite de règlement' %> : <%= termsOfPayment %></p>\n <% } %>\n </div>\n <div style=\"width: 40%; margin-top: auto;\">\n <p>Client</p>\n <div class=\"<%= settings && settings.isCoordinatesFrameDisplayed ? 'customer-border' : '' %>\">\n <% if(thirdParty.fullname) {%><%= thirdParty.fullname %><br/><% } %>\n <% if(thirdParty.company) {%><%= thirdParty.company %><br/><% } %>\n <% if(thirdParty.address) {%><%= thirdParty.address %><br/><% } %>\n <% if(thirdParty.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %>\n </div>\n </div>\n </div>`;\n\nexport const bodyTemplate = `<html>\n\n <body>\n\n ${headOfDocument}\n\n <div class=\"row mt-25\">\n <% if (title) { %>Titre : <%= title %><% } %>\n </div>\n\n <div class=\"row mt-10\">${commonTemplate.products}</div>\n\n <div class=\"row space-between mt-20\">\n <div style=\"max-width: 55%;\">\n <% if (disableVat !== true && vats.length) { %>\n ${commonTemplate.vatRecapitulation}\n <% } %>\n <% if (vatMention) { %><div class=\"vat-mention <%= disableVat !== true ? 'mt-20' : ''%>\"><%= vatMention %></div><% } %>\n <% if (comment) { %>\n <p class=\"mt-20\">Commentaire :<br/>\n <%= comment %>\n <% } %>\n </div>\n\n ${commonTemplate.amountRecapitulation}\n \n </div>\n\n <% if ((settings && (settings.iban || settings.bic)) || isStripeAllowed) { %>\n <div class=\"row mt-30 space-between\" style=\"page-break-inside: avoid !important;\">\n <div>\n <% if (settings && (settings.iban || settings.bic)) { %>\n <% if(settings.iban) { %>IBAN : <%= settings.iban %><br/><% } %>\n <% if(settings.bic) { %>BIC : <%= settings.bic %><% } %>\n <% } %>\n </div>\n <% if (isStripeAllowed) { %>\n <div style=\"text-align: right\">${commonTemplate.paymentButton}</div>\n <% } %>\n </div>\n <% } %>\n\n <% if (cgv) { %>\n <%- cgv %>\n <% } %>\n </body>\n\n <style>\n ${commonTemplate.style}\n </style>\n</html>`;"]}
@@ -9,7 +9,7 @@ export class CommercialDocumentCommonHTML {
9
9
  <% } %>`;
10
10
  this.footer = `<div style="font-size: 8px; color: #DADCDF; text-align: center; margin-left: 40px; margin-right: 40px; display: block; width: 100%">
11
11
  <% if (freeText) { %><%- freeText %><br/><br/><% } %>
12
- <% if(penalties || compensation || discount) {%><%= penalties ? 'Pénalités en cas de retard : ' + penalties : ''%><%= penalties && compensation ? '|' : ''%><%= compensation ? 'Indemnité forfaitaire en cas de retard :' + compensation : '' %><%= (compensation || penalties) && discount ? '| ' : '' %><%= discount %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% }%>
12
+ <% if(marginVats.length > 0) {%>Régime TVA sur marge - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) } %> ART 297-A du CGI ou directive 2006-212 CE | <% if(penalties || compensation || discount) {%><%= penalties ? 'Pénalités en cas de retard : ' + penalties : ''%><%= penalties && compensation ? '|' : ''%><%= compensation ? 'Indemnité forfaitaire en cas de retard :' + compensation : '' %><%= (compensation || penalties) && discount ? '| ' : '' %><%= discount %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% }%>
13
13
  <%= name %><%= name && (legalForm || capital || siren || rcs) ? ',' : ''%><%= legalForm %><%= capital ? ' au capital de ' + capitalFormatted + ' €' : '' %><%= siren ? ' immatriculée sous le SIREN ' + siren : ''%><%= rcs ? 'RCS ' + rcs + vatCode || nafCode ? '|' : '' : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? 'N° TVA '+vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>
14
14
  </div>`;
15
15
  this.logo = `<div class="logo-placeholder">
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,MAAM,OAAO,4BAA4B;IAAzC;QACE,WAAM,GAAG;;;;UAID,CAAC;QAET,WAAM,GAAG;;;;WAIA,CAAC;QAEV,SAAI,GAAG;;SAEA,CAAC;QAER,YAAO,GAAG;;;;;;yFAM6E,CAAC;QAExF,aAAQ,GAAG;;;;;;;;;;;qCAWwB,mBAAmB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;+CAuBjB,YAAY,CAAC,OAAO;;;;;;;;;SAS1D,CAAC;QAER,sBAAiB,GAAG;;;;;;;;;;;;;;;WAeX,CAAC;QAEV,yBAAoB,GAAG;;;;;;qCAMY,mBAAmB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAgCpD,mBAAmB,CAAC,OAAO,KAAK,mBAAmB,CAAC,KAAK,KAAK,mBAAmB,CAAC,OAAO;;;;;;SAM5F,CAAC;QAER,kBAAa,GAAG;;;;;;;;;;aAUL,CAAC;QAEZ,UAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDA,CAAC;IACX,CAAC;CAAA","sourcesContent":["import { EstimateInvoiceType } from '../../../types/Enum/EstimateInvoice';\nimport { DiscountType } from '../../../types/Enum/CommercialManagement';\n\nexport class CommercialDocumentCommonHTML {\n header = `<style>html {\n -webkit-print-color-adjust: exact;\n }</style><% if (settings && settings.isEdgingDisplayed) { %>\n <span style=\"position: absolute; top: 0; left: 0; width: 100vw; font-size: 10px; height: 15px; background-color: <%= settings && settings.edgingColor ? settings.edgingColor : '#333333' %>; margin-bottom: 20px;\"></span>\n <% } %>`;\n\n footer = `<div style=\"font-size: 8px; color: #DADCDF; text-align: center; margin-left: 40px; margin-right: 40px; display: block; width: 100%\">\n <% if (freeText) { %><%- freeText %><br/><br/><% } %>\n <% if(penalties || compensation || discount) {%><%= penalties ? 'Pénalités en cas de retard : ' + penalties : ''%><%= penalties && compensation ? '|' : ''%><%= compensation ? 'Indemnité forfaitaire en cas de retard :' + compensation : '' %><%= (compensation || penalties) && discount ? '| ' : '' %><%= discount %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% }%>\n <%= name %><%= name && (legalForm || capital || siren || rcs) ? ',' : ''%><%= legalForm %><%= capital ? ' au capital de ' + capitalFormatted + ' €' : '' %><%= siren ? ' immatriculée sous le SIREN ' + siren : ''%><%= rcs ? 'RCS ' + rcs + vatCode || nafCode ? '|' : '' : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? 'N° TVA '+vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>\n </div>`;\n\n logo = `<div class=\"logo-placeholder\">\n <% if (logoUrl) { %><img src=\"<%= logoUrl %>\" alt=\"logo\" /><% } %>\n </div>`;\n\n company = `<div>\n <% if (name) { %><p><%= name %><p><% } %>\n <% if (number || street) {%><p><%}%><% if (number) { %><%= number + ' ' %><% } if (street) { %><%= street %><% } if (number || street) { %><% } %><% if (number || street) {%></p><%}%>\n <% if (zipCode || city) {%><p><%}%><% if (zipCode) { %><%= zipCode + ' ' %><% } if (city) { %><%= city %><% } if (zipCode || city) { %></p><% } %>\n </div>\n <% if (phoneContact) { %><p><%= phoneContact %><p><% } %>\n <% if (settings && settings.mailContact) { %><p><%= settings.mailContact %></p><% } %>`;\n\n products = `<table class=\"full-width\">\n <thead>\n <tr>\n <td>Article</td>\n <td>Quantité</td>\n <td>P.U <%= disableVat !== true ? 'HT' : ''%></td>\n <% if (shouldDisplayDiscountColumn) { %><td>Remise</td><% } %>\n <% if (disableVat !== true) { %><td>TVA</td><% } %>\n <td>Montant <%= disableVat !== true ? 'HT' : ''%></td>\n </tr>\n </thead>\n <% if (idEstimateInvoiceType === ${EstimateInvoiceType.ACOMPTE}) { %>\n <tr>\n <td class=\"product-title\">\n <%= title %>\n </td>\n <td class=\"product-quantity\">1</td>\n <td class=\"product-price-without-vat\"><%= depositFormatted %>€</td>\n <td class=\"product-total-price-without-vat\"><%= depositFormatted %>€</td>\n </tr>\n <% } %>\n <% if (products) { %>\n <% products.forEach(function (product) { %>\n <tr>\n <td class=\"product-title\">\n <% if(product.itemSaleName) { %><p class=\"product-name\"><%= product.itemSaleName %></p><% } %>\n <% if(product.comment) { %><p class=\"product-description\"><%= product.comment %></p><% } %>\n </td>\n <td class=\"product-quantity\"><%= product.quantity ? product.quantity : '' %><%= product.unitFormatted ? product.unitFormatted : '' %></td>\n <td class=\"product-price-without-vat\"><% if(product.priceTaxExcludedFormatted) { %><%= product.priceTaxExcludedFormatted + '€' %><% } %></td>\n <% if (shouldDisplayDiscountColumn) { %>\n <td class=\"product-discount\">\n <% if (product.discountFormatted) { %> \n <p style=\"margin-bottom: 0px;\"><%= product.discountFormatted %>€</p>\n <% if(product.discountType === ${DiscountType.PERCENT}) { %><span class=\"discount-percent\">(<%= product.discountTypeFormatted %>)</span><% } %>\n <% } %>\n </td>\n <% } %>\n <% if(disableVat !== true) { %><td class=\"product-vat\"><% if(product.vatFormatted) { %><%= product.vatFormatted %><% } %></td><% } %>\n <td class=\"product-total-price-without-vat\"><% if(product.totalTaxExcludedFormatted) { %><%= product.totalTaxExcludedFormatted + '€' %><% } %></td>\n </tr>\n <% }) %>\n <% } %>\n</table>`;\n\n vatRecapitulation = `<table style=\"width: 80%;\">\n <thead>\n <tr>\n <td>Base</td>\n <td>Taux</td>\n <td>Montant TVA</td>\n </tr>\n </thead>\n <% vats.forEach(function (vat) { %>\n <tr class=\"vat-detail-row\">\n <td><%= vat.baseFormatted %>€</td>\n <td><%= vat.name %></td>\n <td><%= vat.amountFormatted %>€</td>\n </tr>\n <% }) %>\n </table>`;\n\n amountRecapitulation = `<table class=\"summary-prices\" style=\"width: 40%\">\n <thead>\n <tr>\n <td colspan=\"2\">Récapitulatif</td>\n </tr>\n </thead>\n <% if (idEstimateInvoiceType !== ${EstimateInvoiceType.ACOMPTE}) { %>\n <% if (disableVat !== true) { %>\n <tr>\n <td>Total HT</td>\n <td><%= totalTaxExcludedFormatted %>€</td>\n </tr>\n <% } %>\n <% if (generalDiscountFormatted) { %>\n <tr>\n <td>Remise</td>\n <td><%= generalDiscountFormatted %>€</td>\n </tr>\n <% } %>\n <% if (disableVat !== true) { %>\n <tr>\n <td>TVA</td>\n <td><%= totalVatAmountFormatted %>€</td>\n </tr>\n <% } %>\n <% if (disableVat !== true || generalDiscountFormatted || depositFormatted) { %>\n <tr>\n <td>Total <%= disableVat !== true ? 'TTC' : ''%></td>\n <td><%= totalTaxAndDiscountIncludedFormatted %>€</td>\n </tr>\n <% } %>\n <% if (depositFormatted) { %>\n <tr>\n <td>Acompte</td>\n <td><%= depositFormatted %>€</td>\n </tr>\n <% } %>\n <% } %>\n <% if ([${EstimateInvoiceType.FACTURE}, ${EstimateInvoiceType.RESTE}, ${EstimateInvoiceType.ACOMPTE}].includes(idEstimateInvoiceType)) { %>\n <tr>\n <td><b>Net à payer</b></td>\n <td><%= totalTaxAndDiscountIncludedFormatted %>€</td>\n </tr>\n <% } %>\n</table>`;\n\n paymentButton = `<a class=\"payment-button\" href=\"<% if (paymentLink) {%><%= paymentLink %><% } else {%>#<%}%>\">Payer en ligne <svg width=\"81\" height=\"17\" viewBox=\"0 0 81 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M23.6521 1H2.21213C1.5052 1 0.932129 1.57308 0.932129 2.28V14.792C0.932129 15.4989 1.5052 16.072 2.21213 16.072H23.6521C24.3591 16.072 24.9321 15.4989 24.9321 14.792V2.28C24.9321 1.57308 24.3591 1 23.6521 1Z\" fill=\"black\"/>\n <path d=\"M14.9716 5.02051H10.3726V12.5219H14.9716V5.02051Z\" fill=\"#FF5F00\"/>\n <path d=\"M10.8366 8.77127C10.8369 7.30928 11.5058 5.92768 12.6523 5.02055C10.6962 3.48259 7.88661 3.70615 6.19833 5.53409C4.51006 7.36203 4.51006 10.1805 6.19833 12.0085C7.88661 13.8364 10.6962 14.06 12.6523 12.522C11.5058 11.6149 10.8369 10.2333 10.8366 8.77127Z\" fill=\"#EB001B\"/>\n <path d=\"M20.3795 8.77136C20.3808 10.5969 19.3394 12.2628 17.6977 13.0612C16.0561 13.8596 14.1027 13.6502 12.6675 12.5221C13.8143 11.6152 14.4832 10.2334 14.4832 8.77136C14.4832 7.30928 13.8143 5.92754 12.6675 5.02064C14.1027 3.8925 16.0561 3.68315 17.6977 4.48156C19.3394 5.27997 20.3808 6.94586 20.3795 8.77136Z\" fill=\"#F79E1B\"/>\n <path d=\"M30.1321 1.25H51.1321C51.6568 1.25 52.0821 1.67534 52.0821 2.2V14.8C52.0821 15.3247 51.6568 15.75 51.1321 15.75H30.1321C29.6075 15.75 29.1821 15.3247 29.1821 14.8V2.2C29.1821 1.67534 29.6075 1.25 30.1321 1.25Z\" fill=\"white\" stroke=\"#EDEDED\" stroke-width=\"0.5\"/>\n <path d=\"M37.7276 11.4621L38.7284 5.5893H40.3292L39.3277 11.4621H37.7276ZM45.1109 5.7159C44.7938 5.59692 44.2968 5.46924 43.6762 5.46924C42.0945 5.46924 40.9803 6.26574 40.9708 7.40733C40.9618 8.25123 41.7662 8.72199 42.3734 9.00291C42.9965 9.29076 43.2059 9.47433 43.203 9.7314C43.1991 10.125 42.7054 10.3049 42.2453 10.3049C41.6046 10.3049 41.2642 10.2159 40.7385 9.9966L40.5322 9.9033L40.3076 11.218C40.6815 11.3819 41.3729 11.5239 42.0907 11.5313C43.7734 11.5313 44.8657 10.7439 44.8782 9.52482C44.8842 8.85675 44.4577 8.34834 43.5342 7.92918C42.9747 7.65753 42.632 7.47621 42.6356 7.20114C42.6356 6.95703 42.9257 6.69597 43.5523 6.69597C44.0758 6.68787 44.455 6.80202 44.7505 6.92097L44.8939 6.98877L45.1109 5.7159M49.2302 5.58921H47.9932C47.61 5.58921 47.3233 5.69382 47.155 6.07623L44.7777 11.4582H46.4586C46.4586 11.4582 46.7334 10.7345 46.7955 10.5757C46.9793 10.5757 48.6122 10.5782 48.8457 10.5782C48.8936 10.7838 49.0404 11.4582 49.0404 11.4582H50.5258L49.2302 5.58903V5.58921ZM47.2676 9.38151C47.4 9.04314 47.9054 7.73982 47.9054 7.73982C47.8959 7.75548 48.0368 7.3998 48.1176 7.1793L48.2258 7.68567C48.2258 7.68567 48.5324 9.08754 48.5964 9.38151H47.2676ZM36.3686 5.58921L34.8014 9.59421L34.6344 8.78031C34.3427 7.84212 33.4337 6.82566 32.4175 6.31677L33.8505 11.4528L35.5441 11.4508L38.0643 5.58915H36.3686\" fill=\"#171E6C\"/>\n <path d=\"M33.3395 5.58874H30.7582L30.7378 5.71093C32.7459 6.19705 34.0747 7.37182 34.6264 8.78323L34.0651 6.08443C33.9682 5.71258 33.6872 5.60161 33.3395 5.58862\" fill=\"#171E6C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.6129 1C77.4206 1 64.7971 1 57.7475 1C57.1513 1 56.5552 1.6 56.5552 2.2V14.2C56.5552 15.4 57.1513 16 58.3436 16C64.9942 16 77.4206 16 78.6129 16C79.8052 16 80.4013 15.4 80.4013 14.2V2.8C80.4013 1.6 79.8052 1 78.6129 1Z\" fill=\"#306FC5\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M58.496 7.17857L58.0342 6.04592L57.575 7.17857H58.496ZM68.6703 6.72755C68.5775 6.7842 68.4679 6.78608 68.3365 6.78608H67.5168V6.15502H68.3476C68.4652 6.15502 68.5879 6.16033 68.6676 6.20626C68.7552 6.24765 68.8093 6.33575 68.8093 6.45744C68.8093 6.58161 68.7578 6.68153 68.6703 6.72755C68.7578 6.68153 68.6703 6.72755 68.6703 6.72755ZM74.518 7.17857L74.0511 6.04592L73.5867 7.17857H74.518ZM63.6175 8.40455H62.9257L62.9232 6.17935L61.9448 8.40455H61.3523L60.3713 6.17738V8.40455H58.9989L58.7396 7.77082H57.3347L57.0728 8.40455H56.3399L57.5483 5.56337H58.5508L59.6984 8.25338V5.56337H60.7997L61.6828 7.49077L62.494 5.56337H63.6174V8.40455H63.6175ZM66.3744 8.40455H64.1203V5.56337H66.3744V6.15502H64.7951V6.66714H66.3366V7.24953H64.7951V7.81693H66.3744V8.40455ZM69.5526 6.32855C69.5526 6.78154 69.2522 7.01558 69.0772 7.08585C69.2248 7.14241 69.3509 7.24233 69.411 7.32512C69.5062 7.46643 69.5227 7.59266 69.5227 7.84641V8.40455H68.8421L68.8395 8.04625C68.8395 7.87529 68.8558 7.62942 68.733 7.49274C68.6344 7.39282 68.4841 7.37113 68.2412 7.37113H67.5169V8.40455H66.8422V5.56337H68.3941C68.739 5.56337 68.9931 5.57254 69.2112 5.69945C69.4247 5.82637 69.5526 6.01165 69.5526 6.32855C69.5526 6.01165 69.5526 6.32855 69.5526 6.32855ZM70.6325 8.40455H69.944V5.56337H70.6325V8.40455ZM78.62 8.40455H77.6638L76.3848 6.27208V8.40455H75.0106L74.748 7.77082H73.3463L73.0915 8.40455H72.302C71.974 8.40455 71.5587 8.33153 71.3235 8.0903C71.0864 7.84906 70.963 7.5223 70.963 7.00564C70.963 6.58427 71.0368 6.19906 71.3268 5.89467C71.5449 5.66792 71.8865 5.56337 72.3515 5.56337H73.0048V6.17216H72.3652C72.119 6.17216 71.9799 6.209 71.846 6.34046C71.731 6.4601 71.652 6.68625 71.652 6.98404C71.652 7.28844 71.7121 7.50791 71.8376 7.65128C71.9414 7.76371 72.1302 7.79782 72.3078 7.79782H72.6109L73.5619 5.56345H74.5729L75.7153 8.25081V5.56345H76.7427L77.9288 7.54218V5.56345H78.62V8.40455ZM56.3321 8.9626H57.485L57.745 8.33153H58.3269L58.5862 8.9626H60.8546V8.48013L61.0571 8.96466H62.2347L62.4372 8.47293V8.9626H68.0746L68.0719 7.9267H68.181C68.2574 7.92936 68.2797 7.93647 68.2797 8.06339V8.9626H71.1954V8.72145C71.4306 8.84828 71.7964 8.9626 72.2777 8.9626H73.5043L73.7668 8.33153H74.3488L74.6055 8.9626H76.9693V8.36316L77.3273 8.9626H79.2214V5H77.3468V5.46799L77.0843 5H75.1608V5.46799L74.9197 5H72.3215C71.8865 5 71.5042 5.0611 71.1954 5.23138V5H69.4024V5.23138C69.2058 5.05587 68.9381 5 68.6403 5H62.0897L61.6501 6.02347L61.1988 5H59.1355V5.46799L58.9088 5H57.1492L56.332 6.88404V8.9626H56.3321ZM80.3331 11.0548H79.1033C78.9806 11.0548 78.899 11.0594 78.8303 11.1061C78.7591 11.1521 78.7317 11.2204 78.7317 11.3106C78.7317 11.4178 78.7918 11.4907 78.8792 11.5223C78.9504 11.5472 79.0269 11.5545 79.1393 11.5545L79.505 11.5643C79.874 11.5735 80.1203 11.6374 80.2705 11.7931C80.2979 11.8148 80.3143 11.8391 80.3331 11.8634V11.0548ZM80.3331 12.9284C80.1692 13.1696 79.8498 13.2919 79.4174 13.2919H78.1144V12.6825H79.4122C79.5409 12.6825 79.631 12.6655 79.6852 12.6122C79.7322 12.5682 79.765 12.5043 79.765 12.4268C79.765 12.344 79.7322 12.2783 79.6826 12.2389C79.6336 12.1955 79.5624 12.1758 79.4449 12.1758C78.8113 12.1541 78.0209 12.1955 78.0209 11.2962C78.0209 10.884 78.2809 10.4501 78.989 10.4501H80.333V9.8847H79.0843C78.7074 9.8847 78.4337 9.97553 78.2398 10.1168V9.8847H76.3927C76.0973 9.8847 75.7506 9.95839 75.5866 10.1168V9.8847H72.2882V10.1168C72.0257 9.92617 71.5827 9.8847 71.3783 9.8847H69.2026V10.1168C68.9949 9.91435 68.5331 9.8847 68.2516 9.8847H65.8166L65.2594 10.4916L64.7376 9.8847H61.1003V13.85H64.6691L65.2433 13.2335L65.7841 13.85L67.984 13.852V12.9192H68.2003C68.4921 12.9237 68.8364 12.9119 69.1401 12.7798V13.85H70.9546V12.8165H71.0421C71.1538 12.8165 71.1648 12.8211 71.1648 12.9334V13.8499H76.6769C77.0269 13.8499 77.3926 13.7597 77.5952 13.5961V13.8499H79.3436C79.7075 13.8499 80.0628 13.7985 80.3331 13.6671V12.9284ZM77.6415 11.7931C77.7729 11.9299 77.8433 12.1027 77.8433 12.3952C77.8433 13.0065 77.4638 13.2919 76.7833 13.2919H75.4691V12.6825H76.7781C76.906 12.6825 76.9968 12.6655 77.0537 12.6122C77.1001 12.5682 77.1334 12.5043 77.1334 12.4268C77.1334 12.344 77.0974 12.2783 77.051 12.2389C76.9994 12.1955 76.9283 12.1758 76.8108 12.1758C76.1797 12.1541 75.3895 12.1955 75.3895 11.2962C75.3895 10.884 75.6468 10.4501 76.3542 10.4501H77.7069V11.055H76.4691C76.3464 11.055 76.2667 11.0596 76.1988 11.1063C76.1249 11.1523 76.0975 11.2206 76.0975 11.3108C76.0975 11.418 76.1602 11.4909 76.2451 11.5224C76.3163 11.5474 76.3928 11.5547 76.5077 11.5547L76.871 11.5645C77.2373 11.5735 77.4887 11.6373 77.6415 11.7931C77.4887 11.6373 77.6415 11.7931 77.6415 11.7931ZM71.5528 11.6176C71.4626 11.6715 71.351 11.6761 71.2197 11.6761H70.3999V11.0378H71.2308C71.351 11.0378 71.4712 11.0404 71.5528 11.0892C71.6403 11.1352 71.6926 11.2232 71.6926 11.3448C71.6926 11.4664 71.6403 11.5643 71.5528 11.6176C71.6403 11.5643 71.5528 11.6176 71.5528 11.6176ZM71.9604 11.9712C72.1106 12.027 72.2333 12.127 72.2909 12.2098C72.3862 12.3486 72.4 12.478 72.4027 12.7285V13.2919H71.7253V12.9363C71.7253 12.7654 71.7416 12.5122 71.6162 12.3801C71.5176 12.2783 71.3673 12.2539 71.1211 12.2539H70.4V13.2919H69.722V10.45H71.2799C71.6215 10.45 71.8703 10.4652 72.0917 10.5841C72.3047 10.7136 72.4386 10.891 72.4386 11.2152C72.4385 11.6688 72.138 11.9003 71.9604 11.9712C72.138 11.9003 71.9604 11.9712 71.9604 11.9712ZM72.8128 10.45H75.0648V11.0377H73.4847V11.5544H75.0262V12.1342H73.4847V12.6997L75.0648 12.7022V13.2919H72.8128V10.45ZM68.2602 11.7615H67.3882V11.0378H68.268C68.5116 11.0378 68.6807 11.1377 68.6807 11.3863C68.6807 11.632 68.5195 11.7615 68.2602 11.7615ZM66.7161 13.0334L65.6802 11.8759L66.7161 10.755V13.0334ZM64.0407 12.6997H62.3817V12.1342H63.8631V11.5544H62.3817V11.0377H64.0734L64.8115 11.8659L64.0407 12.6997ZM69.4052 11.3863C69.4052 12.1757 68.82 12.3387 68.2301 12.3387H67.3882V13.2919H66.0767L65.2458 12.3511L64.3823 13.2919H61.7096V10.45H64.4235L65.2537 11.3816L66.1119 10.45H68.268C68.8035 10.45 69.4052 10.5992 69.4052 11.3863C69.4052 10.5992 69.4052 11.3863 69.4052 11.3863Z\" fill=\"white\"/>\n </svg></a>`;\n\n style = `@import url(\"<%= font.url %>\");\n\n html { padding: 0; margin: 0px; }\n body { width: 100%; margin: 0px; font-family: \"<%= font.name %>\"; font-size: 14px; font-weight: normal; }\n .row { display: flex; }\n .items-end { align-items: end; }\n .space-between { justify-content: space-between; }\n .full-width { width: 100% }\n .mt-30 { margin-top: 30px }\n .mt-25 { margin-top: 25px }\n .mt-20 { margin-top: 20px }\n .mt-10 { margin-top: 10px }\n .align-center { text-align: center; }\n .margin-auto { margin: auto; }\n .justify-center { justify-content: center; }\n table { font-size: 14px; font-style: normal; }\n\n /* Header */\n .society-informations p { margin: 0px; }\n .society-informations > div p { font-weight: bold; }\n .logo-placeholder { width: 300px; max-height: 150px;text-align: <%= settings && settings.logoAlignment === 'left' ? 'left' : 'right' %>; margin-bottom: <%= settings && settings.logoAlignment === 'left' ? '10px;' : '0px' %>}\n .logo-placeholder > svg, .logo-placeholder > img { max-width: 100%; max-height: 150px; }\n .document-reference { font-size: 20px; }\n .customer-border { border: 2px solid #EAEAEA; border-radius: 6px; padding: 7px; }\n\n /* Body */\n table { border-spacing: 1px; border-collapse: collapse; }\n table, th, td { border: 1px solid #DADCDF; }\n table tr td p { margin: 0px; }\n table tbody tr td { padding: 10px; background-color: white; vertical-align: baseline;}\n table thead tr td { background-color: <%= settings && settings.color ? settings.color : '#EAEAEA' %>; padding: 10px; }\n table thead tr td:not(:first-child) { text-align: right; }\n table .product-description { color: #838384 }\n table .product-quantity, table .product-price-without-vat, table .product-vat, table .product-total-price-without-vat, table .product-discount { text-align: right; }\n table td.product-quantity, table td.product-vat { width: 10% }\n td.product-discount { width: 12.5% }\n table td.product-total-price-without-vat, table td.product-price-without-vat { width: 15% }\n table tr.vat-detail-row td:not(:first-child) { text-align: right; }\n table.summary-prices tr td:not(:first-child) {text-align: right;}\n table.summary-prices tr td:first-child {border-right: none;}\n table .discount-percent { color: #838384; font-size: smaller }\n a.payment-button { display: flex; align-items: center; background-color: #EBF1FF; border-radius: 10px; font-weight: 450; font-size: 14px; color: #1656FF; border: none; padding: 10px 16px; text-decoration: none; }\n a.payment-button svg { margin-left: 15px; }\n <% if (settings && settings.areLinesSeparationHidden) { %>\n td { border-top: none !important; border-bottom: none !important; }\n <% } %>\n <% if (settings && settings.areColumnsSeparationHidden) { %>\n td { border-left: none !important; border-right: none !important; }\n <% } %>\n <% if (settings && settings.areExternalBordersHidden) { %>\n table { border: none !important }\n table tr:last-child td { border-bottom: none !important }\n table thead td { border-top: none !important }\n table td:first-child { border-left: none !important }\n table td:last-child { border-right: none !important }\n <% } %>`;\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,MAAM,OAAO,4BAA4B;IAAzC;QACE,WAAM,GAAG;;;;UAID,CAAC;QAET,WAAM,GAAG;;;;WAIA,CAAC;QAEV,SAAI,GAAG;;SAEA,CAAC;QAER,YAAO,GAAG;;;;;;yFAM6E,CAAC;QAExF,aAAQ,GAAG;;;;;;;;;;;qCAWwB,mBAAmB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;+CAuBjB,YAAY,CAAC,OAAO;;;;;;;;;SAS1D,CAAC;QAER,sBAAiB,GAAG;;;;;;;;;;;;;;;WAeX,CAAC;QAEV,yBAAoB,GAAG;;;;;;qCAMY,mBAAmB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAgCpD,mBAAmB,CAAC,OAAO,KAAK,mBAAmB,CAAC,KAAK,KAAK,mBAAmB,CAAC,OAAO;;;;;;SAM5F,CAAC;QAER,kBAAa,GAAG;;;;;;;;;;aAUL,CAAC;QAEZ,UAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDA,CAAC;IACX,CAAC;CAAA","sourcesContent":["import { EstimateInvoiceType } from '../../../types/Enum/EstimateInvoice';\nimport { DiscountType } from '../../../types/Enum/CommercialManagement';\n\nexport class CommercialDocumentCommonHTML {\n header = `<style>html {\n -webkit-print-color-adjust: exact;\n }</style><% if (settings && settings.isEdgingDisplayed) { %>\n <span style=\"position: absolute; top: 0; left: 0; width: 100vw; font-size: 10px; height: 15px; background-color: <%= settings && settings.edgingColor ? settings.edgingColor : '#333333' %>; margin-bottom: 20px;\"></span>\n <% } %>`;\n\n footer = `<div style=\"font-size: 8px; color: #DADCDF; text-align: center; margin-left: 40px; margin-right: 40px; display: block; width: 100%\">\n <% if (freeText) { %><%- freeText %><br/><br/><% } %>\n <% if(marginVats.length > 0) {%>Régime TVA sur marge - <% marginVats.forEach(function(v, index) { %><%= v %> - <% }) } %> ART 297-A du CGI ou directive 2006-212 CE | <% if(penalties || compensation || discount) {%><%= penalties ? 'Pénalités en cas de retard : ' + penalties : ''%><%= penalties && compensation ? '|' : ''%><%= compensation ? 'Indemnité forfaitaire en cas de retard :' + compensation : '' %><%= (compensation || penalties) && discount ? '| ' : '' %><%= discount %><% if(name || legalForm || capital || siren || rcs) {%><br/><br/><% } %><% }%>\n <%= name %><%= name && (legalForm || capital || siren || rcs) ? ',' : ''%><%= legalForm %><%= capital ? ' au capital de ' + capitalFormatted + ' €' : '' %><%= siren ? ' immatriculée sous le SIREN ' + siren : ''%><%= rcs ? 'RCS ' + rcs + vatCode || nafCode ? '|' : '' : ''%><% if (vatCode || nafCode) {%><br/><% } %><%= vatCode ? 'N° TVA '+vatCode : ''%><% if(vatCode && nafCode){%>|<%}%><%= nafCode ? 'APE '+nafCode : '' %>\n </div>`;\n\n logo = `<div class=\"logo-placeholder\">\n <% if (logoUrl) { %><img src=\"<%= logoUrl %>\" alt=\"logo\" /><% } %>\n </div>`;\n\n company = `<div>\n <% if (name) { %><p><%= name %><p><% } %>\n <% if (number || street) {%><p><%}%><% if (number) { %><%= number + ' ' %><% } if (street) { %><%= street %><% } if (number || street) { %><% } %><% if (number || street) {%></p><%}%>\n <% if (zipCode || city) {%><p><%}%><% if (zipCode) { %><%= zipCode + ' ' %><% } if (city) { %><%= city %><% } if (zipCode || city) { %></p><% } %>\n </div>\n <% if (phoneContact) { %><p><%= phoneContact %><p><% } %>\n <% if (settings && settings.mailContact) { %><p><%= settings.mailContact %></p><% } %>`;\n\n products = `<table class=\"full-width\">\n <thead>\n <tr>\n <td>Article</td>\n <td>Quantité</td>\n <td>P.U <%= disableVat !== true ? 'HT' : ''%></td>\n <% if (shouldDisplayDiscountColumn) { %><td>Remise</td><% } %>\n <% if (disableVat !== true) { %><td>TVA</td><% } %>\n <td>Montant <%= disableVat !== true ? 'HT' : ''%></td>\n </tr>\n </thead>\n <% if (idEstimateInvoiceType === ${EstimateInvoiceType.ACOMPTE}) { %>\n <tr>\n <td class=\"product-title\">\n <%= title %>\n </td>\n <td class=\"product-quantity\">1</td>\n <td class=\"product-price-without-vat\"><%= depositFormatted %>€</td>\n <td class=\"product-total-price-without-vat\"><%= depositFormatted %>€</td>\n </tr>\n <% } %>\n <% if (products) { %>\n <% products.forEach(function (product) { %>\n <tr>\n <td class=\"product-title\">\n <% if(product.itemSaleName) { %><p class=\"product-name\"><%= product.itemSaleName %></p><% } %>\n <% if(product.comment) { %><p class=\"product-description\"><%= product.comment %></p><% } %>\n </td>\n <td class=\"product-quantity\"><%= product.quantity ? product.quantity : '' %><%= product.unitFormatted ? product.unitFormatted : '' %></td>\n <td class=\"product-price-without-vat\"><% if(product.priceTaxExcludedFormatted) { %><%= product.priceTaxExcludedFormatted + '€' %><% } %></td>\n <% if (shouldDisplayDiscountColumn) { %>\n <td class=\"product-discount\">\n <% if (product.discountFormatted) { %> \n <p style=\"margin-bottom: 0px;\"><%= product.discountFormatted %>€</p>\n <% if(product.discountType === ${DiscountType.PERCENT}) { %><span class=\"discount-percent\">(<%= product.discountTypeFormatted %>)</span><% } %>\n <% } %>\n </td>\n <% } %>\n <% if(disableVat !== true) { %><td class=\"product-vat\"><% if(product.vatFormatted) { %><%= product.vatFormatted %><% } %></td><% } %>\n <td class=\"product-total-price-without-vat\"><% if(product.totalTaxExcludedFormatted) { %><%= product.totalTaxExcludedFormatted + '€' %><% } %></td>\n </tr>\n <% }) %>\n <% } %>\n</table>`;\n\n vatRecapitulation = `<table style=\"width: 80%;\">\n <thead>\n <tr>\n <td>Base</td>\n <td>Taux</td>\n <td>Montant TVA</td>\n </tr>\n </thead>\n <% vats.forEach(function (vat) { %>\n <tr class=\"vat-detail-row\">\n <td><%= vat.baseFormatted %>€</td>\n <td><%= vat.name %></td>\n <td><%= vat.amountFormatted %>€</td>\n </tr>\n <% }) %>\n </table>`;\n\n amountRecapitulation = `<table class=\"summary-prices\" style=\"width: 40%\">\n <thead>\n <tr>\n <td colspan=\"2\">Récapitulatif</td>\n </tr>\n </thead>\n <% if (idEstimateInvoiceType !== ${EstimateInvoiceType.ACOMPTE}) { %>\n <% if (disableVat !== true) { %>\n <tr>\n <td>Total HT</td>\n <td><%= totalTaxExcludedFormatted %>€</td>\n </tr>\n <% } %>\n <% if (generalDiscountFormatted) { %>\n <tr>\n <td>Remise</td>\n <td><%= generalDiscountFormatted %>€</td>\n </tr>\n <% } %>\n <% if (disableVat !== true) { %>\n <tr>\n <td>TVA</td>\n <td><%= totalVatAmountFormatted %>€</td>\n </tr>\n <% } %>\n <% if (disableVat !== true || generalDiscountFormatted || depositFormatted) { %>\n <tr>\n <td>Total <%= disableVat !== true ? 'TTC' : ''%></td>\n <td><%= totalTaxAndDiscountIncludedFormatted %>€</td>\n </tr>\n <% } %>\n <% if (depositFormatted) { %>\n <tr>\n <td>Acompte</td>\n <td><%= depositFormatted %>€</td>\n </tr>\n <% } %>\n <% } %>\n <% if ([${EstimateInvoiceType.FACTURE}, ${EstimateInvoiceType.RESTE}, ${EstimateInvoiceType.ACOMPTE}].includes(idEstimateInvoiceType)) { %>\n <tr>\n <td><b>Net à payer</b></td>\n <td><%= totalTaxAndDiscountIncludedFormatted %>€</td>\n </tr>\n <% } %>\n</table>`;\n\n paymentButton = `<a class=\"payment-button\" href=\"<% if (paymentLink) {%><%= paymentLink %><% } else {%>#<%}%>\">Payer en ligne <svg width=\"81\" height=\"17\" viewBox=\"0 0 81 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M23.6521 1H2.21213C1.5052 1 0.932129 1.57308 0.932129 2.28V14.792C0.932129 15.4989 1.5052 16.072 2.21213 16.072H23.6521C24.3591 16.072 24.9321 15.4989 24.9321 14.792V2.28C24.9321 1.57308 24.3591 1 23.6521 1Z\" fill=\"black\"/>\n <path d=\"M14.9716 5.02051H10.3726V12.5219H14.9716V5.02051Z\" fill=\"#FF5F00\"/>\n <path d=\"M10.8366 8.77127C10.8369 7.30928 11.5058 5.92768 12.6523 5.02055C10.6962 3.48259 7.88661 3.70615 6.19833 5.53409C4.51006 7.36203 4.51006 10.1805 6.19833 12.0085C7.88661 13.8364 10.6962 14.06 12.6523 12.522C11.5058 11.6149 10.8369 10.2333 10.8366 8.77127Z\" fill=\"#EB001B\"/>\n <path d=\"M20.3795 8.77136C20.3808 10.5969 19.3394 12.2628 17.6977 13.0612C16.0561 13.8596 14.1027 13.6502 12.6675 12.5221C13.8143 11.6152 14.4832 10.2334 14.4832 8.77136C14.4832 7.30928 13.8143 5.92754 12.6675 5.02064C14.1027 3.8925 16.0561 3.68315 17.6977 4.48156C19.3394 5.27997 20.3808 6.94586 20.3795 8.77136Z\" fill=\"#F79E1B\"/>\n <path d=\"M30.1321 1.25H51.1321C51.6568 1.25 52.0821 1.67534 52.0821 2.2V14.8C52.0821 15.3247 51.6568 15.75 51.1321 15.75H30.1321C29.6075 15.75 29.1821 15.3247 29.1821 14.8V2.2C29.1821 1.67534 29.6075 1.25 30.1321 1.25Z\" fill=\"white\" stroke=\"#EDEDED\" stroke-width=\"0.5\"/>\n <path d=\"M37.7276 11.4621L38.7284 5.5893H40.3292L39.3277 11.4621H37.7276ZM45.1109 5.7159C44.7938 5.59692 44.2968 5.46924 43.6762 5.46924C42.0945 5.46924 40.9803 6.26574 40.9708 7.40733C40.9618 8.25123 41.7662 8.72199 42.3734 9.00291C42.9965 9.29076 43.2059 9.47433 43.203 9.7314C43.1991 10.125 42.7054 10.3049 42.2453 10.3049C41.6046 10.3049 41.2642 10.2159 40.7385 9.9966L40.5322 9.9033L40.3076 11.218C40.6815 11.3819 41.3729 11.5239 42.0907 11.5313C43.7734 11.5313 44.8657 10.7439 44.8782 9.52482C44.8842 8.85675 44.4577 8.34834 43.5342 7.92918C42.9747 7.65753 42.632 7.47621 42.6356 7.20114C42.6356 6.95703 42.9257 6.69597 43.5523 6.69597C44.0758 6.68787 44.455 6.80202 44.7505 6.92097L44.8939 6.98877L45.1109 5.7159M49.2302 5.58921H47.9932C47.61 5.58921 47.3233 5.69382 47.155 6.07623L44.7777 11.4582H46.4586C46.4586 11.4582 46.7334 10.7345 46.7955 10.5757C46.9793 10.5757 48.6122 10.5782 48.8457 10.5782C48.8936 10.7838 49.0404 11.4582 49.0404 11.4582H50.5258L49.2302 5.58903V5.58921ZM47.2676 9.38151C47.4 9.04314 47.9054 7.73982 47.9054 7.73982C47.8959 7.75548 48.0368 7.3998 48.1176 7.1793L48.2258 7.68567C48.2258 7.68567 48.5324 9.08754 48.5964 9.38151H47.2676ZM36.3686 5.58921L34.8014 9.59421L34.6344 8.78031C34.3427 7.84212 33.4337 6.82566 32.4175 6.31677L33.8505 11.4528L35.5441 11.4508L38.0643 5.58915H36.3686\" fill=\"#171E6C\"/>\n <path d=\"M33.3395 5.58874H30.7582L30.7378 5.71093C32.7459 6.19705 34.0747 7.37182 34.6264 8.78323L34.0651 6.08443C33.9682 5.71258 33.6872 5.60161 33.3395 5.58862\" fill=\"#171E6C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.6129 1C77.4206 1 64.7971 1 57.7475 1C57.1513 1 56.5552 1.6 56.5552 2.2V14.2C56.5552 15.4 57.1513 16 58.3436 16C64.9942 16 77.4206 16 78.6129 16C79.8052 16 80.4013 15.4 80.4013 14.2V2.8C80.4013 1.6 79.8052 1 78.6129 1Z\" fill=\"#306FC5\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M58.496 7.17857L58.0342 6.04592L57.575 7.17857H58.496ZM68.6703 6.72755C68.5775 6.7842 68.4679 6.78608 68.3365 6.78608H67.5168V6.15502H68.3476C68.4652 6.15502 68.5879 6.16033 68.6676 6.20626C68.7552 6.24765 68.8093 6.33575 68.8093 6.45744C68.8093 6.58161 68.7578 6.68153 68.6703 6.72755C68.7578 6.68153 68.6703 6.72755 68.6703 6.72755ZM74.518 7.17857L74.0511 6.04592L73.5867 7.17857H74.518ZM63.6175 8.40455H62.9257L62.9232 6.17935L61.9448 8.40455H61.3523L60.3713 6.17738V8.40455H58.9989L58.7396 7.77082H57.3347L57.0728 8.40455H56.3399L57.5483 5.56337H58.5508L59.6984 8.25338V5.56337H60.7997L61.6828 7.49077L62.494 5.56337H63.6174V8.40455H63.6175ZM66.3744 8.40455H64.1203V5.56337H66.3744V6.15502H64.7951V6.66714H66.3366V7.24953H64.7951V7.81693H66.3744V8.40455ZM69.5526 6.32855C69.5526 6.78154 69.2522 7.01558 69.0772 7.08585C69.2248 7.14241 69.3509 7.24233 69.411 7.32512C69.5062 7.46643 69.5227 7.59266 69.5227 7.84641V8.40455H68.8421L68.8395 8.04625C68.8395 7.87529 68.8558 7.62942 68.733 7.49274C68.6344 7.39282 68.4841 7.37113 68.2412 7.37113H67.5169V8.40455H66.8422V5.56337H68.3941C68.739 5.56337 68.9931 5.57254 69.2112 5.69945C69.4247 5.82637 69.5526 6.01165 69.5526 6.32855C69.5526 6.01165 69.5526 6.32855 69.5526 6.32855ZM70.6325 8.40455H69.944V5.56337H70.6325V8.40455ZM78.62 8.40455H77.6638L76.3848 6.27208V8.40455H75.0106L74.748 7.77082H73.3463L73.0915 8.40455H72.302C71.974 8.40455 71.5587 8.33153 71.3235 8.0903C71.0864 7.84906 70.963 7.5223 70.963 7.00564C70.963 6.58427 71.0368 6.19906 71.3268 5.89467C71.5449 5.66792 71.8865 5.56337 72.3515 5.56337H73.0048V6.17216H72.3652C72.119 6.17216 71.9799 6.209 71.846 6.34046C71.731 6.4601 71.652 6.68625 71.652 6.98404C71.652 7.28844 71.7121 7.50791 71.8376 7.65128C71.9414 7.76371 72.1302 7.79782 72.3078 7.79782H72.6109L73.5619 5.56345H74.5729L75.7153 8.25081V5.56345H76.7427L77.9288 7.54218V5.56345H78.62V8.40455ZM56.3321 8.9626H57.485L57.745 8.33153H58.3269L58.5862 8.9626H60.8546V8.48013L61.0571 8.96466H62.2347L62.4372 8.47293V8.9626H68.0746L68.0719 7.9267H68.181C68.2574 7.92936 68.2797 7.93647 68.2797 8.06339V8.9626H71.1954V8.72145C71.4306 8.84828 71.7964 8.9626 72.2777 8.9626H73.5043L73.7668 8.33153H74.3488L74.6055 8.9626H76.9693V8.36316L77.3273 8.9626H79.2214V5H77.3468V5.46799L77.0843 5H75.1608V5.46799L74.9197 5H72.3215C71.8865 5 71.5042 5.0611 71.1954 5.23138V5H69.4024V5.23138C69.2058 5.05587 68.9381 5 68.6403 5H62.0897L61.6501 6.02347L61.1988 5H59.1355V5.46799L58.9088 5H57.1492L56.332 6.88404V8.9626H56.3321ZM80.3331 11.0548H79.1033C78.9806 11.0548 78.899 11.0594 78.8303 11.1061C78.7591 11.1521 78.7317 11.2204 78.7317 11.3106C78.7317 11.4178 78.7918 11.4907 78.8792 11.5223C78.9504 11.5472 79.0269 11.5545 79.1393 11.5545L79.505 11.5643C79.874 11.5735 80.1203 11.6374 80.2705 11.7931C80.2979 11.8148 80.3143 11.8391 80.3331 11.8634V11.0548ZM80.3331 12.9284C80.1692 13.1696 79.8498 13.2919 79.4174 13.2919H78.1144V12.6825H79.4122C79.5409 12.6825 79.631 12.6655 79.6852 12.6122C79.7322 12.5682 79.765 12.5043 79.765 12.4268C79.765 12.344 79.7322 12.2783 79.6826 12.2389C79.6336 12.1955 79.5624 12.1758 79.4449 12.1758C78.8113 12.1541 78.0209 12.1955 78.0209 11.2962C78.0209 10.884 78.2809 10.4501 78.989 10.4501H80.333V9.8847H79.0843C78.7074 9.8847 78.4337 9.97553 78.2398 10.1168V9.8847H76.3927C76.0973 9.8847 75.7506 9.95839 75.5866 10.1168V9.8847H72.2882V10.1168C72.0257 9.92617 71.5827 9.8847 71.3783 9.8847H69.2026V10.1168C68.9949 9.91435 68.5331 9.8847 68.2516 9.8847H65.8166L65.2594 10.4916L64.7376 9.8847H61.1003V13.85H64.6691L65.2433 13.2335L65.7841 13.85L67.984 13.852V12.9192H68.2003C68.4921 12.9237 68.8364 12.9119 69.1401 12.7798V13.85H70.9546V12.8165H71.0421C71.1538 12.8165 71.1648 12.8211 71.1648 12.9334V13.8499H76.6769C77.0269 13.8499 77.3926 13.7597 77.5952 13.5961V13.8499H79.3436C79.7075 13.8499 80.0628 13.7985 80.3331 13.6671V12.9284ZM77.6415 11.7931C77.7729 11.9299 77.8433 12.1027 77.8433 12.3952C77.8433 13.0065 77.4638 13.2919 76.7833 13.2919H75.4691V12.6825H76.7781C76.906 12.6825 76.9968 12.6655 77.0537 12.6122C77.1001 12.5682 77.1334 12.5043 77.1334 12.4268C77.1334 12.344 77.0974 12.2783 77.051 12.2389C76.9994 12.1955 76.9283 12.1758 76.8108 12.1758C76.1797 12.1541 75.3895 12.1955 75.3895 11.2962C75.3895 10.884 75.6468 10.4501 76.3542 10.4501H77.7069V11.055H76.4691C76.3464 11.055 76.2667 11.0596 76.1988 11.1063C76.1249 11.1523 76.0975 11.2206 76.0975 11.3108C76.0975 11.418 76.1602 11.4909 76.2451 11.5224C76.3163 11.5474 76.3928 11.5547 76.5077 11.5547L76.871 11.5645C77.2373 11.5735 77.4887 11.6373 77.6415 11.7931C77.4887 11.6373 77.6415 11.7931 77.6415 11.7931ZM71.5528 11.6176C71.4626 11.6715 71.351 11.6761 71.2197 11.6761H70.3999V11.0378H71.2308C71.351 11.0378 71.4712 11.0404 71.5528 11.0892C71.6403 11.1352 71.6926 11.2232 71.6926 11.3448C71.6926 11.4664 71.6403 11.5643 71.5528 11.6176C71.6403 11.5643 71.5528 11.6176 71.5528 11.6176ZM71.9604 11.9712C72.1106 12.027 72.2333 12.127 72.2909 12.2098C72.3862 12.3486 72.4 12.478 72.4027 12.7285V13.2919H71.7253V12.9363C71.7253 12.7654 71.7416 12.5122 71.6162 12.3801C71.5176 12.2783 71.3673 12.2539 71.1211 12.2539H70.4V13.2919H69.722V10.45H71.2799C71.6215 10.45 71.8703 10.4652 72.0917 10.5841C72.3047 10.7136 72.4386 10.891 72.4386 11.2152C72.4385 11.6688 72.138 11.9003 71.9604 11.9712C72.138 11.9003 71.9604 11.9712 71.9604 11.9712ZM72.8128 10.45H75.0648V11.0377H73.4847V11.5544H75.0262V12.1342H73.4847V12.6997L75.0648 12.7022V13.2919H72.8128V10.45ZM68.2602 11.7615H67.3882V11.0378H68.268C68.5116 11.0378 68.6807 11.1377 68.6807 11.3863C68.6807 11.632 68.5195 11.7615 68.2602 11.7615ZM66.7161 13.0334L65.6802 11.8759L66.7161 10.755V13.0334ZM64.0407 12.6997H62.3817V12.1342H63.8631V11.5544H62.3817V11.0377H64.0734L64.8115 11.8659L64.0407 12.6997ZM69.4052 11.3863C69.4052 12.1757 68.82 12.3387 68.2301 12.3387H67.3882V13.2919H66.0767L65.2458 12.3511L64.3823 13.2919H61.7096V10.45H64.4235L65.2537 11.3816L66.1119 10.45H68.268C68.8035 10.45 69.4052 10.5992 69.4052 11.3863C69.4052 10.5992 69.4052 11.3863 69.4052 11.3863Z\" fill=\"white\"/>\n </svg></a>`;\n\n style = `@import url(\"<%= font.url %>\");\n\n html { padding: 0; margin: 0px; }\n body { width: 100%; margin: 0px; font-family: \"<%= font.name %>\"; font-size: 14px; font-weight: normal; }\n .row { display: flex; }\n .items-end { align-items: end; }\n .space-between { justify-content: space-between; }\n .full-width { width: 100% }\n .mt-30 { margin-top: 30px }\n .mt-25 { margin-top: 25px }\n .mt-20 { margin-top: 20px }\n .mt-10 { margin-top: 10px }\n .align-center { text-align: center; }\n .margin-auto { margin: auto; }\n .justify-center { justify-content: center; }\n table { font-size: 14px; font-style: normal; }\n\n /* Header */\n .society-informations p { margin: 0px; }\n .society-informations > div p { font-weight: bold; }\n .logo-placeholder { width: 300px; max-height: 150px;text-align: <%= settings && settings.logoAlignment === 'left' ? 'left' : 'right' %>; margin-bottom: <%= settings && settings.logoAlignment === 'left' ? '10px;' : '0px' %>}\n .logo-placeholder > svg, .logo-placeholder > img { max-width: 100%; max-height: 150px; }\n .document-reference { font-size: 20px; }\n .customer-border { border: 2px solid #EAEAEA; border-radius: 6px; padding: 7px; }\n\n /* Body */\n table { border-spacing: 1px; border-collapse: collapse; }\n table, th, td { border: 1px solid #DADCDF; }\n table tr td p { margin: 0px; }\n table tbody tr td { padding: 10px; background-color: white; vertical-align: baseline;}\n table thead tr td { background-color: <%= settings && settings.color ? settings.color : '#EAEAEA' %>; padding: 10px; }\n table thead tr td:not(:first-child) { text-align: right; }\n table .product-description { color: #838384 }\n table .product-quantity, table .product-price-without-vat, table .product-vat, table .product-total-price-without-vat, table .product-discount { text-align: right; }\n table td.product-quantity, table td.product-vat { width: 10% }\n td.product-discount { width: 12.5% }\n table td.product-total-price-without-vat, table td.product-price-without-vat { width: 15% }\n table tr.vat-detail-row td:not(:first-child) { text-align: right; }\n table.summary-prices tr td:not(:first-child) {text-align: right;}\n table.summary-prices tr td:first-child {border-right: none;}\n table .discount-percent { color: #838384; font-size: smaller }\n a.payment-button { display: flex; align-items: center; background-color: #EBF1FF; border-radius: 10px; font-weight: 450; font-size: 14px; color: #1656FF; border: none; padding: 10px 16px; text-decoration: none; }\n a.payment-button svg { margin-left: 15px; }\n <% if (settings && settings.areLinesSeparationHidden) { %>\n td { border-top: none !important; border-bottom: none !important; }\n <% } %>\n <% if (settings && settings.areColumnsSeparationHidden) { %>\n td { border-left: none !important; border-right: none !important; }\n <% } %>\n <% if (settings && settings.areExternalBordersHidden) { %>\n table { border: none !important }\n table tr:last-child td { border-bottom: none !important }\n table thead td { border-top: none !important }\n table td:first-child { border-left: none !important }\n table td:last-child { border-right: none !important }\n <% } %>`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"vat.d.ts","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/vat.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEvD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,cAAc,CASlF"}
1
+ {"version":3,"file":"vat.d.ts","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/vat.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEvD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,cAAc,CAUlF"}
@@ -12,6 +12,7 @@ export function vatToReadVatEditing(products) {
12
12
  var _a, _b, _c, _d, _e, _f;
13
13
  const { idVat } = products[0];
14
14
  return {
15
+ id: idVat,
15
16
  name: (_b = (_a = getById(idVat)) === null || _a === void 0 ? void 0 : _a.saleName) !== null && _b !== void 0 ? _b : '',
16
17
  amount: _sumBy(products, (p) => { var _a, _b; return getAmount(p.totalTaxExcluded, (_b = (_a = getById(idVat)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0); }),
17
18
  value: (_d = (_c = getById(idVat)) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 0,
@@ -1 +1 @@
1
- {"version":3,"file":"vat.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/vat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,M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AAM,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAA,MAAA,OAAO,CAAC,KAAK,CAAC,0CAAE,KAAK,mCAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;KAClK,CAAC;AACJ,CAAC","sourcesContent":["import { sumBy as _sumBy } from 'lodash';\nimport { Vat, VatType } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { ReadProductEditing, ReadVatEditing } from '../../types';\n\nexport function getAmount(amount: number | null, vatValue: number): number {\n const _amount = amount ?? 0;\n return _amount * (vatValue / 100);\n}\n\nexport function getById(id: number): VatType | undefined {\n return Object.values(Vat).find((vat) => vat.id === id);\n}\n\nexport function vatToReadVatEditing(products: ReadProductEditing[]): ReadVatEditing {\n const { idVat } = products[0];\n return {\n name: getById(idVat)?.saleName ?? '',\n amount: _sumBy(products, (p) => getAmount(p.totalTaxExcluded, getById(idVat)?.value ?? 0)),\n value: getById(idVat)?.value ?? 0,\n baseFormatted: integerToFormattedAmountString(_sumBy(products, (p) => (p.totalTaxExcluded ? +p.totalTaxExcluded : 0))),\n amountFormatted: integerToFormattedAmountString((_sumBy(products, (p) => (p.totalTaxExcluded ? +p.totalTaxExcluded : 0)) * ((getById(idVat)?.value ?? 0))) / 100),\n };\n}"]}
1
+ {"version":3,"file":"vat.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/vat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,GAAG,EAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAG3D,MAAM,UAAU,SAAS,CAAC,MAAqB,EAAE,QAAgB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C,CAAC,CAAC,GAAG,CAAC,CAAC,MAAA,MAAA,OAAO,CAAC,KAAK,CAAC,0CAAE,KAAK,mCAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;KAClK,CAAC;AACJ,CAAC","sourcesContent":["import { sumBy as _sumBy } from 'lodash';\nimport { Vat, VatType } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { ReadProductEditing, ReadVatEditing } from '../../types';\n\nexport function getAmount(amount: number | null, vatValue: number): number {\n const _amount = amount ?? 0;\n return _amount * (vatValue / 100);\n}\n\nexport function getById(id: number): VatType | undefined {\n return Object.values(Vat).find((vat) => vat.id === id);\n}\n\nexport function vatToReadVatEditing(products: ReadProductEditing[]): ReadVatEditing {\n const { idVat } = products[0];\n return {\n id: idVat,\n name: getById(idVat)?.saleName ?? '',\n amount: _sumBy(products, (p) => getAmount(p.totalTaxExcluded, getById(idVat)?.value ?? 0)),\n value: getById(idVat)?.value ?? 0,\n baseFormatted: integerToFormattedAmountString(_sumBy(products, (p) => (p.totalTaxExcluded ? +p.totalTaxExcluded : 0))),\n amountFormatted: integerToFormattedAmountString((_sumBy(products, (p) => (p.totalTaxExcluded ? +p.totalTaxExcluded : 0)) * ((getById(idVat)?.value ?? 0))) / 100),\n };\n}"]}
@@ -23,6 +23,10 @@ class AccountingFiles extends _Resource.Resource {
23
23
  });
24
24
  }
25
25
 
26
+ delete(id) {
27
+ return this.axios.$delete(`/accounting-files/${id}`);
28
+ }
29
+
26
30
  }
27
31
 
28
32
  exports.AccountingFiles = AccountingFiles;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountingFiles.js","mappings":";;;;;;;AAAA;;AAGM,MAAOA,eAAP,SAA+BC,kBAA/B,CAAuC;EAC3CC,cAAc,CAACC,MAAD,EAA6B;IACzC,MAAMC,mBAAmB,GAAG,IAAIC,QAAJ,EAA5B;IAEAD,mBAAmB,CAACE,MAApB,CAA2B,kBAA3B,EAA+CH,MAAM,CAACI,gBAAP,CAAwBC,QAAxB,EAA/C;IACAJ,mBAAmB,CAACE,MAApB,CAA2B,YAA3B,EAAyCH,MAAM,CAACM,UAAP,CAAkBD,QAAlB,EAAzC;IACAJ,mBAAmB,CAACE,MAApB,CAA2B,OAA3B,EAAoCH,MAAM,CAACO,KAAP,CAAaF,QAAb,EAApC;IAEAL,MAAM,CAACQ,KAAP,CAAaC,OAAb,CAAsBC,IAAD,IAAS;MAC5BT,mBAAmB,CAACE,MAApB,CAA2B,OAA3B,EAAoCO,IAApC;IACD,CAFD;IAIA,OAAO,KAAKC,KAAL,CAAWC,KAAX,CAAiB,0BAAjB,EAA6CZ,MAA7C,EAAqD;MAAEa,OAAO,EAAE;QAAE,gBAAgB;MAAlB;IAAX,CAArD,CAAP;EACD;;AAb0C;;QAAhChB,e,GAAAA,e","names":["AccountingFiles","Resource","accountingFile","params","sendAccountingFiles","FormData","append","idAccountingType","toString","isPayPerso","split","files","forEach","file","axios","$post","headers"],"sourceRoot":"","sources":["../../../ts/api/resources/AccountingFiles.ts"],"sourcesContent":["import { Resource } from '../Resource';\nimport { QueryAccountingFiles, ReadFormattedAccountingTransaction } from '../../types';\n\nexport class AccountingFiles extends Resource {\n accountingFile(params: QueryAccountingFiles): Promise<ReadFormattedAccountingTransaction[]> {\n const sendAccountingFiles = new FormData();\n\n sendAccountingFiles.append('idAccountingType', params.idAccountingType.toString());\n sendAccountingFiles.append('isPayPerso', params.isPayPerso.toString());\n sendAccountingFiles.append('split', params.split.toString());\n\n params.files.forEach((file) => {\n sendAccountingFiles.append('files', file);\n });\n\n return this.axios.$post('/society/accountingFiles', params, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n}"]}
1
+ {"version":3,"file":"AccountingFiles.js","mappings":";;;;;;;AAAA;;AAGM,MAAOA,eAAP,SAA+BC,kBAA/B,CAAuC;EAC3CC,cAAc,CAACC,MAAD,EAA6B;IACzC,MAAMC,mBAAmB,GAAG,IAAIC,QAAJ,EAA5B;IAEAD,mBAAmB,CAACE,MAApB,CAA2B,kBAA3B,EAA+CH,MAAM,CAACI,gBAAP,CAAwBC,QAAxB,EAA/C;IACAJ,mBAAmB,CAACE,MAApB,CAA2B,YAA3B,EAAyCH,MAAM,CAACM,UAAP,CAAkBD,QAAlB,EAAzC;IACAJ,mBAAmB,CAACE,MAApB,CAA2B,OAA3B,EAAoCH,MAAM,CAACO,KAAP,CAAaF,QAAb,EAApC;IAEAL,MAAM,CAACQ,KAAP,CAAaC,OAAb,CAAsBC,IAAD,IAAS;MAC5BT,mBAAmB,CAACE,MAApB,CAA2B,OAA3B,EAAoCO,IAApC;IACD,CAFD;IAIA,OAAO,KAAKC,KAAL,CAAWC,KAAX,CAAiB,0BAAjB,EAA6CZ,MAA7C,EAAqD;MAAEa,OAAO,EAAE;QAAE,gBAAgB;MAAlB;IAAX,CAArD,CAAP;EACD;;EAEDC,MAAM,CAACC,EAAD,EAAW;IACf,OAAO,KAAKJ,KAAL,CAAWK,OAAX,CAAmB,qBAAqBD,EAAE,EAA1C,CAAP;EACD;;AAjB0C;;QAAhClB,e,GAAAA,e","names":["AccountingFiles","Resource","accountingFile","params","sendAccountingFiles","FormData","append","idAccountingType","toString","isPayPerso","split","files","forEach","file","axios","$post","headers","delete","id","$delete"],"sourceRoot":"","sources":["../../../ts/api/resources/AccountingFiles.ts"],"sourcesContent":["import { Resource } from '../Resource';\nimport { QueryAccountingFiles, ReadFormattedAccountingTransaction } from '../../types';\n\nexport class AccountingFiles extends Resource {\n accountingFile(params: QueryAccountingFiles): Promise<ReadFormattedAccountingTransaction[]> {\n const sendAccountingFiles = new FormData();\n\n sendAccountingFiles.append('idAccountingType', params.idAccountingType.toString());\n sendAccountingFiles.append('isPayPerso', params.isPayPerso.toString());\n sendAccountingFiles.append('split', params.split.toString());\n\n params.files.forEach((file) => {\n sendAccountingFiles.append('files', file);\n });\n\n return this.axios.$post('/society/accountingFiles', params, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/accounting-files/${id}`);\n }\n}"]}
@@ -36,6 +36,14 @@ class Invoice extends _Resource.Resource {
36
36
  return this.axios.$delete(`/commercial-management/documents/${id}`);
37
37
  }
38
38
 
39
+ getAllMails(idFile) {
40
+ return this.axios.$get(`/commercial-management/files/${idFile}/mails`);
41
+ }
42
+
43
+ sendMail(idFile, payload) {
44
+ return this.axios.$post(`/commercial-management/files/${idFile}/mails`, payload);
45
+ }
46
+
39
47
  }
40
48
 
41
49
  exports.Invoice = Invoice;
@@ -1 +1 @@
1
- {"version":3,"file":"Invoice.js","mappings":";;;;;;;AACA;;AAWM,MAAOA,OAAP,SAAuBC,kBAAvB,CAA+B;EACnCC,qBAAqB,CAACC,MAAD,EAAuCC,WAAvC,EAAgE;IACnF,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,EAAiDC,gCAClDH,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EADkB,GACf;MACvCD;IADuC,CADe,CAAjD,CAAP;EAID;;EAEDK,mBAAmB,CAACL,MAAD,EAAuCC,WAAvC,EAAgE;IACjF,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,EAAiDC,gCAClDH,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EADkB,GACf;MACvCD;IADuC,CADe,CAAjD,CAAP;EAID;;EAEDM,MAAM,CAACC,OAAD,EAA+B;IACnC,OAAO,KAAKL,KAAL,CAAWM,KAAX,CAAiB,iCAAjB,EAAoDD,OAApD,CAAP;EACD;;EAEDE,MAAM,CAACC,EAAD,EAAaH,OAAb,EAA2C;IAC/C,OAAO,KAAKL,KAAL,CAAWS,IAAX,CAAgB,mCAAmCD,EAAE,EAArD,EAAyDH,OAAzD,CAAP;EACD;;EAEDK,MAAM,CAACF,EAAD,EAAW;IACf,OAAO,KAAKR,KAAL,CAAWW,OAAX,CAAmB,oCAAoCH,EAAE,EAAzD,CAAP;EACD;;AAzBkC;;QAAxBb,O,GAAAA,O","names":["Invoice","Resource","getCashBasedPaginated","params","cancelToken","axios","$get","Object","getAccrualPaginated","create","payload","$post","update","id","$put","delete","$delete"],"sourceRoot":"","sources":["../../../ts/api/resources/Invoice.ts"],"sourcesContent":["import { CancelToken } from 'axios';\nimport { Resource } from '../Resource';\nimport {\n BasePaginate,\n CreateInvoiceDocument,\n IEstimateInvoice,\n QueryInvoice,\n QueryPaginate,\n ReadAccrualInvoice,\n ReadCashBasedInvoice,\n} from '../../types';\n\nexport class Invoice extends Resource {\n getCashBasedPaginated(params: QueryInvoice & QueryPaginate, cancelToken?: CancelToken): Promise<BasePaginate<ReadCashBasedInvoice>> {\n return this.axios.$get('/commercial-management/invoices', {\n ...(cancelToken ? { cancelToken } : {}),\n params,\n });\n }\n\n getAccrualPaginated(params: QueryInvoice & QueryPaginate, cancelToken?: CancelToken): Promise<BasePaginate<ReadAccrualInvoice>> {\n return this.axios.$get('/commercial-management/invoices', {\n ...(cancelToken ? { cancelToken } : {}),\n params,\n });\n }\n\n create(payload: CreateInvoiceDocument): Promise<IEstimateInvoice[]> {\n return this.axios.$post('/commercial-management/invoices', payload);\n }\n\n update(id: number, payload: CreateInvoiceDocument): Promise<IEstimateInvoice> {\n return this.axios.$put(`/commercial-management/invoices/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/commercial-management/documents/${id}`);\n }\n}"]}
1
+ {"version":3,"file":"Invoice.js","mappings":";;;;;;;AACA;;AAaM,MAAOA,OAAP,SAAuBC,kBAAvB,CAA+B;EACnCC,qBAAqB,CAACC,MAAD,EAAuCC,WAAvC,EAAgE;IACnF,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,EAAiDC,gCAClDH,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EADkB,GACf;MACvCD;IADuC,CADe,CAAjD,CAAP;EAID;;EAEDK,mBAAmB,CAACL,MAAD,EAAuCC,WAAvC,EAAgE;IACjF,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,EAAiDC,gCAClDH,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EADkB,GACf;MACvCD;IADuC,CADe,CAAjD,CAAP;EAID;;EAEDM,MAAM,CAACC,OAAD,EAA+B;IACnC,OAAO,KAAKL,KAAL,CAAWM,KAAX,CAAiB,iCAAjB,EAAoDD,OAApD,CAAP;EACD;;EAEDE,MAAM,CAACC,EAAD,EAAaH,OAAb,EAA2C;IAC/C,OAAO,KAAKL,KAAL,CAAWS,IAAX,CAAgB,mCAAmCD,EAAE,EAArD,EAAyDH,OAAzD,CAAP;EACD;;EAEDK,MAAM,CAACF,EAAD,EAAW;IACf,OAAO,KAAKR,KAAL,CAAWW,OAAX,CAAmB,oCAAoCH,EAAE,EAAzD,CAAP;EACD;;EAEDI,WAAW,CAACC,MAAD,EAAe;IACxB,OAAO,KAAKb,KAAL,CAAWC,IAAX,CAAgB,gCAAgCY,MAAM,QAAtD,CAAP;EACD;;EAEDC,QAAQ,CAACD,MAAD,EAAiBR,OAAjB,EAA8C;IACpD,OAAO,KAAKL,KAAL,CAAWM,KAAX,CAAiB,gCAAgCO,MAAM,QAAvD,EAAiER,OAAjE,CAAP;EACD;;AAjCkC;;QAAxBV,O,GAAAA,O","names":["Invoice","Resource","getCashBasedPaginated","params","cancelToken","axios","$get","Object","getAccrualPaginated","create","payload","$post","update","id","$put","delete","$delete","getAllMails","idFile","sendMail"],"sourceRoot":"","sources":["../../../ts/api/resources/Invoice.ts"],"sourcesContent":["import { CancelToken } from 'axios';\nimport { Resource } from '../Resource';\nimport {\n BasePaginate,\n CreateCommercialMail,\n CreateInvoiceDocument,\n ICommercialMail,\n IEstimateInvoice,\n QueryInvoice,\n QueryPaginate,\n ReadAccrualInvoice,\n ReadCashBasedInvoice,\n} from '../../types';\n\nexport class Invoice extends Resource {\n getCashBasedPaginated(params: QueryInvoice & QueryPaginate, cancelToken?: CancelToken): Promise<BasePaginate<ReadCashBasedInvoice>> {\n return this.axios.$get('/commercial-management/invoices', {\n ...(cancelToken ? { cancelToken } : {}),\n params,\n });\n }\n\n getAccrualPaginated(params: QueryInvoice & QueryPaginate, cancelToken?: CancelToken): Promise<BasePaginate<ReadAccrualInvoice>> {\n return this.axios.$get('/commercial-management/invoices', {\n ...(cancelToken ? { cancelToken } : {}),\n params,\n });\n }\n\n create(payload: CreateInvoiceDocument): Promise<IEstimateInvoice[]> {\n return this.axios.$post('/commercial-management/invoices', payload);\n }\n\n update(id: number, payload: CreateInvoiceDocument): Promise<IEstimateInvoice> {\n return this.axios.$put(`/commercial-management/invoices/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/commercial-management/documents/${id}`);\n }\n\n getAllMails(idFile: number): Promise<ICommercialMail[]> {\n return this.axios.$get(`/commercial-management/files/${idFile}/mails`);\n }\n\n sendMail(idFile: number, payload: CreateCommercialMail): Promise<ICommercialMail> {\n return this.axios.$post(`/commercial-management/files/${idFile}/mails`, payload);\n }\n}"]}
@@ -22,14 +22,6 @@ class CommercialDocument extends _Resource.Resource {
22
22
  return this.axios.$delete(`/commercial-management/documents/${id}`);
23
23
  }
24
24
 
25
- getAllMails(id) {
26
- return this.axios.$get(`/commercial-management/documents/${id}/mails`);
27
- }
28
-
29
- send(id, payload) {
30
- return this.axios.$post(`/commercial-management/documents/${id}/mails`, payload);
31
- }
32
-
33
25
  getNextReference(params) {
34
26
  return this.axios.$get('/commercial-management/documents/references', {
35
27
  params
@@ -1 +1 @@
1
- {"version":3,"file":"commercialDocument.js","mappings":";;;;;;;AAAA;;AACA;;AAgBM,MAAOA,kBAAP,SAAkCC,kBAAlC,CAA0C;EAC9CC,GAAG,CAACC,EAAD,EAAW;IACZ,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,oCAAoCF,EAAE,EAAtD,CAAP;EACD;;EAEDG,MAAM,CAACH,EAAD,EAAaI,OAAb,EAA8C;IAClD,OAAO,KAAKH,KAAL,CAAWI,KAAX,CAAiB,oCAAoCL,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H,KAAL,CAAWS,KAAX,CAAiB,iCAAiCV,EAAE,EAApD,EAAwDI,OAAxD,CAAP;EACD;;EAEDmB,OAAO,CAACP,qBAAD,EAA6CZ,OAA7C,EAAmG;IACxG,OAAO,KAAKH,KAAL,CAAWS,KAAX,CAAiB,iCAAjB,EAAkDK,gCAAOX,OAAP,GAAc;MAAEY;IAAF,CAAd,CAAlD,CAAP;EACD;;AA/C6C;;QAAnCnB,kB,GAAAA,kB","names":["CommercialDocument","Resource","get","id","axios","$get","update","payload","patch","delete","$delete","getAllMails","send","$post","getNextReference","params","getPaginated","createEstimate","Object","idEstimateInvoiceType","EstimateInvoiceType","DEVIS","createOrder","BON","updateEstimate","updateOrder","preview"],"sourceRoot":"","sources":["../../../ts/api/resources/commercialDocument.ts"],"sourcesContent":["import { Resource } from '../Resource';\nimport {\n BasePaginate,\n CreateCommercialMail,\n CreateInvoiceDocument,\n CreatePreSaleDocument,\n EstimateInvoiceType,\n IEstimateInvoice,\n IFile,\n QueryDocumentPaginated,\n QueryNextReference,\n QueryPaginate,\n ReadEstimateInvoice,\n UpdateCommercialDocument,\n} from '../../types';\nimport { ICommercialMail } from '../../types/Interface/models/ICommercialMail';\n\nexport class CommercialDocument extends Resource {\n get(id: number): Promise<ReadEstimateInvoice> {\n return this.axios.$get(`/commercial-management/documents/${id}`);\n }\n\n update(id: number, payload: UpdateCommercialDocument): Promise<IEstimateInvoice> {\n return this.axios.patch(`/commercial-management/documents/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/commercial-management/documents/${id}`);\n }\n\n getAllMails(id: number): Promise<ICommercialMail[]> {\n return this.axios.$get(`/commercial-management/documents/${id}/mails`);\n }\n\n send(id: number, payload: CreateCommercialMail): Promise<ICommercialMail> {\n return this.axios.$post(`/commercial-management/documents/${id}/mails`, payload);\n }\n\n getNextReference(params: QueryNextReference): Promise<string> {\n return this.axios.$get('/commercial-management/documents/references', { params });\n }\n\n getPaginated(params: QueryDocumentPaginated & QueryPaginate): Promise<BasePaginate<ReadEstimateInvoice>> {\n return this.axios.$get('/commercial-management/documents', { params });\n }\n\n createEstimate(payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>): Promise<IEstimateInvoice> {\n return this.axios.$post('/commercial-management/estimates', { ...payload, idEstimateInvoiceType: EstimateInvoiceType.DEVIS });\n }\n\n createOrder(payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>): Promise<IEstimateInvoice> {\n return this.axios.$post('/commercial-management/orders', { ...payload, idEstimateInvoiceType: EstimateInvoiceType.BON });\n }\n\n updateEstimate(id: number, payload: CreatePreSaleDocument): Promise<IEstimateInvoice> {\n return this.axios.$post(`/commercial-management/estimates/${id}`, payload);\n }\n\n updateOrder(id: number, payload: CreatePreSaleDocument): Promise<IEstimateInvoice> {\n return this.axios.$post(`/commercial-management/orders/${id}`, payload);\n }\n\n preview(idEstimateInvoiceType: EstimateInvoiceType, payload: CreatePreSaleDocument | CreateInvoiceDocument): Promise<IFile> {\n return this.axios.$post('/commercial-management/preview/', { ...payload, idEstimateInvoiceType });\n }\n}"]}
1
+ {"version":3,"file":"commercialDocument.js","mappings":";;;;;;;AAAA;;AACA;;AAcM,MAAOA,kBAAP,SAAkCC,kBAAlC,CAA0C;EAC9CC,GAAG,CAACC,EAAD,EAAW;IACZ,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,oCAAoCF,EAAE,EAAtD,CAAP;EACD;;EAEDG,MAAM,CAACH,EAAD,EAAaI,OAAb,EAA8C;IAClD,OAAO,KAAKH,KAAL,CAAWI,KAAX,CAAiB,oCAAoCL,EAAE,EAAvD,EAA2DI,OAA3D,CAAP;EACD;;EAEDE,MAAM,CAACN,EAAD,EAAW;IACf,OAAO,KAAKC,KAAL,CAAWM,OAAX,CAAmB,oCAAoCP,EAAE,EAAzD,CAAP;EACD;;EAEDQ,gBAAgB,CAACC,MAAD,EAA2B;IACzC,OAAO,KAAKR,KAAL,CAAWC,IAAX,CAAgB,6CAAhB,EAA+D;MAAEO;IAAF,CAA/D,CAAP;EACD;;EAEDC,YAAY,CAACD,MAAD,EAA+C;IACzD,OAAO,KAAKR,KAAL,CAAWC,IAAX,CAAgB,kCAAhB,EAAoD;MAAEO;IAAF,CAApD,CAAP;EACD;;EAEDE,cAAc,CAACP,OAAD,EAA8D;IAC1E,OAAO,KAAKH,KAAL,CAAWW,KAAX,CAAiB,kCAAjB,EAAmDC,gCAAOT,OAAP,GAAc;MAAEU,qBAAqB,EAAEC,2BAAoBC;IAA7C,CAAd,CAAnD,CAAP;EACD;;EAEDC,WAAW,CAACb,OAAD,EAA8D;IACvE,OAAO,KAAKH,KAAL,CAAWW,KAAX,CAAiB,+BAAjB,EAAgDC,gCAAOT,OAAP,GAAc;MAAEU,qBAAqB,EAAEC,2BAAoBG;IAA7C,CAAd,CAAhD,CAAP;EACD;;EAEDC,cAAc,CAACnB,EAAD,EAAaI,OAAb,EAA2C;IACvD,OAAO,KAAKH,KAAL,CAAWW,KAAX,CAAiB,oCAAoCZ,EAAE,EAAvD,EAA2DI,OAA3D,CAAP;EACD;;EAEDgB,WAAW,CAACpB,EAAD,EAAaI,OAAb,EAA2C;IACpD,OAAO,KAAKH,KAAL,CAAWW,KAAX,CAAiB,iCAAiCZ,EAAE,EAApD,EAAwDI,OAAxD,CAAP;EACD;;EAEDiB,OAAO,CAACP,qBAAD,EAA6CV,OAA7C,EAAmG;IACxG,OAAO,KAAKH,KAAL,CAAWW,KAAX,CAAiB,iCAAjB,EAAkDC,gCAAOT,OAAP,GAAc;MAAEU;IAAF,CAAd,CAAlD,CAAP;EACD;;AAvC6C;;QAAnCjB,kB,GAAAA,kB","names":["CommercialDocument","Resource","get","id","axios","$get","update","payload","patch","delete","$delete","getNextReference","params","getPaginated","createEstimate","$post","Object","idEstimateInvoiceType","EstimateInvoiceType","DEVIS","createOrder","BON","updateEstimate","updateOrder","preview"],"sourceRoot":"","sources":["../../../ts/api/resources/commercialDocument.ts"],"sourcesContent":["import { Resource } from '../Resource';\nimport {\n BasePaginate,\n CreateInvoiceDocument,\n CreatePreSaleDocument,\n EstimateInvoiceType,\n IEstimateInvoice,\n IFile,\n QueryDocumentPaginated,\n QueryNextReference,\n QueryPaginate,\n ReadEstimateInvoice,\n UpdateCommercialDocument,\n} from '../../types';\n\nexport class CommercialDocument extends Resource {\n get(id: number): Promise<ReadEstimateInvoice> {\n return this.axios.$get(`/commercial-management/documents/${id}`);\n }\n\n update(id: number, payload: UpdateCommercialDocument): Promise<IEstimateInvoice> {\n return this.axios.patch(`/commercial-management/documents/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/commercial-management/documents/${id}`);\n }\n\n getNextReference(params: QueryNextReference): Promise<string> {\n return this.axios.$get('/commercial-management/documents/references', { params });\n }\n\n getPaginated(params: QueryDocumentPaginated & QueryPaginate): Promise<BasePaginate<ReadEstimateInvoice>> {\n return this.axios.$get('/commercial-management/documents', { params });\n }\n\n createEstimate(payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>): Promise<IEstimateInvoice> {\n return this.axios.$post('/commercial-management/estimates', { ...payload, idEstimateInvoiceType: EstimateInvoiceType.DEVIS });\n }\n\n createOrder(payload: Omit<CreatePreSaleDocument, 'idEstimateInvoiceType'>): Promise<IEstimateInvoice> {\n return this.axios.$post('/commercial-management/orders', { ...payload, idEstimateInvoiceType: EstimateInvoiceType.BON });\n }\n\n updateEstimate(id: number, payload: CreatePreSaleDocument): Promise<IEstimateInvoice> {\n return this.axios.$post(`/commercial-management/estimates/${id}`, payload);\n }\n\n updateOrder(id: number, payload: CreatePreSaleDocument): Promise<IEstimateInvoice> {\n return this.axios.$post(`/commercial-management/orders/${id}`, payload);\n }\n\n preview(idEstimateInvoiceType: EstimateInvoiceType, payload: CreatePreSaleDocument | CreateInvoiceDocument): Promise<IFile> {\n return this.axios.$post('/commercial-management/preview/', { ...payload, idEstimateInvoiceType });\n }\n}"]}
@@ -64,4 +64,27 @@ var DiscountType = exports.DiscountType = undefined;
64
64
  DiscountType[DiscountType["PERCENT"] = 1] = "PERCENT";
65
65
  DiscountType[DiscountType["AMOUNT"] = 2] = "AMOUNT";
66
66
  })(DiscountType || (exports.DiscountType = DiscountType = {}));
67
+
68
+ var VatMarginCategoryId = exports.VatMarginCategoryId = undefined;
69
+
70
+ (function (VatMarginCategoryId) {
71
+ VatMarginCategoryId[VatMarginCategoryId["TRAVEL"] = 2] = "TRAVEL";
72
+ VatMarginCategoryId[VatMarginCategoryId["SECOND_HAND"] = 3] = "SECOND_HAND";
73
+ VatMarginCategoryId[VatMarginCategoryId["ART"] = 4] = "ART";
74
+ VatMarginCategoryId[VatMarginCategoryId["ANTIQUITY"] = 5] = "ANTIQUITY";
75
+ })(VatMarginCategoryId || (exports.VatMarginCategoryId = VatMarginCategoryId = {}));
76
+
77
+ const VatMarginCategyList = exports.VatMarginCategyList = [{
78
+ label: 'Agences de voyage',
79
+ id: VatMarginCategoryId.TRAVEL
80
+ }, {
81
+ label: 'Bien d\'occasion',
82
+ id: VatMarginCategoryId.SECOND_HAND
83
+ }, {
84
+ label: 'Objet d\'art',
85
+ id: VatMarginCategoryId.ART
86
+ }, {
87
+ label: 'Objet de collection et d\'antiquité',
88
+ id: VatMarginCategoryId.ANTIQUITY
89
+ }];
67
90
  //# sourceMappingURL=CommercialManagement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommercialManagement.js","mappings":";;;;;AAAA,IAAYA,OAMX,WANWA,OAMX,YAND;;AAAA,WAAYA,OAAZ,EAAmB;EACjBA;EACAA;EACAA;EACAA;EACAA;AACD,CAND,EAAYA,OAAO,aAAPA,OAAO,GAAPA,OAAO,MAAnB;;AAQO,MAAMC,QAAQ,WAARA,QAAQ,GAAG,CACtB;EAAEC,EAAE,EAAEF,OAAO,CAACG,YAAd;EAA4BC,IAAI,EAAE,4CAAlC;EAAgFC,IAAI,EAAE;AAAtF,CADsB,EAEtB;EAAEH,EAAE,EAAEF,OAAO,CAACM,MAAd;EAAsBF,IAAI,EAAE,uCAA5B;EAAqEC,IAAI,EAAE;AAA3E,CAFsB,EAGtB;EAAEH,EAAE,EAAEF,OAAO,CAACO,OAAd;EAAuBH,IAAI,EAAE,wCAA7B;EAAuEC,IAAI,EAAE;AAA7E,CAHsB,EAItB;EAAEH,EAAE,EAAEF,OAAO,CAACQ,OAAd;EAAuBJ,IAAI,EAAE,0CAA7B;EAAyEC,IAAI,EAAE;AAA/E,CAJsB,EAKtB;EAAEH,EAAE,EAAEF,OAAO,CAACS,KAAd;EAAqBL,IAAI,EAAE,0CAA3B;EAAuEC,IAAI,EAAE;AAA7E,CALsB,CAAjB;AAQP,IAAYK,aAGX,WAHWA,aAGX,YAHD;;AAAA,WAAYA,aAAZ,EAAyB;EACvBA;EACAA;AACD,CAHD,EAAYA,aAAa,aAAbA,aAAa,GAAbA,aAAa,MAAzB;;AAKA,IAAYC,aAKX,WALWA,aAKX,YALD;;AAAA,WAAYA,aAAZ,EAAyB;EACvBA;EACAA;EACAA;EACAA;AACD,CALD,EAAYA,aAAa,aAAbA,aAAa,GAAbA,aAAa,MAAzB;;AAOA,IAAYC,cAIX,WAJWA,cAIX,YAJD;;AAAA,WAAYA,cAAZ,EAA0B;EACxBA;EACAA;EACAA;AACD,CAJD,EAAYA,cAAc,aAAdA,cAAc,GAAdA,cAAc,MAA1B;;AAMA,IAAYC,YAGX,WAHWA,YAGX,YAHD;;AAAA,WAAYA,YAAZ,EAAwB;EACtBA;EACAA;AACD,CAHD,EAAYA,YAAY,aAAZA,YAAY,GAAZA,YAAY,MAAxB","names":["FontIds","fontList","id","CIRCULAR_STD","link","name","ROBOTO","POPPINS","RALEWAY","ZILLA","LogoAlignment","InvoiceStatus","EstimateStatus","DiscountType"],"sourceRoot":"","sources":["../../../ts/types/Enum/CommercialManagement.ts"],"sourcesContent":["export 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: 'http://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: 'http://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 BILLED = 'billed',\n ACCEPTED = 'accepted',\n WAITING = 'waiting',\n}\n\nexport enum DiscountType {\n PERCENT = 1,\n AMOUNT = 2,\n}"]}
1
+ {"version":3,"file":"CommercialManagement.js","mappings":";;;;;AAAA,IAAYA,OAMX,WANWA,OAMX,YAND;;AAAA,WAAYA,OAAZ,EAAmB;EACjBA;EACAA;EACAA;EACAA;EACAA;AACD,CAND,EAAYA,OAAO,aAAPA,OAAO,GAAPA,OAAO,MAAnB;;AAQO,MAAMC,QAAQ,WAARA,QAAQ,GAAG,CACtB;EAAEC,EAAE,EAAEF,OAAO,CAACG,YAAd;EAA4BC,IAAI,EAAE,4CAAlC;EAAgFC,IAAI,EAAE;AAAtF,CADsB,EAEtB;EAAEH,EAAE,EAAEF,OAAO,CAACM,MAAd;EAAsBF,IAAI,EAAE,uCAA5B;EAAqEC,IAAI,EAAE;AAA3E,CAFsB,EAGtB;EAAEH,EAAE,EAAEF,OAAO,CAACO,OAAd;EAAuBH,IAAI,EAAE,wCAA7B;EAAuEC,IAAI,EAAE;AAA7E,CAHsB,EAItB;EAAEH,EAAE,EAAEF,OAAO,CAACQ,OAAd;EAAuBJ,IAAI,EAAE,0CAA7B;EAAyEC,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F,CAA/E","names":["FontIds","fontList","id","CIRCULAR_STD","link","name","ROBOTO","POPPINS","RALEWAY","ZILLA","LogoAlignment","InvoiceStatus","EstimateStatus","DiscountType","VatMarginCategoryId","VatMarginCategyList","label","TRAVEL","SECOND_HAND","ART","ANTIQUITY"],"sourceRoot":"","sources":["../../../ts/types/Enum/CommercialManagement.ts"],"sourcesContent":["export 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: 'http://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: 'http://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 BILLED = 'billed',\n ACCEPTED = 'accepted',\n WAITING = 'waiting',\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];"]}
@@ -100,7 +100,7 @@ const Vat = exports.Vat = {
100
100
  roundPercentage: [],
101
101
  isVatImportation: false,
102
102
  isVatIntracom: false,
103
- saleName: ''
103
+ saleName: 'Sur marge'
104
104
  },
105
105
  INTRACOM_TX_20: {
106
106
  id: 9,
@@ -1 +1 @@
1
- {"version":3,"file":"Vat.js","mappings":";;;;;AAmBO,MAAMA,GAAG,WAAHA,GAAG,GAAe;EAC7BC,YAAY,EAAE;IACZC,EAAE,EAAE,CADQ;IAEZC,KAAK,EAAE,CAFK;IAGZC,KAAK,EAAE,CAHK;IAIZC,YAAY,EAAE,CAJF;IAKZC,IAAI,EAAE,WALM;IAMZC,SAAS,EAAE,GANC;IAOZC,UAAU,EAAE,GAPA;IAQZC,cAAc,EAAE,EARJ;IASZC,eAAe,EAAE,CAAC,CAAD,CATL;IAUZC,gBAAgB,EAAE,KAVN;IAWZC,aAAa,EAAE,KAXH;IAYZC,QAAQ,EAAE;EAZE,CADe;EAe7BC,MAAM,EAAE;IACNZ,EAAE,EAAE,CADE;IAENC,KAAK,EAAE,CAFD;IAGNC,KAAK,EAAE,GAHD;IAINC,YAAY,EAAE,CAJR;IAKNC,IAAI,EAAE,UALA;IAMNC,SAAS,EAAE,GANL;IAONC,UAAU,EAAE,CAPN;IAQNC,cAAc,EAAE,EARV;IASNC,eAAe,EAAE,CAAC,CAAD,EAAI,CAAJ,CATX;IAUNC,gBAAgB,EAAE,KAVZ;IAWNC,aAAa,EAAE,KAXT;IAYNC,QAAQ,EAAE;EAZJ,CAfqB;EA6B7BE,KAAK,EAAE;IACLb,EAAE,EAAE,CADC;IAELC,KAAK,EAAE,CAFF;IAGLC,KAAK,EAAE,EAHF;IAILC,YAAY,EAAE,CAJT;IAKLC,IAAI,EAAE,SALD;IAMLC,SAAS,EAAE,GANN;IAOLC,UAAU,EAAE,CAPP;IAQLC,cAAc,EAAE,EARX;IASLC,eAAe,EAAE,C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B,EAAE;IAClB5B,EAAE,EAAE,EADc;IAElBC,KAAK,EAAE,EAFW;IAGlBC,KAAK,EAAE,GAHW;IAIlBC,YAAY,EAAE,CAJI;IAKlBC,IAAI,EAAE,sBALY;IAMlBC,SAAS,EAAE,GANO;IAOlBC,UAAU,EAAE,GAPM;IAQlBC,cAAc,EAAE,GARE;IASlBC,eAAe,EAAE,EATC;IAUlBC,gBAAgB,EAAE,IAVA;IAWlBC,aAAa,EAAE,KAXG;IAYlBC,QAAQ,EAAE;EAZQ,CA/OS;EA6P7BkB,kBAAkB,EAAE;IAClB7B,EAAE,EAAE,EADc;IAElBC,KAAK,EAAE,EAFW;IAGlBC,KAAK,EAAE,GAHW;IAIlBC,YAAY,EAAE,CAJI;IAKlBC,IAAI,EAAE,sBALY;IAMlBC,SAAS,EAAE,GANO;IAOlBC,UAAU,EAAE,GAPM;IAQlBC,cAAc,EAAE,GARE;IASlBC,eAAe,EAAE,EATC;IAUlBC,gBAAgB,EAAE,IAVA;IAWlBC,aAAa,EAAE,KAXG;IAYlBC,QAAQ,EAAE;EAZQ,CA7PS;EA2Q7BmB,MAAM,EAAE;IACN9B,EAAE,EAAE,EADE;IAENC,KAAK,EAAE,EAFD;IAGNC,KAAK,EAAE,CAHD;IAINC,YAAY,EAAE,CAJR;IAKNC,IAAI,EAAE,cALA;IAMNC,SAAS,EAAE,CANL;IAONC,UAAU,EAAE,CAPN;IAQNC,cAAc,EAAE,IARV;IASNC,eAAe,EAAE,EATX;IAUNC,gBAAgB,EAAE,KAVZ;IAWNC,aAAa,EAAE,KAXT;IAYNC,QAAQ,EAAE;EAZJ;AA3QqB,CAAxB","names":["Vat","WITHOUT_TAXE","id","idTva","value","displayOrder","name","collected","deductible","immobilization","roundPercentage","isVatImportation","isVatIntracom","saleName","TX_5_5","TX_10","TX_20","TX_2_1","TX_8_5","MARGE","INTRACOM_TX_20","INTRACOM_WITHOUT_TAXE","INTRACOM_TX_5_5","INTRACOM_TX_10","INTRACOM_TX_2_1","INTRACOM_TX_8_5","IMPORTATION_WITHOUT_TAXE","IMPORTATION_TX_5_5","IMPORTATION_TX_10","IMPORTATION_TX_20","IMPORTATION_TX_2_1","IMPORTATION_TX_8_5","MANUAL"],"sourceRoot":"","sources":["../../../ts/types/Enum/Vat.ts"],"sourcesContent":["export interface VatType{\n id: number;\n idTva: number;\n value: number;\n displayOrder: number;\n name: string;\n collected: number;\n deductible: number;\n immobilization: number | null;\n roundPercentage: number[];\n isVatImportation: boolean;\n isVatIntracom: boolean;\n saleName: string; // Used for commercial documents\n}\n\nexport interface VatTypeEnum {\n [key: string]: VatType\n}\n\nexport const Vat:VatTypeEnum = {\n WITHOUT_TAXE: {\n id: 1,\n idTva: 1,\n value: 0,\n displayOrder: 6,\n name: 'Hors-Taxe',\n collected: 212,\n deductible: 221,\n immobilization: 19,\n roundPercentage: [0],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: 'Hors-Taxe',\n },\n TX_5_5: {\n id: 2,\n idTva: 2,\n value: 5.5,\n displayOrder: 4,\n name: 'TVA 5.5%',\n collected: 209,\n deductible: 4,\n immobilization: 10,\n roundPercentage: [5, 6],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '5.5%',\n },\n TX_10: {\n id: 3,\n idTva: 3,\n value: 10,\n displayOrder: 2,\n name: 'TVA 10%',\n collected: 210,\n deductible: 5,\n immobilization: 11,\n roundPercentage: [10, 11],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '10%',\n },\n TX_20: {\n id: 4,\n idTva: 4,\n value: 20,\n displayOrder: 1,\n name: 'TVA 20%',\n collected: 211,\n deductible: 6,\n immobilization: 12,\n roundPercentage: [19, 20, 21],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '20%',\n },\n TX_2_1: {\n id: 6,\n idTva: 6,\n value: 2.1,\n displayOrder: 5,\n name: 'TVA 2.1%',\n collected: 222,\n deductible: 7,\n immobilization: 13,\n roundPercentage: [2, 3],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '2.1%',\n },\n TX_8_5: {\n id: 7,\n idTva: 7,\n value: 8.5,\n displayOrder: 3,\n name: 'TVA 8.5%',\n collected: 345,\n deductible: 8,\n immobilization: 15,\n roundPercentage: [8, 9],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '8.5%',\n },\n MARGE: {\n id: 8,\n idTva: 8,\n value: 0,\n displayOrder: 9,\n name: 'Sur Marge',\n collected: 211,\n deductible: 9,\n immobilization: null,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '',\n },\n INTRACOM_TX_20: {\n id: 9,\n idTva: 9,\n value: 20,\n displayOrder: 7,\n name: 'TVA Intracom 20%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '20%',\n },\n INTRACOM_WITHOUT_TAXE: {\n id: 17,\n idTva: 17,\n value: 0,\n displayOrder: 7,\n name: 'TVA Intracom Hors-Taxe',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: 'Hors-Taxe',\n },\n INTRACOM_TX_5_5: {\n id: 18,\n idTva: 18,\n value: 5.5,\n displayOrder: 7,\n name: 'TVA Intracom 5.5%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '5.5%',\n },\n INTRACOM_TX_10: {\n id: 19,\n idTva: 19,\n value: 10,\n displayOrder: 7,\n name: 'TVA Intracom 10%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '10%',\n },\n INTRACOM_TX_2_1: {\n id: 20,\n idTva: 20,\n value: 2.1,\n displayOrder: 7,\n name: 'TVA Intracom 2.1%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '2.1%',\n },\n INTRACOM_TX_8_5: {\n id: 21,\n idTva: 21,\n value: 8.5,\n displayOrder: 7,\n name: 'TVA Intracom 8.5%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '8.5%',\n },\n IMPORTATION_WITHOUT_TAXE: {\n id: 10,\n idTva: 10,\n value: 0,\n displayOrder: 8,\n name: 'TVA Importation Hors-Taxe',\n collected: 572,\n deductible: 573,\n immobilization: 573,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: 'Hors-Taxe',\n },\n IMPORTATION_TX_5_5: {\n id: 12,\n idTva: 12,\n value: 5.5,\n displayOrder: 8,\n name: 'TVA Importation 5.5%',\n collected: 574,\n deductible: 575,\n immobilization: 575,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '5.5%',\n },\n IMPORTATION_TX_10: {\n id: 13,\n idTva: 13,\n value: 10,\n displayOrder: 8,\n name: 'TVA Importation 10%',\n collected: 576,\n deductible: 577,\n immobilization: 577,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '10%',\n },\n IMPORTATION_TX_20: {\n id: 14,\n idTva: 14,\n value: 20,\n displayOrder: 8,\n name: 'TVA Importation 20%',\n collected: 578,\n deductible: 579,\n immobilization: 579,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '20%',\n },\n IMPORTATION_TX_2_1: {\n id: 15,\n idTva: 15,\n value: 2.1,\n displayOrder: 8,\n name: 'TVA Importation 2.1%',\n collected: 580,\n deductible: 581,\n immobilization: 581,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '2.1%',\n },\n IMPORTATION_TX_8_5: {\n id: 16,\n idTva: 16,\n value: 8.5,\n displayOrder: 8,\n name: 'TVA Importation 8.5%',\n collected: 582,\n deductible: 583,\n immobilization: 583,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '8.5%',\n },\n MANUAL: {\n id: 11,\n idTva: 11,\n value: 0,\n displayOrder: 8,\n name: 'TVA manuelle',\n collected: 0,\n deductible: 0,\n immobilization: null,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '',\n },\n};"]}
1
+ {"version":3,"file":"Vat.js","mappings":";;;;;AAmBO,MAAMA,GAAG,WAAHA,GAAG,GAAe;EAC7BC,YAAY,EAAE;IACZC,EAAE,EAAE,CADQ;IAEZC,KAAK,EAAE,CAFK;IAGZC,KAAK,EAAE,CAHK;IAIZC,YAAY,EAAE,CAJF;IAKZC,IAAI,EAAE,WALM;IAMZC,SAAS,EAAE,GANC;IAOZC,UAAU,EAAE,GAPA;IAQZC,cAAc,EAAE,EARJ;IASZC,eAAe,EAAE,CAAC,CAAD,CATL;IAUZC,gBAAgB,EAAE,KAVN;IAWZC,aAAa,EAAE,KAXH;IAYZC,QAAQ,EAAE;EAZE,CADe;EAe7BC,MAAM,EAAE;IACNZ,EAAE,EAAE,CADE;IAENC,KAAK,EAAE,CAFD;IAGNC,KAAK,EAAE,GAHD;IAINC,YAAY,EAAE,CAJR;IAKNC,IAAI,EAAE,UALA;IAMNC,SAAS,EAAE,GANL;IAONC,UAAU,EAAE,CAPN;IAQNC,cAAc,EAAE,EARV;IASNC,eAAe,EAAE,CAAC,CAAD,EAAI,CAAJ,CATX;IAUNC,gBAAgB,EAAE,KAVZ;IAWNC,aAAa,EAAE,KAXT;IAYNC,QAAQ,EAAE;EAZJ,CAfqB;EA6B7BE,KAAK,EAAE;IACLb,EAAE,EAAE,CADC;IAELC,KAAK,EAAE,CAFF;IAGLC,KAAK,EAAE,EAHF;IAILC,YAAY,EAAE,CAJT;IAKLC,IAAI,EAAE,SALD;IAMLC,SAAS,EAAE,GANN;IAOLC,UAAU,EAAE,CAPP;IAQLC,cAAc,EAAE,EARX;IASLC,eAAe,EAAE,CAAC,EAAD,EAAK,EAAL,CATZ;IAULC,gBAAgB,EAAE,KAVb;IAWLC,aAAa,EAAE,KAX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,GAHW;IAIlBC,YAAY,EAAE,CAJI;IAKlBC,IAAI,EAAE,sBALY;IAMlBC,SAAS,EAAE,GANO;IAOlBC,UAAU,EAAE,GAPM;IAQlBC,cAAc,EAAE,GARE;IASlBC,eAAe,EAAE,EATC;IAUlBC,gBAAgB,EAAE,IAVA;IAWlBC,aAAa,EAAE,KAXG;IAYlBC,QAAQ,EAAE;EAZQ,CA/OS;EA6P7BkB,kBAAkB,EAAE;IAClB7B,EAAE,EAAE,EADc;IAElBC,KAAK,EAAE,EAFW;IAGlBC,KAAK,EAAE,GAHW;IAIlBC,YAAY,EAAE,CAJI;IAKlBC,IAAI,EAAE,sBALY;IAMlBC,SAAS,EAAE,GANO;IAOlBC,UAAU,EAAE,GAPM;IAQlBC,cAAc,EAAE,GARE;IASlBC,eAAe,EAAE,EATC;IAUlBC,gBAAgB,EAAE,IAVA;IAWlBC,aAAa,EAAE,KAXG;IAYlBC,QAAQ,EAAE;EAZQ,CA7PS;EA2Q7BmB,MAAM,EAAE;IACN9B,EAAE,EAAE,EADE;IAENC,KAAK,EAAE,EAFD;IAGNC,KAAK,EAAE,CAHD;IAINC,YAAY,EAAE,CAJR;IAKNC,IAAI,EAAE,cALA;IAMNC,SAAS,EAAE,CANL;IAONC,UAAU,EAAE,CAPN;IAQNC,cAAc,EAAE,IARV;IASNC,eAAe,EAAE,EATX;IAUNC,gBAAgB,EAAE,KAVZ;IAWNC,aAAa,EAAE,KAXT;IAYNC,QAAQ,EAAE;EAZJ;AA3QqB,CAAxB","names":["Vat","WITHOUT_TAXE","id","idTva","value","displayOrder","name","collected","deductible","immobilization","roundPercentage","isVatImportation","isVatIntracom","saleName","TX_5_5","TX_10","TX_20","TX_2_1","TX_8_5","MARGE","INTRACOM_TX_20","INTRACOM_WITHOUT_TAXE","INTRACOM_TX_5_5","INTRACOM_TX_10","INTRACOM_TX_2_1","INTRACOM_TX_8_5","IMPORTATION_WITHOUT_TAXE","IMPORTATION_TX_5_5","IMPORTATION_TX_10","IMPORTATION_TX_20","IMPORTATION_TX_2_1","IMPORTATION_TX_8_5","MANUAL"],"sourceRoot":"","sources":["../../../ts/types/Enum/Vat.ts"],"sourcesContent":["export interface VatType{\n id: number;\n idTva: number;\n value: number;\n displayOrder: number;\n name: string;\n collected: number;\n deductible: number;\n immobilization: number | null;\n roundPercentage: number[];\n isVatImportation: boolean;\n isVatIntracom: boolean;\n saleName: string; // Used for commercial documents\n}\n\nexport interface VatTypeEnum {\n [key: string]: VatType\n}\n\nexport const Vat:VatTypeEnum = {\n WITHOUT_TAXE: {\n id: 1,\n idTva: 1,\n value: 0,\n displayOrder: 6,\n name: 'Hors-Taxe',\n collected: 212,\n deductible: 221,\n immobilization: 19,\n roundPercentage: [0],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: 'Hors-Taxe',\n },\n TX_5_5: {\n id: 2,\n idTva: 2,\n value: 5.5,\n displayOrder: 4,\n name: 'TVA 5.5%',\n collected: 209,\n deductible: 4,\n immobilization: 10,\n roundPercentage: [5, 6],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '5.5%',\n },\n TX_10: {\n id: 3,\n idTva: 3,\n value: 10,\n displayOrder: 2,\n name: 'TVA 10%',\n collected: 210,\n deductible: 5,\n immobilization: 11,\n roundPercentage: [10, 11],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '10%',\n },\n TX_20: {\n id: 4,\n idTva: 4,\n value: 20,\n displayOrder: 1,\n name: 'TVA 20%',\n collected: 211,\n deductible: 6,\n immobilization: 12,\n roundPercentage: [19, 20, 21],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '20%',\n },\n TX_2_1: {\n id: 6,\n idTva: 6,\n value: 2.1,\n displayOrder: 5,\n name: 'TVA 2.1%',\n collected: 222,\n deductible: 7,\n immobilization: 13,\n roundPercentage: [2, 3],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '2.1%',\n },\n TX_8_5: {\n id: 7,\n idTva: 7,\n value: 8.5,\n displayOrder: 3,\n name: 'TVA 8.5%',\n collected: 345,\n deductible: 8,\n immobilization: 15,\n roundPercentage: [8, 9],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '8.5%',\n },\n MARGE: {\n id: 8,\n idTva: 8,\n value: 0,\n displayOrder: 9,\n name: 'Sur Marge',\n collected: 211,\n deductible: 9,\n immobilization: null,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: 'Sur marge',\n },\n INTRACOM_TX_20: {\n id: 9,\n idTva: 9,\n value: 20,\n displayOrder: 7,\n name: 'TVA Intracom 20%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '20%',\n },\n INTRACOM_WITHOUT_TAXE: {\n id: 17,\n idTva: 17,\n value: 0,\n displayOrder: 7,\n name: 'TVA Intracom Hors-Taxe',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: 'Hors-Taxe',\n },\n INTRACOM_TX_5_5: {\n id: 18,\n idTva: 18,\n value: 5.5,\n displayOrder: 7,\n name: 'TVA Intracom 5.5%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '5.5%',\n },\n INTRACOM_TX_10: {\n id: 19,\n idTva: 19,\n value: 10,\n displayOrder: 7,\n name: 'TVA Intracom 10%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '10%',\n },\n INTRACOM_TX_2_1: {\n id: 20,\n idTva: 20,\n value: 2.1,\n displayOrder: 7,\n name: 'TVA Intracom 2.1%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '2.1%',\n },\n INTRACOM_TX_8_5: {\n id: 21,\n idTva: 21,\n value: 8.5,\n displayOrder: 7,\n name: 'TVA Intracom 8.5%',\n collected: 207,\n deductible: 208,\n immobilization: 208,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: true,\n saleName: '8.5%',\n },\n IMPORTATION_WITHOUT_TAXE: {\n id: 10,\n idTva: 10,\n value: 0,\n displayOrder: 8,\n name: 'TVA Importation Hors-Taxe',\n collected: 572,\n deductible: 573,\n immobilization: 573,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: 'Hors-Taxe',\n },\n IMPORTATION_TX_5_5: {\n id: 12,\n idTva: 12,\n value: 5.5,\n displayOrder: 8,\n name: 'TVA Importation 5.5%',\n collected: 574,\n deductible: 575,\n immobilization: 575,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '5.5%',\n },\n IMPORTATION_TX_10: {\n id: 13,\n idTva: 13,\n value: 10,\n displayOrder: 8,\n name: 'TVA Importation 10%',\n collected: 576,\n deductible: 577,\n immobilization: 577,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '10%',\n },\n IMPORTATION_TX_20: {\n id: 14,\n idTva: 14,\n value: 20,\n displayOrder: 8,\n name: 'TVA Importation 20%',\n collected: 578,\n deductible: 579,\n immobilization: 579,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '20%',\n },\n IMPORTATION_TX_2_1: {\n id: 15,\n idTva: 15,\n value: 2.1,\n displayOrder: 8,\n name: 'TVA Importation 2.1%',\n collected: 580,\n deductible: 581,\n immobilization: 581,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '2.1%',\n },\n IMPORTATION_TX_8_5: {\n id: 16,\n idTva: 16,\n value: 8.5,\n displayOrder: 8,\n name: 'TVA Importation 8.5%',\n collected: 582,\n deductible: 583,\n immobilization: 583,\n roundPercentage: [],\n isVatImportation: true,\n isVatIntracom: false,\n saleName: '8.5%',\n },\n MANUAL: {\n id: 11,\n idTva: 11,\n value: 0,\n displayOrder: 8,\n name: 'TVA manuelle',\n collected: 0,\n deductible: 0,\n immobilization: null,\n roundPercentage: [],\n isVatImportation: false,\n isVatIntracom: false,\n saleName: '',\n },\n};"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Create.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;;;;;;;;;;;;;AAOM,MAAOA,uBAAP,CAA8B;;QAAvBA,uB,GAAAA,uB;;AAOXC,YANC,iCAMD,EALC,iCAKD,EAJC,+BAID,EAHC,yBAAI,CAAJ,EAAO;EACNC,OAAO,EAAE;AADH,CAAP,CAGD;;AAKAD,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iC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CAGD,EAFC,+BAED,EADC,iCACD;;AAIAJ,YAFC,iCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAGAA,YADC,yBACD;;AAGI,MAAOM,qBAAP,SAAqCH,wBAArC,CAA6D;;QAAtDG,qB,GAAAA,qB;;AAKP,MAAOC,qBAAP,SAAqCJ,wBAArC,CAA6D;;QAAtDI,qB,GAAAA,qB;;AAMP,MAAOC,SAAP,CAAgB;;QAATA,S,GAAAA,S;;AAEXR,YADC,yBACD;;AAGI,MAAOS,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAIXT,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD","names":["CreateCommercialSetting","__decorate","message","CreateCommercialMail","CommercialDocumentInputs","description","Array","CreatePreSaleDocument","CreateInvoiceDocument","CreateCgv","CreateReminder"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { FontIds, LogoAlignment } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { IProductInvoice } from '../../models/IProductInvoice';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { IThirdParty } from '../../models/IThirdParty';\n\nexport type IProductInvoiceToCreate = IProductInvoice & { save?: boolean };\n\nexport class CreateCommercialSetting {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n @Min(0, {\n message: 'Capital should be positive',\n })\n capital?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n tvaCode?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n rcs?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n numberTradeDirectory?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bank?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n iban?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bic?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n mailContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n phoneContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n website?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commercialName?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n penalties?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n discount?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n recoveryCost?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n generatedBy?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n acceptCheque?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n mentionAutoent?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startInvoice?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startEstimate?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n paymentsAccepted?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n stripePaymentByDefault?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n displayLogo?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n invoiceCgv?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n color?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeInvoiceText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeEstimateText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoAlignment?: LogoAlignment | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idFont?: FontIds | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isEdgingDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n edgingColor?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCoordinatesFrameDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areLinesSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areColumnsSeparationHidden?: boolean;\n}\n\nexport class CreateCommercialMail {\n @ApiProperty()\n @IsString()\n to: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cc?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bcc?: string;\n\n @ApiProperty()\n @IsString()\n subject: string;\n\n @ApiProperty()\n @IsString()\n content: string;\n}\n\nexport class CommercialDocumentInputs {\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n legalForm?: string;\n\n @ApiPropertyOptional()\n @IsNumber()\n @IsOptional()\n capital?: number;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n siren?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n rcs?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n vatCode?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n nafCode?: string;\n\n @ApiProperty()\n @IsString()\n reference: string; //\n\n @ApiProperty()\n thirdParty: IThirdParty; //\n\n @ApiProperty()\n @IsDateString()\n emissionDate: string; //\n\n @ApiProperty()\n @IsDateString()\n dueDate: string; //\n\n @ApiPropertyOptional({ description: 'Date d\\'expiration pour la facture d\\'acompte' })\n @IsDateString()\n @IsOptional()\n expirationDate: string;\n\n @ApiProperty({ description: 'Conditions de réglement' })\n @IsString()\n termsOfPayment: string;\n\n @ApiProperty()\n @IsArray()\n products: Array<IProductInvoiceToCreate>;\n\n @ApiProperty({ description: 'Escompte' })\n @IsString()\n discount: string; //\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string; //\n\n @ApiPropertyOptional({ description: 'Pénalité de retard' })\n @IsOptional()\n @IsString()\n penalties?: string; //\n\n @ApiProperty({ description: 'Remise globale' })\n @IsOptional()\n @IsNumber()\n generalDiscount2: number; //\n\n @ApiPropertyOptional({ description: 'Indemnité forfaitaire' })\n @IsOptional()\n @IsString()\n compensation?: string; //\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string; //\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n disableVat: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n title?: string; //\n\n @ApiPropertyOptional({ description: 'Commercial name of seller' })\n @IsString()\n @IsOptional()\n name: string;\n\n @ApiPropertyOptional({ description: 'Commercial number address of seller' })\n @IsString()\n @IsOptional()\n number?: string;\n\n @ApiPropertyOptional({ description: 'Commercial street address of seller' })\n @IsString()\n @IsOptional()\n street?: string;\n\n @ApiPropertyOptional({ description: 'Commercial zip code address of seller' })\n @IsString()\n @IsOptional()\n zipCode?: string;\n\n @ApiPropertyOptional({ description: 'Commercial city address of seller' })\n @IsString()\n @IsOptional()\n city?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n settings?: ISocietyGescom;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cgv?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoUrl?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isStripeAllowed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n}\n\nexport class CreatePreSaleDocument extends CommercialDocumentInputs {\n paymentLink?: '#';\n deposit?: undefined;\n fromEstimateId: undefined;\n}\nexport class CreateInvoiceDocument extends CommercialDocumentInputs {\n paymentLink?: string;\n deposit?: number;\n fromEstimateId: number | null; // Nécessaire lors du passage d'un devis à facture\n}\n\nexport class CreateCgv {\n @ApiProperty()\n cgv: string | null;\n}\n\nexport class CreateReminder {\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n beforeThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n dueDate: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n}"]}
1
+ {"version":3,"file":"Create.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AAEA;;;;;;;;;;;;;;AAOM,MAAOA,uBAAP,CAA8B;;QAAvBA,uB,GAAAA,uB;;AAOXC,YANC,iCAMD,EALC,iCAKD,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ACD;;AAGAA,YADC,yBACD;;AAGI,MAAOM,qBAAP,SAAqCH,wBAArC,CAA6D;;QAAtDG,qB,GAAAA,qB;;AAMP,MAAOC,qBAAP,SAAqCJ,wBAArC,CAA6D;;QAAtDI,qB,GAAAA,qB;;AAOP,MAAOC,SAAP,CAAgB;;QAATA,S,GAAAA,S;;AAEXR,YADC,yBACD;;AAGI,MAAOS,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAIXT,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD","names":["CreateCommercialSetting","__decorate","message","CreateCommercialMail","CommercialDocumentInputs","description","Array","CreatePreSaleDocument","CreateInvoiceDocument","CreateCgv","CreateReminder"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { FontIds, LogoAlignment } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { IProductInvoice } from '../../models/IProductInvoice';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { IThirdParty } from '../../models/IThirdParty';\n\nexport type IProductInvoiceToCreate = IProductInvoice & { save?: boolean };\n\nexport class CreateCommercialSetting {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n @Min(0, {\n message: 'Capital should be positive',\n })\n capital?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n tvaCode?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n rcs?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n numberTradeDirectory?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bank?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n iban?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bic?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n mailContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n phoneContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n website?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commercialName?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n penalties?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n discount?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n recoveryCost?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n generatedBy?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n acceptCheque?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n mentionAutoent?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startInvoice?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startEstimate?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n paymentsAccepted?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n stripePaymentByDefault?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n displayLogo?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n invoiceCgv?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n color?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeInvoiceText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeEstimateText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoAlignment?: LogoAlignment | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idFont?: FontIds | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isEdgingDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n edgingColor?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCoordinatesFrameDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areLinesSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areColumnsSeparationHidden?: boolean;\n}\n\nexport class CreateCommercialMail {\n @ApiProperty()\n @IsString()\n to: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cc?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bcc?: string;\n\n @ApiProperty()\n @IsString()\n subject: string;\n\n @ApiProperty()\n @IsString()\n content: string;\n}\n\nexport class CommercialDocumentInputs {\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n legalForm?: string;\n\n @ApiPropertyOptional()\n @IsNumber()\n @IsOptional()\n capital?: number;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n siren?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n rcs?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n vatCode?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n nafCode?: string;\n\n @ApiProperty()\n @IsString()\n reference: string; //\n\n @ApiProperty()\n thirdParty: IThirdParty; //\n\n @ApiProperty()\n @IsDateString()\n emissionDate: string; //\n\n @ApiProperty()\n @IsDateString()\n dueDate: string; //\n\n @ApiPropertyOptional({ description: 'Date d\\'expiration pour la facture d\\'acompte' })\n @IsDateString()\n @IsOptional()\n expirationDate: string;\n\n @ApiProperty({ description: 'Conditions de réglement' })\n @IsString()\n termsOfPayment: string;\n\n @ApiProperty()\n @IsArray()\n products: Array<IProductInvoiceToCreate>;\n\n @ApiProperty({ description: 'Escompte' })\n @IsString()\n discount: string; //\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string; //\n\n @ApiPropertyOptional({ description: 'Pénalité de retard' })\n @IsOptional()\n @IsString()\n penalties?: string; //\n\n @ApiProperty({ description: 'Remise globale' })\n @IsOptional()\n @IsNumber()\n generalDiscount2: number; //\n\n @ApiPropertyOptional({ description: 'Indemnité forfaitaire' })\n @IsOptional()\n @IsString()\n compensation?: string; //\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string; //\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n disableVat: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n title?: string; //\n\n @ApiPropertyOptional({ description: 'Commercial name of seller' })\n @IsString()\n @IsOptional()\n name: string;\n\n @ApiPropertyOptional({ description: 'Commercial number address of seller' })\n @IsString()\n @IsOptional()\n number?: string;\n\n @ApiPropertyOptional({ description: 'Commercial street address of seller' })\n @IsString()\n @IsOptional()\n street?: string;\n\n @ApiPropertyOptional({ description: 'Commercial zip code address of seller' })\n @IsString()\n @IsOptional()\n zipCode?: string;\n\n @ApiPropertyOptional({ description: 'Commercial city address of seller' })\n @IsString()\n @IsOptional()\n city?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n settings?: ISocietyGescom;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cgv?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoUrl?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isStripeAllowed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n}\n\nexport class CreatePreSaleDocument extends CommercialDocumentInputs {\n paymentLink?: '#';\n deposit?: undefined;\n fromEstimateId: undefined;\n assetMarginVatIds?: [];\n}\nexport class CreateInvoiceDocument extends CommercialDocumentInputs {\n paymentLink?: string;\n deposit?: number;\n fromEstimateId: number | null; // Nécessaire lors du passage d'un devis à facture\n assetMarginVatIds?: number[]; // Laisser vide côté front, utilisé pour l'affichage des tva sur marge sur les acomptes\n}\n\nexport class CreateCgv {\n @ApiProperty()\n cgv: string | null;\n}\n\nexport class CreateReminder {\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n beforeThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n dueDate: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Query.js","mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,YAAP,CAAmB;;QAAZA,Y,GAAAA,Y;;AAIXC,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAeI,MAAOC,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAGXD,YAFC,yBAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAQI,MAAOE,oBAAP,CAA2B;;QAApBA,oB,GAAAA,oB;;AAEXF,YADC,yBACD;;AAGI,MAAOG,sBAAP,CAA6B;;QAAtBA,sB,GAAAA,sB;;AAGXH,YAFC,yBAED,EADC,8BACD;;AAIAA,YAFC,iCAED,EADC,mCACD;;AAIAA,YAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD","names":["QueryInvoice","__decorate","QueryNextReference","QueryPreviewDocument","QueryDocumentPaginated"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { Order } from 'sequelize/types';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { DiscountType, InvoiceStatus } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { QueryPaginate } from '../BasePaginate';\n\nexport class QueryInvoice {\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: InvoiceStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDescending?: boolean;\n}\n\nexport interface ParamPaginatedInvoices {\n idSociety: number;\n date?: {\n gte?: string;\n lte?: string;\n };\n status?: InvoiceStatus;\n search?: string;\n pagination: QueryPaginate;\n order?: Order;\n}\n\nexport class QueryNextReference {\n @ApiProperty()\n @IsNumber()\n idEstimateInvoiceType: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDraft?: boolean;\n}\n\nexport interface Discount {\n type: DiscountType,\n amount: number\n}\n\nexport class QueryPreviewDocument {\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n}\n\nexport class QueryDocumentPaginated {\n @ApiProperty()\n @IsArray()\n types: EstimateInvoiceType[];\n\n @ApiPropertyOptional()\n @IsDateString()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: InvoiceStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDescending?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n}"]}
1
+ {"version":3,"file":"Query.js","mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,YAAP,CAAmB;;QAAZA,Y,GAAAA,Y;;AAIXC,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAeI,MAAOC,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAGXD,YAFC,yBAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAQI,MAAOE,oBAAP,CAA2B;;QAApBA,oB,GAAAA,oB;;AAEXF,YADC,yBACD;;AAGI,MAAOG,sBAAP,CAA6B;;QAAtBA,sB,GAAAA,sB;;AAGXH,YAFC,yBAED,EADC,8BACD;;AAIAA,YAFC,iCAED,EADC,mCACD;;AAIAA,YAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD","names":["QueryInvoice","__decorate","QueryNextReference","QueryPreviewDocument","QueryDocumentPaginated"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { Order } from 'sequelize/types';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { DiscountType, EstimateStatus, InvoiceStatus } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { QueryPaginate } from '../BasePaginate';\n\nexport class QueryInvoice {\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: InvoiceStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDescending?: boolean;\n}\n\nexport interface ParamPaginatedInvoices {\n idSociety: number;\n date?: {\n gte?: string;\n lte?: string;\n };\n status?: InvoiceStatus;\n search?: string;\n pagination: QueryPaginate;\n order?: Order;\n}\n\nexport class QueryNextReference {\n @ApiProperty()\n @IsNumber()\n idEstimateInvoiceType: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDraft?: boolean;\n}\n\nexport interface Discount {\n type: DiscountType,\n amount: number\n}\n\nexport class QueryPreviewDocument {\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n}\n\nexport class QueryDocumentPaginated {\n @ApiProperty()\n @IsArray()\n types: EstimateInvoiceType[];\n\n @ApiPropertyOptional()\n @IsDateString()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: EstimateStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDescending?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n}"]}
@@ -51,4 +51,6 @@ __decorate([(0, _utils.ApiPropertyOptional)({
51
51
  }), (0, _classValidator.IsBoolean)(), (0, _boolean.ToBoolean)(), (0, _classValidator.IsOptional)(), __metadata("design:type", Boolean)], QueryGeneralLedgerAuxiliary.prototype, "descending", void 0);
52
52
 
53
53
  __decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsString)(), (0, _classValidator.IsOptional)(), __metadata("design:type", String)], QueryGeneralLedgerAuxiliary.prototype, "search", void 0);
54
+
55
+ __decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsNumber)(), (0, _classValidator.IsOptional)(), __metadata("design:type", Number)], QueryGeneralLedgerAuxiliary.prototype, "idThirdParty", void 0);
54
56
  //# sourceMappingURL=QueryGeneralLedgerAuxiliary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryGeneralLedgerAuxiliary.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEM,MAAOA,2BAAP,CAAkC;;QAA3BA,2B,GAAAA,2B;;AAGXC,YAFC,yBAED,EADC,iDACD;;AAIAA,YAFC,yBAED,EADC,iDACD;;AAIAA,YAFC,yBAED,EADC,4BAAOC,8BAAP,CACD;;AAKAD,YAHC,yBAGD,EAFC,4BAED,EADC,yBAAI,CAAJ,CACD;;AAKAA,YAHC,yBAGD,EAFC,4BAED,EADC,yBAAI,CAAJ,CACD;;AAMAA,YAJC,gCAAoB;EAAEE,OAAO,EAAE,KAAX;EAAkBC,QAAQ,EAAE;AAA5B,CAApB,CAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAH,YAJC,gCAAoB;EAAEE,OAAO,EAAE;AAAX,CAApB,CAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAF,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD","names":["QueryGeneralLedgerAuxiliary","__decorate","ThirdPartyType","default","describe"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.ts"],"sourcesContent":["import {\n IsBoolean, IsEnum, IsInt, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { IsFormattedDateString } from '../../../../utils/validators/formattedDateString.validator';\nimport { ThirdPartyType } from '../../../Enum/ThirdPartyType';\n\nexport class QueryGeneralLedgerAuxiliary {\n @ApiProperty()\n @IsFormattedDateString()\n dateStart: string;\n\n @ApiProperty()\n @IsFormattedDateString()\n dateEnd: string;\n\n @ApiProperty()\n @IsEnum(ThirdPartyType)\n idThirdPartyType: number;\n\n @ApiProperty()\n @IsInt()\n @Min(1)\n limit: number;\n\n @ApiProperty()\n @IsInt()\n @Min(1)\n page: number;\n\n @ApiPropertyOptional({ default: false, describe: 'If set to true, it will search only entries with no lettering' })\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n omitLettering?: boolean;\n\n @ApiPropertyOptional({ default: true })\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n descending?: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n search?: string;\n}"]}
1
+ {"version":3,"file":"QueryGeneralLedgerAuxiliary.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEM,MAAOA,2BAAP,CAAkC;;QAA3BA,2B,GAAAA,2B;;AAGXC,YAFC,yBAED,EADC,iDACD;;AAIAA,YAFC,yBAED,EADC,iDACD;;AAIAA,YAFC,yBAED,EADC,4BAAOC,8BAAP,CACD;;AAKAD,YAHC,yBAGD,EAFC,4BAED,EADC,yBAAI,CAAJ,CACD;;AAKAA,YAHC,yBAGD,EAFC,4BAED,EADC,yBAAI,CAAJ,CACD;;AAMAA,YAJC,gCAAoB;EAAEE,OAAO,EAAE,KAAX;EAAkBC,QAAQ,EAAE;AAA5B,CAApB,CAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAH,YAJC,gCAAoB;EAAEE,OAAO,EAAE;AAAX,CAApB,CAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAF,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD","names":["QueryGeneralLedgerAuxiliary","__decorate","ThirdPartyType","default","describe"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.ts"],"sourcesContent":["import {\n IsBoolean, IsEnum, IsInt, IsOptional, IsString, Min, IsNumber,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { IsFormattedDateString } from '../../../../utils/validators/formattedDateString.validator';\nimport { ThirdPartyType } from '../../../Enum/ThirdPartyType';\n\nexport class QueryGeneralLedgerAuxiliary {\n @ApiProperty()\n @IsFormattedDateString()\n dateStart: string;\n\n @ApiProperty()\n @IsFormattedDateString()\n dateEnd: string;\n\n @ApiProperty()\n @IsEnum(ThirdPartyType)\n idThirdPartyType: number;\n\n @ApiProperty()\n @IsInt()\n @Min(1)\n limit: number;\n\n @ApiProperty()\n @IsInt()\n @Min(1)\n page: number;\n\n @ApiPropertyOptional({ default: false, describe: 'If set to true, it will search only entries with no lettering' })\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n omitLettering?: boolean;\n\n @ApiPropertyOptional({ default: true })\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n descending?: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n search?: string;\n\n @ApiPropertyOptional()\n @IsNumber()\n @IsOptional()\n idThirdParty?: number;\n}"]}
@@ -37,7 +37,9 @@ __decorate([(0, _2.ApiProperty)(), (0, _classValidator.Min)(0, {
37
37
  message: 'Price should be positive'
38
38
  }), __metadata("design:type", Number)], CreateProduct.prototype, "priceTaxExcluded", void 0);
39
39
 
40
- __decorate([(0, _2.ApiProperty)(), (0, _classValidator.IsNumber)(), __metadata("design:type", Number)], CreateProduct.prototype, "idVAT", void 0);
40
+ __decorate([(0, _2.ApiProperty)(), (0, _classValidator.IsNumber)(), __metadata("design:type", Number)], CreateProduct.prototype, "idVat", void 0);
41
+
42
+ __decorate([(0, _2.ApiPropertyOptional)(), (0, _classValidator.IsNumber)(), (0, _classValidator.IsOptional)(), __metadata("design:type", Number)], CreateProduct.prototype, "marginVatType", void 0);
41
43
 
42
44
  __decorate([(0, _2.ApiPropertyOptional)(), (0, _classValidator.IsBoolean)(), (0, _boolean.ToBoolean)(), (0, _classValidator.IsOptional)(), __metadata("design:type", Boolean)], CreateProduct.prototype, "isFree", void 0);
43
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"CreateProduct.js","mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEM,MAAOA,aAAP,CAAoB;;QAAbA,a,GAAAA,a;;AAGXC,YAFC,qBAED,EADC,+BACD;;AAMAA,YAJC,qBAID,EAHC,yBAAI,CAAJ,EAAO;EACNC,OAAO,EAAE;AADH,CAAP,CAGD;;AAIAD,YAFC,qBAED,EADC,+BACD;;AAMAA,YAJC,6BAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,qBAGD,EAFC,+BAED,EADC,0BAAWE,MAAX,CACD;;AAKAF,YAHC,qBAGD,EAFC,+BAED,EADC,0BAAWG,aAAX,CACD;;AAKAH,YAHC,6BAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,6BAGD,EAFC,+BAED,EADC,iCACD","names":["CreateProduct","__decorate","message","Unit","ProductType"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/product/CreateProduct.ts"],"sourcesContent":["import {\n IsBoolean,\n IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ProductType, Unit } from '../../..';\nimport { ApiProperty, ApiPropertyOptional } from '../../../..';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { IsObjectId } from '../../../../utils/validators/objectId.validator';\n\nexport class CreateProduct {\n @ApiProperty()\n @IsString()\n name: string;\n\n @ApiProperty()\n @Min(0, {\n message: 'Price should be positive',\n })\n priceTaxExcluded: number;\n\n @ApiProperty()\n @IsNumber()\n idVAT: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isFree?: boolean;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(Unit)\n unit: number;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(ProductType)\n type: number;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n codeProduct?: string;\n}\n"]}
1
+ {"version":3,"file":"CreateProduct.js","mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEM,MAAOA,aAAP,CAAoB;;QAAbA,a,GAAAA,a;;AAGXC,YAFC,qBAED,EADC,+BACD;;AAMAA,YAJC,qBAID,EAHC,yBAAI,CAAJ,EAAO;EACNC,OAAO,EAAE;AADH,CAAP,CAGD;;AAIAD,YAFC,qBAED,EADC,+BACD;;AAKAA,YAHC,6BAGD,EAFC,+BAED,EADC,iCACD;;AAMAA,YAJC,6BAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,qBAGD,EAFC,+BAED,EADC,0BAAWE,MAAX,CACD;;AAKAF,YAHC,qBAGD,EAFC,+BAED,EADC,0BAAWG,aAAX,CACD;;AAKAH,YAHC,6BAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,6BAGD,EAFC,+BAED,EADC,iCACD","names":["CreateProduct","__decorate","message","Unit","ProductType"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/product/CreateProduct.ts"],"sourcesContent":["import {\n IsBoolean,\n IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ProductType, Unit } from '../../..';\nimport { ApiProperty, ApiPropertyOptional } from '../../../..';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { IsObjectId } from '../../../../utils/validators/objectId.validator';\n\nexport class CreateProduct {\n @ApiProperty()\n @IsString()\n name: string;\n\n @ApiProperty()\n @Min(0, {\n message: 'Price should be positive',\n })\n priceTaxExcluded: number;\n\n @ApiProperty()\n @IsNumber()\n idVat: number;\n\n @ApiPropertyOptional()\n @IsNumber()\n @IsOptional()\n marginVatType?: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isFree?: boolean;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(Unit)\n unit: number;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(ProductType)\n type: number;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n codeProduct?: string;\n}\n"]}