djLint/tests/django_ledger/includes/card_po.html
2021-08-02 09:18:05 -05:00

69 lines
3.1 KiB
HTML

{% load i18n %}
{% load django_ledger %}
{% if not create_po %}
{% if style == 'po-detail' %}
<div class="card">
<div class="card-header">
<h2 class="card-header-title has-text-weight-light is-size-3">
<span class="icon is-large">{% icon 'uil:bill' 36 %}</span>
{% trans 'Purchase Order Info' %}
</h2>
</div>
<div class="card-content">
<h2 class="is-size-3">{{ po_model.po_number }}</h2>
<h3 class="is-size-4 has-text-weight-light">
Status:
<span class="{% if po_model.po_status == 'draft' %}has-text-danger{% elif po_model.po_status == 'approved' %}has-text-success{% endif %}">
{{ po_model.get_po_status_display }}
</span>
</h3>
<h3 class="is-size-4 has-text-weight-light">
Inventory Purchase:
{% if po_model.for_inventory %}
<span class="icon has-text-success">{% icon 'ant-design:check-circle-filled' 24 %}</span>
{% else %}
<span class="icon is-small has-text-danger">
{% icon 'maki:roadblock-11' 24 %}
</span>
{% endif %}
</h3>
<h3 class="is-size-4 has-text-weight-light">
Fulfilled:
{% if po_model.fulfilled %}
<span class="icon has-text-success">{% icon 'ant-design:check-circle-filled' 24 %}</span>
{{ po_model.fulfillment_date | date }}
{% else %}
<span class="icon is-small has-text-danger">
{% icon 'maki:roadblock-11' 24 %}
</span>
{% endif %}
</h3>
</div>
<footer class="card-footer">
<a href="{% url 'django_ledger:po-update' entity_slug=entity_slug po_pk=po_model.uuid %}"
class="card-footer-item has-text-primary has-text-centered">
{% trans 'Update' %}
</a>
<a onclick="djLedger.toggleModal('{{ po_model.get_html_id }}')"
class="card-footer-item has-text-info has-text-centered">
{% trans 'Mark as Fulfilled' %}
</a>
<a href="{% url 'django_ledger:po-delete' entity_slug=entity_slug po_pk=po_model.uuid %}"
class="card-footer-item has-text-danger has-text-centered">
{% trans 'Delete' %}
</a>
</footer>
</div>
{% endif %}
{% else %}
<div class="box has-text-centered">
<a href="{% url 'django_ledger:po-create' entity_slug=entity_slug %}">
<span class="icon is-large has-text-grey">
{% icon "ic:baseline-add-circle-outline" 48 %}
</span>
</a>
<h2 class="is-size-3 has-text-grey">
{% trans 'New PO' %}
</h2>
</div>
{% endif %}