outstanding

This commit is contained in:
Afiq
2021-01-05 14:26:43 +08:00
parent 8dd5cb552f
commit f3ad973b9f
3 changed files with 35 additions and 19 deletions
+3 -8
View File
@@ -108,7 +108,6 @@ class CustomersController extends Controller
*/
public function store(Request $request)
{
// dd(request()->all());
if($request->warganegara){
$warganegara = 'Y';
}else{
@@ -141,10 +140,9 @@ class CustomersController extends Controller
$count = sprintf("%08d", $nosiri_latest);
$no_pelanggan = $request->bangsa . substr($request->noic,6,2).'-'.$count;
// dd($tarikh_lahir);
$detail_poskod = Http::get(config('api.url') . '/api/poskod/' . $request->poskod)->json();
// dd($auth_user);
$sent_data = [
$customer_info = Http::post(config('api.url') . '/api/customers/create/'. $auth_user['cawangan'],[
'kodcaw' => $auth_user['cawangan'],
'nopelanggan' => $no_pelanggan,
'nokp' => $request->noic,
@@ -165,10 +163,7 @@ class CustomersController extends Controller
'teller' => $auth_user['name'],
'telefon2' => $request->alternate_phone,
'nosiri' => $nosiri_latest
];
$customer_info = Http::post(config('api.url') . '/api/customers/'. $auth_user['cawangan'],$sent_data);
dd($sent_data);
]);
Session::put('customer_info',$customer_info);
return redirect()->route('customer_info')->with( ['customer_info' => $customer_info] );