Skip to content

Commit 59e0755

Browse files
committed
Fixes
1 parent d236007 commit 59e0755

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

landolfio/inventory_frontend/templates/detail.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,14 @@ <h5 class="mb-3 mt-4">{% translate "Financial" %}</h5>
401401
</tr>
402402
{% endif %}
403403
{% if asset.collection.commerce %}
404-
<tr class="purchase-price">
404+
<tr>
405405
<td class="form-label small text-muted">{% translate "Status" %}:</td>
406406
<td>
407+
{% if asset.moneybird_asset_id %}
407408
<span class="badge bg-{{ asset.financial_status_color }}">{{ asset.financial_status_display|title }}</span>
409+
{% else %}
410+
<span>?</span>
411+
{% endif %}
408412
</td>
409413
</tr>
410414
{% endif %}

landolfio/inventory_frontend/templates/list.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ <h4 class="card-title mb-0 fw-bold flex-grow-1 me-3" style="line-height: 1.2;">{
553553
{% else %}bg-primary{% endif %}" style="font-size: 0.6rem;">
554554
{{ asset.local_status }}
555555
</span>
556-
{% if asset.collection.commerce %}
556+
{% if asset.collection.commerce and asset.moneybird_asset_id %}
557557
<span class="badge bg-{{ asset.financial_status_color }} customer-mode-hide" style="font-size: 0.6rem;">
558558
{{ asset.financial_status_display|title }}
559559
</span>
@@ -739,11 +739,15 @@ <h4 class="text-muted">{% translate "No assets found" %}</h4>
739739
</td>
740740
<td class="customer-mode-hide">
741741
{% if asset.collection.commerce %}
742-
<div class="d-flex flex-column gap-1">
743-
<span class="badge bg-{{ asset.financial_status_color }}" style="font-size: 0.65rem;">
744-
{{ asset.financial_status_display|title }}
745-
</span>
746-
</div>
742+
{% if asset.moneybird_asset_id %}
743+
<div class="d-flex flex-column gap-1">
744+
<span class="badge bg-{{ asset.financial_status_color }}" style="font-size: 0.65rem;">
745+
{{ asset.financial_status_display|title }}
746+
</span>
747+
</div>
748+
{% else %}
749+
<span class="text-muted">?</span>
750+
{% endif %}
747751
{% else %}
748752
<span class="text-muted"></span>
749753
{% endif %}

0 commit comments

Comments
 (0)