fix title
This commit is contained in:
@@ -575,9 +575,11 @@ class TahesabController extends Controller
|
||||
$customer = Customer::where('id', $data['customer_id'])->first();
|
||||
}
|
||||
$data['handler'] = 'wallet';
|
||||
$isDeposit = (int) ($data['direction'] ?? 0) === 0;
|
||||
$sharh = self::accountingWalletDesc($isDeposit, $data['note'] ?? null);
|
||||
$tahesab = $existing ?? Tahesab::create([
|
||||
"customer_id" => $customer->id,
|
||||
"desc" => $data['direction'] == 0 ? "شارژ حساب" : "برداشت از حساب",
|
||||
"desc" => $sharh,
|
||||
"amount" => $data['value'],
|
||||
"type" => "ريال",
|
||||
"date" => Carbon::now(),
|
||||
@@ -610,7 +612,7 @@ class TahesabController extends Controller
|
||||
(int)$day,//Shamsi_Day
|
||||
(int)$data['direction'],//IsDayaftAzMoshtariOrPardakhtBeMoshtari_0_1
|
||||
(int)$data['value'],//Mablagh
|
||||
$data['direction'] == 0 ? "شارژ حساب" : "برداشت از حساب",//Sharh
|
||||
$sharh,//Sharh
|
||||
(string)$this->Config('tahesab_bank_account'), //Name_Bank
|
||||
"$tahesab->id",//Code_Rahgiri
|
||||
-1,//Factor_Code
|
||||
@@ -722,7 +724,7 @@ class TahesabController extends Controller
|
||||
/**
|
||||
* پاداش معرفی — همیشه روی حساب معرف (نه کاربر تازهثبتنامشده).
|
||||
*/
|
||||
public function referrerGoldReward(Customer $invitedCustomer, float $gold, string $desc = 'پاداش بابت معرفی')
|
||||
public function referrerGoldReward(Customer $invitedCustomer, float $gold, string $desc = 'پاداش معرفی')
|
||||
{
|
||||
$referrer = $invitedCustomer->referrer();
|
||||
if (!$referrer) {
|
||||
@@ -876,13 +878,10 @@ class TahesabController extends Controller
|
||||
$isDeposit = (int) ($data['direction'] ?? 1) === 1;
|
||||
$isVorood = $isDeposit ? 1 : 0;
|
||||
|
||||
$action = $isDeposit ? 'شارژ' : 'دشارژ';
|
||||
$kindFa = $mapper->kindLabel($kind);
|
||||
$sharh = !empty($data['note'])
|
||||
? (string) $data['note']
|
||||
: (!empty($data['desc'])
|
||||
? (string) $data['desc']
|
||||
: trim($title !== '' ? "{$action} {$title}" : "{$action} {$kindFa}"));
|
||||
$sharh = self::accountingWalletDesc(
|
||||
$isDeposit,
|
||||
!empty($data['note']) ? (string) $data['note'] : (!empty($data['desc']) ? (string) $data['desc'] : null)
|
||||
);
|
||||
$data['note'] = $sharh;
|
||||
$data['handler'] = 'walletGold';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user