diff --git a/app/Events/NotifikasiPembayaran.php b/app/Events/NotifikasiPembayaran.php new file mode 100644 index 0000000..533f8b8 --- /dev/null +++ b/app/Events/NotifikasiPembayaran.php @@ -0,0 +1,30 @@ +message = $message; + } + + public function broadcastOn() + { + return ['notifikasi-pembayaran']; + } + + public function broadcastAs() + { + return 'trigger-pembayaran'; + } +} \ No newline at end of file diff --git a/app/Events/StatusLiked.php b/app/Events/StatusLiked.php new file mode 100644 index 0000000..8fa9c49 --- /dev/null +++ b/app/Events/StatusLiked.php @@ -0,0 +1,30 @@ +message = $message; + } + + public function broadcastOn() + { + return ['status-liked']; + } + + public function broadcastAs() + { + return 'my-event'; + } +} \ No newline at end of file diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php index 85159f5..df906a9 100644 --- a/app/Http/Controllers/GadaianController.php +++ b/app/Http/Controllers/GadaianController.php @@ -159,4 +159,58 @@ class GadaianController extends Controller return view('print.sag',compact('gadai_detail','customer_detail','marhun_detail','cawangan_detail','api_url','pembayaran_segera')); } + + public function resit($id) + { + + $transaction = Http::get(config('api.url') . '/api/transaction/id/'. $id)->json(); + + if(sizeof($transaction) != 0) + $transaction = $transaction[0]; + + $gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $transaction['norujukan'])->json(); + + if(sizeof($gadai) != 0) + $gadai = $gadai[0][0]; + + $customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json(); + + if(sizeof($customers_info) != 0) + $customers_info = $customers_info[0]; + + return view('print.resitansuran',compact('transaction','gadai','customers_info')); + } + + public function history(Request $request) + { + $auth_user = Auth::user(); + + $gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $request->norujukan)->json(); + + if(sizeof($gadai) > 0) + $history = $gadai[0][0]['historygadaian']; + + $count = 0; + $arrayhist = []; + + while($history != "0" && $history != '') + { + $gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $history)->json(); + + $tebus = Http::get(config('api.url') . '/api/listpenebusanhistory/'. $auth_user['cawangan'],[ + "norujukan" => $history + ])->json(); + + array_push($arrayhist,["norujukan" => $history,"jenistebus" => $tebus[0]['jenistebus'],"jbg" => $tebus[0]['jbg'],"t_tebus" => $tebus[0]['t_tebus']]); + + if(sizeof($gadai) > 0) + $history = $gadai[0][0]['historygadaian']; + + $count++; + } + + return response()->json($arrayhist,200); + } + + } diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 5de23d4..4484bd6 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2,6 +2,11 @@ namespace App\Http\Controllers; +//Events +use App\Events\StatusLiked; +use App\Events\NotifikasiPembayaran; + + use App\User; use App\Cawangan; @@ -302,6 +307,8 @@ class KhazanahController extends Controller // 'teller' => $request->teller ])->json(); + event(new StatusLiked('Penghantaran kepada Khazanah!')); + return response()->json($createlulus,201); } @@ -341,6 +348,8 @@ class KhazanahController extends Controller $auth_user = Auth::user(); $gadai = Http::put(config('api.url').'/api/gadai/serah_marhun/khazanah/'. $auth_user['cawangan'] .'/' . $request->norujukan_barcode)->json(); + event(new NotifikasiPembayaran('TellerkepadaKhazanah')); + return redirect()->route('khazanah.gadaian'); } diff --git a/app/Http/Controllers/PenebusanController.php b/app/Http/Controllers/PenebusanController.php index 7f0a8f1..c4ffcaa 100644 --- a/app/Http/Controllers/PenebusanController.php +++ b/app/Http/Controllers/PenebusanController.php @@ -112,6 +112,16 @@ class PenebusanController extends Controller 'kuantiti_marhun' => $request->kuantiti_marhun ])->json(); + + //////////////////////////// + ////Update History Gadaian/// + //////////////////////////// + + $updatehistorygadaian = Http::put(config('api.url').'/api/gadai/updatehistory/'. $auth_user['cawangan'] .'/' . $norujukanbaru,[ + 'historygadaian' => $request->norujukan + ])->json(); + + /////////////////////////// /// MARHUN UPDATE TABLE//// ////////////////////////// @@ -221,6 +231,15 @@ class PenebusanController extends Controller 'kuantiti_marhun' => $request->kuantiti_marhun ])->json(); + //////////////////////////// + ////Update History Gadaian/// + //////////////////////////// + + $updatehistorygadaian = Http::put(config('api.url').'/api/gadai/updatehistory/'. $auth_user['cawangan'] .'/' . $norujukanbaru,[ + 'historygadaian' => $request->norujukan + ])->json(); + + /////////////////////////// /// MARHUN UPDATE TABLE//// ////////////////////////// @@ -298,7 +317,6 @@ class PenebusanController extends Controller $new_transaction = sprintf("%04d",$new_sirig); $norujukanbaru = strtoupper($auth_user['cawangan']) . $curent_year . $curent_month . $current_day . '-' .$new_transaction; - // dd($norujukan); $gadai = Http::post(config('api.url').'/api/gadai/'.$auth_user['cawangan'],[ 'norujukan' => $norujukanbaru, 'nopelanggan' => $request->nopelanggan, @@ -306,7 +324,7 @@ class PenebusanController extends Controller 'sirig' => $new_sirig ]); - + ////////////////////// ////Update SAG BARU/// ///////////////////// @@ -334,7 +352,16 @@ class PenebusanController extends Controller 'kuantiti_marhun' => $request->kuantiti_marhun ])->json(); + //////////////////////////// + ////Update History Gadaian/// + //////////////////////////// + $updatehistorygadaian = Http::put(config('api.url').'/api/gadai/updatehistory/'. $auth_user['cawangan'] .'/' . $norujukanbaru,[ + 'historygadaian' => $request->norujukan + ])->json(); + + + dd($updatehistorygadaian); /////////////////////////// /// MARHUN UPDATE TABLE//// diff --git a/composer.json b/composer.json index 0b99b06..b7aba5a 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "laravel/tinker": "^2.0", "laravel/ui": "^2.4", "milon/barcode": "^7.0", + "pusher/pusher-php-server": "~4.0", "simplesoftwareio/simple-qrcode": "^4.1", "spatie/laravel-medialibrary": "^7.19", "yajra/laravel-datatables-oracle": "^9.11" diff --git a/composer.lock b/composer.lock index f8100ec..421ea39 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "96633471a3eefd7748e7eb9ba32f99f2", + "content-hash": "b79f8c1e1e1c9dc9c91b67320e3cf3ea", "packages": [ { "name": "almasaeed2010/adminlte", @@ -2368,6 +2368,142 @@ }, "time": "2020-09-23T05:00:00+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "paragonie/sodium_compat", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/sodium_compat.git", + "reference": "a1cfe0b21faf9c0b61ac0c6188c4af7fd6fd0db3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/a1cfe0b21faf9c0b61ac0c6188c4af7fd6fd0db3", + "reference": "a1cfe0b21faf9c0b61ac0c6188c4af7fd6fd0db3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": ">=1", + "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^3|^4|^5|^6|^7|^8|^9" + }, + "suggest": { + "ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.", + "ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security." + }, + "type": "library", + "autoload": { + "files": [ + "autoload.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com" + }, + { + "name": "Frank Denis", + "email": "jedisct1@pureftpd.org" + } + ], + "description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists", + "keywords": [ + "Authentication", + "BLAKE2b", + "ChaCha20", + "ChaCha20-Poly1305", + "Chapoly", + "Curve25519", + "Ed25519", + "EdDSA", + "Edwards-curve Digital Signature Algorithm", + "Elliptic Curve Diffie-Hellman", + "Poly1305", + "Pure-PHP cryptography", + "RFC 7748", + "RFC 8032", + "Salpoly", + "Salsa20", + "X25519", + "XChaCha20-Poly1305", + "XSalsa20-Poly1305", + "Xchacha20", + "Xsalsa20", + "aead", + "cryptography", + "ecdh", + "elliptic curve", + "elliptic curve cryptography", + "encryption", + "libsodium", + "php", + "public-key cryptography", + "secret-key cryptography", + "side-channel resistant" + ], + "support": { + "issues": "https://github.com/paragonie/sodium_compat/issues", + "source": "https://github.com/paragonie/sodium_compat/tree/v1.14.0" + }, + "time": "2020-12-03T16:26:19+00:00" + }, { "name": "phenx/php-font-lib", "version": "0.5.2", @@ -2855,6 +2991,64 @@ }, "time": "2020-12-04T02:51:30+00:00" }, + { + "name": "pusher/pusher-php-server", + "version": "v4.1.5", + "source": { + "type": "git", + "url": "https://github.com/pusher/pusher-http-php.git", + "reference": "251f22602320c1b1aff84798fe74f3f7ee0504a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pusher/pusher-http-php/zipball/251f22602320c1b1aff84798fe74f3f7ee0504a9", + "reference": "251f22602320c1b1aff84798fe74f3f7ee0504a9", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "paragonie/sodium_compat": "^1.6", + "php": "^7.1|^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.2|^8.5|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Pusher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Library for interacting with the Pusher REST API", + "keywords": [ + "events", + "messaging", + "php-pusher-server", + "publish", + "push", + "pusher", + "real time", + "real-time", + "realtime", + "rest", + "trigger" + ], + "support": { + "issues": "https://github.com/pusher/pusher-http-php/issues", + "source": "https://github.com/pusher/pusher-http-php/tree/v4.1.5" + }, + "time": "2020-12-09T09:38:19+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", diff --git a/config/broadcasting.php b/config/broadcasting.php index 3bba110..7e082cd 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -36,8 +36,8 @@ return [ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'useTLS' => true, + 'cluster' => 'ap1', + 'useTLS' => true ], ], diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 63605fa..937d7b9 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -29,13 +29,13 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; * allows your team to easily build robust real-time web applications. */ -// import Echo from 'laravel-echo'; +import Echo from 'laravel-echo'; -// window.Pusher = require('pusher-js'); +window.Pusher = require('pusher-js'); -// window.Echo = new Echo({ -// broadcaster: 'pusher', -// key: process.env.MIX_PUSHER_APP_KEY, -// cluster: process.env.MIX_PUSHER_APP_CLUSTER, -// forceTLS: true -// }); +window.Echo = new Echo({ + broadcaster: 'pusher', + key: '26b0ec2f297f94b7aa9b', + cluster: 'ap1', + forceTLS: true +}); diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index fc49373..8abab51 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -1,4 +1,6 @@ @extends('layouts.app') + +@include('modal.historytebus') + +
@@ -324,8 +334,9 @@ var urlroute = '{{ route("penebusan", ":id") }}'; urlroute = urlroute.replace(':id', gadai_detail["norujukan"]); + tablegadai.row.add([ - counter, + '', '' + gadai_detail['norujukan'] + '', gadai_detail['t_gadai'], 'RM '+formatter.format(gadai_detail['pinjaman']), @@ -342,7 +353,7 @@ { var keuntungan_semasa = (gadai_detail['kadarupah']/100)*gadai_detail['bakipjm']*gadai_detail['jbg']; tabledahtebus.row.add([ - counter, + '', gadai_detail['norujukan'], gadai_detail['t_gadai'], 'RM '+formatter.format(gadai_detail['pinjaman']), @@ -397,10 +408,209 @@ gadaiTable(data,"belum_tebus"); } }); - $("input[name='options']").click(function(){ - gadaiOptionButton(noic) + + $('#myTable td').click( function () { + alert('dasdsa'); }); - } ); + + $("input[name='options']").click(function(){ + gadaiOptionButton(noic); + }); + + // $("tbody").delegate("input[name='belum']", "click", function(){ + // alert($('input[name="belum"]:checked').val()); + // }); + + // $("tbody").delegate("input[name='sudahtebus']", "click", function(){ + // alert($('input[name="sudahtebus"]:checked').val()); + // }); + + }); + + function histfunc() + { + if($("input[name='options']:checked").val() == 'belum_tebus'){ + let histid = $('input[name="belum"]:checked').val(); + + if(histid == null) + { + Swal.fire({ + icon: 'error', + title: 'Oops...', + text: 'Something went wrong!', + footer: 'Why do I have this issue?' + }); + } + else + { + $.ajax({ + method:'get', + url:'{{ route("gadai.history") }}', + data:{ "norujukan" : histid}, + success:function(data) + { + $('#historytebusModal').modal(); + historytebustable(data); + },error: function(xhr, status, error) { + var err = eval("(" + xhr.responseText + ")"); + alert(xhr.responseText); + } + }); + } + } + else if($("input[name='options']:checked").val() == 'sudah_tebus'){ + let histid = $('input[name="sudahtebus"]:checked').val(); + + alert(histid); + } + + } + + var historytebusbayaran = $('#tablehistorytebus').DataTable({ + "ordering": false + }); + + function historytebustable(data){ + var counter = 1; + + historytebusbayaran.clear().draw(); + $.each(data,function(index,tebusaz){ + + // var urlroute = '{{ route("resit.ansuran", ":id") }}'; + // urlroute = urlroute.replace(':id', bayaran['id']); + + historytebusbayaran.row.add([ + counter, + tebusaz['norujukan'], + tebusaz['jenistebus'], + tebusaz['jbg'], + tebusaz['t_tebus'], + "Cetak" + ]).draw(); + + counter = counter + 1; + }); + } + + + function ubahfunc() + { + if($("input[name='options']:checked").val() == 'belum_tebus'){ + let ubahid = $('input[name="belum"]:checked').val(); + + if(ubahid == null) + { + Swal.fire({ + icon: 'error', + title: 'Oops...', + text: 'Something went wrong!', + footer: 'Why do I have this issue?' + }); + } + else + { + $.ajax({ + method:'get', + url:'{{ route("gadai.history") }}', + data:{ "norujukan" : ubahid}, + success:function(data) + { + $('#historytebusModal').modal(); + historytebustable(data); + },error: function(xhr, status, error) { + var err = eval("(" + xhr.responseText + ")"); + alert(xhr.responseText); + } + }); + } + + } + else if($("input[name='options']:checked").val() == 'sudah_tebus'){ + let ubahid = $('input[name="sudahtebus"]:checked').val(); + + } + } + + function hapusfunc() + { + if($("input[name='options']:checked").val() == 'belum_tebus'){ + let hapusid = $('input[name="belum"]:checked').val(); + + const swalWithBootstrapButtons = Swal.mixin({ + customClass: { + confirmButton: 'btn btn-success', + cancelButton: 'btn btn-danger' + }, + buttonsStyling: false + }) + + swalWithBootstrapButtons.fire({ + title: 'Are you sure?', + text: "You won't be able to revert this!", + icon: 'warning', + showCancelButton: true, + confirmButtonText: 'Yes, delete it!', + cancelButtonText: 'No, cancel!', + reverseButtons: true + }).then((result) => { + if (result.isConfirmed) { + swalWithBootstrapButtons.fire( + 'Deleted!', + 'Your file has been deleted.', + 'success' + ) + } else if ( + /* Read more about handling dismissals below */ + result.dismiss === Swal.DismissReason.cancel + ) { + swalWithBootstrapButtons.fire( + 'Cancelled', + 'Your imaginary file is safe :)', + 'error' + ) + } + }); + + } + else if($("input[name='options']:checked").val() == 'sudah_tebus'){ + let hapusid = $('input[name="sudahtebus"]:checked').val(); + + const swalWithBootstrapButtons = Swal.mixin({ + customClass: { + confirmButton: 'btn btn-success', + cancelButton: 'btn btn-danger' + }, + buttonsStyling: false + }) + + swalWithBootstrapButtons.fire({ + title: 'Are you sure?', + text: "You won't be able to revert this!", + icon: 'warning', + showCancelButton: true, + confirmButtonText: 'Yes, delete it!', + cancelButtonText: 'No, cancel!', + reverseButtons: true + }).then((result) => { + if (result.isConfirmed) { + swalWithBootstrapButtons.fire( + 'Deleted!', + 'Your file has been deleted.', + 'success' + ) + } else if ( + /* Read more about handling dismissals below */ + result.dismiss === Swal.DismissReason.cancel + ) { + swalWithBootstrapButtons.fire( + 'Cancelled', + 'Your imaginary file is safe :)', + 'error' + ) + } + }); + } + } function gadaiOptionButton(noic){ tablegadai.clear().draw(); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index ab9f657..1bebda3 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -40,9 +40,10 @@ {{-- jquery validation --}} + + {{-- Pusher --}} + - - + @elseif($auth_user['roles'] == 'teller') + + + + + @endif + + + @guest + @endguest + +
@yield('content')
diff --git a/resources/views/modal/historybayaran.blade.php b/resources/views/modal/historybayaran.blade.php new file mode 100644 index 0000000..98a597f --- /dev/null +++ b/resources/views/modal/historybayaran.blade.php @@ -0,0 +1,35 @@ + + + + + diff --git a/resources/views/modal/historytebus.blade.php b/resources/views/modal/historytebus.blade.php new file mode 100644 index 0000000..8e2c780 --- /dev/null +++ b/resources/views/modal/historytebus.blade.php @@ -0,0 +1,37 @@ + + + + + diff --git a/resources/views/modal/wakil.blade.php b/resources/views/modal/wakil.blade.php index c3ebff7..4b1212f 100644 --- a/resources/views/modal/wakil.blade.php +++ b/resources/views/modal/wakil.blade.php @@ -8,7 +8,6 @@ -
diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 84727c7..74397b6 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -1,5 +1,6 @@ @extends('layouts.app') +@include('modal.historybayaran') @include('modal.wakil') @section('content') @@ -100,6 +101,7 @@ Nilai Marhun Berat/gram Karat + Harga @@ -113,9 +115,17 @@ RM {{ number_format($m['n_marhun'],2) }} {{ $m['berat'] }} {{ $m['karat'] }} + RM {{ $m['harga'] }} @endforeach + + JUMLAH + RM {{ number_format($gadai['nilaimarhun'],2) }} + {{ number_format($gadai['berat'],2) }} + + + @@ -126,14 +136,25 @@
{{--
--}}
+
- PINJAMAN(RM) + BAKI HARGA JUALAN(RM)
- +
-
+
+ +
+
+ BAKI PEMBIAYAAN(RM) +
+
+ +
+
+
@@ -144,11 +165,20 @@
+ +
+
+ TELAH DIBAYAR(RM) +
+
+ +
+
- BAYARAN(RM) + BAYARAN PEMBIAYAAN(RM)
@@ -156,7 +186,7 @@
- TAMBAH PINJAMAN(RM) + TAMBAH PEMBIAYAAN(RM)
@@ -168,16 +198,33 @@
+
+
-
+
- TELAH DIBAYAR(RM) + PEMBIAYAAN BARU(RM)
- +
-
+
+
+ +
+
+
+ PERLU DIBAYAR(RM) +
+
+ +
+
+
+ +
+
PINJAMAN BARU(RM) @@ -191,14 +238,6 @@
-
-
- PERLU DIBAYAR(RM) -
-
- -
-
BAYARAN DITERIMA(RM) @@ -207,10 +246,14 @@
+
+ +
+
@@ -222,25 +265,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
User Image User Image
+ + + + + + + + + + +
Salinan Pelanggan
RESIT BAYARAN
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Marhun : {{ $gadai['marhun'] }} No SAG {{ $transaction['norujukan'] }}
Nama : {{ $customers_info['nama'] }} Tarikh Bayar@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
No K/P : {{ $customers_info['kpbaru'] }} Tempoh Simpan {{ $gadai['tempoh'] }}
Nama Wakil :
No K/P Wakil :
+
+ + + + + + + + + + + + + + + + + + + + + +
Tarikh Bayaran @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
Harga Jualan RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }}
(-) Bayaran Pelanggan RM {{ number_format($transaction['duit_masuk'],2) }}
(-) Rebate RM {{ number_format($transaction['duit_masuk'],2) }}
Baki Harga Jualan RM {{ number_format($transaction['bakiharga'],2) }}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
.................................................... .................................................... .................................................... ....................................................
DiSemak Cagaran Di KeluarkanCagaran Diterima Ar-Rahn
+
+
+
+ +
+
+ + + + + + + + + + + + + +
Salinan Pejabat
RESIT BAYARAN
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Marhun : {{ $gadai['marhun'] }} No SAG {{ $transaction['norujukan'] }}
Nama : {{ $customers_info['nama'] }} Tarikh Bayar @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
No K/P : {{ $customers_info['kpbaru'] }} Tempoh Simpan {{ $gadai['tempoh'] }}
Nama Wakil :
No K/P Wakil :
+
+ + + + + + + + + + + + + + + + + + +
Tarikh Bayaran @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
Harga Jualan RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }}
(-) Bayaran Pelanggan RM {{ number_format($transaction['duit_masuk'],2) }}
Baki Harga Jualan RM {{ number_format($transaction['bakiharga'],2) }}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
.................................................... .................................................... .................................................... ....................................................
DiSemak Cagaran Di KeluarkanCagaran Diterima Ar-Rahn
+
\ No newline at end of file diff --git a/resources/views/print/resittebus.blade.php b/resources/views/print/resittebus.blade.php new file mode 100644 index 0000000..17b698e --- /dev/null +++ b/resources/views/print/resittebus.blade.php @@ -0,0 +1,566 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
User Image User Image
+ + + + + + + + + + +
Salinan Pelanggan
RESIT BAYARAN
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Marhun : {{ $gadai['marhun'] }} No SAG {{ $transaction['norujukan'] }}
Nama : {{ $customers_info['nama'] }} Tarikh Bayar@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
No K/P : {{ $customers_info['kpbaru'] }} Tempoh Simpan {{ $gadai['tempoh'] }}
Nama Wakil :
No K/P Wakil :
+
+ + + + + + + + + + + + + + + + + + +
Tarikh Bayaran @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
Harga Jualan RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }}
(-) Bayaran Pelanggan RM {{ number_format($transaction['duit_masuk'],2) }}
Baki Harga Jualan RM {{ number_format($transaction['bakiharga'],2) }}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
.................................................... .................................................... .................................................... ....................................................
DiSemak Cagaran Di KeluarkanCagaran Diterima Ar-Rahn
+
+
+
+ +
+
+ + + + + + + + + + + + + +
Salinan Pejabat
RESIT BAYARAN
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Marhun : {{ $gadai['marhun'] }} No SAG {{ $transaction['norujukan'] }}
Nama : {{ $customers_info['nama'] }} Tarikh Bayar @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
No K/P : {{ $customers_info['kpbaru'] }} Tempoh Simpan {{ $gadai['tempoh'] }}
Nama Wakil :
No K/P Wakil :
+
+ + + + + + + + + + + + + + + + + + +
Tarikh Bayaran @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp
Harga Jualan RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }}
(-) Bayaran Pelanggan RM {{ number_format($transaction['duit_masuk'],2) }}
Baki Harga Jualan RM {{ number_format($transaction['bakiharga'],2) }}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
.................................................... .................................................... .................................................... ....................................................
DiSemak Cagaran Di KeluarkanCagaran Diterima Ar-Rahn
+
\ No newline at end of file diff --git a/resources/views/test.blade.php b/resources/views/test.blade.php index 28afad8..0735926 100644 --- a/resources/views/test.blade.php +++ b/resources/views/test.blade.php @@ -36,11 +36,15 @@ - + + {{-- Pusher --}} + + {{-- jquery validation --}} + -
- @if (Route::has('login')) - - @endif + - diff --git a/routes/web.php b/routes/web.php index 0568912..c6a43cd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -20,6 +20,27 @@ Route::get('/welcome',function(){ return view('welcome'); }); +//Testing Jer +Route::get('test', function () { + event(new App\Events\StatusLiked('Someone')); + return "Event has been sent!"; +}); + +// Route::get('resitbiasa', function () { + + + + +// }); + + + +Route::get('/welcome',function(){ + + return view('test'); +}); + + // Auth::routes(); Route::post('logout', ['as' => 'logout', 'uses' => 'Auth\LoginController@logout']); @@ -52,11 +73,12 @@ Route::get('/getwakil',['as'=>'wakil.search','uses'=>'PenebusanController@getWak Route::get('/cari',['as'=>'wakil.caricustomer','uses'=>'CustomersController@cari'])->middleware('auth','teller'); Route::post('/createwakil',['as'=>'wakil.create','uses'=>'PenebusanController@createWakil'])->middleware('auth','teller'); Route::get('/firstwakil',['as'=>'wakil.first','uses'=>'PenebusanController@getfirstWakil'])->middleware('auth','teller'); +Route::get('/history',['as'=>'gadai.history','uses'=>'GadaianController@history'])->middleware('auth','teller'); //MAINTENANCE Route::get('/tebusseparuh',['as'=>'tebus.separuh','uses'=>'PenebusanController@tebusseparuh'])->middleware('auth','teller'); Route::get('/tambahpinjaman',['as'=>'tambah.pinjaman','uses'=>'PenebusanController@tambahpinjaman'])->middleware('auth','teller'); -Route::get('/bayaransurans',['as'=>'bayaran.ansurans','uses'=>'PenebusanController@tambahpinjaman'])->middleware('auth','teller'); +// Route::get('/bayaransurans',['as'=>'bayaran.ansurans','uses'=>'PenebusanController@tambahpinjaman'])->middleware('auth','teller'); //Penilai Route::get('/gadaiansemasa',['as'=>'gadaian.semasa','uses'=>'GadaianController@gadaiansemasa'])->middleware('auth','penilai'); @@ -120,10 +142,7 @@ Route::post('laporan/marhunterkumpul/cetak',['as'=>'marhunterkumpul.laporancetak Route::get('laporan/ringkasanharian/cetak',['as'=>'ringkasanharian.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanHarian'])->middleware('auth','khazanah'); Route::get('laporan/ringkasanterkumpul/cetak',['as'=>'ringkasanterkumpul.laporancetak','uses'=>'KhazanahController@cetakLaporanRingkasanTerkumpul'])->middleware('auth','khazanah'); - +//Resit Ansurans +Route::get('/resit/{id}',['as'=>'resit.ansuran','uses'=>'GadaianController@resit'])->middleware('auth','teller'); Route::post('/barcodescanned',['as'=>'barcode.scanned','uses'=>'KhazanahController@barcodescanned'])->middleware('auth','khazanah'); - -Route::get('/test',function(){ - return view('test'); -}); \ No newline at end of file