update design pdf dan view report
This commit is contained in:
@@ -753,8 +753,10 @@ class ReportController extends Controller
|
||||
->toArray();
|
||||
array_push($arrayinfo,['laporan' => $laporan,'details' => $details]);
|
||||
}
|
||||
$datacaw = Cawangan::where('id','=',$cawid)
|
||||
->get();
|
||||
|
||||
$pdf = PDF::loadView('pdf.pdflelongreport',compact('arraymarhun','marhuns','lelongid','cawid','arrayinfo','total_berat',
|
||||
$pdf = PDF::loadView('pdf.pdflelongreport',compact('datacaw','arraymarhun','marhuns','lelongid','cawid','arrayinfo','total_berat',
|
||||
'total_pinjaman',
|
||||
'total_upah',
|
||||
'total_hargaasas',
|
||||
@@ -836,6 +838,7 @@ class ReportController extends Controller
|
||||
$total_bakiupah = 0;
|
||||
$total_nilaimarhun = 0;
|
||||
$keuntungan = 0;
|
||||
$total_cazlelong = 0;
|
||||
$marhuns = LelongBid::join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id')
|
||||
->where('lelong_id','=',$lelongid)->where('caw_id','=',$cawid)
|
||||
->select(
|
||||
@@ -869,6 +872,11 @@ class ReportController extends Controller
|
||||
->orWhere('kplama','=',$gadai['nokp'])
|
||||
->first();
|
||||
// dd($customer);
|
||||
$simulasilel = Lelong::where('id',$lelongid)->get();
|
||||
$sumcajlelong = $cal['hargaasas'] * ($simulasilel[0]['cajlelong']/100);
|
||||
$totalbaki = $cal['hargaasas'] - $cal['pinjaman'] - $cal['bakiupah'] - bcdiv($sumcajlelong,1,1);
|
||||
$marhuns[$index1]['cajlelong'] = bcdiv($sumcajlelong,1,1);
|
||||
$marhuns[$index1]['baki'] = $totalbaki;
|
||||
|
||||
// $keuntungan = $cal['bakipjm'] - ($cal['bakihargajualan'] - ($cal['upah12'] - $cal['ansakhir'])-(($cal['tempoh']-$cal['tempohbayar'])*$cal['kadarupah']/100*$cal['bakipjm']) );
|
||||
$marhuns[$index1]['keuntungan'] = $keuntungan;
|
||||
@@ -895,6 +903,7 @@ class ReportController extends Controller
|
||||
$total_hargaasas = $total_hargaasas + $cal['hargaasas'];
|
||||
$total_nilaimarhun = $total_nilaimarhun + $cal['nilaimarhun'];
|
||||
$total_bakiupah = $total_bakiupah + $cal['bakiupah'];
|
||||
$total_cazlelong = $total_cazlelong + bcdiv($sumcajlelong,1,1);
|
||||
|
||||
}
|
||||
|
||||
@@ -916,14 +925,17 @@ class ReportController extends Controller
|
||||
->toArray();
|
||||
array_push($arrayinfo,['laporan' => $laporan,'details' => $details]);
|
||||
}
|
||||
$datacaw = Cawangan::where('id','=',$cawid)
|
||||
->get();
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.pdflelongreportpc',compact('arraymarhun','marhuns','lelongid','cawid','arrayinfo','total_berat',
|
||||
$pdf = PDF::loadView('pdf.pdflelongreportpc',compact('datacaw','arraymarhun','marhuns','lelongid','cawid','arrayinfo','total_berat',
|
||||
'total_pinjaman',
|
||||
'total_upah',
|
||||
'total_hargaasas',
|
||||
'total_bakiupah',
|
||||
'total_nilaimarhun'))
|
||||
'total_nilaimarhun',
|
||||
'total_cazlelong'))
|
||||
->setPaper('a4','potrait');
|
||||
|
||||
return $pdf->download('Laporan Lelong Cawangan.pdf');
|
||||
|
||||
Reference in New Issue
Block a user