Skip to content

Commit

Permalink
Upgrade Dependency to Laravel v7
Browse files Browse the repository at this point in the history
  • Loading branch information
MannikJ committed May 26, 2020
1 parent da60190 commit 7084d68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
}
],
"require": {
"php": "^7.2",
"laravel/framework": "^6.0"
"php": "^7.2.5",
"illuminate/support": "^7.0"
},
"require-dev": {
"doctrine/dbal": "^2.9",
"mockery/mockery": "^1.1",
"orchestra/testbench": "^4.0",
"phpunit/phpunit": "^8.0"
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Observers/TransactionObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function created($transaction)

public function updated($transaction)
{
$oldAmountWithSign = $transaction->getAmountWithSign($transaction->getOriginal('amount'), $transaction->getOriginal('type'));
$oldAmountWithSign = $transaction->getAmountWithSign($transaction->getRawOriginal('amount'), $transaction->getRawOriginal('type'));
if ($oldAmountWithSign != $transaction->amount) {
// revert old balance
$transaction->wallet->balance -= $oldAmountWithSign;
Expand All @@ -34,4 +34,4 @@ public function deleted($transaction)
$transaction->wallet->balance -= $transaction->amount;
$transaction->wallet->save();
}
}
}

0 comments on commit 7084d68

Please sign in to comment.