fix api email

This commit is contained in:
Afiq
2022-03-16 13:56:13 +08:00
parent 67969879f4
commit 0f12ec3b42
15 changed files with 989 additions and 1031 deletions
+19 -19
View File
@@ -18,9 +18,9 @@ class AnalisaController extends Controller
$cawanganlelong = [];
$count = 0;
$customers_detail = Http::get(config('api.url') .'/api/customers/' . $kpbaru)->json();
$gadaidetail[] = Http::get(config('api.url') .'/api/customers/' . $kpbaru . '/gadai/belum_tebus')->json();
$customers_detail = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/customers/' . $kpbaru)->json();
$gadaidetail[] = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/customers/' . $kpbaru . '/gadai/belum_tebus')->json();
if(empty($gadaidetail[0]) )
{
$gadai_belum_tebus = $gadaidetail[0];
@@ -31,20 +31,20 @@ class AnalisaController extends Controller
}
$bilangan_belum_tebus = (empty($gadaidetail[0])) ? count($gadaidetail[0]) : count($gadaidetail[0][0]);
$lelongdetail = Http::get(config('api.url') .'/api/customers/' . $kpbaru . '/gadai/lelong')->json();
$lelongdetail = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/customers/' . $kpbaru . '/gadai/lelong')->json();
$bilangan_lelong = (empty($lelongdetail)) ? sizeof($lelongdetail) : sizeof($lelongdetail[0]);
$marhunakanlelong = Http::get(config('api.url') .'/api/bilangandilelong/' . $kpbaru)->json();
$marhunakanlelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/bilangandilelong/' . $kpbaru)->json();
$totalgadaicawangan = 0;
foreach ($gadaidetail as $index => $gadai) {
foreach ($gadai as $index1 => $pinjamanzz) {
foreach($pinjamanzz as $pin)
{
$pinjaman = floatval($pin['pinjaman']);
$totalgadai += $pinjaman;
$totalgadaicawangan += $pinjaman;
@@ -61,26 +61,26 @@ class AnalisaController extends Controller
}
}
$marhunakanlelong = Http::get(config('api.url') .'/api/bilangandilelong/' . $kpbaru)->json();
$bilakandilelong = (empty($marhunakanlelong)) ? sizeof($marhunakanlelong) : sizeof($marhunakanlelong[0]);
$marhunakanlelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/bilangandilelong/' . $kpbaru)->json();
$harga_emas = Http::get(config('api.url') .'/api/harga_emas/')->json();
$bilakandilelong = (empty($marhunakanlelong)) ? sizeof($marhunakanlelong) : sizeof($marhunakanlelong[0]);
$harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/')->json();
$hargaemasterdahulu = array();
foreach($harga_emas as $index=>$harga)
{
$hargaemassandaran = Http::get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
$hargaemassandaran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/harga_emas/rekod/sandaran',['karat' => $harga['karat']])->json();
$percentnaik = (floatval($harga['harga']) - floatval($hargaemassandaran[1]['harga'])) / ($hargaemassandaran[1]['harga']) * 100;
array_push($hargaemasterdahulu,['karat' => $harga['karat'],'hargasemasa' => $harga['harga'], 'hargadahulu' => $hargaemassandaran[1]['harga'],'percent' => $percentnaik]);
}
$belum_tebus = Http::get(config('api.url') . '/api/customers/'. $kpbaru . '/gadai/' . 'belum_tebus')->json();
$belum_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $kpbaru . '/gadai/' . 'belum_tebus')->json();
if(is_array($belum_tebus))
{
@@ -90,16 +90,16 @@ class AnalisaController extends Controller
}
}
$financemonth = Http::get(config('api.url') .'/portal/financeMonth/',['icno' => $kpbaru])->json();
$financemonth = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/portal/financeMonth/',['icno' => $kpbaru])->json();
// dd(json_encode($financemonth));
$financemonth = json_encode(array_values($financemonth));
// dd($financemonth);
// return view('analisa.index', compact("totalgadai",'bilangan_belum_tebus','belum_tebus','hargaemasterdahulu','bilangan_melebihi_6_bulan','bilakandilelong'));
return view('includes.analisaportal', compact("totalgadai",'bilangan_belum_tebus','belum_tebus','hargaemasterdahulu','bilangan_melebihi_6_bulan','bilakandilelong','financemonth'));
}
@@ -67,7 +67,7 @@ class RegisterController extends Controller
*/
protected function create(array $data)
{
Http::put(config('api.url') .'/api/otp/update_otp' ,[ 'nokp' => $data['icno'] ])->json();
Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') .'/api/otp/update_otp' ,[ 'nokp' => $data['icno'] ])->json();
// return User::create([
// 'name' => $data['name'],
+43 -43
View File
@@ -28,15 +28,15 @@ class BayaranController extends Controller
$this->api_key = 'f3e82fe1-a422-4660-97f0-65cc59ff6c47';
$this->XSignature_Key = 'S-alZUbzmD2_TF3vmrRqgehQ';
}
}
public function SenaraiPembayaran()
{
$auth_user = Auth::user();
$belum_tebus = Http::get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'belum_tebus')->json();
$belum_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'belum_tebus')->json();
if(is_array($belum_tebus))
{
@@ -45,7 +45,7 @@ class BayaranController extends Controller
$belum_tebus = $belum_tebus[0];
}
}
// return view('pembayaran.senaraibayaran', compact('belum_tebus'));
return view('includes.bayaran.senaraibayaransag', compact('belum_tebus'));
@@ -54,7 +54,7 @@ class BayaranController extends Controller
public function PembayaranAction(Request $request)
{
$validated = $request->validate([
'chkboxsag' => 'required',
]);
@@ -63,7 +63,7 @@ class BayaranController extends Controller
foreach($request->chkboxsag as $index=>$sag)
{
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $sag)->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $sag)->json();
$arraybayar[] = $gadai[0][0];
}
@@ -80,11 +80,11 @@ class BayaranController extends Controller
// dd($request);
// foreach($request->txtnorujukanhidden as $index1=>$norujukan)
// {
// // $updategadai = Http::put(config('api.url').'/api/gadai/'. $request->txtkodcawhidden[$index1] .'/norujukan/' . $norujukan,[
// // $updategadai = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url').'/api/gadai/'. $request->txtkodcawhidden[$index1] .'/norujukan/' . $norujukan,[
// // 'bayaran' => $request->txtbayaranhidden[$index1]
// // ])->json();
// array_push($arraybayaran,['norujukan' => $norujukan, 'kodcaw' => $request->txtkodcawhidden[$index1], 'bayaran' => $request->txtbayaranhidden[$index1]]);
// }
@@ -94,7 +94,7 @@ class BayaranController extends Controller
new GuzzleHttpClient(),
new GuzzleMessageFactory()
);
$billplz = new Client($http, $this->api_key);
if(config('app.env') != 'production'){
$billplz->useSandbox();
@@ -126,7 +126,7 @@ class BayaranController extends Controller
{
array_push($array_payment,['customer_name' => Auth::user()->name,'nokp' => Auth::user()->icno,'kodcaw'=>$request->txtkodcawhidden[$index1],'norujukan'=>$norujukan,'bayaran'=>$request->txtbayaranhidden[$index1]]);
}
$total_bayaran += $request->txtbayaranhidden[$index1];
}
@@ -141,13 +141,13 @@ class BayaranController extends Controller
if(config('app.env') != 'production'){
$collection_id = $this->collection_id;
}else{
$collection_id = Http::get(config('api.url'). '/api/billplz/collectionid',[
$collection_id = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/billplz/collectionid',[
'kodcaw' => $kodcaw
])->json();
])->json();
}
array_push($arraycollection_id,$collection_id);
}
$response = $bill->create(
$collection_id,
@@ -164,7 +164,7 @@ class BayaranController extends Controller
foreach($array_payment as $index1=>$arraypay)
{
$previous_siri = Http::get(config('api.url') . '/api/online/transaction')->json();
$previous_siri = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/online/transaction')->json();
if($previous_siri){
$nosiri = $previous_siri['nosiri'] + 1;
}else{
@@ -173,7 +173,7 @@ class BayaranController extends Controller
$reference_no = 'APKB' . $day . $month . $year . sprintf("%08d", $nosiri);
$new_transaction = Http::post(config('api.url') . '/api/online/transaction',[
$new_transaction = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/online/transaction',[
'nokp'=> Auth::user()->icno,
'reference_no'=> $reference_no,
'nosiri'=> $nosiri,
@@ -185,7 +185,7 @@ class BayaranController extends Controller
])->json();
}
return redirect($billcode['url'] . '?auto_submit=true');
@@ -198,37 +198,37 @@ class BayaranController extends Controller
$kpbaru = Auth::User()->icno;
$customer = Http::get(config('api.url') .'/api/customers/'.$kpbaru)->json();
$customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/customers/'.$kpbaru)->json();
$customer_details = $customer;
$current = Carbon::now();
$current = new Carbon();
$date = $current->toDateTimeString();
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $payment_details['kodcaw'])->json();
$cawangan = Http::get(config('api.url') . '/api/cawangan/detail/'. $payment_details['kodcaw'])->json();
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $payment_details['kodcaw'])->json();
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/detail/'. $payment_details['kodcaw'])->json();
$cawangan_detail = $cawangan[0];
$nama_cawangan = $cawangan_info['details_caw'];
$gadai_details = Http::get(config('api.url') .'/api/gadai/norujukan/'.$payment_details['norujukan'])->json();
$gadai_details = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/gadai/norujukan/'.$payment_details['norujukan'])->json();
$gadai = $gadai_details[0][0];
// if($gadai_details[0][0]['hargajualan'] > 0)
// {
// $baki_harga_jualan_sebelum = $gadai_details[0][0]['bakihargajualan'] + $payment_details['total_payment'];
// $baki_harga_jualan_semasa = $gadai_details[0][0]['bakihargajualan'];
return view('pembayaran.resit.resitportal',compact('customer_details','payment_details','cawangan_detail','nama_cawangan','gadai'));
// }else{
// $gadai_details = $gadai_details[0][0];
// $koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $payment_details['kodcaw'] . '/' . $payment_details['norujukan'])->json();
// $koskeuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahbukantawarruq/' . $payment_details['kodcaw'] . '/' . $payment_details['norujukan'])->json();
// $jbg = $gadai_details['jbg'];
// return view('pembayaran.resit.resit_baru_sebelum',compact('customer_details','payment_details','date','koskeuntungan','jbg'));
// }
}
@@ -237,7 +237,7 @@ class BayaranController extends Controller
new GuzzleHttpClient(),
new GuzzleMessageFactory()
);
$billplz = new Client($http, $this->api_key);
if(config('app.env') != 'production'){
$billplz->useSandbox();
@@ -247,24 +247,24 @@ class BayaranController extends Controller
$bill = $billplz->bill();
$data = $bill->webhook($request->toArray());
if($data['billplz']['paid'] == 'true'){
Http::put(config('api.url') . '/api/online/transaction',[
Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/online/transaction',[
'billplz_id' => $data['billplz']['id'],
'status' => 'PAID',
'paid_at' => $data['billplz']['paid_at']
]);
$transactionOnline = Http::get(config('api.url') . '/api/transaction/online/express',[
$transactionOnline = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/online/express',[
'billplz_id' => $data['billplz']['id']
])->json();
return redirect()->route('pay.success',[
'transactionOnline' => $transactionOnline
]);
}else{
Http::put(config('api.url') . '/api/online/transaction',[
Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/online/transaction',[
'billplz_id' => $data['billplz']['id'],
'status' => 'UNSUCCESSFUL',
'paid_at' => null
@@ -278,7 +278,7 @@ class BayaranController extends Controller
new GuzzleHttpClient(),
new GuzzleMessageFactory()
);
$billplz = new Client($http, $this->api_key);
if(config('app.env') != 'production'){
$billplz->useSandbox();
@@ -289,22 +289,22 @@ class BayaranController extends Controller
$data = $bill->webhook($request->toArray());
if($data['billplz']['paid'] == 'true'){
Http::put(config('api.url') . '/api/online/transaction',[
Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/online/transaction',[
'billplz_id' => $data['billplz']['id'],
'status' => 'PAID',
'paid_at' => $data['billplz']['paid_at']
]);
$transactionOnline = Http::get(config('api.url') . '/api/transaction/online/login',[
$transactionOnline = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/online/login',[
'billplz_id' => $data['billplz']['id']
])->json();
return redirect()->route('pay.success',[
'transactionOnline' => $transactionOnline
]);
}else{
Http::put(config('api.url') . '/api/online/transaction',[
Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/online/transaction',[
'billplz_id' => $data['billplz']['id'],
'status' => 'UNSUCCESSFUL',
'paid_at' => null
@@ -323,21 +323,21 @@ class BayaranController extends Controller
// dd($transactionOnline);
foreach($transactionOnline as $index1=>$trans)
{
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $trans['kodcaw'])->json();
$cawangan = Http::get(config('api.url') . '/api/cawangan/detail/'. $trans['kodcaw'])->json();
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $trans['kodcaw'])->json();
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/detail/'. $trans['kodcaw'])->json();
$cawangan_detail = $cawangan[0];
$nama_cawangan = $cawangan_info['details_caw'];
$gadai = Http::get(config('api.url') .'/api/gadai/norujukan/'.$trans['norujukan'])->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/gadai/norujukan/'.$trans['norujukan'])->json();
$gadai = $gadai[0][0];
array_push($arraygadai,$gadai);
array_push($arraycawangan,$cawangan_detail);
}
// dd($arraygadai,$arraycawangan);
// return view('pembayaran.result.berjaya',compact('transactionOnline','arraycawangan','arraygadai'));
return view('pembayaran.result.berjayaportal',compact('transactionOnline','arraycawangan','arraygadai'));
}
+52 -52
View File
@@ -12,8 +12,8 @@ class SemakController extends Controller
{
$auth_user = Auth::user();
$belum_tebus = Http::get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'belum_tebus')->json();
$cawangan = Http::get(config('api.url') . '/api/customer/eachcawangan/'. $auth_user['icno'])->json();
$belum_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'belum_tebus')->json();
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customer/eachcawangan/'. $auth_user['icno'])->json();
if(is_array($belum_tebus))
{
@@ -35,13 +35,13 @@ class SemakController extends Controller
'sltcawangan' => 'required'
]);
$cawangan_info=Http::get(config('api.url').'/api/cawangan/detail/'. $request->sltcawangan)->json();
$cawangan_info=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'. $request->sltcawangan)->json();
// dd($cawangan_info);
$auth_user = Auth::user();
$belum_tebus = Http::get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'belum_tebus/' . $request->sltcawangan)->json();
$sudah_tebus = Http::get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'sudah_tebus/' . $request->sltcawangan)->json();
$belum_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'belum_tebus/' . $request->sltcawangan)->json();
$sudah_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $auth_user['icno'] . '/gadai/' . 'sudah_tebus/' . $request->sltcawangan)->json();
// dd($sudah_tebus);
@@ -53,22 +53,22 @@ class SemakController extends Controller
{
$api_url = config('api.url');
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'. $kodcaw)->json();
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'. $kodcaw)->json();
$cawangan_detail=$cawangan[0];
$auth_user = Auth::user();
$customer = Http::get(config('api.url'). '/api/customers/'.$auth_user['icno'])->json();
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
$customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/customers/'.$auth_user['icno'])->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
if(sizeof($gadai) != 0)
$gadai = $gadai[0];
$transaction = Http::get(config('api.url').'/portal/transaksipelanggan',['norujukan' => $norujukan])->json();
$transaction = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/portal/transaksipelanggan',['norujukan' => $norujukan])->json();
// dd($transaction);
return view('penyata.summary',compact('cawangan_detail','transaction','customer','gadai','api_url'));
}
@@ -76,20 +76,20 @@ class SemakController extends Controller
{
$api_url = config('api.url');
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'. $kodcaw)->json();
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'. $kodcaw)->json();
$cawangan_detail=$cawangan[0];
$auth_user = Auth::user();
$customer = Http::get(config('api.url'). '/api/customers/'.$auth_user['icno'])->json();
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
$customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/customers/'.$auth_user['icno'])->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
if(sizeof($gadai) != 0)
$gadai = $gadai[0];
$upah = Http::get(config('api.url').'/portal/transaksipelanggan/upah',['norujukan' => $norujukan,'kodcaw' => $kodcaw])->json();
$upah = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/portal/transaksipelanggan/upah',['norujukan' => $norujukan,'kodcaw' => $kodcaw])->json();
return view('penyata.summaryupah',compact('cawangan_detail','upah','customer','gadai','api_url'));
}
@@ -97,35 +97,35 @@ class SemakController extends Controller
{
$api_url = config('api.url');
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'. $kodcaw)->json();
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'. $kodcaw)->json();
$cawangan_detail=$cawangan[0];
$auth_user = Auth::user();
$customer = Http::get(config('api.url'). '/api/customers/'.$auth_user['icno'])->json();
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
$customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/customers/'.$auth_user['icno'])->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
if(sizeof($gadai) != 0)
$gadai = $gadai[0];
$transaction = Http::get(config('api.url').'/api/transaction/norujukan/'. $norujukan)->json();
$transaction = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/transaction/norujukan/'. $norujukan)->json();
return view('penyata.penyata',compact('cawangan_detail','transaction','customer','gadai','api_url'));
}
public function resittebus($kodcaw,$norujukan)
{
{
$auth_user = Auth::user();
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $kodcaw)->json();
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $kodcaw)->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
$totaltransaction = 0;
$transaction = Http::get(config('api.url') . '/api/transaction/'. $norujukan)->json();
$transaction = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/'. $norujukan)->json();
foreach($transaction as $trans)
{
@@ -136,40 +136,40 @@ class SemakController extends Controller
if(sizeof($gadai) != 0)
$gadai = $gadai[0][0];
$customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
$penebusan = Http::get(config('api.url') . '/api/listpenebusanhistory/' . $kodcaw,[ "norujukan" => $norujukan])->json();
$customers_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
$penebusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/listpenebusanhistory/' . $kodcaw,[ "norujukan" => $norujukan])->json();
if(sizeof($penebusan) != 0)
$penebusan = $penebusan[0];
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $kodcaw . '/code/' . $penebusan['nowakil'])->json();
$wakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getwakil/' . $kodcaw . '/code/' . $penebusan['nowakil'])->json();
$totalBayaranAnsuran = Http::get(config('api.url') . '/api/transaction/norujukan/total/ansuran',['norujukan'=>$norujukan])->json();
$totalBayaranAnsuran = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/norujukan/total/ansuran',['norujukan'=>$norujukan])->json();
// dd($wakil);
if(sizeof($wakil) != 0)
$wakil = $wakil[0];
$wakil = $wakil[0];
return view('resit.resittebus',compact('transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran'));
}
public function resit($id)
{
{
$totaltransaction = 0;
$transaction = Http::get(config('api.url') . '/api/transaction/id/'. $id)->json();
$transaction = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/id/'. $id)->json();
if(sizeof($transaction) != 0)
$transaction = $transaction[0];
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $transaction['norujukan'])->json();
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $transaction['norujukan'])->json();
if(sizeof($gadai) != 0)
$gadai = $gadai[0][0];
$customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
$customers_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
// if(sizeof($customers_info) != 0)
// $customers_info = $customers_info[0];
Generated
+790 -834
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -231,4 +231,6 @@ return [
],
'api_verify' => env('API_VERIFY',true),
];
@@ -240,8 +240,8 @@
<label for="alamat">{{ __('Alamat') }}</label>
@php
// $koddaerah = Http::get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
// $kodnegeri = Http::get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
// $koddaerah = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
// $kodnegeri = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
@endphp
<textarea name="alamat" class="form-control input-group-outline" rows="2" disabled>{{ Session::has('custdetail') ? $customerdetails[0]['alamat1'] . ' ' . $customerdetails[0]['alamat2'] : old('alamat') }}
@@ -467,4 +467,4 @@
</script>
</body>
</html>
</html>
@@ -115,8 +115,8 @@
<label for="alamat" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Alamat') }}</label>
<div class="col-md-10">
@php
// $koddaerah = Http::get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
// $kodnegeri = Http::get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
// $koddaerah = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
// $kodnegeri = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
@endphp
<textarea name="alamat" class="form-control" rows="3" disabled>{{ Session::has('custdetail') ? $customerdetails[0]['alamat1'] . ' ' . $customerdetails[0]['alamat2'] : old('alamat') }}
@@ -325,4 +325,4 @@
<![endif]-->
@endsection
@endsection
@@ -64,7 +64,7 @@
@foreach($arraybayar as $index=>$bayar)
@if($bayar['hargajualan'] == '')
@php
$koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
$koskeuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
@endphp
<tr>
<td>
@@ -147,7 +147,7 @@
</td>
<td>
@php
$upahtawarruq = Http::get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
$upahtawarruq = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
@endphp
{{ $upahtawarruq }}
</td>
@@ -507,4 +507,4 @@
}
</script>
@endsection
@endsection
@@ -79,9 +79,9 @@
@foreach($belum_tebus as $index=>$bt)
@if($bt['hargajualan'] != '')
@php
$searchonline = Http::get(config('api.url') . '/portal/searchsagonline/',['norujukan' => $bt['norujukan']])->json();
$searchonline = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/portal/searchsagonline/',['norujukan' => $bt['norujukan']])->json();
$searchLelong = Http::get(config('api.url').'/api/search/lelong',[
$searchLelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/search/lelong',[
'kodcaw' => $bt['kodcaw'],
'norujukan' => $bt['norujukan']
])->json();
@@ -98,7 +98,7 @@
}
}
$koskeuntungan = Http::get(config('api.url') . '/api/upahtawarruq/' . $bt['kodcaw'] . '/' . $bt['norujukan'])->json();
$koskeuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahtawarruq/' . $bt['kodcaw'] . '/' . $bt['norujukan'])->json();
$keuntungan_1bln = $bt['pinjaman'] * ($bt['kadarupah'] / 100);
$ten_percent = floatval($bt['nilaimarhun']) * 0.1;
$baki_pinjaman = floatval($bt['bakipjm']);
@@ -111,7 +111,7 @@
</td>
<td>
@php
$namacawangan = Http::get(config('api.url') . '/api/cawangan/detail/' . $bt['kodcaw'] )->json();
$namacawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/detail/' . $bt['kodcaw'] )->json();
echo ucwords(strtolower(substr($namacawangan[0]['namacaw'],8)));
@endphp
</td>
@@ -119,7 +119,7 @@
<div class="media align-items-center">
<div class="media-body">
@php
$marhun = Http::get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
$marhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
@endphp
<a href="#" class="linktarget" data-toggle="modal" data-marhun="{{ json_encode($marhun) }}" data-pinjaman="{{$bt['pinjaman']}}" data-norujukan="{{$bt['norujukan']}}" data-hargajualan="{{$bt['hargajualan']}}" data-kodcaw="{{ $bt['kodcaw'] }}" data-target="#marhunModal"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a>
</div>
@@ -261,4 +261,4 @@
@push('js')
<script src="{{ asset('argon') }}/vendor/chart.js/dist/Chart.min.js"></script>
<script src="{{ asset('argon') }}/vendor/chart.js/dist/Chart.extension.js"></script>
@endpush
@endpush
@@ -75,7 +75,7 @@
@foreach($arraybayar as $index=>$bayar)
@if($bayar['hargajualan'] == '')
@php
$koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
$koskeuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahbukantawarruq/' . $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
@endphp
<tr>
<td>
@@ -158,7 +158,7 @@
</td>
<td>
@php
$upahtawarruq = Http::get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
$upahtawarruq = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
@endphp
{{ $upahtawarruq }}
</td>
@@ -240,7 +240,7 @@
<div class="col-5 text-right pr-5">
<span>RM <span id="spankeuntungan">0.00</span></span>
</div>
</div>
</div>
<hr/> --}}
@@ -432,4 +432,4 @@
}
</script>
@endsection
@endsection
@@ -95,10 +95,10 @@
@if($bt['hargajualan'] == '')
@php
$koskeuntungan = Http::get(config('api.url') . '/api/upahbukantawarruq/' . $bt['kodcaw'] . '/' . $bt['norujukan'])->json();
$searchonline = Http::get(config('api.url') . '/portal/searchsagonline/',['norujukan' => $bt['norujukan']])->json();
$koskeuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahbukantawarruq/' . $bt['kodcaw'] . '/' . $bt['norujukan'])->json();
$searchonline = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/portal/searchsagonline/',['norujukan' => $bt['norujukan']])->json();
$searchLelong = Http::get(config('api.url').'/api/search/lelong',[
$searchLelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/search/lelong',[
'kodcaw' => $bt['kodcaw'],
'norujukan' => $bt['norujukan']
])->json();
@@ -121,7 +121,7 @@
<div class="media align-items-center">
<div class="media-body">
@php
$marhun = Http::get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
$marhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
@endphp
<a href="#" class="linktarget" data-toggle="modal" data-marhun="{{ json_encode($marhun) }}" data-pinjaman="{{$bt['pinjaman']}}" data-norujukan="{{$bt['norujukan']}}" data-hargajualan="{{$bt['hargajualan']}}" data-kodcaw="{{ $bt['kodcaw'] }}" data-target="#marhunModal"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a>
</div>
@@ -168,9 +168,9 @@
@foreach($belum_tebus as $index=>$bt)
@if($bt['hargajualan'] != '')
@php
$searchonline = Http::get(config('api.url') . '/portal/searchsagonline/',['norujukan' => $bt['norujukan']])->json();
$searchonline = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/portal/searchsagonline/',['norujukan' => $bt['norujukan']])->json();
$searchLelong = Http::get(config('api.url').'/api/search/lelong',[
$searchLelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/search/lelong',[
'kodcaw' => $bt['kodcaw'],
'norujukan' => $bt['norujukan']
])->json();
@@ -187,7 +187,7 @@
}
}
$koskeuntungan = Http::get(config('api.url') . '/api/upahtawarruq/' . $bt['kodcaw'] . '/' . $bt['norujukan'])->json();
$koskeuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahtawarruq/' . $bt['kodcaw'] . '/' . $bt['norujukan'])->json();
$keuntungan_1bln = $bt['pinjaman'] * ($bt['kadarupah'] / 100);
$ten_percent = floatval($bt['nilaimarhun']) * 0.1;
$baki_pinjaman = floatval($bt['bakipjm']);
@@ -198,7 +198,7 @@
<div class="media align-items-center">
<div class="media-body">
@php
$marhun = Http::get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
$marhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/' . $bt['norujukan'] )->json();
@endphp
<a href="#" class="linktarget" data-toggle="modal" data-marhun="{{ json_encode($marhun) }}" data-pinjaman="{{$bt['pinjaman']}}" data-norujukan="{{$bt['norujukan']}}" data-hargajualan="{{$bt['hargajualan']}}" data-kodcaw="{{ $bt['kodcaw'] }}" data-target="#marhunModal"><span class="name mb-0 text-sm">{{ $bt['norujukan'] }}</span></a>
</div>
@@ -339,4 +339,4 @@
@push('js')
<script src="{{ asset('argon') }}/vendor/chart.js/dist/Chart.min.js"></script>
<script src="{{ asset('argon') }}/vendor/chart.js/dist/Chart.extension.js"></script>
@endpush
@endpush
+18 -18
View File
@@ -9,7 +9,7 @@
}
body {
background: white;
background: white;
}
page {
@@ -20,14 +20,14 @@
/* box-shadow: 0 0 0.5cm rgba(0,0,0,0.5); */
}
page[size="A4"] {
page[size="A4"] {
width: 21cm;
/* height: 29.7cm; */
}
page[size="A4"][layout="landscape"] {
width: 29.7cm;
height: 21cm;
height: 21cm;
}
@media print {
@@ -35,11 +35,11 @@
margin: 0;
box-shadow: 0;
}
}
.middleheader{
text-align: center;
text-align: center;
}
.container{
@@ -117,7 +117,7 @@
<body>
@php
$mytime = Carbon\Carbon::now()->format('d-m-Y');
@endphp
@@ -157,11 +157,11 @@
<td>{{ $customer['nama'] }}</td>
</tr>
<tr>
@php
$poskod = Http::get($api_url . '/api/poskod/' . $customer['poskod'])->json();
$negeri = Http::get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
$daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
@php
$poskod = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/poskod/' . $customer['poskod'])->json();
$negeri = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
$daerah = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
@endphp
<td style="text-align: right;vertical-align: top;">Alamat:</td>
<td>{!! strtoupper($customer['alamat1']) . ',<br>' . $customer['poskod'] . ', ' . strtoupper($daerah['namadaerah']) . ', ' . strtoupper($negeri['negeri']) !!}</td>
@@ -201,12 +201,12 @@
</tr>
@foreach($gadai as $index1=>$gad)
<tr>
<td>@php
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $gad['t_gadai']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate)
@endphp</td>
<td>Pembiayaan</td>
<td>{{ $gad['norujukan'] }}</td>
@@ -219,10 +219,10 @@
@foreach($transaction as $index=>$trans)
<tr>
<td>@php
<td>@php
$timestamp = strtotime($trans['created_at']);
echo gmdate("d-m-Y",$timestamp);
@endphp</td>
<td>
@php
@@ -248,7 +248,7 @@
@if($trans['trans_type'] != 'P')
<td></td>
<td>{{ number_format($trans['duit_masuk'],2) }}</td>
@else
@else
<td>{{ number_format($trans['duit_masuk'],2) }}</td>
<td></td>
@endif
@@ -275,4 +275,4 @@
</page>
</body>
</html>
</html>
+19 -19
View File
@@ -9,7 +9,7 @@
}
body {
background: white;
background: white;
}
page {
@@ -20,14 +20,14 @@
/* box-shadow: 0 0 0.5cm rgba(0,0,0,0.5); */
}
page[size="A4"] {
page[size="A4"] {
width: 21cm;
/* height: 29.7cm; */
}
page[size="A4"][layout="landscape"] {
width: 29.7cm;
height: 21cm;
height: 21cm;
}
@media print {
@@ -35,11 +35,11 @@
margin: 0;
box-shadow: 0;
}
}
.middleheader{
text-align: center;
text-align: center;
}
.container{
@@ -124,7 +124,7 @@
text-decoration: none;
display: inline-block;
}
.btn-sub:hover{
background-color: #4CAF50; /* Green */
color: white;
@@ -156,7 +156,7 @@
<body>
@php
$mytime = Carbon\Carbon::now()->format('d-m-Y');
@endphp
@@ -194,11 +194,11 @@
<td>{{ $customer['nama'] }}</td>
</tr>
<tr>
@php
$poskod = Http::get($api_url . '/api/poskod/' . $customer['poskod'])->json();
$negeri = Http::get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
$daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
@php
$poskod = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/poskod/' . $customer['poskod'])->json();
$negeri = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
$daerah = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
@endphp
<td style="text-align: right;vertical-align: top;">Alamat:</td>
<td>{!! strtoupper($customer['alamat1']) . ',<br>' . $customer['poskod'] . ', ' . strtoupper($daerah['namadaerah']) . ', ' . strtoupper($negeri['negeri']) !!}</td>
@@ -224,12 +224,12 @@
</tr>
@foreach($gadai as $index1=>$gad)
<tr>
<td colspan="2">PERMULAAN PEMBIAYAAN PADA @php
<td colspan="2">PERMULAAN PEMBIAYAAN PADA @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $gad['t_gadai']);
$formattedweddingdate = $myDateTime->format('d/m/Y');
echo($formattedweddingdate)
@endphp </td>
<td style="text-align:center;">:</td>
<td style="text-align:right;">-</td>
@@ -245,7 +245,7 @@
$timebayar = gmdate("d/m/Y",$timestamp);
switch($trans['trans_type']){
case 'T': echo 'PEMBAYARAN TEBUS PENUH PADA ' . $timebayar;
break;
case 'A': echo 'PEMBAYARAN ANSURAN PADA ' . $timebayar;
@@ -255,8 +255,8 @@
case 'P': echo 'PEMBAYARAN TAMBAH PINJAMAN PADA ' . $timebayar;;
break;
}
@endphp</td>
<td style="text-align:center;">:</td>
@@ -277,4 +277,4 @@
</page>
</body>
</html>
</html>
+17 -17
View File
@@ -9,7 +9,7 @@
}
body {
background: white;
background: white;
}
page {
@@ -20,14 +20,14 @@
/* box-shadow: 0 0 0.5cm rgba(0,0,0,0.5); */
}
page[size="A4"] {
page[size="A4"] {
width: 21cm;
/* height: 29.7cm; */
}
page[size="A4"][layout="landscape"] {
width: 29.7cm;
height: 21cm;
height: 21cm;
}
@media print {
@@ -35,11 +35,11 @@
margin: 0;
box-shadow: 0;
}
}
.middleheader{
text-align: center;
text-align: center;
}
.container{
@@ -124,7 +124,7 @@
text-decoration: none;
display: inline-block;
}
.btn-sub:hover{
background-color: #4CAF50; /* Green */
color: white;
@@ -156,7 +156,7 @@
<body>
@php
$mytime = Carbon\Carbon::now()->format('d-m-Y');
@endphp
@@ -194,11 +194,11 @@
<td>{{ $customer['nama'] }}</td>
</tr>
<tr>
@php
$poskod = Http::get($api_url . '/api/poskod/' . $customer['poskod'])->json();
$negeri = Http::get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
$daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
@php
$poskod = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/poskod/' . $customer['poskod'])->json();
$negeri = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
$daerah = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
@endphp
<td style="text-align: right;vertical-align: top;">Alamat:</td>
<td>{!! strtoupper($customer['alamat1']) . ',<br>' . $customer['poskod'] . ', ' . strtoupper($daerah['namadaerah']) . ', ' . strtoupper($negeri['negeri']) !!}</td>
@@ -224,12 +224,12 @@
</tr>
{{-- @foreach($gadai as $index1=>$gad)
<tr>
<td colspan="2">PERMULAAN PEMBIAYAAN PADA @php
<td colspan="2">PERMULAAN PEMBIAYAAN PADA @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $gad['t_gadai']);
$formattedweddingdate = $myDateTime->format('d/m/Y');
echo($formattedweddingdate)
@endphp </td>
<td style="text-align:center;">:</td>
<td style="text-align:right;">-</td>
@@ -244,7 +244,7 @@
$myDateTime = DateTime::createFromFormat('Y-m-d', $upahan['tarikh']);
$formattedweddingdate = $myDateTime->format('d/m/Y');
echo 'PEMBAYARAN UPAH PADA ' . $formattedweddingdate;
echo 'PEMBAYARAN UPAH PADA ' . $formattedweddingdate;
@endphp</td>
<td style="text-align:center;">:</td>
<td style="text-align:right;">{{ $upahan['upahDibayar'] }}</td>
@@ -263,4 +263,4 @@
</page>
</body>
</html>
</html>