- Maksimum 3 SAG dibenarkan dalam satu transaksi .
+ Maksima 3 No Rujukan Sahaja Dibenarkan Dalam Satu Transaksi Pembayaran.
+ Sila 'Tick' Pada Kotak Yang Hendak Dibayar.
+
@@ -250,6 +228,294 @@ var hargaemastable = $('#harga_emas').DataTable({
"scrollX": true
});
+ $( document ).ready(function() {
+ filterjumlahpembsemasa();
+ });
+
+ function filterjumlahpembsemasa(){
+
+ $('#loadertable').removeClass('d-none');
+ $('#formtable').addClass('d-none');
+
+ let datapembsemasa = [];
+ $.ajax({
+ url: '{{ route("info.pembsemasa") }}',
+ method: 'get',
+ async: false,
+ dataType: "json",
+ success: function(data) {
+ for(i in data){
+ datapembsemasa.push(data[i]);
+ }
+ $('#loadertable').addClass('d-none');
+ $('#formtable').removeClass('d-none');
+
+ }
+ });
+
+
+ selepastawarruqtable.clear().draw();
+ var counter = 1;
+ $.each(datapembsemasa,function(index,ps){
+
+ let namacawangan = '';
+ $.ajax({
+ url: api_url + '/api/cawangan/detail/' + ps.kodcaw,
+ method: 'get',
+ async:false,
+ dataType: "json",
+ success: function(data) {
+ namacawangan = data[0].namacaw;
+ namacawangan = namacawangan.toLowerCase().substring(8).replace(/\b[a-z]/g, function(value) {
+ return value.toUpperCase();
+ });
+ }
+ });
+
+ let marhun = [];
+ $.ajax({
+ url: api_url + '/api/marhun/' + ps.norujukan,
+ method: 'get',
+ async:false,
+ dataType: "json",
+ success: function(response) {
+ // console.log(response);
+ for(i in response){
+ marhun.push(response[i]);
+ }
+ }
+ });
+
+
+ let marh = JSON.stringify(marhun[0]);
+
+ selepastawarruqtable.row.add([
+ `
`,
+ namacawangan,
+ `
${ps.norujukan}`,
+ ps.tempoh,
+ ps.bakiupah,
+ ps.t_matang,
+ ps.taglel
+ ]).draw();
+
+ counter = counter + 1;
+ });
+
+ }
+
+ function linktargetfunc(e){
+ var arraymarhun = $(e).data('marhun');
+ var norujukan = $(e).data('norujukan');
+ var kodcaw = $(e).data('kodcaw');
+ var hargajualan = $(e).data('hargajualan');
+ var pinjaman = $(e).data('pinjaman');
+ var bakipjm = $(e).data('bakipjm');
+ var lelong = $(e).data('lelong');
+ var pjmnum = $(e).data('pjmnum');
+
+ bayaranfunc(e,api_url);
+
+ $('#pemb').text('RM ' + pjmnum);
+ $('#bpemb').text('RM ' + bakipjm);
+
+ if(lelong === 1)
+ {
+ $('#statuslelong').text('Akan Dilelong');
+ }else{
+ $('#statuslelong').text('-');
+ }
+
+ $('#norujukan_modal').val(norujukan);
+ $('#pinjaman_modal').val(pinjaman);
+ $('#tablemarhun').empty();
+ var bil_count = 0;
+ $.each(arraymarhun, function(index, marhun) {
+ var marhun_name;
+ $.ajax({
+ method: 'GET',
+ url: api_url + '/api/jemas/nama_marhun',
+ dataType: 'json',
+ data: {
+ marhun: marhun['marhun']
+ },
+ success: function(marhun_ajax) {
+ bil_count++;
+ $("#tablemarhun").append("
| " + bil_count + " | " + marhun_ajax['descpt'] + " | " + marhun['berat'] + " | " + marhun['karat'] + " | RM " + marhun['n_marhun'].toLocaleString(undefined, {
+ minimumFractionDigits: 2
+ }) + " | " + marhun['nota'] + " |
");
+ }
+ });
+ });
+
+ }
+
+ function tickfunc(e){
+ var count = parseInt($('#totalsag').text());
+ console.log(count);
+ if ($(e).is(':checked')) {
+ var total = count + 1;
+
+ if (total <= 3) {
+ $('#totalsag').text(total);
+ } else {
+ $(e).prop('checked', false);
+ }
+ } else {
+ var total = count - 1;
+ $('#totalsag').text(total);
+ }
+
+ return false;
+ }
+
+ function filterpembiayaanaktif(){
+
+ $('#loadertable').removeClass('d-none');
+ $('#formtable').addClass('d-none');
+
+ let datapembaktif = [];
+ $.ajax({
+ url: '{{ route("info.pembaktif") }}',
+ method: 'get',
+ async: false,
+ dataType: "json",
+ success: function(data) {
+ for(i in data){
+ datapembaktif.push(data[i]);
+ }
+
+ $('#loadertable').addClass('d-none');
+ $('#formtable').removeClass('d-none');
+ }
+ });
+
+
+
+
+ selepastawarruqtable.clear().draw();
+ var counter = 1;
+ $.each(datapembaktif,function(index,ps){
+
+ let namacawangan = '';
+ $.ajax({
+ url: api_url + '/api/cawangan/detail/' + ps.kodcaw,
+ method: 'get',
+ async:false,
+ dataType: "json",
+ success: function(data) {
+ namacawangan = data[0].namacaw;
+ namacawangan = namacawangan.toLowerCase().substring(8).replace(/\b[a-z]/g, function(value) {
+ return value.toUpperCase();
+ });
+ }
+ });
+
+ let marhun = [];
+ $.ajax({
+ url: api_url + '/api/marhun/' + ps.norujukan,
+ method: 'get',
+ async:false,
+ dataType: "json",
+ success: function(response) {
+ // console.log(response);
+ for(i in response){
+ marhun.push(response[i]);
+ }
+ }
+ });
+
+ let marh = JSON.stringify(marhun[0]);
+
+ selepastawarruqtable.row.add([
+ `
`,
+ namacawangan,
+ `
${ps.norujukan}`,
+ ps.tempoh,
+ ps.bakiupah,
+ ps.t_matang,
+ ps.taglel
+ ]).draw();
+
+ counter = counter + 1;
+ });
+ }
+
+ function filterpembiayaan6bulan(){
+
+ $('#loadertable').removeClass('d-none');
+ $('#formtable').addClass('d-none');
+
+ let datapemb6 = [];
+ $.ajax({
+ url: '{{ route("info.pemb6bulan") }}',
+ method: 'get',
+ async: false,
+ dataType: "json",
+ success: function(data) {
+ for(i in data){
+ datapemb6.push(data[i]);
+ }
+
+ $('#loadertable').addClass('d-none');
+ $('#formtable').removeClass('d-none');
+
+
+ }
+ });
+
+
+ selepastawarruqtable.clear().draw();
+ var counter = 1;
+ $.each(datapemb6,function(index,ps){
+
+ let namacawangan = '';
+ $.ajax({
+ url: api_url + '/api/cawangan/detail/' + ps.kodcaw,
+ method: 'get',
+ async:false,
+ dataType: "json",
+ success: function(data) {
+ namacawangan = data[0].namacaw;
+ namacawangan = namacawangan.toLowerCase().substring(8).replace(/\b[a-z]/g, function(value) {
+ return value.toUpperCase();
+ });
+ }
+ });
+
+ let marhun = [];
+ $.ajax({
+ url: api_url + '/api/marhun/' + ps.norujukan,
+ method: 'get',
+ async:false,
+ dataType: "json",
+ success: function(response) {
+ // console.log(response);
+ for(i in response){
+ marhun.push(response[i]);
+ }
+ }
+ });
+
+
+ let marh = JSON.stringify(marhun[0]);
+
+ selepastawarruqtable.row.add([
+ `
`,
+ namacawangan,
+ `
${ps.norujukan}`,
+ ps.tempoh,
+ ps.bakiupah,
+ ps.t_matang,
+ ps.taglel
+ ]).draw();
+
+ counter = counter + 1;
+ });
+ }
+
+
+
function bayaranfunc(e,api){
let norujukan = $(e).data('norujukan');
@@ -260,8 +526,6 @@ var hargaemastable = $('#harga_emas').DataTable({
let berat = $(e).data('berat');
let nm = $(e).data('nm');
- console.log(pinjaman,upah12,bakipjm,berat,nm);
-
$('#pembiayaan').text('RM ' + pinjaman);
$('#bpembiayaan').text('RM ' + bakipjm);
$('#nm').text('RM ' + nm);
@@ -299,30 +563,34 @@ var hargaemastable = $('#harga_emas').DataTable({
});
}
- $("input[type='checkbox'][name='chkboxsag[]']").click(function() {
- var count = parseInt($('#totalsag').text());
- if ($(this).is(':checked')) {
- var total = count + 1;
+ // $("input[type='checkbox'][name='chkboxsag[]']").click(function() {
+ // var count = parseInt($('#totalsag').text());
+ // console.log(count);
+ // if ($(this).is(':checked')) {
+ // var total = count + 1;
- if (total <= 3) {
- $('#totalsag').text(total);
- } else {
- $(this).prop('checked', false);
- }
- } else {
- var total = count - 1;
- $('#totalsag').text(total);
- }
- });
+ // if (total <= 3) {
+ // $('#totalsag').text(total);
+ // } else {
+ // $(this).prop('checked', false);
+ // }
+ // } else {
+ // var total = count - 1;
+ // $('#totalsag').text(total);
+ // }
+
+ // return false;
+ // });
function validateform() {
return true;
}
-
+ $('.linktarget').off('click', 'tr');
+
$('.linktarget').on('click', function(event) {
-
+ console.log(event);
var arraymarhun = $(this).data('marhun');
var norujukan = $(this).data('norujukan');
var kodcaw = $(this).data('kodcaw');
diff --git a/resources/views/includes/login/loginportal.blade.php b/resources/views/includes/login/loginportal.blade.php
index 7afefaa..6717c28 100644
--- a/resources/views/includes/login/loginportal.blade.php
+++ b/resources/views/includes/login/loginportal.blade.php
@@ -41,7 +41,7 @@