add excel by sag
This commit is contained in:
@@ -257,7 +257,8 @@ class NotisController extends Controller
|
||||
|
||||
$marhun = LelongBid::join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id')
|
||||
->where('lelong_id','=',$lelong_id)
|
||||
->where('lelongbid.kodcaw','=',$user->kodcaw);
|
||||
->where('lelongbid.kodcaw','=',$user->kodcaw)
|
||||
->orderBy('norujukan');
|
||||
|
||||
$arraynorujukan = $marhun->pluck('norujukan')->toArray();
|
||||
$datalelong = $marhun->get();
|
||||
@@ -288,6 +289,14 @@ class NotisController extends Controller
|
||||
// dd($marhuns[$index1]['nama']);
|
||||
|
||||
}
|
||||
$listsaglelong = Gadai::on($datalelong[0]['kodcaw'])->whereIn('norujukan', $arraynorujukan)
|
||||
->get();
|
||||
foreach($listsaglelong as $index2=>$sag){
|
||||
$nokp = Customer::where('kpbaru','=',$sag['nokp'])
|
||||
->orWhere('kplama','=',$sag['nokp'])
|
||||
->first();
|
||||
$listsaglelong[$index2]['nama'] = $nokp;
|
||||
}
|
||||
|
||||
if($request->type == 'excel')
|
||||
{
|
||||
@@ -295,6 +304,13 @@ class NotisController extends Controller
|
||||
return view('excel.listnotis_excel',compact('marhuns','lelong_id','bayaran','listsag','caw'));
|
||||
|
||||
}
|
||||
elseif($request->type == 'excelbysag')
|
||||
{
|
||||
|
||||
return view('excel.listnotis_excelbysag',compact('listsaglelong','lelong_id','bayaran','listsag','caw'));
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$pdf = PDF::loadView('pdf.listnotis',compact('marhuns','lelong_id','bayaran','listsag','caw'))
|
||||
|
||||
Reference in New Issue
Block a user