{% extends "pos/base.html" %} {% load static sales_extras %} {% block title %}Challan #{{ challan.challan_no }}{% endblock %} {% block stylesheets %} {% endblock %} {% block heading %} Challan #{{ challan.challan_no }} {% if challan.status == 'settled' %} Settled {% else %} Active {% endif %} {% endblock %} {% block content %}
Date: {{ challan.challan_date }}
Areas: {{ challan_areas }}
Bookers: {{ challan_bookers }}
Invoices: {{ challan.line_count }}
{% if challan.remarks %}
{{ challan.remarks }}
{% endif %}
Total Due
{{ challan.total_due|floatformat:0 }}
Received
{{ challan.total_received|floatformat:0 }}
{% if show_mode != 'settlement' %} {% endif %} {% if challan.status == 'active' %}
{% csrf_token %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} Back to List
{% if show_mode == 'settlement' %}
{% csrf_token %}
Settlement — Credit Recovery
{% for ln in lines_data %} {% endfor %}
# Customer Sale Inv Sale Amount Return Return Inv Return Amt Credit to Ledger Discount Credit Received Bank Due
{{ forloop.counter }} {{ ln.customer_name }} ID: {{ ln.customer_id }} {{ ln.sale_invoice_no }} {{ ln.sale_amount|floatformat:0 }} {% if ln.return_invoice_no == 0 %} {% else %} {% endif %} {% if ln.return_invoice_no > 0 %} {{ ln.return_invoice_no }} {% else %} — {% endif %} {% if ln.return_amount > 0 %} {{ ln.return_amount|floatformat:0 }} {% else %} 0 {% endif %} {{ ln.credit_to_ledger|floatformat:0 }} {{ ln.due|floatformat:0 }}
Totals: {{ challan.total_sale_amount|floatformat:0 }} {{ challan.total_return_amount|floatformat:0 }} — {{ challan.total_discount|floatformat:0 }} {{ challan.total_received|floatformat:0 }} {{ challan.total_due|floatformat:0 }}
{% elif show_mode == 'loadsheet' and load_sheet_data %}
{% for gk, rows in load_sheet_data.groups.items %}
{{ gk }}
{% if load_sheet_data.include_bonus %} {% endif %} {% if load_sheet_data.include_ret_normal %} {% endif %} {% if load_sheet_data.include_ret_expiry %} {% endif %} {% if load_sheet_data.show_amounts %} {% endif %} {% for r in rows %} {% if load_sheet_data.include_bonus %} {% endif %} {% if load_sheet_data.include_ret_normal %} {% endif %} {% if load_sheet_data.include_ret_expiry %} {% endif %} {% if load_sheet_data.show_amounts %} {% endif %} {% endfor %} {% with tot=load_sheet_data.group_totals|get_item:gk %} {% if load_sheet_data.include_bonus %} {% endif %} {% if load_sheet_data.include_ret_normal %} {% endif %} {% if load_sheet_data.include_ret_expiry %} {% endif %} {% if load_sheet_data.show_amounts %} {% endif %} {% endwith %}
Product Pack Ctn PcsBonus (PCS)Ret(N) Ctn Ret(N) PcsRet(E) Ctn Ret(E) PcsAmount
{{ r.product_code }} - {{ r.product_name }} {{ r.pack }} {{ r.issued_ctn }} {{ r.issued_pcs }}{{ r.bonus_pcs }}{{ r.ret_norm_ctn }} {{ r.ret_norm_pcs }}{{ r.ret_exp_ctn }} {{ r.ret_exp_pcs }}{{ r.amount|floatformat:2 }}
Totals: {{ tot.issued_ctn }} {{ tot.issued_pcs }}{{ tot.bonus_pcs }}{{ tot.ret_norm_ctn }} {{ tot.ret_norm_pcs }}{{ tot.ret_exp_ctn }} {{ tot.ret_exp_pcs }}{{ tot.amount|floatformat:2 }}
{% empty %}
No load sheet data for this challan.
{% endfor %}
{% elif show_mode == 'salesman' and load_sheet_data.salesman_blocks %}
Cash Memo Saleman Copy — Challan #{{ challan.challan_no }}
{% for blk in load_sheet_data.salesman_blocks %}
{{ blk.customer_id }} / {{ blk.invoice_no }} — {{ blk.customer_name }} Bill No: {{ blk.bill_no }}
{{ blk.customer_name|upper }} / {{ blk.customer_address }} Date: {{ blk.order_date }}
{% for r in blk.rows %} {% endfor %}
Product CTN
Size
Ctns Pcs Return
Qty
Trade
Price
Gross
Amount
Trade
Offer
Disc Net
Amount
Remarks
{{ r.product }} {{ r.ctn_size }} {{ r.ctns }} {% if r.pcs %}{{ r.pcs }}{% else %}0{% endif %} {% if r.return_qty %} {{ r.return_qty }} {% endif %} {{ r.trade_price|floatformat:0 }} {{ r.gross_amount|floatformat:0 }} {% if r.trade_offer %}{{ r.trade_offer|floatformat:0 }}{% endif %} {% if r.disc %}{{ r.disc|floatformat:1 }}{% endif %} {{ r.net_amount|floatformat:0 }}
Total {{ blk.totals.ctns }} {{ blk.totals.pcs }} {% if blk.po %}P/O: {{ blk.po|floatformat:0 }}{% endif %} {{ blk.totals.gross_amount|floatformat:0 }} {% if blk.totals.trade_offer %}{{ blk.totals.trade_offer|floatformat:0 }}{% endif %} {% if blk.totals.disc %}{{ blk.totals.disc|floatformat:1 }}{% endif %} {{ blk.totals.net_amount|floatformat:0 }} {% if blk.recovery > 0 %} Recv: {{ blk.recovery|floatformat:0 }} {% endif %}
{% endfor %}
{% elif show_mode == 'invoices' and load_sheet_data.invoice_rows %}
Invoices — Challan #{{ challan.challan_no }}
{% for it in load_sheet_data.invoice_rows %} {% endfor %}
Invoice # Customer Date Amount Area Booker Recovery Remarks
{{ it.inv }} {{ it.customer }} {{ it.date }} {{ it.amount|floatformat:0 }} {{ it.area }} {{ it.booker }} {% if it.recovery > 0 %} {{ it.recovery|floatformat:0 }} {% else %} — {% endif %}
Total {{ load_sheet_data.invoices_amount_total|floatformat:0 }}
{% else %} {% if show_mode != 'settlement' %}
No data to display. Make sure the challan has invoices.
{% endif %} {% endif %} {% endblock %} {% block javascripts %} {% endblock %}