@silexpert/core 1.0.15 → 1.0.19

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 (165) hide show
  1. package/es/api/resources/CommercialSetting.d.ts +3 -1
  2. package/es/api/resources/CommercialSetting.d.ts.map +1 -1
  3. package/es/api/resources/CommercialSetting.js +6 -0
  4. package/es/api/resources/CommercialSetting.js.map +1 -1
  5. package/es/api/resources/Qonto.d.ts +5 -1
  6. package/es/api/resources/Qonto.d.ts.map +1 -1
  7. package/es/api/resources/Qonto.js +12 -0
  8. package/es/api/resources/Qonto.js.map +1 -1
  9. package/es/api/resources/Stripe.d.ts +6 -0
  10. package/es/api/resources/Stripe.d.ts.map +1 -0
  11. package/es/api/resources/Stripe.js +7 -0
  12. package/es/api/resources/Stripe.js.map +1 -0
  13. package/es/api/resources.d.ts +2 -0
  14. package/es/api/resources.d.ts.map +1 -1
  15. package/es/api/resources.js +2 -0
  16. package/es/api/resources.js.map +1 -1
  17. package/es/types/Enum/CommercialManagement.d.ts +10 -0
  18. package/es/types/Enum/CommercialManagement.d.ts.map +1 -1
  19. package/es/types/Enum/CommercialManagement.js +21 -0
  20. package/es/types/Enum/CommercialManagement.js.map +1 -1
  21. package/es/types/Enum/Rules.d.ts +2 -0
  22. package/es/types/Enum/Rules.d.ts.map +1 -0
  23. package/es/types/Enum/Rules.js +19 -0
  24. package/es/types/Enum/Rules.js.map +1 -0
  25. package/es/types/Interface/api/commercialManagement/Create.d.ts +5 -1
  26. package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  27. package/es/types/Interface/api/commercialManagement/Create.js +23 -1
  28. package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
  29. package/es/types/Interface/api/commercialManagement/Read.d.ts +1 -0
  30. package/es/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  31. package/es/types/Interface/api/commercialManagement/Read.js.map +1 -1
  32. package/es/types/Interface/api/qonto/CreateQontoConnection.d.ts +5 -0
  33. package/es/types/Interface/api/qonto/CreateQontoConnection.d.ts.map +1 -0
  34. package/es/types/Interface/api/qonto/CreateQontoConnection.js +24 -0
  35. package/es/types/Interface/api/qonto/CreateQontoConnection.js.map +1 -0
  36. package/es/types/Interface/api/qonto/GetConnectionInformation.d.ts +4 -0
  37. package/es/types/Interface/api/qonto/GetConnectionInformation.d.ts.map +1 -0
  38. package/es/types/Interface/api/qonto/GetConnectionInformation.js +19 -0
  39. package/es/types/Interface/api/qonto/GetConnectionInformation.js.map +1 -0
  40. package/es/types/Interface/api/qonto/ProcessBankAccount.d.ts +5 -0
  41. package/es/types/Interface/api/qonto/ProcessBankAccount.d.ts.map +1 -0
  42. package/es/types/Interface/api/qonto/ProcessBankAccount.js +24 -0
  43. package/es/types/Interface/api/qonto/ProcessBankAccount.js.map +1 -0
  44. package/es/types/Interface/api/qonto/Query.d.ts +1 -2
  45. package/es/types/Interface/api/qonto/Query.d.ts.map +1 -1
  46. package/es/types/Interface/api/qonto/Query.js.map +1 -1
  47. package/es/types/Interface/api/qonto/ReadCreateConnection.d.ts +6 -0
  48. package/es/types/Interface/api/qonto/ReadCreateConnection.d.ts.map +1 -0
  49. package/es/types/Interface/api/qonto/ReadCreateConnection.js +2 -0
  50. package/es/types/Interface/api/qonto/ReadCreateConnection.js.map +1 -0
  51. package/es/types/Interface/api/qonto/UpdateConnection.d.ts +4 -0
  52. package/es/types/Interface/api/qonto/UpdateConnection.d.ts.map +1 -0
  53. package/es/types/Interface/api/qonto/UpdateConnection.js +19 -0
  54. package/es/types/Interface/api/qonto/UpdateConnection.js.map +1 -0
  55. package/es/types/Interface/api/stripe/Create.d.ts +4 -0
  56. package/es/types/Interface/api/stripe/Create.d.ts.map +1 -0
  57. package/es/types/Interface/api/stripe/Create.js +19 -0
  58. package/es/types/Interface/api/stripe/Create.js.map +1 -0
  59. package/es/types/Interface/api/thirdParty/CreateThirdPartyForm.d.ts +3 -0
  60. package/es/types/Interface/api/thirdParty/CreateThirdPartyForm.d.ts.map +1 -1
  61. package/es/types/Interface/api/thirdParty/CreateThirdPartyForm.js +18 -1
  62. package/es/types/Interface/api/thirdParty/CreateThirdPartyForm.js.map +1 -1
  63. package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.d.ts +3 -0
  64. package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.d.ts.map +1 -1
  65. package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.js +18 -1
  66. package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.js.map +1 -1
  67. package/es/types/Interface/models/IApiError.d.ts +2 -0
  68. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  69. package/es/types/Interface/models/IApiError.js +3 -0
  70. package/es/types/Interface/models/IApiError.js.map +1 -1
  71. package/es/types/Interface/models/IEstimateInvoice.d.ts +3 -0
  72. package/es/types/Interface/models/IEstimateInvoice.d.ts.map +1 -1
  73. package/es/types/Interface/models/IEstimateInvoice.js.map +1 -1
  74. package/es/types/Interface/models/IPrestationHistory.d.ts +13 -0
  75. package/es/types/Interface/models/IPrestationHistory.d.ts.map +1 -0
  76. package/es/types/Interface/models/IPrestationHistory.js +2 -0
  77. package/es/types/Interface/models/IPrestationHistory.js.map +1 -0
  78. package/es/types/Interface/models/ISocietyGescom.d.ts +3 -1
  79. package/es/types/Interface/models/ISocietyGescom.d.ts.map +1 -1
  80. package/es/types/Interface/models/ISocietyGescom.js.map +1 -1
  81. package/es/types/Interface/models/IThirdParty.d.ts +3 -0
  82. package/es/types/Interface/models/IThirdParty.d.ts.map +1 -1
  83. package/es/types/Interface/models/IThirdParty.js.map +1 -1
  84. package/es/types/index.d.ts +8 -0
  85. package/es/types/index.d.ts.map +1 -1
  86. package/es/types/index.js +8 -0
  87. package/es/types/index.js.map +1 -1
  88. package/es/utils/commercialManagement/document.d.ts.map +1 -1
  89. package/es/utils/commercialManagement/document.js +8 -8
  90. package/es/utils/commercialManagement/document.js.map +1 -1
  91. package/es/utils/commercialManagement/templates/body.d.ts.map +1 -1
  92. package/es/utils/commercialManagement/templates/body.js +3 -1
  93. package/es/utils/commercialManagement/templates/body.js.map +1 -1
  94. package/es/utils/commercialManagement/templates/common.d.ts.map +1 -1
  95. package/es/utils/commercialManagement/templates/common.js +20 -1
  96. package/es/utils/commercialManagement/templates/common.js.map +1 -1
  97. package/js/api/resources/CommercialSetting.js +8 -0
  98. package/js/api/resources/CommercialSetting.js.map +1 -1
  99. package/js/api/resources/Qonto.js +18 -0
  100. package/js/api/resources/Qonto.js.map +1 -1
  101. package/js/api/resources/Stripe.js +20 -0
  102. package/js/api/resources/Stripe.js.map +1 -0
  103. package/js/api/resources.js +4 -1
  104. package/js/api/resources.js.map +1 -1
  105. package/js/types/Enum/CommercialManagement.js +19 -0
  106. package/js/types/Enum/CommercialManagement.js.map +1 -1
  107. package/js/types/Enum/Rules.js +7 -0
  108. package/js/types/Enum/Rules.js.map +1 -0
  109. package/js/types/Interface/api/commercialManagement/Create.js +11 -1
  110. package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
  111. package/js/types/Interface/api/qonto/CreateQontoConnection.js +31 -0
  112. package/js/types/Interface/api/qonto/CreateQontoConnection.js.map +1 -0
  113. package/js/types/Interface/api/qonto/GetConnectionInformation.js +29 -0
  114. package/js/types/Interface/api/qonto/GetConnectionInformation.js.map +1 -0
  115. package/js/types/Interface/api/qonto/ProcessBankAccount.js +31 -0
  116. package/js/types/Interface/api/qonto/ProcessBankAccount.js.map +1 -0
  117. package/js/types/Interface/api/qonto/ReadCreateConnection.js +6 -0
  118. package/js/types/Interface/api/qonto/ReadCreateConnection.js.map +1 -0
  119. package/js/types/Interface/api/qonto/UpdateConnection.js +29 -0
  120. package/js/types/Interface/api/qonto/UpdateConnection.js.map +1 -0
  121. package/js/types/Interface/api/stripe/Create.js +29 -0
  122. package/js/types/Interface/api/stripe/Create.js.map +1 -0
  123. package/js/types/Interface/api/thirdParty/CreateThirdPartyForm.js +6 -0
  124. package/js/types/Interface/api/thirdParty/CreateThirdPartyForm.js.map +1 -1
  125. package/js/types/Interface/api/thirdParty/UpdateThirdPartyForm.js +6 -0
  126. package/js/types/Interface/api/thirdParty/UpdateThirdPartyForm.js.map +1 -1
  127. package/js/types/Interface/models/IApiError.js +5 -2
  128. package/js/types/Interface/models/IApiError.js.map +1 -1
  129. package/js/types/Interface/models/IPrestationHistory.js +6 -0
  130. package/js/types/Interface/models/IPrestationHistory.js.map +1 -0
  131. package/js/types/index.js +96 -0
  132. package/js/types/index.js.map +1 -1
  133. package/js/utils/commercialManagement/document.js +9 -7
  134. package/js/utils/commercialManagement/document.js.map +1 -1
  135. package/js/utils/commercialManagement/templates/body.js +3 -1
  136. package/js/utils/commercialManagement/templates/body.js.map +1 -1
  137. package/js/utils/commercialManagement/templates/common.js +20 -1
  138. package/js/utils/commercialManagement/templates/common.js.map +1 -1
  139. package/package.json +1 -1
  140. package/ts/api/resources/CommercialSetting.ts +11 -1
  141. package/ts/api/resources/Qonto.ts +23 -7
  142. package/ts/api/resources/Stripe.ts +8 -0
  143. package/ts/api/resources.ts +2 -0
  144. package/ts/types/Enum/CommercialManagement.ts +22 -0
  145. package/ts/types/Enum/Rules.ts +18 -0
  146. package/ts/types/Interface/api/commercialManagement/Create.ts +19 -2
  147. package/ts/types/Interface/api/commercialManagement/Read.ts +1 -0
  148. package/ts/types/Interface/api/qonto/CreateQontoConnection.ts +12 -0
  149. package/ts/types/Interface/api/qonto/GetConnectionInformation.ts +8 -0
  150. package/ts/types/Interface/api/qonto/ProcessBankAccount.ts +12 -0
  151. package/ts/types/Interface/api/qonto/Query.ts +1 -1
  152. package/ts/types/Interface/api/qonto/ReadCreateConnection.ts +6 -0
  153. package/ts/types/Interface/api/qonto/UpdateConnection.ts +8 -0
  154. package/ts/types/Interface/api/stripe/Create.ts +8 -0
  155. package/ts/types/Interface/api/thirdParty/CreateThirdPartyForm.ts +15 -1
  156. package/ts/types/Interface/api/thirdParty/UpdateThirdPartyForm.ts +15 -1
  157. package/ts/types/Interface/models/IApiError.ts +4 -0
  158. package/ts/types/Interface/models/IEstimateInvoice.ts +3 -0
  159. package/ts/types/Interface/models/IPrestationHistory.ts +16 -0
  160. package/ts/types/Interface/models/ISocietyGescom.ts +3 -1
  161. package/ts/types/Interface/models/IThirdParty.ts +3 -0
  162. package/ts/types/index.ts +8 -0
  163. package/ts/utils/commercialManagement/document.ts +3 -1
  164. package/ts/utils/commercialManagement/templates/body.ts +3 -1
  165. package/ts/utils/commercialManagement/templates/common.ts +20 -1
@@ -1,6 +1,6 @@
1
1
  import { orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq, } from 'lodash';
2
2
  import * as dayjs from 'dayjs';
3
- import { fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';
3
+ import { AccountingCategoryList, fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';
4
4
  import { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';
5
5
  import { Vat } from '../../types/Enum/Vat';
6
6
  import { integerToFormattedAmountString } from '../amount';
@@ -10,7 +10,7 @@ import { productToReadProductEditing } from './product';
10
10
  import { vatToReadVatEditing } from './vat';
11
11
  const ejs = require('ejs');
12
12
  export function generateCommercialDocument(idEstimateInvoiceType, payload) {
13
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
14
14
  const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));
15
15
  const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);
16
16
  const data = Object.assign(Object.assign({}, payload), { paymentLink: (_a = payload.paymentLink) !== null && _a !== void 0 ? _a : '#', idEstimateInvoiceType, phoneContact: (_c = (_b = payload.settings) === null || _b === void 0 ? void 0 : _b.phoneContact) !== null && _c !== void 0 ? _c : null, products,
@@ -19,15 +19,15 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload) {
19
19
  url: (_l = (_k = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _k === void 0 ? void 0 : _k.link) !== null && _l !== void 0 ? _l : fontList[0].link,
20
20
  }, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),
21
21
  // @ts-ignore
22
- marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)) });
22
+ marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)), accountingCategoryFormatted: (_o = (_m = AccountingCategoryList.find((a) => a.id === payload.accountingCategory)) === null || _m === void 0 ? void 0 : _m.label) !== null && _o !== void 0 ? _o : null });
23
23
  const commonTemplate = new CommercialDocumentCommonHTML();
24
24
  let documentFreeText;
25
25
  // A GERER EN FONCTION DU DOCUMENT
26
26
  if ([EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)) {
27
- documentFreeText = (_m = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _m === void 0 ? void 0 : _m.freeEstimateText;
27
+ documentFreeText = (_p = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _p === void 0 ? void 0 : _p.freeEstimateText;
28
28
  }
29
29
  else {
30
- documentFreeText = (_o = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _o === void 0 ? void 0 : _o.freeInvoiceText;
30
+ documentFreeText = (_q = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _q === void 0 ? void 0 : _q.freeInvoiceText;
31
31
  }
32
32
  //
33
33
  return {
@@ -38,7 +38,7 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload) {
38
38
  };
39
39
  }
40
40
  export function generateAdvanceDocument(payload) {
41
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
42
42
  if (!payload.deposit)
43
43
  throw new Error('Aucun acompte défini');
44
44
  const data = Object.assign(Object.assign({}, payload), { paymentLink: (_a = payload.paymentLink) !== null && _a !== void 0 ? _a : '#', idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE, phoneContact: (_c = (_b = payload.settings) === null || _b === void 0 ? void 0 : _b.phoneContact) !== null && _c !== void 0 ? _c : null, products: [], vats: [], totalTaxExcluded: payload.deposit, totalTaxIncluded: payload.deposit, totalTaxAndDiscountIncluded: payload.deposit, generalDiscountFormatted: null, depositFormatted: integerToFormattedAmountString(payload.deposit), totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit), totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit), totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit), totalVatAmountFormatted: integerToFormattedAmountString(0), font: {
@@ -46,12 +46,12 @@ export function generateAdvanceDocument(payload) {
46
46
  url: (_g = (_f = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _f === void 0 ? void 0 : _f.link) !== null && _g !== void 0 ? _g : fontList[0].link,
47
47
  }, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: false, disableVat: true,
48
48
  // @ts-ignore
49
- marginVats: _uniq(((_h = payload.assetMarginVatIds) !== null && _h !== void 0 ? _h : []).map((m) => { var _a, _b; return (_b = (_a = VatMarginCategyList.find((c) => c.id === m)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : null; })) });
49
+ marginVats: _uniq(((_h = payload.assetMarginVatIds) !== null && _h !== void 0 ? _h : []).map((m) => { var _a, _b; return (_b = (_a = VatMarginCategyList.find((c) => c.id === m)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : null; })), accountingCategoryFormatted: (_k = (_j = AccountingCategoryList.find((a) => a.id === payload.accountingCategory)) === null || _j === void 0 ? void 0 : _j.label) !== null && _k !== void 0 ? _k : null });
50
50
  const commonTemplate = new CommercialDocumentCommonHTML();
51
51
  return {
52
52
  header: ejs === null || ejs === void 0 ? void 0 : ejs.render(commonTemplate.header, data),
53
53
  body: ejs === null || ejs === void 0 ? void 0 : ejs.render(bodyTemplate, data),
54
- footer: ejs === null || ejs === void 0 ? void 0 : ejs.render(commonTemplate.footer, Object.assign(Object.assign({}, data), { freeText: (_k = (_j = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _j === void 0 ? void 0 : _j.freeInvoiceText) !== null && _k !== void 0 ? _k : null })),
54
+ footer: ejs === null || ejs === void 0 ? void 0 : ejs.render(commonTemplate.footer, Object.assign(Object.assign({}, data), { freeText: (_m = (_l = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _l === void 0 ? void 0 : _l.freeInvoiceText) !== null && _m !== void 0 ? _m : null })),
55
55
  data,
56
56
  };
57
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,IA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AAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,0CAAE,KAAK,mCAAI,IAAI,CAAA,EAAA,CAAC,CAAC,GAC5H,CAAC;IAEF,MAAM,cAAc,GAAG,IAAI,4BAA4B,EAAE,CAAC;IAE1D,OAAO;QACL,MAAM,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;QAChD,IAAI,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC;QACrC,MAAM,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,cAAc,CAAC,MAAM,kCAAO,IAAI,KAAE,QAAQ,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,eAAe,mCAAI,IAAI,IAAG;QAC7G,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import {\n orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq,\n} from 'lodash';\nimport * as dayjs from 'dayjs';\nimport { ReadCommercialDocumentTemplate, ReadDocumentEditing } from '../../types/Interface/api/commercialManagement/Read';\nimport { fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { CommercialDocumentCommonHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';\n\nconst ejs = require('ejs');\n\nexport function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'),\n totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount'),\n totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0),\n generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')),\n totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.deposit ?? 0)),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0)),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n let documentFreeText: string | null | undefined;\n\n // A GERER EN FONCTION DU DOCUMENT\n if ([EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)) {\n documentFreeText = payload?.settings?.freeEstimateText;\n } else {\n documentFreeText = payload?.settings?.freeInvoiceText;\n }\n //\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: documentFreeText ?? null }),\n data,\n };\n}\n\nexport function generateAdvanceDocument(payload: CreateInvoiceDocument): ReadCommercialDocumentTemplate {\n if (!payload.deposit) throw new Error('Aucun acompte défini');\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE,\n phoneContact: payload.settings?.phoneContact ?? null,\n products: [],\n vats: [],\n totalTaxExcluded: payload.deposit,\n totalTaxIncluded: payload.deposit,\n totalTaxAndDiscountIncluded: payload.deposit,\n generalDiscountFormatted: null,\n depositFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalVatAmountFormatted: integerToFormattedAmountString(0),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: false,\n disableVat: true,\n // @ts-ignore\n marginVats: _uniq((payload.assetMarginVatIds ?? []).map((m) => VatMarginCategyList.find((c) => c.id === m)?.label ?? null)),\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n return {\n header: ejs?.render(commonTemplate.header, data),\n body: ejs?.render(bodyTemplate, data),\n footer: ejs?.render(commonTemplate.footer, { ...data, freeText: payload?.settings?.freeInvoiceText ?? null }),\n data,\n };\n}"]}
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,IAAI,MAAM,EAAE,IAAI,IAAI,KAAK,GACzE,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG5C,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AAO;QACL,MAAM,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;QAChD,IAAI,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC;QACrC,MAAM,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,cAAc,CAAC,MAAM,kCAAO,IAAI,KAAE,QAAQ,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,eAAe,mCAAI,IAAI,IAAG;QAC7G,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import {\n orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq,\n} from 'lodash';\nimport * as dayjs from 'dayjs';\nimport { ReadCommercialDocumentTemplate, ReadDocumentEditing } from '../../types/Interface/api/commercialManagement/Read';\nimport { AccountingCategoryList, fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { CommercialDocumentCommonHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';\n\nconst ejs = require('ejs');\n\nexport function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'),\n totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount'),\n totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0),\n generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')),\n totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.deposit ?? 0)),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0)),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n let documentFreeText: string | null | undefined;\n\n // A GERER EN FONCTION DU DOCUMENT\n if ([EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)) {\n documentFreeText = payload?.settings?.freeEstimateText;\n } else {\n documentFreeText = payload?.settings?.freeInvoiceText;\n }\n //\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: documentFreeText ?? null }),\n data,\n };\n}\n\nexport function generateAdvanceDocument(payload: CreateInvoiceDocument): ReadCommercialDocumentTemplate {\n if (!payload.deposit) throw new Error('Aucun acompte défini');\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE,\n phoneContact: payload.settings?.phoneContact ?? null,\n products: [],\n vats: [],\n totalTaxExcluded: payload.deposit,\n totalTaxIncluded: payload.deposit,\n totalTaxAndDiscountIncluded: payload.deposit,\n generalDiscountFormatted: null,\n depositFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalVatAmountFormatted: integerToFormattedAmountString(0),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: false,\n disableVat: true,\n // @ts-ignore\n marginVats: _uniq((payload.assetMarginVatIds ?? []).map((m) => VatMarginCategyList.find((c) => c.id === m)?.label ?? null)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n return {\n header: ejs?.render(commonTemplate.header, data),\n body: ejs?.render(bodyTemplate, data),\n footer: ejs?.render(commonTemplate.footer, { ...data, freeText: payload?.settings?.freeInvoiceText ?? null }),\n data,\n };\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/body.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,YAAY,QAkDjB,CAAC"}
1
+ {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/body.ts"],"names":[],"mappings":"AAgEA,eAAO,MAAM,YAAY,QAkDjB,CAAC"}
@@ -50,10 +50,12 @@ const headOfDocument = `<div class="row space-between">
50
50
  <div style="width: 40%; margin-top: auto;">
51
51
  <p>Client</p>
52
52
  <div class="<%= settings && settings.isCoordinatesFrameDisplayed ? 'customer-border' : '' %>">
53
- <% if(thirdParty.fullname) {%><%= thirdParty.fullname %><br/><% } %>
53
+ <% if(thirdParty.fullname) {%><b><%= thirdParty.fullname %></b><br/><% } %>
54
54
  <% if(thirdParty.company) {%><%= thirdParty.company %><br/><% } %>
55
55
  <% if(thirdParty.address) {%><%= thirdParty.address %><br/><% } %>
56
+ <% if(thirdParty.deliveryAddress && thirdParty.deliveryCity && thirdParty.deliveryZipCode) {%>Adresse de livraison : <%= thirdParty.deliveryAddress %><%= thirdParty.deliveryZipCode %><%= thirdParty.deliveryCity %><% } %>
56
57
  <% if(thirdParty.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %>
58
+ <% if(thirdParty.nSiret) {%>SIRET : <%= thirdParty.nSiret %><% } %>
57
59
  </div>
58
60
  </div>
59
61
  </div>`;
@@ -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\" 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>`;"]}
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;;;;;;;;;;;;;;SAc/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) {%><b><%= thirdParty.fullname %></b><br/><% } %>\n <% if(thirdParty.company) {%><%= thirdParty.company %><br/><% } %>\n <% if(thirdParty.address) {%><%= thirdParty.address %><br/><% } %>\n <% if(thirdParty.deliveryAddress && thirdParty.deliveryCity && thirdParty.deliveryZipCode) {%>Adresse de livraison : <%= thirdParty.deliveryAddress %><%= thirdParty.deliveryZipCode %><%= thirdParty.deliveryCity %><% } %>\n <% if(thirdParty.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %>\n <% if(thirdParty.nSiret) {%>SIRET : <%= thirdParty.nSiret %><% } %>\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>`;"]}
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/common.ts"],"names":[],"mappings":"AAGA,qBAAa,4BAA4B;IACvC,MAAM,SAIG;IAET,MAAM,SAII;IAEV,IAAI,SAEI;IAER,OAAO,SAMiF;IAExF,QAAQ,SA2CA;IAER,iBAAiB,SAeP;IAEV,oBAAoB,SA4CZ;IAER,aAAa,SAUD;IAEZ,KAAK,SAuDI;CACV"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/common.ts"],"names":[],"mappings":"AAGA,qBAAa,4BAA4B;IACvC,MAAM,SAIG;IAET,MAAM,SAuBI;IAEV,IAAI,SAEI;IAER,OAAO,SAMiF;IAExF,QAAQ,SA2CA;IAER,iBAAiB,SAeP;IAEV,oBAAoB,SA4CZ;IAER,aAAa,SAUD;IAEZ,KAAK,SAuDI;CACV"}
@@ -9,7 +9,26 @@ 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(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/><% } %><% }%>
12
+ <% if (accountingCategoryFormatted) {%>
13
+ <%= accountingCategoryFormatted %> |
14
+ <%}%>
15
+ <% if(marginVats.length > 0) { %>
16
+ Régime TVA sur marge -
17
+ <% marginVats.forEach(function(v, index) { %>
18
+ <%= v %> -
19
+ <% }) %>
20
+ ART 297-A du CGI ou directive 2006-212 CE |
21
+ <% } %>
22
+ <% if(penalties || compensation || discount) { %>
23
+ <%= penalties ? 'Pénalités en cas de retard : ' + penalties : ''%>
24
+ <%= penalties && compensation ? '|' : ''%>
25
+ <%= compensation ? 'Indemnité forfaitaire en cas de retard :' + compensation : '' %>
26
+ <%= (compensation || penalties) && discount ? '| ' : '' %>
27
+ <%= discount %><%= shouldPayTaxAfterDebit ? "| Option pour le paiement de la taxe d'après les débits" : '' %>
28
+ <% if(name || legalForm || capital || siren || rcs) {%>
29
+ <br/><br/>
30
+ <% } %>
31
+ <% } %>
13
32
  <%= 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
33
  </div>`;
15
34
  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(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
+ {"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;;;;;;;;;;;;;;;;;;;;;;;WAuBA,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 (accountingCategoryFormatted) {%>\n <%= accountingCategoryFormatted %> |\n <%}%>\n <% if(marginVats.length > 0) { %>\n Régime TVA sur marge - \n <% marginVats.forEach(function(v, index) { %>\n <%= v %> - \n <% }) %>\n ART 297-A du CGI ou directive 2006-212 CE |\n <% } %>\n <% if(penalties || compensation || discount) { %>\n <%= penalties ? 'Pénalités en cas de retard : ' + penalties : ''%>\n <%= penalties && compensation ? '|' : ''%>\n <%= compensation ? 'Indemnité forfaitaire en cas de retard :' + compensation : '' %>\n <%= (compensation || penalties) && discount ? '| ' : '' %>\n <%= discount %><%= shouldPayTaxAfterDebit ? \"| Option pour le paiement de la taxe d'après les débits\" : '' %>\n <% if(name || legalForm || capital || siren || rcs) {%>\n <br/><br/>\n <% } %>\n <% } %>\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"]}
@@ -16,6 +16,14 @@ class CommercialSetting extends _Resource.Resource {
16
16
  return this.axios.$post('/commercial-management/settings', payload);
17
17
  }
18
18
 
19
+ getCgv() {
20
+ return this.axios.$get('/commercial-management/settings/cgv');
21
+ }
22
+
23
+ updateOrCreateCgv(payload) {
24
+ return this.axios.$post('/commercial-management/settings/cgv', payload);
25
+ }
26
+
19
27
  }
20
28
 
21
29
  exports.CommercialSetting = CommercialSetting;
@@ -1 +1 @@
1
- {"version":3,"file":"CommercialSetting.js","mappings":";;;;;;;AACA;;AAEM,MAAOA,iBAAP,SAAiCC,kBAAjC,CAAyC;EAC7CC,GAAG;IACD,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,CAAP;EACD;;EAEDC,cAAc,CAACC,OAAD,EAAiC;IAC7C,OAAO,KAAKH,KAAL,CAAWI,KAAX,CAAiB,iCAAjB,EAAoDD,OAApD,CAAP;EACD;;AAP4C;;QAAlCN,iB,GAAAA,iB","names":["CommercialSetting","Resource","get","axios","$get","updateOrCreate","payload","$post"],"sourceRoot":"","sources":["../../../ts/api/resources/CommercialSetting.ts"],"sourcesContent":["import { CreateCommercialSetting, ISocietyGescom } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class CommercialSetting extends Resource {\n get(): Promise<ISocietyGescom> {\n return this.axios.$get('/commercial-management/settings');\n }\n\n updateOrCreate(payload: CreateCommercialSetting): Promise<ISocietyGescom> {\n return this.axios.$post('/commercial-management/settings', payload);\n }\n}"]}
1
+ {"version":3,"file":"CommercialSetting.js","mappings":";;;;;;;AAGA;;AAEM,MAAOA,iBAAP,SAAiCC,kBAAjC,CAAyC;EAC7CC,GAAG;IACD,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,CAAP;EACD;;EAEDC,cAAc,CAACC,OAAD,EAAiC;IAC7C,OAAO,KAAKH,KAAL,CAAWI,KAAX,CAAiB,iCAAjB,EAAoDD,OAApD,CAAP;EACD;;EAEDE,MAAM;IACJ,OAAO,KAAKL,KAAL,CAAWC,IAAX,CAAgB,qCAAhB,CAAP;EACD;;EAEDK,iBAAiB,CAACH,OAAD,EAAmB;IAClC,OAAO,KAAKH,KAAL,CAAWI,KAAX,CAAiB,qCAAjB,EAAwDD,OAAxD,CAAP;EACD;;AAf4C;;QAAlCN,iB,GAAAA,iB","names":["CommercialSetting","Resource","get","axios","$get","updateOrCreate","payload","$post","getCgv","updateOrCreateCgv"],"sourceRoot":"","sources":["../../../ts/api/resources/CommercialSetting.ts"],"sourcesContent":["import {\n CreateCgv, CreateCommercialSetting, ISocietyCgv, ISocietyGescom,\n} from '../../types';\nimport { Resource } from '../Resource';\n\nexport class CommercialSetting extends Resource {\n get(): Promise<ISocietyGescom> {\n return this.axios.$get('/commercial-management/settings');\n }\n\n updateOrCreate(payload: CreateCommercialSetting): Promise<ISocietyGescom> {\n return this.axios.$post('/commercial-management/settings', payload);\n }\n\n getCgv(): Promise<string | null> {\n return this.axios.$get('/commercial-management/settings/cgv');\n }\n\n updateOrCreateCgv(payload: CreateCgv): Promise<ISocietyCgv> {\n return this.axios.$post('/commercial-management/settings/cgv', payload);\n }\n}"]}
@@ -12,10 +12,28 @@ class Qonto extends _Resource.Resource {
12
12
  return this.axios.$delete(`qonto/${idBankConnection}`);
13
13
  }
14
14
 
15
+ getInformation(queries) {
16
+ return this.axios.$get('connectors/qonto/connections', {
17
+ params: queries
18
+ });
19
+ }
20
+
15
21
  importBankAccount(idBankAccount, payload) {
16
22
  return this.axios.$post(`connectors/qonto/${idBankAccount}/importation`, payload);
17
23
  }
18
24
 
25
+ processBankAccount(idBankConnection, payload) {
26
+ return this.axios.$post(`connectors/qonto/connections/${idBankConnection}/bank-accounts`, payload);
27
+ }
28
+
29
+ create(payload) {
30
+ return this.axios.$post('connectors/qonto/connections', payload);
31
+ }
32
+
33
+ updateConnection(idBankConnection, payload) {
34
+ return this.axios.$put(`connectors/qonto/connections/${idBankConnection}`, payload);
35
+ }
36
+
19
37
  }
20
38
 
21
39
  exports.Qonto = Qonto;
@@ -1 +1 @@
1
- {"version":3,"file":"Qonto.js","mappings":";;;;;;;AACA;;AAEM,MAAOA,KAAP,SAAqBC,kBAArB,CAA6B;EACjCC,MAAM,CACJC,gBADI,EACoB;IAExB,OAAO,KAAKC,KAAL,CAAWC,OAAX,CAAmB,SAASF,gBAAgB,EAA5C,CAAP;EACD;;EAEDG,iBAAiB,CACfC,aADe,EACQC,OADR,EACkC;IAEjD,OAAO,KAAKJ,KAAL,CAAWK,KAAX,CAAiB,oBAAoBF,aAAa,cAAlD,EAAkEC,OAAlE,CAAP;EACD;;AAXgC;;QAAtBR,K,GAAAA,K","names":["Qonto","Resource","delete","idBankConnection","axios","$delete","importBankAccount","idBankAccount","payload","$post"],"sourceRoot":"","sources":["../../../ts/api/resources/Qonto.ts"],"sourcesContent":["import { CreateImportation, IAccountingTransaction, IBankAccount } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class Qonto extends Resource {\n delete(\n idBankConnection: number,\n ): Promise<IBankAccount> {\n return this.axios.$delete(`qonto/${idBankConnection}`);\n }\n\n importBankAccount(\n idBankAccount: number, payload: CreateImportation,\n ): Promise<IAccountingTransaction[]> {\n return this.axios.$post(`connectors/qonto/${idBankAccount}/importation`, payload);\n }\n}\n"]}
1
+ {"version":3,"file":"Qonto.js","mappings":";;;;;;;AAKA;;AAEM,MAAOA,KAAP,SAAqBC,kBAArB,CAA6B;EACjCC,MAAM,CAACC,gBAAD,EAAyB;IAC7B,OAAO,KAAKC,KAAL,CAAWC,OAAX,CAAmB,SAASF,gBAAgB,EAA5C,CAAP;EACD;;EAEDG,cAAc,CAACC,OAAD,EAAkC;IAC9C,OAAO,KAAKH,KAAL,CAAWI,IAAX,CAAgB,8BAAhB,EAAgD;MAAEC,MAAM,EAAEF;IAAV,CAAhD,CAAP;EACD;;EAEDG,iBAAiB,CAACC,aAAD,EAAwBC,OAAxB,EAAkD;IACjE,OAAO,KAAKR,KAAL,CAAWS,KAAX,CAAiB,oBAAoBF,aAAa,cAAlD,EAAkEC,OAAlE,CAAP;EACD;;EAEDE,kBAAkB,CAACX,gBAAD,EAA2BS,OAA3B,EAAsD;IACtE,OAAO,KAAKR,KAAL,CAAWS,KAAX,CAAiB,gCAAgCV,gBAAgB,gBAAjE,EAAmFS,OAAnF,CAAP;EACD;;EAEDG,MAAM,CAACH,OAAD,EAA+B;IACnC,OAAO,KAAKR,KAAL,CAAWS,KAAX,CAAiB,8BAAjB,EAAiDD,OAAjD,CAAP;EACD;;EAEDI,gBAAgB,CAACb,gBAAD,EAA2BS,OAA3B,EAAoD;IAClE,OAAO,KAAKR,KAAL,CAAWa,IAAX,CAAgB,gCAAgCd,gBAAgB,EAAhE,EAAoES,OAApE,CAAP;EACD;;AAvBgC;;QAAtBZ,K,GAAAA,K","names":["Qonto","Resource","delete","idBankConnection","axios","$delete","getInformation","queries","$get","params","importBankAccount","idBankAccount","payload","$post","processBankAccount","create","updateConnection","$put"],"sourceRoot":"","sources":["../../../ts/api/resources/Qonto.ts"],"sourcesContent":["import {\n ProcessBankAccount,\n CreateQontoConnection,\n CreateImportation, GetConnectionInformation, GetQontoOrganization, IAccountingTransaction, IBankAccount, IBankConnection, ReadCreateConnection, UpdateConnection,\n} from '../../types';\nimport { Resource } from '../Resource';\n\nexport class Qonto extends Resource {\n delete(idBankConnection: number): Promise<IBankAccount> {\n return this.axios.$delete(`qonto/${idBankConnection}`);\n }\n\n getInformation(queries: GetConnectionInformation): Promise<GetQontoOrganization> {\n return this.axios.$get('connectors/qonto/connections', { params: queries });\n }\n\n importBankAccount(idBankAccount: number, payload: CreateImportation): Promise<IAccountingTransaction[]> {\n return this.axios.$post(`connectors/qonto/${idBankAccount}/importation`, payload);\n }\n\n processBankAccount(idBankConnection: number, payload: ProcessBankAccount): Promise<IBankAccount[]> {\n return this.axios.$post(`connectors/qonto/connections/${idBankConnection}/bank-accounts`, payload);\n }\n\n create(payload: CreateQontoConnection): Promise<ReadCreateConnection> {\n return this.axios.$post('connectors/qonto/connections', payload);\n }\n\n updateConnection(idBankConnection: number, payload: UpdateConnection): Promise<IBankConnection> {\n return this.axios.$put(`connectors/qonto/connections/${idBankConnection}`, payload);\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Stripe = undefined;
7
+
8
+ var _Resource = require("../Resource");
9
+
10
+ class Stripe extends _Resource.Resource {
11
+ connect(code) {
12
+ return this.axios.$post('/stripe/connect', {
13
+ code
14
+ });
15
+ }
16
+
17
+ }
18
+
19
+ exports.Stripe = Stripe;
20
+ //# sourceMappingURL=Stripe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stripe.js","mappings":";;;;;;;AAAA;;AAGM,MAAOA,MAAP,SAAsBC,kBAAtB,CAA8B;EAClCC,OAAO,CAACC,IAAD,EAAa;IAClB,OAAO,KAAKC,KAAL,CAAWC,KAAX,CAAiB,iBAAjB,EAAoC;MAAEF;IAAF,CAApC,CAAP;EACD;;AAHiC;;QAAvBH,M,GAAAA,M","names":["Stripe","Resource","connect","code","axios","$post"],"sourceRoot":"","sources":["../../../ts/api/resources/Stripe.ts"],"sourcesContent":["import { Resource } from '../Resource';\nimport { IConnector } from '../../types';\n\nexport class Stripe extends Resource {\n connect(code: string): Promise<IConnector> {\n return this.axios.$post('/stripe/connect', { code });\n }\n}"]}
@@ -197,6 +197,8 @@ var _Reminder = require("./resources/Reminder");
197
197
 
198
198
  var _Recurrence = require("./resources/Recurrence");
199
199
 
200
+ var _Stripe = require("./resources/Stripe");
201
+
200
202
  const resources = exports.resources = {
201
203
  simulation: _Simulation.Simulation,
202
204
  budgetInsight: _BudgetInsight.BudgetInsight,
@@ -293,6 +295,7 @@ const resources = exports.resources = {
293
295
  connection: _Connection.Connection,
294
296
  invoice: _Invoice.Invoice,
295
297
  reminder: _Reminder.Reminder,
296
- recurrence: _Recurrence.Recurrence
298
+ recurrence: _Recurrence.Recurrence,
299
+ stripe: _Stripe.Stripe
297
300
  };
298
301
  //# sourceMappingURL=resources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resources.js","mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEO,MAAMA,SAAS,WAATA,SAAS,GAAG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YAAY,EAAEC,0BAhFS;EAiFvBC,IAAI,EAAEC,UAjFiB;EAkFvBC,OAAO,EAAEC,gBAlFc;EAmFvBC,aAAa,EAAEC,4BAnFQ;EAoFvBC,YAAY,EAAEC,0BApFS;EAqFvBC,mBAAmB,EAAEC,wCArFE;EAsFvBC,EAAE,EAAEC,MAtFmB;EAuFvBC,QAAQ,EAAEC,kBAvFa;EAwFvBC,UAAU,EAAEC,sBAxFW;EAyFvBC,KAAK,EAAEC,YAzFgB;EA0FvBC,gBAAgB,EAAEC,kCA1FK;EA2FvBC,iBAAiB,EAAEC,oCA3FI;EA4FvBC,kBAAkB,EAAEC,sCA5FG;EA6FvBC,UAAU,EAAEC,sBA7FW;EA8FvBC,OAAO,EAAEC,gBA9Fc;EA+FvBC,QAAQ,EAAEC,kBA/Fa;EAgGvBC,UAAU,EAAEC;AAhGW,CAAlB","names":["resources","simulation","Simulation","budgetInsight","BudgetInsight","country","Country","paymentExpectationCustomer","PaymentExpectationCustomer","payment","Payment","immobilization","Immobilization","accountType","AccountType","transaction","Transaction","account","Account","sponsorship","Sponsorship","user","User","survey","Survey","report","Report","letter","Letter","firstStep","FirstStep","society","Society","partner","Partner","generalLedger","GeneralLedger","fecFile","FecFile","incomeStatement","IncomeStatement","internalInvoicing","InternalInvoicing","balanceSheet","BalanceSheet","balanceSheetModule","BalanceSheetModule","cerfa","Cerfa","legalForm","LegalForm","authenticate","Authenticate","search","Search","subscription","Subscription","salariesFile","SalariesFile","shine","Shine","promoCode","PromoCode","stocks","Stocks","loan","Loan","provision","Provision","societyPromoCode","SocietyPromoCode","dashboard","Dashboard","zTicket","ZTicket","incomeAllocation","IncomeAllocation","customerProviderOperation","CustomerProviderOperation","steps","Steps","revisionGuide","RevisionGuide","library","Library","taxDeadline","TaxDeadline","exerciceNote","ExerciceNote","connector","Connector","partneredAccountant","PartneredAccountant","tax","Tax","quotesAccount","QuotesAccount","registration","Registration","journal","Journal","product","Product","mealExpense","MealExpense","balanceSheetQuestion","BalanceSheetQuestion","exerciceQuestion","ExerciceQuestion","vatControl","VatControl","accountingIncome","AccountingIncome","accountingFiles","AccountingFiles","bankStatement","BankStatement","shareCapital","ShareCapital","closing","Closing","machineLearning","MachineLearning","workingSchedule","WorkingSchedule","revision","Revision","vehicle","Vehicle","kilometricAllowance","KilometricAllowance","vatDeclaration","VatDeclaration","qonto","Qonto","affectedPatrimony","AffectedPatrimony","bankAccount","BankAccount","log","Log","exercice","Exercice","mail","Mail","employee","Employee","sheetMonthSchedule","SheetMonthSchedule","nafCode","NafCode","checklist","Checklist","lettering","Lettering","mobile","Mobile","notification","Notification","societyEvent","SocietyEvent","task","Task","comment","Comment","calendarEvent","CalendarEvent","timeRecorder","TimeRecorder","notificationSetting","NotificationSetting","cx","Cx","bankList","BankList","thirdParty","ThirdParty","alert","Alert","customerActivity","CustomerActivity","commercialSetting","CommercialSetting","commercialDocument","CommercialDocument","connection","Connection","invoice","Invoice","reminder","Reminder","recurrence","Recurrence"],"sourceRoot":"","sources":["../../ts/api/resources.ts"],"sourcesContent":["import { Country } from './resources/Country';\nimport { Simulation } from './resources/Simulation';\nimport { PaymentExpectationCustomer } from './resources/PaymentExpectationCustomer';\nimport { Payment } from './resources/Payment';\nimport { Immobilization } from './resources/Immobilization';\nimport { AccountType } from './resources/AccountType';\nimport { Transaction } from './resources/Transaction';\nimport { Account } from './resources/Account';\nimport { Sponsorship } from './resources/Sponsorship';\nimport { User } from './resources/User';\nimport { Survey } from './resources/Survey';\nimport { Report } from './resources/Report';\nimport { Letter } from './resources/Letter';\nimport { FirstStep } from './resources/FirstStep';\nimport { Society } from './resources/Society';\nimport { Partner } from './resources/Partner';\nimport { GeneralLedger } from './resources/GeneralLedger';\nimport { FecFile } from './resources/FecFile';\nimport { IncomeStatement } from './resources/IncomeStatement';\nimport { BalanceSheet } from './resources/BalanceSheet';\nimport { BalanceSheetModule } from './resources/BalanceSheetModule';\nimport { Cerfa } from './resources/Cerfa';\nimport { LegalForm } from './resources/LegalForm';\nimport { Subscription } from './resources/Subscription';\nimport { Authenticate } from './resources/Authenticate';\nimport { Search } from './resources/Search';\nimport { SalariesFile } from './resources/SalariesFile';\nimport { Shine } from './resources/Shine';\nimport { PromoCode } from './resources/PromoCode';\nimport { Stocks } from './resources/Stocks';\nimport { Loan } from './resources/Loan';\nimport { SocietyPromoCode } from './resources/SocietyPromoCode';\nimport { Dashboard } from './resources/Dashboard';\nimport { ZTicket } from './resources/ZTicket';\nimport { IncomeAllocation } from './resources/IncomeAllocation';\nimport { CustomerProviderOperation } from './resources/CustomerProviderOperation';\nimport { Steps } from './resources/Step';\nimport { RevisionGuide } from './resources/RevisionGuide';\nimport { Library } from './resources/Library';\nimport { TaxDeadline } from './resources/TaxDeadline';\nimport { ExerciceNote } from './resources/ExerciceNote';\nimport { Connector } from './resources/Connector';\nimport { PartneredAccountant } from './resources/PartneredAccountant';\nimport { Tax } from './resources/Tax';\nimport { QuotesAccount } from './resources/QuotesAccount';\nimport { Registration } from './resources/Registration';\nimport { Journal } from './resources/Journal';\nimport { Product } from './resources/Product';\nimport { MealExpense } from './resources/MealExpense';\nimport { InternalInvoicing } from './resources/InternalInvoicing';\nimport { BalanceSheetQuestion } from './resources/BalanceSheetQuestion';\nimport { ExerciceQuestion } from './resources/ExerciceQuestion';\nimport { VatControl } from './resources/VatControl';\nimport { Provision } from './resources/Provision';\nimport { AccountingIncome } from './resources/AccountingIncome';\nimport { AccountingFiles } from './resources/AccountingFiles';\nimport { BankStatement } from './resources/BankStatement';\nimport { ShareCapital } from './resources/shareCapital';\nimport { Closing } from './resources/Closing';\nimport { MachineLearning } from './resources/MachineLearning';\nimport { WorkingSchedule } from './resources/WorkingSchedule';\nimport { Revision } from './resources/Revision';\nimport { Vehicle } from './resources/Vehicle';\nimport { KilometricAllowance } from './resources/KilometricAllowance';\nimport { VatDeclaration } from './resources/VatDeclaration';\nimport { Qonto } from './resources/Qonto';\nimport { AffectedPatrimony } from './resources/AffectedPatrimony';\nimport { BankAccount } from './resources/BankAccount';\nimport { BudgetInsight } from './resources/BudgetInsight';\nimport { Log } from './resources/Log';\nimport { Exercice } from './resources/Exercice';\nimport { Mail } from './resources/Mail';\nimport { Employee } from './resources/Employee';\nimport { SheetMonthSchedule } from './resources/SheetMonthSchedule';\nimport { NafCode } from './resources/NafCode';\nimport { Checklist } from './resources/Checklist';\nimport { Lettering } from './resources/Lettering';\nimport { Notification } from './resources/Notification';\nimport { Mobile } from './resources/Mobile';\nimport { Task } from './resources/Task';\nimport { SocietyEvent } from './resources/SocietyEvent';\nimport { Comment } from './resources/Comment';\nimport { NotificationSetting } from './resources/NotificationSetting';\nimport { Cx } from './resources/3cx';\nimport { BankList } from './resources/BankList';\nimport { ThirdParty } from './resources/ThirdParty';\nimport { Alert } from './resources/Alert';\nimport { CalendarEvent } from './resources/CalendarEvent';\nimport { TimeRecorder } from './resources/TimeRecorder';\nimport { CustomerActivity } from './resources/CustomerActivity';\nimport { CommercialSetting } from './resources/CommercialSetting';\nimport { Invoice } from './resources/Invoice';\nimport { CommercialDocument } from './resources/CommercialDocument';\nimport { Connection } from './resources/Connection';\nimport { Reminder } from './resources/Reminder';\nimport { Recurrence } from './resources/Recurrence';\n\nexport const resources = {\n simulation: Simulation,\n budgetInsight: BudgetInsight,\n country: Country,\n paymentExpectationCustomer: PaymentExpectationCustomer,\n payment: Payment,\n immobilization: Immobilization,\n accountType: AccountType,\n transaction: Transaction,\n account: Account,\n sponsorship: Sponsorship,\n user: User,\n survey: Survey,\n report: Report,\n letter: Letter,\n firstStep: FirstStep,\n society: Society,\n partner: Partner,\n generalLedger: GeneralLedger,\n fecFile: FecFile,\n incomeStatement: IncomeStatement,\n internalInvoicing: InternalInvoicing,\n balanceSheet: BalanceSheet,\n balanceSheetModule: BalanceSheetModule,\n cerfa: Cerfa,\n legalForm: LegalForm,\n authenticate: Authenticate,\n search: Search,\n subscription: Subscription,\n salariesFile: SalariesFile,\n shine: Shine,\n promoCode: PromoCode,\n stocks: Stocks,\n loan: Loan,\n provision: Provision,\n societyPromoCode: SocietyPromoCode,\n dashboard: Dashboard,\n zTicket: ZTicket,\n incomeAllocation: IncomeAllocation,\n customerProviderOperation: CustomerProviderOperation,\n steps: Steps,\n revisionGuide: RevisionGuide,\n library: Library,\n taxDeadline: TaxDeadline,\n exerciceNote: ExerciceNote,\n connector: Connector,\n partneredAccountant: PartneredAccountant,\n tax: Tax,\n quotesAccount: QuotesAccount,\n registration: Registration,\n journal: Journal,\n product: Product,\n mealExpense: MealExpense,\n balanceSheetQuestion: BalanceSheetQuestion,\n exerciceQuestion: ExerciceQuestion,\n vatControl: VatControl,\n accountingIncome: AccountingIncome,\n accountingFiles: AccountingFiles,\n bankStatement: BankStatement,\n shareCapital: ShareCapital,\n closing: Closing,\n machineLearning: MachineLearning,\n workingSchedule: WorkingSchedule,\n revision: Revision,\n vehicle: Vehicle,\n kilometricAllowance: KilometricAllowance,\n vatDeclaration: VatDeclaration,\n qonto: Qonto,\n affectedPatrimony: AffectedPatrimony,\n bankAccount: BankAccount,\n log: Log,\n exercice: Exercice,\n mail: Mail,\n employee: Employee,\n sheetMonthSchedule: SheetMonthSchedule,\n nafCode: NafCode,\n checklist: Checklist,\n lettering: Lettering,\n mobile: Mobile,\n notification: Notification,\n societyEvent: SocietyEvent,\n task: Task,\n comment: Comment,\n calendarEvent: CalendarEvent,\n timeRecorder: TimeRecorder,\n notificationSetting: NotificationSetting,\n cx: Cx,\n bankList: BankList,\n thirdParty: ThirdParty,\n alert: Alert,\n customerActivity: CustomerActivity,\n commercialSetting: CommercialSetting,\n commercialDocument: CommercialDocument,\n connection: Connection,\n invoice: Invoice,\n reminder: Reminder,\n recurrence: Recurrence,\n};"]}
1
+ {"version":3,"file":"resources.js","mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;A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AAEC,wCAjEE;EAkEvBC,cAAc,EAAEC,8BAlEO;EAmEvBC,KAAK,EAAEC,YAnEgB;EAoEvBC,iBAAiB,EAAEC,oCApEI;EAqEvBC,WAAW,EAAEC,wBArEU;EAsEvBC,GAAG,EAAEC,QAtEkB;EAuEvBC,QAAQ,EAAEC,kBAvEa;EAwEvBC,IAAI,EAAEC,UAxEiB;EAyEvBC,QAAQ,EAAEC,kBAzEa;EA0EvBC,kBAAkB,EAAEC,sCA1EG;EA2EvBC,OAAO,EAAEC,gBA3Ec;EA4EvBC,SAAS,EAAEC,oBA5EY;EA6EvBC,SAAS,EAAEC,oBA7EY;EA8EvBC,MAAM,EAAEC,cA9Ee;EA+EvBC,YAAY,EAAEC,0BA/ES;EAgFvBC,YAAY,EAAEC,0BAhFS;EAiFvBC,IAAI,EAAEC,UAjFiB;EAkFvBC,OAAO,EAAEC,gBAlFc;EAmFvBC,aAAa,EAAEC,4BAnFQ;EAoFvBC,YAAY,EAAEC,0BApFS;EAqFvBC,mBAAmB,EAAEC,wCArFE;EAsFvBC,EAAE,EAAEC,MAtFmB;EAuFvBC,QAAQ,EAAEC,kBAvFa;EAwFvBC,UAAU,EAAEC,sBAxFW;EAyFvBC,KAAK,EAAEC,YAzFgB;EA0FvBC,gBAAgB,EAAEC,kCA1FK;EA2FvBC,iBAAiB,EAAEC,oCA3FI;EA4FvBC,kBAAkB,EAAEC,sCA5FG;EA6FvBC,UAAU,EAAEC,sBA7FW;EA8FvBC,OAAO,EAAEC,gBA9Fc;EA+FvBC,QAAQ,EAAEC,kBA/Fa;EAgGvBC,UAAU,EAAEC,sBAhGW;EAiGvBC,MAAM,EAAEC;AAjGe,CAAlB","names":["resources","simulation","Simulation","budgetInsight","BudgetInsight","country","Country","paymentExpectationCustomer","PaymentExpectationCustomer","payment","Payment","immobilization","Immobilization","accountType","AccountType","transaction","Transaction","account","Account","sponsorship","Sponsorship","user","User","survey","Survey","report","Report","letter","Letter","firstStep","FirstStep","society","Society","partner","Partner","generalLedger","GeneralLedger","fecFile","FecFile","incomeStatement","IncomeStatement","internalInvoicing","InternalInvoicing","balanceSheet","BalanceSheet","balanceSheetModule","BalanceSheetModule","cerfa","Cerfa","legalForm","LegalForm","authenticate","Authenticate","search","Search","subscription","Subscription","salariesFile","SalariesFile","shine","Shine","promoCode","PromoCode","stocks","Stocks","loan","Loan","provision","Provision","societyPromoCode","SocietyPromoCode","dashboard","Dashboard","zTicket","ZTicket","incomeAllocation","IncomeAllocation","customerProviderOperation","CustomerProviderOperation","steps","Steps","revisionGuide","RevisionGuide","library","Library","taxDeadline","TaxDeadline","exerciceNote","ExerciceNote","connector","Connector","partneredAccountant","PartneredAccountant","tax","Tax","quotesAccount","QuotesAccount","registration","Registration","journal","Journal","product","Product","mealExpense","MealExpense","balanceSheetQuestion","BalanceSheetQuestion","exerciceQuestion","ExerciceQuestion","vatControl","VatControl","accountingIncome","AccountingIncome","accountingFiles","AccountingFiles","bankStatement","BankStatement","shareCapital","ShareCapital","closing","Closing","machineLearning","MachineLearning","workingSchedule","WorkingSchedule","revision","Revision","vehicle","Vehicle","kilometricAllowance","KilometricAllowance","vatDeclaration","VatDeclaration","qonto","Qonto","affectedPatrimony","AffectedPatrimony","bankAccount","BankAccount","log","Log","exercice","Exercice","mail","Mail","employee","Employee","sheetMonthSchedule","SheetMonthSchedule","nafCode","NafCode","checklist","Checklist","lettering","Lettering","mobile","Mobile","notification","Notification","societyEvent","SocietyEvent","task","Task","comment","Comment","calendarEvent","CalendarEvent","timeRecorder","TimeRecorder","notificationSetting","NotificationSetting","cx","Cx","bankList","BankList","thirdParty","ThirdParty","alert","Alert","customerActivity","CustomerActivity","commercialSetting","CommercialSetting","commercialDocument","CommercialDocument","connection","Connection","invoice","Invoice","reminder","Reminder","recurrence","Recurrence","stripe","Stripe"],"sourceRoot":"","sources":["../../ts/api/resources.ts"],"sourcesContent":["import { Country } from './resources/Country';\nimport { Simulation } from './resources/Simulation';\nimport { PaymentExpectationCustomer } from './resources/PaymentExpectationCustomer';\nimport { Payment } from './resources/Payment';\nimport { Immobilization } from './resources/Immobilization';\nimport { AccountType } from './resources/AccountType';\nimport { Transaction } from './resources/Transaction';\nimport { Account } from './resources/Account';\nimport { Sponsorship } from './resources/Sponsorship';\nimport { User } from './resources/User';\nimport { Survey } from './resources/Survey';\nimport { Report } from './resources/Report';\nimport { Letter } from './resources/Letter';\nimport { FirstStep } from './resources/FirstStep';\nimport { Society } from './resources/Society';\nimport { Partner } from './resources/Partner';\nimport { GeneralLedger } from './resources/GeneralLedger';\nimport { FecFile } from './resources/FecFile';\nimport { IncomeStatement } from './resources/IncomeStatement';\nimport { BalanceSheet } from './resources/BalanceSheet';\nimport { BalanceSheetModule } from './resources/BalanceSheetModule';\nimport { Cerfa } from './resources/Cerfa';\nimport { LegalForm } from './resources/LegalForm';\nimport { Subscription } from './resources/Subscription';\nimport { Authenticate } from './resources/Authenticate';\nimport { Search } from './resources/Search';\nimport { SalariesFile } from './resources/SalariesFile';\nimport { Shine } from './resources/Shine';\nimport { PromoCode } from './resources/PromoCode';\nimport { Stocks } from './resources/Stocks';\nimport { Loan } from './resources/Loan';\nimport { SocietyPromoCode } from './resources/SocietyPromoCode';\nimport { Dashboard } from './resources/Dashboard';\nimport { ZTicket } from './resources/ZTicket';\nimport { IncomeAllocation } from './resources/IncomeAllocation';\nimport { CustomerProviderOperation } from './resources/CustomerProviderOperation';\nimport { Steps } from './resources/Step';\nimport { RevisionGuide } from './resources/RevisionGuide';\nimport { Library } from './resources/Library';\nimport { TaxDeadline } from './resources/TaxDeadline';\nimport { ExerciceNote } from './resources/ExerciceNote';\nimport { Connector } from './resources/Connector';\nimport { PartneredAccountant } from './resources/PartneredAccountant';\nimport { Tax } from './resources/Tax';\nimport { QuotesAccount } from './resources/QuotesAccount';\nimport { Registration } from './resources/Registration';\nimport { Journal } from './resources/Journal';\nimport { Product } from './resources/Product';\nimport { MealExpense } from './resources/MealExpense';\nimport { InternalInvoicing } from './resources/InternalInvoicing';\nimport { BalanceSheetQuestion } from './resources/BalanceSheetQuestion';\nimport { ExerciceQuestion } from './resources/ExerciceQuestion';\nimport { VatControl } from './resources/VatControl';\nimport { Provision } from './resources/Provision';\nimport { AccountingIncome } from './resources/AccountingIncome';\nimport { AccountingFiles } from './resources/AccountingFiles';\nimport { BankStatement } from './resources/BankStatement';\nimport { ShareCapital } from './resources/shareCapital';\nimport { Closing } from './resources/Closing';\nimport { MachineLearning } from './resources/MachineLearning';\nimport { WorkingSchedule } from './resources/WorkingSchedule';\nimport { Revision } from './resources/Revision';\nimport { Vehicle } from './resources/Vehicle';\nimport { KilometricAllowance } from './resources/KilometricAllowance';\nimport { VatDeclaration } from './resources/VatDeclaration';\nimport { Qonto } from './resources/Qonto';\nimport { AffectedPatrimony } from './resources/AffectedPatrimony';\nimport { BankAccount } from './resources/BankAccount';\nimport { BudgetInsight } from './resources/BudgetInsight';\nimport { Log } from './resources/Log';\nimport { Exercice } from './resources/Exercice';\nimport { Mail } from './resources/Mail';\nimport { Employee } from './resources/Employee';\nimport { SheetMonthSchedule } from './resources/SheetMonthSchedule';\nimport { NafCode } from './resources/NafCode';\nimport { Checklist } from './resources/Checklist';\nimport { Lettering } from './resources/Lettering';\nimport { Notification } from './resources/Notification';\nimport { Mobile } from './resources/Mobile';\nimport { Task } from './resources/Task';\nimport { SocietyEvent } from './resources/SocietyEvent';\nimport { Comment } from './resources/Comment';\nimport { NotificationSetting } from './resources/NotificationSetting';\nimport { Cx } from './resources/3cx';\nimport { BankList } from './resources/BankList';\nimport { ThirdParty } from './resources/ThirdParty';\nimport { Alert } from './resources/Alert';\nimport { CalendarEvent } from './resources/CalendarEvent';\nimport { TimeRecorder } from './resources/TimeRecorder';\nimport { CustomerActivity } from './resources/CustomerActivity';\nimport { CommercialSetting } from './resources/CommercialSetting';\nimport { Invoice } from './resources/Invoice';\nimport { CommercialDocument } from './resources/CommercialDocument';\nimport { Connection } from './resources/Connection';\nimport { Reminder } from './resources/Reminder';\nimport { Recurrence } from './resources/Recurrence';\nimport { Stripe } from './resources/Stripe';\n\nexport const resources = {\n simulation: Simulation,\n budgetInsight: BudgetInsight,\n country: Country,\n paymentExpectationCustomer: PaymentExpectationCustomer,\n payment: Payment,\n immobilization: Immobilization,\n accountType: AccountType,\n transaction: Transaction,\n account: Account,\n sponsorship: Sponsorship,\n user: User,\n survey: Survey,\n report: Report,\n letter: Letter,\n firstStep: FirstStep,\n society: Society,\n partner: Partner,\n generalLedger: GeneralLedger,\n fecFile: FecFile,\n incomeStatement: IncomeStatement,\n internalInvoicing: InternalInvoicing,\n balanceSheet: BalanceSheet,\n balanceSheetModule: BalanceSheetModule,\n cerfa: Cerfa,\n legalForm: LegalForm,\n authenticate: Authenticate,\n search: Search,\n subscription: Subscription,\n salariesFile: SalariesFile,\n shine: Shine,\n promoCode: PromoCode,\n stocks: Stocks,\n loan: Loan,\n provision: Provision,\n societyPromoCode: SocietyPromoCode,\n dashboard: Dashboard,\n zTicket: ZTicket,\n incomeAllocation: IncomeAllocation,\n customerProviderOperation: CustomerProviderOperation,\n steps: Steps,\n revisionGuide: RevisionGuide,\n library: Library,\n taxDeadline: TaxDeadline,\n exerciceNote: ExerciceNote,\n connector: Connector,\n partneredAccountant: PartneredAccountant,\n tax: Tax,\n quotesAccount: QuotesAccount,\n registration: Registration,\n journal: Journal,\n product: Product,\n mealExpense: MealExpense,\n balanceSheetQuestion: BalanceSheetQuestion,\n exerciceQuestion: ExerciceQuestion,\n vatControl: VatControl,\n accountingIncome: AccountingIncome,\n accountingFiles: AccountingFiles,\n bankStatement: BankStatement,\n shareCapital: ShareCapital,\n closing: Closing,\n machineLearning: MachineLearning,\n workingSchedule: WorkingSchedule,\n revision: Revision,\n vehicle: Vehicle,\n kilometricAllowance: KilometricAllowance,\n vatDeclaration: VatDeclaration,\n qonto: Qonto,\n affectedPatrimony: AffectedPatrimony,\n bankAccount: BankAccount,\n log: Log,\n exercice: Exercice,\n mail: Mail,\n employee: Employee,\n sheetMonthSchedule: SheetMonthSchedule,\n nafCode: NafCode,\n checklist: Checklist,\n lettering: Lettering,\n mobile: Mobile,\n notification: Notification,\n societyEvent: SocietyEvent,\n task: Task,\n comment: Comment,\n calendarEvent: CalendarEvent,\n timeRecorder: TimeRecorder,\n notificationSetting: NotificationSetting,\n cx: Cx,\n bankList: BankList,\n thirdParty: ThirdParty,\n alert: Alert,\n customerActivity: CustomerActivity,\n commercialSetting: CommercialSetting,\n commercialDocument: CommercialDocument,\n connection: Connection,\n invoice: Invoice,\n reminder: Reminder,\n recurrence: Recurrence,\n stripe: Stripe,\n};"]}
@@ -89,4 +89,23 @@ const VatMarginCategyList = exports.VatMarginCategyList = [{
89
89
  label: 'Objet de collection et d\'antiquité',
90
90
  id: VatMarginCategoryId.ANTIQUITY
91
91
  }];
92
+ var AccountingCategoryId = exports.AccountingCategoryId = undefined;
93
+
94
+ (function (AccountingCategoryId) {
95
+ AccountingCategoryId[AccountingCategoryId["DEFAULT"] = 0] = "DEFAULT";
96
+ AccountingCategoryId[AccountingCategoryId["DELIVERY_OF_GOOD"] = 1] = "DELIVERY_OF_GOOD";
97
+ AccountingCategoryId[AccountingCategoryId["SERVICE_DELIVERY"] = 2] = "SERVICE_DELIVERY";
98
+ AccountingCategoryId[AccountingCategoryId["GOOD_AND_SERVICE"] = 3] = "GOOD_AND_SERVICE";
99
+ })(AccountingCategoryId || (exports.AccountingCategoryId = AccountingCategoryId = {}));
100
+
101
+ const AccountingCategoryList = exports.AccountingCategoryList = [{
102
+ label: 'Livraison de biens',
103
+ id: AccountingCategoryId.DELIVERY_OF_GOOD
104
+ }, {
105
+ label: 'Prestation de services',
106
+ id: AccountingCategoryId.SERVICE_DELIVERY
107
+ }, {
108
+ label: 'Prestation de services et livraison de biens',
109
+ id: AccountingCategoryId.GOOD_AND_SERVICE
110
+ }];
92
111
  //# sourceMappingURL=CommercialManagement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommercialManagement.js","mappings":";;;;;AAAA,IAAYA,OAMX,WANWA,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tBA;EACAA;AACD,CAHD,EAAYA,YAAY,aAAZA,YAAY,GAAZA,YAAY,MAAxB;;AAKA,IAAYC,mBAKX,WALWA,mBAKX,YALD;;AAAA,WAAYA,mBAAZ,EAA+B;EAC7BA;EACAA;EACAA;EACAA;AACD,CALD,EAAYA,mBAAmB,aAAnBA,mBAAmB,GAAnBA,mBAAmB,MAA/B;;AAOO,MAAMC,mBAAmB,WAAnBA,mBAAmB,GAAsD,CACpF;EACEC,KAAK,EAAE,mBADT;EAEEd,EAAE,EAAEY,mBAAmB,CAACG;AAF1B,CADoF,EAKpF;EACED,KAAK,EAAE,kBADT;EAEEd,EAAE,EAAEY,mBAAmB,CAACI;AAF1B,CALoF,EASpF;EACEF,KAAK,EAAE,cADT;EAEEd,EAAE,EAAEY,mBAAmB,CAACK;AAF1B,CAToF,EAapF;EACEH,KAAK,EAAE,qCADT;EAEEd,EAAE,EAAEY,mBAAmB,CAACM;AAF1B,CAboF,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 ACCEPTED = 'accepted',\n WAITING = 'waiting',\n REFUSED = 'refused',\n BILLED = 'billed',\n EXPIRED = 'expired',\n}\n\nexport enum DiscountType {\n PERCENT = 1,\n AMOUNT = 2,\n}\n\nexport enum VatMarginCategoryId {\n TRAVEL = 2,\n SECOND_HAND = 3,\n ART = 4,\n ANTIQUITY = 5,\n}\n\nexport const VatMarginCategyList: Array<{ label: string; id: VatMarginCategoryId }> = [\n {\n label: 'Agences de voyage',\n id: VatMarginCategoryId.TRAVEL,\n },\n {\n label: 'Bien d\\'occasion',\n id: VatMarginCategoryId.SECOND_HAND,\n },\n {\n label: 'Objet d\\'art',\n id: VatMarginCategoryId.ART,\n },\n {\n label: 'Objet de collection et d\\'antiquité',\n id: VatMarginCategoryId.ANTIQUITY,\n },\n];"]}
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,E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K;AAF1B,CAToF,EAapF;EACEH,KAAK,EAAE,qCADT;EAEEd,EAAE,EAAEY,mBAAmB,CAACM;AAF1B,CAboF,CAA/E;AAmBP,IAAYC,oBAKX,WALWA,oBAKX,YALD;;AAAA,WAAYA,oBAAZ,EAAgC;EAC9BA;EACAA;EACAA;EACAA;AACD,CALD,EAAYA,oBAAoB,aAApBA,oBAAoB,GAApBA,oBAAoB,MAAhC;;AAOO,MAAMC,sBAAsB,WAAtBA,sBAAsB,GAAuD,CACxF;EACEN,KAAK,EAAE,oBADT;EAEEd,EAAE,EAAEmB,oBAAoB,CAACE;AAF3B,CADwF,EAKxF;EACEP,KAAK,EAAE,wBADT;EAEEd,EAAE,EAAEmB,oBAAoB,CAACG;AAF3B,CALwF,EASxF;EACER,KAAK,EAAE,8CADT;EAEEd,EAAE,EAAEmB,oBAAoB,CAACI;AAF3B,CATwF,CAAnF","names":["FontIds","fontList","id","CIRCULAR_STD","link","name","ROBOTO","POPPINS","RALEWAY","ZILLA","LogoAlignment","InvoiceStatus","EstimateStatus","DiscountType","VatMarginCategoryId","VatMarginCategyList","label","TRAVEL","SECOND_HAND","ART","ANTIQUITY","AccountingCategoryId","AccountingCategoryList","DELIVERY_OF_GOOD","SERVICE_DELIVERY","GOOD_AND_SERVICE"],"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 ACCEPTED = 'accepted',\n WAITING = 'waiting',\n REFUSED = 'refused',\n BILLED = 'billed',\n EXPIRED = 'expired',\n}\n\nexport enum DiscountType {\n PERCENT = 1,\n AMOUNT = 2,\n}\n\nexport enum VatMarginCategoryId {\n TRAVEL = 2,\n SECOND_HAND = 3,\n ART = 4,\n ANTIQUITY = 5,\n}\n\nexport const VatMarginCategyList: Array<{ label: string; id: VatMarginCategoryId }> = [\n {\n label: 'Agences de voyage',\n id: VatMarginCategoryId.TRAVEL,\n },\n {\n label: 'Bien d\\'occasion',\n id: VatMarginCategoryId.SECOND_HAND,\n },\n {\n label: 'Objet d\\'art',\n id: VatMarginCategoryId.ART,\n },\n {\n label: 'Objet de collection et d\\'antiquité',\n id: VatMarginCategoryId.ANTIQUITY,\n },\n];\n\nexport enum AccountingCategoryId {\n DEFAULT = 0,\n DELIVERY_OF_GOOD = 1,\n SERVICE_DELIVERY = 2,\n GOOD_AND_SERVICE = 3,\n}\n\nexport const AccountingCategoryList: Array<{ label: string; id: AccountingCategoryId }> = [\n {\n label: 'Livraison de biens',\n id: AccountingCategoryId.DELIVERY_OF_GOOD,\n },\n {\n label: 'Prestation de services',\n id: AccountingCategoryId.SERVICE_DELIVERY,\n },\n {\n label: 'Prestation de services et livraison de biens',\n id: AccountingCategoryId.GOOD_AND_SERVICE,\n },\n];"]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ const AutoWordsException = exports.AutoWordsException = ['EDF', 'SFR', 'OVH', 'ENI', 'CIC', 'LCL', 'BNP', 'GDF', 'IBM', 'AXA', 'BMW', 'AWS', 'GMF', 'MMA', 'FCK', 'KLM'];
7
+ //# sourceMappingURL=Rules.js.map