Remove lot document comments
This commit is contained in:
1 parent
f130092d40
commit
3a3de9da22
4 files changed
+10
-48
No files matched your search
@@ -36,13 +36,11 @@ 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'],
|
||||
]]);
|
||||
}
|
||||
|
||||
@@ -103,11 +101,6 @@ 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]);
|
||||
|
||||
Reference in new issue
Block a user