{% extends "base.html" %} {% block title %}PO {{ po.nomor }} - FinansialApp{% endblock %} {% block page_title %}Purchase Order {{ po.nomor }}{% endblock %} {% block content %}
Kembali Cetak / PDF {% if session.role in ('ADMIN','FINANCE','OPERATOR') and po.status not in ('DITERIMA','DIBATALKAN') %} Edit {% endif %} {% if session.role in ('ADMIN','FINANCE') %}
{% endif %}
{% if session.role in ('ADMIN','FINANCE','OPERATOR') %} {{ po.status }} {% if po.status != 'DRAFT' %}
{% endif %} {% if po.status != 'DIKIRIM' and po.status != 'DITERIMA' %}
{% endif %} {% if po.status not in ('DITERIMA','DIBATALKAN') %} {% endif %} {% if po.status != 'DIBATALKAN' %}
{% endif %} {% else %} {{ po.status }} {% endif %}
{% if po.status == 'DITERIMA' %}
Barang sudah diterima dan persediaan/stok sudah tercatat. {% if hutang %} Sisa hutang ke {{ po.vendor }} sebesar {{ ((hutang.jumlah or 0) - (hutang.terbayar or 0))|rp }}. Lihat Tracker Hutang {% else %} Tidak ada hutang tersisa untuk PO ini. {% endif %}
{% endif %}
{% if po_s.po_logo %} {% endif %}
{{ po_s.po_nama }}
{% if po_s.po_tagline %}
{{ po_s.po_tagline }}
{% endif %} {% if po_s.po_alamat %}
{{ po_s.po_alamat }}
{% endif %} {% if po_s.po_telepon %}
{{ po_s.po_telepon }}
{% endif %} {% if po_s.po_email %}
{{ po_s.po_email }}
{% endif %}
PURCHASE ORDER
{{ po.nomor }}
Kepada Vendor
{{ po.vendor }}
{% if po.alamat_vendor %}
{{ po.alamat_vendor }}
{% endif %} {% if po.telepon_vendor %}
{{ po.telepon_vendor }}
{% endif %}
Tanggal PO{{ po.tanggal|tgl }}
Estimasi Terima {{ po.expected_date|tgl if po.expected_date else '-' }}
Status {{ po.status }}
{% for it in items %} {% endfor %}
# Deskripsi Qty Satuan Harga Satuan Diskon Subtotal
{{ loop.index }}
{{ it.deskripsi }}
{% if it.produk_id %} SKU inventory #{{ it.produk_id }} {% else %} Non-SKU {% endif %}
{{ it.qty|qty }} {{ it.satuan }} {{ it.harga_satuan|rp }} {% if it.diskon_item %}{{ it.diskon_item|rp }}{% else %}-{% endif %} {{ it.subtotal|rp }}
{% if po.diskon %} {% endif %} {% if po.ongkir %} {% endif %} {% if po.biaya_lain %} {% endif %}
Subtotal {{ subtotal|rp }}
Diskon - {{ po.diskon|rp }}
Ongkir {{ po.ongkir|rp }}
Biaya Lain {{ po.biaya_lain|rp }}

TOTAL {{ total|rp }}
{% if (po.ongkir or po.biaya_lain) and session.role in ('ADMIN','FINANCE','OPERATOR') %}
Ongkir/biaya lain akan dialokasikan ke nilai persediaan/HPP saat PO ditandai diterima.
{% endif %} {% if po.catatan %}
{{ po.catatan }}
{% endif %} {% if po_s.po_terms %}
Syarat & Ketentuan
{{ po_s.po_terms }}
{% endif %}
{% endblock %} {% block scripts %} {% if session.role in ('ADMIN','FINANCE','OPERATOR') and po.status not in ('DITERIMA','DIBATALKAN') %} {% endif %} {% endblock %}