updated conditional balance due color in invoice print format
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<style>
|
||||
/* Reserve space in PRINT/PDF so table does not overlap window address */
|
||||
/* 💡 Reserve space in PRINT/PDF so table does not overlap window address */
|
||||
@media print {
|
||||
.window-address-space {
|
||||
padding-top: 1in;
|
||||
@@ -131,9 +131,24 @@
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>Paid:</strong><span>{{ doc.total_advance }}</span>
|
||||
</p>
|
||||
|
||||
{% set balance = doc.outstanding_amount or 0 %}
|
||||
|
||||
{% if balance == 0 %}
|
||||
{% set balance_color = "#2e7d32" %}
|
||||
{% elif balance > 0 %}
|
||||
{% set balance_color = "#c62828" %}
|
||||
{% else %}
|
||||
{% set balance_color = "#ef6c00" %}
|
||||
{% endif %}
|
||||
|
||||
<p style="display:flex; justify-content:space-between;">
|
||||
<strong>Balance Due:</strong><span>{{ doc.outstanding_amount }}</span>
|
||||
<strong style="color: {{ balance_color }} !important;">Balance Due:</strong>
|
||||
<span style="color: {{ balance_color }} !important;">{{ balance }}</span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -149,6 +164,26 @@
|
||||
Thanks for your business.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% set balance = doc.outstanding_amount or 0 %}
|
||||
|
||||
|
||||
{% if balance == 0 %}
|
||||
<div style="text-align: center; margin-top: 35px;">
|
||||
<div style="
|
||||
margin-top: 35px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #2e7d32;
|
||||
border: 3px solid #2e7d32;
|
||||
display: inline-block;
|
||||
padding: 10px 40px;
|
||||
transform: rotate(-5deg);
|
||||
">
|
||||
PAID
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user