@silexpert/core 1.0.21 → 1.0.24
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.
- package/es/api/resources/FIle.d.ts +6 -0
- package/es/api/resources/FIle.d.ts.map +1 -0
- package/es/api/resources/FIle.js +7 -0
- package/es/api/resources/FIle.js.map +1 -0
- package/es/api/resources/Qonto.js +1 -1
- package/es/api/resources/Qonto.js.map +1 -1
- package/es/api/resources.d.ts +2 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +2 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/BrandClementine.d.ts +9 -0
- package/es/types/Enum/BrandClementine.d.ts.map +1 -1
- package/es/types/Enum/BrandClementine.js +6 -0
- package/es/types/Enum/BrandClementine.js.map +1 -1
- package/es/types/Enum/BrandComptalib.d.ts +85 -0
- package/es/types/Enum/BrandComptalib.d.ts.map +1 -1
- package/es/types/Enum/BrandComptalib.js +6 -0
- package/es/types/Enum/BrandComptalib.js.map +1 -1
- package/es/types/Enum/BrandPourcentage.d.ts +1 -0
- package/es/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/es/types/Enum/BrandPourcentage.js +4 -3
- package/es/types/Enum/BrandPourcentage.js.map +1 -1
- package/es/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/es/types/Enum/TaskResponseType.js +11 -0
- package/es/types/Enum/TaskResponseType.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.d.ts +1 -1
- package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.js +1 -2
- package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/es/types/Interface/api/file/Create.d.ts +7 -0
- package/es/types/Interface/api/file/Create.d.ts.map +1 -0
- package/es/types/Interface/api/file/Create.js +28 -0
- package/es/types/Interface/api/file/Create.js.map +1 -0
- package/es/types/Interface/api/file/Read.d.ts +6 -0
- package/es/types/Interface/api/file/Read.d.ts.map +1 -0
- package/es/types/Interface/api/file/Read.js +3 -0
- package/es/types/Interface/api/file/Read.js.map +1 -0
- package/es/types/Interface/api/revision/QueryRevisionAccount.js +1 -1
- package/es/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -1
- package/es/types/index.d.ts +2 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +2 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/amount.js +1 -1
- package/es/utils/amount.js.map +1 -1
- package/es/utils/brands.d.ts +1 -1
- package/es/utils/brands.d.ts.map +1 -1
- package/es/utils/brands.js +8 -26
- package/es/utils/brands.js.map +1 -1
- package/es/utils/commercialManagement/templates/body.d.ts.map +1 -1
- package/es/utils/commercialManagement/templates/body.js +21 -13
- package/es/utils/commercialManagement/templates/body.js.map +1 -1
- package/es/utils/commercialManagement/templates/common.js +3 -3
- package/es/utils/commercialManagement/templates/common.js.map +1 -1
- package/js/api/resources/FIle.js +18 -0
- package/js/api/resources/FIle.js.map +1 -0
- package/js/api/resources/Qonto.js +1 -1
- package/js/api/resources/Qonto.js.map +1 -1
- package/js/api/resources.js +4 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/BrandClementine.js +6 -0
- package/js/types/Enum/BrandClementine.js.map +1 -1
- package/js/types/Enum/BrandComptalib.js +6 -0
- package/js/types/Enum/BrandComptalib.js.map +1 -1
- package/js/types/Enum/BrandPourcentage.js +4 -3
- package/js/types/Enum/BrandPourcentage.js.map +1 -1
- package/js/types/Enum/TaskResponseType.js +10 -0
- package/js/types/Enum/TaskResponseType.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Create.js +1 -1
- package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/js/types/Interface/api/file/Create.js +33 -0
- package/js/types/Interface/api/file/Create.js.map +1 -0
- package/js/types/Interface/api/file/Read.js +10 -0
- package/js/types/Interface/api/file/Read.js.map +1 -0
- package/js/types/Interface/api/revision/QueryRevisionAccount.js +1 -1
- package/js/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -1
- package/js/types/index.js +24 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/amount.js +1 -1
- package/js/utils/amount.js.map +1 -1
- package/js/utils/brands.js +7 -26
- package/js/utils/brands.js.map +1 -1
- package/js/utils/commercialManagement/templates/body.js +21 -13
- package/js/utils/commercialManagement/templates/body.js.map +1 -1
- package/js/utils/commercialManagement/templates/common.js +3 -3
- package/js/utils/commercialManagement/templates/common.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/FIle.ts +11 -0
- package/ts/api/resources/Qonto.ts +1 -1
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/BrandClementine.ts +6 -0
- package/ts/types/Enum/BrandComptalib.ts +6 -0
- package/ts/types/Enum/BrandPourcentage.ts +4 -3
- package/ts/types/Enum/TaskResponseType.ts +11 -0
- package/ts/types/Interface/api/commercialManagement/Create.ts +1 -2
- package/ts/types/Interface/api/file/Create.ts +16 -0
- package/ts/types/Interface/api/file/Read.ts +6 -0
- package/ts/types/Interface/api/revision/QueryRevisionAccount.ts +1 -1
- package/ts/types/index.ts +2 -0
- package/ts/utils/amount.ts +1 -1
- package/ts/utils/brands.ts +7 -25
- package/ts/utils/commercialManagement/templates/body.ts +21 -13
- package/ts/utils/commercialManagement/templates/common.ts +3 -3
|
@@ -58,14 +58,16 @@ const headOfDocument = `<div class="row space-between">
|
|
|
58
58
|
</div>
|
|
59
59
|
<div style="width: 40%; margin-top: auto;">
|
|
60
60
|
<p>Client</p>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
<% if (thirdParty) { %>
|
|
62
|
+
<div class="<%= settings && settings.isCoordinatesFrameDisplayed ? 'customer-border' : '' %>">
|
|
63
|
+
<% if(thirdParty.fullname) {%><b><%= thirdParty.fullname %></b><br/><% } %>
|
|
64
|
+
<% if(thirdParty.company) {%><%= thirdParty.company %><br/><% } %>
|
|
65
|
+
<% if(thirdParty.address) {%><%= thirdParty.address %><br/><% } %>
|
|
66
|
+
<% if(thirdParty.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %><br/>
|
|
67
|
+
<% if(thirdParty.deliveryAddress && thirdParty.deliveryCity && thirdParty.deliveryZipCode) {%>Adresse de livraison : <%= thirdParty.deliveryAddress %> <%= thirdParty.deliveryZipCode %> <%= thirdParty.deliveryCity %><br/><% } %>
|
|
68
|
+
<% if(thirdParty.nSiret) {%>SIRET : <%= thirdParty.nSiret %><% } %>
|
|
69
|
+
</div>
|
|
70
|
+
<% } %>
|
|
69
71
|
</div>
|
|
70
72
|
</div>`;
|
|
71
73
|
const bodyTemplate = exports.bodyTemplate = `<html>
|
|
@@ -92,11 +94,17 @@ const bodyTemplate = exports.bodyTemplate = `<html>
|
|
|
92
94
|
<% } %>
|
|
93
95
|
</div>
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
<div>
|
|
98
|
+
${commonTemplate.amountRecapitulation}
|
|
99
|
+
|
|
100
|
+
<% if (isStripeAllowed) { %>
|
|
101
|
+
<div style="text-align: right; margin-top: 30px;">${commonTemplate.paymentButton}</div>
|
|
102
|
+
<% } %>
|
|
103
|
+
</div>
|
|
96
104
|
|
|
97
105
|
</div>
|
|
98
106
|
|
|
99
|
-
<% if (
|
|
107
|
+
<% if (settings && (settings.iban || settings.bic)) { %>
|
|
100
108
|
<div class="row mt-30 space-between" style="page-break-inside: avoid !important;">
|
|
101
109
|
<div>
|
|
102
110
|
<% if (settings && (settings.iban || settings.bic)) { %>
|
|
@@ -104,11 +112,11 @@ const bodyTemplate = exports.bodyTemplate = `<html>
|
|
|
104
112
|
<% if(settings.bic) { %>BIC : <%= settings.bic %><% } %>
|
|
105
113
|
<% } %>
|
|
106
114
|
</div>
|
|
107
|
-
<% if (isStripeAllowed) { %>
|
|
108
|
-
<div style="text-align: right">${commonTemplate.paymentButton}</div>
|
|
109
|
-
<% } %>
|
|
110
115
|
</div>
|
|
111
116
|
<% } %>
|
|
117
|
+
<% if (settings && settings.bonPour) { %>
|
|
118
|
+
<br/>Bon pour accord : <br/><br/><br/><br/>
|
|
119
|
+
<% } %>
|
|
112
120
|
|
|
113
121
|
<% if (cgv) { %>
|
|
114
122
|
<%- cgv %>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","mappings":";;;;;;;AAAA;;AACA;;AAEA,MAAMA,cAAc,GAAG,IAAIC,oCAAJ,EAAvB;AAEA,MAAMC,cAAc,GAAG;;;YAGXF,cAAc,CAACG,IAAI;YACnBH,cAAc,CAACI,OAAO;;;4CAGUJ,cAAc,CAACI,OAAO;UACxDJ,cAAc,CAACG,IAAI;;;;;;;yCAOYE,qCAAoBC,GAAG;;gDAEhBD,qCAAoBE,KAAK;;gDAEzBF,qCAAoBG,OAAO;;gDAE3BH,qCAAoBI,KAAK;;gDAEzBJ,qCAAoBK,KAAK;;gDAEzBL,qCAAoBM,OAAO;;;;;mDAKxBN,qCAAoBM,OAAO;;oBAE1DN,qCAAoBC,GAAG,KAAKD,qCAAoBE,KAAK;;;;;;;2DAOdF,qCAAoBM,OAAO;;;;mDAInCN,qCAAoBC,GAAG,KAAKD,qCAAoBE,KAAK
|
|
1
|
+
{"version":3,"file":"body.js","mappings":";;;;;;;AAAA;;AACA;;AAEA,MAAMA,cAAc,GAAG,IAAIC,oCAAJ,EAAvB;AAEA,MAAMC,cAAc,GAAG;;;YAGXF,cAAc,CAACG,IAAI;YACnBH,cAAc,CAACI,OAAO;;;4CAGUJ,cAAc,CAACI,OAAO;UACxDJ,cAAc,CAACG,IAAI;;;;;;;yCAOYE,qCAAoBC,GAAG;;gDAEhBD,qCAAoBE,KAAK;;gDAEzBF,qCAAoBG,OAAO;;gDAE3BH,qCAAoBI,KAAK;;gDAEzBJ,qCAAoBK,KAAK;;gDAEzBL,qCAAoBM,OAAO;;;;;mDAKxBN,qCAAoBM,OAAO;;oBAE1DN,qCAAoBC,GAAG,KAAKD,qCAAoBE,KAAK;;;;;;;2DAOdF,qCAAoBM,OAAO;;;;mDAInCN,qCAAoBC,GAAG,KAAKD,qCAAoBE,KAAK;;;;;;;;;;;;;;;;SA3CxG;AA6DO,MAAMK,YAAY,WAAZA,YAAY,GAAG;;;;IAIxBV,cAAc;;;;;;6BAMWF,cAAc,CAACa,QAAQ;;;;;YAKxCb,cAAc,CAACc,iBAAiB;;;;;;;;;;UAUlCd,cAAc,CAACe,oBAAoB;;;8DAGiBf,cAAc,CAACgB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;QA0BlFhB,cAAc,CAACiB,KAAK;;QAtDrB","names":["commonTemplate","CommercialDocumentCommonHTML","headOfDocument","logo","company","EstimateInvoiceType","BON","DEVIS","FACTURE","AVOIR","RESTE","ACOMPTE","bodyTemplate","products","vatRecapitulation","amountRecapitulation","paymentButton","style"],"sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/body.ts"],"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 <% if (thirdParty) { %>\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.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %><br/>\n <% if(thirdParty.deliveryAddress && thirdParty.deliveryCity && thirdParty.deliveryZipCode) {%>Adresse de livraison : <%= thirdParty.deliveryAddress %> <%= thirdParty.deliveryZipCode %> <%= thirdParty.deliveryCity %><br/><% } %>\n <% if(thirdParty.nSiret) {%>SIRET : <%= thirdParty.nSiret %><% } %>\n </div>\n <% } %>\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 <div>\n ${commonTemplate.amountRecapitulation}\n\n <% if (isStripeAllowed) { %>\n <div style=\"text-align: right; margin-top: 30px;\">${commonTemplate.paymentButton}</div>\n <% } %>\n </div>\n \n </div>\n\n <% if (settings && (settings.iban || settings.bic)) { %>\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 </div>\n <% } %>\n <% if (settings && settings.bonPour) { %>\n <br/>Bon pour accord : <br/><br/><br/><br/>\n <% } %>\n\n <% if (cgv) { %>\n <%- cgv %>\n <% } %>\n </body>\n\n <style>\n ${commonTemplate.style}\n </style>\n</html>`;"]}
|
|
@@ -14,9 +14,9 @@ class CommercialDocumentCommonHTML {
|
|
|
14
14
|
this.header = `<style>html {
|
|
15
15
|
-webkit-print-color-adjust: exact;
|
|
16
16
|
}</style><% if (settings && settings.isEdgingDisplayed) { %>
|
|
17
|
-
<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>
|
|
17
|
+
<span id="header-edging" 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>
|
|
18
18
|
<% } %>`;
|
|
19
|
-
this.footer = `<div style="font-size: 8px; color: #DADCDF; text-align: center;
|
|
19
|
+
this.footer = `<div style="font-size: 8px; color: #DADCDF; text-align: center; padding: 0 40px; display: block; width: 100%">
|
|
20
20
|
<% if (freeText) { %><%- freeText %><br/><br/><% } %>
|
|
21
21
|
<% if (accountingCategoryFormatted) {%>
|
|
22
22
|
<%= accountingCategoryFormatted %> |
|
|
@@ -110,7 +110,7 @@ class CommercialDocumentCommonHTML {
|
|
|
110
110
|
</tr>
|
|
111
111
|
<% }) %>
|
|
112
112
|
</table>`;
|
|
113
|
-
this.amountRecapitulation = `<table class="summary-prices" style="width:
|
|
113
|
+
this.amountRecapitulation = `<table class="summary-prices" style="width: 100%; padding-left: 20px;">
|
|
114
114
|
<thead>
|
|
115
115
|
<tr>
|
|
116
116
|
<td colspan="2">Récapitulatif</td>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","mappings":";;;;;;;AAAA;;AACA;;AAEM,MAAOA,4BAAP,CAAmC;EAAzCC;IACE,cAAS;;;;UAAT;IAMA,cAAS;;;;;;;;;;;;;;;;;;;;;;;WAAT;IAyBA,YAAO;;SAAP;IAIA,eAAU;;;;;;yFAAV;IAQA,gBAAW;;;;;;;;;;;qCAWwBC,qCAAoBC,OAAO;;;;;;;;;;;;;;;;;;;;;;;+CAuBjBC,mCAAaC,OAAO;;;;;;;;;SAlCjE;IA6CA,yBAAoB;;;;;;;;;;;;;;;WAApB;IAiBA,4BAAuB;;;;;;qCAMYH,qCAAoBC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAgCpDD,qCAAoBI,OAAO,KAAKJ,qCAAoBK,KAAK,KAAKL,qCAAoBC,OAAO;;;;;;SAtCnG;IA8CA,qBAAgB;;;;;;;;;;aAAhB;IAYA,aAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAAR;EAwDD;;AA5NwC;;QAA5BH,4B,GAAAA,4B","names":["CommercialDocumentCommonHTML","constructor","EstimateInvoiceType","ACOMPTE","DiscountType","PERCENT","FACTURE","RESTE"],"sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/common.ts"],"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"]}
|
|
1
|
+
{"version":3,"file":"common.js","mappings":";;;;;;;AAAA;;AACA;;AAEM,MAAOA,4BAAP,CAAmC;EAAzCC;IACE,cAAS;;;;UAAT;IAMA,cAAS;;;;;;;;;;;;;;;;;;;;;;;WAAT;IAyBA,YAAO;;SAAP;IAIA,eAAU;;;;;;yFAAV;IAQA,gBAAW;;;;;;;;;;;qCAWwBC,qCAAoBC,OAAO;;;;;;;;;;;;;;;;;;;;;;;+CAuBjBC,mCAAaC,OAAO;;;;;;;;;SAlCjE;IA6CA,yBAAoB;;;;;;;;;;;;;;;WAApB;IAiBA,4BAAuB;;;;;;qCAMYH,qCAAoBC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAgCpDD,qCAAoBI,OAAO,KAAKJ,qCAAoBK,KAAK,KAAKL,qCAAoBC,OAAO;;;;;;SAtCnG;IA8CA,qBAAgB;;;;;;;;;;aAAhB;IAYA,aAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAAR;EAwDD;;AA5NwC;;QAA5BH,4B,GAAAA,4B","names":["CommercialDocumentCommonHTML","constructor","EstimateInvoiceType","ACOMPTE","DiscountType","PERCENT","FACTURE","RESTE"],"sourceRoot":"","sources":["../../../../ts/utils/commercialManagement/templates/common.ts"],"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 id=\"header-edging\" 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; padding: 0 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: 100%; padding-left: 20px;\">\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -7,7 +7,7 @@ import { Resource } from '../Resource';
|
|
|
7
7
|
|
|
8
8
|
export class Qonto extends Resource {
|
|
9
9
|
delete(idBankConnection: number): Promise<IBankAccount> {
|
|
10
|
-
return this.axios.$delete(`qonto/${idBankConnection}`);
|
|
10
|
+
return this.axios.$delete(`connectors/qonto/${idBankConnection}`);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
getInformation(queries: GetConnectionInformation): Promise<GetQontoOrganization> {
|
package/ts/api/resources.ts
CHANGED
|
@@ -95,6 +95,7 @@ import { Connection } from './resources/Connection';
|
|
|
95
95
|
import { Reminder } from './resources/Reminder';
|
|
96
96
|
import { Recurrence } from './resources/Recurrence';
|
|
97
97
|
import { Stripe } from './resources/Stripe';
|
|
98
|
+
import { File } from './resources/FIle';
|
|
98
99
|
|
|
99
100
|
export const resources = {
|
|
100
101
|
simulation: Simulation,
|
|
@@ -194,4 +195,5 @@ export const resources = {
|
|
|
194
195
|
reminder: Reminder,
|
|
195
196
|
recurrence: Recurrence,
|
|
196
197
|
stripe: Stripe,
|
|
198
|
+
file: File,
|
|
197
199
|
};
|
|
@@ -76,6 +76,9 @@ export const BrandClementine = [
|
|
|
76
76
|
vatIntracom: 'FR47752566687',
|
|
77
77
|
email: 'facturation@compta-clementine.fr',
|
|
78
78
|
},
|
|
79
|
+
webmail: {
|
|
80
|
+
domain: '@compta-clementine.fr',
|
|
81
|
+
},
|
|
79
82
|
},
|
|
80
83
|
{
|
|
81
84
|
idTypeBrand: 2,
|
|
@@ -243,6 +246,9 @@ export const BrandClementine = [
|
|
|
243
246
|
vatIntracom: 'FR58891501181',
|
|
244
247
|
email: 'facturation@pourcentage.fr',
|
|
245
248
|
},
|
|
249
|
+
webmail: {
|
|
250
|
+
domain: '@pourcentage.fr',
|
|
251
|
+
},
|
|
246
252
|
},
|
|
247
253
|
{
|
|
248
254
|
idTypeBrand: 5,
|
|
@@ -129,6 +129,9 @@ export const BrandComptalib = [
|
|
|
129
129
|
vatIntracom: 'FR58891501181',
|
|
130
130
|
email: 'facturation@pourcentage.fr',
|
|
131
131
|
},
|
|
132
|
+
webmail: {
|
|
133
|
+
domain: '@pourcentage.fr',
|
|
134
|
+
},
|
|
132
135
|
},
|
|
133
136
|
{
|
|
134
137
|
idTypeBrand: 3,
|
|
@@ -203,6 +206,9 @@ export const BrandComptalib = [
|
|
|
203
206
|
vatIntracom: 'FR58891501181',
|
|
204
207
|
email: 'bonjour@comptalib.com',
|
|
205
208
|
},
|
|
209
|
+
webmail: {
|
|
210
|
+
domain: '@lecomptablefrancais.fr',
|
|
211
|
+
},
|
|
206
212
|
},
|
|
207
213
|
{
|
|
208
214
|
idTypeBrand: 4,
|
|
@@ -10,6 +10,7 @@ export const BrandPourcentage = [
|
|
|
10
10
|
listPhones: {
|
|
11
11
|
contact: '01 86 90 82 15',
|
|
12
12
|
qualite: '01 86 90 82 15',
|
|
13
|
+
social: '01 86 90 82 15',
|
|
13
14
|
juridique: '01 86 90 82 15',
|
|
14
15
|
},
|
|
15
16
|
listMails: {
|
|
@@ -19,14 +20,14 @@ export const BrandPourcentage = [
|
|
|
19
20
|
contact: 'contact@pourcentage.fr',
|
|
20
21
|
facturation: 'facturation@pourcentage.fr',
|
|
21
22
|
feedback: 'contact@pourcentage.fr',
|
|
22
|
-
juridique: '
|
|
23
|
+
juridique: 'juridique@pourcentage.fr',
|
|
23
24
|
informatique: 'contact@pourcentage.fr',
|
|
24
25
|
msd: 'contact@pourcentage.fr',
|
|
25
26
|
noreply: 'contact@pourcentage.fr',
|
|
26
27
|
qualite: 'contact@pourcentage.fr',
|
|
27
28
|
paiement: 'contact@pourcentage.fr',
|
|
28
29
|
rh: 'rh@pourcentage.fr',
|
|
29
|
-
social: '
|
|
30
|
+
social: 'social@pourcentage.fr',
|
|
30
31
|
support: 'contact@pourcentage.fr',
|
|
31
32
|
tva: 'contact@pourcentage.fr',
|
|
32
33
|
wb: 'contact@pourcentage.fr',
|
|
@@ -45,7 +46,7 @@ export const BrandPourcentage = [
|
|
|
45
46
|
statut: 'SAS',
|
|
46
47
|
zipCode: '54 520',
|
|
47
48
|
},
|
|
48
|
-
idPrestationsListAuthorized: [197, 205, 12],
|
|
49
|
+
idPrestationsListAuthorized: [197, 205, 12, 207, 208],
|
|
49
50
|
logoUrl: 'logo-pourcentage.svg',
|
|
50
51
|
miniLogoUrl: 'logo-pourcentage-mini.svg',
|
|
51
52
|
hiddenPages: [],
|
|
@@ -299,6 +299,17 @@ export const TaskResponseType = {
|
|
|
299
299
|
responseType: ResponseType.MAIL,
|
|
300
300
|
description: 'Bilan express à envoyer au SIE.',
|
|
301
301
|
},
|
|
302
|
+
{
|
|
303
|
+
id: 16,
|
|
304
|
+
label: 'Facturation',
|
|
305
|
+
role: Role.FACTURATION,
|
|
306
|
+
deadline: Deadline,
|
|
307
|
+
isForWholeRole: true,
|
|
308
|
+
backToClient: true,
|
|
309
|
+
goToCalendar: false,
|
|
310
|
+
responseType: ResponseType.MAIL,
|
|
311
|
+
description: 'Changement de régime de TVA.',
|
|
312
|
+
},
|
|
302
313
|
],
|
|
303
314
|
|
|
304
315
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
3
|
+
import { TFile } from './TFile';
|
|
4
|
+
|
|
5
|
+
export class CreateFile {
|
|
6
|
+
@ApiProperty()
|
|
7
|
+
file?: TFile;
|
|
8
|
+
|
|
9
|
+
@ApiProperty()
|
|
10
|
+
@IsString()
|
|
11
|
+
folder: string;
|
|
12
|
+
|
|
13
|
+
@ApiProperty()
|
|
14
|
+
@IsString()
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
@@ -23,7 +23,7 @@ export class QueryRevisionAccount implements QueryPaginate {
|
|
|
23
23
|
@IsNumber()
|
|
24
24
|
limit: number;
|
|
25
25
|
|
|
26
|
-
@ApiPropertyOptional({ default: '
|
|
26
|
+
@ApiPropertyOptional({ default: 'date' })
|
|
27
27
|
@IsString()
|
|
28
28
|
@IsOptional()
|
|
29
29
|
orderBy?: 'date' | 'designation' | 'idAccount' | 'debit' | 'credit';
|
package/ts/types/index.ts
CHANGED
|
@@ -782,6 +782,8 @@ export * from './Interface/api/qonto/CreateQontoConnection';
|
|
|
782
782
|
export * from './Interface/api/qonto/GetConnectionInformation';
|
|
783
783
|
export * from './Interface/api/qonto/ProcessBankAccount';
|
|
784
784
|
export * from './Interface/api/qonto/ReadCreateConnection';
|
|
785
|
+
export * from './Interface/api/file/Create';
|
|
786
|
+
export * from './Interface/api/file/Read';
|
|
785
787
|
|
|
786
788
|
// Enums types
|
|
787
789
|
export * from './Interface/enum/Util';
|
package/ts/utils/amount.ts
CHANGED
|
@@ -9,5 +9,5 @@ export function integerToFormattedAmountString(value: number): string {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const integerWithMask = `${integer}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim();
|
|
12
|
-
return `${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;
|
|
12
|
+
return `${integer < 0 ? '- ' : ''}${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;
|
|
13
13
|
}
|
package/ts/utils/brands.ts
CHANGED
|
@@ -16,34 +16,15 @@ type getBrandConfigParams = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const getBrandNameByNodeEnv = (nodeEnv?: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' => {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const env = nodeEnv ?? process.env.NODE_ENV ?? process.env.API_HOST;
|
|
20
|
+
if (env) {
|
|
21
|
+
if (env.indexOf('legalstart') > -1 || env.indexOf('Legalstart') > -1) {
|
|
21
22
|
return 'Legalstart';
|
|
22
23
|
}
|
|
23
|
-
if (
|
|
24
|
+
if (env.indexOf('comptalib') > -1 || env.indexOf('Comptalib') > -1) {
|
|
24
25
|
return 'Comptalib';
|
|
25
26
|
}
|
|
26
|
-
if (
|
|
27
|
-
return 'Pourcentage';
|
|
28
|
-
}
|
|
29
|
-
} else if (process.env.NODE_ENV) {
|
|
30
|
-
if (process.env.NODE_ENV.indexOf('legalstart') > -1 || process.env.NODE_ENV.indexOf('Legalstart') > -1) {
|
|
31
|
-
return 'Legalstart';
|
|
32
|
-
}
|
|
33
|
-
if (process.env.NODE_ENV.indexOf('comptalib') > -1 || process.env.NODE_ENV.indexOf('Comptalib') > -1) {
|
|
34
|
-
return 'Comptalib';
|
|
35
|
-
}
|
|
36
|
-
if (process.env.NODE_ENV.indexOf('pourcentage') > -1 || process.env.NODE_ENV.indexOf('Pourcentage') > -1) {
|
|
37
|
-
return 'Pourcentage';
|
|
38
|
-
}
|
|
39
|
-
} else if (process.env.API_HOST) {
|
|
40
|
-
if (process.env.API_HOST.indexOf('legalstart') > -1 || process.env.API_HOST.indexOf('Legalstart') > -1) {
|
|
41
|
-
return 'Legalstart';
|
|
42
|
-
}
|
|
43
|
-
if (process.env.API_HOST.indexOf('comptalib') > -1 || process.env.API_HOST.indexOf('Comptalib') > -1) {
|
|
44
|
-
return 'Comptalib';
|
|
45
|
-
}
|
|
46
|
-
if (process.env.API_HOST.indexOf('pourcentage') > -1 || process.env.API_HOST.indexOf('Pourcentage') > -1) {
|
|
27
|
+
if (env.indexOf('pourcentage') > -1 || env.indexOf('Pourcentage') > -1) {
|
|
47
28
|
return 'Pourcentage';
|
|
48
29
|
}
|
|
49
30
|
}
|
|
@@ -103,11 +84,12 @@ const getBrandConfig = (params: getBrandConfigParams): brand => {
|
|
|
103
84
|
return brand;
|
|
104
85
|
};
|
|
105
86
|
|
|
106
|
-
const getBrandByEmail = (email: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' | null => {
|
|
87
|
+
const getBrandByEmail = (email: string): 'Legalstart'| 'Comptalib' | 'Clementine' | 'Pourcentage' | 'Lecomptablefrancais' | null => {
|
|
107
88
|
if (email.indexOf('legalstart.fr') > -1) return 'Legalstart';
|
|
108
89
|
if (email.indexOf('comptalib.com') > -1) return 'Comptalib';
|
|
109
90
|
if (email.indexOf('pourcentage.fr') > -1) return 'Pourcentage';
|
|
110
91
|
if (email.indexOf('compta-clementine.fr') > -1) return 'Clementine';
|
|
92
|
+
if (email.indexOf('lecomptablefrancais.fr') > -1) return 'Lecomptablefrancais';
|
|
111
93
|
return null;
|
|
112
94
|
};
|
|
113
95
|
|
|
@@ -51,14 +51,16 @@ const headOfDocument = `<div class="row space-between">
|
|
|
51
51
|
</div>
|
|
52
52
|
<div style="width: 40%; margin-top: auto;">
|
|
53
53
|
<p>Client</p>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
<% if (thirdParty) { %>
|
|
55
|
+
<div class="<%= settings && settings.isCoordinatesFrameDisplayed ? 'customer-border' : '' %>">
|
|
56
|
+
<% if(thirdParty.fullname) {%><b><%= thirdParty.fullname %></b><br/><% } %>
|
|
57
|
+
<% if(thirdParty.company) {%><%= thirdParty.company %><br/><% } %>
|
|
58
|
+
<% if(thirdParty.address) {%><%= thirdParty.address %><br/><% } %>
|
|
59
|
+
<% if(thirdParty.zipCode) {%><%= thirdParty.zipCode + ' ' %><% } %><%= thirdParty.city %><br/>
|
|
60
|
+
<% if(thirdParty.deliveryAddress && thirdParty.deliveryCity && thirdParty.deliveryZipCode) {%>Adresse de livraison : <%= thirdParty.deliveryAddress %> <%= thirdParty.deliveryZipCode %> <%= thirdParty.deliveryCity %><br/><% } %>
|
|
61
|
+
<% if(thirdParty.nSiret) {%>SIRET : <%= thirdParty.nSiret %><% } %>
|
|
62
|
+
</div>
|
|
63
|
+
<% } %>
|
|
62
64
|
</div>
|
|
63
65
|
</div>`;
|
|
64
66
|
|
|
@@ -86,11 +88,17 @@ export const bodyTemplate = `<html>
|
|
|
86
88
|
<% } %>
|
|
87
89
|
</div>
|
|
88
90
|
|
|
89
|
-
|
|
91
|
+
<div>
|
|
92
|
+
${commonTemplate.amountRecapitulation}
|
|
93
|
+
|
|
94
|
+
<% if (isStripeAllowed) { %>
|
|
95
|
+
<div style="text-align: right; margin-top: 30px;">${commonTemplate.paymentButton}</div>
|
|
96
|
+
<% } %>
|
|
97
|
+
</div>
|
|
90
98
|
|
|
91
99
|
</div>
|
|
92
100
|
|
|
93
|
-
<% if (
|
|
101
|
+
<% if (settings && (settings.iban || settings.bic)) { %>
|
|
94
102
|
<div class="row mt-30 space-between" style="page-break-inside: avoid !important;">
|
|
95
103
|
<div>
|
|
96
104
|
<% if (settings && (settings.iban || settings.bic)) { %>
|
|
@@ -98,11 +106,11 @@ export const bodyTemplate = `<html>
|
|
|
98
106
|
<% if(settings.bic) { %>BIC : <%= settings.bic %><% } %>
|
|
99
107
|
<% } %>
|
|
100
108
|
</div>
|
|
101
|
-
<% if (isStripeAllowed) { %>
|
|
102
|
-
<div style="text-align: right">${commonTemplate.paymentButton}</div>
|
|
103
|
-
<% } %>
|
|
104
109
|
</div>
|
|
105
110
|
<% } %>
|
|
111
|
+
<% if (settings && settings.bonPour) { %>
|
|
112
|
+
<br/>Bon pour accord : <br/><br/><br/><br/>
|
|
113
|
+
<% } %>
|
|
106
114
|
|
|
107
115
|
<% if (cgv) { %>
|
|
108
116
|
<%- cgv %>
|
|
@@ -5,10 +5,10 @@ export class CommercialDocumentCommonHTML {
|
|
|
5
5
|
header = `<style>html {
|
|
6
6
|
-webkit-print-color-adjust: exact;
|
|
7
7
|
}</style><% if (settings && settings.isEdgingDisplayed) { %>
|
|
8
|
-
<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>
|
|
8
|
+
<span id="header-edging" 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>
|
|
9
9
|
<% } %>`;
|
|
10
10
|
|
|
11
|
-
footer = `<div style="font-size: 8px; color: #DADCDF; text-align: center;
|
|
11
|
+
footer = `<div style="font-size: 8px; color: #DADCDF; text-align: center; padding: 0 40px; display: block; width: 100%">
|
|
12
12
|
<% if (freeText) { %><%- freeText %><br/><br/><% } %>
|
|
13
13
|
<% if (accountingCategoryFormatted) {%>
|
|
14
14
|
<%= accountingCategoryFormatted %> |
|
|
@@ -107,7 +107,7 @@ export class CommercialDocumentCommonHTML {
|
|
|
107
107
|
<% }) %>
|
|
108
108
|
</table>`;
|
|
109
109
|
|
|
110
|
-
amountRecapitulation = `<table class="summary-prices" style="width:
|
|
110
|
+
amountRecapitulation = `<table class="summary-prices" style="width: 100%; padding-left: 20px;">
|
|
111
111
|
<thead>
|
|
112
112
|
<tr>
|
|
113
113
|
<td colspan="2">Récapitulatif</td>
|