Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
where('branch_id',Session::get('user')['branch_id'])->where('id',$id)->get();
foreach($data as $d){
$dd = $d->name;
}
return $dd;
}
public static function get_borrower_id($id,$id2){
$bb=0;
if($id2=='person'){
foreach(DB::table('borrowers')->where('id',$id)->get() as $borrower){
$bb = ucfirst(strtolower($borrower->firstName))." ".ucfirst(strtolower($borrower->middleName))." ".ucfirst(strtolower($borrower->lastName));
}
}else{
if(!$bb){
foreach(DB::table('borrowergroups')->where('id',$id)->get() as $borrower){
$bb = ucfirst(strtolower($borrower->groupName));
}
}
}
return $bb;
}
public static function get_borrower_info($id){
$bb=DB::table('borrowers')->where('id',$id)->where('branch_id',Session::get('user')['branch_id'])->get();
return $bb;
}
##validate saving transactions...
public static function validate_savings_transactions(Request $request){
$ex=$request->id;
if($ex=='saccos'){
echo json_encode(array('html'=>'','no'=>1));
}else{
$ex=explode('/',$request->id);
$acc_id=$ex[0];
$user_id=$ex[1];
$amount=$request->am;
$t=explode('/',$request->type);
$type=$t[0];
$acc=DB::table('savingaccount')->where('id',$acc_id)->where('branch_id',Session::get('user')['branch_id'])->where('borrower_id',$user_id)->get();
foreach($acc as $row_acc){
$product=DB::table('savingproduct')->where('id',$row_acc->savingProduct_id)->get();
foreach($product as $row){
$cr=DB::table('savingtransactions')->where('account_id',$acc_id)->where('debitCredit','credit')->where('branch_id',Session::get('user')['branch_id'])->sum('amount');
$dr=DB::table('savingtransactions')->where('account_id',$acc_id)->where('debitCredit','debit')->where('branch_id',Session::get('user')['branch_id'])->sum('amount');
$ledger1=$cr-$dr;
$ledger=number_format($cr-$dr);
#check customer active loan...
$bal=$sum_amount=$guarantor=$due_loan=0;
$loan=DB::table('loans')->where('status','granted')->where('borrower_id',$user_id)->get();
foreach($loan as $row_loan){
$guarantor=DB::table('guarantor')->where('branch_id',Session::get('user')['branch_id'])->where('loan_id',$row_loan->id)->where('guarantor_id',$user_id)->sum('amount');
$due_loan=$row_loan->dueAmount;
$bal=$due_loan-$guarantor;
}
#check if customer has guarantee loan
$guarantor2=DB::table('guarantor')->where('branch_id',Session::get('user')['branch_id'])->where('guarantor_id',$user_id)->get();
foreach($guarantor2 as $row_g2){
$loan2=DB::table('loans')->where('branch_id',Session::get('user')['branch_id'])->where('status','granted')->where('id',$row_g2->loan_id)->count();
if($loan2>0){
$sum_amount=DB::table('guarantor')->where('branch_id',Session::get('user')['branch_id'])->where('loan_id',$row_g2->loan_id)->where('guarantor_id',$user_id)->sum('amount');
}
}
$ava_bal=$ledger1-$bal-$sum_amount;
$w_bal=$ava_bal-$row->minimum_amount;
?>
$w_bal){
$no = 0;
$html = '