Merge branch 'farisv2' into 'master'

Farisv2

See merge request online-sistem1/kaunter!111
This commit is contained in:
Zakwan Hamdan
2021-04-20 14:30:46 +00:00
9 changed files with 170 additions and 77 deletions
+104 -12
View File
@@ -229,9 +229,9 @@ class KhazanahController extends Controller
{ {
$auth_user = Auth::user(); $auth_user = Auth::user();
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' .$request->norujukan_barcode)->json(); $gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' .$request->norujukan_barcode)->json();
$gadai_detail = $gadai[0]; $gadai_detail = $gadai[0];
@@ -378,14 +378,75 @@ class KhazanahController extends Controller
]); ]);
if($tebus_detail['jenistebus'] == 'P')
{
$totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk;
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
'kodlaluan' => $tebus_detail['teller'],
'keluar'=>$keluar,
'masuk'=>$totalmasuk,
'bakiakhir'=>$bakiakhir
]);
if($updateTunai)
{
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
}
else
{
dd('x masuk aliran tunai');
}
}else{
if($tebus_detail['jenistebus'] == 'S')
{
$totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk;
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
'kodlaluan' => $tebus_detail['teller'],
'keluar'=>$keluar,
'masuk'=>$totalmasuk,
'bakiakhir'=>$bakiakhir
]);
if($updateTunai)
{
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
}
else
{
dd('x masuk aliran tunai');
}
}else{
$totalmasuk = $tebus_detail['bakipjm'] + $masuk;
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
'kodlaluan' => $tebus_detail['teller'],
'keluar'=>$keluar,
'masuk'=>$totalmasuk,
'bakiakhir'=>$bakiakhir
]);
if($updateTunai)
{
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
}
else
{
dd('x masuk aliran tunai');
}
}
}
} }
else else
{ {
// dd(request()->all());
if($tebus_detail['jenistebus'] == 'P') if($tebus_detail['jenistebus'] == 'P')
{ {
@@ -498,12 +559,37 @@ class KhazanahController extends Controller
'bakiakhir'=>$bakiakhir 'bakiakhir'=>$bakiakhir
]); ]);
if($updateTunai)
{
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
}
else
{
dd('x masuk aliran tunai');
}
}else{ }else{
if($tebus_detail['jenistebus'] == 'S') if($tebus_detail['jenistebus'] == 'S')
{ {
$totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk; $totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk;
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
'kodlaluan' => $tebus_detail['teller'],
'keluar'=>$keluar,
'masuk'=>$totalmasuk,
'bakiakhir'=>$bakiakhir
]);
if($updateTunai)
{
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
}
else
{
dd('x masuk aliran tunai');
}
//KIRAAN LEJER AM UNTUK PENEBUSAN S //KIRAAN LEJER AM UNTUK PENEBUSAN S
@@ -613,6 +699,8 @@ class KhazanahController extends Controller
$totalmasuk = $tebus_detail['bakipjm'] + $masuk; $totalmasuk = $tebus_detail['bakipjm'] + $masuk;
// KIRAAN LEJER AM BERMULA UNYTUK PENEBUSAN JENIS 'T' // KIRAAN LEJER AM BERMULA UNYTUK PENEBUSAN JENIS 'T'
$get_GLCode_Tunai=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json(); $get_GLCode_Tunai=Http::get(config('api.url').'/api/getGlCode/'.$auth_user['cawangan'],['glcode'=>$KOD_tunai])->json();
$keterangan_Tunai=$get_GLCode_Tunai[0]['descpt']; $keterangan_Tunai=$get_GLCode_Tunai[0]['descpt'];
$acctype_Tunai=$get_GLCode_Tunai[0]['acttype']; $acctype_Tunai=$get_GLCode_Tunai[0]['acttype'];
@@ -717,6 +805,17 @@ class KhazanahController extends Controller
'bakiakhir'=>$bakiakhir 'bakiakhir'=>$bakiakhir
]); ]);
if($updateTunai)
{
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
}
else
{
//
//dd('x masuk aliran tunai');
}
} }
} }
@@ -725,16 +824,9 @@ class KhazanahController extends Controller
//masuk dalam tunai aliran //masuk dalam tunai aliran
return $this->tebus(); // return $this->tebus();
return redirect()->route('khazanah.tebus');
} }
@@ -1566,7 +1658,7 @@ class KhazanahController extends Controller
{ {
//WI ERROR MESSAGE SKIT //WI ERROR MESSAGE SKIT
// dd($baki_awal); // dd($baki_awal);
return redirect()>route('khazanah.serahan')->with('message', 'Jumlah yang dipinta melebihi baki dalam peti besi!.'); return redirect()->route('khazanah.serahan')->with('message', 'Jumlah yang dipinta melebihi baki dalam peti besi!.');
} }
else else
{ {
@@ -1701,7 +1793,7 @@ class KhazanahController extends Controller
$amount = $request->amt; $amount = $request->amt;
if($amount>$baki_awal){ if($amount>$baki_awal){
return redirect()>route('khazanah.serahan')->with('message', 'Jumlah yang dipinta melebihi baki dalam peti besi!.'); return redirect()->route('khazanah.serahan')->with('message', 'Jumlah yang dipinta melebihi baki dalam peti besi!.');
}else{ }else{
$tarikh=$request->tarikh; $tarikh=$request->tarikh;
$kodlaluan=$request->teller; $kodlaluan=$request->teller;
+2 -1
View File
@@ -1970,7 +1970,8 @@
allowEnterKey: false, allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!', confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
icon: 'success', icon: 'success',
title: 'Maklumat Anda Berjaya Direkodkan!' title: 'Maklumat Anda Berjaya Direkodkan!',
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
}); });
nw = data.nowakil; nw = data.nowakil;
+2 -2
View File
@@ -409,7 +409,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> <b>Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }}</b> </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> <b>Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }}</b> </td>
</tr> </tr>
<tr> <tr>
@@ -503,7 +503,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> <b>Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }}</b> </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> <b>Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }}</b> </td>
</tr> </tr>
<tr> <tr>
@@ -409,7 +409,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td>
</tr> </tr>
<tr> <tr>
@@ -503,7 +503,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td>
</tr> </tr>
<tr> <tr>
@@ -409,7 +409,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td>: <b>Tempoh Simpan</b></td><td> <b>{{ $gadai['tempoh'] }}</b> </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td>: <b>Tempoh Simpan</b></td><td> <b>{{ $gadai['tempoh'] }}</b> </td>
</tr> </tr>
<tr> <tr>
@@ -506,7 +506,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td>: <b>Tempoh Simpan</b></td><td> <b>{{ $gadai['tempoh'] }}</b> </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td>: <b>Tempoh Simpan</b></td><td> <b>{{ $gadai['tempoh'] }}</b> </td>
</tr> </tr>
<tr> <tr>
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td> <td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
+2 -2
View File
@@ -410,7 +410,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp</td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr> </tr>
<tr> <tr>
@@ -510,7 +510,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr> </tr>
@@ -414,7 +414,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['jbg'] }} </b></td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['jbg'] }} </b></td>
</tr> </tr>
<tr> <tr>
@@ -506,7 +506,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['jbg'] }} </b></td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['jbg'] }} </b></td>
</tr> </tr>
@@ -410,7 +410,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr> </tr>
<tr> <tr>
@@ -513,7 +513,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></td>
</tr> </tr>
@@ -410,7 +410,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td>
</tr> </tr>
<tr> <tr>
@@ -505,7 +505,7 @@ hr.new5 {
</tr> </tr>
<tr> <tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg`'] }} </td> <td colspan="3">No K/P </td> <td>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg`'] }} </td>
</tr> </tr>