Update: 2026-05-07 01:47:01

This commit is contained in:
Hamza-Ayed
2026-05-07 01:47:01 +03:00
parent f206591c01
commit e5b70a01ef
4 changed files with 38 additions and 73 deletions

View File

@@ -49,16 +49,16 @@ if ($batch['total_images'] == 0) {
json_error('لا يمكن إنهاء دفعة فارغة', 400);
}
// 2. Mark as done since AI processing is now synchronous
// 2. Mark as processing
$stmt = $db->prepare("
UPDATE invoice_batches
SET status = 'done', completed_at = NOW(), updated_at = NOW()
SET status = 'processing', updated_at = NOW()
WHERE id = ?
");
$stmt->execute([$batchId]);
json_success([
'batch_id' => $batchId,
'status' => 'done',
'status' => 'processing',
'total_images' => $batch['total_images']
], 'تم رفع ومعالجة الدفعة بنجاح');
], 'تم إنهاء الدفعة بنجاح وإرسالها للمعالجة');