added pargar

This commit is contained in:
2026-07-05 16:43:34 +03:30
parent 694fddc909
commit 7ac7bbdb90
27 changed files with 1341 additions and 493 deletions
@@ -128,7 +128,7 @@ class WalletController extends Controller
$this->recordAccountingTransaction($customer, $Withdraw, (int) $user->id, (float) $data['value'], 0, $data['note'] ?? null);
if($this->Config('send_to_tahesab') == "true"){
if (app(ConfigService::class)->isTahesabAccounting()) {
try {
$data['direction'] = $deposit ? 0 : 1;
$data['withdraw_id'] = $Withdraw->id;
@@ -201,7 +201,7 @@ class WalletController extends Controller
$this->recordAccountingTransaction($customer, $Withdraw, (int) $user->id, 0, (float) $data['value'], $data['note'] ?? null);
//send to tahesab
if($this->Config('send_to_tahesab') == "true"){
if (app(ConfigService::class)->isTahesabAccounting()) {
try {
$data['direction'] = $deposit ? 1 : 0;
$data['withdraw_id'] = $Withdraw->id;
@@ -344,7 +344,7 @@ class WalletController extends Controller
($data['note'] ?? null) ?: ('شارژ ' . $product->title)
);
if ($this->Config('send_to_tahesab') == 'true') {
if (app(ConfigService::class)->isTahesabAccounting()) {
try {
$data['direction'] = $deposit ? 1 : 0;
$data['withdraw_id'] = $Withdraw->id;
@@ -548,7 +548,7 @@ class WalletController extends Controller
'*', Withdraw::$SELECT_STS_STR, Withdraw::$SELECT_DAJ
])->export($records);
if ($this->Config('send_to_tahesab') === 'true' && isset($records['rows']) && is_array($records['rows'])) {
if (app(ConfigService::class)->isTahesabAccounting() && isset($records['rows']) && is_array($records['rows'])) {
$withdrawIds = collect($records['rows'])->pluck('id')->filter()->values()->all();
if ($withdrawIds !== []) {
$failedByWithdraw = \App\Models\Tahesab::query()