+ Update of the borrowing capacity calculation method -v1
This commit is contained in:
parent
9940e2c7c6
commit
2993889e6d
|
@ -435,7 +435,7 @@ class NanoCreditController extends Controller
|
||||||
private function sumGroupCredit($id_user)
|
private function sumGroupCredit($id_user)
|
||||||
{
|
{
|
||||||
$sum = 0;
|
$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) {
|
foreach ($credits as $credit) {
|
||||||
$sum += $credit->montant + $credit->montant_rembourse + $credit->interet + $credit->taxe;
|
$sum += $credit->montant + $credit->montant_rembourse + $credit->interet + $credit->taxe;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue