{# templates/pos_api/android_sales_view.html #} {% extends "pos/base.html" %} {% load humanize %} {% block title %}Sale #{{ invoice_no }} — Detail{% endblock %} {% block content %}
{% if any_error %}
Stock Issue Found: One or more items have qty/bonus shortage.
{% elif any_warning %}
Warning: Some items have expiry-related warning/skip.
{% else %}
All good: No stock shortage detected for current staging values.
{% endif %}
Invoice Details Staging
Invoice No
#{{ invoice_no }}
Customer
{{ pay.party_descp|default:"—" }}
Date
{{ pay.transaction_date }}
Time
{{ pay.bill_time|default:"—" }}
Total Amount
{{ pay.total_amount|floatformat:2|intcomma }}
Amount Received
{{ pay.amount_transaction|floatformat:2|intcomma }}
Discount
{{ pay.discount|floatformat:2|intcomma }}
{% if stock_roles %}
Pick Mode
{{ stock_roles.pick_mode }}
Expiry Warn Days
{{ stock_roles.expiry_warn_days }}
{% endif %}
Location Status
{% if location_ok %} OK {% if location_distance_m %} {{ location_distance_m|floatformat:0 }} m {% endif %} {% else %} {{ location_status }} {% if location_distance_m %} {{ location_distance_m|floatformat:0 }} m {% endif %} {% endif %}
Items ({{ items|length }})
Qty: {{ total_qty|floatformat:2 }} Bonus: {{ total_bonus|floatformat:2 }}
{% for item in items %} {% endfor %}
# Product Qty Bonus Price Discount Total Stock Status
{{ forloop.counter }}
{{ item.product_name|default:"Unknown" }}
Code: {{ item.product_code }} {% if item.p_per_pack %}• PPP: {{ item.p_per_pack }}{% endif %}
{% if item.row_status == 'err' %} Error {% elif item.row_status == 'warn' %} Warning {% else %} OK {% endif %}
{{ item.qty_disp }} {{ item.bonus_disp }} {{ item.item_price|floatformat:2|intcomma }} {{ item.discount|floatformat:2 }}% {{ item.total_price|floatformat:2|intcomma }} {{ item.legacy_stock|default:0|floatformat:2 }}
usable qty: {{ item.plan.qty_usable_total|floatformat:2 }} {% if item.plan.bonus_usable_total %}
usable bonus: {{ item.plan.bonus_usable_total|floatformat:2 }} {% endif %} {% if item.qty_short > 0 %}
Qty short: {{ item.qty_short|floatformat:2 }} {% endif %} {% if item.bonus_short > 0 %}
Bonus short: {{ item.bonus_short|floatformat:2 }} {% endif %} {% if item.has_expiry_issue %}
Expiry rule triggered {% endif %}
{% if bank_payments %}
Bank Payments
{% for bp in bank_payments %} {% endfor %}
Bank Amount
{{ bp.bank_name }} {{ bp.amount_transaction|floatformat:2|intcomma }}
{% endif %}
{% endblock %}