fix: HTML dans job_detail - lignes complexes écrites directement
Deploy via Portainer / deploy (push) Successful in 0s
Deploy via Portainer / deploy (push) Successful in 0s
This commit is contained in:
@@ -101,20 +101,36 @@
|
||||
{% set prix_ht_net = prix_ttc - (job.tva_amount or 0) %}
|
||||
{% set marge_pct_ht = (tot_m / prix_ht_net * 100)|round(1) if prix_ht_net > 0 else 0 %}
|
||||
|
||||
{# Macro pour une ligne simple (label = texte pur) #}
|
||||
{# Pour les labels avec HTML, les lignes sont écrites directement ci-dessous #}
|
||||
|
||||
<!-- Cout fixe -->
|
||||
<div class="breakdown-row section-header"><span>Cout fixe</span></div>
|
||||
{{ brow('Matiere' + (' <small class="text-secondary">' + job.material_name + '</small>' if job.material_name else ''), job.material_cost, '', 4) }}
|
||||
{{ brow('Marge matiere', job.material_margin, '', 4) }}
|
||||
{{ brow('Usure machine', job.wear_cost, '', 4) }}
|
||||
{{ brow('Electricite', job.electricity_cost, '', 4) }}
|
||||
{{ brow('<span class="fw-semibold">Total cout fixe</span>', cout_f, 'subtotal') }}
|
||||
|
||||
<div class="breakdown-row">
|
||||
<span class="flex-fill breakdown-muted ps-2">Matiere{% if job.material_name %} <small class="text-secondary">{{ job.material_name }}</small>{% endif %}</span>
|
||||
<span class="text-end" style="min-width:85px">{{ "%.4f"|format(job.material_cost) }} €</span>
|
||||
{% if multi %}<span class="text-end text-muted" style="min-width:85px">{{ "%.2f"|format(job.material_cost * qty) }} €</span>{% endif %}
|
||||
</div>
|
||||
{{ brow('Marge matiere', job.material_margin, 'breakdown-muted ps-2', 4) }}
|
||||
{{ brow('Usure machine', job.wear_cost, 'breakdown-muted ps-2', 4) }}
|
||||
{{ brow('Electricite', job.electricity_cost, 'breakdown-muted ps-2', 4) }}
|
||||
<div class="breakdown-row subtotal">
|
||||
<span class="flex-fill fw-semibold">Total cout fixe</span>
|
||||
<span class="text-end" style="min-width:85px">{{ "%.2f"|format(cout_f) }} €</span>
|
||||
{% if multi %}<span class="text-end text-muted" style="min-width:85px">{{ "%.2f"|format(cout_f * qty) }} €</span>{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Partie variable -->
|
||||
<div class="breakdown-row section-header"><span>Partie variable</span></div>
|
||||
{{ brow('Manutention', job.handling_cost, '', 4) }}
|
||||
{{ brow('Design (×' + job.design_multiplier|string + ')', job.design_cost, '', 4) }}
|
||||
{{ brow('Marge brute (' + job.gross_margin_pct|string + '%)', job.margin_amount) }}
|
||||
{{ brow('<span class="fw-semibold">Total marge <small class="text-muted fw-normal">(' + marge_pct_ht|string + '% du HT)</small></span>', tot_m, 'subtotal') }}
|
||||
{{ brow('Manutention', job.handling_cost, 'breakdown-muted ps-2', 4) }}
|
||||
{{ brow('Design (×' ~ job.design_multiplier ~ ')', job.design_cost, 'breakdown-muted ps-2', 4) }}
|
||||
{{ brow('Marge brute (' ~ job.gross_margin_pct ~ '%)', job.margin_amount, 'breakdown-muted ps-2') }}
|
||||
<div class="breakdown-row subtotal">
|
||||
<span class="flex-fill fw-semibold">Total marge <small class="text-muted fw-normal">({{ marge_pct_ht }}% du HT)</small></span>
|
||||
<span class="text-end" style="min-width:85px">{{ "%.2f"|format(tot_m) }} €</span>
|
||||
{% if multi %}<span class="text-end text-muted" style="min-width:85px">{{ "%.2f"|format(tot_m * qty) }} €</span>{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Fiscal -->
|
||||
<div class="breakdown-row section-header"><span>Fiscal</span></div>
|
||||
|
||||
Reference in New Issue
Block a user