Merge branch 'master' into 'fiza'
# Conflicts: # routes/web.php
This commit is contained in:
@@ -14,6 +14,7 @@ use App\Lelong;
|
||||
use App\WTD;
|
||||
use App\HapusKira;
|
||||
use App\Tebus;
|
||||
use App\Laptebus;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -897,7 +898,41 @@ class GadaiController extends Controller
|
||||
return response()->json(number_format($gadaiTerkumpul,2));
|
||||
}
|
||||
|
||||
public function outstandingSemasa($ic){
|
||||
public function showTebusTerkumpul(){
|
||||
|
||||
$cawangan_all = Cawangan::on('mysql7')->get();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tebusTerkumpul = 0;
|
||||
foreach($cawangan_all as $index=>$cawangan){
|
||||
$tebus = Tebus::on('mysql6')->where('jenistebus','=','T')->whereYear('t_tebus','=',$current->year)->sum('pinjaman');
|
||||
$tebusTerkumpul += $tebus;
|
||||
}
|
||||
|
||||
return response()->json(number_format($tebusTerkumpul,2));
|
||||
}
|
||||
|
||||
public function showUpahTerkumpul(){
|
||||
|
||||
$cawangan_all = Cawangan::on('mysql7')->get();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$upahTerkumpul = 0;
|
||||
foreach($cawangan_all as $index=>$cawangan){
|
||||
$upah = Tebus::on($cawangan['mysql'])->whereYear('t_tebus','=','2020')->get();
|
||||
// dd($upah);
|
||||
// $upahTerkumpul += $upah;
|
||||
if(sizeof($upah) != 0){
|
||||
foreach($upah as $upahall)
|
||||
{
|
||||
$upahTerkumpul += $upahall['bakiupah'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return response()->json(number_format($upahTerkumpul,2));
|
||||
}
|
||||
|
||||
public function outstandingSemasaCustomer($ic){
|
||||
$cawangan_all = Cawangan::on('mysql7')->get();
|
||||
|
||||
$total_pembiayaan = 0;
|
||||
|
||||
Reference in New Issue
Block a user