{% extends "base.html" %} {% block title %}Voucher Diskon - FinansialApp{% endblock %} {% block page_title %}Voucher Diskon POS{% endblock %} {% block content %} {% from '_pagination.html' import pagination with context %} {% macro scope_fields(pfx, kategori_produk) %}
| Kode | Potongan | Min. Belanja | Kuota | Berlaku | Status | Aksi |
|---|---|---|---|---|---|---|
|
{{ v.kode }}
{% if v.catatan %} {{ v.catatan }} {% endif %}
{% set _sc = v.scope or 'NOTA' %}
{% if _sc != 'NOTA' or (v.min_qty and v.min_qty > 0) %}
{% if _sc == 'KATEGORI' %}Kategori: {{ v.syarat_kategori }}
{% elif _sc == 'PRODUK' %}Item tertentu{% endif %}
{% if _sc in ('KATEGORI','PRODUK') and v.potongan_mode == 'PER_PRODUK' %}per produk{% endif %}
{% if v.min_qty and v.min_qty > 0 %}min {{ v.min_qty|qty }} qty{% endif %}
{% endif %}
|
{% if v.tipe == 'PERSEN' %}{{ '%g'|format(v.nilai) }}%
{% if v.maks_potongan and v.maks_potongan > 0 %} maks {{ v.maks_potongan|rp }} {% endif %}
{% else %}{{ v.nilai|rp }}{% endif %}
|
{{ v.min_belanja|rp }} | {% if v.kuota and v.kuota > 0 %}{{ v.terpakai or 0 }}/{{ v.kuota }}{% else %}∞ ({{ v.terpakai or 0 }}){% endif %} |
{{ v.berlaku_dari|tgl if v.berlaku_dari else '—' }} s/d {{ v.berlaku_sampai|tgl if v.berlaku_sampai else '—' }} |
{% if not v.aktif %}Nonaktif {% elif expired %}Kedaluwarsa {% elif habis %}Kuota Habis {% else %}Aktif{% endif %} |