diff --git a/myproject/inventory/static/inventory/js/inventory_detail.js b/myproject/inventory/static/inventory/js/inventory_detail.js index 9eb2864..21b87f3 100644 --- a/myproject/inventory/static/inventory/js/inventory_detail.js +++ b/myproject/inventory/static/inventory/js/inventory_detail.js @@ -394,9 +394,9 @@ const emptyMessage = document.getElementById('empty-lines-message'); if (emptyMessage) emptyMessage.remove(); - // Добавляем новую строку + // Добавляем новую строку в начало таблицы const newRow = self.createLineRow(data.line); - tbody.appendChild(newRow); + tbody.insertBefore(newRow, tbody.firstChild); // Включаем кнопку завершения const completeBtn = document.getElementById('complete-inventory-btn'); diff --git a/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html b/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html index 11e8d13..5372ef4 100644 --- a/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html +++ b/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html @@ -20,19 +20,22 @@
Склад
-{{ document.warehouse.name }}
+Склад
+{{ document.warehouse.name }}
+Дата документа
+{{ document.date|date:"d.m.Y" }}
+Тип поступления
+{{ document.get_receipt_type_display }}
+Создан
+{{ document.created_at|date:"d.m.Y H:i" }}
+Дата документа
-{{ document.date|date:"d.m.Y" }}
-Тип поступления
-{{ document.get_receipt_type_display }}
-Создан
-{{ document.created_at|date:"d.m.Y H:i" }}
-Поставщик
-{{ document.supplier_name }}
-Примечания
-{{ document.notes }}
-Проведён
-{{ document.confirmed_at|date:"d.m.Y H:i" }}
+ {% if document.supplier_name %} +Поставщик
+{{ document.supplier_name }}
Провёл
-{% if document.confirmed_by %}{{ document.confirmed_by.name|default:document.confirmed_by.email }}{% else %}-{% endif %}
+ {% endif %} + + {% if document.notes %} +Примечания
+{{ document.notes }}
Проведён
+{{ document.confirmed_at|date:"d.m.Y H:i" }}
+Провёл
+{% if document.confirmed_by %}{{ document.confirmed_by.name|default:document.confirmed_by.email }}{% else %}-{% endif %}
+