Value |
array:7 [
"@context" => "/api/contexts/Template"
"@id" => "/api/templates"
"@type" => "hydra:Collection"
"hydra:member" => array:1 [
0 => array:6 [
"@id" => "/api/templates/0246345ae9e34e0e9bc2bfb20a6e7376"
"@type" => "Template"
"id" => "0246345ae9e34e0e9bc2bfb20a6e7376"
"name" => "Modèle de devis"
"customerId" => "e8919dbc01f34f79ab22b9c434f114eb"
"content" => """
{% set quoteAddress = '' %}\n
{% set quoteCity = '' %}\n
{% set quotePostalCode = '' %}\n
{% set quoteBuildingName = '' %}\n
{% set quoteOfferType = '' %}\n
{% set quoteMissionType = '' %}\n
{% set quoteAgency = '' %}\n
{% set quoteEntity = '' %}\n
\n
{% for specificField in quote.specificFields|default([]) %}\n
{% if specificField.fieldName == "Adresse" %}\n
{% set quoteAddress = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Ville" %}\n
{% set quoteCity = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Code postal" %}\n
{% set quotePostalCode = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Nom du bâtiment" %}\n
{% set quoteBuildingName = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Type d'offre" %}\n
{% set quoteOfferType = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Type de mission" %}\n
{% set quoteMissionType = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Agence" %}\n
{% set quoteAgency = specificField.value|default('') %}\n
{% endif %}\n
{% if specificField.fieldName == "Entite" %}\n
{% set quoteEntity = specificField.value|default('') %}\n
{% endif %}\n
{% endfor %}\n
\n
{% set agencyCity = '' %}\n
\n
{% if quoteAgency|upper == "AGA" %}\n
{% set agencyCity = "Annecy" %}\n
{% elseif quoteAgency|upper == "AGG" or quoteAgency|upper == "RVI" %}\n
{% set agencyCity = "Grenoble" %}\n
{% elseif quoteAgency|upper == "AGC" or quoteAgency|upper == "AGB" %}\n
{% set agencyCity = "Chambéry" %}\n
{% elseif quoteAgency|upper == "AGV" %}\n
{% set agencyCity = "Vienne" %}\n
{% elseif quoteAgency|upper == "AGL" %}\n
{% set agencyCity = "Villeurbanne" %}\n
{% elseif quoteAgency|upper == "AGS" %}\n
{% set agencyCity = "Sallanches" %}\n
{% endif %}\n
\n
{% set logoImg = gedImageByPath('CHARTE GRAPHIQUE/' ~ quoteAgency ~ '/' ~ quoteEntity ~ '/logo.png') %}\n
{% set footerImg = gedImageByPath('CHARTE GRAPHIQUE/' ~ quoteAgency ~ '/' ~ quoteEntity ~ '/footer.png') %}\n
\n
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta charset="UTF-8">\n
</head>\n
<body>\n
{# All styles must be in CSS2 #}\n
<style>\n
@page {\n
margin: 5cm 1cm 2.5cm 1cm;\n
}\n
\n
html {\n
font-size: 14px;\n
font-family: Arial, sans-serif;\n
color: #545454;\n
}\n
\n
p {\n
line-height: 1.3;\n
margin: unset;\n
}\n
\n
h1,\n
h2,\n
h3 {\n
text-align: center;\n
background: #0f243e;\n
padding: 0.5rem;\n
color: #fff;\n
}\n
\n
h1 {\n
font-size: 1.4rem;\n
}\n
\n
h2 {\n
font-size: 1.1rem;\n
}\n
\n
h3 {\n
padding-top: 0.3rem;\n
padding-bottom: 0.3rem;\n
font-size: 0.9rem;\n
}\n
\n
.break-before {\n
page-break-before: always;\n
}\n
\n
.break-after {\n
page-break-after: always;\n
}\n
\n
.underline {\n
text-decoration: underline;\n
}\n
\n
.pdf-template__header {\n
position: fixed;\n
z-index: -2;\n
top: -4cm;\n
left: 0;\n
right: 0;\n
height: 4cm;\n
}\n
\n
.pdf-template__header > div {\n
display: inline-block;\n
vertical-align: middle;\n
}\n
\n
.pdf-template__header > div:first-child {\n
width: 35%;\n
}\n
\n
.pdf-template__header > div:last-child {\n
width: 64%;\n
text-align: right;\n
font-size: 0.8rem;\n
}\n
\n
.pdf-template__header img {\n
height: 100%;\n
object-fit: contain;\n
}\n
\n
.pdf-template__footer {\n
position: fixed;\n
left: -1cm;\n
right: -1cm;\n
bottom: -2.5cm;\n
height: 2.5cm;\n
}\n
\n
.pdf-template__footer img {\n
max-height: 2.5cm;\n
width: 100%;\n
object-fit: contain;\n
}\n
\n
.pdf-template__footer .page__number {\n
position: absolute;\n
z-index: 1;\n
right: 0.5rem;\n
bottom: 0.5rem;\n
font-size: 0.7rem;\n
}\n
\n
.pdf-template__footer .page__number:after {\n
content: counter(page, decimal);\n
}\n
\n
.pdf-template__body {\n
margin-top: 3.5cm;\n
}\n
\n
.block-header-first-page {\n
position: absolute;\n
top: -5cm;\n
padding-top: 1cm;\n
left: 0;\n
right: 0;\n
background: #fff;\n
}\n
\n
.block-header-first-page:after {\n
content: "";\n
display: table;\n
clear: both;\n
}\n
\n
.block-logo-first-page img {\n
height: 5cm;\n
max-width: 8cm;\n
object-fit: contain;\n
}\n
\n
.block-header-first-page .block-logo-first-page,\n
.block-header-first-page .block-sender {\n
float: left;\n
width: 50%;\n
}\n
\n
.block-header-first-page .block-sender {\n
margin-top: 3.5cm;\n
font-weight: bold;\n
}\n
\n
.block-header-first-page .block-sender p {\n
line-height: 1.2;\n
}\n
\n
.block-city-date {\n
display: inline-block;\n
margin-left: 50%;\n
margin-bottom: 2rem;\n
}\n
\n
.block-receiver {\n
margin-bottom: 3rem;\n
}\n
\n
.block-receiver p {\n
line-height: 1.1;\n
}\n
\n
.block-description p {\n
line-height: 3;\n
}\n
\n
.block-signature {\n
margin-top: 2rem;\n
margin-left: 60%;\n
font-size: 0.85rem;\n
}\n
\n
.block-table {\n
margin-top: 3rem;\n
margin-bottom: 3rem;\n
}\n
\n
.block-table table {\n
width: 100%;\n
border-collapse: collapse;\n
page-break-inside: avoid;\n
}\n
\n
.table__price {\n
text-align: right;\n
}\n
\n
.block-table table th,\n
.block-table table td {\n
border: 1px solid #545454;\n
padding: 0.25rem 0.4rem;\n
page-break-inside: auto;\n
}\n
\n
.block-table table th {\n
font-weight: normal;\n
white-space: nowrap;\n
}\n
\n
.block-table table th:first-child {\n
border-top: none;\n
border-left: none;\n
}\n
\n
.block-table table th:last-child {\n
background: #ececec;\n
color: #545454;\n
width: 25%;\n
}\n
\n
.block-table table td {\n
text-align: right;\n
font-size: 0.9rem;\n
}\n
\n
.block-table table td:first-child {\n
text-align: left;\n
}\n
\n
.block-table-full {\n
margin-top: 2rem;\n
margin-bottom: 2rem;\n
}\n
\n
.block-table-full table {\n
page-break-inside: avoid;\n
width: 100%;\n
border-collapse: collapse;\n
}\n
\n
.block-table-full table th,\n
.block-table-full table td {\n
border: 1px solid #545454;\n
padding: 0.25rem 0.4rem;\n
}\n
\n
.block-table-full table td {\n
text-align: right;\n
}\n
\n
.block-table-full table td:first-child {\n
text-align: left;\n
}\n
\n
.block-table-full table tfoot td:first-child {\n
text-align: right;\n
padding: unset;\n
}\n
\n
.block-table-full table tfoot td:first-child > span {\n
background: #d9d9d9;\n
padding: 0.25rem 0.4rem;\n
}\n
\n
.block-table-full table th {\n
white-space: nowrap;\n
}\n
\n
.block-table-full table tr:first-of-type th:last-child {\n
background: #d9d9d9;\n
color: #545454;\n
}\n
\n
.raw-render {\n
line-height: 1;\n
text-align: justify;\n
}\n
\n
.small {\n
font-size: 0.85rem;\n
}\n
\n
.linethrough {\n
text-decoration: line-through;\n
}\n
\n
.block-two-columns {\n
margin-top: 3rem;\n
margin-bottom: 3rem;\n
}\n
\n
.block-two-columns > div {\n
display: inline-block;\n
vertical-align: top;\n
word-break: break-all;\n
}\n
\n
.block-two-columns > div:first-child {\n
width: 38%;\n
}\n
\n
.block-index-table table {\n
width: 100%;\n
border-collapse: collapse;\n
}\n
\n
.block-index-table table th,\n
.block-index-table table td {\n
border: 1px solid #545454;\n
padding: 0.25rem 0.4rem;\n
text-align: center;\n
}\n
\n
.block-index-table table th:last-child,\n
.block-index-table table td:last-child {\n
text-align: left;\n
}\n
\n
.block-observations,\n
.block-conditions {\n
page-break-inside: auto;\n
}\n
\n
.block-conditions {\n
margin-top: 3rem;\n
}\n
\n
.block-quote-signature {\n
margin-top: 2rem;\n
margin-left: 20%;\n
}\n
\n
.block-agreement {\n
page-break-inside: avoid;\n
margin-top: 3rem;\n
border: 2px solid #545454;\n
padding: 0 1rem;\n
}\n
\n
.block-agreement > div {\n
margin-bottom: 7rem;\n
}\n
\n
.block-agreement .block-two-columns > div:first-child {\n
width: 45%;\n
}\n
\n
.block-agreement > p:last-of-type {\n
margin-bottom: 8rem;\n
}\n
\n
.row-wrap:empty {\n
display: none;\n
}\n
\n
.row-wrap {\n
min-height: 6rem;\n
padding-top: 1.5rem;\n
padding-bottom: 1rem;\n
vertical-align: middle;\n
font-weight: bold;\n
}\n
\n
.row-wrap .item {\n
display: inline-block;\n
height: 6rem;\n
line-height: 6rem;\n
vertical-align: middle;\n
width: auto;\n
margin-right: 1.5rem;\n
margin-bottom: 1.5rem;\n
}\n
\n
.row-wrap .item:last-child {\n
margin-right: 0;\n
}\n
</style>\n
\n
<header class="pdf-template__header">\n
<div>\n
<img src="{{ logoImg|default('') }}" alt="logo">\n
</div>\n
<div>\n
<p><b>PROPOSITION D'HONORAIRES</b></p>\n
<p>{{ quoteBuildingName|upper }}</p>\n
<p><b>{{ quoteMissionType }}</b></p>\n
</div>\n
</header>\n
\n
<footer class="pdf-template__footer">\n
<img src="{{ footerImg|default('') }}" alt="footer">\n
<span class="page__number">Page </span>\n
</footer>\n
\n
<div class="pdf-template__body">\n
<div class="block-header-first-page">\n
<div class="block-logo-first-page">\n
<img src="{{ logoImg|default('') }}" alt="logo">\n
</div>\n
<div class="block-sender">\n
<p>{{ quote.prospect.fullName|default('') }}</p>\n
<p>À l'attention de {{ quote.contactIdRealName|default('') }}</p>\n
{% if quote.prospect.contact.mainAddress.address is defined or quote.prospect.contact.mainAddress.city is defined or quote.prospect.contact.mainAddress.postalCode is defined %}\n
<p>{{ quote.prospect.contact.mainAddress.address|default('') }}</p>\n
<p>{{ quote.prospect.contact.mainAddress.postalCode|default('') }} {{ quote.prospect.contact.mainAddress.city|default('') }}</p>\n
{% endif %}\n
</div>\n
</div>\n
<div class="block-city-date">\n
<p>{{ agencyCity|length > 0 ? agencyCity ~ ', le' : 'Le' }} {{ 'now'|date('d/m/Y') }}</p>\n
</div>\n
<div class="block-receiver">\n
<p>{{ quoteBuildingName|upper }}</p>\n
<p>{{ quoteAddress }}</p>\n
<p>{{ quotePostalCode }} {{ quoteCity }}</p>\n
<p><b>{{ quoteMissionType }}</b></p>\n
</div>\n
<div class="block-description">\n
{% set civility = 'Madame, Monsieur' %}\n
{% if contactConcerned is defined %}\n
{% set civility = contactConcerned.civility.value|default('Madame, Monsieur') %}\n
{% endif %}\n
<p>{{ civility }},</p>\n
<br>\n
<p>Pour faire suite à votre demande, nous avons le plaisir de vous adresser notre proposition d'honoraires.</p>\n
<p>Nous restons à votre disposition pour vous apporter toutes précisions utiles.</p>\n
<p>Nous vous prions d'agréer, {{ civility }}, nos respectueuses salutations.</p>\n
</div>\n
<div class="block-signature break-after">\n
<div>\n
<p><b>{{ managedBy.fullname|default('') }}</b></p>\n
<p><em>{{ managedBy.job|default('') }}</em></p>\n
</div>\n
</div>\n
\n
{# ---- PAGE BREAK ---- #}\n
\n
{% set coContractors = [] %}\n
{% for sectionName, quoteLines in quoteLinesBySection|default([]) %}\n
{% for quoteLine in quoteLines|default([]) %}\n
{% if quoteLine.quoteLineInfo.product.categories|length > 0 %}\n
{% set isObservationProduct = false %}\n
{% for category in quoteLine.quoteLineInfo.product.categories %}\n
{% if category.id == "eb31972e5c9a4702877fb7014a26fa6d" %}\n
{% set isObservationProduct = true %}\n
{% endif %}\n
{% endfor %}\n
{% if isObservationProduct and quoteLine.description|default('')|length > 0 %}\n
<div class="block-observations">\n
<div class="raw-render small">\n
{{ quoteLine.description|raw }}\n
</div>\n
</div>\n
{% endif %}\n
{% endif %}\n
{% endfor %}\n
\n
{% set sectionName = sectionName|split('|') %}\n
{% if sectionName[1] is defined %}\n
{% set sectionName = sectionName[1] %}\n
{% else %}\n
{% set sectionName = sectionName[0] %}\n
{% endif %}\n
\n
{% if sectionName|lower != 'default' %}\n
{# si la première lettre de sectionName est un a, e, i, o, u, y, h, on met l'apostrophe #}\n
{% set elision = sectionName|slice(0, 1)|lower in ['a', 'e', 'i', 'o', 'u', 'y', 'h'] ? "D'" : "DE " %}\n
<h2>PHASE {{ elision ~ sectionName|upper }} de votre projet</h2>\n
{% endif %}\n
\n
{% for quoteLine in quoteLines|default([]) %}\n
{% set isOptionalProduct = false %}\n
{% set isQuotePart = false %}\n
{% if quoteLine.isOptional and quoteLine.quoteLineInfo.product is defined %}\n
{% set isOptionalProduct = true %}\n
{% for specificField in quoteLine.quoteLineInfo.product.specificFields %}\n
{% if specificField.fieldId == "7100aa47620a4eb29180c4611e71616d" and specificField.value == "1" %}\n
{% set isOptionalProduct = false %}\n
{% set isQuotePart = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
{% set isObservationProduct = false %}\n
{% if quoteLine.quoteLineInfo.product.categories is defined and quoteLine.quoteLineInfo.product.categories|default([])|length > 0 %}\n
{% for category in quoteLine.quoteLineInfo.product.categories %}\n
{% if category.id == "eb31972e5c9a4702877fb7014a26fa6d" %}\n
{% set isObservationProduct = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
{% if not isOptionalProduct and not isObservationProduct %}\n
{% set splittedName = quoteLine.name|default('')|split('% ') %}\n
{% if quoteLine.quoteLineInfo.quoteLineInfoProductAttributes is defined %}\n
{% set currentCoContractor = null %}\n
{% set currentCoContractorIndex = 0 %}\n
{% for productAttribute in quoteLine.quoteLineInfo.quoteLineInfoProductAttributes %}\n
{% if productAttribute.productAttributeLabel|split('|')[0] == 'Nombre de jours' and productAttribute.value > 0 and productAttribute.productAttribute.groupCode not in coContractors %}\n
{% set coContractors = coContractors|merge([productAttribute.productAttribute.groupCode]) %}\n
{% endif %}\n
{% if productAttribute.productAttributeLabel|split('|')[0] == 'Nom entreprise' and productAttribute.value is not null and productAttribute.value not in coContractors %}\n
{% set currentCoContractor = productAttribute.value %}\n
{% set currentCoContractorIndex = productAttribute.productAttributeLabel|split('|')[1] %}\n
{% endif %}\n
{% if productAttribute.productAttributeLabel|split('|')[0] == 'Co-traitant' and productAttribute.value == 'true' and currentCoContractorIndex == productAttribute.productAttributeLabel|split('|')[1] %}\n
{% set coContractors = coContractors|merge([currentCoContractor]) %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
<div class="block-table">\n
<table>\n
<thead>\n
<tr>\n
<th></th>\n
<th>Montant HT</th>\n
</tr>\n
</thead>\n
<tbody>\n
<tr>\n
<td>\n
<p><b>{{ quoteLine.comment|default('')|raw|nl2br }}</b></p>\n
</td>\n
<td>\n
<div class="table__price">\n
{% if isQuotePart and splittedName|length > 1 %}\n
{{ splittedName[0] }}% du montant HT des travaux\n
{% else %}\n
{% if quoteLine.discountAmount > 0 %}\n
<p class="small linethrough">\n
{{ quoteLine.totalExclDiscountAndVat|default(0)|number_format(2, ',', ' ') }} €\n
</p>\n
{% endif %}\n
{{ quoteLine.totalExclVat|default(0)|number_format(2, ',', ' ') }} €\n
{% endif %}\n
</div>\n
</td>\n
</tr>\n
</tbody>\n
</table>\n
<div class="raw-render small">\n
{{ quoteLine.description|default('')|raw }}\n
</div>\n
</div>\n
{% endif %}\n
{% endfor %}\n
\n
{% set hasOptionalProduct = false %}\n
{% for quoteLine in quoteLines|default([]) %}\n
{% set rowIsPercentage = false %}\n
{% for specificField in quoteLine.quoteLineInfo.product.specificFields|default({}) %}\n
{% if specificField.fieldId == "7100aa47620a4eb29180c4611e71616d" and specificField.value == "1" %} {# Article de surcôte (attributs en %) #}\n
{% set rowIsPercentage = true %}\n
{% endif %}\n
{% endfor %}\n
\n
{% if not rowIsPercentage and quoteLine.isOptional and quoteLine.quoteLineInfo.product is defined %}\n
{% set hasOptionalProduct = true %}\n
{% endif %}\n
{% endfor %}\n
\n
<div class="block-table-full {{ hasOptionalProduct ? '' : 'break-after' }}">\n
<table>\n
<thead>\n
<tr>\n
<th colspan="5">\n
{{ sectionName|lower != 'default' ? sectionName ~ ' -' : '' }} Total des honoraires - Options\n
non comprises\n
</th>\n
</tr>\n
<tr>\n
<th>Mission</th>\n
<th>MONTANT HT</th>\n
<th>Montant TVA</th>\n
<th>Taux TVA</th>\n
<th>MONTANT TTC</th>\n
</tr>\n
</thead>\n
<tbody>\n
{% set totalExclVat = 0 %}\n
{% set totalVat = 0 %}\n
{% for quoteLine in quoteLines|default([]) %}\n
{% set isOptionalProduct = false %}\n
{% set isQuotePart = false %}\n
{% if quoteLine.isOptional and quoteLine.quoteLineInfo.product is defined %}\n
{% set isOptionalProduct = true %}\n
{% for specificField in quoteLine.quoteLineInfo.product.specificFields %}\n
{% if specificField.fieldId == "7100aa47620a4eb29180c4611e71616d" and specificField.value == "1" %}\n
{% set isOptionalProduct = false %}\n
{% set isQuotePart = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
{% set isObservationProduct = false %}\n
{% if quoteLine.quoteLineInfo.product.categories is defined and quoteLine.quoteLineInfo.product.categories|default([])|length > 0 %}\n
{% for category in quoteLine.quoteLineInfo.product.categories %}\n
{% if category.id == "eb31972e5c9a4702877fb7014a26fa6d" %}\n
{% set isObservationProduct = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
{% if not isOptionalProduct and not isObservationProduct %}\n
{% set totalExclVat = totalExclVat + quoteLine.totalExclVat|default(0) %}\n
{% set totalVat = isQuotePart ? totalVat : totalVat + quoteLine.total|default(0) %}\n
{% set splittedName = quoteLine.name|default('')|split('% ') %}\n
<tr>\n
<td>\n
{{ quoteLine.comment|default('')|raw|nl2br }}\n
</td>\n
<td>\n
{% if isQuotePart and splittedName|length > 1 %}\n
{{ splittedName[0] }}% du montant HT des travaux\n
{% else %}\n
{{ quoteLine.totalExclVat|default(0)|number_format(2, ',', ' ') }} €\n
{% endif %}\n
</td>\n
<td>\n
{% if not isQuotePart %}\n
{{ quoteLine.vatAmount|default(0)|number_format(2, ',', ' ') }} €\n
{% endif %}\n
</td>\n
<td>\n
{% if not isQuotePart %}\n
{{ quoteLine.vatRate|default('') }}\n
{% endif %}\n
</td>\n
<td>\n
{% if not isQuotePart %}\n
{{ quoteLine.total|default(0)|number_format(2, ',', ' ') }} €\n
{% endif %}\n
</td>\n
</tr>\n
{% endif %}\n
{% endfor %}\n
</tbody>\n
{% if totalVat > 0 %}\n
<tfoot>\n
<tr>\n
<td colspan="4">\n
<span>TOTAL</span>\n
</td>\n
<td>{{ totalVat|number_format(2, ',', ' ') }} €</td>\n
</tr>\n
</tfoot>\n
{% endif %}\n
</table>\n
</div>\n
\n
{% if hasOptionalProduct %}\n
<h3 class="break-before">OPTIONS de votre projet</h3>\n
{% for quoteLine in quoteLines|default([]) %}\n
{% set isOptionalProduct = false %}\n
{% set isQuotePart = false %}\n
{% if quoteLine.isOptional and quoteLine.quoteLineInfo.product is defined %}\n
{% set isOptionalProduct = true %}\n
{% for specificField in quoteLine.quoteLineInfo.product.specificFields %}\n
{% if specificField.fieldId == "7100aa47620a4eb29180c4611e71616d" and specificField.value == "1" %}\n
{% set isOptionalProduct = false %}\n
{% set isQuotePart = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
{% set isObservationProduct = false %}\n
{% if quoteLine.quoteLineInfo.product.categories is defined and quoteLine.quoteLineInfo.product.categories|default([])|length > 0 %}\n
{% for category in quoteLine.quoteLineInfo.product.categories %}\n
{% if category.id == "eb31972e5c9a4702877fb7014a26fa6d" %}\n
{% set isObservationProduct = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
{% if isOptionalProduct and not isObservationProduct %}\n
{% set splittedName = quoteLine.name|default('')|split('% ') %}\n
{% if quoteLine.quoteLineInfo.quoteLineInfoProductAttributes is defined %}\n
{% set currentCoContractor = null %}\n
{% set currentCoContractorIndex = 0 %}\n
{% for productAttribute in quoteLine.quoteLineInfo.quoteLineInfoProductAttributes %}\n
{% if productAttribute.productAttributeLabel|split('|')[0] == 'Nombre de jours' and productAttribute.value > 0 and productAttribute.productAttribute.groupCode not in coContractors %}\n
{% set coContractors = coContractors|merge([productAttribute.productAttribute.groupCode]) %}\n
{% endif %}\n
{% if productAttribute.productAttributeLabel|split('|')[0] == 'Nom entreprise' and productAttribute.value is not null and productAttribute.value not in coContractors %}\n
{% set currentCoContractor = productAttribute.value %}\n
{% set currentCoContractorIndex = productAttribute.productAttributeLabel|split('|')[1] %}\n
{% endif %}\n
{% if productAttribute.productAttributeLabel|split('|')[0] == 'Co-traitant' and productAttribute.value == 'true' and currentCoContractorIndex == productAttribute.productAttributeLabel|split('|')[1] %}\n
{% set coContractors = coContractors|merge([currentCoContractor]) %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
<div class="block-table">\n
<table>\n
<thead>\n
<tr>\n
<th></th>\n
<th>Montant HT</th>\n
</tr>\n
</thead>\n
<tbody>\n
<tr>\n
<td>\n
<p><b>{{ quoteLine.comment|default('')|raw|nl2br }}</b></p>\n
</td>\n
<td>\n
<div class="table__price">\n
{% if isQuotePart and splittedName|length > 1 %}\n
{{ splittedName[0] }}% du montant HT des travaux\n
{% else %}\n
{% if quoteLine.discountAmount > 0 %}\n
<p class="small linethrough">\n
{{ quoteLine.totalExclDiscountAndVat|default(0)|number_format(2, ',', ' ') }} €\n
</p>\n
{% endif %}\n
{{ quoteLine.totalExclVat|default(0)|number_format(2, ',', ' ') }} €\n
{% endif %}\n
</div>\n
</td>\n
</tr>\n
</tbody>\n
</table>\n
<div class="raw-render small">\n
{{ quoteLine.description|default('')|raw }}\n
</div>\n
</div>\n
{% endif %}\n
{% endfor %}\n
\n
<div class="block-table-full break-after">\n
<table>\n
<thead>\n
<tr>\n
<th colspan="5">\n
{{ sectionName|lower != 'default' ? sectionName ~ ' -' : '' }} Total des options\n
</th>\n
</tr>\n
<tr>\n
<th>Mission</th>\n
<th>MONTANT HT</th>\n
<th>Montant TVA</th>\n
<th>Taux TVA</th>\n
<th>MONTANT TTC</th>\n
</tr>\n
</thead>\n
<tbody>\n
{% set totalExclVat = 0 %}\n
{% set totalVat = 0 %}\n
{% for quoteLine in quoteLines|default([]) %}\n
{% set isOptionalProduct = false %}\n
{% if quoteLine.isOptional and quoteLine.quoteLineInfo.product is defined %}\n
{% set isOptionalProduct = true %}\n
{% for specificField in quoteLine.quoteLineInfo.product.specificFields %}\n
{% if specificField.fieldId == "7100aa47620a4eb29180c4611e71616d" and specificField.value == "1" %}\n
{% set isOptionalProduct = false %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
\n
{% set isObservationProduct = false %}\n
{% if quoteLine.quoteLineInfo.product.categories is defined and quoteLine.quoteLineInfo.product.categories|default([])|length > 0 %}\n
{% for category in quoteLine.quoteLineInfo.product.categories %}\n
{% if category.id == "eb31972e5c9a4702877fb7014a26fa6d" %}\n
{% set isObservationProduct = true %}\n
{% endif %}\n
{% endfor %}\n
{% endif %}\n
{% if isOptionalProduct and not isObservationProduct %}\n
{% set totalExclVat = totalExclVat + quoteLine.totalExclVat|default(0) %}\n
{% set totalVat = totalVat + quoteLine.total|default(0) %}\n
<tr>\n
<td>{{ quoteLine.comment|default('')|raw|nl2br }}</td>\n
<td>{{ quoteLine.totalExclVat|default(0)|number_format(2, ',', ' ') }} €</td>\n
<td>\n
{{ quoteLine.vatAmount|default(0)|number_format(2, ',', ' ') }} €\n
</td>\n
<td>{{ quoteLine.vatRate|default('') }}</td>\n
<td>{{ quoteLine.total|default(0)|number_format(2, ',', ' ') }} €</td>\n
</tr>\n
{% endif %}\n
{% endfor %}\n
</tbody>\n
{% if totalVat > 0 %}\n
<tfoot>\n
<tr>\n
<td colspan="4">\n
<span>TOTAL</span>\n
</td>\n
<td>{{ totalVat|number_format(2, ',', ' ') }} €</td>\n
</tr>\n
</tfoot>\n
{% endif %}\n
</table>\n
</div>\n
{% endif %}\n
{% endfor %}\n
\n
{# ---- PAGE BREAK ---- #}\n
\n
<div class="block-quote-signature">\n
<p>{{ agencyCity|length > 0 ? agencyCity ~ ', le' : 'Le' }} {{ 'now'|date('d/m/Y') }}</p>\n
</div>\n
<div class="block-agreement break-after">\n
<div class="block-two-columns">\n
<div>\n
<p><b>BON POUR ACCORD le ........../........../..........</b></p>\n
</div>\n
<div>\n
<p>\n
<em>Le Maître d'Ouvrage ou son Représentant</em>\n
<br>\n
<em>Signature et cachet :</em>\n
</p>\n
</div>\n
</div>\n
<p>Décision quant à l'option chiffrée : VALIDÉE / NON VALIDÉE</p>\n
<p>Observations éventuelles :</p>\n
</div>\n
\n
{# ---- PAGE BREAK ---- #}\n
\n
<div class="block-conditions">\n
<p class="underline"><b>CONDITIONS :</b></p>\n
<br>\n
{% if coContractors|length > 0 %}\n
<p><b class="underline small">Membres du groupement concernés par cette mission :</b></p>\n
<br>\n
<div class="row-wrap">{% for coContractor in coContractors %} {# Ne pas mettre for à la ligne pour éviter les espaces interne et que :empty fonctionne #}\n
{% set imgCoContractor = gedImageByPath('CHARTE GRAPHIQUE/CO-TRAITANTS/' ~ coContractor ~ '.png')|default('') %}\n
{% if imgCoContractor|length > 0 %}\n
<img class="item" height="6rem" width="auto" src="{{ imgCoContractor }}"\n
alt="logo {{ coContractor }}">\n
{% else %}\n
<p class="item">{{ coContractor }}</p>\n
{% endif %}\n
{% endfor %}</div>\n
{% endif %}\n
<br>\n
<div class="raw-render small">\n
{{ quote.terms|default('')|raw }}\n
</div>\n
</div>\n
</div>\n
</body>\n
</html>
"""
]
]
"hydra:totalItems" => 1
"hydra:view" => array:2 [
"@id" => "/api/templates?customerId=e8919dbc01f34f79ab22b9c434f114eb"
"@type" => "hydra:PartialCollectionView"
]
"hydra:search" => array:4 [
"@type" => "hydra:IriTemplate"
"hydra:template" => "/api/templates{?id,id[],customerId,customerId[]}"
"hydra:variableRepresentation" => "BasicRepresentation"
"hydra:mapping" => array:4 [
0 => array:4 [
"@type" => "IriTemplateMapping"
"variable" => "id"
"property" => "id"
"required" => false
]
1 => array:4 [
"@type" => "IriTemplateMapping"
"variable" => "id[]"
"property" => "id"
"required" => false
]
2 => array:4 [
"@type" => "IriTemplateMapping"
"variable" => "customerId"
"property" => "customerId"
"required" => false
]
3 => array:4 [
"@type" => "IriTemplateMapping"
"variable" => "customerId[]"
"property" => "customerId"
"required" => false
]
]
]
]
|