forked from hesabix/arc
107 lines
4.2 KiB
HTML
Executable file
107 lines
4.2 KiB
HTML
Executable file
{% extends "pdf/base.html" %}
|
|
{% block content %}
|
|
<style>
|
|
/* Applied filters: compact, line-oriented, printer friendly (B/W) */
|
|
.report-inventory-kardex .filters-line {
|
|
margin-bottom: 10px;
|
|
padding: 6px 8px;
|
|
border: 1px solid #9aa0a6;
|
|
border-radius: 6px;
|
|
background: #fff;
|
|
color: #111;
|
|
font-size: 10.5px;
|
|
line-height: 1.45;
|
|
page-break-inside: avoid;
|
|
}
|
|
.report-inventory-kardex .filters-line .label {
|
|
font-weight: 700;
|
|
margin-inline-end: 6px;
|
|
color: #111;
|
|
white-space: nowrap;
|
|
}
|
|
.report-inventory-kardex .filters-line .text { color: #111; }
|
|
.report-inventory-kardex .filters-line .more { color: #444; white-space: nowrap; }
|
|
|
|
.report-inventory-kardex td.num, .report-inventory-kardex th.num {
|
|
text-align: {{ 'left' if is_fa else 'right' }};
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
}
|
|
.report-inventory-kardex th.idx, .report-inventory-kardex td.idx {
|
|
width: 36px;
|
|
}
|
|
</style>
|
|
|
|
<div class="report-inventory-kardex">
|
|
<div class="header">
|
|
<div>
|
|
<div class="title">{{ title_text or ('گزارش کاردکس موجودی' if is_fa else 'Inventory Kardex Report') }}</div>
|
|
<div class="meta">{{ business_name or '' }}</div>
|
|
</div>
|
|
<div class="meta">{{ generated_at or '' }}</div>
|
|
</div>
|
|
|
|
{% if filters_summary and filters_summary|length > 0 %}
|
|
{% set max_filters = 6 %}
|
|
{% set shown = filters_summary[:max_filters] %}
|
|
{% set remaining = (filters_summary|length) - (shown|length) %}
|
|
<div class="filters-line">
|
|
<span class="label">{{ 'فیلترها' if is_fa else 'Filters' }}:</span>
|
|
<span class="text">
|
|
{% for f in shown %}
|
|
{% if not loop.first %} | {% endif %}
|
|
{{ (f.label | default('', true)) }}: {{ (f.value | default('', true)) }}
|
|
{% endfor %}
|
|
</span>
|
|
{% if remaining > 0 %}
|
|
<span class="more"> | +{{ remaining }}</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="table-wrapper">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="idx num">#</th>
|
|
<th>{{ 'تاریخ' if is_fa else 'Date' }}</th>
|
|
<th>{{ 'نوع سند' if is_fa else 'Type' }}</th>
|
|
<th>{{ 'شماره سند' if is_fa else 'Code' }}</th>
|
|
<th>{{ 'کد کالا' if is_fa else 'Product Code' }}</th>
|
|
<th>{{ 'نام کالا' if is_fa else 'Product' }}</th>
|
|
<th class="num">{{ 'ورود' if is_fa else 'In' }}</th>
|
|
<th class="num">{{ 'خروج' if is_fa else 'Out' }}</th>
|
|
<th class="num">{{ 'مانده' if is_fa else 'Balance' }}</th>
|
|
<th class="num">{{ 'قیمت واحد' if is_fa else 'Unit Price' }}</th>
|
|
<th class="num">{{ 'مبلغ کل' if is_fa else 'Total' }}</th>
|
|
<th>{{ 'انبار' if is_fa else 'Warehouse' }}</th>
|
|
<th>{{ 'توضیحات' if is_fa else 'Description' }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for it in items or [] %}
|
|
<tr>
|
|
<td class="idx num">{{ loop.index }}</td>
|
|
<td>{{ it.document_date | default('', true) }}</td>
|
|
<td>{{ (it.document_type_name or it.document_type) | default('', true) }}</td>
|
|
<td>{{ it.document_code | default('', true) }}</td>
|
|
<td>{{ it.product_code | default('', true) }}</td>
|
|
<td>{{ it.product_name | default('', true) }}</td>
|
|
<td class="num">{{ it.quantity_in | smart_number(2) | ltr | safe }}</td>
|
|
<td class="num">{{ it.quantity_out | smart_number(2) | ltr | safe }}</td>
|
|
<td class="num">{{ it.balance | smart_number(2) | ltr | safe }}</td>
|
|
<td class="num">{{ it.unit_price | smart_number(2) | ltr | safe }}</td>
|
|
<td class="num">{{ it.total_amount | smart_number(2) | ltr | safe }}</td>
|
|
<td>{{ it.warehouse_name | default('', true) }}</td>
|
|
<td>{{ it.description | default('', true) }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="footer"></div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
|