resolve conflict
This commit is contained in:
@@ -77,6 +77,11 @@ class BayaranController extends Controller
|
||||
{
|
||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $sag)->json();
|
||||
|
||||
//$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $sag])->json();
|
||||
//if($array_lelong['lelong'] !== null){
|
||||
// return redirect()->route('home')->with('error','Barangan Sedang Dilelong.');
|
||||
//}
|
||||
|
||||
if($gadai[0][0]['tempoh'] >= 12){
|
||||
return redirect()->route('home')->with('error','SAG Yang Dipilih melebihi tempoh 12 bulan ke atas.');
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ class HomeController extends Controller
|
||||
$bilanganlelong = 0;
|
||||
foreach($CustomerInfo['lelong'] as $index1=>$lelong)
|
||||
{
|
||||
$bilangan++;
|
||||
$bilanganlelong += 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\LelongBid;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -37,6 +38,19 @@ class InformationController extends Controller
|
||||
$pembiayaansemasa = $CustomerInfo['gadai'];
|
||||
}
|
||||
|
||||
if(isset($CustomerInfo['lelong'])){
|
||||
if(sizeof($CustomerInfo['lelong']) > 0){
|
||||
foreach($CustomerInfo['lelong'] as $index=>$lelong){
|
||||
$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json();
|
||||
|
||||
if($array_lelong['lelong'] !== null){
|
||||
$CustomerInfo['lelong'][$index] = collect($lelong)->merge($array_lelong['lelong'])->toArray();
|
||||
}
|
||||
}
|
||||
$pembiayaansemasa = collect($pembiayaansemasa)->merge($CustomerInfo['lelong']);
|
||||
$pembiayaansemasa = $pembiayaansemasa->toArray();
|
||||
}
|
||||
}
|
||||
return response()->json($pembiayaansemasa,200);
|
||||
// return view('includes.information.pembiayaanaktif',compact('pembiayaansemasa'));
|
||||
}
|
||||
@@ -71,10 +85,6 @@ class InformationController extends Controller
|
||||
$CustomerInfo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/portal/customer/info',['ic' => $auth_user['icno']])->json();
|
||||
|
||||
$lelong = [];
|
||||
if(isset($CustomerInfo['lelong']))
|
||||
{
|
||||
$lelong += $CustomerInfo['lelong'];
|
||||
|
||||
if(isset($CustomerInfo['lelong'])){
|
||||
if(sizeof($CustomerInfo['lelong']) > 0){
|
||||
foreach($CustomerInfo['lelong'] as $index=>$lel){
|
||||
@@ -101,3 +111,4 @@ class InformationController extends Controller
|
||||
return view('auth.termasyarat', compact('termasyarat'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class LelongBid extends Model
|
||||
{
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $table = 'lelongbid';
|
||||
protected $connection = 'lelong';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'lelong_id',
|
||||
'caw_id',
|
||||
'kodcaw',
|
||||
'norujukan',
|
||||
't_lelong',
|
||||
'hargaasas',
|
||||
'hargajual',
|
||||
't_jual',
|
||||
'nopembeli',
|
||||
'jbg',
|
||||
'kadarupah',
|
||||
'upahsimpan',
|
||||
'ansuran',
|
||||
'nilaimarhun',
|
||||
'nmarhuns',
|
||||
'pinjaman',
|
||||
'bakiupah',
|
||||
'cajlain',
|
||||
'cajlelong',
|
||||
'baki',
|
||||
'berat',
|
||||
'marhun',
|
||||
'percent',
|
||||
'status_jual',
|
||||
'status_payment',
|
||||
'status_semak',
|
||||
'diserahkan_pada',
|
||||
'mora_upah',
|
||||
'fasa',
|
||||
'opencash',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public $timestamps = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user