laporan gadai by range date
This commit is contained in:
@@ -720,6 +720,44 @@ class GadaiController extends Controller
|
|||||||
return response()->json($gadai);
|
return response()->json($gadai);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLaporanGadaiRangeDate($kodcaw,Request $request){
|
||||||
|
|
||||||
|
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||||
|
|
||||||
|
$gadai_data = Gadai::on($cawangan['mysql'])->select('t_gadai','norujukan','nokp','semakbarcode','masa','berat','nilaimarhun','pinjaman','upah12','percentpinj','teller','nokp')
|
||||||
|
->where('t_gadai','>=',$request->mula)
|
||||||
|
->where('t_gadai','<=',$request->akhir)
|
||||||
|
->orderBy('t_gadai')
|
||||||
|
->orderBy('teller')
|
||||||
|
->orderBy('sirig')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$gadai = [];
|
||||||
|
|
||||||
|
if($gadai_data){
|
||||||
|
foreach($gadai_data as $index=>$gadaiData){
|
||||||
|
$customer_info = Customer::on('mysql7')->where('kplama','=',$gadaiData['nokp'])->orWhere('kpbaru','=',$gadaiData['nokp'])->first();
|
||||||
|
array_push($gadai,[
|
||||||
|
"t_gadai"=> $gadaiData['t_gadai'],
|
||||||
|
"norujukan"=> $gadaiData['norujukan'],
|
||||||
|
"nama"=> $customer_info['nama'],
|
||||||
|
"nokp"=> $gadaiData['nokp'],
|
||||||
|
"semakbarcode"=> $gadaiData['semakbarcode'],
|
||||||
|
"masa"=> $gadaiData['masa'],
|
||||||
|
"berat"=> $gadaiData['berat'],
|
||||||
|
"nilaimarhun"=> $gadaiData['nilaimarhun'],
|
||||||
|
"pinjaman"=> $gadaiData['pinjaman'],
|
||||||
|
"upah12"=> $gadaiData['upah12'],
|
||||||
|
"percentpinj"=> $gadaiData['percentpinj'],
|
||||||
|
"alamat1"=> $customer_info['alamat1'],
|
||||||
|
"teller"=> $gadaiData['teller']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json($gadai);
|
||||||
|
}
|
||||||
|
|
||||||
public function getLaporanBatalGadai($kodcaw,$tarikh){
|
public function getLaporanBatalGadai($kodcaw,$tarikh){
|
||||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
|||||||
$router->get('gadaiansemasa/belum_serah/{kodcaw}',['uses'=>'GadaiController@getGadaianBelumSerah']);
|
$router->get('gadaiansemasa/belum_serah/{kodcaw}',['uses'=>'GadaiController@getGadaianBelumSerah']);
|
||||||
$router->get('gadai/laporan/{kodcaw}/{tarikh}',['uses'=>'GadaiController@getLaporanGadai']);
|
$router->get('gadai/laporan/{kodcaw}/{tarikh}',['uses'=>'GadaiController@getLaporanGadai']);
|
||||||
$router->get('gadailaporanRange/{kodcaw}',['uses'=>'GadaiController@getLaporanGadaiRange']);
|
$router->get('gadailaporanRange/{kodcaw}',['uses'=>'GadaiController@getLaporanGadaiRange']);
|
||||||
|
$router->get('gadailaporanRangeDate/{kodcaw}',['uses'=>'GadaiController@getLaporanGadaiRangeDate']);
|
||||||
|
|
||||||
|
|
||||||
$router->get('gadai/customers/{ic}/outstandingsemasa/{kodcaw}',['uses'=>'GadaiController@outstandingSemasaCustomer']);
|
$router->get('gadai/customers/{ic}/outstandingsemasa/{kodcaw}',['uses'=>'GadaiController@outstandingSemasaCustomer']);
|
||||||
|
|||||||
Reference in New Issue
Block a user