Update credit balance

This commit is contained in:
David Bomba 2020-10-08 15:05:38 +11:00
parent d2d6262941
commit 5101e7cce6

View File

@ -320,6 +320,7 @@ class BaseRepository
} }
if ($class->name == Credit::class) { if ($class->name == Credit::class) {
$model = $model->calc()->getCredit(); $model = $model->calc()->getCredit();
$model->ledger()->updateCreditBalance(($state['finished_amount'] - $state['starting_amount'])); $model->ledger()->updateCreditBalance(($state['finished_amount'] - $state['starting_amount']));