{% extends "base.html" %} {% block title %}Counting {{ location.location_name }}{% endblock %} {% block content %}
Counting Location

{{ location.location_name }}

Expected: {{ location.expected_lots_master }} Found: {{ location.lots_found }}

Scan Lot Barcode

Scanned Lots ({{ scans|length }})

{% for scan in scans %} {# LOGIC FIX: Determine CSS class based on weight difference #} {% set row_class = scan.master_status %} {% if scan.duplicate_status and scan.duplicate_status != '00' %} {% set row_class = 'duplicate-' + scan.duplicate_status %} {% elif scan.master_status == 'match' and scan.master_expected_weight and (scan.actual_weight - scan.master_expected_weight)|abs >= 0.01 %} {# If it is a match but weight is off, force class to weight_discrepancy #} {% set row_class = 'weight_discrepancy' %} {% endif %}
{{ scan.lot_number }}
{{ scan.item or 'N/A' }}
{{ scan.actual_weight }} lbs
{% if scan.duplicate_status == '01' or scan.duplicate_status == '04' %} Duplicate {% elif scan.duplicate_status == '03' %} Dup (Other Loc) {% elif row_class == 'weight_discrepancy' %} Weight Off {% elif scan.master_status == 'match' %} Match {% elif scan.master_status == 'wrong_location' %} Wrong Loc {% elif scan.master_status == 'ghost_lot' %} Ghost {% endif %}
{% endfor %}
{% if session_type == 'cycle_count' and expected_lots %}

Expected Items ({{ expected_lots|length }})

{% for lot in expected_lots %}
{{ lot.lot_number }}
{{ lot.item }}
{{ lot.total_weight }} lbs
Pending
{% endfor %}
{% endif %}
← Back to My Counts
{% endblock %}