Update balance in callbacks

This commit is contained in:
Nabeel Shahzad
2018-03-01 22:00:11 -06:00
parent 92a18448eb
commit 02374dcd57
4 changed files with 53 additions and 215 deletions

View File

@@ -79,16 +79,6 @@ class JournalRepository extends BaseRepository implements CacheableInterface
throw $e;
}
# Adjust the balance on the journal
if($credit) {
$journal->balance->add($credit);
}
if($debit) {
$journal->balance->subtract($debit);
}
$journal->save();
$journal->refresh();
return $transaction;