+ Update of the borrowing capacity calculation method -v1

This commit is contained in:
Djery-Tom 2020-12-02 18:30:13 +01:00
parent 9940e2c7c6
commit 2993889e6d
1 changed files with 1 additions and 1 deletions

View File

@ -435,7 +435,7 @@ class NanoCreditController extends Controller
private function sumGroupCredit($id_user)
{
$sum = 0;
$credits = UsersDemandesCredit::where('id_user', $id_user)->where('etat', 'VALIDE')->get();
$credits = UsersDemandesCredit::where('id_user', $id_user)->where('etat', 'VALIDE')->where('type_caution', 'groupe')->get();
foreach ($credits as $credit) {
$sum += $credit->montant + $credit->montant_rembourse + $credit->interet + $credit->taxe;
}