feat(tahesab): reset local success flags when remote docs were wiped

Clear tahesab_id on locally successful rows so they re-enter the send queue without touching panel customer codes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-03 13:43:16 +03:30
co-authored by Cursor
parent d65bbce791
commit 3b7db1eb72
4 changed files with 78 additions and 0 deletions
+13
View File
@@ -35,6 +35,19 @@ class TahesabDocSyncService
return $this->publicSnapshot($job);
}
public function isRunning(): bool
{
return ($this->read()['running'] ?? false) === true;
}
public function clearIdleSnapshot(): void
{
if ($this->isRunning()) {
return;
}
Cache::forget(self::CACHE_KEY);
}
/**
* @return array{ok:bool,message:string,doc_sync:array}
*/