refactor: подготовка к стандартизации Transfer моделей

Текущее состояние перед рефакторингом Transfer → TransferDocument.
Все изменения с последнего коммита по улучшению системы поступлений.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-26 19:55:50 +03:00
parent 0da2995a74
commit c534e27c41
14 changed files with 198 additions and 313 deletions

View File

@@ -534,8 +534,100 @@
</div>
</div>
<!-- ДОКУМЕНТЫ ПОСТУПЛЕНИЯ (IncomingDocument) -->
<div class="section-card">
<h3>📥 Документы поступления IncomingDocument ({{ incoming_documents.count }})</h3>
<div class="table-responsive">
<table class="table table-sm table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>Номер</th>
<th>Склад</th>
<th>Статус</th>
<th>Тип</th>
<th>Дата</th>
<th>Поставщик</th>
<th>Создал</th>
<th>Провёл</th>
</tr>
</thead>
<tbody>
{% for doc in incoming_documents %}
<tr>
<td>{{ doc.id }}</td>
<td><strong>{{ doc.document_number }}</strong></td>
<td>{{ doc.warehouse.name }}</td>
<td>
{% if doc.status == 'draft' %}
<span class="badge bg-warning text-dark">Черновик</span>
{% elif doc.status == 'confirmed' %}
<span class="badge bg-success">Проведён</span>
{% elif doc.status == 'cancelled' %}
<span class="badge bg-danger">Отменён</span>
{% else %}
<span class="badge bg-secondary">{{ doc.status }}</span>
{% endif %}
</td>
<td><span class="badge bg-info">{{ doc.get_receipt_type_display }}</span></td>
<td class="text-muted-small">{{ doc.date|date:"d.m.Y" }}</td>
<td>{{ doc.supplier_name|default:"-" }}</td>
<td class="text-muted-small">{{ doc.created_by.username|default:"-" }}</td>
<td class="text-muted-small">
{% if doc.confirmed_by %}
{{ doc.confirmed_by.username }} ({{ doc.confirmed_at|date:"d.m H:i" }})
{% else %}
-
{% endif %}
</td>
</tr>
{% empty %}
<tr><td colspan="9" class="text-center text-muted">Нет документов поступления</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- СТРОКИ ДОКУМЕНТОВ ПОСТУПЛЕНИЯ (IncomingDocumentItem) -->
<div class="section-card">
<h3>📋 Строки документов поступления IncomingDocumentItem ({{ incoming_document_items.count }})</h3>
<div class="table-responsive">
<table class="table table-sm table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>Документ</th>
<th>Товар</th>
<th>Склад</th>
<th>Кол-во</th>
<th>Себестоимость</th>
<th>Сумма</th>
<th>Примечания</th>
</tr>
</thead>
<tbody>
{% for item in incoming_document_items %}
<tr>
<td>{{ item.id }}</td>
<td><strong>{{ item.document.document_number }}</strong></td>
<td><strong>{{ item.product.name }}</strong> ({{ item.product.sku }})</td>
<td>{{ item.document.warehouse.name }}</td>
<td><span class="badge bg-success">{{ item.quantity }}</span></td>
<td>{{ item.cost_price }} ₽</td>
<td><strong>{{ item.total_cost }} ₽</strong></td>
<td class="text-muted-small">{{ item.notes|default:"-" }}</td>
</tr>
{% empty %}
<tr><td colspan="8" class="text-center text-muted">Нет строк документов поступления</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="alert alert-secondary py-2 mt-3" style="font-size: 10px;">
<strong>Примечание:</strong> Показаны последние 100 записей для каждой таблицы.
<strong>Примечание:</strong> Показаны последние 100 записей для каждой таблицы.
Используйте фильтры для уточнения результатов.
</div>
</div>