buat history and notifikasi

This commit is contained in:
hafifierahman
2021-01-09 19:52:59 +08:00
parent f37591f304
commit 3619c36e22
19 changed files with 2205 additions and 186 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class NotifikasiPembayaran implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
public function broadcastOn()
{
return ['notifikasi-pembayaran'];
}
public function broadcastAs()
{
return 'trigger-pembayaran';
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class StatusLiked implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
public function broadcastOn()
{
return ['status-liked'];
}
public function broadcastAs()
{
return 'my-event';
}
}
@@ -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);
}
}
@@ -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');
}
+29 -2
View File
@@ -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////
+1
View File
@@ -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"
Generated
+195 -1
View File
@@ -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",
+2 -2
View File
@@ -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
],
],
+8 -8
View File
@@ -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
});
+215 -5
View File
@@ -1,4 +1,6 @@
@extends('layouts.app')
@include('modal.historytebus')
<!-- Modal -->
<div class="modal fade" id="customer_detail" tabindex="-1" aria-labelledby="customer_detailLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl">
@@ -203,6 +205,8 @@
</div>
</div>
<div class="col-md-12 mt-md-3 justify-content-between form-group row">
<div class="btn-group btn-group-toggle col-md-6" data-toggle="buttons">
<label class="btn btn-primary">
@@ -284,6 +288,12 @@
</thead>
</table>
<div class="text-center">
<button class="btn btn-primary" onclick="ubahfunc()">Ubah</button>
<button class="btn btn-primary" onclick="hapusfunc()">Hapus</button>
<button class="btn btn-primary" onclick="histfunc()">History</button>
</div>
</div>
</div>
</div>
@@ -324,8 +334,9 @@
var urlroute = '{{ route("penebusan", ":id") }}';
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
tablegadai.row.add([
counter,
'<input type="radio" value='+ gadai_detail["norujukan"] +' name="belum"/>',
'<a href=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>',
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,
'<input type="radio" value='+ gadai_detail["norujukan"] +' name="sudahtebus"/>',
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: '<a href>Why do I have this issue?</a>'
});
}
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'],
"<a href='#' class='btn btn-info'>Cetak</a>"
]).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: '<a href>Why do I have this issue?</a>'
});
}
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();
+124 -4
View File
@@ -40,9 +40,10 @@
{{-- jquery validation --}}
<script src="{{ asset('js/jquery.validate.min.js') }}"></script>
<script src="{{ asset('js/additional-methods.min.js') }}"></script>
{{-- Pusher --}}
<script src="https://js.pusher.com/7.0/pusher.min.js"></script>
<script>
function startTime() {
var today = new Date();
@@ -87,11 +88,127 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left Side Of Navbar -->
<ul class="navbar-nav mr-auto">
</ul>
<!-- Right Side Of Navbar -->
<ul class="navbar-nav ml-auto">
@php $auth_user = Auth::user(); @endphp
@if ($auth_user['roles'] == 'khazanah')
<li class="nav-item dropdown" style="margin-right:10px;">
<a id="navbarDropdown" class="nav-link " href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
<i id="bell" class="fa fa-bell"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<div id="divbiasa">
<a class="dropdown-item" href="#">
{{ __('BlaBla') }}
</a>
</div>
</div>
</li>
<script>
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;
var pusher = new Pusher('26b0ec2f297f94b7aa9b', {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('status-liked');
channel.bind('my-event', function(data) {
let message = JSON.stringify(data);
$('#bell').css("color", "red");
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: 'Kelulusan Dipohon Sekarang!'
})
});
$("#navbarDropdown").click(function(){
$('#bell').css("color", "grey");
});
</script>
@elseif($auth_user['roles'] == 'teller')
<li class="nav-item dropdown" style="margin-right:10px;">
<a id="navbarDropdown" class="nav-link " href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
<i id="bell" class="fa fa-bell"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<div id="divbiasa">
<a class="dropdown-item" href="#">
{{ __('BlaBla') }}
</a>
</div>
</div>
</li>
<script>
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;
var pusher = new Pusher('26b0ec2f297f94b7aa9b', {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('notifikasi-pembayaran');
channel.bind('trigger-pembayaran', function(data) {
let message = JSON.stringify(data);
$('#bell').css("color", "red");
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
});
Toast.fire({
icon: 'error',
title: 'Notifikasi Pembayaran!'
});
});
$("#navbarDropdown").click(function(){
$('#bell').css("color", "grey");
});
</script>
@endif
<!-- Authentication Links -->
@guest
<li class="nav-item">
@@ -104,7 +221,7 @@
@endif
@else
<li class="nav-item dropdown">
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
<a id="navbarDropdown" class="nav-link dropdown-toggle" onclick="trigbiasa()" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
{{ Auth::user()->name }}
</a>
@@ -123,12 +240,15 @@
</form>
</div>
</li>
@endguest
</ul>
</div>
</div>
</nav>
<main class="py-4">
@yield('content')
</main>
@@ -0,0 +1,35 @@
<!-- Modal HistoryBayaran -->
<div class="modal fade" id="historybayaranModal" tabindex="-1" role="dialog" aria-labelledby="ModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ModalTitle">History Bayaran</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<table id="tablehistorybayaran" class="table table-striped table-bordered text-center">
<thead>
<tr>
<th>Bil</th>
<th>Tarikh Bayaran</th>
<th>Bayaran</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
</div>
</div>
</div>
</div>
@@ -0,0 +1,37 @@
<!-- Modal HistoryBayaran -->
<div class="modal fade" id="historytebusModal" tabindex="-1" role="dialog" aria-labelledby="ModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ModalTitle">History Tebus</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<table id="tablehistorytebus" class="table table-striped table-bordered text-center">
<thead>
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Jenis Tebus</th>
<th>JBG</th>
<th>Tarikh Tebus</th>
<th>Cetak</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
</div>
</div>
</div>
</div>
-2
View File
@@ -8,7 +8,6 @@
<span aria-hidden="true">&times;</span>
</button>
</div>
<form name="frmmodal" method="post" action="{{ route('wakil.create') }}">
<div class="modal-body">
<div class="form-group row">
@@ -87,7 +86,6 @@
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
<button type="button" class="btn btn-success btn-lg" onclick="daftarwakil();">Terima</button>
</div>
</form>
</div>
</div>
</div>
+241 -76
View File
@@ -1,5 +1,6 @@
@extends('layouts.app')
@include('modal.historybayaran')
@include('modal.wakil')
@section('content')
@@ -100,6 +101,7 @@
<th>Nilai Marhun</th>
<th>Berat/gram</th>
<th>Karat</th>
<th>Harga</th>
</tr>
</thead>
<tbody>
@@ -113,9 +115,17 @@
<td>RM {{ number_format($m['n_marhun'],2) }}</td>
<td>{{ $m['berat'] }}</td>
<td>{{ $m['karat'] }}</td>
<td>RM {{ $m['harga'] }}</td>
</tr>
@endforeach
</tbody>
<tr>
<td colspan="2"><b>JUMLAH</b></td>
<td>RM {{ number_format($gadai['nilaimarhun'],2) }}</td>
<td>{{ number_format($gadai['berat'],2) }}</td>
<td colspan="2"></td>
</tr>
</tfoot>
</table>
</div>
</div>
@@ -126,14 +136,25 @@
<div class="col-12 form-group row">
{{-- <div class="col-4"></div> --}}
<div class="col-6">
<div class="form-group row">
<div class="col-4">
PINJAMAN(RM)
BAKI HARGA JUALAN(RM)
</div>
<div class="col-8">
<input type="text" id="pinjaman" value="{{ $gadai['pinjaman'] }}" class="form-control" readonly/>
<input type="text" id="bakihargajualan" value="{{ $gadai['bakihargajualan'] }}" class="form-control" readonly/>
</div>
</diV>
</div>
<div class="form-group row">
<div class="col-4">
BAKI PEMBIAYAAN(RM)
</div>
<div class="col-8">
<input type="text" id="pinjaman" value="{{ $gadai['bakipjm'] }}" class="form-control" readonly/>
</div>
</div>
</div>
<div class="col-6">
<div class="form-group row">
@@ -144,11 +165,20 @@
<input type="text" id="jumlahupah" class="form-control" readonly/>
</div>
</diV>
<div class="form-group row" id="divtelahdibayar">
<div class="col-4">
TELAH DIBAYAR(RM)
</div>
<div class="col-8">
<input type="text" id="jumlahtelahdibayar" class="form-control" readonly/>
</div>
</diV>
</div>
<div class="col-6">
<div class="form-group row" id="divbayaran">
<div class="col-4">
BAYARAN(RM)
BAYARAN PEMBIAYAAN(RM)
</div>
<div class="col-8">
<input type="text" id="bayaran" onkeyup="bayarkey(this)" placeholder="0.00" class="form-control" disabled/>
@@ -156,7 +186,7 @@
</diV>
<div class="form-group row" id="divtambahpinjaman">
<div class="col-4">
TAMBAH PINJAMAN(RM)
TAMBAH PEMBIAYAAN(RM)
</div>
<div class="col-4">
<input type="text" id="tambahpinjam" onkeyup="bayarpinjam(this)" placeholder="0.00" class="form-control"/>
@@ -168,16 +198,33 @@
<input type="text" id="tambahpinjamsebenar" placeholder="0.00" value="{{ $maxgadai }}" class="form-control" disabled/>
</div>
</diV>
</div>
<div class="col-6">
<div class="form-group row" id="divtelahdibayar">
<div class="form-group row" id="divbakipinjaman">
<div class="col-4">
TELAH DIBAYAR(RM)
PEMBIAYAAN BARU(RM)
</div>
<div class="col-8">
<input type="text" id="jumlahtelahdibayar" class="form-control" readonly/>
<input type="text" id="bakipinjaman" class="form-control" readonly/>
</div>
</diV>
</div>
</div>
<div class="col-6">
<div class="form-group row" id="divperludibayar">
<div class="col-4">
PERLU DIBAYAR(RM)
</div>
<div class="col-8">
<input type="text" id="perludibayar" class="form-control" readonly/>
</div>
</div>
</div>
<div class="col-6">
<div class="form-group row" id="divpinjamanbaru">
<div class="col-4">
PINJAMAN BARU(RM)
@@ -191,14 +238,6 @@
</diV>
</div>
<div class="col-6">
<div class="form-group row" id="divperludibayar">
<div class="col-4">
PERLU DIBAYAR(RM)
</div>
<div class="col-8">
<input type="text" id="perludibayar" class="form-control" readonly/>
</div>
</diV>
<div class="form-group row" id="divbayaranditerima">
<div class="col-4">
BAYARAN DITERIMA(RM)
@@ -207,10 +246,14 @@
<input type="text" id="bayaranditerima" class="form-control" readonly/>
</div>
</diV>
</div>
<div class="col-12">
<input type="button" class="float-right btn btn-danger mr-2" value="BATAL" onclick="window.location.replace('{{ url()->previous() }}')">
<input type="button" class="float-right btn btn-primary mr-2" value="TERIMA" onclick="bayaransemua()">
<input type="button" class="float-left btn btn-warning mr-2" value="HISTORY" onclick="historybayaran()">
</div>
</div>
</form>
@@ -222,25 +265,32 @@
<script>
var historybayarandatatable = $('#tablehistorybayaran').DataTable({
"ordering": false
});
var api = '<?php echo $api_url ?>';
$('input[type="checkbox"]').hide();
$('#divtambahpinjaman').hide();
$('#divpinjamanbaru').hide();
$('#divbayaranditerima').hide();
$('#divbakipinjaman').hide();
var array_recno = [];
var array_nm = [];
var array_marhun = [];
var array_berat = [];
var tarikhtawarruq = new Date("2021/12/10");
var tarikhtawarruq = new Date("2021/01/01");
var tarikhgadai = new Date("{{ $gadai['t_gadai'] }}");
var kodcaw = "{{ $gadai['kodcaw'] }}";
var norujukan = "{{ $gadai['norujukan'] }}";
var jumlahperlu = 0;
var jumlahminima = 0;
$( document ).ready(function() {
@@ -261,7 +311,7 @@ function tebusan()
if(tarikhgadai >= tarikhtawarruq)
{
//Upah Tawarruq
$.ajax({
method:'GET',
@@ -281,6 +331,7 @@ function tebusan()
dataType: 'json',
success:function(data){
$('#perludibayar').val(data);
alert(data);
}
});
@@ -288,6 +339,7 @@ function tebusan()
}
else if(tarikhgadai < tarikhtawarruq)
{
//Upah Bukan Tawarruq
$.ajax({
method:'GET',
@@ -310,8 +362,6 @@ function tebusan()
});
}
// Telah dibayar
@@ -343,17 +393,39 @@ function tebusan()
if(tarikhgadai >= tarikhtawarruq)
{
alert('separuh bayar tawarruq');
//Separuh Bayar Tawarruq
$(document).on('click', '#checkmarhun', function(e) {
var recno = $(this).data('recno');
var nilaimarhun = $(this).data('nm');
var marhun = $(this).data('marhun');
var berat = $(this).data('berat');
if ($(this).is(':checked')) {
array_recno.push(recno);
array_nm.push(nilaimarhun);
array_marhun.push(marhun);
array_berat.push(berat);
console.log("Nilai Marhun: " + nilaimarhun);
}
else{
var rm = array_recno.findIndex(x => x === recno);
var rmnilai = array_nm.findIndex(y => y == nilaimarhun);
var rmmarhun = array_marhun.findIndex(z => z == marhun);
var rmberat = array_berat.findIndex(a => a == berat);
array_recno.splice(rm);
array_nm.splice(rmnilai);
array_marhun.splice(rmmarhun);
array_berat.splice(rmberat);
console.log("Nilai Marhun: " + rmnilai);
}
$.ajax({
method:'GET',
@@ -363,7 +435,14 @@ if(tarikhgadai >= tarikhtawarruq)
"array_recno" : array_recno
},
success:function(success){
$('#perludibayar').val(Number(success.toFixed(2)));
alert(success);
let bayarz = $('#bayaran').val(Number(success.toFixed(2)));
let bakihargajual = $('#bakihargajualan').val();
$('#perludibayar').val(Number(success.toFixed(2)) + parseFloat($('#jumlahupah').val()));
$('#bakipinjaman').val(parseFloat($('#pinjaman').val()) - success);
}
});
});
@@ -382,64 +461,76 @@ if(tarikhgadai >= tarikhtawarruq)
}
else if(tarikhgadai < tarikhtawarruq){
//Separuh Bayar Bukan Tawarruq
$(document).on('click', '#checkmarhun', function(e) {
alert('separuh belum tawarruq');
//Separuh Bayar Bukan Tawarruq
$(document).on('click', '#checkmarhun', function(e) {
//checked box
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
var checkedOne = Array.prototype.slice.call(checkboxes).some(x => x.checked);
//checked box
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
var checkedOne = Array.prototype.slice.call(checkboxes).some(x => x.checked);
//jumlah upah
var jumupah = parseFloat($('#jumlahupah').val());
//jumlah upah
var jumupah = parseFloat($('#jumlahupah').val());
var recno = $(this).data('recno');
var nilaimarhun = $(this).data('nm');
var marhun = $(this).data('marhun');
var berat = $(this).data('berat');
var recno = $(this).data('recno');
var nilaimarhun = $(this).data('nm');
var marhun = $(this).data('marhun');
var berat = $(this).data('berat');
if ($(this).is(':checked')) {
array_recno.push(recno);
array_nm.push(nilaimarhun);
array_marhun.push(marhun);
array_berat.push(berat);
if ($(this).is(':checked')) {
array_recno.push(recno);
array_nm.push(nilaimarhun);
array_marhun.push(marhun);
array_berat.push(berat);
}
else{
var rm = array_recno.findIndex(x => x === recno);
var rmnilai = array_nm.findIndex(y => y == nilaimarhun);
var rmmarhun = array_marhun.findIndex(z => z == marhun);
var rmberat = array_berat.findIndex(a => a == berat);
console.log("Nilai Marhun: " + nilaimarhun);
array_recno.splice(rm);
array_nm.splice(rmnilai);
array_marhun.splice(rmmarhun);
array_berat.splice(rmberat);
}
else{
var rm = array_recno.findIndex(x => x === recno);
var rmnilai = array_nm.findIndex(y => y == nilaimarhun);
var rmmarhun = array_marhun.findIndex(z => z == marhun);
var rmberat = array_berat.findIndex(a => a == berat);
}
array_recno.splice(rm);
array_nm.splice(rmnilai);
array_marhun.splice(rmmarhun);
array_berat.splice(rmberat);
if (checkedOne == false) {
$('#perludibayar').val(jumupah);
}
else
{
$.ajax({
method:'GET',
url: api + '/api/tebusseparuhbukantawarruq/' + kodcaw + '/' + norujukan,
dataType: 'json',
data:{
"array_recno" : array_recno
},
success:function(success){
$('#perludibayar').val(Number(success.toFixed(2)) + parseFloat($('#jumlahupah').val()));
jumlahperlu = Number(success.toFixed(2)) + parseFloat($('#jumlahupah').val());
},
error: function (request, status, error) {
console.log(request.responseText);
}
});
}
});
console.log("Nilai Marhun: " + rmnilai);
}
if (checkedOne == false) {
$('#perludibayar').val(jumupah);
$('#bayaran').val(jumupah);
}
else
{
$.ajax({
method:'GET',
url: api + '/api/tebusseparuhbukantawarruq/' + kodcaw + '/' + norujukan,
dataType: 'json',
data:{
"array_recno" : array_recno
},
success:function(success){
jumlahminima = Number(success.toFixed(2));
$('#bayaran').val(jumlahminima);
$('#bakipinjaman').val($('#pinjaman').val() - jumlahminima);
$('#perludibayar').val(Number(success.toFixed(2)) + parseFloat($('#jumlahupah').val()));
jumlahperlu = Number(success.toFixed(2)) + parseFloat($('#jumlahupah').val());
},
error: function (request, status, error) {
console.log(request.responseText);
}
});
}
});
}
@@ -457,6 +548,7 @@ $("#sltjenistebus").change(function(){
$('#divtambahpinjaman').hide();
$('#divpinjamanbaru').hide();
$('#divbayaranditerima').hide();
$('#divbakipinjaman').hide();
$('#divtelahdibayar').show();
$('#divbayaran').show();
@@ -472,6 +564,7 @@ $("#sltjenistebus").change(function(){
$('#divtambahpinjaman').hide();
$('#divpinjamanbaru').hide();
$('#divbayaranditerima').hide();
$('#divbakipinjaman').hide();
$('#divtelahdibayar').show();
$('#divbayaran').show();
@@ -489,6 +582,7 @@ $("#sltjenistebus").change(function(){
$('#divpinjamanbaru').hide();
$('#divbayaranditerima').hide();
$('#divbakipinjaman').show();
$('#divtelahdibayar').show();
$('#divbayaran').show();
$('#divperludibayar').show();
@@ -505,6 +599,7 @@ $("#sltjenistebus").change(function(){
$('#divbayaranditerima').show();
$('#divtelahdibayar').hide();
$('#divbakipinjaman').hide();
$('#divbayaran').hide();
$('#divperludibayar').hide();
@@ -545,8 +640,15 @@ function bayarkey(e)
}
else if($('#sltjenistebus').find(":selected").val() == 'S')
{
let byr = $(e).val();
let total = 0;
let pdbyr = 0;
pdbyr = parseFloat(byr) + parseFloat($('#jumlahupah').val());
total = $('#pinjaman').val() - byr;
$('#perludibayar').val(pdbyr);
$('#bakipinjaman').val(total);
}
}
@@ -637,7 +739,7 @@ function bayaransemua()
$.ajax({
method:'PUT',
url: api + '/api/gadai/' + kodcaw + '/' + norujukan,
url: api + '/api/gadai/' + kodcaw + '/norujukan/' + norujukan,
data:{
"bayaran" : bayar
},
@@ -772,7 +874,6 @@ function bayaransemua()
{
if (value.match(array_marhun[i])) {
console.log("value: " + value + " index :" + index +" marhun : " + array_marhun[i]);
console.log('true');
test.splice(index,1);
countarrayerror++;
@@ -799,10 +900,10 @@ function bayaransemua()
var kadarupah = "{{ $gadai['kadarupah'] }}";
var nilai_marhun_lama = parseFloat("{{ $gadai['nilaimarhun'] }}");
var nilai_marhun = parseFloat("{{ $gadai['nilaimarhun'] }}") - sumnilaimarhun;
var pinjamanbaru = (parseFloat("{{ $gadai['pinjaman'] }}")) - lebihan;
var pinjamanbaru = $('#bakipinjaman').val();
var ansuran = 0;
var addpinjaman = 0;
var bakipinjaman = parseFloat("{{ $gadai['pinjaman'] }}") - parseFloat($('#perludibayar').val());
var bakipinjaman = parseFloat("{{ $gadai['pinjaman'] }}");
var bakiupah = 0;
var historygadaian = "{{ $gadai['norujukan'] }}";
var marhun = "{{ $gadai['marhun'] }}";
@@ -812,6 +913,15 @@ function bayaransemua()
var marhun_detail = marhun_baru;
var kuantiti_marhun = Number("{{sizeof($marhun)}}") - array_recno.length;
console.log("Pinjaman Baru Sekali Lagi: " + pinjamanbaru);
// console.log('lebihan : ' + lebihan + ' ');
console.log("No Pelanggan:" + nopelanggan + " " + "jenistebus:" + jenistebus + " " + "jbg:" + jbg + " " + "kadarupah:" + kadarupah + " ");
console.log("nilai_marhun_lama:" + nilai_marhun_lama + " " + "nilai_marhun:" + nilai_marhun + " " + "pinjamanbaru:" + pinjamanbaru + " " + "bakipinjaman:" + bakipinjaman + " ");
console.log("historygadaian:" + historygadaian + " " + "marhun:" + marhun + " " + "total_berat:" + total_berat + " " + "pinjaman:" + pinjaman + " ");
console.log("marhun_detail: " + marhun_detail + "kuantiti_marhun: " + kuantiti_marhun);
return;
var kadarupahbaru = 0;
@@ -1140,6 +1250,61 @@ function ubahwakil(e)
$(e).attr( "onclick", "wakilfunction(this)");
}
function historybayaran()
{
// $.ajax({
// method: 'get',
// url: 'http://localhost:8000/api/listpenebusanhistory/ALS',
// data: {
// "norujukan" : norujukan
// },
// success:function(data)
// {
// alert(data);
// $('#historybayaranModal').modal();
// }
// });
$.ajax({
method: 'get',
url: 'http://localhost:8000/api/transaction/' + norujukan,
success: function(data)
{
historybayarantable(data);
$('#historybayaranModal').modal();
}
});
}
function historybayarantable(data){
var counter = 1;
historybayarandatatable.clear().draw();
$.each(data,function(index,bayaran){
var urlroute = '{{ route("resit.ansuran", ":id") }}';
urlroute = urlroute.replace(':id', bayaran['id']);
console.log(bayaran['']);
historybayarandatatable.row.add([
counter,
bayaran['created_at'],
"RM " + bayaran['duit_masuk'],
'<a class="btn btn-info" target="_blank" href='+ urlroute +'>Cetak</a>'
// marhun_detail['marhun'],
// 'RM ' + formatter.format(marhun_detail['n_marhun']),
// marhun_detail['karat'],
// formatter.format(marhun_detail['berat']),
// marhun_detail['nota']
]).draw();
counter = counter + 1;
});
}
// Restricts input for the set of matched elements to the given inputFilter function.
(function($) {
$.fn.inputFilter = function(inputFilter) {
@@ -0,0 +1,569 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
/* Red border */
hr.new1 {
border-top: 1px solid red;
}
/* Dashed red border */
hr.new2 {
border-top: 1px dashed red;
}
/* Dotted red border */
hr.new3 {
border-top: 1px dotted red;
}
/* Thick red border */
hr.new4 {
border: 1px solid red;
}
/* Large rounded green border */
hr.new5 {
border: 10px solid green;
border-radius: 5px;
}
</style>
<style>
#cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:20%;
font-size:10px;
border: 1px solid black;
}
#cust td, #cust th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align:right;
}
#cust tr:nth-child(even){background-color: #ffffff;}
#cust tr:hover {background-color: #ddd;}
#cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align:right;
background-color: #d9deda;
color: black;
padding:2px;
}
#cust {
margin-left: auto;
margin-right: 0;
}
</style>
<style>
hr.new1 {
border-top: 1px dotted black;
}
.khazanah{
border:1px solid black;
margin-left:20px;
padding:10px;
width : 250px;
transform: rotate(-90deg);
font-size:11px;
}
#inside {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:10px;
}
#inside td, #inside th {
border: 1px solid #ddd;
padding: 2px;
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#semakan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:10px;
}
#semakan td, #semakan th {
border: 1px solid #ddd;
padding: 2px;
text-align: center;
}
#semakan tr:nth-child(even){background-color: #ffffff;}
#semakan tr:hover {background-color: #ddd;}
#semakan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#salinan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:11px;
}
#salinan td, #salinan th {
padding: 2px;
}
#salinan tr:nth-child(even){background-color: #ffffff;}
#salinan tr:hover {background-color: #ffffff;}
#salinan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: right;
background-color: #ffffff;
color: black;
padding:2px;
}
#perjanjian {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#perjanjian td, #perjanjian th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#perjanjian tr:nth-child(even){background-color:#ffffff}
#perjanjian tr:hover {background-color: #ddd;}
#perjanjian th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:5px;
}
#keuntungan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#keuntungan td, #keuntungan th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#keuntungan tr:nth-child(even){background-color: #ffffff;}
#keuntungan tr:hover {background-color: #ddd;}
#keuntungan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 45%;
font-size:10px;
border: 1px solid black;
}
#payment td, #payment th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align: left;
}
#payment tr:nth-child(even){background-color: #ffffff;}
#payment tr:hover {background-color: #ddd;}
#payment th {
padding-top: 12px;
padding-bottom: 12px;
text-align:left;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
margin-left: auto;
margin-right: auto;
}
#akuan td, #akuan th {
padding: 7px;
font-size:9px;
padding:4px;
}
#akuan tr:nth-child(even){background-color:#ffffff;}
#akuan tr:hover {background-color: #ddd;}
#akuan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:3px;
}
.page-break{
page-break-before:always;
}
.formula{
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:10%;
font-size:10px;
}
#copy_cust tr:nth-child(even){background-color: #ffffff;}
#copy_cust tr:hover {background-color:#ffffff}
#copy_cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 50%;
font-size:10px;
}
#copy_cust td, #copy_cust th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
text-align:right;
width: 10%;
}
#copy_cust {
margin-right:0px;margin-left:auto
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
</style>
<table>
<td rowspan="4" style="width:50px;"> <img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" > </td>
<td rowspan="4" style="width:50px;"><img src="{{ asset('img/pkb.png') }}" style="width:50px" alt="User Image" class="center" > </td>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pelanggan</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> No SAG</td><td> {{ $transaction['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tarikh Bayar</td><td>@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp</td>
</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['tempoh'] }} </td>
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<td colspan="3">No K/P Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
</table>
<br>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Harga Jualan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pelanggan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['duit_masuk'],2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Rebate</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['duit_masuk'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Baki Harga Jualan</b></td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['bakiharga'],2) }} </td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
<br>
<hr class="new2"></hr>
<br>
<br>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pejabat</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> No SAG</td><td> {{ $transaction['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tarikh Bayar</td><td> @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp </td>
</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['tempoh'] }} </td>
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<td colspan="3">No K/P Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
</table>
<br>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Harga Jualan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pelanggan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['duit_masuk'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Baki Harga Jualan</b></td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['bakiharga'],2) }}</td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
+566
View File
@@ -0,0 +1,566 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
/* Red border */
hr.new1 {
border-top: 1px solid red;
}
/* Dashed red border */
hr.new2 {
border-top: 1px dashed red;
}
/* Dotted red border */
hr.new3 {
border-top: 1px dotted red;
}
/* Thick red border */
hr.new4 {
border: 1px solid red;
}
/* Large rounded green border */
hr.new5 {
border: 10px solid green;
border-radius: 5px;
}
</style>
<style>
#cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:20%;
font-size:10px;
border: 1px solid black;
}
#cust td, #cust th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align:right;
}
#cust tr:nth-child(even){background-color: #ffffff;}
#cust tr:hover {background-color: #ddd;}
#cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align:right;
background-color: #d9deda;
color: black;
padding:2px;
}
#cust {
margin-left: auto;
margin-right: 0;
}
</style>
<style>
hr.new1 {
border-top: 1px dotted black;
}
.khazanah{
border:1px solid black;
margin-left:20px;
padding:10px;
width : 250px;
transform: rotate(-90deg);
font-size:11px;
}
#inside {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:10px;
}
#inside td, #inside th {
border: 1px solid #ddd;
padding: 2px;
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#semakan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:10px;
}
#semakan td, #semakan th {
border: 1px solid #ddd;
padding: 2px;
text-align: center;
}
#semakan tr:nth-child(even){background-color: #ffffff;}
#semakan tr:hover {background-color: #ddd;}
#semakan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#salinan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:11px;
}
#salinan td, #salinan th {
padding: 2px;
}
#salinan tr:nth-child(even){background-color: #ffffff;}
#salinan tr:hover {background-color: #ffffff;}
#salinan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: right;
background-color: #ffffff;
color: black;
padding:2px;
}
#perjanjian {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#perjanjian td, #perjanjian th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#perjanjian tr:nth-child(even){background-color:#ffffff}
#perjanjian tr:hover {background-color: #ddd;}
#perjanjian th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:5px;
}
#keuntungan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#keuntungan td, #keuntungan th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#keuntungan tr:nth-child(even){background-color: #ffffff;}
#keuntungan tr:hover {background-color: #ddd;}
#keuntungan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 45%;
font-size:10px;
border: 1px solid black;
}
#payment td, #payment th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align: left;
}
#payment tr:nth-child(even){background-color: #ffffff;}
#payment tr:hover {background-color: #ddd;}
#payment th {
padding-top: 12px;
padding-bottom: 12px;
text-align:left;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
margin-left: auto;
margin-right: auto;
}
#akuan td, #akuan th {
padding: 7px;
font-size:9px;
padding:4px;
}
#akuan tr:nth-child(even){background-color:#ffffff;}
#akuan tr:hover {background-color: #ddd;}
#akuan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:3px;
}
.page-break{
page-break-before:always;
}
.formula{
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:10%;
font-size:10px;
}
#copy_cust tr:nth-child(even){background-color: #ffffff;}
#copy_cust tr:hover {background-color:#ffffff}
#copy_cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 50%;
font-size:10px;
}
#copy_cust td, #copy_cust th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
text-align:right;
width: 10%;
}
#copy_cust {
margin-right:0px;margin-left:auto
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
</style>
<table>
<td rowspan="4" style="width:50px;"> <img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" > </td>
<td rowspan="4" style="width:50px;"><img src="{{ asset('img/pkb.png') }}" style="width:50px" alt="User Image" class="center" > </td>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pelanggan</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> No SAG</td><td> {{ $transaction['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tarikh Bayar</td><td>@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp</td>
</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['tempoh'] }} </td>
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<td colspan="3">No K/P Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
</table>
<br>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Harga Jualan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pelanggan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['duit_masuk'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Baki Harga Jualan</b></td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['bakiharga'],2) }} </td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
<br>
<hr class="new2"></hr>
<br>
<br>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pejabat</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> No SAG</td><td> {{ $transaction['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tarikh Bayar</td><td> @php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp </td>
</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['tempoh'] }} </td>
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<td colspan="3">No K/P Wakil </td> <td>: </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
</table>
<br>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">@php $time = new DateTime($transaction['created_at']); $date = $time->format('n/j/Y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Harga Jualan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format(($transaction['bakiharga'] + $transaction['duit_masuk']),2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pelanggan</td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['duit_masuk'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Baki Harga Jualan</b></td><td style="width:5px"> </td><td style="width:10px">RM {{ number_format($transaction['bakiharga'],2) }}</td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
+35 -80
View File
@@ -36,11 +36,15 @@
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="{{ asset('vendor/DataTables/datatables.min.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
{{-- Pusher --}}
<script src="https://js.pusher.com/7.0/pusher.min.js"></script>
{{-- jquery validation --}}
<script src="{{ asset('js/jquery.validate.min.js') }}"></script>
<script src="{{ asset('js/additional-methods.min.js') }}"></script>
<!-- Styles -->
<style>
html, body {
@@ -96,86 +100,37 @@
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@auth
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ route('login') }}">Login</a>
<h1>Pusher Test</h1>
<p>
Try publishing an event to channel <code>my-channel</code>
with event name <code>my-event</code>.
</p>
<button onclick="trigtest()">Click</button>
</body>
@if (Route::has('register'))
<a href="{{ route('register') }}">Register</a>
@endif
@endauth
</div>
@endif
<script>
<div class="content">
<div class="title m-b-md">
Laravel
</div>
// // Enable pusher logging - don't include this in production
// Pusher.logToConsole = true;
// var pusher = new Pusher('26b0ec2f297f94b7aa9b', {
// cluster: 'ap1',
// encrypted: true
// });
// var channel = pusher.subscribe('status-liked');
// channel.bind('my-event', function(data) {
// let message = JSON.stringify(data);
<div class="links">
<button class="btn btn-primary" id="login_button">Login</button>
<button class="btn btn-primary" id="logout_button">Logout</button>
</div>
</div>
</div>
</body>
// alert(message);
// });
function trigtest()
{
pusher.bind();
}
</script>
</html>
<script>
var auth_token;
$('#login_button').click(function(){
$.ajax({
method:'POST',
url:'http://e-arrahn.test/api/mobile/login',
data:{
'email':'aziz@pkb.net',
'password':'Abc123'
},
dataType:'json',
success:function(data){
auth_token = data['token']['token'];
Swal.fire({
icon: 'success',
title: 'Berjaya!',
text: 'Login Berjaya'
});
},
error: function(xhRequest, ErrorText, thrownError){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Login Tidak Berjaya'
});
console.log(xhRequest);
}
});
});
$('#logout_button').click(function(){
$.ajax({
method:'GET',
url:'http://e-arrahn.test/api/mobile/logout',
headers:{
'Authorization':'Bearer '+auth_token,
'Accept':'*'
},
success:function(data){
Swal.fire({
icon: 'success',
title: 'Berjaya!',
text: 'Logout Berjaya'
});
},
error: function(xhRequest, ErrorText, thrownError){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Logout Tidak Berjaya'
});
console.log(xhRequest);
}
});
});
</script>
+25 -6
View File
@@ -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');
});