Revert "Remove lot document comments"

This reverts commit 3a3de9da22.
This commit is contained in:
gitea_admin committed 2026-09-08 13:49:20 +02:00
1 parent 61fc46df6e
commit 0b39acbf30
4 files changed
+48 -10

No files matched your search

+7
View File
@@ -36,11 +36,13 @@ try {
$pdo,
(int) ($_POST['lotId'] ?? 0),
$file,
(string) ($_POST['comment'] ?? ''),
(string) ($currentUser['username'] ?? $currentUser['email'] ?? 'unknown')
);
json_response(201, ['ok' => true, 'document' => [
'id' => (int) $document['id'],
'original_filename' => (string) $document['original_filename'],
'comment' => $document['comment'] === null ? '' : (string) $document['comment'],
]]);
}
@@ -101,6 +103,11 @@ try {
json_response(200, ['ok' => true, 'productId' => $productId, 'availableQty' => get_lager_product_available_qty($pdo, $productId)]);
}
if ($action === 'update_document_comment') {
update_stock_lot_document_comment($pdo, (int) ($data['documentId'] ?? 0), (string) ($data['comment'] ?? ''));
json_response(200, ['ok' => true]);
}
if ($action === 'delete_document') {
delete_stock_lot_document($pdo, (int) ($data['documentId'] ?? 0));
json_response(200, ['ok' => true]);