fix(zarin): post rial wallet docs as cash via payment, not pooli buy-fi

Zarin kind=payment creates type 55 cash-only rows; it needs zarin_idbank as the counterpart account.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-01 16:51:16 +03:30
co-authored by Cursor
parent c09dcfc704
commit e27a8ac397
5 changed files with 95 additions and 22 deletions
+2 -1
View File
@@ -36,7 +36,7 @@ class ZarinSyncService
private function hasNumericIdKey(array $row): bool
{
foreach (['idFactor', 'idSanad', 'pkRadifSanad', 'idHesab', 'OK'] as $key) {
foreach (['idFactor', 'idSanad', 'pkRadifSanad', 'idHesab', 'OK', 'shomareSanad'] as $key) {
if (! array_key_exists($key, $row)) {
continue;
}
@@ -70,6 +70,7 @@ class ZarinSyncService
?? $flat['idFactor']
?? $flat['idSanad']
?? $flat['pkRadifSanad']
?? $flat['shomareSanad']
?? $flat['idHesab']
?? null;