fix(shayegan): send the customer detail code on account create

Hesabgar fails when it must invent the account number. Send the subsidiary code plus the customer id as AccountNumber.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-02 10:57:57 +03:30
co-authored by Cursor
parent c96e5820fe
commit 1cd6c61e0f
3 changed files with 45 additions and 0 deletions
+4
View File
@@ -121,9 +121,13 @@ class ShayeganSyncService
$name = 'مشتری ' . $customer->id;
}
// کل ۱۲۱ داخل معین است. تفصیلی = معین + کد کاربری. مثال: 12101 و مشتری 530 → 12101530
$requestedAccountNumber = $moinRaw . ((string) (int) $customer->id);
$guid = (string) Str::uuid();
$put = [[
'MoinNumber' => $moinNumber,
'AccountNumber' => $requestedAccountNumber,
'AccountTypeId' => null,
'AccountName' => mb_substr($name, 0, 200),
'Mobile' => trim((string) ($customer->mobile ?? '')) ?: null,