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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user