serentak
This commit is contained in:
@@ -231,25 +231,6 @@
|
||||
</div>
|
||||
@else
|
||||
@php
|
||||
$gadai_transaction = Http::get($api_url . '/api/gadai/'. $cawangan_info['kodcaw'] . '/' . $current->toDateString())->json();
|
||||
if($gadai_transaction){
|
||||
$new_sirig = $gadai_transaction['sirig'] + 1;
|
||||
}else{
|
||||
$new_sirig = 1;
|
||||
}
|
||||
$curent_year = substr($current->year,2,2);
|
||||
$curent_month = sprintf("%02d", $current->month);
|
||||
$current_day = sprintf("%02d", $current->day);
|
||||
$new_transaction = sprintf("%04d",$new_sirig);
|
||||
$norujukan_baru = strtoupper($cawangan_info['kodcaw']) . $curent_year . $curent_month . $current_day . '-' .$new_transaction;
|
||||
$_SESSION["norujukan"] = $norujukan_baru;
|
||||
dd($_SESSION["norujukan"]);
|
||||
$gadai_baru = Http::post($api_url .'/api/gadai/'.$cawangan_info['kodcaw'],[
|
||||
'norujukan' => $norujukan_baru,
|
||||
'nopelanggan' => $customer_info['nopelanggan'],
|
||||
'nokp' => $customer_info['kpbaru'],
|
||||
'sirig' => $new_sirig
|
||||
]);
|
||||
header("Refresh:0");
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user