Merge branch 'amirah' into 'main'
update laporan, uninstall ckeditor See merge request online-sistem1/lelong!120
This commit is contained in:
@@ -88,7 +88,7 @@ class ReportController extends Controller
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan_lelong.lelong_id','=',$lelong_id)
|
||||
->where('cawangan.caw_code', $kodcaw)
|
||||
->select('lelong_id','tarikh_lelong','fasa')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa')
|
||||
->groupBy('lelong_id')
|
||||
->get()->toArray();
|
||||
|
||||
@@ -103,26 +103,45 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->where('lelongbid.lelong_id', $lelong_id)
|
||||
->where('lelongbid.kodcaw', $kodcaw)
|
||||
->get()->toArray();
|
||||
|
||||
$keuntungan=0;
|
||||
$total_hargaasas = 0;
|
||||
$total_berat = 0;
|
||||
$total_berat = 0;
|
||||
|
||||
|
||||
$marhun = LelongBid::join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id')
|
||||
->where('lelong_id','=',$lelong_id)
|
||||
->where('lelongbid.kodcaw', $kodcaw);
|
||||
|
||||
foreach($brglelong as $index1=>$upah)
|
||||
$arraynorujukan = $marhun->pluck('norujukan')->toArray();
|
||||
$datasimulasi = $marhun->get();
|
||||
|
||||
foreach($datasimulasi as $index=>$totharga){
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $totharga['hargaasas'];
|
||||
}
|
||||
|
||||
|
||||
$marhuns = Gadai::on($datasimulasi[0]['kodcaw'])->whereIn('norujukan', $arraynorujukan)
|
||||
->get()->toArray();
|
||||
// dd($marhuns);
|
||||
|
||||
foreach($marhuns as $index1=>$upah)
|
||||
{
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $upah['hargaasas'];
|
||||
$total_berat = $total_berat + $upah['berat'];
|
||||
|
||||
}
|
||||
|
||||
$listsag = Gadai::on($datasimulasi[0]['kodcaw'])->whereIn('norujukan', $arraynorujukan)
|
||||
->where('nokp','=',$upah['nokp'])
|
||||
->get();
|
||||
|
||||
foreach($listsag as $index=>$listing){
|
||||
|
||||
$total_berat = $total_berat + $listing['berat'];
|
||||
}
|
||||
}
|
||||
$marhuns[$index1]['listsag'] = $listsag;
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.listlelong',compact('arrayinfo','lelongid','brglelong','lelong_id','keuntungan','total_hargaasas','total_berat'))
|
||||
->setPaper('a4', 'potrait');
|
||||
$pdf = PDF::loadView('pdf.listlelong',compact('arrayinfo','marhuns','lelong_id','keuntungan','total_hargaasas','total_berat','datasimulasi'))
|
||||
->setPaper('a4', 'landscape');
|
||||
|
||||
return $pdf->download('Senarai Barang Lelong.pdf');
|
||||
}
|
||||
@@ -180,7 +199,7 @@ class ReportController extends Controller
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan.caw_code',$kodcaw)
|
||||
->where('cawangan_lelong.lelong_id','=',$lelong_id)
|
||||
->select('lelong_id','tarikh_lelong','fasa')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa')
|
||||
->groupBy('lelong_id')
|
||||
->get()->toArray();
|
||||
|
||||
@@ -263,7 +282,7 @@ class ReportController extends Controller
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan_lelong.lelong_id','=',$lelong_id)
|
||||
->where('cawangan.caw_code',$kodcaw)
|
||||
->select('lelong_id','tarikh_lelong','fasa')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa')
|
||||
->groupBy('lelong_id')
|
||||
->get();
|
||||
|
||||
@@ -448,6 +467,8 @@ class ReportController extends Controller
|
||||
array_push($arrayinfocaw,['laporancaw' => $laporancaw,'cawangan' => $cawangan]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$brglelpembida = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
||||
->where('lelongbid.kodcaw',$kodcaw)
|
||||
@@ -461,7 +482,6 @@ class ReportController extends Controller
|
||||
$total_hargaasas = $total_hargaasas + $totalbrglelpembida['hargaasas'];
|
||||
$total_hargalelong = $total_hargalelong + $totalbrglelpembida['hargabida'];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"barryvdh/laravel-dompdf": "^0.9.0",
|
||||
"ckeditor/ckeditor": "^4.19",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"intervention/image": "^2.7",
|
||||
|
||||
Generated
+832
-974
File diff suppressed because it is too large
Load Diff
@@ -121,16 +121,21 @@ tr:nth-child(even) {
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@foreach($brglelong as $brg)
|
||||
|
||||
|
||||
@foreach ($marhuns as $index=> $details)
|
||||
<tr>
|
||||
|
||||
<td width="5%" align="center">{{ $loop->iteration }} </td>
|
||||
<td width="14%" align="center">{{ $brg['norujukan']}}</td>
|
||||
<td width="17%" align="center">{{ $brg['marhun']}}</td>
|
||||
<td width="17%" align="center">{{ number_format($brg['berat'], 2, '.', ',') }}</td>
|
||||
<td width="12%" align="center">{{ number_format($brg['hargaasas'], 2, '.', ',') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<td width="5%" align="center">{{ $loop->iteration }} </td>
|
||||
<td width="14%" align="center">{{ $details['norujukan']}}</td>
|
||||
<td width="14%" align="center">{{ $details['marhun']}}</td>
|
||||
<td width="17%" align="center">{{ number_format($details['berat'], 2, '.', ',') }}</td>
|
||||
<td>
|
||||
{{ $datasimulasi[$index]['hargaasas'] }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
|
||||
|
||||
Reference in New Issue
Block a user