fix wallet bug

This commit is contained in:
omair saleh
2022-03-02 12:02:37 +08:00
parent f6ff5830e7
commit 81e409c345
@@ -107,9 +107,9 @@ class CreditWalletLogic extends AbstractControllerLogic
$transaction = $this->createsTransaction->execute($wallet, $transaction_object);
$updateWalletAmount = $type === 2 ? ($wallet->amount - $transaction->amount) : ($wallet->amount + $transaction->amount);
dd($wallet->company);
$walletObject = new WalletObject($wallet->company->id, $wallet->currency_id, $wallet->code, $updateWalletAmount);
dd($walletObject);
$wallet = $this->updatesWallet->execute($wallet, $walletObject);
return $this->resourceResponse(new WalletResource($wallet));