{% extends "base.html" %} {% import 'components/macros.html' as ui %} {% block title %}Return Goods - {{ brand_name }}{% endblock %} {% block head_extra %} {% endblock %} {% block content %}

↩️ Return Goods

Back to Sales Logout
← Back to POS {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endif %} {% endwith %}

Search Sale

Enter receipt code (e.g., RCP-000123) or product name/ID to find the sale.

{% if matching_sales %}

Matching Sales

Multiple sales found. Click one to view details:

{% for sale in matching_sales %}
{{ sale[4] or 'RCP-' ~ '%06d'|format(sale[0]) }} — {{ currency_symbol }} {{ "%.2f"|format(sale[1]) }} — {{ sale[2] }}
{% endfor %}
{% endif %} {% if sale %}

Sale Details

Receipt: {{ sale[4] or 'RCP-' ~ '%06d'|format(sale[0]) }}
Date: {{ sale[2] }}
Total: {{ currency_symbol }} {{ "%.2f"|format(sale[1]) }}
Already Returned: {{ currency_symbol }} {{ "%.2f"|format(sale[3] or 0) }}

Items in this Sale

{% if items %} {% for item in items %}
{{ item[2] }}
Product ID: {{ item[1] }}
Sold: {{ item[3] }} x {{ currency_symbol }} {{ "%.2f"|format(item[4]) }} = {{ currency_symbol }} {{ "%.2f"|format(item[5]) }}
{% set returned_qty = returned_map.get(item[1], 0) %}
{% if returned_qty > 0 %} Already returned: {{ returned_qty }} {% else %} Not yet returned {% endif %}
{% if item[3] > returned_qty %}
{% else %}
✓ Fully returned
{% endif %}
{% endfor %} {% else %}

No item details available for this sale.

{% endif %}
{% endif %}
{% endblock %}