Refactor member and product scripts to use concise method definitions
- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
This commit is contained in:
+21
-21
@@ -14,7 +14,7 @@ var GELGajiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -24,7 +24,7 @@ var GELGajiJS = {
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_brow: function(){
|
||||
tx_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowTX"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -42,17 +42,17 @@ var GELGajiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#No_Gaji').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#No_Gaji').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -60,7 +60,7 @@ var GELGajiJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#No_Gaji').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -84,18 +84,18 @@ var GELGajiJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#No_Gaji').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_print: function(){
|
||||
tx_print() {
|
||||
if (!$('#No_Gaji').val()){
|
||||
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
|
||||
return;
|
||||
@@ -106,14 +106,14 @@ var GELGajiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_print_exec: function(){
|
||||
tx_print_exec() {
|
||||
var cetak = new PrinterPos('report/nota/gaji');
|
||||
cetak.add_param("Nomor_Cetak", $('#No_Gaji').val());
|
||||
cetak.exec();
|
||||
FoniaJS.closeWindow(this.winBCetak);
|
||||
},
|
||||
|
||||
karya_brow: function(){
|
||||
karya_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Karya" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowKarya"> </div>');
|
||||
this.winBKarya = FoniaJS.showWindow('BKarya', 'Daftar Karyawan', _isi, 'lg', '', () => {
|
||||
$('#winBKarya')
|
||||
@@ -131,12 +131,12 @@ var GELGajiJS = {
|
||||
});
|
||||
},
|
||||
|
||||
karya_select: function(acell){
|
||||
karya_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBKarya);
|
||||
this.detail_gaji('insert', 0, acell[0]);
|
||||
},
|
||||
|
||||
detail_gaji: function(mode, ID, KaryaID){
|
||||
detail_gaji(mode, ID, KaryaID) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_gaji',
|
||||
sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID],
|
||||
@@ -177,15 +177,15 @@ var GELGajiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
this.detail_gaji('insert', 0, 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_gaji('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -194,7 +194,7 @@ var GELGajiJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#KaryaID').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Karyawan !');
|
||||
return;
|
||||
@@ -212,7 +212,7 @@ var GELGajiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
var sparam = ['mode='+mode,'No_Gaji'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
if ((mode ?? '')=='save') sparam = ['mode=save','No_Gaji','Tgl_Gaji','CabID','Tahun','Bulan','Minggu','Catatan='+encodeURIComponent($('#Catatan').val())];
|
||||
@@ -272,7 +272,7 @@ var GELGajiJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Karya_Comp: function(item){
|
||||
Karya_Comp(item) {
|
||||
var adata = item.data.split(':');
|
||||
$('#KaryaID').val(item.value);
|
||||
$('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0]));
|
||||
@@ -280,7 +280,7 @@ var GELGajiJS = {
|
||||
FoniaJS.setFocus('#Qty_Harian');
|
||||
},
|
||||
|
||||
oc_Minggu: function(){
|
||||
oc_Minggu() {
|
||||
new Request({
|
||||
url: this.PHP + '/option_minggu',
|
||||
sendParam: ['Tahun','Bulan'],
|
||||
@@ -295,7 +295,7 @@ var GELGajiJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
Hitung_Detail: function(){
|
||||
Hitung_Detail() {
|
||||
var dgaji = FoniaJS.StrToFloat($('#Qty_Harian').val()) * FoniaJS.StrToFloat($('#Gaji_Harian').val());
|
||||
var dlemb = FoniaJS.StrToFloat($('#Qty_Lembur').val()) * FoniaJS.StrToFloat($('#Lembur_Harian').val());
|
||||
var dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val());
|
||||
|
||||
+11
-11
@@ -14,21 +14,21 @@ var GELHutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butMode').click(() => this.tx_mode());
|
||||
$('#butBatal').click(() => this.tx_batal());
|
||||
if (FoniaJS.User.Level>0) $('#butMode').hide();
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_mode: function(){
|
||||
tx_mode() {
|
||||
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
|
||||
$('#Mode_Tampil').val(mode);
|
||||
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
$('#divTXNota').removeClass('d-none');
|
||||
$('#divDetailNota').addClass('d-none');
|
||||
$('#divDetailBayar').addClass('d-none');
|
||||
@@ -39,7 +39,7 @@ var GELHutangJS = {
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
sup_brow: function(){
|
||||
sup_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Sup" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowSup"> </div>');
|
||||
this.winBSup = FoniaJS.showWindow('BSup', 'Daftar Supplier', _isi, 'xl', '', () => {
|
||||
$('#winBSup')
|
||||
@@ -57,7 +57,7 @@ var GELHutangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
sup_select: function(acell){
|
||||
sup_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBSup);
|
||||
$('#SupID').val(acell[0]);
|
||||
$('#Nama_Sup').val(acell[2]);
|
||||
@@ -65,7 +65,7 @@ var GELHutangJS = {
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
nota_select: function(acell){
|
||||
nota_select(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_nota',
|
||||
sendParam: ['No_Beli='+acell[1],'Tipe_Nota='+acell[0]],
|
||||
@@ -83,7 +83,7 @@ var GELHutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_show: function(){
|
||||
bayar_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['No_Beli','Total_Sisa'],
|
||||
@@ -96,7 +96,7 @@ var GELHutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_hapus: function(acell){
|
||||
bayar_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
@@ -105,7 +105,7 @@ var GELHutangJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
|
||||
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
|
||||
return;
|
||||
@@ -117,7 +117,7 @@ var GELHutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -153,7 +153,7 @@ var GELHutangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Sup_Comp: function(item){
|
||||
Sup_Comp(item) {
|
||||
$('#SupID').val(item.value);
|
||||
$('#Alamat_Sup').val(item.data);
|
||||
GELHutangJS.data_query('tabel-nota');
|
||||
|
||||
@@ -14,13 +14,13 @@ var GELKaryaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butPinjam').click(() => this.tx_pinjam());
|
||||
$('#butBayar').click(() => this.tx_bayar());
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_pinjam: function(){
|
||||
tx_pinjam() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_pinjam',
|
||||
sendParam: ['KaryaID'],
|
||||
@@ -33,7 +33,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
tx_bayar: function(){
|
||||
tx_bayar() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['KaryaID'],
|
||||
@@ -46,7 +46,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
pinjam_simpan: function(){
|
||||
pinjam_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){
|
||||
FoniaJS.showError("Silahkan masukkan jumlah pinjaman !");
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){
|
||||
FoniaJS.showError("Silahkan masukkan jumlah pembayaran !");
|
||||
return;
|
||||
@@ -70,7 +70,7 @@ var GELKaryaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
karya_hapus: function(acell){
|
||||
karya_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_karya',
|
||||
@@ -79,7 +79,7 @@ var GELKaryaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -98,7 +98,7 @@ var GELKaryaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
ocKarya: function() {
|
||||
ocKarya() {
|
||||
this.data_query('master');
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -14,7 +14,7 @@ var GELKeluarJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -23,7 +23,7 @@ var GELKeluarJS = {
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_brow: function(){
|
||||
tx_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowTX"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var GELKeluarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var GELKeluarJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var GELKeluarJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Total_Item').val()==0){
|
||||
FoniaJS.showError("Belum ada Item Jurnal!");
|
||||
return false;
|
||||
@@ -92,14 +92,14 @@ var GELKeluarJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Kode_Jurnal').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
cek_awal: function(){
|
||||
cek_awal() {
|
||||
/*if (GEL_Kunci($('Tanggal').get('value'))) {
|
||||
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ var GELKeluarJS = {
|
||||
return true;
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
if (!this.cek_awal()) return false;
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowRek"> </div>');
|
||||
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
|
||||
@@ -131,12 +131,12 @@ var GELKeluarJS = {
|
||||
});
|
||||
},
|
||||
|
||||
rek_select: function(acell){
|
||||
rek_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBRek);
|
||||
this.detail_rek('insert', 0, acell[0]);
|
||||
},
|
||||
|
||||
detail_rek: function(mode, ID, Kode_Rek){
|
||||
detail_rek(mode, ID, Kode_Rek) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
|
||||
@@ -158,16 +158,16 @@ var GELKeluarJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if (!this.cek_awal()) return false;
|
||||
this.detail_rek('insert', 0, 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_rek('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -176,7 +176,7 @@ var GELKeluarJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
|
||||
return;
|
||||
@@ -191,7 +191,7 @@ var GELKeluarJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())];
|
||||
@@ -253,7 +253,7 @@ var GELKeluarJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Rek_Comp: function(item){
|
||||
Rek_Comp(item) {
|
||||
$('#Kode_Rek').val(item.value);
|
||||
FoniaJS.setFocus('#Jumlah');
|
||||
}
|
||||
|
||||
+11
-11
@@ -14,21 +14,21 @@ var GELPiutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butMode').click(() => this.tx_mode());
|
||||
$('#butBatal').click(() => this.tx_batal());
|
||||
if (FoniaJS.User.Level>0) $('#butMode').hide();
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_mode: function(){
|
||||
tx_mode() {
|
||||
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
|
||||
$('#Mode_Tampil').val(mode);
|
||||
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
$('#divTXNota').removeClass('d-none');
|
||||
$('#divDetailNota').addClass('d-none');
|
||||
$('#divDetailBayar').addClass('d-none');
|
||||
@@ -39,7 +39,7 @@ var GELPiutangJS = {
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
buyer_brow: function(){
|
||||
buyer_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Buyer" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowBuyer"> </div>');
|
||||
this.winBBuyer = FoniaJS.showWindow('BBuyer', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBBuyer')
|
||||
@@ -57,7 +57,7 @@ var GELPiutangJS = {
|
||||
});
|
||||
},
|
||||
|
||||
buyer_select: function(acell){
|
||||
buyer_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBBuyer);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[2]);
|
||||
@@ -65,7 +65,7 @@ var GELPiutangJS = {
|
||||
this.data_query('tabel-nota');
|
||||
},
|
||||
|
||||
nota_select: function(acell){
|
||||
nota_select(acell) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_nota',
|
||||
sendParam: ['No_Jual='+acell[1],'Tipe_Nota='+acell[0]],
|
||||
@@ -83,7 +83,7 @@ var GELPiutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_show: function(){
|
||||
bayar_show() {
|
||||
new Request({
|
||||
url: this.PHP + '/form_bayar',
|
||||
sendParam: ['No_Jual','Total_Sisa'],
|
||||
@@ -96,7 +96,7 @@ var GELPiutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
bayar_hapus: function(acell){
|
||||
bayar_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_bayar',
|
||||
@@ -105,7 +105,7 @@ var GELPiutangJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
bayar_simpan: function(){
|
||||
bayar_simpan() {
|
||||
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
|
||||
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
|
||||
return;
|
||||
@@ -117,7 +117,7 @@ var GELPiutangJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
new Request({
|
||||
url: this.PHP + '/form_master',
|
||||
@@ -153,7 +153,7 @@ var GELPiutangJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
Member_Comp(item) {
|
||||
$('#MemberID').val(item.value);
|
||||
$('#Alamat_Member').val(item.data);
|
||||
GELPiutangJS.data_query('tabel-nota');
|
||||
|
||||
+18
-18
@@ -14,7 +14,7 @@ var GELTerimaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());
|
||||
$('#butHapus').click(() => this.tx_hapus());
|
||||
@@ -23,7 +23,7 @@ var GELTerimaJS = {
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_brow: function(){
|
||||
tx_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowTX"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -41,17 +41,17 @@ var GELTerimaJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ var GELTerimaJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -83,7 +83,7 @@ var GELTerimaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Total_Item').val()==0){
|
||||
FoniaJS.showError("Belum ada Item Jurnal!");
|
||||
return false;
|
||||
@@ -92,14 +92,14 @@ var GELTerimaJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Kode_Jurnal').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
cek_awal: function(){
|
||||
cek_awal() {
|
||||
/*if (GEL_Kunci($('Tanggal').get('value'))) {
|
||||
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ var GELTerimaJS = {
|
||||
return true;
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
if (!this.cek_awal()) return false;
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowRek"> </div>');
|
||||
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
|
||||
@@ -131,12 +131,12 @@ var GELTerimaJS = {
|
||||
});
|
||||
},
|
||||
|
||||
rek_select: function(acell){
|
||||
rek_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBRek);
|
||||
this.detail_rek('insert', 0, acell[0]);
|
||||
},
|
||||
|
||||
detail_rek: function(mode, ID, Kode_Rek){
|
||||
detail_rek(mode, ID, Kode_Rek) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
|
||||
@@ -158,16 +158,16 @@ var GELTerimaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if (!this.cek_awal()) return false;
|
||||
this.detail_rek('insert', 0, 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_rek('update', acell[0], acell[1]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -176,7 +176,7 @@ var GELTerimaJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
|
||||
return;
|
||||
@@ -191,7 +191,7 @@ var GELTerimaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())];
|
||||
@@ -253,7 +253,7 @@ var GELTerimaJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Rek_Comp: function(item){
|
||||
Rek_Comp(item) {
|
||||
$('#Kode_Rek').val(item.value);
|
||||
FoniaJS.setFocus('#Jumlah');
|
||||
}
|
||||
|
||||
+18
-18
@@ -14,7 +14,7 @@ var GELUmumJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
index(q) {
|
||||
$('#butTambah').click(() => this.tx_tambah());
|
||||
$('#butUbah').click(() => this.tx_ubah());$('#butHapus').click(() => this.tx_hapus());
|
||||
$('#butSimpan').click(() => this.tx_simpan());
|
||||
@@ -22,7 +22,7 @@ var GELUmumJS = {
|
||||
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
tx_brow: function(){
|
||||
tx_brow() {
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_TX" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowTX"> </div>');
|
||||
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
|
||||
$('#winBTX')
|
||||
@@ -40,17 +40,17 @@ var GELUmumJS = {
|
||||
});
|
||||
},
|
||||
|
||||
tx_select: function(acell){
|
||||
tx_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBTX);
|
||||
$('#Kode_Jurnal').val(acell[0]);
|
||||
this.data_query('master', 'view');
|
||||
},
|
||||
|
||||
tx_tambah: function(){
|
||||
tx_tambah() {
|
||||
this.data_query('master', 'add');
|
||||
},
|
||||
|
||||
tx_ubah: function(){
|
||||
tx_ubah() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ var GELUmumJS = {
|
||||
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
|
||||
},
|
||||
|
||||
tx_hapus: function(){
|
||||
tx_hapus() {
|
||||
if (!$('#Kode_Jurnal').val()){
|
||||
FoniaJS.showError("Silakan masukkan Kode Jurnal !");
|
||||
return;
|
||||
@@ -82,7 +82,7 @@ var GELUmumJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
tx_simpan: function(){
|
||||
tx_simpan() {
|
||||
if ($('#Total_Item').val()==0){
|
||||
FoniaJS.showError("Belum ada Item Jurnal!");
|
||||
return false;
|
||||
@@ -95,14 +95,14 @@ var GELUmumJS = {
|
||||
this.data_query('master', 'save');
|
||||
},
|
||||
|
||||
tx_batal: function(){
|
||||
tx_batal() {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
|
||||
this.data_query('master', 'cancel');
|
||||
$('#Kode_Jurnal').val('');
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
cek_awal: function(){
|
||||
cek_awal() {
|
||||
/*if (GEL_Kunci($('Tanggal').get('value'))) {
|
||||
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
|
||||
return false;
|
||||
@@ -115,7 +115,7 @@ var GELUmumJS = {
|
||||
return true;
|
||||
},
|
||||
|
||||
rek_brow: function(){
|
||||
rek_brow() {
|
||||
if (!this.cek_awal()) return false;
|
||||
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Rek" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowRek"> </div>');
|
||||
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
|
||||
@@ -134,12 +134,12 @@ var GELUmumJS = {
|
||||
});
|
||||
},
|
||||
|
||||
rek_select: function(acell){
|
||||
rek_select(acell) {
|
||||
FoniaJS.closeWindow(this.winBRek);
|
||||
this.detail_rek('insert', 0, acell[0], 'D');
|
||||
},
|
||||
|
||||
detail_rek: function(mode, ID, Kode_Rek, DK){
|
||||
detail_rek(mode, ID, Kode_Rek, DK) {
|
||||
new Request({
|
||||
url: this.PHP + '/form_rek',
|
||||
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek,'DK='+DK],
|
||||
@@ -161,16 +161,16 @@ var GELUmumJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
detail_tambah() {
|
||||
if (!this.cek_awal()) return false;
|
||||
this.detail_rek('insert', 0, 0, 'D');
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
detail_ubah(acell) {
|
||||
this.detail_rek('update', acell[0], acell[1], acell[3]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
detail_hapus(acell) {
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
@@ -179,7 +179,7 @@ var GELUmumJS = {
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
detail_simpan() {
|
||||
if (parseInt($('#Kode_Rek').val())==0) {
|
||||
FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
|
||||
return;
|
||||
@@ -194,7 +194,7 @@ var GELUmumJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
data_query(tipe, mode, kd_tx) {
|
||||
if (tipe=="master"){
|
||||
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
|
||||
if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Catatan='+encodeURIComponent($('#Catatan').val())];
|
||||
@@ -256,7 +256,7 @@ var GELUmumJS = {
|
||||
}
|
||||
},
|
||||
|
||||
Rek_Comp: function(item){
|
||||
Rek_Comp(item) {
|
||||
$('#Kode_Rek').val(item.value);
|
||||
FoniaJS.setFocus('#Jumlah');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user