{% extends 'report_html_stock/reports/base.html' %} {% block title %}Product Ledger{% endblock %} {% block report_header %} {% set product = record['product'] %}

Product Ledger

Product
{{ product.rec_name }}
Date
{{ data['start_date']|dateformat('short') }} - {{ data['end_date']|dateformat('short') }}
Warehouses
{% for warehouse in warehouses %} {{ warehouse.name }} {% endfor %}
{% endblock report_header %} {% block report_body %} {% set product = record['product'] %} {% if product.purchasable %} {% endif %} {% if summary[product]['produced'] %} {% endif %} {% if product.salable %} {% endif %} {% if summary[product]['consumed'] %} {% endif %} {% if summary[product]['lost'] %} {% endif %}
{{ summary[product]['opening_stock'] }}
Opening Stock
{{ summary[product]['purchased'] }}
Purchased
{{ summary[product]['produced'] }}
Produced
{{ summary[product]['customer'] }}
Sold
{{ summary[product]['consumed'] }}
Consumed
{{ summary[product]['lost'] }}
Lost
{{ summary[product]['closing_stock'] }}
Closing Stock
{% if record['purchases'] %}

Purchases

{% for move in record['purchases'] %} {% endfor %}
Date Supplier PO # Supplier Shipment Quantity
{{ move.effective_date|dateformat }} {{ move.origin and move.origin.purchase and move.origin.purchase.party.rec_name }} {{ move.origin and move.origin.purchase and move.origin.purchase.reference }} {{ move.shipment and move.shipment.code }} {{ move.quantity }}{{ move.uom.symbol }}
{% endif %} {% if record['productions'] %}

Productions

{% for move in record['productions'] %} {% set production = move.production_input or move.production_output %} {% endfor %}
Date PO # Location Quantity Operator
{{ move.effective_date|dateformat }} {{ production.code}} {{ production.location and production.location.rec_name }} {% if move.production_input %}-{% else %}+{% endif %} {{ move.quantity }}{{ move.uom.symbol }} {{ move.operator and move.operator.rec_name }}
{% endif %} {% if record['customers'] %}

Sold

{% for move in record['customers'] %} {% endfor %}
Date Customer Order # Shipment # Quantity
{{ move.effective_date|dateformat }} {{ move.origin and move.origin.sale and move.origin.sale.party.rec_name }} {{ move.origin and move.origin.sale and move.origin.sale.reference }} {{ move.shipment and move.shipment.code }} {{ move.quantity }}{{ move.uom.symbol }}
{% endif %} {% if record['lost_and_founds'] %}

Lost And Found

{% for move in record['lost_and_founds'] %} {% endfor %}
Date Inventory Record Quantity
{{ move.effective_date|dateformat }} {% if move.to_location.type == 'lost_found' %}-{% endif %} {{ move.quantity }}{{ move.uom.symbol }} {{ move.quantity }}{{ move.uom.symbol }}
{% endif %} {% endblock report_body %}