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:
2026-11-01 14:57:54 +07:00
parent be2091eddd
commit aaaf0a9215
92 changed files with 749 additions and 749 deletions
+8 -8
View File
@@ -14,34 +14,34 @@ var DISPConfigJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butBrow').click(() => this.cab_brow());
$('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save());
this.data_query('form-display');
},
cab_brow: function(){
cab_brow() {
var _isi = new String('<div id="divBrowCab">&nbsp;</div>');
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', _isi, 'lg', '', () => this.data_query('brow-cabang'));
},
cab_select: function(acell){
cab_select(acell) {
FoniaJS.closeWindow(this.winBCab);
$('#REG_ID').val(acell[0]);
this.data_query('form-display', 'view');
},
proses_edit: function(){
proses_edit() {
this.data_query('form-display', 'edit');
this.load_port();
},
proses_save: function(){
proses_save() {
this.data_query('form-display', 'save');
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=='form-display'){
new Request({
url: this.PHP + '/form_display',
@@ -60,7 +60,7 @@ var DISPConfigJS = {
}
},
update_event: function(){
update_event() {
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$('#butBrow').prop('disabled', true);
$('#butUbah').prop('disabled', true);
@@ -72,7 +72,7 @@ var DISPConfigJS = {
}
},
load_port: function(){
load_port() {
var parent = this;
qz.serial.findPorts().then(function(data){
var _selport = $('#POLE_PORT').val();
+8 -8
View File
@@ -14,7 +14,7 @@ var DISPIklanJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Iklan').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var DISPIklanJS = {
FoniaJS.setFocus('#Cari_Iklan');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_iklan',
sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -63,15 +63,15 @@ var DISPIklanJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -81,7 +81,7 @@ var DISPIklanJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PromoID','CabID','Tanggal','Info','Aktif','Cari_Iklan'],
@@ -92,7 +92,7 @@ var DISPIklanJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -101,7 +101,7 @@ var DISPIklanJS = {
}
},
get_picture: function(){
get_picture() {
new Request({
url: this.PHP + '/get_picture',
sendParam: ['PromoID'],
+8 -8
View File
@@ -14,7 +14,7 @@ var DISPPromoJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var DISPPromoJS = {
FoniaJS.setFocus('#Cari_Promo');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -63,15 +63,15 @@ var DISPPromoJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -81,7 +81,7 @@ var DISPPromoJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PromoID','Tanggal','Info','Warna','Font','Aktif','Cari_Promo'],
@@ -92,7 +92,7 @@ var DISPPromoJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -101,7 +101,7 @@ var DISPPromoJS = {
}
},
get_picture: function(){
get_picture() {
new Request({
url: this.PHP + '/get_picture',
sendParam: ['PromoID'],
+21 -21
View File
@@ -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">&nbsp;</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">&nbsp;</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
View File
@@ -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">&nbsp;</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');
+8 -8
View File
@@ -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
View File
@@ -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">&nbsp;</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">&nbsp;</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
View File
@@ -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">&nbsp;</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
View File
@@ -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">&nbsp;</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">&nbsp;</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
View File
@@ -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">&nbsp;</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">&nbsp;</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');
}
+4 -4
View File
@@ -50,7 +50,7 @@ socket.on('super-data', (adata) => {
var IndexJS = {
index: function(){
index() {
new Request({
url: 'index/index',
sendParam: [],
@@ -66,7 +66,7 @@ var IndexJS = {
}).send();
},
get_picture: function(){
get_picture() {
new Request({
url: 'system/profile/get_picture',
onSuccess: (ajson) => {
@@ -75,13 +75,13 @@ var IndexJS = {
}).send();
},
load_chart: function(){
load_chart() {
this.data_query('chart-sale');
this.data_query('chart-omzet');
this.data_query('tabel-stok');
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="chart-sale"){
new Request({
url: 'index/chart_sale',
+26 -26
View File
@@ -14,7 +14,7 @@ var BeliJS = {
PHP: '',
KODE: '',
index: function(q){
index(q) {
$('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus());
@@ -26,7 +26,7 @@ var BeliJS = {
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">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -43,17 +43,17 @@ var BeliJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_Beli').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_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -65,7 +65,7 @@ var BeliJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -89,7 +89,7 @@ var BeliJS = {
}, 'danger');
},
tx_simpan: function(mode){
tx_simpan(mode) {
if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !");
return;
@@ -109,14 +109,14 @@ var BeliJS = {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_Beli').val('');
}, 'danger');
},
tx_print: function(prt){
tx_print(prt) {
if ($('#No_Beli').val()) {
var cetak = new Printer('report/nota/beli');
cetak.add_param("Nomor_Cetak", $('#No_Beli').val());
@@ -126,18 +126,18 @@ var BeliJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
pending_brow: function(){
pending_brow() {
var _isi = new String('<div id="divBrowPending">&nbsp;</div>');
this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Pembelian', _isi, 'xl', '', () => this.data_query('brow-pending'));
},
pending_select: function(acell){
pending_select(acell) {
FoniaJS.closeWindow(this.winBPending);
$('#No_Beli').val(acell[0]);
this.data_query('master', 'pending-edit');
},
pending_delete: function(acell){
pending_delete(acell) {
FoniaJS.closeWindow(this.winBPending);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Beli').val(acell[0]);
@@ -145,7 +145,7 @@ var BeliJS = {
}, 'danger');
},
produk_brow: function(){
produk_brow() {
if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !");
return;
@@ -173,12 +173,12 @@ var BeliJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
},
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){
detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -236,7 +236,7 @@ var BeliJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !");
return;
@@ -244,11 +244,11 @@ var BeliJS = {
this.detail_produk('insert', 0, 0, 0, 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -261,7 +261,7 @@ var BeliJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !');
return;
@@ -278,7 +278,7 @@ var BeliJS = {
}).send();
},
total_show: function(){
total_show() {
if (['add','edit'].indexOf($('#mode').val()) == -1) return false;
new Request({
url: this.PHP + '/form_total',
@@ -302,14 +302,14 @@ var BeliJS = {
}).send();
},
total_simpan: function(){
total_simpan() {
$('#Real_Diskon').val(FoniaJS.StrToFloat($('#popTotal_Diskon').val()));
$('#Real_Beli').val(FoniaJS.StrToFloat($('#popTotal_Beli').val()));
$('#tombolTotal').html('<i class="bi-wallet2 me-1"></i>Hutang : '+FoniaJS.FloatToStr($('#Real_Beli').val(),2));
FoniaJS.closeWindow(this.winTotal);
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -386,7 +386,7 @@ var BeliJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
var adata = item.data.split(':');
$('#InvID').val(item.value);
$('#SatuanID').val(adata[0]);
@@ -398,7 +398,7 @@ var BeliJS = {
BeliJS.update_Items();
},
update_Items: function(){
update_Items() {
new Request({
url: this.PHP + '/item_detail',
sendParam: ['InvID','SatuanID','SupID'],
@@ -419,14 +419,14 @@ var BeliJS = {
}).send();
},
update_Varian: function(){
update_Varian() {
new Request_JSF({
url: this.PHP + '/option_varian',
sendParam: ['InvID','SatuanID','VarianID']
}).send();
},
Hitung_Detail: function(){
Hitung_Detail() {
var dqty = FoniaJS.StrToFloat($('#Qty').val());
var dharga = FoniaJS.StrToFloat($('#Harga_Beli').val());
var ddiskrp = FoniaJS.StrToFloat($('#Disk_Rupiah').val());
+20 -20
View File
@@ -14,7 +14,7 @@ var BeliReturJS = {
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 BeliReturJS = {
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">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -41,17 +41,17 @@ var BeliReturJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_Beli').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_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -59,7 +59,7 @@ var BeliReturJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -83,7 +83,7 @@ var BeliReturJS = {
}, 'danger');
},
tx_simpan: function(){
tx_simpan() {
if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !");
return;
@@ -95,14 +95,14 @@ var BeliReturJS = {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_Beli').val('');
}, 'danger');
},
tx_print: function(prt){
tx_print(prt) {
if ($('#No_Beli').val()) {
var cetak = new Printer('report/nota/beli_retur');
cetak.add_param("Nomor_Cetak", $('#No_Beli').val());
@@ -112,7 +112,7 @@ var BeliReturJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
produk_brow: function(){
produk_brow() {
if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !");
return;
@@ -133,12 +133,12 @@ var BeliReturJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
},
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){
detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -168,7 +168,7 @@ var BeliReturJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !");
return;
@@ -176,11 +176,11 @@ var BeliReturJS = {
this.detail_produk('insert', 0, 0, 0, 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -189,7 +189,7 @@ var BeliReturJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !');
return;
@@ -204,7 +204,7 @@ var BeliReturJS = {
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Beli','Tgl_Beli','No_Faktur','CabID','SupID'];
@@ -261,7 +261,7 @@ var BeliReturJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
var adata = item.data.split(':');
$('#InvID').val(item.value);
$('#SatuanID').val(adata[0]);
@@ -273,14 +273,14 @@ var BeliReturJS = {
FoniaJS.setFocus('#Qty');
},
update_Varian: function(){
update_Varian() {
new Request_JSF({
url: this.PHP + '/option_varian',
sendParam: ['InvID','SatuanID','VarianID']
}).send();
},
Hitung_Detail: function(){
Hitung_Detail() {
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
}
+7 -7
View File
@@ -15,7 +15,7 @@ var CekHargaJS = {
KODE: '',
html5QrcodeScanner: null,
index: function(){
index() {
$('#butBrow').click(() => this.produk_brow());
if (FoniaJS.WEB_MOBILE){
html5QrcodeScanner = new Html5Qrcode('qr-reader');
@@ -26,7 +26,7 @@ var CekHargaJS = {
}
},
ScanSukses: function(decodedText, decodedResult){
ScanSukses(decodedText, decodedResult) {
new Request({
url: CekHargaJS.PHP + '/scan_produk',
sendParam: ['Cari_Produk='+decodedText],
@@ -41,7 +41,7 @@ var CekHargaJS = {
}).send();
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk')
@@ -58,7 +58,7 @@ var CekHargaJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]);
$('#Kode_Barang').val(acell[1]+' / '+acell[2]);
@@ -68,7 +68,7 @@ var CekHargaJS = {
this.update_Sup();
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-produk"){
new Request_JSF({
url: this.PHP + '/brow_produk',
@@ -78,7 +78,7 @@ var CekHargaJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
var adata = item.data.split(':');
$('#InvID').val(item.value);
$('#Nama_Barang').val(item.text);
@@ -89,7 +89,7 @@ var CekHargaJS = {
CekHargaJS.update_Sup();
},
update_Sup: function(){
update_Sup() {
if (parseInt($('#InvID').val()) == 0) return false;
new Request_JSF({
url: this.PHP + '/update_sup',
+26 -26
View File
@@ -14,7 +14,7 @@ var JualJS = {
PHP: '',
KODE: '',
index: function(q){
index(q) {
$('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus());
@@ -27,7 +27,7 @@ var JualJS = {
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">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -44,17 +44,17 @@ var JualJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_Jual').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_Jual').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -66,7 +66,7 @@ var JualJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Jual').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_Jual').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -90,7 +90,7 @@ var JualJS = {
}, 'danger');
},
tx_simpan: function(mode){
tx_simpan(mode) {
if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !");
return;
@@ -102,14 +102,14 @@ var JualJS = {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_Jual').val('');
}, 'danger');
},
tx_print: function(prt){
tx_print(prt) {
if ($('#No_Jual').val()) {
var cetak = new Printer('report/nota/jual');
cetak.add_param("Nomor_Cetak", $('#No_Jual').val());
@@ -119,7 +119,7 @@ var JualJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
tx_print_pos: function(){
tx_print_pos() {
if ($('#No_Jual').val()) {
var cetak = new PrinterPos('report/nota/pos');
cetak.add_param("Nomor_Cetak", $('#No_Jual').val());
@@ -129,17 +129,17 @@ var JualJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
pending_brow: function(){
pending_brow() {
this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Penjualan', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending'));
},
pending_select: function(acell){
pending_select(acell) {
FoniaJS.closeWindow(this.winBPending);
$('#No_Jual').val(acell[0]);
this.data_query('master', 'pending-edit');
},
pending_delete: function(acell){
pending_delete(acell) {
FoniaJS.closeWindow(this.winBPending);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Jual').val(acell[0]);
@@ -147,7 +147,7 @@ var JualJS = {
}, 'danger');
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -164,7 +164,7 @@ var JualJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Grup_MemberID').val(acell[1]);
@@ -172,7 +172,7 @@ var JualJS = {
this.update_Piutang();
},
produk_brow: function(){
produk_brow() {
if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !");
return;
@@ -193,12 +193,12 @@ var JualJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
},
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){
detail_produk(mode, ID, InvID, SatuanID, VarianID) {
if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member');
@@ -231,11 +231,11 @@ var JualJS = {
}).send();
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -245,7 +245,7 @@ var JualJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
FoniaJS.showInfo('Nilai Diskon diluar batas !');
return false;
@@ -260,7 +260,7 @@ var JualJS = {
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Jual'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -353,13 +353,13 @@ var JualJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
$('#Grup_MemberID').val(item.data);
JualJS.update_Piutang();
},
Produk_Comp: function(item){
Produk_Comp(item) {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':');
// M : Grup_Member
@@ -385,7 +385,7 @@ var JualJS = {
$('#Nama_Produk').val('').focus();
},
update_Piutang: function(){
update_Piutang() {
new Request_JSF({
url: this.PHP + '/update_piutang',
sendParam: ['MemberID'],
@@ -393,7 +393,7 @@ var JualJS = {
}).send();
},
Hitung_Detail: function(tipe){
Hitung_Detail(tipe) {
if (tipe==1) $('#Disk_Persen').val(FoniaJS.FloatToStr((FoniaJS.StrToFloat($('#Disk_Rupiah').val())*100) / FoniaJS.StrToFloat($('#Harga_Jual').val()), 2));
if (tipe==2) $('#Disk_Rupiah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Jual').val()) * FoniaJS.StrToFloat($('#Disk_Persen').val()) * 0.01, 2));
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2));
+19 -19
View File
@@ -14,7 +14,7 @@ var MutasiJS = {
PHP: '',
KODE: '',
index: function(q){
index(q) {
$('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus());
@@ -25,7 +25,7 @@ var MutasiJS = {
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">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -42,17 +42,17 @@ var MutasiJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_Mutasi').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_Mutasi').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -60,7 +60,7 @@ var MutasiJS = {
FoniaJS.showAuth(function(){this.data_query('master', 'edit')}.bind(this), this, 'EDIT '+$('#No_Mutasi').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_Mutasi').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -84,7 +84,7 @@ var MutasiJS = {
}, 'danger');
},
tx_simpan: function(){
tx_simpan() {
if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !");
return;
@@ -100,14 +100,14 @@ var MutasiJS = {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_Mutasi').val('');
}, 'danger');
},
tx_print: function(prt){
tx_print(prt) {
if ($('#No_Mutasi').val()) {
var cetak = new Printer('report/nota/mutasi');
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val());
@@ -117,7 +117,7 @@ var MutasiJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
tx_print_pos: function(){
tx_print_pos() {
if ($('#No_Mutasi').val()) {
var cetak = new PrinterPos('report/nota/mutasi_pos');
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val());
@@ -127,7 +127,7 @@ var MutasiJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
produk_brow: function(){
produk_brow() {
if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !");
return;
@@ -148,12 +148,12 @@ var MutasiJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
},
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){
detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Mutasi','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -174,11 +174,11 @@ var MutasiJS = {
}).send();
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -188,7 +188,7 @@ var MutasiJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Mutasi','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Dari_CabID','Ke_CabID'],
@@ -199,7 +199,7 @@ var MutasiJS = {
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
var sparam = ['mode='+mode,'No_Mutasi'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Mutasi','Tgl_Mutasi','Dari_CabID','Ke_CabID','Catatan'];
@@ -268,7 +268,7 @@ var MutasiJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !");
return;
@@ -284,7 +284,7 @@ var MutasiJS = {
$('#Nama_Produk').val('').focus();
},
Hitung_Detail: function(){
Hitung_Detail() {
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
}
+18 -18
View File
@@ -14,7 +14,7 @@ var OpnameJS = {
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 OpnameJS = {
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">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -41,17 +41,17 @@ var OpnameJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_Opname').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_Opname').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -59,7 +59,7 @@ var OpnameJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Opname').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_Opname').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -83,7 +83,7 @@ var OpnameJS = {
}, 'danger');
},
tx_simpan: function(){
tx_simpan() {
if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !");
return;
@@ -91,14 +91,14 @@ var OpnameJS = {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_Opname').val('');
}, 'danger');
},
tx_print: function(prt){
tx_print(prt) {
if ($('#No_Opname').val()) {
var cetak = new Printer('report/nota/opname');
cetak.add_param("Nomor_Cetak", $('#No_Opname').val());
@@ -108,7 +108,7 @@ var OpnameJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
produk_brow: function(){
produk_brow() {
if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !");
return;
@@ -129,12 +129,12 @@ var OpnameJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]);
},
detail_produk: function(mode, ID, InvID, SatuanID, VarianID){
detail_produk(mode, ID, InvID, SatuanID, VarianID) {
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Opname','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianIID='+VarianID],
@@ -157,7 +157,7 @@ var OpnameJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !");
return;
@@ -165,11 +165,11 @@ var OpnameJS = {
this.detail_produk('insert', 0, 0, 0, 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -178,7 +178,7 @@ var OpnameJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !');
return;
@@ -193,7 +193,7 @@ var OpnameJS = {
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
var sparam = ['mode='+mode,'No_Opname'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Opname','Tgl_Opname','CabID','Catatan'];
@@ -250,7 +250,7 @@ var OpnameJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
var adata = item.data.split(':');
// Satuan : Varian : Harga_Pokok : Satuan : Stok
$('#InvID').val(item.value);
+7 -7
View File
@@ -15,7 +15,7 @@ var OpnameBarangJS = {
KODE: '',
html5QrcodeScanner: null,
index: function(){
index() {
$('#butSimpan').click(() => this.proses_save());
$('#butBrow').click(() => this.produk_brow());
if (FoniaJS.WEB_MOBILE){
@@ -28,7 +28,7 @@ var OpnameBarangJS = {
}
},
proses_save: function(){
proses_save() {
if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Produk!');
return;
@@ -50,7 +50,7 @@ var OpnameBarangJS = {
}).send();
},
ScanSukses: function(decodedText, decodedResult){
ScanSukses(decodedText, decodedResult) {
new Request({
url: OpnameBarangJS.PHP + '/scan_produk',
sendParam: ['Cari_Produk='+decodedText],
@@ -70,7 +70,7 @@ var OpnameBarangJS = {
this.html5QrcodeScanner.pause();
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk')
@@ -87,7 +87,7 @@ var OpnameBarangJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]);
$('#SatuanID').val(acell[1]);
@@ -101,7 +101,7 @@ var OpnameBarangJS = {
FoniaJS.setFocus('#Stok_Fisik');
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-produk"){
new Request_JSF({
url: this.PHP + '/brow_produk',
@@ -111,7 +111,7 @@ var OpnameBarangJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
// Cari by SKU + Barcode
// Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok
var adata = item.data.split(':');
+2 -2
View File
@@ -43,7 +43,7 @@ $(document).ready(function(){
var LoginJS = {
Tampil_Login: function(){
Tampil_Login() {
var Username = FoniaJS.getCookie('Username');
if (Username != '') {
$('#Username').val(Username);
@@ -53,7 +53,7 @@ var LoginJS = {
}
},
Proses_Login: function(){
Proses_Login() {
if (!$('#Username').val()){
$('#Username').focus();
FoniaJS.showError('Silahkan masukkan Username !');
+4 -4
View File
@@ -14,17 +14,17 @@ var MemberBaruJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butTambah').click(() => this.proses_add());
$('#butSimpan').click(() => this.proses_save());
this.data_query('view');
},
proses_add: function(){
proses_add() {
this.data_query('add');
},
proses_save: function(){
proses_save() {
new Request({
url: this.PHP + '/proses_simpan',
sendParam: ['MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar'],
@@ -39,7 +39,7 @@ var MemberBaruJS = {
}).send()
},
data_query: function(mode){
data_query(mode) {
new Request({
url: this.PHP + '/form_master',
sendParam: ['mode='+mode],
+6 -6
View File
@@ -15,7 +15,7 @@ var MemberPointJS = {
KODE: '',
html5QrcodeScanner: null,
index: function(){
index() {
$('#butBrow').click(() => this.member_brow());
if (FoniaJS.WEB_MOBILE){
html5QrcodeScanner = new Html5Qrcode('qr-reader');
@@ -27,7 +27,7 @@ var MemberPointJS = {
this.data_query('table-point');
},
ScanSukses: function(decodedText, decodedResult){
ScanSukses(decodedText, decodedResult) {
new Request({
url: MemberPointJS.PHP + '/scan_member',
sendParam: ['Cari_Member='+decodedText],
@@ -41,7 +41,7 @@ var MemberPointJS = {
}).send();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -58,7 +58,7 @@ var MemberPointJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Kode_Member').val(acell[1]);
@@ -67,7 +67,7 @@ var MemberPointJS = {
this.data_query('table-point');
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="table-point"){
new Request_JSF({
url: this.PHP + '/table_point',
@@ -82,7 +82,7 @@ var MemberPointJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
var adata = item.data.split(':');
$('#MemberID').val(item.value);
$('#Kode_Member').val(adata[0]);
+18 -18
View File
@@ -14,7 +14,7 @@ var MemberTukarJS = {
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 MemberTukarJS = {
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">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -41,17 +41,17 @@ var MemberTukarJS = {
});
},
tx_select: function(acell){
tx_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#No_TX').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_TX').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -59,7 +59,7 @@ var MemberTukarJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_TX').val());
},
tx_hapus: function(){
tx_hapus() {
if (!$('#No_TX').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return;
@@ -83,7 +83,7 @@ var MemberTukarJS = {
}, 'danger');
},
tx_simpan: function(){
tx_simpan() {
if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !");
return;
@@ -109,14 +109,14 @@ var MemberTukarJS = {
this.data_query('master', 'save');
},
tx_batal: function(){
tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#No_TX').val('');
}, 'danger');
},
tx_print: function(){
tx_print() {
if ($('#No_TX').val()) {
var cetak = new PrinterPos('report/nota/tukarpoint_pos');
cetak.add_param("Nomor_Cetak", $('#No_TX').val());
@@ -126,7 +126,7 @@ var MemberTukarJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
},
member_brow: function(){
member_brow() {
if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !");
return;
@@ -147,14 +147,14 @@ var MemberTukarJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[3]);
$('#Sisa_Point').val(acell[6]);
},
barang_brow: function(){
barang_brow() {
if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !");
return;
@@ -175,7 +175,7 @@ var MemberTukarJS = {
});
},
barang_select: function(acell){
barang_select(acell) {
FoniaJS.closeWindow(this.winBBarang);
$('#InvPID').val(acell[0]);
$('#Nama_Barang').val(acell[2]);
@@ -185,7 +185,7 @@ var MemberTukarJS = {
this.Hitung_Point();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -257,13 +257,13 @@ var MemberTukarJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
$('#Sisa_Point').val(item.data);
$('#Nama_Barang').focus();
},
Barang_Comp: function(item){
Barang_Comp(item) {
var adata = item.data.split(':');
$('#InvPID').val(item.value);
$('#Nilai_Barang').val(adata[1]);
@@ -273,11 +273,11 @@ var MemberTukarJS = {
this.Hitung_Point();
},
oc_Tipe: function(){
oc_Tipe() {
//
},
Hitung_Point: function(){
Hitung_Point() {
var qty = FoniaJS.StrToFloat($('#Qty').val());
var point = FoniaJS.StrToFloat($('#Point').val());
$('#Nilai_Point').val(FoniaJS.FloatToStr(qty * point,0));
+6 -6
View File
@@ -56,7 +56,7 @@ var MonJS = {
ID_CABANG: 0,
TOTAL_SHOP: 0,
index: function(){
index() {
new Request({
url: this.PHP + '/index',
onSuccess: (ajson) => {
@@ -70,31 +70,31 @@ var MonJS = {
}).send();
},
hide_pos: function(){
hide_pos() {
this.ISSHOW_POS = false;
$('#divBanner').removeClass('d-none');
$('#divShop').addClass('d-none');
},
show_pos: function(){
show_pos() {
this.ISSHOW_POS = true;
$('#divBanner').addClass('d-none');
$('#divShop').removeClass('d-none');
this.data_query('shop');
},
hide_thank: function(){
hide_thank() {
$('#divBlur').addClass('d-none');
$('#divThank').addClass('d-none');
},
show_thank: function(){
show_thank() {
$('#divBlur').removeClass('d-none');
$('#divThank').removeClass('d-none');
this.data_query('thank');
},
data_query: function(tipe){
data_query(tipe) {
if (tipe == 'config'){
$.post(this.PHP + '/config', {}, (ajson) => {
if (ajson.PROMO_DURASI) MonJS.DEF_PROMO_DUR = ajson.PROMO_DURASI;
+10 -10
View File
@@ -14,7 +14,7 @@ var PPOBTXJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('tabel-detail');
$('#Cari_TX').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,44 +28,44 @@ var PPOBTXJS = {
FoniaJS.setFocus('#Cari_TX');
},
proses_print: function(oc, no_cetak){
proses_print(oc, no_cetak) {
var cetak = new PrinterPos('report/nota/ppob');
cetak.add_param("Nomor_Cetak", no_cetak);
cetak.add_param("Open_Cash", oc);
cetak.exec();
},
proses_delete: function(no_tx){
proses_delete(no_tx) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send();
},
proses_reproc: function(no_tx){
proses_reproc(no_tx) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send();
},
nota_print: function(acell){
nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]);
}, 'info');
},
nota_delete: function(acell){
nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
}, 'danger');
},
nota_reproc: function(acell){
nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
},
nota_detail: function(acell){
nota_detail(acell) {
new Request({
url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]],
@@ -75,7 +75,7 @@ var PPOBTXJS = {
}).send();
},
saldo_ppob: function(){
saldo_ppob() {
new Request({
url: this.PHP + '/form_saldo',
onSuccess: (adata) => {
@@ -85,7 +85,7 @@ var PPOBTXJS = {
}).send();
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="tabel-detail"){
new Request_JSF({
url: this.PHP + '/table_tx',
+17 -17
View File
@@ -19,7 +19,7 @@ var PrabayarJS = {
KATE_PREFIX: [1,2,3,4],
KATE_TOKEN: [5],
index: function(){
index() {
$('#Cari_PPOB').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('tabel-tx');
@@ -34,7 +34,7 @@ var PrabayarJS = {
this.data_query('pole-config');
},
proses_print: function(oc, no_cetak){
proses_print(oc, no_cetak) {
var cetak = new PrinterPos('apps/php/repo/nota.php');
cetak.add_param("data", "ppob-pos");
cetak.add_param("Nomor_Cetak", no_cetak);
@@ -42,31 +42,31 @@ var PrabayarJS = {
cetak.exec();
},
proses_delete: function(){
proses_delete() {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX']
}).send();
},
proses_reproc: function(ft){
proses_reproc(ft) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX','FT='+ft]
}).send();
},
proses_cancel: function(){
proses_cancel() {
FoniaJS.showConfirm('Konfirmasi', 'Apakah Anda yakin ingin membatalkan ?', () => this.data_query('master','cancel'), 'danger');
},
nota_print: function(acell){
nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]);
}, 'info');
},
nota_delete: function(acell){
nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => {
$('#No_TX').val(acell[0]);
@@ -75,14 +75,14 @@ var PrabayarJS = {
}, 'danger');
},
nota_reproc: function(acell){
nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => {
$('#No_TX').val(acell[0]);
this.proses_reproc();
}, 'warning');
},
nota_detail: function(acell){
nota_detail(acell) {
new Request({
url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]],
@@ -92,7 +92,7 @@ var PrabayarJS = {
}).send();
},
kasir_show: function(){
kasir_show() {
if ($('#Tujuan').val()=='') {
FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !');
FoniaJS.setFocus('#Tujuan');
@@ -163,14 +163,14 @@ var PrabayarJS = {
}).send();
},
kasir_hitung: function(){
kasir_hitung() {
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
$('#popTotal_Bayar').val(totBayar);
$('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success');
},
kasir_simpan: function(){
kasir_simpan() {
const totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val());
const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const jenKartu = $('#popKartuID').val();
@@ -203,7 +203,7 @@ var PrabayarJS = {
this.data_query('master', 'save');
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=='master'){
mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX'];
@@ -266,7 +266,7 @@ var PrabayarJS = {
}
},
oc_KateID: function(){
oc_KateID() {
if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) {
$('.rowToken').removeClass('d-none');
$('.rowPulsa').addClass('d-none');
@@ -280,7 +280,7 @@ var PrabayarJS = {
}).send();
},
oc_Tujuan: function(){
oc_Tujuan() {
if ($('#Tujuan').val()=='') return false;
if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false;
new Request_JSF({
@@ -289,7 +289,7 @@ var PrabayarJS = {
}).send();
},
oc_OpeID: function(){
oc_OpeID() {
if ($('#OpeID').val()==0) return false;
new Request_JSF({
url: this.PHP + '/option_produk',
@@ -297,7 +297,7 @@ var PrabayarJS = {
}).send();
},
oc_ProdukID: function(){
oc_ProdukID() {
const obj = $('#ProdukID');
var harga = $(obj).find(":selected").attr('olabel');
$('#Harga_Jual').val(harga);
+5 -5
View File
@@ -14,7 +14,7 @@ var TopupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('tabel-detail');
$('#butTambah').click(() => this.tx_tambah());
$('#Cari_Topup').keydown((e) => {
@@ -29,11 +29,11 @@ var TopupJS = {
FoniaJS.setFocus('#Cari_Topup');
},
tx_info: function(acell){
tx_info(acell) {
this.winInfo = FoniaJS.showWindow('', 'Informasi Topup Saldo', '<div class="form-control fs-4">'+acell[6]+'</div>', 'md');
},
tx_tambah: function(){
tx_tambah() {
new Request({
url: this.PHP + '/form_topup',
onSuccess: (a) => {
@@ -46,7 +46,7 @@ var TopupJS = {
}).send();
},
tx_simpan: function(){
tx_simpan() {
if (parseInt($('#Jumlah').val())==0) {
FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !');
$('#Jumlah').focus();
@@ -59,7 +59,7 @@ var TopupJS = {
}).send();
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="tabel-detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+12 -12
View File
@@ -14,7 +14,7 @@ var PromoBarangJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoBarangJS = {
FoniaJS.setFocus('#Cari_Promo');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -49,15 +49,15 @@ var PromoBarangJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_promo',
@@ -67,7 +67,7 @@ var PromoBarangJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_promo',
sendParam: ['mode_detail','PromoID','InvID','SatuanID','CabID','Grup_MemberID','Pilih_Qty','Qty_Min','Qty_Kali','Tipe_Promo','Promo_Disc','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'],
@@ -78,7 +78,7 @@ var PromoBarangJS = {
}).send();
},
produk_brow: function(tipe){
produk_brow(tipe) {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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><input type="hidden" id="Tipe_Brow" value="'+tipe+'" /></div></div></div><div id="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk')
@@ -96,7 +96,7 @@ var PromoBarangJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
var itipe = parseInt($('#Tipe_Brow').val());
if (itipe == 1){
@@ -110,7 +110,7 @@ var PromoBarangJS = {
}
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_promo',
@@ -125,7 +125,7 @@ var PromoBarangJS = {
}
},
update_Items: function(InvID, SatuanID, Tipe){
update_Items(InvID, SatuanID, Tipe) {
const elSatuan = (Tipe==1) ? $('#SatuanID') : $('#Promo_SatuanID');
elSatuan.empty();
if (InvID==0) return false;
@@ -141,7 +141,7 @@ var PromoBarangJS = {
}).send();
},
oc_PilihQ: function(){
oc_PilihQ() {
var i = parseInt($('#Pilih_Qty').val());
if (i == 1){
$('#Qty_Min').prop('disabled', false);
@@ -152,7 +152,7 @@ var PromoBarangJS = {
}
},
oc_PilihP: function(){
oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val());
if (i == 1){
$('.promo1').removeClass('d-none');
+19 -19
View File
@@ -14,7 +14,7 @@ var PromoBeliDiscJS = {
PHP: '',
KODE: '',
index: function(q){
index(q) {
$('#butTambah').click(() => this.promo_tambah());
$('#butUbah').click(() => this.promo_ubah());
$('#butHapus').click(() => this.promo_hapus());
@@ -23,7 +23,7 @@ var PromoBeliDiscJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
},
promo_brow: function(){
promo_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Promo" 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="divBrowPromo">&nbsp;</div>');
this.winBPromo = FoniaJS.showWindow('BPromo', 'Daftar Promo', _isi, 'xl', '', () => {
$('#winBPromo')
@@ -40,17 +40,17 @@ var PromoBeliDiscJS = {
});
},
promo_select: function(acell){
promo_select(acell) {
FoniaJS.closeWindow(this.winBPromo);
$('#Grup_PromoID').val(acell[0]);
this.data_query('master', 'view');
},
promo_tambah: function(){
promo_tambah() {
this.data_query('master', 'add');
},
promo_ubah: function(){
promo_ubah() {
if ($('#Grup_PromoID').val() == 0){
FoniaJS.showError("Silakan pilih Nama Promo !");
return;
@@ -58,7 +58,7 @@ var PromoBeliDiscJS = {
this.data_query('master', 'edit');
},
promo_hapus: function(){
promo_hapus() {
if ($('#Grup_PromoID').val() == 0){
FoniaJS.showError("Silakan pilih Nama Promo !");
return;
@@ -80,18 +80,18 @@ var PromoBeliDiscJS = {
}, 'danger');
},
promo_simpan: function(mode){
promo_simpan(mode) {
this.data_query('master', 'save');
},
promo_batal: function(){
promo_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel');
$('#Grup_PromoID').val(0);
}, 'danger');
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk')
@@ -108,12 +108,12 @@ var PromoBeliDiscJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], '0');
},
detail_produk: function(mode, PromoID, InvID, SatuanID, Kode_Varian){
detail_produk(mode, PromoID, InvID, SatuanID, Kode_Varian) {
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'Grup_PromoID','PromoID='+PromoID,'InvID='+InvID,'SatuanID='+SatuanID,'Kode_Varian='+Kode_Varian],
@@ -132,15 +132,15 @@ var PromoBeliDiscJS = {
}).send();
},
detail_tambah: function() {
detail_tambah() {
this.detail_produk('insert', 0, 0, 0, '0');
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -149,7 +149,7 @@ var PromoBeliDiscJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
if ($('#InvID').val() == 0) {
FoniaJS.showError('Silakan masukkan Nama Barang Promo !');
return;
@@ -161,14 +161,14 @@ var PromoBeliDiscJS = {
}).send();
},
varian_show: function(){
varian_show() {
new Request_JSF({
url: this.PHP + '/form_varian',
sendParam: ['InvID','SatuanID','Kode_Varian']
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="master"){
mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'Grup_PromoID'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -221,13 +221,13 @@ var PromoBeliDiscJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
$('#InvID').val(item.value);
$('#Nama_Produk').val(item.text);
PromoBeliDiscJS.update_items(item.value, item.data);
},
update_items: function(InvID, SatuanID){
update_items(InvID, SatuanID) {
new Request_JSF({
url: this.PHP + '/option_satuan',
sendParam: ['InvID='+InvID,'SatuanID='+SatuanID],
+15 -15
View File
@@ -14,7 +14,7 @@ var PromoTotalJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoTotalJS = {
FoniaJS.setFocus('#Cari_Promo');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -47,15 +47,15 @@ var PromoTotalJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_promo',
@@ -65,7 +65,7 @@ var PromoTotalJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_promo',
sendParam: ['mode_detail','PromoID','Nama_Promo','Jual_Min','Jual_Grup','CabID','Grup_MemberID','Tipe_Promo','Promo_Jual','Promo_InvID','Promo_SatuanID','Promo_Qty','Jumlah_Promo','Tgl_Mulai','Tgl_Akhir','Aktif','Cari_Promo'],
@@ -76,7 +76,7 @@ var PromoTotalJS = {
}).send();
},
grup_show: function(){
grup_show() {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['Jual_Grup'],
@@ -91,15 +91,15 @@ var PromoTotalJS = {
}).send();
},
grup_semua: function(){
grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
},
grup_clear: function(){
grup_clear() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
},
grup_save: function(){
grup_save() {
var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val());
@@ -108,7 +108,7 @@ var PromoTotalJS = {
FoniaJS.closeWindow(this.winGrup);
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk')
@@ -126,14 +126,14 @@ var PromoTotalJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#Promo_InvID').val(acell[0]);
$('#Promo_Produk').val(acell[1]);
this.update_Items(acell[0], 0);
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_promo',
@@ -148,7 +148,7 @@ var PromoTotalJS = {
}
},
update_Items: function(InvID, SatuanID){
update_Items(InvID, SatuanID) {
$('#Promo_SatuanID').empty();
if (InvID==0) return false;
new Request({
@@ -163,7 +163,7 @@ var PromoTotalJS = {
}).send();
},
oc_PilihP: function(){
oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val());
if (i == 4){
$('.promo1').removeClass('d-none');
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliAnalisaJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -31,7 +31,7 @@ var RepoBeliAnalisaJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -31,7 +31,7 @@ var RepoBeliJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliMutasiJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !");
$('#SupID').focus();
@@ -34,7 +34,7 @@ var RepoBeliMutasiJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !");
$('#SupID').focus();
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliReturJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -30,7 +30,7 @@ var RepoBeliReturJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoDanaKeluarJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoDanaKeluarJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoDanaMasukJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoDanaMasukJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+4 -4
View File
@@ -14,14 +14,14 @@ var RepoDanaPosJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butPOS').click(() => this.proses_pos());
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_pos: function(){
proses_pos() {
if ($('#KasirID').val()==0){
FoniaJS.showError("Untuk Cetak POS, pilih satu Nama Kasir !");
$('#KasirID').focus();
@@ -36,7 +36,7 @@ var RepoDanaPosJS = {
cetak.exec();
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -46,7 +46,7 @@ var RepoDanaPosJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBNeracaJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("Bulan");
@@ -29,7 +29,7 @@ var RepoGelBNeracaJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("Bulan");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBRLCabJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID");
cetak.add_param("Bulan1");
@@ -29,7 +29,7 @@ var RepoGelBRLCabJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID");
dload.add_param("Bulan1");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBSaldoJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("Bulan");
@@ -28,7 +28,7 @@ var RepoGelBSaldoJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("Bulan");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBSHUJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Bulan1");
cetak.add_param("Bulan2");
@@ -29,7 +29,7 @@ var RepoGelBSHUJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Bulan1");
dload.add_param("Bulan2");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelHBantuJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Kode_Rek");
cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoGelHBantuJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Kode_Rek");
dload.add_param("Tgl_From");
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoGelHBesarJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -23,7 +23,7 @@ var RepoGelHBesarJS = {
FoniaJS.setFocus('#Nama_Rek');
},
proses_print: function(prt){
proses_print(prt) {
if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Rekening !');
return;
@@ -36,7 +36,7 @@ var RepoGelHBesarJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Rekening !');
return;
@@ -49,7 +49,7 @@ var RepoGelHBesarJS = {
dload.download();
},
rek_brow: function(){
rek_brow() {
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">&nbsp;</div>');
this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
$('#winBRek')
@@ -66,14 +66,14 @@ var RepoGelHBesarJS = {
});
},
rek_select: function(acell){
rek_select(acell) {
FoniaJS.closeWindow(this.winBRek);
$('#Kode_Rek').val(acell[0]);
$('#Nama_Rek').val(acell[1]);
$('#Tgl_From').focus();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="brow-rek"){
new Request_JSF({
url: this.PHP + '/brow_rek',
@@ -83,7 +83,7 @@ var RepoGelHBesarJS = {
}
},
Rek_Comp: function(item){
Rek_Comp(item) {
$('#Kode_Rek').val(item.value);
$('#Tgl_From').focus();
}
+5 -5
View File
@@ -14,7 +14,7 @@ var RepoGelHDetailJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butBrowJurnal').click(() => this.jurnal_brow());
@@ -26,13 +26,13 @@ var RepoGelHDetailJS = {
FoniaJS.setFocus('#Kode_Jurnal');
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Kode_Jurnal");
if (prt) cetak.doPrint(); else cetak.doPreview();
},
jurnal_brow: function(){
jurnal_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Jurnal" 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="divBrowJurnal">&nbsp;</div>');
this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX')
@@ -49,12 +49,12 @@ var RepoGelHDetailJS = {
});
},
jurnal_select: function(acell){
jurnal_select(acell) {
FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]);
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="brow-jurnal"){
new Request_JSF({
url: this.PHP + '/brow_jurnal',
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelHJurnalJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("TipeID");
cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoGelHJurnalJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("TipeID");
dload.add_param("Tgl_From");
+3 -3
View File
@@ -14,20 +14,20 @@ var RepoGelHSaldoJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tgl_From");
cetak.add_param("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tgl_From");
dload.add_param("Tgl_To");
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoInvBarcodeJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print());
$('#butLoadPrinter').click(() => this.load_printer());
$('#butBrowProduk').click(() => this.produk_brow());
@@ -22,7 +22,7 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Nama_Produk');
},
proses_print: function(){
proses_print() {
if ($('#InvID').val() == 0){
FoniaJS.showError('Silakan masukkan Nama Barang !');
FoniaJS.setFocus('Nama_Produk');
@@ -42,7 +42,7 @@ var RepoInvBarcodeJS = {
cetak.exec();
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk')
@@ -59,7 +59,7 @@ var RepoInvBarcodeJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]);
$('#SatuanID').val(acell[1]);
@@ -69,7 +69,7 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Qty');
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-produk"){
new Request_JSF({
url: this.PHP + '/brow_produk',
@@ -79,7 +79,7 @@ var RepoInvBarcodeJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
var adata = item.data.split(':');
$('#InvID').val(item.value);
$('#SatuanID').val(adata[0]);
@@ -89,7 +89,7 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Qty');
},
load_printer: function(){
load_printer() {
qz.printers.find().then((data) => {
new Request_JSF({
url: this.PHP + '/load_printer',
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoInvHutangJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -30,7 +30,7 @@ var RepoInvHutangJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+11 -11
View File
@@ -14,26 +14,26 @@ var RepoInvLabelJS = {
PHP: '',
KODE: '',
index: function(q){
index(q) {
$('#butHapus').click(() => this.proses_empty());
$('#butPrint').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
},
proses_empty: function(){
proses_empty() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=empty']
}).send();
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
if (prt) cetak.doPrint(); else cetak.doPreview();
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winBProduk')
@@ -51,7 +51,7 @@ var RepoInvLabelJS = {
});
},
produk_simpan: function(){
produk_simpan() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=simpan-produk'],
@@ -59,7 +59,7 @@ var RepoInvLabelJS = {
}).send();
},
grup_brow: function(){
grup_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Grup" 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="divBrowGrup">&nbsp;</div>');
this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 'xl', '', () => {
$('#winBGrup')
@@ -76,7 +76,7 @@ var RepoInvLabelJS = {
});
},
grup_select: function(acell){
grup_select(acell) {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
@@ -84,7 +84,7 @@ var RepoInvLabelJS = {
}).send();
},
detail_ubah: function(acell){
detail_ubah(acell) {
new Request({
url: this.PHP + '/form_detail',
sendParam: ['mode_detail=update','ID='+acell[0]],
@@ -101,7 +101,7 @@ var RepoInvLabelJS = {
}).send();
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -110,7 +110,7 @@ var RepoInvLabelJS = {
}, 'danger');
},
detail_simpan: function(){
detail_simpan() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
@@ -118,7 +118,7 @@ var RepoInvLabelJS = {
}).send();
},
data_query: function(tipe, mode, kd_tx){
data_query(tipe, mode, kd_tx) {
if (tipe=="tabel-detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoInvPiutangJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoInvPiutangJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -32,7 +32,7 @@ var RepoInvPiutangJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
@@ -42,7 +42,7 @@ var RepoInvPiutangJS = {
dload.download();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -59,13 +59,13 @@ var RepoInvPiutangJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-member"){
new Request_JSF({
url: this.PHP + '/brow_member',
@@ -75,7 +75,7 @@ var RepoInvPiutangJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
}
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoJualAnalisaJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoJualAnalisaJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -36,7 +36,7 @@ var RepoJualAnalisaJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
@@ -50,7 +50,7 @@ var RepoJualAnalisaJS = {
dload.download();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -67,13 +67,13 @@ var RepoJualAnalisaJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-member"){
new Request_JSF({
url: this.PHP + '/brow_member',
@@ -83,7 +83,7 @@ var RepoJualAnalisaJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
}
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoJualJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -30,7 +30,7 @@ var RepoJualJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoJualMarginJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoJualMarginJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -33,7 +33,7 @@ var RepoJualMarginJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
@@ -44,7 +44,7 @@ var RepoJualMarginJS = {
dload.download();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -61,13 +61,13 @@ var RepoJualMarginJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-member"){
new Request_JSF({
url: this.PHP + '/brow_member',
@@ -77,7 +77,7 @@ var RepoJualMarginJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
}
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoJualMarginPosJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoJualMarginPosJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoJualMutasiJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -23,7 +23,7 @@ var RepoJualMutasiJS = {
FoniaJS.setFocus('#Nama_Member');
},
proses_print: function(prt){
proses_print(prt) {
if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !");
$('#Nama_Member').focus();
@@ -37,7 +37,7 @@ var RepoJualMutasiJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !");
$('#Nama_Member').focus();
@@ -51,7 +51,7 @@ var RepoJualMutasiJS = {
dload.download();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -68,13 +68,13 @@ var RepoJualMutasiJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-member"){
new Request_JSF({
url: this.PHP + '/brow_member',
@@ -84,7 +84,7 @@ var RepoJualMutasiJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
}
+10 -10
View File
@@ -14,7 +14,7 @@ var RepoJualRekapJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -25,7 +25,7 @@ var RepoJualRekapJS = {
FoniaJS.setFocus('#Nama_Produk');
},
proses_print: function(prt){
proses_print(prt) {
if ($('#InvID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Barang !");
$('#Nama_Produk').focus();
@@ -45,7 +45,7 @@ var RepoJualRekapJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#InvID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Barang !");
$('#Nama_Produk').focus();
@@ -65,7 +65,7 @@ var RepoJualRekapJS = {
dload.download();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -82,13 +82,13 @@ var RepoJualRekapJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]);
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk')
@@ -105,13 +105,13 @@ var RepoJualRekapJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]);
$('#Nama_Produk').val(acell[5]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-member"){
new Request_JSF({
url: this.PHP + '/brow_member',
@@ -127,11 +127,11 @@ var RepoJualRekapJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
},
Produk_Comp: function(item){
Produk_Comp(item) {
$('#InvID').val(item.value);
}
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoMemberHistoriJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoMemberHistoriJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
},
proses_print: function(prt){
proses_print(prt) {
if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !");
return;
@@ -41,7 +41,7 @@ var RepoMemberHistoriJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !");
return;
@@ -60,7 +60,7 @@ var RepoMemberHistoriJS = {
dload.download();
},
member_brow: function(){
member_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Member" 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="divBrowMember">&nbsp;</div>');
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember')
@@ -77,13 +77,13 @@ var RepoMemberHistoriJS = {
});
},
member_select: function(acell){
member_select(acell) {
FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-member"){
new Request_JSF({
url: this.PHP + '/brow_member',
@@ -93,7 +93,7 @@ var RepoMemberHistoriJS = {
}
},
Member_Comp: function(item){
Member_Comp(item) {
$('#MemberID').val(item.value);
}
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoMemberPointJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !");
return;
@@ -35,7 +35,7 @@ var RepoMemberPointJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !");
return;
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoMemberTukarJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !");
return;
@@ -34,7 +34,7 @@ var RepoMemberTukarJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !");
return;
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoPPOBJualJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoPPOBJualJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoPPOBMarginJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe");
cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoPPOBMarginJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe");
dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoRekapMarginJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID");
cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoRekapMarginJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID");
dload.add_param("Tgl_From");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoRekapModalJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID");
cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoRekapModalJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID");
dload.add_param("Tgl_From");
+5 -5
View File
@@ -14,14 +14,14 @@ var RepoStokAkhirJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butPOS').click(() => this.proses_pos());
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_pos: function(){
proses_pos() {
var cetak = new PrinterPos(this.PHP + '/pos');
cetak.add_param("CabID");
cetak.add_param("SupID");
@@ -34,7 +34,7 @@ var RepoStokAkhirJS = {
cetak.exec();
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID");
cetak.add_param("SupID");
@@ -47,7 +47,7 @@ var RepoStokAkhirJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID");
dload.add_param("SupID");
@@ -60,7 +60,7 @@ var RepoStokAkhirJS = {
dload.download();
},
oc_MinStok: function(){
oc_MinStok() {
if ($('#Min_Stok').val()=='Y') {
$('#Min_Qty').prop({disabled:false, readonly:false});
FoniaJS.setFocus('#Min_Qty')
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoStokCabangJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Cab1ID");
cetak.add_param("Cab2ID");
@@ -29,7 +29,7 @@ var RepoStokCabangJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("Cab1ID");
dload.add_param("Cab2ID");
+7 -7
View File
@@ -14,7 +14,7 @@ var RepoStokMutasiJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
@@ -23,7 +23,7 @@ var RepoStokMutasiJS = {
FoniaJS.setFocus('#Nama_Produk');
},
proses_print: function(prt){
proses_print(prt) {
if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !');
$('#Nama_Produk').focus();
@@ -37,7 +37,7 @@ var RepoStokMutasiJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !');
$('#Nama_Produk').focus();
@@ -51,7 +51,7 @@ var RepoStokMutasiJS = {
dload.download();
},
produk_brow: function(){
produk_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk')
@@ -68,13 +68,13 @@ var RepoStokMutasiJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]);
$('#Nama_Produk').val(acell[5]);
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="brow-produk"){
new Request_JSF({
url: this.PHP + '/brow_produk',
@@ -84,7 +84,7 @@ var RepoStokMutasiJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
$('#InvID').val(item.value);
$('#Tgl_From').focus();
}
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoStokOpnameJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload());
},
proses_print: function(prt){
proses_print(prt) {
var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID");
cetak.add_param("Grup_InvID");
@@ -29,7 +29,7 @@ var RepoStokOpnameJS = {
if (prt) cetak.doPrint(); else cetak.doPreview();
},
proses_dload: function(){
proses_dload() {
var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID");
dload.add_param("Grup_InvID");
+7 -7
View File
@@ -14,14 +14,14 @@ var AboutJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#win'+this.KODE).find('#divBuildInfo').html('<p>Aplikasi dibuat dengan komponen :<br>- jQuery Version '+$().jquery+' <br>- Bootstrap Version '+$.fn.tooltip.Constructor.VERSION+' <br>- FoniaJS Version '+FoniaJS.version+' <br>- FoniaPHP Version '+FoniaJS.version+'</p>');
$('#butDBCek').click(() => this.db_check());
$('#butDBOpti').click(() => this.db_opti());
$('#butUpdateCek').click(() => this.update_check());
},
db_check: function(){
db_check() {
new Request({
url: this.PHP + '/db_check',
onSuccess: (ajson) => {
@@ -30,7 +30,7 @@ var AboutJS = {
}).send();
},
db_opti: function(){
db_opti() {
new Request({
url: this.PHP + '/db_check',
onSuccess: (ajson) => {
@@ -39,7 +39,7 @@ var AboutJS = {
}).send();
},
update_check: function(){
update_check() {
new Request({
url: this.PHP + '/update_check',
onSuccess: (ajson) => {
@@ -52,7 +52,7 @@ var AboutJS = {
}).send();
},
db_run: function(db_count = 0){
db_run(db_count = 0) {
if (db_count === 0) return false;
var items = Array(db_count).fill(0).map((_, index) => index);
var $ul = $('#db-list').empty();
@@ -70,7 +70,7 @@ var AboutJS = {
}, $.Deferred().resolve().promise());
},
opti_run: function(db_count = 0){
opti_run(db_count = 0) {
if (db_count === 0) return false;
var items = Array(db_count).fill(0).map((_, index) => index);
var $ul = $('#db-list').empty();
@@ -88,7 +88,7 @@ var AboutJS = {
}, $.Deferred().resolve().promise());
},
update_run: function(){
update_run() {
new Request({
url: this.PHP + '/update_proses',
onSuccess: (adata) => {
+2 -2
View File
@@ -14,12 +14,12 @@ var SYSChpasswdJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butSave').click(() => this.proses_save());
FoniaJS.setFocus('#LPass');
},
proses_save: function(){
proses_save() {
if ($("#LPass").val()=="") {
FoniaJS.showInfo("Silakan masukkan password lama Anda!");
FoniaJS.setFocus("#LPass");
+5 -5
View File
@@ -14,17 +14,17 @@ var ConfigJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save());
this.data_query('view');
},
proses_edit: function(){
proses_edit() {
this.data_query('edit');
},
proses_save: function(){
proses_save() {
new Request({
url: this.PHP + '/config',
sendParam: ['mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_EMAIL','REG_OWNER','REG_NPWP'],
@@ -35,7 +35,7 @@ var ConfigJS = {
}).send()
},
data_query: function(mode){
data_query(mode) {
new Request({
url: this.PHP + '/config',
sendParam: ['mode='+mode],
@@ -46,7 +46,7 @@ var ConfigJS = {
}).send()
},
update_event: function(){
update_event() {
if ($.inArray($('#mode').val(), ['edit']) !== -1) {
$("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false);
+11 -11
View File
@@ -14,7 +14,7 @@ var MenuGrupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query();
$('#Cari_Grup').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MenuGrupJS = {
FoniaJS.setFocus('#Cari_Grup');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/detail_grup',
sendParam: ['mode='+mode,'Grup_MenuID='+ID],
@@ -40,15 +40,15 @@ var MenuGrupJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('add', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('edit', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -58,7 +58,7 @@ var MenuGrupJS = {
}.bind(this), 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'],
@@ -69,7 +69,7 @@ var MenuGrupJS = {
}).send();
},
menu_show: function(acell){
menu_show(acell) {
new Request({
url: this.PHP + '/detail_menu',
sendParam: ['Grup_MenuID='+acell[0]],
@@ -92,15 +92,15 @@ var MenuGrupJS = {
}).send();
},
menu_ceksemua: function(){
menu_ceksemua() {
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', true);
},
menu_hapussemua: function(){
menu_hapussemua() {
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', false);
},
menu_simpan: function(){
menu_simpan() {
var alist = [];
$('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val());
@@ -119,7 +119,7 @@ var MenuGrupJS = {
}).send();
},
data_query: function(){
data_query() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Grup'],
+15 -15
View File
@@ -14,7 +14,7 @@ var OperatorJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_User').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -29,7 +29,7 @@ var OperatorJS = {
FoniaJS.setFocus('#Cari_User');
},
filter_show: function(){
filter_show() {
new Request({
url: this.PHP + '/detail_filter',
sendParam: ['Filter_Level'],
@@ -43,13 +43,13 @@ var OperatorJS = {
}).send();
},
filter_simpan: function(){
filter_simpan() {
$('#Filter_Level').val($('#Fi_Level').val());
FoniaJS.closeWindow(this.winFilter);
this.data_query('detail');
},
detail_show: function(mode, UserID){
detail_show(mode, UserID) {
new Request({
url: this.PHP + '/detail_user',
sendParam: ['mode='+mode,'UserID='+UserID],
@@ -62,15 +62,15 @@ var OperatorJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('add', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('edit', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", () => {
new Request({
url: this.PHP + '/save_user',
@@ -87,7 +87,7 @@ var OperatorJS = {
}, 'danger');
},
detail_check: function(){
detail_check() {
if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) {
this.detail_save();
return;
@@ -105,7 +105,7 @@ var OperatorJS = {
}).send();
},
detail_save: function(){
detail_save() {
new Request({
url: this.PHP + '/save_user',
sendParam: ['mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'],
@@ -121,7 +121,7 @@ var OperatorJS = {
}).send();
},
menu_show: function(acell){
menu_show(acell) {
new Request({
url: this.PHP + '/detail_menu',
sendParam: ['UserID='+acell[0]],
@@ -145,15 +145,15 @@ var OperatorJS = {
}).send();
},
menu_ceksemua: function(){
menu_ceksemua() {
$('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', true);
},
menu_hapussemua: function(){
menu_hapussemua() {
$('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', false);
},
menu_simpan: function(){
menu_simpan() {
var alist = [];
$('#tabMenuList tbody input.form-check-input[type=checkbox]:not(:disabled):checked').map((i, b) => {
alist.push($(b).val());
@@ -172,7 +172,7 @@ var OperatorJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -181,7 +181,7 @@ var OperatorJS = {
}
},
oc_Level: function(){
oc_Level() {
}
};
+7 -7
View File
@@ -14,32 +14,32 @@ var PrinterJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butBrow').click(() => this.cab_brow());
$('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save());
this.data_query('form-printer');
},
cab_brow: function(){
cab_brow() {
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', '<div id="divBrowCab">&nbsp;</div>', 'lg', '', () => this.data_query('brow-cabang'));
},
cab_select: function(acell){
cab_select(acell) {
FoniaJS.closeWindow(this.winBCab);
$('#REG_ID').val(acell[0]);
this.data_query('form-printer', 'view');
},
proses_edit: function(){
proses_edit() {
this.data_query('form-printer', 'edit');
},
proses_save: function(){
proses_save() {
this.data_query('form-printer', 'save');
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe === 'form-printer'){
new Request({
url: this.PHP + '/form_printer',
@@ -58,7 +58,7 @@ var PrinterJS = {
}
},
update_event: function(){
update_event() {
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$('#butBrow').prop('disabled', true);
$('#butUbah').prop('disabled', true);
+3 -3
View File
@@ -14,7 +14,7 @@ var SYSProfileJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butSave').click(() => this.save_profile());
$('#win'+this.KODE).find('#FileGambar').off('change').change(() => {
var fd = new FormData(), files = $('#FileGambar')[0].files[0];
@@ -38,7 +38,7 @@ var SYSProfileJS = {
this.get_picture();
},
save_profile: function(){
save_profile() {
new Request({
url: this.PHP + '/save_profile',
sendParam: ['Nama','Posisi','Email','HP'],
@@ -53,7 +53,7 @@ var SYSProfileJS = {
}).send();
},
get_picture: function(){
get_picture() {
new Request({
url: this.PHP + '/get_picture',
onSuccess: (ajson) => {
+3 -3
View File
@@ -14,12 +14,12 @@ var SuperJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query();
if ($('#divSuper').length > 0 && socket.active) socket.emit('super-check');
},
detail_select: function(acell){
detail_select(acell) {
new Request({
url: this.PHP + '/approve',
sendParam: ['AuthID='+acell[0]],
@@ -27,7 +27,7 @@ var SuperJS = {
}).send();
},
data_query: function(){
data_query() {
new Request_JSF({
url: this.PHP + '/table_detail',
}).send();
+5 -5
View File
@@ -14,17 +14,17 @@ var GajiJS = {
PHP: '',
KODE: '',
index: function(){
index() {
$('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save());
this.data_query('view');
},
proses_edit: function(){
proses_edit() {
this.data_query('update');
},
proses_save: function(){
proses_save() {
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
@@ -36,7 +36,7 @@ var GajiJS = {
}).send()
},
data_query: function(mode){
data_query(mode) {
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode_detail='+mode,'REG_ID'],
@@ -47,7 +47,7 @@ var GajiJS = {
}).send()
},
update_event: function(){
update_event() {
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
$("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false);
+7 -7
View File
@@ -14,7 +14,7 @@ var RekGrupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Rek').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var RekGrupJS = {
FoniaJS.setFocus('#Cari_Rek');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
@@ -40,15 +40,15 @@ var RekGrupJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var RekGrupJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
@@ -71,7 +71,7 @@ var RekGrupJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var KaryawanJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Karya').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var KaryawanJS = {
FoniaJS.setFocus('#Cari_Karya');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_karya',
sendParam: ['mode_detail='+mode,'KaryaID='+ID],
@@ -38,15 +38,15 @@ var KaryawanJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -56,7 +56,7 @@ var KaryawanJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
@@ -67,7 +67,7 @@ var KaryawanJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+9 -9
View File
@@ -14,7 +14,7 @@ var RekJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#butPrint').click(() => this.print_show());
$('#Cari_Rek').keydown((e) => {
@@ -29,7 +29,7 @@ var RekJS = {
FoniaJS.setFocus('#Cari_Rek');
},
print_show: function(){
print_show() {
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
@@ -42,7 +42,7 @@ var RekJS = {
}).send();
},
print_rek: function(prt){
print_rek(prt) {
var cetak = new Printer(this.PHP + '/print_rek');
cetak.add_param("Grup_RekID");
cetak.add_param("Level");
@@ -51,7 +51,7 @@ var RekJS = {
FoniaJS.closeWindow(this.winDPrint);
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_rek',
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
@@ -61,15 +61,15 @@ var RekJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -79,7 +79,7 @@ var RekJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
@@ -90,7 +90,7 @@ var RekJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+9 -9
View File
@@ -14,7 +14,7 @@ var MemberJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#butPrint').click(() => this.print_show());
$('#Cari_Member').keydown((e) => {
@@ -29,7 +29,7 @@ var MemberJS = {
FoniaJS.setFocus('#Cari_Member');
},
print_show: function(){
print_show() {
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
@@ -42,7 +42,7 @@ var MemberJS = {
}).send();
},
print_member: function(prt){
print_member(prt) {
var cetak = new Printer(this.PHP + '/print_member');
cetak.add_param("Grup_MemberID");
cetak.add_param("Aktif");
@@ -51,7 +51,7 @@ var MemberJS = {
FoniaJS.closeWindow(this.winDPrint);
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_member',
sendParam: ['mode_detail='+mode,'MemberID='+ID],
@@ -61,15 +61,15 @@ var MemberJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -79,7 +79,7 @@ var MemberJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','MemberID','Grup_MemberID','Kode_Member','Nama_Member','Alamat_Member','Kota_Member','Telp_Member','KTP_Member','Tgl_Lahir','Tgl_Daftar','IM','Aktif','Cari_Member'],
@@ -90,7 +90,7 @@ var MemberJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var MemberGrupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Member').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MemberGrupJS = {
FoniaJS.setFocus('#Cari_Member');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
@@ -40,15 +40,15 @@ var MemberGrupJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var MemberGrupJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
@@ -71,7 +71,7 @@ var MemberGrupJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var PointBarangJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Barang').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointBarangJS = {
FoniaJS.setFocus('#Cari_Barang');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_barang',
sendParam: ['mode_detail='+mode,'InvPID='+ID],
@@ -40,15 +40,15 @@ var PointBarangJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var PointBarangJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
@@ -71,7 +71,7 @@ var PointBarangJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+14 -14
View File
@@ -14,7 +14,7 @@ var PointSkemaJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Skema').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointSkemaJS = {
FoniaJS.setFocus('#Cari_Skema');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_skema',
sendParam: ['mode_detail='+mode,'PointID='+ID],
@@ -43,15 +43,15 @@ var PointSkemaJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -61,7 +61,7 @@ var PointSkemaJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
@@ -72,7 +72,7 @@ var PointSkemaJS = {
}).send();
},
grup_form: function(){
grup_form() {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['Grup_Barang'],
@@ -87,15 +87,15 @@ var PointSkemaJS = {
}).send();
},
grup_semua: function(){
grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
},
grup_clear: function(){
grup_clear() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
},
grup_save: function(){
grup_save() {
var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val());
@@ -104,7 +104,7 @@ var PointSkemaJS = {
FoniaJS.closeWindow(this.winGrup);
},
barang_form: function(){
barang_form() {
new Request({
url: this.PHP + '/form_barang',
sendParam: ['Kode_Barang'],
@@ -117,7 +117,7 @@ var PointSkemaJS = {
}).send();
},
barang_hapus: function(acell){
barang_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_barang',
@@ -127,7 +127,7 @@ var PointSkemaJS = {
}, 'danger');
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -142,7 +142,7 @@ var PointSkemaJS = {
}
},
Produk_Comp: function(item){
Produk_Comp(item) {
new Request_JSF({
url: PointSkemaJS.PHP + '/table_barang',
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
+7 -7
View File
@@ -14,7 +14,7 @@ var PointTipeJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Tipe').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointTipeJS = {
FoniaJS.setFocus('#Cari_Tipe');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_tipe',
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
@@ -40,15 +40,15 @@ var PointTipeJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var PointTipeJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
@@ -71,7 +71,7 @@ var PointTipeJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+4 -4
View File
@@ -14,7 +14,7 @@ var PPOBKateJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Kate').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PPOBKateJS = {
FoniaJS.setFocus('#Cari_Kate');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_kategori',
sendParam: ['mode_detail='+mode,'KateID='+ID],
@@ -38,11 +38,11 @@ var PPOBKateJS = {
}).send();
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+4 -4
View File
@@ -14,7 +14,7 @@ var PPOBOpeJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Ope').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PPOBOpeJS = {
FoniaJS.setFocus('#Cari_Ope');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_operator',
sendParam: ['mode_detail='+mode,'OpeID='+ID],
@@ -38,11 +38,11 @@ var PPOBOpeJS = {
}).send();
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+9 -9
View File
@@ -14,7 +14,7 @@ var PPOBProdukJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show());
$('#butUpdate').click(() => this.update_show());
@@ -30,7 +30,7 @@ var PPOBProdukJS = {
FoniaJS.setFocus('#Cari_Produk');
},
print_show: function(){
print_show() {
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
@@ -43,7 +43,7 @@ var PPOBProdukJS = {
}).send();
},
print_produk: function(prt){
print_produk(prt) {
var cetak = new Printer(this.PHP + '/print_produk');
cetak.add_param("KateID");
cetak.add_param("OpeID");
@@ -52,7 +52,7 @@ var PPOBProdukJS = {
FoniaJS.closeWindow(this.winDPrint);
},
update_show: function(){
update_show() {
new Request({
url: this.PHP + '/detail_update',
onSuccess: (ajson) => {
@@ -63,7 +63,7 @@ var PPOBProdukJS = {
}).send();
},
update_proses: function(){
update_proses() {
new Request_JSF({
url: this.PHP + '/proses_update',
sendParam: ['K_Kate','K_Ope'],
@@ -74,7 +74,7 @@ var PPOBProdukJS = {
}).send();
},
produk_show: function(mode, ID){
produk_show(mode, ID) {
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode_detail='+mode,'ProdukID='+ID],
@@ -86,11 +86,11 @@ var PPOBProdukJS = {
}).send();
},
produk_ubah: function(acell){
produk_ubah(acell) {
this.produk_show('update', acell[0]);
},
produk_simpan: function(){
produk_simpan() {
new Request_JSF({
url: this.PHP + '/table_produk',
sendParam: ['mode_detail','ProdukID','OpeID','KateID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode','Harga_Pokok','Harga_Jual','Status','Cari_Produk'],
@@ -103,7 +103,7 @@ var PPOBProdukJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="tabel-produk"){
new Request_JSF({
url: this.PHP + '/table_produk',
+39 -39
View File
@@ -14,7 +14,7 @@ var ProdukJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show());
$('#butFilter').click(() => this.filter_show());
@@ -30,7 +30,7 @@ var ProdukJS = {
FoniaJS.setFocus('#Cari_Produk');
},
print_show: function(){
print_show() {
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
@@ -43,7 +43,7 @@ var ProdukJS = {
}).send();
},
print_produk: function(prt){
print_produk(prt) {
var cetak = new Printer(this.PHP + '/print_barang');
cetak.add_param("SupID");
cetak.add_param("Grup_InvID");
@@ -53,7 +53,7 @@ var ProdukJS = {
FoniaJS.closeWindow(this.winDPrint);
},
filter_show: function(){
filter_show() {
new Request({
url: this.PHP + '/detail_filter',
sendParam: ['Filter_Produk'],
@@ -66,13 +66,13 @@ var ProdukJS = {
}).send();
},
filter_simpan: function(){
filter_simpan() {
$('#Filter_Produk').val($('#Fi_Produk').val());
FoniaJS.closeWindow(this.winFilter);
this.data_query('tabel-produk');
},
produk_show: function(mode, ID){
produk_show(mode, ID) {
new Request({
url: this.PHP + '/detail_produk',
sendParam: ['mode='+mode,'InvID='+ID],
@@ -89,7 +89,7 @@ var ProdukJS = {
}).send();
},
produk_restore: function(acell){
produk_restore(acell) {
new Request({
url: this.PHP + '/detail_restore',
sendParam: ['InvID='+acell[0]],
@@ -99,7 +99,7 @@ var ProdukJS = {
}).send();
},
produk_restore_select: function(acell){
produk_restore_select(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan restore data Barang ke versi tanggal : <b>"'+acell[0]+'"</b> ?<br><br><span class="text-danger fw-bold">HARAP KONFIRMASI KEMBALI, TERIMA KASIH!</span>', () => {
new Request({
url: this.PHP + '/proses_restore',
@@ -111,7 +111,7 @@ var ProdukJS = {
}, 'danger');
},
produk_restore_form: function(acell, div){
produk_restore_form(acell, div) {
new Request({
url: this.PHP + '/form_restore',
sendParam: ['InvID','MD5Key='+acell[1]],
@@ -119,15 +119,15 @@ var ProdukJS = {
}).send();
},
produk_tambah: function(){
produk_tambah() {
this.produk_show('add', 0);
},
produk_ubah: function(acell){
produk_ubah(acell) {
this.produk_show('edit', acell[0]);
},
produk_hapus: function(acell){
produk_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
FoniaJS.showAuth(() => {
new Request({
@@ -146,7 +146,7 @@ var ProdukJS = {
}, 'danger');
},
produk_simpan: function(){
produk_simpan() {
new Request({
url: this.PHP + '/proses_simpan',
sendParam: ['mode','InvID','Grup_InvID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'StokID','NormalID','PPN','Harga_Beli','Harga_Tambah','Stok_Min','Stok_Max','Aktif'],
@@ -162,7 +162,7 @@ var ProdukJS = {
}).send();
},
produk_batal: function(){
produk_batal() {
if ($('#mode').val()=='add'){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Barang ?', () => {
new Request({
@@ -185,7 +185,7 @@ var ProdukJS = {
}, 'danger');
},
brow_produk: function(){
brow_produk() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk2" 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="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk').find('#Cari_Produk2').keydown((e) => {
@@ -202,7 +202,7 @@ var ProdukJS = {
});
},
produk_select: function(acell){
produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk);
new Request({
url: this.PHP + '/proses_copy',
@@ -220,11 +220,11 @@ var ProdukJS = {
}).send();
},
kemasan_copy: function(){
kemasan_copy() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan salin data dari barang lain ?<br><br><span class="text-danger fw-bold">KEMASAN & HARGA YANG ADA<br>SEKARANG AKAN DIHAPUS!</span>', () => this.brow_produk(), 'warning');
},
kemasan_batal: function(){
kemasan_batal() {
var dt = $('#divKemasanTabel').DataTable(), tr, l_row;
tr = $('#butBatalKemasan').closest('tr');
l_row = dt.row(tr.prev('tr'));
@@ -232,7 +232,7 @@ var ProdukJS = {
if (l_row.data()[0]=='0') l_row.remove().draw(true);
},
kemasan_add: function(){
kemasan_add() {
var dt = $('#divKemasanTabel').DataTable(), l_row;
dt.order([0,'desc']);
l_row = dt.row(':last');
@@ -243,7 +243,7 @@ var ProdukJS = {
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
},
kemasan_form: function(acell, div){
kemasan_form(acell, div) {
new Request({
url: this.PHP + '/form_kemasan',
sendParam: ['InvID','InvKemasanID='+acell[0],'Satuan_Stok='+$('#StokID').find(':selected').text()],
@@ -256,7 +256,7 @@ var ProdukJS = {
}).send();
},
kemasan_del: function(acell){
kemasan_del(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/tabel_kemasan',
@@ -270,7 +270,7 @@ var ProdukJS = {
}, 'danger');
},
kemasan_save: function(){
kemasan_save() {
if ($('#Qty').val()==0){
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
return false;
@@ -288,7 +288,7 @@ var ProdukJS = {
}).send();
},
kemasan_check: function(){
kemasan_check() {
if ($('#SatuanID').val()==$('#SatuanLamaID').val()) {
this.kemasan_save();
return;
@@ -306,7 +306,7 @@ var ProdukJS = {
}).send();
},
varian_batal: function(){
varian_batal() {
var dt = $('#divVarianTabel').DataTable(), tr, l_row;
tr = $('#butBatalVarian').closest('tr');
l_row = dt.row(tr.prev('tr'));
@@ -314,7 +314,7 @@ var ProdukJS = {
if (l_row.data()[0]=='0') l_row.remove().draw(true);
},
varian_add: function(){
varian_add() {
var dt = $('#divVarianTabel').DataTable(), l_row;
dt.order([0,'desc']);
l_row = dt.row(':last');
@@ -325,7 +325,7 @@ var ProdukJS = {
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
},
varian_form: function(acell, div){
varian_form(acell, div) {
new Request({
url: this.PHP + '/form_varian',
sendParam: ['InvID','InvVarianID='+acell[0]],
@@ -338,7 +338,7 @@ var ProdukJS = {
}).send();
},
varian_del: function(acell){
varian_del(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[4]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/tabel_varian',
@@ -348,7 +348,7 @@ var ProdukJS = {
}, 'danger');
},
varian_save: function(){
varian_save() {
new Request_JSF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=update','InvID','InvVarianID','SatuanID','VarianID','Kode_Barcode'],
@@ -356,7 +356,7 @@ var ProdukJS = {
}).send();
},
varian_check: function(){
varian_check() {
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#VarianID').val()==$('#VarianLamaID').val()) && ($('#Kode_Barcode').val()==$('#Kode_BarcodeLama').val())) {
this.varian_save();
return;
@@ -374,7 +374,7 @@ var ProdukJS = {
}).send();
},
harga_batal: function(){
harga_batal() {
var dt = $('#divHargaTabel').DataTable(), tr, l_row;
tr = $('#butBatalHarga').closest('tr');
l_row = dt.row(tr.prev('tr'));
@@ -382,7 +382,7 @@ var ProdukJS = {
if (l_row.data()[0]=='0') l_row.remove().draw(true);
},
harga_add: function(){
harga_add() {
var dt = $('#divHargaTabel').DataTable(), l_row;
dt.order([0,'desc']);
l_row = dt.row(':last');
@@ -395,7 +395,7 @@ var ProdukJS = {
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
},
harga_form: function(acell, div){
harga_form(acell, div) {
new Request({
url: this.PHP + '/form_harga',
sendParam: ['InvID','InvHargaID='+acell[0]],
@@ -410,7 +410,7 @@ var ProdukJS = {
}).send();
},
harga_del: function(acell){
harga_del(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+' - '+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/tabel_harga',
@@ -420,7 +420,7 @@ var ProdukJS = {
}, 'danger');
},
harga_save: function(){
harga_save() {
new Request_JSF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_MemberID','Harga_Jual'],
@@ -428,7 +428,7 @@ var ProdukJS = {
}).send();
},
harga_check: function(){
harga_check() {
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#Grup_MemberID').val()==$('#GrupLamaID').val())) {
this.harga_save();
return;
@@ -446,7 +446,7 @@ var ProdukJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="tabel-produk"){
new Request_JSF({
url: this.PHP + '/tabel_produk',
@@ -485,11 +485,11 @@ var ProdukJS = {
}
},
hitung_HPP: function(){
hitung_HPP() {
$('#Harga_Pokok').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Beli').val()) + FoniaJS.StrToFloat($('#Harga_Tambah').val()), 0));
},
calc_Modal: function(){
calc_Modal() {
new Request({
url: this.PHP + '/check_modal',
sendParam: ['InvID','SatuanID'],
@@ -502,7 +502,7 @@ var ProdukJS = {
}).send();
},
calc_Harga: function(tipe){
calc_Harga(tipe) {
var harga = FoniaJS.StrToFloat($('#Harga_Jual').val());
var pjual = FoniaJS.StrToFloat($('#Persen_Jual').val());
var hmodal = FoniaJS.StrToFloat($('#Harga_Modal').val());
+7 -7
View File
@@ -14,7 +14,7 @@ var ProdukGrupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Grup').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var ProdukGrupJS = {
FoniaJS.setFocus('#Cari_Grup');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_InvID='+ID],
@@ -40,15 +40,15 @@ var ProdukGrupJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request({
url: this.PHP + '/table_detail',
@@ -58,7 +58,7 @@ var ProdukGrupJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_InvID','Kode_Grup','Nama_Grup','Margin','Aktif','Cari_Grup'],
@@ -69,7 +69,7 @@ var ProdukGrupJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var RekPOSJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Rekpos').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var RekPOSJS = {
FoniaJS.setFocus('#Cari_Rekpos');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_rekpos',
sendParam: ['mode_detail='+mode,'KartuID='+ID],
@@ -40,15 +40,15 @@ var RekPOSJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -58,7 +58,7 @@ var RekPOSJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KartuID','Kode_Kartu','Nama_Kartu','Kode_Rek','Aktif','Cari_Rekpos'],
@@ -69,7 +69,7 @@ var RekPOSJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var SatuanJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Satuan').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var SatuanJS = {
FoniaJS.setFocus('#Cari_Satuan');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_satuan',
sendParam: ['mode_detail='+mode,'SatuanID='+ID],
@@ -40,15 +40,15 @@ var SatuanJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var SatuanJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','SatuanID','Kode_Satuan','Nama_Satuan','Aktif','Cari_Satuan'],
@@ -71,7 +71,7 @@ var SatuanJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var SupplierJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Sup').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var SupplierJS = {
FoniaJS.setFocus('#Cari_Sup');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_supplier',
sendParam: ['mode_detail='+mode,'SupID='+ID],
@@ -38,15 +38,15 @@ var SupplierJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request({
url: this.PHP + '/table_detail',
@@ -60,7 +60,7 @@ var SupplierJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Telp_Sup','No_NPWP','No_NITKU','Aktif','Cari_Sup'],
@@ -73,7 +73,7 @@ var SupplierJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',
+7 -7
View File
@@ -14,7 +14,7 @@ var VarianJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('detail');
$('#Cari_Varian').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var VarianJS = {
FoniaJS.setFocus('#Cari_Varian');
},
detail_show: function(mode, ID){
detail_show(mode, ID) {
new Request({
url: this.PHP + '/form_varian',
sendParam: ['mode_detail='+mode,'VarianID='+ID],
@@ -40,15 +40,15 @@ var VarianJS = {
}).send();
},
detail_tambah: function(){
detail_tambah() {
this.detail_show('insert', 0);
},
detail_ubah: function(acell){
detail_ubah(acell) {
this.detail_show('update', acell[0]);
},
detail_hapus: function(acell){
detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request_JSF({
url: this.PHP + '/table_detail',
@@ -58,7 +58,7 @@ var VarianJS = {
}, 'danger');
},
detail_save: function(){
detail_save() {
new Request_JSF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','VarianID','Nama_Varian','Aktif','Cari_Varian'],
@@ -69,7 +69,7 @@ var VarianJS = {
}).send();
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=="detail"){
new Request_JSF({
url: this.PHP + '/table_detail',