update perubahan mutu marhun join marhun cawangan
This commit is contained in:
@@ -674,7 +674,26 @@ class MarhunController extends Controller
|
||||
// 'gadaimarhun.id as idgadaimarhun'
|
||||
)
|
||||
->get();
|
||||
// dd($lelbidmarhuns);
|
||||
|
||||
|
||||
|
||||
$arraygadai = $lelbidmarhuns->pluck('norujukan')->toArray();
|
||||
$datagadai = $lelbidmarhuns;
|
||||
|
||||
|
||||
$gadai = GadaiMarhun::on($datagadai[0]['kodcaw'])->whereIn('norujukan', $arraygadai)
|
||||
->get()->toArray();
|
||||
|
||||
foreach($gadai as $index1=>$gadai2)
|
||||
{
|
||||
|
||||
$listgadai = GadaiMarhun::on($datagadai[0]['kodcaw'])->whereIn('norujukan', $arraygadai)
|
||||
->get();
|
||||
|
||||
}
|
||||
$gadai[$index1]['listgadai'] = $listgadai;
|
||||
// dd($gadai);
|
||||
|
||||
|
||||
$arraylelbidmarhun = [];
|
||||
$bakilelong = 0;
|
||||
@@ -685,11 +704,11 @@ class MarhunController extends Controller
|
||||
->where('id', $lelbidmarhun->lelongbidmarhun_id)
|
||||
->get()->toArray();
|
||||
|
||||
$marhunsgadai = GadaiMarhun::where('norujukan', $norujukan)
|
||||
// ->where('karat', $lelbidmarhun->karat)
|
||||
// ->where('id', $lelbidmarhun->idgadaimarhun)
|
||||
->first();
|
||||
// dd($lelbidmarhun->idgadaimarhun);
|
||||
// $marhunsgadai = GadaiMarhun::where('norujukan', $norujukan)
|
||||
// // ->where('karat', $lelbidmarhun->karat)
|
||||
// // ->where('id', $lelbidmarhun->idgadaimarhun)
|
||||
// ->first();
|
||||
// // dd($lelbidmarhun->idgadaimarhun);
|
||||
|
||||
$lelongbid = LelongBid::where('lelongbid.id', $lelbidmarhun->lelongbid_id)
|
||||
->where('lelongbid.lelong_id', $id)
|
||||
@@ -724,7 +743,7 @@ class MarhunController extends Controller
|
||||
$rugilelong = $totalbaki;
|
||||
}
|
||||
|
||||
$marhuns[$index1]['harga_gadai'] = $marhunsgadai['harga'];
|
||||
// $marhuns[$index1]['harga_gadai'] = $marhunsgadai['harga'];
|
||||
$marhuns[$index1]['nmarhun_gadai'] = $marhun['old_nmarhun'];
|
||||
$marhuns[$index1]['old_marhun'] = $marhun['marhun'];
|
||||
$marhuns[$index1]['status_ubah'] = $status;
|
||||
@@ -738,7 +757,7 @@ class MarhunController extends Controller
|
||||
}
|
||||
|
||||
|
||||
return view('pengesahan.mutumarhun', compact('lelongbid', 'norujukan', 'id', 'arraylelbidmarhun', 'marhuns'));
|
||||
return view('pengesahan.mutumarhun', compact('lelongbid', 'norujukan', 'id', 'arraylelbidmarhun', 'marhuns','gadai'));
|
||||
}
|
||||
|
||||
public function terimaperubahan(Request $request)
|
||||
|
||||
@@ -277,6 +277,8 @@ class ReportController extends Controller
|
||||
|
||||
$arraydetails = [];
|
||||
$arrayinfocaw = [];
|
||||
$total_hargaasas = 0;
|
||||
$total_hargabida = 0;
|
||||
|
||||
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
@@ -304,9 +306,13 @@ class ReportController extends Controller
|
||||
->groupBy('lelongbid_id')
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
|
||||
foreach( $laporanpembida as $index1=>$totlappembida){
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $totlappembida['hargaasas'];
|
||||
// $total_hargabida = $total_hargabida + $totlappembida['hargabida'];
|
||||
|
||||
}
|
||||
foreach($laporanpembida as $laporan)
|
||||
{
|
||||
$details = LelongBidder::where('lelongbid_id',$laporan['lelongbid_id'])
|
||||
@@ -317,7 +323,10 @@ class ReportController extends Controller
|
||||
array_push($arraydetails,['laporan' => $laporan,'details' => $details]);
|
||||
}
|
||||
|
||||
$pdf = PDF::loadView('pdf.pdfsenarailapbidaan', compact('lelongid','arraydetails','lelong_id','lelongid','cawangan','arrayinfocaw'))
|
||||
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.pdfsenarailapbidaan', compact('lelongid','arraydetails','lelong_id','lelongid','cawangan','arrayinfocaw','total_hargaasas','total_hargabida'))
|
||||
->setPaper('a4', 'potrait');
|
||||
|
||||
return $pdf->download('Senarai Nama Bidaan Pembida.pdf');
|
||||
@@ -453,7 +462,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();
|
||||
|
||||
@@ -469,8 +478,7 @@ class ReportController extends Controller
|
||||
|
||||
|
||||
|
||||
$brglelpembida = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
||||
$brglelpembida = LelongBid::join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
||||
->where('lelongbid.kodcaw',$kodcaw)
|
||||
->where('lelongbid.lelong_id','=',$lelong_id)
|
||||
->where('lelongbidder.status_bidder','=','1')
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="col-sm-4" id="para2">
|
||||
<textarea name="para2" rows="10" cols="100" id="article-ckeditor" required>
|
||||
|
||||
</textarea>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ tr:nth-child(even) {
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $laporan['laporan']['tarikh_lelong'] );
|
||||
$t_lelong = $myDateTime->format('d-m-Y');
|
||||
echo($t_lelong);
|
||||
@endphp</td>
|
||||
@endphp</td>
|
||||
<td>Fasa : {{$laporan['laporan']['fasa']}}</td>
|
||||
|
||||
@foreach ($laporan['details'] as $details)
|
||||
@@ -119,9 +119,7 @@ tr:nth-child(even) {
|
||||
<th width="25%" align="left">Berat (gm)</th>
|
||||
<th width="25%" align="left">Harga Asas</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
</thead>
|
||||
|
||||
@foreach ($marhuns as $index=> $details)
|
||||
<tr>
|
||||
@@ -130,12 +128,10 @@ tr:nth-child(even) {
|
||||
<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
|
||||
|
||||
<td>{{ $datasimulasi[$index]['hargaasas'] }}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
|
||||
|
||||
@@ -148,6 +148,14 @@ tr:nth-child(even) {
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="left"><strong>Jumlah Keseluruhan</strong></td>
|
||||
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
@@ -66,9 +66,10 @@
|
||||
@endif
|
||||
{{ $detail[0]['berat'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{-- <td>
|
||||
{{ number_format($detail[0]['harga_gadai'], 2, '.', ',') }}
|
||||
</td>
|
||||
</td> --}}
|
||||
<td>{{ number_format ($gadai[$index1]['harga'], 2, '.', ',') }}</td>
|
||||
<td>
|
||||
@if($detail[0]['old_harga'] != $detail[0]['harga'])
|
||||
{{ number_format($detail[0]['old_harga'], 2, '.', ',') }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
||||
@@ -203,7 +204,7 @@
|
||||
"orderable": true
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
order: [[0, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
|
||||
Reference in New Issue
Block a user