diff --git a/app/Http/Controllers/AliranTunaiController.php b/app/Http/Controllers/AliranTunaiController.php
index 23924ea..cb73da9 100644
--- a/app/Http/Controllers/AliranTunaiController.php
+++ b/app/Http/Controllers/AliranTunaiController.php
@@ -112,7 +112,11 @@ class AliranTunaiController extends Controller
$tunaipast = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json();
- return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai','tunaipast'));
+ $proses_modal = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/requestTeller/checkproses',['kodlaluan' => Auth::user()->name,'kodcaw' => $auth_user['cawangan']])->json();
+
+ $countproses = sizeof($proses_modal);
+
+ return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai','tunaipast','countproses'));
}
public function alirantunaiGadai(Request $request,$teller){
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index dde6f4a..cda0864 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Auth;
use App\Services\CustomerService;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Http;
+use Illuminate\Support\Facades\Hash;
class HomeController extends Controller
{
@@ -29,6 +30,16 @@ class HomeController extends Controller
{
$auth_user = Auth::user();
$api_url = config('api.url');
+
+ if(session()->has('iklan') && session()->get('iklan') == 0)
+ {
+ session()->put('iklan', 1);
+ }else{
+ if (Hash::check(config('app.reset_password'), $auth_user['password']) || Hash::check($auth_user['no_kp'], $auth_user['password'])) {
+ session()->put('iklan', 0);
+ }
+ }
+
if($auth_user['roles'] == 'teller'){
if($auth_user['role_harian'] == 'teller'){
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
@@ -45,7 +56,13 @@ class HomeController extends Controller
}
elseif($auth_user['roles'] == 'pc' || $auth_user['roles'] == 'ppc'){
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
- return view('homepage.khazanah.home',compact('cawangan_info','api_url'));
+
+ $gadai = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/gadai/serah_marhun/khazanah/'. $auth_user['cawangan'])->json();
+ $listserah = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/listSerahMarhunController/'.$auth_user['cawangan'])->json();
+
+ $countkhazanah = sizeof($gadai) + sizeof($listserah);
+
+ return view('homepage.khazanah.home',compact('cawangan_info','api_url','countkhazanah'));
}
else{
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index 3310c68..69127d0 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -383,7 +383,15 @@ class KhazanahController extends Controller
$update=Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
- return redirect()->route('khazanah.tebus');
+ if($update == 'success')
+ {
+ return redirect()->route('khazanah.tebus');
+ }else if($update == 'unavailable'){
+ return redirect()->route('khazanah.tebus')->with(['type' => 'unavailable', 'message' => 'Norujukan Tidak Wujud!', 'norujukan' => $request->norujukan_barcode]);
+ }else{
+ return redirect()->route('khazanah.tebus')->with(['type' => 'scanned', 'message' => 'Norujukan Dah Discan!', 'norujukan' => $request->norujukan_barcode]);
+ }
+
}
public function pendahuluanserah($id)
@@ -1026,7 +1034,14 @@ class KhazanahController extends Controller
event(new NotifikasiPembayaran('TellerkepadaKhazanah'));
- return redirect()->route('khazanah.gadaian');
+ if($scan_barcode == 'success')
+ {
+ return redirect()->route('khazanah.gadaian');
+ }else if($scan_barcode == 'unavailable'){
+ return redirect()->route('khazanah.gadaian')->with(['type' => 'unavailable', 'message' => 'Norujukan Tidak Wujud!', 'norujukan' => $request->norujukan_barcode]);
+ }else{
+ return redirect()->route('khazanah.gadaian')->with(['type' => 'scanned', 'message' => 'Norujukan Dah Discan!', 'norujukan' => $request->norujukan_barcode]);
+ }
}
public function LaporanSemakBarcode(){
@@ -3928,5 +3943,170 @@ class KhazanahController extends Controller
}
}
-
+
+ public function Laporan_SerahPetiBesiGadai()
+ {
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ // $lookwakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/lookupwakil/')->json();
+
+ return view('khazanah.laporan.serahgadai', compact('cawangan_info','api_url'));
+ }
+
+ public function cetak_serahBarcodeGadai(Request $request)
+ {
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datemula == null){
+ $datemula = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datemula);
+ $datemula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ if($request->datehingga == null){
+ $datehingga = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datehingga);
+ $datehingga = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+
+ $serahbarcode = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/serahgadai/',[
+ 'kodcaw' => $auth_user['cawangan'],
+ 'mula' => $datemula,
+ 'hingga' => $datehingga,
+ ])->json();
+
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ $cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_serahpetibesigadai', compact('cawangan_detail','api_url','serahbarcode','cawangan_info','datemula','datehingga','tarikh_cetak'));
+ }
+
+
+ public function Laporan_SerahMarhunTebus()
+ {
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ // $lookwakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/lookupwakil/')->json();
+
+ return view('khazanah.laporan.serahmarhun', compact('cawangan_info','api_url'));
+ }
+
+
+ public function cetak_serahMarhunTebus(Request $request)
+ {
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datemula == null){
+ $datemula = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datemula);
+ $datemula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ if($request->datehingga == null){
+ $datehingga = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datehingga);
+ $datehingga = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+
+ $serahmarhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/serahmarhuntebus/',[
+ 'kodcaw' => $auth_user['cawangan'],
+ 'mula' => $datemula,
+ 'hingga' => $datehingga,
+ ])->json();
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ $cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_serahmarhun', compact('cawangan_detail','api_url','serahmarhun','cawangan_info','datemula','datehingga','tarikh_cetak'));
+ }
+
+ public function Laporan_AuditCustomer()
+ {
+ $auth_user = Auth::user();
+ $api_url = config('api.url');
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+
+ return view('khazanah.laporan.auditcustomer', compact('cawangan_info','api_url'));
+ }
+
+ public function cetak_AuditCustomer(Request $request)
+ {
+ $api_url = config('api.url');
+ $auth_user = Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+ $tarikh_cetak = $current->toDateString();
+
+ if($request->datemula == null){
+ $datemula = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datemula);
+ $datemula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ if($request->datehingga == null){
+ $datehingga = $current->toDateString();
+ }else{
+ $split_date = explode('-', $request->datehingga);
+ $datehingga = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
+ }
+
+ $auditcustomer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/auditcustomer/',[
+ 'kodcaw' => $auth_user['cawangan'],
+ 'mula' => $datemula,
+ 'hingga' => $datehingga
+ ])->json();
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ $cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ return view('print.laporan_auditcustomer', compact('cawangan_detail','api_url','auditcustomer','cawangan_info','datemula','datehingga','tarikh_cetak'));
+ }
+
+ public function LaporanTebusBarcode(){
+ $auth_user=Auth::user();
+ $current = Carbon::now();
+ $current = new Carbon();
+ $api_url = config('api.url');
+ $tarikh_cetak = $current->toDateString();
+
+ $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
+ $cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
+ $cawangan_detail=$cawangan[0];
+
+ $datemula = $current->toDateString();
+ $datehingga = $current->toDateString();
+
+ $serahmarhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/serahmarhuntebus/',[
+ 'kodcaw' => $auth_user['cawangan'],
+ 'mula' => $datemula,
+ 'hingga' => $datehingga,
+ ])->json();
+
+ return view('print.laporan_serahmarhun', compact('cawangan_detail','api_url','serahmarhun','cawangan_info','datemula','datehingga','tarikh_cetak'));
+ }
+
}
diff --git a/resources/views/aliran_tunai/index.blade.php b/resources/views/aliran_tunai/index.blade.php
index b761293..0db0a5c 100644
--- a/resources/views/aliran_tunai/index.blade.php
+++ b/resources/views/aliran_tunai/index.blade.php
@@ -5,6 +5,19 @@
@include('modal.denominasimodal')
+@if($countproses > 0)
+
+@endif
+
diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php
index 57770bd..bd9fc2f 100644
--- a/resources/views/customers/info.blade.php
+++ b/resources/views/customers/info.blade.php
@@ -212,6 +212,7 @@
Jum Tuntut/Bayar |
Keuntungan |
Caj Lelong |
+
Tuntutan |
Cetak |
@@ -805,6 +806,24 @@
var urlroute = '{{ route("lelongan", ":id") }}';
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
+ var tuntutan = 'Pelanggan';
+
+ $.ajax({
+ method:"GET",
+ async:false,
+ url: api_url + "/api/check/customer/",
+ data:{
+ "norujukan" : gadai_detail['norujukan'],
+ "kodcaw" : kodcaw
+ },
+ success: function(response){
+ if(response[0].teller = 'DM')
+ {
+ tuntutan = 'WTD';
+ }
+ }
+ });
+
if(gadai_detail['trkhtuntut'] == null){
tablelelong.row.add([
counter,
@@ -816,6 +835,7 @@
'RM '+formatter.format(gadai_detail['baki']),
'RM '+formatter.format(gadai_detail['bakiupah']),
'RM '+formatter.format(gadai_detail['cajlelong']),
+ '',
'
'
]).draw();
}else{
@@ -829,6 +849,7 @@
'RM '+formatter.format(gadai_detail['baki']),
'RM '+formatter.format(gadai_detail['bakiupah']),
'RM '+formatter.format(gadai_detail['cajlelong']),
+ tuntutan,
'
'
]).draw();
}
@@ -874,7 +895,99 @@
text: 'Lelongan dalam process WTD'
});
}else{
- window.location.href = urlroute;
+
+ const swalWithBootstrapButtons = Swal.mixin({
+ customClass: {
+ confirmButton: 'btn btn-success ml-1',
+ cancelButton: 'btn btn-danger'
+ },
+ buttonsStyling: false
+ });
+
+ swalWithBootstrapButtons.fire({
+ title: 'Dapatkan Pengesahan Khazanah',
+ text: "Kelulusan Tuntut Baki Lelong",
+ icon: 'info',
+ showCancelButton: true,
+ confirmButtonText: 'Hantar',
+ cancelButtonText: 'Batal',
+ reverseButtons: true
+ }).then((result) => {
+ if(result.isConfirmed) {
+ Swal.fire({
+ title: 'Tunggu Pengesahan Daripada Khazanah.',
+ icon: 'info',
+ width: 600,
+ padding: '3em',
+ background: '#fffff',
+ showCancelButton: false,
+ showConfirmButton: false,
+ allowOutsideClick: false,
+ allowEscapeKey: false,
+ allowEnterKey: false
+ })
+
+ let mohon = "Tuntut Baki";
+
+ $.ajax({
+ method:'post',
+ url: '{{ route("teller.createkelulusan") }}',
+ data: {
+ "_token": "{{ csrf_token() }}",
+ "norujukan" : norujukan,
+ "mohon" : mohon
+ },
+ success:function(data){
+ },error: function(xhr, status, error) {
+ var err = eval("(" + xhr.responseText + ")");
+ alert(xhr.responseText);
+ }
+ });
+
+ let teller = "{{ Auth::user()->name }}";
+
+ var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
+ cluster: 'ap1',
+ encrypted: true
+ });
+
+ var channel = pusher.subscribe('notice-ubahhapus');
+ channel.bind('my-ubahhapus', function(data) {
+
+ if(data.norujukan == norujukan && data.teller == teller)
+ {
+ if(data.kelulusan == 'lulus')
+ {
+ Swal.fire({
+ icon: 'success',
+ title: 'Telah Disahkan'
+ }).then(function(){
+ window.location.href = urlroute;
+ });
+ }
+ else if(data.kelulusan == 'batal')
+ {
+ Swal.fire({
+ icon: 'warning',
+ title: 'Telah Dibatalkan',
+ text: `Komen : ${data.komen}`
+ }).then(function(){
+ location.reload();
+ return false;
+ });
+ }
+ }
+ });
+ }else if (result.dismiss === Swal.DismissReason.cancel){
+ swalWithBootstrapButtons.fire(
+ 'Batal',
+ 'Tidak Berjaya Mendapatkan Pengesahan Khazanah',
+ 'error'
+ )
+ }
+
+ });
+
}
}
});
@@ -890,6 +1003,7 @@
}
+
$(document).ready( function () {
$('#myTable').parents('div.dataTables_wrapper').first().hide();
diff --git a/resources/views/homepage/khazanah/home.blade.php b/resources/views/homepage/khazanah/home.blade.php
index 9ff26a2..ed4f42c 100644
--- a/resources/views/homepage/khazanah/home.blade.php
+++ b/resources/views/homepage/khazanah/home.blade.php
@@ -3,331 +3,426 @@
@section('content')
-
-
+
+
-
-
+
+
-
-
+
-
-
+
+
+
+
+
+ {{--
--}}
+ {{--
--}}
+
+
-
-
-
-
+
+
+
+
+
+
@endsection
diff --git a/resources/views/khazanah/gadaian.blade.php b/resources/views/khazanah/gadaian.blade.php
index ed3171b..5ff2725 100644
--- a/resources/views/khazanah/gadaian.blade.php
+++ b/resources/views/khazanah/gadaian.blade.php
@@ -5,13 +5,13 @@
+
@@ -58,13 +58,27 @@
+
+ @if (\Session::has('type') == true && Session::get('type') == 'unavailable')
+
+ @elseif(\Session::has('type') == true && Session::get('type') == 'scanned')
+
+ {!! \Session::get('message') !!}
{{ \Session::get('norujukan') }}
+
+ @endif
@@ -82,15 +97,19 @@
-
+
@@ -111,27 +130,35 @@
@if (is_array($gadai) || is_object($gadai))
- @foreach($gadai as $index=>$gadaian)
-
- | {{ $index+1 }} |
-
- @php
- $marhun = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/marhun/' . $gadaian['norujukan'] )->json();
- @endphp
- {{$gadaian['norujukan']}}
- |
- {{ number_format($gadaian['pinjaman'],2) }} |
- {{ number_format($gadaian['nilaimarhun'],2) }} |
- {{ $gadaian['teller'] }} |
-
- @endforeach
+ @foreach($gadai as $index=>$gadaian)
+
+ | {{ $index+1 }} |
+
+ @php
+ $marhun = Http::withOptions(['verify' =>
+ config('app.api_verify')])->get($api_url . '/api/marhun/' .
+ $gadaian['norujukan'] )->json();
+ @endphp
+
+ {{$gadaian['norujukan']}}
+ |
+ {{ number_format($gadaian['pinjaman'],2) }} |
+ {{ number_format($gadaian['nilaimarhun'],2) }} |
+ {{ $gadaian['teller'] }} |
+
+ @endforeach
@endif
-
+
@@ -152,22 +179,29 @@
@if (is_array($petibesi) || is_object($petibesi))
- @php $total_nm = 0; @endphp
- @foreach($petibesi as $index=>$marhun)
- @php $total_nm += $marhun['nilaimarhun']; @endphp
-
- | {{ $index+1 }} |
-
- @php
- $marhun_detail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/marhun/' . $marhun['norujukan'] )->json();
- @endphp
- {{$marhun['norujukan']}}
- |
- {{ number_format($marhun['pinjaman'],2) }} |
- {{ number_format($marhun['nilaimarhun'],2) }} |
- {{ $marhun['teller'] }} |
-
- @endforeach
+ @php $total_nm = 0; @endphp
+ @foreach($petibesi as $index=>$marhun)
+ @php $total_nm += $marhun['nilaimarhun']; @endphp
+
+ | {{ $index+1 }} |
+
+ @php
+ $marhun_detail = Http::withOptions(['verify' =>
+ config('app.api_verify')])->get($api_url . '/api/marhun/' .
+ $marhun['norujukan'] )->json();
+ @endphp
+
+ {{$marhun['norujukan']}}
+ |
+ {{ number_format($marhun['pinjaman'],2) }} |
+ {{ number_format($marhun['nilaimarhun'],2) }} |
+ {{ $marhun['teller'] }} |
+
+ @endforeach
@endif
@@ -178,13 +212,15 @@
@@ -205,10 +241,10 @@
var tablegadaianmasuk = $('#table-gadaian-semasa').DataTable({
// "scrollX": true
- });
+ });
var pengesahanmarhun = $('#table-gadaian-belum-serah').DataTable({
- // "scrollX": true
+ // "scrollX": true
});
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
@@ -217,19 +253,18 @@
});
var channel = pusher.subscribe('serahanpenilai-notify');
- channel.bind('trigger-serahanpenilai', function(data) {
+ channel.bind('trigger-serahanpenilai', function (data) {
- if(cawangan == data.kodcaw)
- {
+ if (cawangan == data.kodcaw) {
fetchGadaianEverytime();
}
});
- $(document).ready(function(){
+ $(document).ready(function () {
$('#norujukan_barcode').focus();
})
- $('#marhunModal').on('show.bs.modal', function(event) {
+ $('#marhunModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); // button yg trigger
var arraymarhun = button.data('marhun');
var norujukan = button.data('norujukan');
@@ -240,19 +275,27 @@
$('#jumlah_berat').val(total_berat);
var bil_count = 0;
$('#tablemarhun').empty();
- $.each(arraymarhun,function(index,marhun){
- $.each(marhun, function(index,marhun_detail){
+ $.each(arraymarhun, function (index, marhun) {
+ $.each(marhun, function (index, marhun_detail) {
var marhun_name;
$.ajax({
- method:'GET',
+ method: 'GET',
url: api_url + '/api/jemas/nama_marhun',
dataType: 'json',
- data:{
- marhun:marhun_detail['marhun']
+ data: {
+ marhun: marhun_detail['marhun']
},
- success:function(marhun_ajax){
+ success: function (marhun_ajax) {
bil_count++;
- $("#tablemarhun").append("
| " + bil_count + " | " + marhun_ajax['descpt'] +" | " + marhun_detail['berat'] +" | " + marhun_detail['karat'] +" | RM " + marhun_detail['n_marhun'].toLocaleString(undefined,{minimumFractionDigits:2}) +" | "+ marhun_detail['nota'] +" |
");
+ $("#tablemarhun").append("
| " + bil_count +
+ " | " + marhun_ajax['descpt'] + " | " +
+ marhun_detail['berat'] + " | " +
+ marhun_detail['karat'] + " | RM " +
+ marhun_detail['n_marhun'].toLocaleString(
+ undefined, {
+ minimumFractionDigits: 2
+ }) + " | " + marhun_detail['nota'] +
+ " |
");
}
});
});
@@ -260,25 +303,34 @@
})
- function fetchGadaianEverytime(){
+ function fetchGadaianEverytime() {
tablegadaianmasuk.clear().draw();
$.ajax({
- method:'get',
+ method: 'get',
url: api_url + '/api/gadai/serah_marhun/khazanah/' + cawangan,
- success:function(data){
+ success: function (data) {
var count = 0;
- $.each(data,function(index,gadaianmasuk){
+ $.each(data, function (index, gadaianmasuk) {
$.ajax({
url: api_url + '/api/marhun/' + gadaianmasuk['norujukan'],
- method:'get',
- success:function(rekodmarhun){
+ method: 'get',
+ success: function (rekodmarhun) {
count++;
tablegadaianmasuk.row.add([
count,
- '
' + gadaianmasuk['norujukan'] + '',
+ '
' + gadaianmasuk[
+ 'norujukan'] + '',
formatter.format(gadaianmasuk['pinjaman']),
formatter.format(gadaianmasuk['nilaimarhun']),
gadaianmasuk['teller']
@@ -319,5 +371,6 @@
// }
// });
// }
+
@endsection
diff --git a/resources/views/khazanah/laporan/auditcustomer.blade.php b/resources/views/khazanah/laporan/auditcustomer.blade.php
new file mode 100644
index 0000000..53ffae5
--- /dev/null
+++ b/resources/views/khazanah/laporan/auditcustomer.blade.php
@@ -0,0 +1,95 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+ @if(session()->has('errormessage'))
+
+ {{ session()->get('errormessage') }}
+
+ @endif
+
+
+
+
+
+
+
+
+
+@endsection
+
diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php
index 77bc3df..5e239ca 100644
--- a/resources/views/khazanah/laporan/index.blade.php
+++ b/resources/views/khazanah/laporan/index.blade.php
@@ -47,6 +47,9 @@
+
diff --git a/resources/views/khazanah/laporan/serahgadai.blade.php b/resources/views/khazanah/laporan/serahgadai.blade.php
new file mode 100644
index 0000000..6b3fa7f
--- /dev/null
+++ b/resources/views/khazanah/laporan/serahgadai.blade.php
@@ -0,0 +1,70 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+@endsection
diff --git a/resources/views/khazanah/laporan/serahmarhun.blade.php b/resources/views/khazanah/laporan/serahmarhun.blade.php
new file mode 100644
index 0000000..51640f0
--- /dev/null
+++ b/resources/views/khazanah/laporan/serahmarhun.blade.php
@@ -0,0 +1,65 @@
+@extends('layouts.app')
+
+@section('content')
+
+
+@endsection
diff --git a/resources/views/khazanah/menu.blade.php b/resources/views/khazanah/menu.blade.php
index 87f2ca6..7f5ac53 100644
--- a/resources/views/khazanah/menu.blade.php
+++ b/resources/views/khazanah/menu.blade.php
@@ -15,11 +15,11 @@
diff --git a/resources/views/khazanah/tebus.blade.php b/resources/views/khazanah/tebus.blade.php
index 927c24a..1b40fb6 100644
--- a/resources/views/khazanah/tebus.blade.php
+++ b/resources/views/khazanah/tebus.blade.php
@@ -54,6 +54,20 @@
+ @if (\Session::has('type') == true && Session::get('type') == 'unavailable')
+
+ @elseif(\Session::has('type') == true && Session::get('type') == 'scanned')
+
+ {!! \Session::get('message') !!}
{{ \Session::get('norujukan') }}
+
+ @endif
@@ -61,7 +75,7 @@
@@ -153,7 +167,7 @@
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index b3473ab..cc3e4ea 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -332,6 +332,28 @@
@else
@endif
@endif
+
+ @if(session()->has('iklan') && session()->get('iklan') == 0)
+
+
+
+
+ sila tukar kata laluan asal dengan segera!
+
+
+
+ @endif
+
@yield('content')
diff --git a/resources/views/layouts/app_operasi.blade.php b/resources/views/layouts/app_operasi.blade.php
index c4ab91a..ddda734 100644
--- a/resources/views/layouts/app_operasi.blade.php
+++ b/resources/views/layouts/app_operasi.blade.php
@@ -221,6 +221,27 @@
+ @if(session()->has('iklan') && session()->get('iklan') == 0)
+
+
+
+
+ sila tukar kata laluan asal dengan segera!
+
+
+
+ @endif
+
diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php
index 9b463e9..c6490b7 100644
--- a/resources/views/penebusan/index.blade.php
+++ b/resources/views/penebusan/index.blade.php
@@ -1050,6 +1050,7 @@
if($('#sltjenistebus').find(":selected").val() == 'T'){
var adadah = false;
+ var adaonline = false;
$.ajax({
method:'get',
@@ -1062,7 +1063,6 @@
if(count > 0)
{
- console.log(count);
Swal.fire('Amaran!','Tebus sudah dibuat sila tekan butang batal!','error');
$("#terima_transaksi").prop('disabled', false);
adadah = true;
@@ -1070,7 +1070,25 @@
}
});
- if(adadah === true)
+ $.ajax({
+ method:'get',
+ datatype: 'json',
+ url: api + '/api/searchsagonline/',
+ async:false,
+ data: { 'norujukan' : norujukan },
+ success:function(success_data){
+
+ if(success_data == true)
+ {
+ Swal.fire('Amaran!','Bayaran online belum diproses!','error');
+ $("#terima_transaksi").prop('disabled', false);
+ adaonline = true;
+ }
+
+ }
+ });
+
+ if(adadah === true || adaonline === true)
{
return false;
event.preventDefault();
@@ -1179,6 +1197,28 @@
///////////
}else if($('#sltjenistebus').find(":selected").val() == 'A'){
+
+ $.ajax({
+ method:'get',
+ datatype: 'json',
+ url: api + '/api/listpenebusanhistory/' + kodcaw,
+ async:false,
+ data: { 'norujukan' : norujukan },
+ success:function(success_data){
+ var count = Object.keys(success_data).length;
+
+ if(count > 0)
+ {
+ Swal.fire('Amaran!','Tebus sudah dibuat sila tekan butang batal!','error');
+ $("#terima_transaksi").prop('disabled', false);
+
+ return false;
+ event.preventDefault();
+ }
+ }
+ });
+
+
let jenisbayarantebus = '';
let hadbayaransuran = (parseFloat("{{ $gadai['nilaimarhun']}}") * 0.1);
diff --git a/resources/views/print/laporan_auditcustomer.blade.php b/resources/views/print/laporan_auditcustomer.blade.php
new file mode 100644
index 0000000..3f7f04e
--- /dev/null
+++ b/resources/views/print/laporan_auditcustomer.blade.php
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN AUDIT CUSTOMER |
+ |
+ |
+ |
+
+
+ | TARIKH CETAK:
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate);
+ @endphp
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ | TARIKH: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $datemula);
+ $datefirst = $myDateTime->format('d-m-Y');
+ echo($datefirst);
+ @endphp |
+ HINGGA: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $datehingga);
+ $datelast = $myDateTime->format('d-m-Y');
+ echo($datelast);
+ @endphp |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Nama Pelanggan |
+ No IC |
+ Data Ditukar |
+ Data Lama |
+ Data Baru |
+ Teller/PPC |
+ Tarikh |
+ Masa |
+
+ @php $counter = 1; $jenis = ''; @endphp
+ @foreach($auditcustomer as $index=>$item)
+
+ | {{ $counter }} |
+ {{ $item['customer_name'] }} |
+ {{ $item['nokp'] }} |
+
+ @php
+ $tempitem = array_keys((array)$item['old']);
+
+ foreach($tempitem as $temp)
+ {
+ echo ($temp == 'alamat1') ? 'alamat' . ' ' : $temp . ' ';
+ }
+ @endphp
+ |
+ @foreach($item['old'] as $index=>$old)
+ {{ $old }}
+ @endforeach
+ |
+
+ @foreach($item['new'] as $index=>$new)
+ {{ $new }}
+ @endforeach
+ |
+ {{ $item['username'] }} |
+ {{ date("d-m-Y",strtotime($item['tarikhmasa'])) }} |
+ {{ date("H:i:s A",strtotime($item['tarikhmasa'])) }} |
+
+ @php $counter++;@endphp
+ @endforeach
+
+
+{{--
+
+ | JUMLAH {{ $jenis }} |
+{{ 'RM ' . number_format($totalamaun,2) }} |
+
+
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ Disediakan |
+ |
+ Disemak |
+ |
+ Disahkan |
+ |
+
+
diff --git a/resources/views/print/laporan_serahmarhun.blade.php b/resources/views/print/laporan_serahmarhun.blade.php
new file mode 100644
index 0000000..bbf9a93
--- /dev/null
+++ b/resources/views/print/laporan_serahmarhun.blade.php
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN SERAH MARHUN TEBUS |
+ |
+ |
+
+ |
+ |
+
+
+ | Tarikh: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $datemula);
+ $datefirst = $myDateTime->format('d-m-Y');
+ echo($datefirst);
+ echo 'Hingga:';
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $datehingga);
+ $datelast = $myDateTime->format('d-m-Y');
+ echo($datelast);
+ @endphp |
+ Tarikh Cetak |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $datecetak = $myDateTime->format('d-m-Y');
+ echo($datecetak);
+ @endphp |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ Tarikh |
+ N Marhun |
+ Pembiayaan |
+ Tag Terima |
+
+ @php $counter = 1;@endphp
+
+ @foreach($serahmarhun as $index=>$item)
+ @if($index > 0)
+ @if($item['teller'] != $serahmarhun[$index - 1]['teller'])
+
+ | Teller : {{ $item['teller'] }} |
+
+ @endif
+ @else
+
+ | Teller : {{ $item['teller'] }} |
+
+ @endif
+
+ | {{ $counter }} |
+ {{$item['norujukan']}} |
+ {{ $item['t_tebus'] }} |
+ {{ number_format($item['nilaimarhun'],2) }} |
+ {{ number_format($item['pinjaman'],2) }} |
+ {{ $item['tagterima'] }} |
+
+ @php $counter++; @endphp
+ @endforeach
+
+
+ {{--
+
+ | JUMLAH BILANGAN = {{ $bil }} |
+ Berat (g/m) |
+ Nilai Marhun (RM) |
+ Pembiayaan (RM) |
+ Upah/Keuntungan (RM) |
+
+
+ | JUMLAH KESELURUHAN |
+ {{ number_format($totalberat,2) }} |
+ {{ number_format($totalnm,2) }} |
+ {{ number_format($totalpinjaman,2) }} |
+ {{ number_format($totalupah,2) }} |
+
+
--}}
+
+ {{-- JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/print/laporan_serahpetibesigadai.blade.php b/resources/views/print/laporan_serahpetibesigadai.blade.php
new file mode 100644
index 0000000..131ad29
--- /dev/null
+++ b/resources/views/print/laporan_serahpetibesigadai.blade.php
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | LAPORAN SERAH MARHUN GADAI |
+ |
+ |
+
+ |
+ |
+
+
+ | Tarikh: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $datemula);
+ $datefirst = $myDateTime->format('d-m-Y');
+ echo($datefirst);
+ echo 'Hingga:';
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $datehingga);
+ $datelast = $myDateTime->format('d-m-Y');
+ echo($datelast);
+ @endphp |
+ Tarikh Cetak |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $datecetak = $myDateTime->format('d-m-Y');
+ echo($datecetak)
+ @endphp |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ Penilai |
+ Tarikh |
+ Masa |
+ N Marhun |
+ Pembiayaan |
+ Cetak |
+ Tag Serah |
+ Semak Barcode |
+
+ @php $counter = 1;@endphp
+ @foreach($serahbarcode as $index=>$item)
+ @if($index > 0)
+ @if($item['teller'] != $serahbarcode[$index - 1]['teller'])
+
+ | Teller : {{ $item['teller'] }} |
+
+ @endif
+ @else
+
+ | Teller : {{ $item['teller'] }} |
+
+ @endif
+
+ | {{ $counter }} |
+ {{$item['norujukan']}} |
+
+ {{ $item['penilai'] }}
+ |
+ {{ $item['t_gadai'] }} |
+ {{ $item['masa'] }} |
+ {{ number_format($item['nilaimarhun'],2) }} |
+ {{ number_format($item['pinjaman'],2) }} |
+ {{ $item['cetak'] }} |
+ {{ $item['tagserah'] }} |
+ {{ $item['semakbarcode'] }} |
+
+ @php $counter++; @endphp
+ @endforeach
+
+
+{{--
+
+ | JUMLAH BILANGAN = {{ $bil }} |
+ Berat (g/m) |
+ Nilai Marhun (RM) |
+ Pembiayaan (RM) |
+ Upah/Keuntungan (RM) |
+
+
+ | JUMLAH KESELURUHAN |
+ {{ number_format($totalberat,2) }} |
+ {{ number_format($totalnm,2) }} |
+ {{ number_format($totalpinjaman,2) }} |
+ {{ number_format($totalupah,2) }} |
+
+
--}}
+
+{{-- JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}
--}}
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+
diff --git a/routes/web.php b/routes/web.php
index 731e3b2..3f7bcc0 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -254,6 +254,16 @@ Route::get('laporan/lelongan/notistuntutbaki/',['as'=>'lelongan.notistuntutbaki'
Route::get('/laporan/komoditi',['as'=>'laporan.komoditi','uses'=>'KomuditiController@cetakRekodKomoditi']);
+Route::get('laporan/serahmarhungadai/',['as'=>'laporan.serahmarhungadai','uses'=>'KhazanahController@Laporan_SerahPetiBesiGadai'])->middleware('auth','khazanah');
+Route::post('/laporan/serahmarhungadai/cetak',['as'=>'laporan.serahmarhungadaicetak','uses'=>'KhazanahController@cetak_serahBarcodeGadai']);
+Route::get('laporan/serahmarhuntebus/',['as'=>'laporan.serahmarhuntebus','uses'=>'KhazanahController@Laporan_SerahMarhunTebus'])->middleware('auth','khazanah');
+Route::post('/laporan/serahmarhuntebus/cetak',['as'=>'laporan.serahmarhuntebuscetak','uses'=>'KhazanahController@cetak_serahMarhunTebus']);
+
+Route::get('laporan/auditcustomer/',['as'=>'laporan.auditcustomer','uses'=>'KhazanahController@Laporan_AuditCustomer'])->middleware('auth','khazanah');
+Route::post('/laporan/auditcustomer/cetak',['as'=>'laporan.auditcustomercetak','uses'=>'KhazanahController@cetak_AuditCustomer']);
+
+Route::get('/laporanscantebusbarcode',['as'=>'laporanscantebusbarcode','uses'=>'KhazanahController@LaporanTebusBarcode'])->middleware('auth','khazanah');
+
//Resit Ansurans
Route::get('/resit/{id}',['as'=>'resit.ansuran','uses'=>'GadaianController@resit'])->middleware('auth','teller');
Route::get('/resitansurans/{id}',['as'=>'resit.ansurans','uses'=>'GadaianController@resitansurans'])->middleware('auth','teller');