Compare commits

..
7 Commits
98 changed files with 995 additions and 997 deletions
+3 -3
View File
@@ -373,7 +373,7 @@ class JualController {
$ttglnota = $form->datebox("_", "Tgl_Jual", $atabel['Tgl_Jual'], $enable, true); $ttglnota = $form->datebox("_", "Tgl_Jual", $atabel['Tgl_Jual'], $enable, true);
$ttgllunas = $form->datebox("_", "Tgl_Lunas", $atabel['Tgl_Lunas'], false, false); $ttgllunas = $form->datebox("_", "Tgl_Lunas", $atabel['Tgl_Lunas'], false, false);
$tcab = $form->option_db("_", "CabID", $atabel['CabID'], $enable, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY Nama_Cab", [0," "]); $tcab = $form->option_db("_", "CabID", $atabel['CabID'], $enable, false, "para_cabang", ["CabID","Nama_Cab"], "Aktif=1 ORDER BY Nama_Cab", [0," "]);
$tmember = $form->textauto("_", "Nama_Member", ['value'=>$atabel['MemberID'],'text'=>$atabel['Nama_Member']], true, true, "nama member"); $tmember = $form->textauto("_", "Nama_Member", ['value'=>$atabel['MemberID'],'text'=>$atabel['Nama_Member']], $enable, true, "nama member");
$tpiutang = $form->textbox("_", "Total_Piutang", 0, false, false, "double"); $tpiutang = $form->textbox("_", "Total_Piutang", 0, false, false, "double");
$ajson['html'] = ' $ajson['html'] = '
<div class="row"> <div class="row">
@@ -409,10 +409,10 @@ class JualController {
<div class="row mb-1"><div class="col"><hr class="my-1"></div></div> <div class="row mb-1"><div class="col"><hr class="my-1"></div></div>
<div class="row mb-1'.(in_array($this->mode, ['add','edit']) ? '' : ' d-none').'"> <div class="row mb-1'.(in_array($this->mode, ['add','edit']) ? '' : ' d-none').'">
<div class="col-sm-9 col-lg-10"> <div class="col-sm-9 col-lg-10">
<input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" /> <input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" tabindex="1" />
</div> </div>
<div class="col-sm-3 col-lg-2"> <div class="col-sm-3 col-lg-2">
<input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" /> <input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" tabindex="2" />
</div> </div>
</div> </div>
<input type="hidden" id="MemberID" value="'.$atabel['MemberID'].'" > <input type="hidden" id="MemberID" value="'.$atabel['MemberID'].'" >
+2 -2
View File
@@ -587,10 +587,10 @@ class PosController {
<div class="col-sm-12 col-md-9 col-lg-10 mt-3 mt-md-0"> <div class="col-sm-12 col-md-9 col-lg-10 mt-3 mt-md-0">
<div class="row mb-1"> <div class="row mb-1">
<div class="col-sm-9 col-lg-10"> <div class="col-sm-9 col-lg-10">
<input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" /> <input type="search" class="form-control fs-5" id="Nama_Produk" value="" placeholder="Scan SKU / Barcode / Ketik Nama Barang" autocomplete="off" tabindex="1" />
</div> </div>
<div class="col-sm-3 col-lg-2"> <div class="col-sm-3 col-lg-2">
<input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" /> <input type="double" class="form-control double fs-5" id="POS_Qty" value="1.00" maxlength="10" tabindex="2" />
</div> </div>
</div> </div>
<div id="divPOS1">&nbsp;</div> <div id="divPOS1">&nbsp;</div>
+2 -2
View File
@@ -47,7 +47,7 @@ class AboutController {
<div class="col col-form-label"><span class="form-control">'.$ainfo['cur_version'].'</span></div> <div class="col col-form-label"><span class="form-control">'.$ainfo['cur_version'].'</span></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-4 col-lg-4 col-form-label">Commit Sekarang</div> <div class="col-sm-4 col-lg-4 col-form-label">Commit Aplikasi</div>
<div class="col col-form-label"><span class="form-control"><strong>'.$ainfo['cur_sha'].'</strong> '.$ainfo['cur_date'].'</span></div> <div class="col col-form-label"><span class="form-control"><strong>'.$ainfo['cur_sha'].'</strong> '.$ainfo['cur_date'].'</span></div>
</div> </div>
<div class="row"><div class="col"><hr class="my-1"></div></div> <div class="row"><div class="col"><hr class="my-1"></div></div>
@@ -60,7 +60,7 @@ class AboutController {
<div class="col col-form-label"><span class="form-control">'.$ainfo['new_message'].'</span></div> <div class="col col-form-label"><span class="form-control">'.$ainfo['new_message'].'</span></div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-4 col-lg-4 col-form-label">Status Server</div> <div class="col-sm-4 col-lg-4 col-form-label">Status Git Server</div>
<div class="col"> <div class="col">
<span class="form-control text-'.($ainfo['svr_status']===1?'success border-primary':'warning border-danger').'" id="spanStatus">'.$ainfo['svr_message'].'</span> <span class="form-control text-'.($ainfo['svr_status']===1?'success border-primary':'warning border-danger').'" id="spanStatus">'.$ainfo['svr_message'].'</span>
</div> </div>
+9 -9
View File
@@ -14,34 +14,34 @@ var DISPConfigJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butBrow').click(() => this.cab_brow()); $('#butBrow').click(() => this.cab_brow());
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('form-display'); this.data_query('form-display');
}, },
cab_brow: function(){ cab_brow() {
var _isi = new String('<div id="divBrowCab">&nbsp;</div>'); var _isi = new String('<div id="divBrowCab">&nbsp;</div>');
this.winBCab = FoniaJS.showWindow('BCab', 'Daftar Cabang', _isi, 'lg', '', () => this.data_query('brow-cabang')); 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); FoniaJS.closeWindow(this.winBCab);
$('#REG_ID').val(acell[0]); $('#REG_ID').val(acell[0]);
this.data_query('form-display', 'view'); this.data_query('form-display', 'view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('form-display', 'edit'); this.data_query('form-display', 'edit');
this.load_port(); this.load_port();
}, },
proses_save: function(){ proses_save() {
this.data_query('form-display', 'save'); this.data_query('form-display', 'save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=='form-display'){ if (tipe=='form-display'){
new Request({ new Request({
url: this.PHP + '/form_display', url: this.PHP + '/form_display',
@@ -54,13 +54,13 @@ var DISPConfigJS = {
} }
}).send(); }).send();
} else if (tipe=='brow-cabang'){ } else if (tipe=='brow-cabang'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_cabang', url: this.PHP + '/brow_cabang',
}).send(); }).send();
} }
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode').val(), ['edit']) >= 0) { if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$('#butBrow').prop('disabled', true); $('#butBrow').prop('disabled', true);
$('#butUbah').prop('disabled', true); $('#butUbah').prop('disabled', true);
@@ -72,7 +72,7 @@ var DISPConfigJS = {
} }
}, },
load_port: function(){ load_port() {
var parent = this; var parent = this;
qz.serial.findPorts().then(function(data){ qz.serial.findPorts().then(function(data){
var _selport = $('#POLE_PORT').val(); var _selport = $('#POLE_PORT').val();
+11 -11
View File
@@ -14,7 +14,7 @@ var DISPIklanJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Iklan').keydown((e) => { $('#Cari_Iklan').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var DISPIklanJS = {
FoniaJS.setFocus('#Cari_Iklan'); FoniaJS.setFocus('#Cari_Iklan');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_iklan', url: this.PHP + '/form_iklan',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -63,17 +63,17 @@ var DISPIklanJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Iklan'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Iklan'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -81,8 +81,8 @@ var DISPIklanJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PromoID','CabID','Tanggal','Info','Aktif','Cari_Iklan'], sendParam: ['mode_detail','PromoID','CabID','Tanggal','Info','Aktif','Cari_Iklan'],
onSuccess: () => { onSuccess: () => {
@@ -92,16 +92,16 @@ var DISPIklanJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Iklan'] sendParam: ['Cari_Iklan']
}).send(); }).send();
} }
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: this.PHP + '/get_picture', url: this.PHP + '/get_picture',
sendParam: ['PromoID'], sendParam: ['PromoID'],
+11 -11
View File
@@ -14,7 +14,7 @@ var DISPPromoJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Promo').keydown((e) => { $('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var DISPPromoJS = {
FoniaJS.setFocus('#Cari_Promo'); FoniaJS.setFocus('#Cari_Promo');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_promo', url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -63,17 +63,17 @@ var DISPPromoJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -81,8 +81,8 @@ var DISPPromoJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','PromoID','Tanggal','Info','Warna','Font','Aktif','Cari_Promo'], sendParam: ['mode_detail','PromoID','Tanggal','Info','Warna','Font','Aktif','Cari_Promo'],
onSuccess: () => { onSuccess: () => {
@@ -92,16 +92,16 @@ var DISPPromoJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Promo'] sendParam: ['Cari_Promo']
}).send(); }).send();
} }
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: this.PHP + '/get_picture', url: this.PHP + '/get_picture',
sendParam: ['PromoID'], sendParam: ['PromoID'],
+27 -27
View File
@@ -14,7 +14,7 @@ var GELGajiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var GELGajiJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -42,17 +42,17 @@ var GELGajiJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Gaji').val(acell[0]); $('#No_Gaji').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Gaji').val()){ if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -60,7 +60,7 @@ var GELGajiJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Gaji').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Gaji').val()){ if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -84,18 +84,18 @@ var GELGajiJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Gaji').val(''); $('#No_Gaji').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(){ tx_print() {
if (!$('#No_Gaji').val()){ if (!$('#No_Gaji').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -106,14 +106,14 @@ var GELGajiJS = {
}); });
}, },
tx_print_exec: function(){ tx_print_exec() {
var cetak = new PrinterPos('report/nota/gaji'); var cetak = new PrinterPos('report/nota/gaji');
cetak.add_param("Nomor_Cetak", $('#No_Gaji').val()); cetak.add_param("Nomor_Cetak", $('#No_Gaji').val());
cetak.exec(); cetak.exec();
FoniaJS.closeWindow(this.winBCetak); 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>'); 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', '', () => { this.winBKarya = FoniaJS.showWindow('BKarya', 'Daftar Karyawan', _isi, 'lg', '', () => {
$('#winBKarya') $('#winBKarya')
@@ -131,12 +131,12 @@ var GELGajiJS = {
}); });
}, },
karya_select: function(acell){ karya_select(acell) {
FoniaJS.closeWindow(this.winBKarya); FoniaJS.closeWindow(this.winBKarya);
this.detail_gaji('insert', 0, acell[0]); this.detail_gaji('insert', 0, acell[0]);
}, },
detail_gaji: function(mode, ID, KaryaID){ detail_gaji(mode, ID, KaryaID) {
new Request({ new Request({
url: this.PHP + '/form_gaji', url: this.PHP + '/form_gaji',
sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID], sendParam: ['mode','mode_detail='+mode,'No_Gaji','ID='+ID,'KaryaID='+KaryaID],
@@ -177,24 +177,24 @@ var GELGajiJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_gaji('insert', 0, 0); this.detail_gaji('insert', 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_gaji('update', acell[0], acell[1]); this.detail_gaji('update', acell[0], acell[1]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Gaji','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','No_Gaji','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#KaryaID').val())==0) { if (parseInt($('#KaryaID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Karyawan !'); FoniaJS.showError('Silakan masukkan Nama Karyawan !');
return; return;
@@ -203,7 +203,7 @@ var GELGajiJS = {
FoniaJS.showError('Jumlah Potongan melebihi Jumlah Pinjaman !'); FoniaJS.showError('Jumlah Potongan melebihi Jumlah Pinjaman !');
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Gaji','KaryaID','Qty_Harian','Gaji_Harian','Qty_Lembur','Lembur_Harian','Qty_BonusM','Qty_BonusB','Bonus_Minggu','Bonus_Bulan','Total_Potong','CatatKar','ID'], sendParam: ['mode','mode_detail','No_Gaji','KaryaID','Qty_Harian','Gaji_Harian','Qty_Lembur','Lembur_Harian','Qty_BonusM','Qty_BonusB','Bonus_Minggu','Bonus_Bulan','Total_Potong','CatatKar','ID'],
onSuccess: () => { onSuccess: () => {
@@ -212,7 +212,7 @@ var GELGajiJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Gaji'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; 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())]; if ((mode ?? '')=='save') sparam = ['mode=save','No_Gaji','Tgl_Gaji','CabID','Tahun','Bulan','Minggu','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -248,31 +248,31 @@ var GELGajiJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Gaji'] sendParam: ['mode','No_Gaji']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-karya"){ } else if (tipe=="brow-karya"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_karya', url: this.PHP + '/brow_karya',
sendParam: ['No_Gaji','Cari_Karya'], sendParam: ['No_Gaji','Cari_Karya'],
onSuccess: () => FoniaJS.setFocus('#Cari_Karya') onSuccess: () => FoniaJS.setFocus('#Cari_Karya')
}).send(); }).send();
} else if (tipe=="brow-cetak"){ } else if (tipe=="brow-cetak"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_cetak', url: this.PHP + '/brow_cetak',
sendParam: ['No_Gaji'] sendParam: ['No_Gaji']
}).send(); }).send();
} }
}, },
Karya_Comp: function(item){ Karya_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#KaryaID').val(item.value); $('#KaryaID').val(item.value);
$('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0])); $('#Gaji_Harian').val(FoniaJS.FloatToStr(adata[0]));
@@ -280,7 +280,7 @@ var GELGajiJS = {
FoniaJS.setFocus('#Qty_Harian'); FoniaJS.setFocus('#Qty_Harian');
}, },
oc_Minggu: function(){ oc_Minggu() {
new Request({ new Request({
url: this.PHP + '/option_minggu', url: this.PHP + '/option_minggu',
sendParam: ['Tahun','Bulan'], sendParam: ['Tahun','Bulan'],
@@ -295,7 +295,7 @@ var GELGajiJS = {
}).send(); }).send();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
var dgaji = FoniaJS.StrToFloat($('#Qty_Harian').val()) * FoniaJS.StrToFloat($('#Gaji_Harian').val()); 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 dlemb = FoniaJS.StrToFloat($('#Qty_Lembur').val()) * FoniaJS.StrToFloat($('#Lembur_Harian').val());
var dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val()); var dbon1 = FoniaJS.StrToFloat($('#Qty_BonusM').val()) * FoniaJS.StrToFloat($('#Bonus_Minggu').val());
+16 -16
View File
@@ -14,21 +14,21 @@ var GELHutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butMode').click(() => this.tx_mode()); $('#butMode').click(() => this.tx_mode());
$('#butBatal').click(() => this.tx_batal()); $('#butBatal').click(() => this.tx_batal());
if (FoniaJS.User.Level>0) $('#butMode').hide(); if (FoniaJS.User.Level>0) $('#butMode').hide();
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_mode: function(){ tx_mode() {
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1; var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
$('#Mode_Tampil').val(mode); $('#Mode_Tampil').val(mode);
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal')); $('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
tx_batal: function(){ tx_batal() {
$('#divTXNota').removeClass('d-none'); $('#divTXNota').removeClass('d-none');
$('#divDetailNota').addClass('d-none'); $('#divDetailNota').addClass('d-none');
$('#divDetailBayar').addClass('d-none'); $('#divDetailBayar').addClass('d-none');
@@ -39,7 +39,7 @@ var GELHutangJS = {
this.data_query('tabel-nota'); 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>'); 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', '', () => { this.winBSup = FoniaJS.showWindow('BSup', 'Daftar Supplier', _isi, 'xl', '', () => {
$('#winBSup') $('#winBSup')
@@ -57,7 +57,7 @@ var GELHutangJS = {
}); });
}, },
sup_select: function(acell){ sup_select(acell) {
FoniaJS.closeWindow(this.winBSup); FoniaJS.closeWindow(this.winBSup);
$('#SupID').val(acell[0]); $('#SupID').val(acell[0]);
$('#Nama_Sup').val(acell[2]); $('#Nama_Sup').val(acell[2]);
@@ -65,7 +65,7 @@ var GELHutangJS = {
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
nota_select: function(acell){ nota_select(acell) {
new Request({ new Request({
url: this.PHP + '/form_nota', url: this.PHP + '/form_nota',
sendParam: ['No_Beli='+acell[1],'Tipe_Nota='+acell[0]], sendParam: ['No_Beli='+acell[1],'Tipe_Nota='+acell[0]],
@@ -83,7 +83,7 @@ var GELHutangJS = {
}).send(); }).send();
}, },
bayar_show: function(){ bayar_show() {
new Request({ new Request({
url: this.PHP + '/form_bayar', url: this.PHP + '/form_bayar',
sendParam: ['No_Beli','Total_Sisa'], sendParam: ['No_Beli','Total_Sisa'],
@@ -96,28 +96,28 @@ var GELHutangJS = {
}).send(); }).send();
}, },
bayar_hapus: function(acell){ bayar_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=delete','No_Beli','ID='+acell[0]] sendParam: ['mode_detail=delete','No_Beli','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
bayar_simpan: function(){ bayar_simpan() {
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){ if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!"); FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=insert','SupID','No_Beli','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Sup'], sendParam: ['mode_detail=insert','SupID','No_Beli','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Sup'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar) onSuccess: () => FoniaJS.closeWindow(this.winBayar)
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
@@ -135,17 +135,17 @@ var GELHutangJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-nota"){ } else if (tipe=="tabel-nota"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_nota', url: this.PHP + '/table_nota',
sendParam: ['SupID','Mode_Tampil'] sendParam: ['SupID','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="tabel-bayar"){ } else if (tipe=="tabel-bayar"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['No_Beli','Lunas','Mode_Tampil'] sendParam: ['No_Beli','Lunas','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="brow-sup"){ } else if (tipe=="brow-sup"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_sup', url: this.PHP + '/brow_sup',
sendParam: ['Cari_Sup'], sendParam: ['Cari_Sup'],
onSuccess: () => FoniaJS.setFocus('#Cari_Sup') onSuccess: () => FoniaJS.setFocus('#Cari_Sup')
@@ -153,7 +153,7 @@ var GELHutangJS = {
} }
}, },
Sup_Comp: function(item){ Sup_Comp(item) {
$('#SupID').val(item.value); $('#SupID').val(item.value);
$('#Alamat_Sup').val(item.data); $('#Alamat_Sup').val(item.data);
GELHutangJS.data_query('tabel-nota'); GELHutangJS.data_query('tabel-nota');
+12 -12
View File
@@ -14,13 +14,13 @@ var GELKaryaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butPinjam').click(() => this.tx_pinjam()); $('#butPinjam').click(() => this.tx_pinjam());
$('#butBayar').click(() => this.tx_bayar()); $('#butBayar').click(() => this.tx_bayar());
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_pinjam: function(){ tx_pinjam() {
new Request({ new Request({
url: this.PHP + '/form_pinjam', url: this.PHP + '/form_pinjam',
sendParam: ['KaryaID'], sendParam: ['KaryaID'],
@@ -33,7 +33,7 @@ var GELKaryaJS = {
}).send(); }).send();
}, },
tx_bayar: function(){ tx_bayar() {
new Request({ new Request({
url: this.PHP + '/form_bayar', url: this.PHP + '/form_bayar',
sendParam: ['KaryaID'], sendParam: ['KaryaID'],
@@ -46,40 +46,40 @@ var GELKaryaJS = {
}).send(); }).send();
}, },
pinjam_simpan: function(){ pinjam_simpan() {
if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){ if (FoniaJS.StrToFloat($('#Total_Pinjam').val()) == 0){
FoniaJS.showError("Silahkan masukkan jumlah pinjaman !"); FoniaJS.showError("Silahkan masukkan jumlah pinjaman !");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Pinjam','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=1'], sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Pinjam','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=1'],
onSuccess: () => FoniaJS.closeWindow(this.winPinjam) onSuccess: () => FoniaJS.closeWindow(this.winPinjam)
}).send(); }).send();
}, },
bayar_simpan: function(){ bayar_simpan() {
if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){ if (FoniaJS.StrToFloat($('#Total_Bayar').val()) == 0){
FoniaJS.showError("Silahkan masukkan jumlah pembayaran !"); FoniaJS.showError("Silahkan masukkan jumlah pembayaran !");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Bayar','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=0'], sendParam: ['mode_detail=insert','Tgl_Trans','Kode_Rek','Total_Bayar','KaryaID','Nama_Karya='+$('#KaryaID').find(':selected').text(),'Catatan','is_pinjam=0'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar) onSuccess: () => FoniaJS.closeWindow(this.winBayar)
}).send(); }).send();
}, },
karya_hapus: function(acell){ karya_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[0]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['mode_detail=delete','KaryaID','No_Trans='+acell[0]] sendParam: ['mode_detail=delete','KaryaID','No_Trans='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
@@ -91,14 +91,14 @@ var GELKaryaJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-karya"){ } else if (tipe=="tabel-karya"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_karya', url: this.PHP + '/table_karya',
sendParam: ['KaryaID'] sendParam: ['KaryaID']
}).send(); }).send();
} }
}, },
ocKarya: function() { ocKarya() {
this.data_query('master'); this.data_query('master');
} }
+23 -23
View File
@@ -14,7 +14,7 @@ var GELKeluarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -23,7 +23,7 @@ var GELKeluarJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var GELKeluarJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -59,7 +59,7 @@ var GELKeluarJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -83,7 +83,7 @@ var GELKeluarJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Total_Item').val()==0){ if ($('#Total_Item').val()==0){
FoniaJS.showError("Belum ada Item Jurnal!"); FoniaJS.showError("Belum ada Item Jurnal!");
return false; return false;
@@ -92,14 +92,14 @@ var GELKeluarJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Kode_Jurnal').val(''); $('#Kode_Jurnal').val('');
}, 'danger'); }, 'danger');
}, },
cek_awal: function(){ cek_awal() {
/*if (GEL_Kunci($('Tanggal').get('value'))) { /*if (GEL_Kunci($('Tanggal').get('value'))) {
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000); FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
return false; return false;
@@ -112,7 +112,7 @@ var GELKeluarJS = {
return true; return true;
}, },
rek_brow: function(){ rek_brow() {
if (!this.cek_awal()) return false; 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>'); 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', '', () => { 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); FoniaJS.closeWindow(this.winBRek);
this.detail_rek('insert', 0, acell[0]); this.detail_rek('insert', 0, acell[0]);
}, },
detail_rek: function(mode, ID, Kode_Rek){ detail_rek(mode, ID, Kode_Rek) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek], sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
@@ -158,31 +158,31 @@ var GELKeluarJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
this.detail_rek('insert', 0, 0); this.detail_rek('insert', 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_rek('update', acell[0], acell[1]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Rekening Jurnal !'); FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'], sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
onSuccess: () => { onSuccess: () => {
@@ -191,7 +191,7 @@ var GELKeluarJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; 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())]; if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -234,18 +234,18 @@ var GELKeluarJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal'] sendParam: ['mode','Kode_Jurnal']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-rek"){ } else if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -253,7 +253,7 @@ var GELKeluarJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
FoniaJS.setFocus('#Jumlah'); FoniaJS.setFocus('#Jumlah');
} }
+16 -16
View File
@@ -14,21 +14,21 @@ var GELPiutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butMode').click(() => this.tx_mode()); $('#butMode').click(() => this.tx_mode());
$('#butBatal').click(() => this.tx_batal()); $('#butBatal').click(() => this.tx_batal());
if (FoniaJS.User.Level>0) $('#butMode').hide(); if (FoniaJS.User.Level>0) $('#butMode').hide();
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : ''));
}, },
tx_mode: function(){ tx_mode() {
var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1; var mode = ($('#Mode_Tampil').val()==1) ? 0 : 1;
$('#Mode_Tampil').val(mode); $('#Mode_Tampil').val(mode);
$('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal')); $('#butMode').html('<i class="bi-list me-2"></i>'+(mode==1?'Semua':'Normal'));
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
tx_batal: function(){ tx_batal() {
$('#divTXNota').removeClass('d-none'); $('#divTXNota').removeClass('d-none');
$('#divDetailNota').addClass('d-none'); $('#divDetailNota').addClass('d-none');
$('#divDetailBayar').addClass('d-none'); $('#divDetailBayar').addClass('d-none');
@@ -39,7 +39,7 @@ var GELPiutangJS = {
this.data_query('tabel-nota'); 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>'); 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', '', () => { this.winBBuyer = FoniaJS.showWindow('BBuyer', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBBuyer') $('#winBBuyer')
@@ -57,7 +57,7 @@ var GELPiutangJS = {
}); });
}, },
buyer_select: function(acell){ buyer_select(acell) {
FoniaJS.closeWindow(this.winBBuyer); FoniaJS.closeWindow(this.winBBuyer);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[2]); $('#Nama_Member').val(acell[2]);
@@ -65,7 +65,7 @@ var GELPiutangJS = {
this.data_query('tabel-nota'); this.data_query('tabel-nota');
}, },
nota_select: function(acell){ nota_select(acell) {
new Request({ new Request({
url: this.PHP + '/form_nota', url: this.PHP + '/form_nota',
sendParam: ['No_Jual='+acell[1],'Tipe_Nota='+acell[0]], sendParam: ['No_Jual='+acell[1],'Tipe_Nota='+acell[0]],
@@ -83,7 +83,7 @@ var GELPiutangJS = {
}).send(); }).send();
}, },
bayar_show: function(){ bayar_show() {
new Request({ new Request({
url: this.PHP + '/form_bayar', url: this.PHP + '/form_bayar',
sendParam: ['No_Jual','Total_Sisa'], sendParam: ['No_Jual','Total_Sisa'],
@@ -96,28 +96,28 @@ var GELPiutangJS = {
}).send(); }).send();
}, },
bayar_hapus: function(acell){ bayar_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]] sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
bayar_simpan: function(){ bayar_simpan() {
if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){ if ((FoniaJS.StrToFloat($('#Total_Bayar').val()) + FoniaJS.StrToFloat($('#Total_Potong').val())) > $('#Total_Sisa').val()){
FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!"); FoniaJS.showError("Jumlah pelunasan melebihi jumlah faktur!");
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['mode_detail=insert','MemberID','No_Jual','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Member'], sendParam: ['mode_detail=insert','MemberID','No_Jual','Tgl_Bayar','Kode_Rek','Total_Bayar','Total_Potong','Tipe_Nota','Nama_Member'],
onSuccess: () => FoniaJS.closeWindow(this.winBayar) onSuccess: () => FoniaJS.closeWindow(this.winBayar)
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
@@ -135,17 +135,17 @@ var GELPiutangJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-nota"){ } else if (tipe=="tabel-nota"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_nota', url: this.PHP + '/table_nota',
sendParam: ['MemberID','Mode_Tampil'] sendParam: ['MemberID','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="tabel-bayar"){ } else if (tipe=="tabel-bayar"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_bayar', url: this.PHP + '/table_bayar',
sendParam: ['No_Jual','Lunas','Mode_Tampil'] sendParam: ['No_Jual','Lunas','Mode_Tampil']
}).send(); }).send();
} else if (tipe=="brow-buyer"){ } else if (tipe=="brow-buyer"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_buyer', url: this.PHP + '/brow_buyer',
sendParam: ['Cari_Buyer'], sendParam: ['Cari_Buyer'],
onSuccess: () => FoniaJS.setFocus('#Cari_Buyer') onSuccess: () => FoniaJS.setFocus('#Cari_Buyer')
@@ -153,7 +153,7 @@ var GELPiutangJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Alamat_Member').val(item.data); $('#Alamat_Member').val(item.data);
GELPiutangJS.data_query('tabel-nota'); GELPiutangJS.data_query('tabel-nota');
+23 -23
View File
@@ -14,7 +14,7 @@ var GELTerimaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -23,7 +23,7 @@ var GELTerimaJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var GELTerimaJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -59,7 +59,7 @@ var GELTerimaJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -83,7 +83,7 @@ var GELTerimaJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Total_Item').val()==0){ if ($('#Total_Item').val()==0){
FoniaJS.showError("Belum ada Item Jurnal!"); FoniaJS.showError("Belum ada Item Jurnal!");
return false; return false;
@@ -92,14 +92,14 @@ var GELTerimaJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Kode_Jurnal').val(''); $('#Kode_Jurnal').val('');
}, 'danger'); }, 'danger');
}, },
cek_awal: function(){ cek_awal() {
/*if (GEL_Kunci($('Tanggal').get('value'))) { /*if (GEL_Kunci($('Tanggal').get('value'))) {
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000); FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
return false; return false;
@@ -112,7 +112,7 @@ var GELTerimaJS = {
return true; return true;
}, },
rek_brow: function(){ rek_brow() {
if (!this.cek_awal()) return false; 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>'); 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', '', () => { 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); FoniaJS.closeWindow(this.winBRek);
this.detail_rek('insert', 0, acell[0]); this.detail_rek('insert', 0, acell[0]);
}, },
detail_rek: function(mode, ID, Kode_Rek){ detail_rek(mode, ID, Kode_Rek) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek], sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek],
@@ -158,31 +158,31 @@ var GELTerimaJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
this.detail_rek('insert', 0, 0); this.detail_rek('insert', 0, 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_rek('update', acell[0], acell[1]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Rekening Jurnal !'); FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'], sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','Jumlah','ID'],
onSuccess: () => { onSuccess: () => {
@@ -191,7 +191,7 @@ var GELTerimaJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; 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())]; if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Kode_Kas','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -234,18 +234,18 @@ var GELTerimaJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal'] sendParam: ['mode','Kode_Jurnal']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-rek"){ } else if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -253,7 +253,7 @@ var GELTerimaJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
FoniaJS.setFocus('#Jumlah'); FoniaJS.setFocus('#Jumlah');
} }
+23 -23
View File
@@ -14,7 +14,7 @@ var GELUmumJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah());$('#butHapus').click(() => this.tx_hapus()); $('#butUbah').click(() => this.tx_ubah());$('#butHapus').click(() => this.tx_hapus());
$('#butSimpan').click(() => this.tx_simpan()); $('#butSimpan').click(() => this.tx_simpan());
@@ -22,7 +22,7 @@ var GELUmumJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -40,17 +40,17 @@ var GELUmumJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -58,7 +58,7 @@ var GELUmumJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#Kode_Jurnal').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#Kode_Jurnal').val()){ if (!$('#Kode_Jurnal').val()){
FoniaJS.showError("Silakan masukkan Kode Jurnal !"); FoniaJS.showError("Silakan masukkan Kode Jurnal !");
return; return;
@@ -82,7 +82,7 @@ var GELUmumJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Total_Item').val()==0){ if ($('#Total_Item').val()==0){
FoniaJS.showError("Belum ada Item Jurnal!"); FoniaJS.showError("Belum ada Item Jurnal!");
return false; return false;
@@ -95,14 +95,14 @@ var GELUmumJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Kode_Jurnal').val(''); $('#Kode_Jurnal').val('');
}, 'danger'); }, 'danger');
}, },
cek_awal: function(){ cek_awal() {
/*if (GEL_Kunci($('Tanggal').get('value'))) { /*if (GEL_Kunci($('Tanggal').get('value'))) {
FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000); FoniaJS.showErrorLocale('SHIAS.lock_periode', 2000);
return false; return false;
@@ -115,7 +115,7 @@ var GELUmumJS = {
return true; return true;
}, },
rek_brow: function(){ rek_brow() {
if (!this.cek_awal()) return false; 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>'); 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', '', () => { 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); FoniaJS.closeWindow(this.winBRek);
this.detail_rek('insert', 0, acell[0], 'D'); 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({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek,'DK='+DK], sendParam: ['mode','mode_detail='+mode,'Kode_Jurnal','ID='+ID,'Kode_Rek='+Kode_Rek,'DK='+DK],
@@ -161,31 +161,31 @@ var GELUmumJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if (!this.cek_awal()) return false; if (!this.cek_awal()) return false;
this.detail_rek('insert', 0, 0, 'D'); this.detail_rek('insert', 0, 0, 'D');
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_rek('update', acell[0], acell[1], acell[3]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+' - '+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','Kode_Jurnal','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Rekening Jurnal !'); FoniaJS.showError('Silakan masukkan Rekening Jurnal !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','DK','Jumlah','ID'], sendParam: ['mode','mode_detail','Kode_Jurnal','Kode_Rek','DK','Jumlah','ID'],
onSuccess: () => { onSuccess: () => {
@@ -194,7 +194,7 @@ var GELUmumJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'Kode_Jurnal'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; 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())]; if ((mode ?? '')=='save') sparam = ['mode=save','Kode_Jurnal','Tanggal','CabID','Kode_Ref','Catatan='+encodeURIComponent($('#Catatan').val())];
@@ -237,18 +237,18 @@ var GELUmumJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Kode_Jurnal'] sendParam: ['mode','Kode_Jurnal']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-rek"){ } else if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -256,7 +256,7 @@ var GELUmumJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
FoniaJS.setFocus('#Jumlah'); FoniaJS.setFocus('#Jumlah');
} }
+4 -4
View File
@@ -50,7 +50,7 @@ socket.on('super-data', (adata) => {
var IndexJS = { var IndexJS = {
index: function(){ index() {
new Request({ new Request({
url: 'index/index', url: 'index/index',
sendParam: [], sendParam: [],
@@ -66,7 +66,7 @@ var IndexJS = {
}).send(); }).send();
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: 'system/profile/get_picture', url: 'system/profile/get_picture',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -75,13 +75,13 @@ var IndexJS = {
}).send(); }).send();
}, },
load_chart: function(){ load_chart() {
this.data_query('chart-sale'); this.data_query('chart-sale');
this.data_query('chart-omzet'); this.data_query('chart-omzet');
this.data_query('tabel-stok'); this.data_query('tabel-stok');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="chart-sale"){ if (tipe=="chart-sale"){
new Request({ new Request({
url: 'index/chart_sale', url: 'index/chart_sale',
+33 -33
View File
@@ -14,7 +14,7 @@ var BeliJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -26,7 +26,7 @@ var BeliJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -43,17 +43,17 @@ var BeliJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -65,7 +65,7 @@ var BeliJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -89,7 +89,7 @@ var BeliJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(mode){ tx_simpan(mode) {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -109,14 +109,14 @@ var BeliJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Beli').val(''); $('#No_Beli').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Beli').val()) { if ($('#No_Beli').val()) {
var cetak = new Printer('report/nota/beli'); var cetak = new Printer('report/nota/beli');
cetak.add_param("Nomor_Cetak", $('#No_Beli').val()); cetak.add_param("Nomor_Cetak", $('#No_Beli').val());
@@ -126,18 +126,18 @@ var BeliJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
pending_brow: function(){ pending_brow() {
var _isi = new String('<div id="divBrowPending">&nbsp;</div>'); var _isi = new String('<div id="divBrowPending">&nbsp;</div>');
this.winBPending = FoniaJS.showWindow('BPending', 'Daftar Pending Pembelian', _isi, 'xl', '', () => this.data_query('brow-pending')); 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); FoniaJS.closeWindow(this.winBPending);
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
this.data_query('master', 'pending-edit'); this.data_query('master', 'pending-edit');
}, },
pending_delete: function(acell){ pending_delete(acell) {
FoniaJS.closeWindow(this.winBPending); FoniaJS.closeWindow(this.winBPending);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
@@ -145,7 +145,7 @@ var BeliJS = {
}, 'danger'); }, 'danger');
}, },
produk_brow: function(){ produk_brow() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
return; return;
@@ -173,12 +173,12 @@ var BeliJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); 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({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -236,7 +236,7 @@ var BeliJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
return; return;
@@ -244,13 +244,13 @@ var BeliJS = {
this.detail_produk('insert', 0, 0, 0, 0); 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]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]], sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]],
onSuccess: () => { onSuccess: () => {
@@ -261,13 +261,13 @@ var BeliJS = {
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#InvID').val())==0) { if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Disk_Rupiah','Disk_Persen1','Disk_Persen2','Disk_Persen3','Disk_Persen4','Disk_Persen5'], sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Disk_Rupiah','Disk_Persen1','Disk_Persen2','Disk_Persen3','Disk_Persen4','Disk_Persen5'],
onSuccess: () => { onSuccess: () => {
@@ -278,7 +278,7 @@ var BeliJS = {
}).send(); }).send();
}, },
total_show: function(){ total_show() {
if (['add','edit'].indexOf($('#mode').val()) == -1) return false; if (['add','edit'].indexOf($('#mode').val()) == -1) return false;
new Request({ new Request({
url: this.PHP + '/form_total', url: this.PHP + '/form_total',
@@ -302,14 +302,14 @@ var BeliJS = {
}).send(); }).send();
}, },
total_simpan: function(){ total_simpan() {
$('#Real_Diskon').val(FoniaJS.StrToFloat($('#popTotal_Diskon').val())); $('#Real_Diskon').val(FoniaJS.StrToFloat($('#popTotal_Diskon').val()));
$('#Real_Beli').val(FoniaJS.StrToFloat($('#popTotal_Beli').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)); $('#tombolTotal').html('<i class="bi-wallet2 me-1"></i>Hutang : '+FoniaJS.FloatToStr($('#Real_Beli').val(),2));
FoniaJS.closeWindow(this.winTotal); FoniaJS.closeWindow(this.winTotal);
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -358,7 +358,7 @@ var BeliJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Beli'], sendParam: ['mode','No_Beli'],
onSuccess: () => { onSuccess: () => {
@@ -367,18 +367,18 @@ var BeliJS = {
} }
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-pending"){ } else if (tipe=="brow-pending"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_pending', url: this.PHP + '/brow_pending',
sendParam: ['Cari_Pending'] sendParam: ['Cari_Pending']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Filter_Browse','SupID'], sendParam: ['Cari_Produk','Filter_Browse','SupID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -386,7 +386,7 @@ var BeliJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#SatuanID').val(adata[0]); $('#SatuanID').val(adata[0]);
@@ -398,7 +398,7 @@ var BeliJS = {
BeliJS.update_Items(); BeliJS.update_Items();
}, },
update_Items: function(){ update_Items() {
new Request({ new Request({
url: this.PHP + '/item_detail', url: this.PHP + '/item_detail',
sendParam: ['InvID','SatuanID','SupID'], sendParam: ['InvID','SatuanID','SupID'],
@@ -419,14 +419,14 @@ var BeliJS = {
}).send(); }).send();
}, },
update_Varian: function(){ update_Varian() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_varian', url: this.PHP + '/option_varian',
sendParam: ['InvID','SatuanID','VarianID'] sendParam: ['InvID','SatuanID','VarianID']
}).send(); }).send();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
var dqty = FoniaJS.StrToFloat($('#Qty').val()); var dqty = FoniaJS.StrToFloat($('#Qty').val());
var dharga = FoniaJS.StrToFloat($('#Harga_Beli').val()); var dharga = FoniaJS.StrToFloat($('#Harga_Beli').val());
var ddiskrp = FoniaJS.StrToFloat($('#Disk_Rupiah').val()); var ddiskrp = FoniaJS.StrToFloat($('#Disk_Rupiah').val());
+26 -26
View File
@@ -14,7 +14,7 @@ var BeliReturJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var BeliReturJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var BeliReturJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Beli').val(acell[0]); $('#No_Beli').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -59,7 +59,7 @@ var BeliReturJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Beli').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Beli').val()){ if (!$('#No_Beli').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -83,7 +83,7 @@ var BeliReturJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -95,14 +95,14 @@ var BeliReturJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Beli').val(''); $('#No_Beli').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Beli').val()) { if ($('#No_Beli').val()) {
var cetak = new Printer('report/nota/beli_retur'); var cetak = new Printer('report/nota/beli_retur');
cetak.add_param("Nomor_Cetak", $('#No_Beli').val()); cetak.add_param("Nomor_Cetak", $('#No_Beli').val());
@@ -112,7 +112,7 @@ var BeliReturJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
produk_brow: function(){ produk_brow() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -133,12 +133,12 @@ var BeliReturJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); 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({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Beli','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -168,7 +168,7 @@ var BeliReturJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
return; return;
@@ -176,26 +176,26 @@ var BeliReturJS = {
this.detail_produk('insert', 0, 0, 0, 0); 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]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','No_Beli','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#InvID').val())==0) { if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'], sendParam: ['mode','mode_detail','No_Beli','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'],
onSuccess: () => { onSuccess: () => {
@@ -204,7 +204,7 @@ var BeliReturJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Beli'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; 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']; if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Beli','Tgl_Beli','No_Faktur','CabID','SupID'];
@@ -242,18 +242,18 @@ var BeliReturJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Beli'] sendParam: ['mode','No_Beli']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['CabID','Cari_Produk'], sendParam: ['CabID','Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -261,7 +261,7 @@ var BeliReturJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#SatuanID').val(adata[0]); $('#SatuanID').val(adata[0]);
@@ -273,14 +273,14 @@ var BeliReturJS = {
FoniaJS.setFocus('#Qty'); FoniaJS.setFocus('#Qty');
}, },
update_Varian: function(){ update_Varian() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_varian', url: this.PHP + '/option_varian',
sendParam: ['InvID','SatuanID','VarianID'] sendParam: ['InvID','SatuanID','VarianID']
}).send(); }).send();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
} }
+9 -9
View File
@@ -15,7 +15,7 @@ var CekHargaJS = {
KODE: '', KODE: '',
html5QrcodeScanner: null, html5QrcodeScanner: null,
index: function(){ index() {
$('#butBrow').click(() => this.produk_brow()); $('#butBrow').click(() => this.produk_brow());
if (FoniaJS.WEB_MOBILE){ if (FoniaJS.WEB_MOBILE){
html5QrcodeScanner = new Html5Qrcode('qr-reader'); html5QrcodeScanner = new Html5Qrcode('qr-reader');
@@ -26,7 +26,7 @@ var CekHargaJS = {
} }
}, },
ScanSukses: function(decodedText, decodedResult){ ScanSukses(decodedText, decodedResult) {
new Request({ new Request({
url: CekHargaJS.PHP + '/scan_produk', url: CekHargaJS.PHP + '/scan_produk',
sendParam: ['Cari_Produk='+decodedText], sendParam: ['Cari_Produk='+decodedText],
@@ -41,7 +41,7 @@ var CekHargaJS = {
}).send(); }).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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -58,7 +58,7 @@ var CekHargaJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#Kode_Barang').val(acell[1]+' / '+acell[2]); $('#Kode_Barang').val(acell[1]+' / '+acell[2]);
@@ -68,9 +68,9 @@ var CekHargaJS = {
this.update_Sup(); this.update_Sup();
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -78,7 +78,7 @@ var CekHargaJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#Nama_Barang').val(item.text); $('#Nama_Barang').val(item.text);
@@ -89,9 +89,9 @@ var CekHargaJS = {
CekHargaJS.update_Sup(); CekHargaJS.update_Sup();
}, },
update_Sup: function(){ update_Sup() {
if (parseInt($('#InvID').val()) == 0) return false; if (parseInt($('#InvID').val()) == 0) return false;
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/update_sup', url: this.PHP + '/update_sup',
sendParam: ['InvID'] sendParam: ['InvID']
}).send(); }).send();
+36 -36
View File
@@ -14,7 +14,7 @@ var JualJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -27,7 +27,7 @@ var JualJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -44,17 +44,17 @@ var JualJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Jual').val()){ if (!$('#No_Jual').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -66,7 +66,7 @@ var JualJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Jual').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Jual').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Jual').val()){ if (!$('#No_Jual').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -90,7 +90,7 @@ var JualJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(mode){ tx_simpan(mode) {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
return; return;
@@ -102,14 +102,14 @@ var JualJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Jual').val(''); $('#No_Jual').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Jual').val()) { if ($('#No_Jual').val()) {
var cetak = new Printer('report/nota/jual'); var cetak = new Printer('report/nota/jual');
cetak.add_param("Nomor_Cetak", $('#No_Jual').val()); cetak.add_param("Nomor_Cetak", $('#No_Jual').val());
@@ -119,7 +119,7 @@ var JualJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
tx_print_pos: function(){ tx_print_pos() {
if ($('#No_Jual').val()) { if ($('#No_Jual').val()) {
var cetak = new PrinterPos('report/nota/pos'); var cetak = new PrinterPos('report/nota/pos');
cetak.add_param("Nomor_Cetak", $('#No_Jual').val()); cetak.add_param("Nomor_Cetak", $('#No_Jual').val());
@@ -129,17 +129,17 @@ var JualJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); 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')); 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); FoniaJS.closeWindow(this.winBPending);
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
this.data_query('master', 'pending-edit'); this.data_query('master', 'pending-edit');
}, },
pending_delete: function(acell){ pending_delete(acell) {
FoniaJS.closeWindow(this.winBPending); FoniaJS.closeWindow(this.winBPending);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
@@ -147,7 +147,7 @@ var JualJS = {
}, 'danger'); }, '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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -164,7 +164,7 @@ var JualJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Grup_MemberID').val(acell[1]); $('#Grup_MemberID').val(acell[1]);
@@ -172,7 +172,7 @@ var JualJS = {
this.update_Piutang(); this.update_Piutang();
}, },
produk_brow: function(){ produk_brow() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
return; return;
@@ -193,12 +193,12 @@ var JualJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); 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){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -231,13 +231,13 @@ var JualJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Jual','ID='+acell[0]], sendParam: ['mode','mode_detail=delete','No_Jual','ID='+acell[0]],
onSuccess: () => $('#Nama_Produk').focus() onSuccess: () => $('#Nama_Produk').focus()
@@ -245,12 +245,12 @@ var JualJS = {
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) { if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
FoniaJS.showInfo('Nilai Diskon diluar batas !'); FoniaJS.showInfo('Nilai Diskon diluar batas !');
return false; return false;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'], sendParam: ['mode','mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
onSuccess: () => { onSuccess: () => {
@@ -260,7 +260,7 @@ var JualJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Jual'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Jual'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -271,7 +271,7 @@ var JualJS = {
onSuccess: (ajson) => { onSuccess: (ajson) => {
$('#divTXMaster').html(ajson.html); $('#divTXMaster').html(ajson.html);
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','CabID','Grup_MemberID'], {'selectFunc':this.Produk_Comp}); FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','CabID','Grup_MemberID'], {'selectFunc':this.Produk_Comp, 'breakFocus': true});
$('#Nama_Produk').click(() => $('#Nama_Produk').select()); $('#Nama_Produk').click(() => $('#Nama_Produk').select());
$('#POS_Qty').on({ $('#POS_Qty').on({
keyup: (e) => { keyup: (e) => {
@@ -324,28 +324,28 @@ var JualJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Jual'] sendParam: ['mode','No_Jual']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-pending"){ } else if (tipe=="brow-pending"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_pending', url: this.PHP + '/brow_pending',
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Grup_MemberID'], sendParam: ['Cari_Produk','Grup_MemberID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -353,13 +353,13 @@ var JualJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Grup_MemberID').val(item.data); $('#Grup_MemberID').val(item.data);
JualJS.update_Piutang(); JualJS.update_Piutang();
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val()); var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':'); var adata = item.data.split(':');
// M : Grup_Member // M : Grup_Member
@@ -371,7 +371,7 @@ var JualJS = {
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok // P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
//todo: jika stok kosong tidak simpan !! //todo: jika stok kosong tidak simpan !!
//if (parseInt(adata[5])>0 || _qty<0){ //if (parseInt(adata[5])>0 || _qty<0){
new Request.JSONF({ new Request_JSF({
url: JualJS.PHP + '/table_detail', url: JualJS.PHP + '/table_detail',
sendParam: ['mode','mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]], sendParam: ['mode','mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]],
onSuccess: () => $('#POS_Qty').val('1.00') onSuccess: () => $('#POS_Qty').val('1.00')
@@ -385,15 +385,15 @@ var JualJS = {
$('#Nama_Produk').val('').focus(); $('#Nama_Produk').val('').focus();
}, },
update_Piutang: function(){ update_Piutang() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/update_piutang', url: this.PHP + '/update_piutang',
sendParam: ['MemberID'], sendParam: ['MemberID'],
onSuccess: () => FoniaJS.setFocus('#Nama_Produk') onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
}).send(); }).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==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)); 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)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2));
+25 -25
View File
@@ -14,7 +14,7 @@ var MutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -25,7 +25,7 @@ var MutasiJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -42,17 +42,17 @@ var MutasiJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Mutasi').val(acell[0]); $('#No_Mutasi').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Mutasi').val()){ if (!$('#No_Mutasi').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -60,7 +60,7 @@ var MutasiJS = {
FoniaJS.showAuth(function(){this.data_query('master', 'edit')}.bind(this), this, 'EDIT '+$('#No_Mutasi').val()); FoniaJS.showAuth(function(){this.data_query('master', 'edit')}.bind(this), this, 'EDIT '+$('#No_Mutasi').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Mutasi').val()){ if (!$('#No_Mutasi').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -84,7 +84,7 @@ var MutasiJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Dari_CabID').val()==0){ if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !"); FoniaJS.showError("Silakan pilih Dari Cabang !");
return; return;
@@ -100,14 +100,14 @@ var MutasiJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Mutasi').val(''); $('#No_Mutasi').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Mutasi').val()) { if ($('#No_Mutasi').val()) {
var cetak = new Printer('report/nota/mutasi'); var cetak = new Printer('report/nota/mutasi');
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val()); cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val());
@@ -117,7 +117,7 @@ var MutasiJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
tx_print_pos: function(){ tx_print_pos() {
if ($('#No_Mutasi').val()) { if ($('#No_Mutasi').val()) {
var cetak = new PrinterPos('report/nota/mutasi_pos'); var cetak = new PrinterPos('report/nota/mutasi_pos');
cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val()); cetak.add_param("Nomor_Cetak", $('#No_Mutasi').val());
@@ -127,7 +127,7 @@ var MutasiJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
produk_brow: function(){ produk_brow() {
if ($('#Dari_CabID').val()==0){ if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !"); FoniaJS.showError("Silakan pilih Dari Cabang !");
return; return;
@@ -148,12 +148,12 @@ var MutasiJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); 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({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Mutasi','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Mutasi','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianID='+VarianID],
@@ -174,13 +174,13 @@ var MutasiJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Mutasi','ID='+acell[0]], sendParam: ['mode','mode_detail=delete','No_Mutasi','ID='+acell[0]],
onSuccess: () => $('#Nama_Produk').focus() onSuccess: () => $('#Nama_Produk').focus()
@@ -188,8 +188,8 @@ var MutasiJS = {
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Mutasi','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Dari_CabID','Ke_CabID'], sendParam: ['mode','mode_detail','No_Mutasi','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Dari_CabID','Ke_CabID'],
onSuccess: () => { onSuccess: () => {
@@ -199,7 +199,7 @@ var MutasiJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Mutasi'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; 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']; if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Mutasi','Tgl_Mutasi','Dari_CabID','Ke_CabID','Catatan'];
@@ -249,18 +249,18 @@ var MutasiJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Mutasi'] sendParam: ['mode','No_Mutasi']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Dari_CabID'], sendParam: ['Cari_Produk','Dari_CabID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -268,7 +268,7 @@ var MutasiJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
if ($('#Dari_CabID').val()==0){ if ($('#Dari_CabID').val()==0){
FoniaJS.showError("Silakan pilih Dari Cabang !"); FoniaJS.showError("Silakan pilih Dari Cabang !");
return; return;
@@ -276,7 +276,7 @@ var MutasiJS = {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val()); var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':'); var adata = item.data.split(':');
// Satuan : Varian : Harga_Pokok // Satuan : Varian : Harga_Pokok
new Request.JSONF({ new Request_JSF({
url: MutasiJS.PHP + '/table_detail', url: MutasiJS.PHP + '/table_detail',
sendParam: ['mode','mode_detail=insert','No_Mutasi','InvID='+item.value,'SatuanID='+adata[0],'VarianID='+adata[1],'Qty='+_qty,'Harga_Beli='+adata[2]], sendParam: ['mode','mode_detail=insert','No_Mutasi','InvID='+item.value,'SatuanID='+adata[0],'VarianID='+adata[1],'Qty='+_qty,'Harga_Beli='+adata[2]],
onSuccess: () => $('#POS_Qty').val('1.00') onSuccess: () => $('#POS_Qty').val('1.00')
@@ -284,7 +284,7 @@ var MutasiJS = {
$('#Nama_Produk').val('').focus(); $('#Nama_Produk').val('').focus();
}, },
Hitung_Detail: function(){ Hitung_Detail() {
$('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * FoniaJS.StrToFloat($('#Harga_Beli').val()), 2));
} }
+23 -23
View File
@@ -14,7 +14,7 @@ var OpnameJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var OpnameJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var OpnameJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_Opname').val(acell[0]); $('#No_Opname').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_Opname').val()){ if (!$('#No_Opname').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -59,7 +59,7 @@ var OpnameJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Opname').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_Opname').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_Opname').val()){ if (!$('#No_Opname').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -83,7 +83,7 @@ var OpnameJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -91,14 +91,14 @@ var OpnameJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_Opname').val(''); $('#No_Opname').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(prt){ tx_print(prt) {
if ($('#No_Opname').val()) { if ($('#No_Opname').val()) {
var cetak = new Printer('report/nota/opname'); var cetak = new Printer('report/nota/opname');
cetak.add_param("Nomor_Cetak", $('#No_Opname').val()); cetak.add_param("Nomor_Cetak", $('#No_Opname').val());
@@ -108,7 +108,7 @@ var OpnameJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
produk_brow: function(){ produk_brow() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -129,12 +129,12 @@ var OpnameJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); 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({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'No_Opname','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianIID='+VarianID], sendParam: ['mode','mode_detail='+mode,'No_Opname','ID='+ID,'InvID='+InvID,'SatuanID='+SatuanID,'VarianIID='+VarianID],
@@ -157,7 +157,7 @@ var OpnameJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
if ($('#CabID').val()==0){ if ($('#CabID').val()==0){
FoniaJS.showError("Silakan pilih Nama Cabang !"); FoniaJS.showError("Silakan pilih Nama Cabang !");
return; return;
@@ -165,26 +165,26 @@ var OpnameJS = {
this.detail_produk('insert', 0, 0, 0, 0); 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]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[2]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','No_Opname','ID='+acell[0]] sendParam: ['mode','mode_detail=delete','No_Opname','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if (parseInt($('#InvID').val())==0) { if (parseInt($('#InvID').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
return; return;
} }
var _mdetail = $('#mode_detail').val(); var _mdetail = $('#mode_detail').val();
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','No_Opname','CabID','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'], sendParam: ['mode','mode_detail','No_Opname','CabID','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli'],
onSuccess: () => { onSuccess: () => {
@@ -193,7 +193,7 @@ var OpnameJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
var sparam = ['mode='+mode,'No_Opname'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_Opname'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Opname','Tgl_Opname','CabID','Catatan']; if ((mode ?? '')=='save') sparam = ['mode='+mode,'No_Opname','Tgl_Opname','CabID','Catatan'];
@@ -231,18 +231,18 @@ var OpnameJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','No_Opname'] sendParam: ['mode','No_Opname']
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['CabID','Cari_Produk'], sendParam: ['CabID','Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -250,7 +250,7 @@ var OpnameJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
// Satuan : Varian : Harga_Pokok : Satuan : Stok // Satuan : Varian : Harga_Pokok : Satuan : Stok
$('#InvID').val(item.value); $('#InvID').val(item.value);
+8 -8
View File
@@ -15,7 +15,7 @@ var OpnameBarangJS = {
KODE: '', KODE: '',
html5QrcodeScanner: null, html5QrcodeScanner: null,
index: function(){ index() {
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
$('#butBrow').click(() => this.produk_brow()); $('#butBrow').click(() => this.produk_brow());
if (FoniaJS.WEB_MOBILE){ if (FoniaJS.WEB_MOBILE){
@@ -28,7 +28,7 @@ var OpnameBarangJS = {
} }
}, },
proses_save: function(){ proses_save() {
if ($('#InvID').val()==0) { if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Produk!'); FoniaJS.showError('Silakan masukkan Nama Produk!');
return; return;
@@ -50,7 +50,7 @@ var OpnameBarangJS = {
}).send(); }).send();
}, },
ScanSukses: function(decodedText, decodedResult){ ScanSukses(decodedText, decodedResult) {
new Request({ new Request({
url: OpnameBarangJS.PHP + '/scan_produk', url: OpnameBarangJS.PHP + '/scan_produk',
sendParam: ['Cari_Produk='+decodedText], sendParam: ['Cari_Produk='+decodedText],
@@ -70,7 +70,7 @@ var OpnameBarangJS = {
this.html5QrcodeScanner.pause(); 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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -87,7 +87,7 @@ var OpnameBarangJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#SatuanID').val(acell[1]); $('#SatuanID').val(acell[1]);
@@ -101,9 +101,9 @@ var OpnameBarangJS = {
FoniaJS.setFocus('#Stok_Fisik'); FoniaJS.setFocus('#Stok_Fisik');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -111,7 +111,7 @@ var OpnameBarangJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
// Cari by SKU + Barcode // Cari by SKU + Barcode
// Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok // Satuan : Varian : SKU + Barcode : Harga_Pokok : Satuan : PPN : Stok
var adata = item.data.split(':'); var adata = item.data.split(':');
+41 -41
View File
@@ -17,8 +17,8 @@ var POSJS = {
POLE_CONF: {}, POLE_CONF: {},
Simpan: false, Simpan: false,
index: function(){ index() {
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','Grup_MemberID'], {'selectFunc': this.Produk_Comp, 'keyFunc': this.Produk_Key}); FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['No_Jual','Grup_MemberID'], {'selectFunc': this.Produk_Comp, 'keyFunc': this.Produk_Key, 'breakFocus': true});
$('#Nama_Produk').click(() => $('#Nama_Produk').select()); $('#Nama_Produk').click(() => $('#Nama_Produk').select());
$('#POS_Qty').on({ $('#POS_Qty').on({
keyup: (e) => { keyup: (e) => {
@@ -34,20 +34,20 @@ var POSJS = {
this.data_query('config-pole'); this.data_query('config-pole');
}, },
proses_oc: function(){ proses_oc() {
var cetak = new PrinterPos('report/nota/open_cash'); var cetak = new PrinterPos('report/nota/open_cash');
cetak.exec(); cetak.exec();
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
}, },
proses_print: function(oc){ proses_print(oc) {
var cetak = new PrinterPos('report/nota/pos'); var cetak = new PrinterPos('report/nota/pos');
cetak.add_param("Nomor_Cetak", $('#No_Cetak').val()); cetak.add_param("Nomor_Cetak", $('#No_Cetak').val());
cetak.add_param("Open_Cash", oc); cetak.add_param("Open_Cash", oc);
cetak.exec(); cetak.exec();
}, },
proses_cancel: function(){ proses_cancel() {
if ($('#Total_Item').val()==0) { if ($('#Total_Item').val()==0) {
FoniaJS.showInfo('Tidak ada item barang !'); FoniaJS.showInfo('Tidak ada item barang !');
return; return;
@@ -55,7 +55,7 @@ var POSJS = {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin membatalkan ?<br>Semua item nota ini akan dihapus !', () => this.data_query('master','cancel'), 'danger'); FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin membatalkan ?<br>Semua item nota ini akan dihapus !', () => this.data_query('master','cancel'), 'danger');
}, },
nota_brow: function(){ nota_brow() {
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Nota" 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="divBrowNota">&nbsp;</div>'); var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Nota" 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="divBrowNota">&nbsp;</div>');
this.winBNota = FoniaJS.showWindow('BNota', 'Daftar Transaksi', _isi, 'xl', '', () => { this.winBNota = FoniaJS.showWindow('BNota', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBNota') $('#winBNota')
@@ -72,7 +72,7 @@ var POSJS = {
}); });
}, },
nota_print: function(acell){ nota_print(acell) {
FoniaJS.closeWindow(this.winBNota); FoniaJS.closeWindow(this.winBNota);
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
$('#No_Cetak').val(acell[0]); $('#No_Cetak').val(acell[0]);
@@ -80,7 +80,7 @@ var POSJS = {
}, 'info'); }, 'info');
}, },
nota_select: function(acell){ nota_select(acell) {
FoniaJS.closeWindow(this.winBNota); FoniaJS.closeWindow(this.winBNota);
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
@@ -88,7 +88,7 @@ var POSJS = {
}, this, 'EDIT POS : '+acell[0]); }, this, 'EDIT POS : '+acell[0]);
}, },
nota_delete: function(acell){ nota_delete(acell) {
FoniaJS.closeWindow(this.winBNota); FoniaJS.closeWindow(this.winBNota);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
@@ -98,17 +98,17 @@ var POSJS = {
}, 'danger'); }, 'danger');
}, },
pending_brow: function(){ pending_brow() {
this.winBPend = FoniaJS.showWindow('BPend', 'Daftar Pending POS', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending')); this.winBPend = FoniaJS.showWindow('BPend', 'Daftar Pending POS', '<div id="divBrowPending">&nbsp;</div>', 'xl', '', () => this.data_query('brow-pending'));
}, },
pending_select: function(acell){ pending_select(acell) {
FoniaJS.closeWindow(this.winBPend); FoniaJS.closeWindow(this.winBPend);
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
this.data_query('master', 'pending-edit'); this.data_query('master', 'pending-edit');
}, },
pending_delete: function(acell){ pending_delete(acell) {
FoniaJS.closeWindow(this.winBPend); FoniaJS.closeWindow(this.winBPend);
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Transaksi Pending "'+acell[0]+'" ?', () => {
$('#No_Jual').val(acell[0]); $('#No_Jual').val(acell[0]);
@@ -116,7 +116,7 @@ var POSJS = {
}, 'danger'); }, '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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -133,7 +133,7 @@ var POSJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Grup_MemberID').val(acell[1]); $('#Grup_MemberID').val(acell[1]);
@@ -142,7 +142,7 @@ var POSJS = {
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
}, },
produk_brow: function(){ produk_brow() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -164,12 +164,12 @@ var POSJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], acell[2]); 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){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -202,12 +202,12 @@ var POSJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]); this.detail_produk('update', acell[0], acell[1], acell[2], acell[3]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]], sendParam: ['mode_detail=delete','No_Jual','ID='+acell[0]],
onSuccess: () => { onSuccess: () => {
@@ -220,12 +220,12 @@ var POSJS = {
}).send(); }).send();
}, },
detail_simpan: function(){ detail_simpan() {
if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) { if (FoniaJS.StrToFloat($('#Disk_Persen').val()) >= 100) {
FoniaJS.showInfo('Nilai Diskon diluar batas !'); FoniaJS.showInfo('Nilai Diskon diluar batas !');
return false; return false;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'], sendParam: ['mode_detail','No_Jual','ID','InvID','SatuanID','VarianID','Qty','Harga_Beli','Harga_Jual','Disk_Rupiah','Disk_Persen'],
onSuccess: () => { onSuccess: () => {
@@ -239,7 +239,7 @@ var POSJS = {
}).send(); }).send();
}, },
kasir_show: function(){ kasir_show() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
FoniaJS.setFocus('Nama_Member'); FoniaJS.setFocus('Nama_Member');
@@ -263,26 +263,26 @@ var POSJS = {
$('#butKBatal').click(() => $('#Nama_Produk').focus()); $('#butKBatal').click(() => $('#Nama_Produk').focus());
$('#popTotal_Tunai').keyup((e) => { $('#popTotal_Tunai').keyup((e) => {
if (13 == e.which && parseFloat(e.target.value) == 0){ if (13 == e.which && parseFloat(e.target.value) == 0){
e.target.value = FoniaJS.FloatToStr($('#Total_Nota').val()); e.target.value = $('#Total_Nota').val()-FoniaJS.StrToFloat($('#popTotal_Kartu').val());
} }
if (27 == e.which) { if (27 == e.which) {
FoniaJS.closeWindow(this.winKasir); FoniaJS.closeWindow(this.winKasir);
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
} }
this.kasir_hitung(); this.kasir_hitung();
if (parseFloat(e.target.value) == 0) return false; //if (parseFloat(e.target.value) == 0) return false;
if (13 == e.which) $('#butKBayar').focus(); if (13 == e.which) $('#butKBayar').focus();
}); });
$('#popTotal_Kartu').keyup((e) => { $('#popTotal_Kartu').keyup((e) => {
if (13 == e.which && $('#popKartuID').val() > 0 && parseFloat(e.target.value) == 0){ if (13 == e.which && $('#popKartuID').val() > 0 && parseFloat(e.target.value) == 0){
e.target.value = FoniaJS.FloatToStr($('#Total_Nota').val()-FoniaJS.StrToFloat($('#popTotal_Tunai').val())); e.target.value = $('#Total_Nota').val()-FoniaJS.StrToFloat($('#popTotal_Tunai').val());
} }
if (27 == e.which) { if (27 == e.which) {
FoniaJS.closeWindow(this.winKasir); FoniaJS.closeWindow(this.winKasir);
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
} }
this.kasir_hitung(); this.kasir_hitung();
if (parseFloat(e.target.value) == 0) return false; //if (parseFloat(e.target.value) == 0) return false;
if (13 == e.which) $('#butKBayar').focus(); if (13 == e.which) $('#butKBayar').focus();
}); });
$('#popKartuID').change(() => { $('#popKartuID').change(() => {
@@ -310,14 +310,14 @@ var POSJS = {
}).send(); }).send();
}, },
kasir_hitung: function(){ kasir_hitung() {
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val()); const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
$('#popTotal_Bayar').val(totBayar); $('#popTotal_Bayar').val(totBayar);
$('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success'); $('#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 totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val());
const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const jenKartu = $('#popKartuID').val(); const jenKartu = $('#popKartuID').val();
@@ -350,12 +350,12 @@ var POSJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
kasir_pending: function(){ kasir_pending() {
FoniaJS.closeWindow(this.winKasir); FoniaJS.closeWindow(this.winKasir);
this.data_query('master', 'pending-save'); this.data_query('master', 'pending-save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=='master'){ if (tipe=='master'){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_Jual','No_Cetak']; var sparam = ['mode='+mode,'No_Jual','No_Cetak'];
@@ -392,28 +392,28 @@ var POSJS = {
} }
}).send(); }).send();
} else if (tipe=='detail'){ } else if (tipe=='detail'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['No_Jual'] sendParam: ['No_Jual']
}).send(); }).send();
} else if (tipe=='brow-nota'){ } else if (tipe=='brow-nota'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_nota', url: this.PHP + '/brow_nota',
sendParam: ['Cari_Nota'], sendParam: ['Cari_Nota'],
onSuccess: () => FoniaJS.setFocus('#Cari_Nota') onSuccess: () => FoniaJS.setFocus('#Cari_Nota')
}).send(); }).send();
} else if (tipe=='brow-pending'){ } else if (tipe=='brow-pending'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_pending', url: this.PHP + '/brow_pending',
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
}).send(); }).send();
} else if (tipe=='brow-produk'){ } else if (tipe=='brow-produk'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Grup_MemberID'], sendParam: ['Cari_Produk','Grup_MemberID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -434,7 +434,7 @@ var POSJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Grup_MemberID').val(adata[0]); $('#Grup_MemberID').val(adata[0]);
@@ -442,7 +442,7 @@ var POSJS = {
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var _qty = FoniaJS.StrToFloat($('#POS_Qty').val()); var _qty = FoniaJS.StrToFloat($('#POS_Qty').val());
var adata = item.data.split(':'); var adata = item.data.split(':');
// M : Grup_Member : Info_Member // M : Grup_Member : Info_Member
@@ -455,7 +455,7 @@ var POSJS = {
// P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok // P : Satuan : Varian : Harga_Pokok : Harga_Jual : Stok
//todo: jika stok kosong tidak simpan !! //todo: jika stok kosong tidak simpan !!
//if (parseInt(adata[5])>0 || _qty<0){ //if (parseInt(adata[5])>0 || _qty<0){
new Request.JSONF({ new Request_JSF({
url: POSJS.PHP + '/table_detail', url: POSJS.PHP + '/table_detail',
sendParam: ['mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]], sendParam: ['mode_detail=insert','No_Jual','InvID='+item.value,'SatuanID='+adata[1],'VarianID='+adata[2],'Qty='+_qty,'Harga_Beli='+adata[3],'Harga_Jual='+adata[4]],
onSuccess: () => { onSuccess: () => {
@@ -475,7 +475,7 @@ var POSJS = {
$('#Nama_Produk').val('').focus(); $('#Nama_Produk').val('').focus();
}, },
Produk_Key: function(key, val){ Produk_Key(key, val) {
if (key == 13) { if (key == 13) {
POSJS.kasir_show(); POSJS.kasir_show();
} else if (key == 117) {//f6 } else if (key == 117) {//f6
@@ -487,7 +487,7 @@ var POSJS = {
} }
}, },
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==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)); 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)); $('#Jumlah').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Qty').val()) * (FoniaJS.StrToFloat($('#Harga_Jual').val()) - FoniaJS.StrToFloat($('#Disk_Rupiah').val())), 2));
+2 -2
View File
@@ -43,7 +43,7 @@ $(document).ready(function(){
var LoginJS = { var LoginJS = {
Tampil_Login: function(){ Tampil_Login() {
var Username = FoniaJS.getCookie('Username'); var Username = FoniaJS.getCookie('Username');
if (Username != '') { if (Username != '') {
$('#Username').val(Username); $('#Username').val(Username);
@@ -53,7 +53,7 @@ var LoginJS = {
} }
}, },
Proses_Login: function(){ Proses_Login() {
if (!$('#Username').val()){ if (!$('#Username').val()){
$('#Username').focus(); $('#Username').focus();
FoniaJS.showError('Silahkan masukkan Username !'); FoniaJS.showError('Silahkan masukkan Username !');
+4 -4
View File
@@ -14,17 +14,17 @@ var MemberBaruJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butTambah').click(() => this.proses_add()); $('#butTambah').click(() => this.proses_add());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('view'); this.data_query('view');
}, },
proses_add: function(){ proses_add() {
this.data_query('add'); this.data_query('add');
}, },
proses_save: function(){ proses_save() {
new Request({ new Request({
url: this.PHP + '/proses_simpan', 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'], 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() }).send()
}, },
data_query: function(mode){ data_query(mode) {
new Request({ new Request({
url: this.PHP + '/form_master', url: this.PHP + '/form_master',
sendParam: ['mode='+mode], sendParam: ['mode='+mode],
+8 -8
View File
@@ -15,7 +15,7 @@ var MemberPointJS = {
KODE: '', KODE: '',
html5QrcodeScanner: null, html5QrcodeScanner: null,
index: function(){ index() {
$('#butBrow').click(() => this.member_brow()); $('#butBrow').click(() => this.member_brow());
if (FoniaJS.WEB_MOBILE){ if (FoniaJS.WEB_MOBILE){
html5QrcodeScanner = new Html5Qrcode('qr-reader'); html5QrcodeScanner = new Html5Qrcode('qr-reader');
@@ -27,7 +27,7 @@ var MemberPointJS = {
this.data_query('table-point'); this.data_query('table-point');
}, },
ScanSukses: function(decodedText, decodedResult){ ScanSukses(decodedText, decodedResult) {
new Request({ new Request({
url: MemberPointJS.PHP + '/scan_member', url: MemberPointJS.PHP + '/scan_member',
sendParam: ['Cari_Member='+decodedText], sendParam: ['Cari_Member='+decodedText],
@@ -41,7 +41,7 @@ var MemberPointJS = {
}).send(); }).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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -58,7 +58,7 @@ var MemberPointJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Kode_Member').val(acell[1]); $('#Kode_Member').val(acell[1]);
@@ -67,14 +67,14 @@ var MemberPointJS = {
this.data_query('table-point'); this.data_query('table-point');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="table-point"){ if (tipe=="table-point"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_point', url: this.PHP + '/table_point',
sendParam: ['MemberID'] sendParam: ['MemberID']
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -82,7 +82,7 @@ var MemberPointJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Kode_Member').val(adata[0]); $('#Kode_Member').val(adata[0]);
+21 -21
View File
@@ -14,7 +14,7 @@ var MemberTukarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#butUbah').click(() => this.tx_ubah()); $('#butUbah').click(() => this.tx_ubah());
$('#butHapus').click(() => this.tx_hapus()); $('#butHapus').click(() => this.tx_hapus());
@@ -24,7 +24,7 @@ var MemberTukarJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -41,17 +41,17 @@ var MemberTukarJS = {
}); });
}, },
tx_select: function(acell){ tx_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#No_TX').val(acell[0]); $('#No_TX').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
tx_tambah: function(){ tx_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
tx_ubah: function(){ tx_ubah() {
if (!$('#No_TX').val()){ if (!$('#No_TX').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -59,7 +59,7 @@ var MemberTukarJS = {
FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_TX').val()); FoniaJS.showAuth(() => this.data_query('master', 'edit'), this, 'EDIT '+$('#No_TX').val());
}, },
tx_hapus: function(){ tx_hapus() {
if (!$('#No_TX').val()){ if (!$('#No_TX').val()){
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
return; return;
@@ -83,7 +83,7 @@ var MemberTukarJS = {
}, 'danger'); }, 'danger');
}, },
tx_simpan: function(){ tx_simpan() {
if ($('#Point_TipeID').val()==0){ if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !"); FoniaJS.showError("Silakan pilih Tipe Point !");
return; return;
@@ -109,14 +109,14 @@ var MemberTukarJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
tx_batal: function(){ tx_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#No_TX').val(''); $('#No_TX').val('');
}, 'danger'); }, 'danger');
}, },
tx_print: function(){ tx_print() {
if ($('#No_TX').val()) { if ($('#No_TX').val()) {
var cetak = new PrinterPos('report/nota/tukarpoint_pos'); var cetak = new PrinterPos('report/nota/tukarpoint_pos');
cetak.add_param("Nomor_Cetak", $('#No_TX').val()); cetak.add_param("Nomor_Cetak", $('#No_TX').val());
@@ -126,7 +126,7 @@ var MemberTukarJS = {
FoniaJS.showError("Silakan masukkan Nomor Transaksi !"); FoniaJS.showError("Silakan masukkan Nomor Transaksi !");
}, },
member_brow: function(){ member_brow() {
if ($('#Point_TipeID').val()==0){ if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !"); FoniaJS.showError("Silakan pilih Tipe Point !");
return; return;
@@ -147,14 +147,14 @@ var MemberTukarJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[3]); $('#Nama_Member').val(acell[3]);
$('#Sisa_Point').val(acell[6]); $('#Sisa_Point').val(acell[6]);
}, },
barang_brow: function(){ barang_brow() {
if ($('#Point_TipeID').val()==0){ if ($('#Point_TipeID').val()==0){
FoniaJS.showError("Silakan pilih Tipe Point !"); FoniaJS.showError("Silakan pilih Tipe Point !");
return; return;
@@ -175,7 +175,7 @@ var MemberTukarJS = {
}); });
}, },
barang_select: function(acell){ barang_select(acell) {
FoniaJS.closeWindow(this.winBBarang); FoniaJS.closeWindow(this.winBBarang);
$('#InvPID').val(acell[0]); $('#InvPID').val(acell[0]);
$('#Nama_Barang').val(acell[2]); $('#Nama_Barang').val(acell[2]);
@@ -185,7 +185,7 @@ var MemberTukarJS = {
this.Hitung_Point(); this.Hitung_Point();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'No_TX'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -238,18 +238,18 @@ var MemberTukarJS = {
} }
}).send(); }).send();
} else if (tipe=="brow-tx"){ } else if (tipe=="brow-tx"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_tx', url: this.PHP + '/brow_tx',
sendParam: ['Cari_TX'], sendParam: ['Cari_TX'],
onSuccess: () => FoniaJS.setFocus('#Cari_TX') onSuccess: () => FoniaJS.setFocus('#Cari_TX')
}).send(); }).send();
} else if (tipe=="brow-member"){ } else if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member','Point_TipeID'] sendParam: ['Cari_Member','Point_TipeID']
}).send(); }).send();
} else if (tipe=="brow-barang"){ } else if (tipe=="brow-barang"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_barang', url: this.PHP + '/brow_barang',
sendParam: ['Cari_Barang','Point_TipeID'], sendParam: ['Cari_Barang','Point_TipeID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Barang') onSuccess: () => FoniaJS.setFocus('#Cari_Barang')
@@ -257,13 +257,13 @@ var MemberTukarJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
$('#Sisa_Point').val(item.data); $('#Sisa_Point').val(item.data);
$('#Nama_Barang').focus(); $('#Nama_Barang').focus();
}, },
Barang_Comp: function(item){ Barang_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvPID').val(item.value); $('#InvPID').val(item.value);
$('#Nilai_Barang').val(adata[1]); $('#Nilai_Barang').val(adata[1]);
@@ -273,11 +273,11 @@ var MemberTukarJS = {
this.Hitung_Point(); this.Hitung_Point();
}, },
oc_Tipe: function(){ oc_Tipe() {
// //
}, },
Hitung_Point: function(){ Hitung_Point() {
var qty = FoniaJS.StrToFloat($('#Qty').val()); var qty = FoniaJS.StrToFloat($('#Qty').val());
var point = FoniaJS.StrToFloat($('#Point').val()); var point = FoniaJS.StrToFloat($('#Point').val());
$('#Nilai_Point').val(FoniaJS.FloatToStr(qty * point,0)); $('#Nilai_Point').val(FoniaJS.FloatToStr(qty * point,0));
+6 -6
View File
@@ -56,7 +56,7 @@ var MonJS = {
ID_CABANG: 0, ID_CABANG: 0,
TOTAL_SHOP: 0, TOTAL_SHOP: 0,
index: function(){ index() {
new Request({ new Request({
url: this.PHP + '/index', url: this.PHP + '/index',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -70,31 +70,31 @@ var MonJS = {
}).send(); }).send();
}, },
hide_pos: function(){ hide_pos() {
this.ISSHOW_POS = false; this.ISSHOW_POS = false;
$('#divBanner').removeClass('d-none'); $('#divBanner').removeClass('d-none');
$('#divShop').addClass('d-none'); $('#divShop').addClass('d-none');
}, },
show_pos: function(){ show_pos() {
this.ISSHOW_POS = true; this.ISSHOW_POS = true;
$('#divBanner').addClass('d-none'); $('#divBanner').addClass('d-none');
$('#divShop').removeClass('d-none'); $('#divShop').removeClass('d-none');
this.data_query('shop'); this.data_query('shop');
}, },
hide_thank: function(){ hide_thank() {
$('#divBlur').addClass('d-none'); $('#divBlur').addClass('d-none');
$('#divThank').addClass('d-none'); $('#divThank').addClass('d-none');
}, },
show_thank: function(){ show_thank() {
$('#divBlur').removeClass('d-none'); $('#divBlur').removeClass('d-none');
$('#divThank').removeClass('d-none'); $('#divThank').removeClass('d-none');
this.data_query('thank'); this.data_query('thank');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe == 'config'){ if (tipe == 'config'){
$.post(this.PHP + '/config', {}, (ajson) => { $.post(this.PHP + '/config', {}, (ajson) => {
if (ajson.PROMO_DURASI) MonJS.DEF_PROMO_DUR = ajson.PROMO_DURASI; if (ajson.PROMO_DURASI) MonJS.DEF_PROMO_DUR = ajson.PROMO_DURASI;
+13 -13
View File
@@ -14,7 +14,7 @@ var PPOBTXJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-detail'); this.data_query('tabel-detail');
$('#Cari_TX').keydown((e) => { $('#Cari_TX').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,44 +28,44 @@ var PPOBTXJS = {
FoniaJS.setFocus('#Cari_TX'); FoniaJS.setFocus('#Cari_TX');
}, },
proses_print: function(oc, no_cetak){ proses_print(oc, no_cetak) {
var cetak = new PrinterPos('report/nota/ppob'); var cetak = new PrinterPos('report/nota/ppob');
cetak.add_param("Nomor_Cetak", no_cetak); cetak.add_param("Nomor_Cetak", no_cetak);
cetak.add_param("Open_Cash", oc); cetak.add_param("Open_Cash", oc);
cetak.exec(); cetak.exec();
}, },
proses_delete: function(no_tx){ proses_delete(no_tx) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX'] sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send(); }).send();
}, },
proses_reproc: function(no_tx){ proses_reproc(no_tx) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX'] sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send(); }).send();
}, },
nota_print: function(acell){ nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]); this.proses_print(0, acell[0]);
}, 'info'); }, 'info');
}, },
nota_delete: function(acell){ nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]); FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
}, 'danger'); }, 'danger');
}, },
nota_reproc: function(acell){ nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning'); FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
}, },
nota_detail: function(acell){ nota_detail(acell) {
new Request({ new Request({
url: this.PHP + '/form_tx', url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]], sendParam: ['No_TX='+acell[0]],
@@ -75,7 +75,7 @@ var PPOBTXJS = {
}).send(); }).send();
}, },
saldo_ppob: function(){ saldo_ppob() {
new Request({ new Request({
url: this.PHP + '/form_saldo', url: this.PHP + '/form_saldo',
onSuccess: (adata) => { onSuccess: (adata) => {
@@ -85,9 +85,9 @@ var PPOBTXJS = {
}).send(); }).send();
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="tabel-detail"){ if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['Tgl_From','Tgl_To','Cari_TX'] sendParam: ['Tgl_From','Tgl_To','Cari_TX']
}).send(); }).send();
+23 -23
View File
@@ -19,7 +19,7 @@ var PrabayarJS = {
KATE_PREFIX: [1,2,3,4], KATE_PREFIX: [1,2,3,4],
KATE_TOKEN: [5], KATE_TOKEN: [5],
index: function(){ index() {
$('#Cari_PPOB').keydown((e) => { $('#Cari_PPOB').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('tabel-tx'); if (key==13 && e.target.value!='') this.data_query('tabel-tx');
@@ -34,7 +34,7 @@ var PrabayarJS = {
this.data_query('pole-config'); 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'); var cetak = new PrinterPos('apps/php/repo/nota.php');
cetak.add_param("data", "ppob-pos"); cetak.add_param("data", "ppob-pos");
cetak.add_param("Nomor_Cetak", no_cetak); cetak.add_param("Nomor_Cetak", no_cetak);
@@ -42,31 +42,31 @@ var PrabayarJS = {
cetak.exec(); cetak.exec();
}, },
proses_delete: function(){ proses_delete() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX'] sendParam: ['mode_detail=delete','No_TX']
}).send(); }).send();
}, },
proses_reproc: function(ft){ proses_reproc(ft) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX','FT='+ft] sendParam: ['mode_detail=reproc','No_TX','FT='+ft]
}).send(); }).send();
}, },
proses_cancel: function(){ proses_cancel() {
FoniaJS.showConfirm('Konfirmasi', 'Apakah Anda yakin ingin membatalkan ?', () => this.data_query('master','cancel'), 'danger'); 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]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]); this.proses_print(0, acell[0]);
}, 'info'); }, 'info');
}, },
nota_delete: function(acell){ nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
$('#No_TX').val(acell[0]); $('#No_TX').val(acell[0]);
@@ -75,14 +75,14 @@ var PrabayarJS = {
}, 'danger'); }, 'danger');
}, },
nota_reproc: function(acell){ nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => {
$('#No_TX').val(acell[0]); $('#No_TX').val(acell[0]);
this.proses_reproc(); this.proses_reproc();
}, 'warning'); }, 'warning');
}, },
nota_detail: function(acell){ nota_detail(acell) {
new Request({ new Request({
url: this.PHP + '/form_tx', url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]], sendParam: ['No_TX='+acell[0]],
@@ -92,7 +92,7 @@ var PrabayarJS = {
}).send(); }).send();
}, },
kasir_show: function(){ kasir_show() {
if ($('#Tujuan').val()=='') { if ($('#Tujuan').val()=='') {
FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !'); FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !');
FoniaJS.setFocus('#Tujuan'); FoniaJS.setFocus('#Tujuan');
@@ -163,14 +163,14 @@ var PrabayarJS = {
}).send(); }).send();
}, },
kasir_hitung: function(){ kasir_hitung() {
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val()); const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
$('#popTotal_Bayar').val(totBayar); $('#popTotal_Bayar').val(totBayar);
$('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success'); $('#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 totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val());
const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val()); const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const jenKartu = $('#popKartuID').val(); const jenKartu = $('#popKartuID').val();
@@ -203,7 +203,7 @@ var PrabayarJS = {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=='master'){ if (tipe=='master'){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX']; var sparam = ['mode='+mode,'No_TX'];
@@ -246,7 +246,7 @@ var PrabayarJS = {
} }
}).send(); }).send();
} else if (tipe=='tabel-tx'){ } else if (tipe=='tabel-tx'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_tx', url: this.PHP + '/table_tx',
sendParam: ['Cari_PPOB'] sendParam: ['Cari_PPOB']
}).send(); }).send();
@@ -266,7 +266,7 @@ var PrabayarJS = {
} }
}, },
oc_KateID: function(){ oc_KateID() {
if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) { if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) {
$('.rowToken').removeClass('d-none'); $('.rowToken').removeClass('d-none');
$('.rowPulsa').addClass('d-none'); $('.rowPulsa').addClass('d-none');
@@ -274,30 +274,30 @@ var PrabayarJS = {
$('.rowToken').addClass('d-none'); $('.rowToken').addClass('d-none');
$('.rowPulsa').removeClass('d-none'); $('.rowPulsa').removeClass('d-none');
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_operator', url: this.PHP + '/option_operator',
sendParam: ['KateID'], sendParam: ['KateID'],
}).send(); }).send();
}, },
oc_Tujuan: function(){ oc_Tujuan() {
if ($('#Tujuan').val()=='') return false; if ($('#Tujuan').val()=='') return false;
if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false; if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false;
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_operator', url: this.PHP + '/option_operator',
sendParam: ['KateID','Tujuan'], sendParam: ['KateID','Tujuan'],
}).send(); }).send();
}, },
oc_OpeID: function(){ oc_OpeID() {
if ($('#OpeID').val()==0) return false; if ($('#OpeID').val()==0) return false;
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_produk', url: this.PHP + '/option_produk',
sendParam: ['KateID','OpeID'], sendParam: ['KateID','OpeID'],
}).send(); }).send();
}, },
oc_ProdukID: function(){ oc_ProdukID() {
const obj = $('#ProdukID'); const obj = $('#ProdukID');
var harga = $(obj).find(":selected").attr('olabel'); var harga = $(obj).find(":selected").attr('olabel');
$('#Harga_Jual').val(harga); $('#Harga_Jual').val(harga);
+7 -7
View File
@@ -14,7 +14,7 @@ var TopupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-detail'); this.data_query('tabel-detail');
$('#butTambah').click(() => this.tx_tambah()); $('#butTambah').click(() => this.tx_tambah());
$('#Cari_Topup').keydown((e) => { $('#Cari_Topup').keydown((e) => {
@@ -29,11 +29,11 @@ var TopupJS = {
FoniaJS.setFocus('#Cari_Topup'); 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'); this.winInfo = FoniaJS.showWindow('', 'Informasi Topup Saldo', '<div class="form-control fs-4">'+acell[6]+'</div>', 'md');
}, },
tx_tambah: function(){ tx_tambah() {
new Request({ new Request({
url: this.PHP + '/form_topup', url: this.PHP + '/form_topup',
onSuccess: (a) => { onSuccess: (a) => {
@@ -46,22 +46,22 @@ var TopupJS = {
}).send(); }).send();
}, },
tx_simpan: function(){ tx_simpan() {
if (parseInt($('#Jumlah').val())==0) { if (parseInt($('#Jumlah').val())==0) {
FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !'); FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !');
$('#Jumlah').focus(); $('#Jumlah').focus();
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=insert','Tgl_Depo','Jumlah','Bank'], sendParam: ['mode_detail=insert','Tgl_Depo','Jumlah','Bank'],
onSuccess: () => FoniaJS.closeWindow(this.winDetail) onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send(); }).send();
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="tabel-detail"){ if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Topup'] sendParam: ['Cari_Topup']
}).send(); }).send();
+16 -16
View File
@@ -14,7 +14,7 @@ var PromoBarangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Promo').keydown((e) => { $('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoBarangJS = {
FoniaJS.setFocus('#Cari_Promo'); FoniaJS.setFocus('#Cari_Promo');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_promo', url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -49,17 +49,17 @@ var PromoBarangJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -67,8 +67,8 @@ var PromoBarangJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', 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'], 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'],
onSuccess: () => { onSuccess: () => {
@@ -78,7 +78,7 @@ var PromoBarangJS = {
}).send(); }).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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -96,7 +96,7 @@ var PromoBarangJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
var itipe = parseInt($('#Tipe_Brow').val()); var itipe = parseInt($('#Tipe_Brow').val());
if (itipe == 1){ if (itipe == 1){
@@ -110,14 +110,14 @@ var PromoBarangJS = {
} }
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['Cari_Promo'] sendParam: ['Cari_Promo']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -125,7 +125,7 @@ var PromoBarangJS = {
} }
}, },
update_Items: function(InvID, SatuanID, Tipe){ update_Items(InvID, SatuanID, Tipe) {
const elSatuan = (Tipe==1) ? $('#SatuanID') : $('#Promo_SatuanID'); const elSatuan = (Tipe==1) ? $('#SatuanID') : $('#Promo_SatuanID');
elSatuan.empty(); elSatuan.empty();
if (InvID==0) return false; if (InvID==0) return false;
@@ -141,7 +141,7 @@ var PromoBarangJS = {
}).send(); }).send();
}, },
oc_PilihQ: function(){ oc_PilihQ() {
var i = parseInt($('#Pilih_Qty').val()); var i = parseInt($('#Pilih_Qty').val());
if (i == 1){ if (i == 1){
$('#Qty_Min').prop('disabled', false); $('#Qty_Min').prop('disabled', false);
@@ -152,7 +152,7 @@ var PromoBarangJS = {
} }
}, },
oc_PilihP: function(){ oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val()); var i = parseInt($('#Tipe_Promo').val());
if (i == 1){ if (i == 1){
$('.promo1').removeClass('d-none'); $('.promo1').removeClass('d-none');
+26 -26
View File
@@ -14,7 +14,7 @@ var PromoBeliDiscJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butTambah').click(() => this.promo_tambah()); $('#butTambah').click(() => this.promo_tambah());
$('#butUbah').click(() => this.promo_ubah()); $('#butUbah').click(() => this.promo_ubah());
$('#butHapus').click(() => this.promo_hapus()); $('#butHapus').click(() => this.promo_hapus());
@@ -23,7 +23,7 @@ var PromoBeliDiscJS = {
this.data_query('master', 'view', ((typeof(q)!=='undefined') ? q : '')); 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>'); 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', '', () => { this.winBPromo = FoniaJS.showWindow('BPromo', 'Daftar Promo', _isi, 'xl', '', () => {
$('#winBPromo') $('#winBPromo')
@@ -40,17 +40,17 @@ var PromoBeliDiscJS = {
}); });
}, },
promo_select: function(acell){ promo_select(acell) {
FoniaJS.closeWindow(this.winBPromo); FoniaJS.closeWindow(this.winBPromo);
$('#Grup_PromoID').val(acell[0]); $('#Grup_PromoID').val(acell[0]);
this.data_query('master', 'view'); this.data_query('master', 'view');
}, },
promo_tambah: function(){ promo_tambah() {
this.data_query('master', 'add'); this.data_query('master', 'add');
}, },
promo_ubah: function(){ promo_ubah() {
if ($('#Grup_PromoID').val() == 0){ if ($('#Grup_PromoID').val() == 0){
FoniaJS.showError("Silakan pilih Nama Promo !"); FoniaJS.showError("Silakan pilih Nama Promo !");
return; return;
@@ -58,7 +58,7 @@ var PromoBeliDiscJS = {
this.data_query('master', 'edit'); this.data_query('master', 'edit');
}, },
promo_hapus: function(){ promo_hapus() {
if ($('#Grup_PromoID').val() == 0){ if ($('#Grup_PromoID').val() == 0){
FoniaJS.showError("Silakan pilih Nama Promo !"); FoniaJS.showError("Silakan pilih Nama Promo !");
return; return;
@@ -80,18 +80,18 @@ var PromoBeliDiscJS = {
}, 'danger'); }, 'danger');
}, },
promo_simpan: function(mode){ promo_simpan(mode) {
this.data_query('master', 'save'); this.data_query('master', 'save');
}, },
promo_batal: function(){ promo_batal() {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan membatalkan ?', () => {
this.data_query('master', 'cancel'); this.data_query('master', 'cancel');
$('#Grup_PromoID').val(0); $('#Grup_PromoID').val(0);
}, 'danger'); }, '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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -108,12 +108,12 @@ var PromoBeliDiscJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
this.detail_produk('insert', 0, acell[0], acell[1], '0'); 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({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode','mode_detail='+mode,'Grup_PromoID','PromoID='+PromoID,'InvID='+InvID,'SatuanID='+SatuanID,'Kode_Varian='+Kode_Varian], sendParam: ['mode','mode_detail='+mode,'Grup_PromoID','PromoID='+PromoID,'InvID='+InvID,'SatuanID='+SatuanID,'Kode_Varian='+Kode_Varian],
@@ -132,43 +132,43 @@ var PromoBeliDiscJS = {
}).send(); }).send();
}, },
detail_tambah: function() { detail_tambah() {
this.detail_produk('insert', 0, 0, 0, '0'); 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]); 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> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[5]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail=delete','Grup_PromoID','PromoID='+acell[0]], sendParam: ['mode','mode_detail=delete','Grup_PromoID','PromoID='+acell[0]],
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
if ($('#InvID').val() == 0) { if ($('#InvID').val() == 0) {
FoniaJS.showError('Silakan masukkan Nama Barang Promo !'); FoniaJS.showError('Silakan masukkan Nama Barang Promo !');
return; return;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','mode_detail','Grup_PromoID','PromoID','InvID','SatuanID','Kode_Varian'], sendParam: ['mode','mode_detail','Grup_PromoID','PromoID','InvID','SatuanID','Kode_Varian'],
onSuccess: () => FoniaJS.closeWindow(this.winDetail) onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send(); }).send();
}, },
varian_show: function(){ varian_show() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/form_varian', url: this.PHP + '/form_varian',
sendParam: ['InvID','SatuanID','Kode_Varian'] sendParam: ['InvID','SatuanID','Kode_Varian']
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="master"){ if (tipe=="master"){
mode = (mode) ? mode : ''; mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'Grup_PromoID'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]; var sparam = ['mode='+mode,'Grup_PromoID'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')];
@@ -202,18 +202,18 @@ var PromoBeliDiscJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-detail"){ } else if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Grup_PromoID'] sendParam: ['mode','Grup_PromoID']
}).send(); }).send();
} else if (tipe=="brow-promo"){ } else if (tipe=="brow-promo"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_promo', url: this.PHP + '/brow_promo',
sendParam: ['Cari_Promo'], sendParam: ['Cari_Promo'],
onSuccess: () => FoniaJS.setFocus('#Cari_Promo') onSuccess: () => FoniaJS.setFocus('#Cari_Promo')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk','Grup_PromoID'], sendParam: ['Cari_Produk','Grup_PromoID'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -221,14 +221,14 @@ var PromoBeliDiscJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#Nama_Produk').val(item.text); $('#Nama_Produk').val(item.text);
PromoBeliDiscJS.update_items(item.value, item.data); PromoBeliDiscJS.update_items(item.value, item.data);
}, },
update_items: function(InvID, SatuanID){ update_items(InvID, SatuanID) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/option_satuan', url: this.PHP + '/option_satuan',
sendParam: ['InvID='+InvID,'SatuanID='+SatuanID], sendParam: ['InvID='+InvID,'SatuanID='+SatuanID],
onSuccess: () => this.varian_show() onSuccess: () => this.varian_show()
+19 -19
View File
@@ -14,7 +14,7 @@ var PromoTotalJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Promo').keydown((e) => { $('#Cari_Promo').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PromoTotalJS = {
FoniaJS.setFocus('#Cari_Promo'); FoniaJS.setFocus('#Cari_Promo');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_promo', url: this.PHP + '/form_promo',
sendParam: ['mode_detail='+mode,'PromoID='+ID], sendParam: ['mode_detail='+mode,'PromoID='+ID],
@@ -47,17 +47,17 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'], sendParam: ['mode_detail=delete','PromoID='+acell[0],'Cari_Promo'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -65,8 +65,8 @@ var PromoTotalJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', 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'], 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'],
onSuccess: () => { onSuccess: () => {
@@ -76,7 +76,7 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
grup_show: function(){ grup_show() {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['Jual_Grup'], sendParam: ['Jual_Grup'],
@@ -91,15 +91,15 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
grup_semua: function(){ grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true); $('#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); $('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
}, },
grup_save: function(){ grup_save() {
var alist = []; var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => { $('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -108,7 +108,7 @@ var PromoTotalJS = {
FoniaJS.closeWindow(this.winGrup); 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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'lg', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -126,21 +126,21 @@ var PromoTotalJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#Promo_InvID').val(acell[0]); $('#Promo_InvID').val(acell[0]);
$('#Promo_Produk').val(acell[1]); $('#Promo_Produk').val(acell[1]);
this.update_Items(acell[0], 0); this.update_Items(acell[0], 0);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_promo', url: this.PHP + '/table_promo',
sendParam: ['Cari_Promo'] sendParam: ['Cari_Promo']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -148,7 +148,7 @@ var PromoTotalJS = {
} }
}, },
update_Items: function(InvID, SatuanID){ update_Items(InvID, SatuanID) {
$('#Promo_SatuanID').empty(); $('#Promo_SatuanID').empty();
if (InvID==0) return false; if (InvID==0) return false;
new Request({ new Request({
@@ -163,7 +163,7 @@ var PromoTotalJS = {
}).send(); }).send();
}, },
oc_PilihP: function(){ oc_PilihP() {
var i = parseInt($('#Tipe_Promo').val()); var i = parseInt($('#Tipe_Promo').val());
if (i == 4){ if (i == 4){
$('.promo1').removeClass('d-none'); $('.promo1').removeClass('d-none');
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliAnalisaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -31,7 +31,7 @@ var RepoBeliAnalisaJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -31,7 +31,7 @@ var RepoBeliJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliMutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
$('#SupID').focus(); $('#SupID').focus();
@@ -34,7 +34,7 @@ var RepoBeliMutasiJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#SupID').val()==0){ if ($('#SupID').val()==0){
FoniaJS.showError("Silakan pilih Nama Supplier !"); FoniaJS.showError("Silakan pilih Nama Supplier !");
$('#SupID').focus(); $('#SupID').focus();
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoBeliReturJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -30,7 +30,7 @@ var RepoBeliReturJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoDanaKeluarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoDanaKeluarJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoDanaMasukJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoDanaMasukJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+4 -4
View File
@@ -14,14 +14,14 @@ var RepoDanaPosJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butPOS').click(() => this.proses_pos()); $('#butPOS').click(() => this.proses_pos());
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_pos: function(){ proses_pos() {
if ($('#KasirID').val()==0){ if ($('#KasirID').val()==0){
FoniaJS.showError("Untuk Cetak POS, pilih satu Nama Kasir !"); FoniaJS.showError("Untuk Cetak POS, pilih satu Nama Kasir !");
$('#KasirID').focus(); $('#KasirID').focus();
@@ -36,7 +36,7 @@ var RepoDanaPosJS = {
cetak.exec(); cetak.exec();
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -46,7 +46,7 @@ var RepoDanaPosJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBNeracaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("Bulan"); cetak.add_param("Bulan");
@@ -29,7 +29,7 @@ var RepoGelBNeracaJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("Bulan"); dload.add_param("Bulan");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBRLCabJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID"); cetak.add_param("CabID");
cetak.add_param("Bulan1"); cetak.add_param("Bulan1");
@@ -29,7 +29,7 @@ var RepoGelBRLCabJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.add_param("CabID");
dload.add_param("Bulan1"); dload.add_param("Bulan1");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBSaldoJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("Bulan"); cetak.add_param("Bulan");
@@ -28,7 +28,7 @@ var RepoGelBSaldoJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("Bulan"); dload.add_param("Bulan");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelBSHUJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Bulan1"); cetak.add_param("Bulan1");
cetak.add_param("Bulan2"); cetak.add_param("Bulan2");
@@ -29,7 +29,7 @@ var RepoGelBSHUJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Bulan1"); dload.add_param("Bulan1");
dload.add_param("Bulan2"); dload.add_param("Bulan2");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelHBantuJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Kode_Rek"); cetak.add_param("Kode_Rek");
cetak.add_param("Tgl_From"); cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoGelHBantuJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Kode_Rek"); dload.add_param("Kode_Rek");
dload.add_param("Tgl_From"); dload.add_param("Tgl_From");
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoGelHBesarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -23,7 +23,7 @@ var RepoGelHBesarJS = {
FoniaJS.setFocus('#Nama_Rek'); FoniaJS.setFocus('#Nama_Rek');
}, },
proses_print: function(prt){ proses_print(prt) {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Rekening !'); FoniaJS.showError('Silakan masukkan Nama Rekening !');
return; return;
@@ -36,7 +36,7 @@ var RepoGelHBesarJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if (parseInt($('#Kode_Rek').val())==0) { if (parseInt($('#Kode_Rek').val())==0) {
FoniaJS.showError('Silakan masukkan Nama Rekening !'); FoniaJS.showError('Silakan masukkan Nama Rekening !');
return; return;
@@ -49,7 +49,7 @@ var RepoGelHBesarJS = {
dload.download(); 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>'); 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', '', () => { this.winBRek = FoniaJS.showWindow('BRek', 'Daftar Rekening', _isi, 'lg', '', () => {
$('#winBRek') $('#winBRek')
@@ -66,16 +66,16 @@ var RepoGelHBesarJS = {
}); });
}, },
rek_select: function(acell){ rek_select(acell) {
FoniaJS.closeWindow(this.winBRek); FoniaJS.closeWindow(this.winBRek);
$('#Kode_Rek').val(acell[0]); $('#Kode_Rek').val(acell[0]);
$('#Nama_Rek').val(acell[1]); $('#Nama_Rek').val(acell[1]);
$('#Tgl_From').focus(); $('#Tgl_From').focus();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="brow-rek"){ if (tipe=="brow-rek"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_rek', url: this.PHP + '/brow_rek',
sendParam: ['Cari_Rek'], sendParam: ['Cari_Rek'],
onSuccess: () => FoniaJS.setFocus('#Cari_Rek') onSuccess: () => FoniaJS.setFocus('#Cari_Rek')
@@ -83,7 +83,7 @@ var RepoGelHBesarJS = {
} }
}, },
Rek_Comp: function(item){ Rek_Comp(item) {
$('#Kode_Rek').val(item.value); $('#Kode_Rek').val(item.value);
$('#Tgl_From').focus(); $('#Tgl_From').focus();
} }
+6 -6
View File
@@ -14,7 +14,7 @@ var RepoGelHDetailJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butBrowJurnal').click(() => this.jurnal_brow()); $('#butBrowJurnal').click(() => this.jurnal_brow());
@@ -26,13 +26,13 @@ var RepoGelHDetailJS = {
FoniaJS.setFocus('#Kode_Jurnal'); FoniaJS.setFocus('#Kode_Jurnal');
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Kode_Jurnal"); cetak.add_param("Kode_Jurnal");
if (prt) cetak.doPrint(); else cetak.doPreview(); 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>'); 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', '', () => { this.winBTX = FoniaJS.showWindow('BTX', 'Daftar Transaksi', _isi, 'xl', '', () => {
$('#winBTX') $('#winBTX')
@@ -49,14 +49,14 @@ var RepoGelHDetailJS = {
}); });
}, },
jurnal_select: function(acell){ jurnal_select(acell) {
FoniaJS.closeWindow(this.winBTX); FoniaJS.closeWindow(this.winBTX);
$('#Kode_Jurnal').val(acell[0]); $('#Kode_Jurnal').val(acell[0]);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="brow-jurnal"){ if (tipe=="brow-jurnal"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_jurnal', url: this.PHP + '/brow_jurnal',
sendParam: ['Cari_Jurnal'], sendParam: ['Cari_Jurnal'],
onSuccess: () => FoniaJS.setFocus('#Cari_Jurnal') onSuccess: () => FoniaJS.setFocus('#Cari_Jurnal')
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoGelHJurnalJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("TipeID"); cetak.add_param("TipeID");
cetak.add_param("Tgl_From"); cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoGelHJurnalJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("TipeID"); dload.add_param("TipeID");
dload.add_param("Tgl_From"); dload.add_param("Tgl_From");
+3 -3
View File
@@ -14,20 +14,20 @@ var RepoGelHSaldoJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tgl_From"); cetak.add_param("Tgl_From");
cetak.add_param("Tgl_To"); cetak.add_param("Tgl_To");
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tgl_From"); dload.add_param("Tgl_From");
dload.add_param("Tgl_To"); dload.add_param("Tgl_To");
+9 -9
View File
@@ -14,7 +14,7 @@ var RepoInvBarcodeJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print()); $('#butCetak').click(() => this.proses_print());
$('#butLoadPrinter').click(() => this.load_printer()); $('#butLoadPrinter').click(() => this.load_printer());
$('#butBrowProduk').click(() => this.produk_brow()); $('#butBrowProduk').click(() => this.produk_brow());
@@ -22,7 +22,7 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Nama_Produk'); FoniaJS.setFocus('#Nama_Produk');
}, },
proses_print: function(){ proses_print() {
if ($('#InvID').val() == 0){ if ($('#InvID').val() == 0){
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
FoniaJS.setFocus('Nama_Produk'); FoniaJS.setFocus('Nama_Produk');
@@ -42,7 +42,7 @@ var RepoInvBarcodeJS = {
cetak.exec(); 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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -59,7 +59,7 @@ var RepoInvBarcodeJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#SatuanID').val(acell[1]); $('#SatuanID').val(acell[1]);
@@ -69,9 +69,9 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Qty'); FoniaJS.setFocus('#Qty');
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -79,7 +79,7 @@ var RepoInvBarcodeJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
var adata = item.data.split(':'); var adata = item.data.split(':');
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#SatuanID').val(adata[0]); $('#SatuanID').val(adata[0]);
@@ -89,9 +89,9 @@ var RepoInvBarcodeJS = {
FoniaJS.setFocus('#Qty'); FoniaJS.setFocus('#Qty');
}, },
load_printer: function(){ load_printer() {
qz.printers.find().then((data) => { qz.printers.find().then((data) => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/load_printer', url: this.PHP + '/load_printer',
sendParam: ['Printer='+JSON.stringify(data),'DefPrint='+$('#configPrinter').html()] sendParam: ['Printer='+JSON.stringify(data),'DefPrint='+$('#configPrinter').html()]
}).send(); }).send();
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoInvHutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -30,7 +30,7 @@ var RepoInvHutangJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+19 -19
View File
@@ -14,26 +14,26 @@ var RepoInvLabelJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(q){ index(q) {
$('#butHapus').click(() => this.proses_empty()); $('#butHapus').click(() => this.proses_empty());
$('#butPrint').click(() => this.proses_print(true)); $('#butPrint').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : '')); this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
}, },
proses_empty: function(){ proses_empty() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=empty'] sendParam: ['mode_detail=empty']
}).send(); }).send();
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
if (prt) cetak.doPrint(); else cetak.doPreview(); 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>'); 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'}], () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winBProduk') $('#winBProduk')
@@ -51,15 +51,15 @@ var RepoInvLabelJS = {
}); });
}, },
produk_simpan: function(){ produk_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=simpan-produk'], sendParam: ['mode_detail=simpan-produk'],
onSuccess: () => FoniaJS.closeWindow(this.winBProduk) onSuccess: () => FoniaJS.closeWindow(this.winBProduk)
}).send(); }).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>'); 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', '', () => { this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 'xl', '', () => {
$('#winBGrup') $('#winBGrup')
@@ -76,15 +76,15 @@ var RepoInvLabelJS = {
}); });
}, },
grup_select: function(acell){ grup_select(acell) {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]], sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
onSuccess: () => FoniaJS.closeWindow(this.winBGrup) onSuccess: () => FoniaJS.closeWindow(this.winBGrup)
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
new Request({ new Request({
url: this.PHP + '/form_detail', url: this.PHP + '/form_detail',
sendParam: ['mode_detail=update','ID='+acell[0]], sendParam: ['mode_detail=update','ID='+acell[0]],
@@ -101,37 +101,37 @@ var RepoInvLabelJS = {
}).send(); }).send();
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','ID='+acell[0]] sendParam: ['mode_detail=delete','ID='+acell[0]]
}).send(); }).send();
}, 'danger'); }, 'danger');
}, },
detail_simpan: function(){ detail_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())], sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
onSuccess: () => FoniaJS.closeWindow(this.winDetail) onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send(); }).send();
}, },
data_query: function(tipe, mode, kd_tx){ data_query(tipe, mode, kd_tx) {
if (tipe=="tabel-detail"){ if (tipe=="tabel-detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')] sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
}).send(); }).send();
} else if (tipe=="brow-grup"){ } else if (tipe=="brow-grup"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_grup', url: this.PHP + '/brow_grup',
sendParam: ['Cari_Grup'], sendParam: ['Cari_Grup'],
onSuccess: () => FoniaJS.setFocus('#Cari_Grup') onSuccess: () => FoniaJS.setFocus('#Cari_Grup')
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoInvPiutangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoInvPiutangJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); 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'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -32,7 +32,7 @@ var RepoInvPiutangJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
@@ -42,7 +42,7 @@ var RepoInvPiutangJS = {
dload.download(); 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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -59,15 +59,15 @@ var RepoInvPiutangJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -75,7 +75,7 @@ var RepoInvPiutangJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoJualAnalisaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoJualAnalisaJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); 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'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -36,7 +36,7 @@ var RepoJualAnalisaJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
@@ -50,7 +50,7 @@ var RepoJualAnalisaJS = {
dload.download(); 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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -67,15 +67,15 @@ var RepoJualAnalisaJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -83,7 +83,7 @@ var RepoJualAnalisaJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoJualJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -30,7 +30,7 @@ var RepoJualJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoJualMarginJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoJualMarginJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); 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'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -33,7 +33,7 @@ var RepoJualMarginJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
@@ -44,7 +44,7 @@ var RepoJualMarginJS = {
dload.download(); 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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -61,15 +61,15 @@ var RepoJualMarginJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -77,7 +77,7 @@ var RepoJualMarginJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoJualMarginPosJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoJualMarginPosJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoJualMutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -23,7 +23,7 @@ var RepoJualMutasiJS = {
FoniaJS.setFocus('#Nama_Member'); FoniaJS.setFocus('#Nama_Member');
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
$('#Nama_Member').focus(); $('#Nama_Member').focus();
@@ -37,7 +37,7 @@ var RepoJualMutasiJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#MemberID').val()==0){ if ($('#MemberID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Member !"); FoniaJS.showError("Silakan masukkan Nama Member !");
$('#Nama_Member').focus(); $('#Nama_Member').focus();
@@ -51,7 +51,7 @@ var RepoJualMutasiJS = {
dload.download(); 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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -68,15 +68,15 @@ var RepoJualMutasiJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -84,7 +84,7 @@ var RepoJualMutasiJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+12 -12
View File
@@ -14,7 +14,7 @@ var RepoJualRekapJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -25,7 +25,7 @@ var RepoJualRekapJS = {
FoniaJS.setFocus('#Nama_Produk'); FoniaJS.setFocus('#Nama_Produk');
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#InvID').val()==0){ if ($('#InvID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Barang !"); FoniaJS.showError("Silakan masukkan Nama Barang !");
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
@@ -45,7 +45,7 @@ var RepoJualRekapJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#InvID').val()==0){ if ($('#InvID').val()==0){
FoniaJS.showError("Silakan masukkan Nama Barang !"); FoniaJS.showError("Silakan masukkan Nama Barang !");
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
@@ -65,7 +65,7 @@ var RepoJualRekapJS = {
dload.download(); 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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -82,13 +82,13 @@ var RepoJualRekapJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -105,21 +105,21 @@ var RepoJualRekapJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#Nama_Produk').val(acell[5]); $('#Nama_Produk').val(acell[5]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -127,11 +127,11 @@ var RepoJualRekapJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
$('#InvID').val(item.value); $('#InvID').val(item.value);
} }
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoMemberHistoriJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -22,7 +22,7 @@ var RepoMemberHistoriJS = {
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp}); FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
@@ -41,7 +41,7 @@ var RepoMemberHistoriJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
@@ -60,7 +60,7 @@ var RepoMemberHistoriJS = {
dload.download(); 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>'); 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', '', () => { this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
$('#winBMember') $('#winBMember')
@@ -77,15 +77,15 @@ var RepoMemberHistoriJS = {
}); });
}, },
member_select: function(acell){ member_select(acell) {
FoniaJS.closeWindow(this.winBMember); FoniaJS.closeWindow(this.winBMember);
$('#MemberID').val(acell[0]); $('#MemberID').val(acell[0]);
$('#Nama_Member').val(acell[1]); $('#Nama_Member').val(acell[1]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-member"){ if (tipe=="brow-member"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_member', url: this.PHP + '/brow_member',
sendParam: ['Cari_Member'], sendParam: ['Cari_Member'],
onSuccess: () => FoniaJS.setFocus('#Cari_Member') onSuccess: () => FoniaJS.setFocus('#Cari_Member')
@@ -93,7 +93,7 @@ var RepoMemberHistoriJS = {
} }
}, },
Member_Comp: function(item){ Member_Comp(item) {
$('#MemberID').val(item.value); $('#MemberID').val(item.value);
} }
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoMemberPointJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
@@ -35,7 +35,7 @@ var RepoMemberPointJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoMemberTukarJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
@@ -34,7 +34,7 @@ var RepoMemberTukarJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#Point_TipeID').val() == 0){ if ($('#Point_TipeID').val() == 0){
FoniaJS.showInfo("Silakan pilih Tipe Point !"); FoniaJS.showInfo("Silakan pilih Tipe Point !");
return; return;
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoPPOBJualJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoPPOBJualJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoPPOBMarginJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Tipe"); cetak.add_param("Tipe");
cetak.add_param("CabID"); cetak.add_param("CabID");
@@ -29,7 +29,7 @@ var RepoPPOBMarginJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Tipe"); dload.add_param("Tipe");
dload.add_param("CabID"); dload.add_param("CabID");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoRekapMarginJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID"); cetak.add_param("CabID");
cetak.add_param("Tgl_From"); cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoRekapMarginJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.add_param("CabID");
dload.add_param("Tgl_From"); dload.add_param("Tgl_From");
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoRekapModalJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID"); cetak.add_param("CabID");
cetak.add_param("Tgl_From"); cetak.add_param("Tgl_From");
@@ -28,7 +28,7 @@ var RepoRekapModalJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.add_param("CabID");
dload.add_param("Tgl_From"); dload.add_param("Tgl_From");
+5 -5
View File
@@ -14,14 +14,14 @@ var RepoStokAkhirJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butPOS').click(() => this.proses_pos()); $('#butPOS').click(() => this.proses_pos());
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_pos: function(){ proses_pos() {
var cetak = new PrinterPos(this.PHP + '/pos'); var cetak = new PrinterPos(this.PHP + '/pos');
cetak.add_param("CabID"); cetak.add_param("CabID");
cetak.add_param("SupID"); cetak.add_param("SupID");
@@ -34,7 +34,7 @@ var RepoStokAkhirJS = {
cetak.exec(); cetak.exec();
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID"); cetak.add_param("CabID");
cetak.add_param("SupID"); cetak.add_param("SupID");
@@ -47,7 +47,7 @@ var RepoStokAkhirJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.add_param("CabID");
dload.add_param("SupID"); dload.add_param("SupID");
@@ -60,7 +60,7 @@ var RepoStokAkhirJS = {
dload.download(); dload.download();
}, },
oc_MinStok: function(){ oc_MinStok() {
if ($('#Min_Stok').val()=='Y') { if ($('#Min_Stok').val()=='Y') {
$('#Min_Qty').prop({disabled:false, readonly:false}); $('#Min_Qty').prop({disabled:false, readonly:false});
FoniaJS.setFocus('#Min_Qty') FoniaJS.setFocus('#Min_Qty')
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoStokCabangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("Cab1ID"); cetak.add_param("Cab1ID");
cetak.add_param("Cab2ID"); cetak.add_param("Cab2ID");
@@ -29,7 +29,7 @@ var RepoStokCabangJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("Cab1ID"); dload.add_param("Cab1ID");
dload.add_param("Cab2ID"); dload.add_param("Cab2ID");
+8 -8
View File
@@ -14,7 +14,7 @@ var RepoStokMutasiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
@@ -23,7 +23,7 @@ var RepoStokMutasiJS = {
FoniaJS.setFocus('#Nama_Produk'); FoniaJS.setFocus('#Nama_Produk');
}, },
proses_print: function(prt){ proses_print(prt) {
if ($('#InvID').val()==0) { if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
@@ -37,7 +37,7 @@ var RepoStokMutasiJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
if ($('#InvID').val()==0) { if ($('#InvID').val()==0) {
FoniaJS.showError('Silakan masukkan Nama Barang !'); FoniaJS.showError('Silakan masukkan Nama Barang !');
$('#Nama_Produk').focus(); $('#Nama_Produk').focus();
@@ -51,7 +51,7 @@ var RepoStokMutasiJS = {
dload.download(); 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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk') $('#winBProduk')
@@ -68,15 +68,15 @@ var RepoStokMutasiJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
$('#InvID').val(acell[0]); $('#InvID').val(acell[0]);
$('#Nama_Produk').val(acell[5]); $('#Nama_Produk').val(acell[5]);
}, },
data_query: function(tipe){ data_query(tipe) {
if (tipe=="brow-produk"){ if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk'], sendParam: ['Cari_Produk'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk') onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
@@ -84,7 +84,7 @@ var RepoStokMutasiJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
$('#InvID').val(item.value); $('#InvID').val(item.value);
$('#Tgl_From').focus(); $('#Tgl_From').focus();
} }
+3 -3
View File
@@ -14,13 +14,13 @@ var RepoStokOpnameJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butCetak').click(() => this.proses_print(true)); $('#butCetak').click(() => this.proses_print(true));
$('#butPreview').click(() => this.proses_print()); $('#butPreview').click(() => this.proses_print());
$('#butExcel').click(() => this.proses_dload()); $('#butExcel').click(() => this.proses_dload());
}, },
proses_print: function(prt){ proses_print(prt) {
var cetak = new Printer(this.PHP + '/print'); var cetak = new Printer(this.PHP + '/print');
cetak.add_param("CabID"); cetak.add_param("CabID");
cetak.add_param("Grup_InvID"); cetak.add_param("Grup_InvID");
@@ -29,7 +29,7 @@ var RepoStokOpnameJS = {
if (prt) cetak.doPrint(); else cetak.doPreview(); if (prt) cetak.doPrint(); else cetak.doPreview();
}, },
proses_dload: function(){ proses_dload() {
var dload = new Download(this.PHP + '/excel'); var dload = new Download(this.PHP + '/excel');
dload.add_param("CabID"); dload.add_param("CabID");
dload.add_param("Grup_InvID"); dload.add_param("Grup_InvID");
+7 -7
View File
@@ -14,14 +14,14 @@ var AboutJS = {
PHP: '', PHP: '',
KODE: '', 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>'); $('#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()); $('#butDBCek').click(() => this.db_check());
$('#butDBOpti').click(() => this.db_opti()); $('#butDBOpti').click(() => this.db_opti());
$('#butUpdateCek').click(() => this.update_check()); $('#butUpdateCek').click(() => this.update_check());
}, },
db_check: function(){ db_check() {
new Request({ new Request({
url: this.PHP + '/db_check', url: this.PHP + '/db_check',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -30,7 +30,7 @@ var AboutJS = {
}).send(); }).send();
}, },
db_opti: function(){ db_opti() {
new Request({ new Request({
url: this.PHP + '/db_check', url: this.PHP + '/db_check',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -39,7 +39,7 @@ var AboutJS = {
}).send(); }).send();
}, },
update_check: function(){ update_check() {
new Request({ new Request({
url: this.PHP + '/update_check', url: this.PHP + '/update_check',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -52,7 +52,7 @@ var AboutJS = {
}).send(); }).send();
}, },
db_run: function(db_count = 0){ db_run(db_count = 0) {
if (db_count === 0) return false; if (db_count === 0) return false;
var items = Array(db_count).fill(0).map((_, index) => index); var items = Array(db_count).fill(0).map((_, index) => index);
var $ul = $('#db-list').empty(); var $ul = $('#db-list').empty();
@@ -70,7 +70,7 @@ var AboutJS = {
}, $.Deferred().resolve().promise()); }, $.Deferred().resolve().promise());
}, },
opti_run: function(db_count = 0){ opti_run(db_count = 0) {
if (db_count === 0) return false; if (db_count === 0) return false;
var items = Array(db_count).fill(0).map((_, index) => index); var items = Array(db_count).fill(0).map((_, index) => index);
var $ul = $('#db-list').empty(); var $ul = $('#db-list').empty();
@@ -88,7 +88,7 @@ var AboutJS = {
}, $.Deferred().resolve().promise()); }, $.Deferred().resolve().promise());
}, },
update_run: function(){ update_run() {
new Request({ new Request({
url: this.PHP + '/update_proses', url: this.PHP + '/update_proses',
onSuccess: (adata) => { onSuccess: (adata) => {
+2 -2
View File
@@ -14,12 +14,12 @@ var SYSChpasswdJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butSave').click(() => this.proses_save()); $('#butSave').click(() => this.proses_save());
FoniaJS.setFocus('#LPass'); FoniaJS.setFocus('#LPass');
}, },
proses_save: function(){ proses_save() {
if ($("#LPass").val()=="") { if ($("#LPass").val()=="") {
FoniaJS.showInfo("Silakan masukkan password lama Anda!"); FoniaJS.showInfo("Silakan masukkan password lama Anda!");
FoniaJS.setFocus("#LPass"); FoniaJS.setFocus("#LPass");
+5 -5
View File
@@ -14,17 +14,17 @@ var ConfigJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('view'); this.data_query('view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('edit'); this.data_query('edit');
}, },
proses_save: function(){ proses_save() {
new Request({ new Request({
url: this.PHP + '/config', url: this.PHP + '/config',
sendParam: ['mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_EMAIL','REG_OWNER','REG_NPWP'], 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() }).send()
}, },
data_query: function(mode){ data_query(mode) {
new Request({ new Request({
url: this.PHP + '/config', url: this.PHP + '/config',
sendParam: ['mode='+mode], sendParam: ['mode='+mode],
@@ -46,7 +46,7 @@ var ConfigJS = {
}).send() }).send()
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode').val(), ['edit']) !== -1) { if ($.inArray($('#mode').val(), ['edit']) !== -1) {
$("#butUbah").prop('disabled', true); $("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false); $("#butSimpan").prop('disabled', false);
+14 -14
View File
@@ -14,7 +14,7 @@ var MenuGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query(); this.data_query();
$('#Cari_Grup').keydown((e) => { $('#Cari_Grup').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MenuGrupJS = {
FoniaJS.setFocus('#Cari_Grup'); FoniaJS.setFocus('#Cari_Grup');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/detail_grup', url: this.PHP + '/detail_grup',
sendParam: ['mode='+mode,'Grup_MenuID='+ID], sendParam: ['mode='+mode,'Grup_MenuID='+ID],
@@ -40,17 +40,17 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('add', 0); this.detail_show('add', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('edit', acell[0]); this.detail_show('edit', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){ FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode=del','Grup_MenuID='+acell[0],'Cari_Grup'], sendParam: ['mode=del','Grup_MenuID='+acell[0],'Cari_Grup'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -58,8 +58,8 @@ var MenuGrupJS = {
}.bind(this), 'danger'); }.bind(this), 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'], sendParam: ['mode','Grup_MenuID','Nama_Grup','Ket','Aktif','Cari_Grup'],
onSuccess: () => { onSuccess: () => {
@@ -69,7 +69,7 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
menu_show: function(acell){ menu_show(acell) {
new Request({ new Request({
url: this.PHP + '/detail_menu', url: this.PHP + '/detail_menu',
sendParam: ['Grup_MenuID='+acell[0]], sendParam: ['Grup_MenuID='+acell[0]],
@@ -92,15 +92,15 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
menu_ceksemua: function(){ menu_ceksemua() {
$('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', true); $('#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); $('#tabMenuList input.form-check-input[type=checkbox]').prop('checked', false);
}, },
menu_simpan: function(){ menu_simpan() {
var alist = []; var alist = [];
$('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => { $('#tabMenuList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -119,8 +119,8 @@ var MenuGrupJS = {
}).send(); }).send();
}, },
data_query: function(){ data_query() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Grup'], sendParam: ['Cari_Grup'],
}).send() }).send()
+16 -16
View File
@@ -14,7 +14,7 @@ var OperatorJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_User').keydown((e) => { $('#Cari_User').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -29,7 +29,7 @@ var OperatorJS = {
FoniaJS.setFocus('#Cari_User'); FoniaJS.setFocus('#Cari_User');
}, },
filter_show: function(){ filter_show() {
new Request({ new Request({
url: this.PHP + '/detail_filter', url: this.PHP + '/detail_filter',
sendParam: ['Filter_Level'], sendParam: ['Filter_Level'],
@@ -43,13 +43,13 @@ var OperatorJS = {
}).send(); }).send();
}, },
filter_simpan: function(){ filter_simpan() {
$('#Filter_Level').val($('#Fi_Level').val()); $('#Filter_Level').val($('#Fi_Level').val());
FoniaJS.closeWindow(this.winFilter); FoniaJS.closeWindow(this.winFilter);
this.data_query('detail'); this.data_query('detail');
}, },
detail_show: function(mode, UserID){ detail_show(mode, UserID) {
new Request({ new Request({
url: this.PHP + '/detail_user', url: this.PHP + '/detail_user',
sendParam: ['mode='+mode,'UserID='+UserID], sendParam: ['mode='+mode,'UserID='+UserID],
@@ -62,15 +62,15 @@ var OperatorJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('add', 0); this.detail_show('add', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('edit', acell[0]); this.detail_show('edit', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", () => { FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", () => {
new Request({ new Request({
url: this.PHP + '/save_user', url: this.PHP + '/save_user',
@@ -87,7 +87,7 @@ var OperatorJS = {
}, 'danger'); }, 'danger');
}, },
detail_check: function(){ detail_check() {
if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) { if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) {
this.detail_save(); this.detail_save();
return; return;
@@ -105,7 +105,7 @@ var OperatorJS = {
}).send(); }).send();
}, },
detail_save: function(){ detail_save() {
new Request({ new Request({
url: this.PHP + '/save_user', url: this.PHP + '/save_user',
sendParam: ['mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'], sendParam: ['mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'],
@@ -121,7 +121,7 @@ var OperatorJS = {
}).send(); }).send();
}, },
menu_show: function(acell){ menu_show(acell) {
new Request({ new Request({
url: this.PHP + '/detail_menu', url: this.PHP + '/detail_menu',
sendParam: ['UserID='+acell[0]], sendParam: ['UserID='+acell[0]],
@@ -145,15 +145,15 @@ var OperatorJS = {
}).send(); }).send();
}, },
menu_ceksemua: function(){ menu_ceksemua() {
$('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', true); $('#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); $('#tabMenuList input.form-check-input[type=checkbox]:not(:disabled)').prop('checked', false);
}, },
menu_simpan: function(){ menu_simpan() {
var alist = []; var alist = [];
$('#tabMenuList tbody input.form-check-input[type=checkbox]:not(:disabled):checked').map((i, b) => { $('#tabMenuList tbody input.form-check-input[type=checkbox]:not(:disabled):checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -172,16 +172,16 @@ var OperatorJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Filter_Level','Cari_User'] sendParam: ['Filter_Level','Cari_User']
}).send() }).send()
} }
}, },
oc_Level: function(){ oc_Level() {
} }
}; };
+8 -8
View File
@@ -14,32 +14,32 @@ var PrinterJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butBrow').click(() => this.cab_brow()); $('#butBrow').click(() => this.cab_brow());
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('form-printer'); 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')); 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); FoniaJS.closeWindow(this.winBCab);
$('#REG_ID').val(acell[0]); $('#REG_ID').val(acell[0]);
this.data_query('form-printer', 'view'); this.data_query('form-printer', 'view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('form-printer', 'edit'); this.data_query('form-printer', 'edit');
}, },
proses_save: function(){ proses_save() {
this.data_query('form-printer', 'save'); this.data_query('form-printer', 'save');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe === 'form-printer'){ if (tipe === 'form-printer'){
new Request({ new Request({
url: this.PHP + '/form_printer', url: this.PHP + '/form_printer',
@@ -52,13 +52,13 @@ var PrinterJS = {
} }
}).send(); }).send();
} else if (tipe=='brow-cabang'){ } else if (tipe=='brow-cabang'){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_cabang', url: this.PHP + '/brow_cabang',
}).send(); }).send();
} }
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode').val(), ['edit']) >= 0) { if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$('#butBrow').prop('disabled', true); $('#butBrow').prop('disabled', true);
$('#butUbah').prop('disabled', true); $('#butUbah').prop('disabled', true);
+3 -3
View File
@@ -14,7 +14,7 @@ var SYSProfileJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butSave').click(() => this.save_profile()); $('#butSave').click(() => this.save_profile());
$('#win'+this.KODE).find('#FileGambar').off('change').change(() => { $('#win'+this.KODE).find('#FileGambar').off('change').change(() => {
var fd = new FormData(), files = $('#FileGambar')[0].files[0]; var fd = new FormData(), files = $('#FileGambar')[0].files[0];
@@ -38,7 +38,7 @@ var SYSProfileJS = {
this.get_picture(); this.get_picture();
}, },
save_profile: function(){ save_profile() {
new Request({ new Request({
url: this.PHP + '/save_profile', url: this.PHP + '/save_profile',
sendParam: ['Nama','Posisi','Email','HP'], sendParam: ['Nama','Posisi','Email','HP'],
@@ -53,7 +53,7 @@ var SYSProfileJS = {
}).send(); }).send();
}, },
get_picture: function(){ get_picture() {
new Request({ new Request({
url: this.PHP + '/get_picture', url: this.PHP + '/get_picture',
onSuccess: (ajson) => { onSuccess: (ajson) => {
+4 -4
View File
@@ -14,12 +14,12 @@ var SuperJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query(); this.data_query();
if ($('#divSuper').length > 0 && socket.active) socket.emit('super-check'); if ($('#divSuper').length > 0 && socket.active) socket.emit('super-check');
}, },
detail_select: function(acell){ detail_select(acell) {
new Request({ new Request({
url: this.PHP + '/approve', url: this.PHP + '/approve',
sendParam: ['AuthID='+acell[0]], sendParam: ['AuthID='+acell[0]],
@@ -27,8 +27,8 @@ var SuperJS = {
}).send(); }).send();
}, },
data_query: function(){ data_query() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
}).send(); }).send();
} }
+5 -5
View File
@@ -14,17 +14,17 @@ var GajiJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
$('#butUbah').click(() => this.proses_edit()); $('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save()); $('#butSimpan').click(() => this.proses_save());
this.data_query('view'); this.data_query('view');
}, },
proses_edit: function(){ proses_edit() {
this.data_query('update'); this.data_query('update');
}, },
proses_save: function(){ proses_save() {
new Request({ new Request({
url: this.PHP + '/form_gaji', url: this.PHP + '/form_gaji',
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'], sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
@@ -36,7 +36,7 @@ var GajiJS = {
}).send() }).send()
}, },
data_query: function(mode){ data_query(mode) {
new Request({ new Request({
url: this.PHP + '/form_gaji', url: this.PHP + '/form_gaji',
sendParam: ['mode_detail='+mode,'REG_ID'], sendParam: ['mode_detail='+mode,'REG_ID'],
@@ -47,7 +47,7 @@ var GajiJS = {
}).send() }).send()
}, },
update_event: function(){ update_event() {
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) { if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
$("#butUbah").prop('disabled', true); $("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false); $("#butSimpan").prop('disabled', false);
+10 -10
View File
@@ -14,7 +14,7 @@ var RekGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Rek').keydown((e) => { $('#Cari_Rek').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var RekGrupJS = {
FoniaJS.setFocus('#Cari_Rek'); FoniaJS.setFocus('#Cari_Rek');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID], sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
@@ -40,17 +40,17 @@ var RekGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_RekID='+acell[0],'Cari_Rek'], sendParam: ['mode_detail=delete','Grup_RekID='+acell[0],'Cari_Rek'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var RekGrupJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'], sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var RekGrupJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Rek'] sendParam: ['Cari_Rek']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var KaryawanJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Karya').keydown((e) => { $('#Cari_Karya').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var KaryawanJS = {
FoniaJS.setFocus('#Cari_Karya'); FoniaJS.setFocus('#Cari_Karya');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_karya', url: this.PHP + '/form_karya',
sendParam: ['mode_detail='+mode,'KaryaID='+ID], sendParam: ['mode_detail='+mode,'KaryaID='+ID],
@@ -38,17 +38,17 @@ var KaryawanJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'], sendParam: ['mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -56,8 +56,8 @@ var KaryawanJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'], sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
onSuccess: () => { onSuccess: () => {
@@ -67,9 +67,9 @@ var KaryawanJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Karya'] sendParam: ['Cari_Karya']
}).send(); }).send();
+12 -12
View File
@@ -14,7 +14,7 @@ var RekJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#Cari_Rek').keydown((e) => { $('#Cari_Rek').keydown((e) => {
@@ -29,7 +29,7 @@ var RekJS = {
FoniaJS.setFocus('#Cari_Rek'); FoniaJS.setFocus('#Cari_Rek');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -42,7 +42,7 @@ var RekJS = {
}).send(); }).send();
}, },
print_rek: function(prt){ print_rek(prt) {
var cetak = new Printer(this.PHP + '/print_rek'); var cetak = new Printer(this.PHP + '/print_rek');
cetak.add_param("Grup_RekID"); cetak.add_param("Grup_RekID");
cetak.add_param("Level"); cetak.add_param("Level");
@@ -51,7 +51,7 @@ var RekJS = {
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_rek', url: this.PHP + '/form_rek',
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID], sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
@@ -61,17 +61,17 @@ var RekJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Kode_Rek='+acell[0],'Cari_Rek'], sendParam: ['mode_detail=delete','Kode_Rek='+acell[0],'Cari_Rek'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -79,8 +79,8 @@ var RekJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'], sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
onSuccess: () => { onSuccess: () => {
@@ -90,9 +90,9 @@ var RekJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Rek'] sendParam: ['Cari_Rek']
}).send(); }).send();
+12 -12
View File
@@ -14,7 +14,7 @@ var MemberJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#Cari_Member').keydown((e) => { $('#Cari_Member').keydown((e) => {
@@ -29,7 +29,7 @@ var MemberJS = {
FoniaJS.setFocus('#Cari_Member'); FoniaJS.setFocus('#Cari_Member');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -42,7 +42,7 @@ var MemberJS = {
}).send(); }).send();
}, },
print_member: function(prt){ print_member(prt) {
var cetak = new Printer(this.PHP + '/print_member'); var cetak = new Printer(this.PHP + '/print_member');
cetak.add_param("Grup_MemberID"); cetak.add_param("Grup_MemberID");
cetak.add_param("Aktif"); cetak.add_param("Aktif");
@@ -51,7 +51,7 @@ var MemberJS = {
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_member', url: this.PHP + '/form_member',
sendParam: ['mode_detail='+mode,'MemberID='+ID], sendParam: ['mode_detail='+mode,'MemberID='+ID],
@@ -61,17 +61,17 @@ var MemberJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'], sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -79,8 +79,8 @@ var MemberJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', 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'], 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'],
onSuccess: () => { onSuccess: () => {
@@ -90,9 +90,9 @@ var MemberJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Member'] sendParam: ['Cari_Member']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var MemberGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Member').keydown((e) => { $('#Cari_Member').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var MemberGrupJS = {
FoniaJS.setFocus('#Cari_Member'); FoniaJS.setFocus('#Cari_Member');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID], sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
@@ -40,17 +40,17 @@ var MemberGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'], sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var MemberGrupJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'], sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var MemberGrupJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Member'] sendParam: ['Cari_Member']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var PointBarangJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Barang').keydown((e) => { $('#Cari_Barang').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointBarangJS = {
FoniaJS.setFocus('#Cari_Barang'); FoniaJS.setFocus('#Cari_Barang');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_barang', url: this.PHP + '/form_barang',
sendParam: ['mode_detail='+mode,'InvPID='+ID], sendParam: ['mode_detail='+mode,'InvPID='+ID],
@@ -40,17 +40,17 @@ var PointBarangJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'], sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var PointBarangJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'], sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var PointBarangJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Barang'] sendParam: ['Cari_Barang']
}).send(); }).send();
+20 -20
View File
@@ -14,7 +14,7 @@ var PointSkemaJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Skema').keydown((e) => { $('#Cari_Skema').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointSkemaJS = {
FoniaJS.setFocus('#Cari_Skema'); FoniaJS.setFocus('#Cari_Skema');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_skema', url: this.PHP + '/form_skema',
sendParam: ['mode_detail='+mode,'PointID='+ID], sendParam: ['mode_detail='+mode,'PointID='+ID],
@@ -43,17 +43,17 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[5]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'], sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -61,8 +61,8 @@ var PointSkemaJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', 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'], sendParam: ['mode_detail','PointID','Point_TipeID','KartuID','CabID','Grup_MemberID','Nilai_Jual','Grup_Barang','Kode_Barang','Tgl_Mulai','Aktif','Cari_Skema'],
onSuccess: () => { onSuccess: () => {
@@ -72,7 +72,7 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
grup_form: function(){ grup_form() {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['Grup_Barang'], sendParam: ['Grup_Barang'],
@@ -87,15 +87,15 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
grup_semua: function(){ grup_semua() {
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true); $('#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); $('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
}, },
grup_save: function(){ grup_save() {
var alist = []; var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => { $('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val()); alist.push($(b).val());
@@ -104,7 +104,7 @@ var PointSkemaJS = {
FoniaJS.closeWindow(this.winGrup); FoniaJS.closeWindow(this.winGrup);
}, },
barang_form: function(){ barang_form() {
new Request({ new Request({
url: this.PHP + '/form_barang', url: this.PHP + '/form_barang',
sendParam: ['Kode_Barang'], sendParam: ['Kode_Barang'],
@@ -117,9 +117,9 @@ var PointSkemaJS = {
}).send(); }).send();
}, },
barang_hapus: function(acell){ barang_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_barang', url: this.PHP + '/table_barang',
sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'], sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -127,14 +127,14 @@ var PointSkemaJS = {
}, 'danger'); }, 'danger');
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Skema'] sendParam: ['Cari_Skema']
}).send(); }).send();
} else if (tipe=="tabel-barang"){ } else if (tipe=="tabel-barang"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_barang', url: this.PHP + '/table_barang',
sendParam: ['Kode_Barang'], sendParam: ['Kode_Barang'],
onSuccess: () => FoniaJS.setFocus('#Nama_Produk') onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
@@ -142,8 +142,8 @@ var PointSkemaJS = {
} }
}, },
Produk_Comp: function(item){ Produk_Comp(item) {
new Request.JSONF({ new Request_JSF({
url: PointSkemaJS.PHP + '/table_barang', url: PointSkemaJS.PHP + '/table_barang',
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value] sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var PointTipeJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Tipe').keydown((e) => { $('#Cari_Tipe').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PointTipeJS = {
FoniaJS.setFocus('#Cari_Tipe'); FoniaJS.setFocus('#Cari_Tipe');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_tipe', url: this.PHP + '/form_tipe',
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID], sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
@@ -40,17 +40,17 @@ var PointTipeJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'], sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var PointTipeJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'], sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var PointTipeJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Tipe'] sendParam: ['Cari_Tipe']
}).send(); }).send();
+5 -5
View File
@@ -14,7 +14,7 @@ var PPOBKateJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Kate').keydown((e) => { $('#Cari_Kate').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PPOBKateJS = {
FoniaJS.setFocus('#Cari_Kate'); FoniaJS.setFocus('#Cari_Kate');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_kategori', url: this.PHP + '/form_kategori',
sendParam: ['mode_detail='+mode,'KateID='+ID], sendParam: ['mode_detail='+mode,'KateID='+ID],
@@ -38,13 +38,13 @@ var PPOBKateJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Kate'] sendParam: ['Cari_Kate']
}).send(); }).send();
+5 -5
View File
@@ -14,7 +14,7 @@ var PPOBOpeJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Ope').keydown((e) => { $('#Cari_Ope').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var PPOBOpeJS = {
FoniaJS.setFocus('#Cari_Ope'); FoniaJS.setFocus('#Cari_Ope');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_operator', url: this.PHP + '/form_operator',
sendParam: ['mode_detail='+mode,'OpeID='+ID], sendParam: ['mode_detail='+mode,'OpeID='+ID],
@@ -38,13 +38,13 @@ var PPOBOpeJS = {
}).send(); }).send();
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Ope'] sendParam: ['Cari_Ope']
}).send(); }).send();
+12 -12
View File
@@ -14,7 +14,7 @@ var PPOBProdukJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-produk'); this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#butUpdate').click(() => this.update_show()); $('#butUpdate').click(() => this.update_show());
@@ -30,7 +30,7 @@ var PPOBProdukJS = {
FoniaJS.setFocus('#Cari_Produk'); FoniaJS.setFocus('#Cari_Produk');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -43,7 +43,7 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
print_produk: function(prt){ print_produk(prt) {
var cetak = new Printer(this.PHP + '/print_produk'); var cetak = new Printer(this.PHP + '/print_produk');
cetak.add_param("KateID"); cetak.add_param("KateID");
cetak.add_param("OpeID"); cetak.add_param("OpeID");
@@ -52,7 +52,7 @@ var PPOBProdukJS = {
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
update_show: function(){ update_show() {
new Request({ new Request({
url: this.PHP + '/detail_update', url: this.PHP + '/detail_update',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -63,8 +63,8 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
update_proses: function(){ update_proses() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/proses_update', url: this.PHP + '/proses_update',
sendParam: ['K_Kate','K_Ope'], sendParam: ['K_Kate','K_Ope'],
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -74,7 +74,7 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
produk_show: function(mode, ID){ produk_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_produk', url: this.PHP + '/form_produk',
sendParam: ['mode_detail='+mode,'ProdukID='+ID], sendParam: ['mode_detail='+mode,'ProdukID='+ID],
@@ -86,12 +86,12 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
produk_ubah: function(acell){ produk_ubah(acell) {
this.produk_show('update', acell[0]); this.produk_show('update', acell[0]);
}, },
produk_simpan: function(){ produk_simpan() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_produk', 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'], sendParam: ['mode_detail','ProdukID','OpeID','KateID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode','Harga_Pokok','Harga_Jual','Status','Cari_Produk'],
onSuccess: (adata) => { onSuccess: (adata) => {
@@ -103,9 +103,9 @@ var PPOBProdukJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="tabel-produk"){ if (tipe=="tabel-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_produk', url: this.PHP + '/table_produk',
sendParam: ['Cari_Produk'] sendParam: ['Cari_Produk']
}).send(); }).send();
+51 -51
View File
@@ -14,7 +14,7 @@ var ProdukJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('tabel-produk'); this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show()); $('#butPrint').click(() => this.print_show());
$('#butFilter').click(() => this.filter_show()); $('#butFilter').click(() => this.filter_show());
@@ -30,7 +30,7 @@ var ProdukJS = {
FoniaJS.setFocus('#Cari_Produk'); FoniaJS.setFocus('#Cari_Produk');
}, },
print_show: function(){ print_show() {
new Request({ new Request({
url: this.PHP + '/detail_print', url: this.PHP + '/detail_print',
onSuccess: (ajson) => { onSuccess: (ajson) => {
@@ -43,7 +43,7 @@ var ProdukJS = {
}).send(); }).send();
}, },
print_produk: function(prt){ print_produk(prt) {
var cetak = new Printer(this.PHP + '/print_barang'); var cetak = new Printer(this.PHP + '/print_barang');
cetak.add_param("SupID"); cetak.add_param("SupID");
cetak.add_param("Grup_InvID"); cetak.add_param("Grup_InvID");
@@ -53,7 +53,7 @@ var ProdukJS = {
FoniaJS.closeWindow(this.winDPrint); FoniaJS.closeWindow(this.winDPrint);
}, },
filter_show: function(){ filter_show() {
new Request({ new Request({
url: this.PHP + '/detail_filter', url: this.PHP + '/detail_filter',
sendParam: ['Filter_Produk'], sendParam: ['Filter_Produk'],
@@ -66,13 +66,13 @@ var ProdukJS = {
}).send(); }).send();
}, },
filter_simpan: function(){ filter_simpan() {
$('#Filter_Produk').val($('#Fi_Produk').val()); $('#Filter_Produk').val($('#Fi_Produk').val());
FoniaJS.closeWindow(this.winFilter); FoniaJS.closeWindow(this.winFilter);
this.data_query('tabel-produk'); this.data_query('tabel-produk');
}, },
produk_show: function(mode, ID){ produk_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/detail_produk', url: this.PHP + '/detail_produk',
sendParam: ['mode='+mode,'InvID='+ID], sendParam: ['mode='+mode,'InvID='+ID],
@@ -89,7 +89,7 @@ var ProdukJS = {
}).send(); }).send();
}, },
produk_restore: function(acell){ produk_restore(acell) {
new Request({ new Request({
url: this.PHP + '/detail_restore', url: this.PHP + '/detail_restore',
sendParam: ['InvID='+acell[0]], sendParam: ['InvID='+acell[0]],
@@ -99,7 +99,7 @@ var ProdukJS = {
}).send(); }).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>', () => { 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({ new Request({
url: this.PHP + '/proses_restore', url: this.PHP + '/proses_restore',
@@ -111,7 +111,7 @@ var ProdukJS = {
}, 'danger'); }, 'danger');
}, },
produk_restore_form: function(acell, div){ produk_restore_form(acell, div) {
new Request({ new Request({
url: this.PHP + '/form_restore', url: this.PHP + '/form_restore',
sendParam: ['InvID','MD5Key='+acell[1]], sendParam: ['InvID','MD5Key='+acell[1]],
@@ -119,15 +119,15 @@ var ProdukJS = {
}).send(); }).send();
}, },
produk_tambah: function(){ produk_tambah() {
this.produk_show('add', 0); this.produk_show('add', 0);
}, },
produk_ubah: function(acell){ produk_ubah(acell) {
this.produk_show('edit', acell[0]); this.produk_show('edit', acell[0]);
}, },
produk_hapus: function(acell){ produk_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
FoniaJS.showAuth(() => { FoniaJS.showAuth(() => {
new Request({ new Request({
@@ -146,7 +146,7 @@ var ProdukJS = {
}, 'danger'); }, 'danger');
}, },
produk_simpan: function(){ produk_simpan() {
new Request({ new Request({
url: this.PHP + '/proses_simpan', 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'], 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(); }).send();
}, },
produk_batal: function(){ produk_batal() {
if ($('#mode').val()=='add'){ if ($('#mode').val()=='add'){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Barang ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Barang ?', () => {
new Request({ new Request({
@@ -185,7 +185,7 @@ var ProdukJS = {
}, 'danger'); }, '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>'); 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', '', () => { this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk').find('#Cari_Produk2').keydown((e) => { $('#winBProduk').find('#Cari_Produk2').keydown((e) => {
@@ -202,7 +202,7 @@ var ProdukJS = {
}); });
}, },
produk_select: function(acell){ produk_select(acell) {
FoniaJS.closeWindow(this.winBProduk); FoniaJS.closeWindow(this.winBProduk);
new Request({ new Request({
url: this.PHP + '/proses_copy', url: this.PHP + '/proses_copy',
@@ -220,11 +220,11 @@ var ProdukJS = {
}).send(); }).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'); 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; var dt = $('#divKemasanTabel').DataTable(), tr, l_row;
tr = $('#butBatalKemasan').closest('tr'); tr = $('#butBatalKemasan').closest('tr');
l_row = dt.row(tr.prev('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); if (l_row.data()[0]=='0') l_row.remove().draw(true);
}, },
kemasan_add: function(){ kemasan_add() {
var dt = $('#divKemasanTabel').DataTable(), l_row; var dt = $('#divKemasanTabel').DataTable(), l_row;
dt.order([0,'desc']); dt.order([0,'desc']);
l_row = dt.row(':last'); 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(); 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({ new Request({
url: this.PHP + '/form_kemasan', url: this.PHP + '/form_kemasan',
sendParam: ['InvID','InvKemasanID='+acell[0],'Satuan_Stok='+$('#StokID').find(':selected').text()], sendParam: ['InvID','InvKemasanID='+acell[0],'Satuan_Stok='+$('#StokID').find(':selected').text()],
@@ -256,9 +256,9 @@ var ProdukJS = {
}).send(); }).send();
}, },
kemasan_del: function(acell){ kemasan_del(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_kemasan', url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','mode_detail=delete','InvID','InvKemasanID='+acell[0],'SatuanLamaID='+acell[1],'Satuan_Stok='+$('#StokID').find(":selected").text()], sendParam: ['mode','mode_detail=delete','InvID','InvKemasanID='+acell[0],'SatuanLamaID='+acell[1],'Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => { onSuccess: () => {
@@ -270,12 +270,12 @@ var ProdukJS = {
}, 'danger'); }, 'danger');
}, },
kemasan_save: function(){ kemasan_save() {
if ($('#Qty').val()==0){ if ($('#Qty').val()==0){
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !'); FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
return false; return false;
} }
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_kemasan', url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','mode_detail=update','InvID','InvKemasanID','SatuanID','SatuanLamaID','Qty','Satuan_Stok='+$('#StokID').find(":selected").text()], sendParam: ['mode','mode_detail=update','InvID','InvKemasanID','SatuanID','SatuanLamaID','Qty','Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => { onSuccess: () => {
@@ -288,7 +288,7 @@ var ProdukJS = {
}).send(); }).send();
}, },
kemasan_check: function(){ kemasan_check() {
if ($('#SatuanID').val()==$('#SatuanLamaID').val()) { if ($('#SatuanID').val()==$('#SatuanLamaID').val()) {
this.kemasan_save(); this.kemasan_save();
return; return;
@@ -306,7 +306,7 @@ var ProdukJS = {
}).send(); }).send();
}, },
varian_batal: function(){ varian_batal() {
var dt = $('#divVarianTabel').DataTable(), tr, l_row; var dt = $('#divVarianTabel').DataTable(), tr, l_row;
tr = $('#butBatalVarian').closest('tr'); tr = $('#butBatalVarian').closest('tr');
l_row = dt.row(tr.prev('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); if (l_row.data()[0]=='0') l_row.remove().draw(true);
}, },
varian_add: function(){ varian_add() {
var dt = $('#divVarianTabel').DataTable(), l_row; var dt = $('#divVarianTabel').DataTable(), l_row;
dt.order([0,'desc']); dt.order([0,'desc']);
l_row = dt.row(':last'); 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(); 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({ new Request({
url: this.PHP + '/form_varian', url: this.PHP + '/form_varian',
sendParam: ['InvID','InvVarianID='+acell[0]], sendParam: ['InvID','InvVarianID='+acell[0]],
@@ -338,9 +338,9 @@ var ProdukJS = {
}).send(); }).send();
}, },
varian_del: function(acell){ varian_del(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[4]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[4]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_varian', url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=delete','InvID','InvVarianID='+acell[0]], sendParam: ['mode','mode_detail=delete','InvID','InvVarianID='+acell[0]],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -348,15 +348,15 @@ var ProdukJS = {
}, 'danger'); }, 'danger');
}, },
varian_save: function(){ varian_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_varian', url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=update','InvID','InvVarianID','SatuanID','VarianID','Kode_Barcode'], sendParam: ['mode','mode_detail=update','InvID','InvVarianID','SatuanID','VarianID','Kode_Barcode'],
onSuccess: () => FoniaJS.showInfo('Sukses menyimpan varian produk.') onSuccess: () => FoniaJS.showInfo('Sukses menyimpan varian produk.')
}).send(); }).send();
}, },
varian_check: function(){ varian_check() {
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#VarianID').val()==$('#VarianLamaID').val()) && ($('#Kode_Barcode').val()==$('#Kode_BarcodeLama').val())) { if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#VarianID').val()==$('#VarianLamaID').val()) && ($('#Kode_Barcode').val()==$('#Kode_BarcodeLama').val())) {
this.varian_save(); this.varian_save();
return; return;
@@ -374,7 +374,7 @@ var ProdukJS = {
}).send(); }).send();
}, },
harga_batal: function(){ harga_batal() {
var dt = $('#divHargaTabel').DataTable(), tr, l_row; var dt = $('#divHargaTabel').DataTable(), tr, l_row;
tr = $('#butBatalHarga').closest('tr'); tr = $('#butBatalHarga').closest('tr');
l_row = dt.row(tr.prev('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); if (l_row.data()[0]=='0') l_row.remove().draw(true);
}, },
harga_add: function(){ harga_add() {
var dt = $('#divHargaTabel').DataTable(), l_row; var dt = $('#divHargaTabel').DataTable(), l_row;
dt.order([0,'desc']); dt.order([0,'desc']);
l_row = dt.row(':last'); 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(); 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({ new Request({
url: this.PHP + '/form_harga', url: this.PHP + '/form_harga',
sendParam: ['InvID','InvHargaID='+acell[0]], sendParam: ['InvID','InvHargaID='+acell[0]],
@@ -410,9 +410,9 @@ var ProdukJS = {
}).send(); }).send();
}, },
harga_del: function(acell){ harga_del(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+' - '+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+' - '+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_harga', url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=delete','InvID','InvHargaID='+acell[0]], sendParam: ['mode','mode_detail=delete','InvID','InvHargaID='+acell[0]],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -420,15 +420,15 @@ var ProdukJS = {
}, 'danger'); }, 'danger');
}, },
harga_save: function(){ harga_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_harga', url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_MemberID','Harga_Jual'], sendParam: ['mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_MemberID','Harga_Jual'],
onSuccess: () => FoniaJS.showInfo('Sukses menyimpan harga produk.') onSuccess: () => FoniaJS.showInfo('Sukses menyimpan harga produk.')
}).send(); }).send();
}, },
harga_check: function(){ harga_check() {
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#Grup_MemberID').val()==$('#GrupLamaID').val())) { if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#Grup_MemberID').val()==$('#GrupLamaID').val())) {
this.harga_save(); this.harga_save();
return; return;
@@ -446,14 +446,14 @@ var ProdukJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="tabel-produk"){ if (tipe=="tabel-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_produk', url: this.PHP + '/tabel_produk',
sendParam: ['Cari_Produk','Filter_Produk'] sendParam: ['Cari_Produk','Filter_Produk']
}).send(); }).send();
} else if (tipe=="tabel-kemasan"){ } else if (tipe=="tabel-kemasan"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_kemasan', url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','InvID','Satuan_Stok='+$('#StokID').find(":selected").text()], sendParam: ['mode','InvID','Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => { onSuccess: () => {
@@ -462,22 +462,22 @@ var ProdukJS = {
} }
}).send(); }).send();
} else if (tipe=="tabel-varian"){ } else if (tipe=="tabel-varian"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_varian', url: this.PHP + '/tabel_varian',
sendParam: ['mode','InvID'] sendParam: ['mode','InvID']
}).send(); }).send();
} else if (tipe=="tabel-harga"){ } else if (tipe=="tabel-harga"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_harga', url: this.PHP + '/tabel_harga',
sendParam: ['mode','InvID'] sendParam: ['mode','InvID']
}).send(); }).send();
} else if (tipe=="tabel-restore"){ } else if (tipe=="tabel-restore"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/tabel_restore', url: this.PHP + '/tabel_restore',
sendParam: ['InvID'] sendParam: ['InvID']
}).send(); }).send();
} else if (tipe=="brow-produk"){ } else if (tipe=="brow-produk"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/brow_produk', url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk2'], sendParam: ['Cari_Produk2'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk2') onSuccess: () => FoniaJS.setFocus('#Cari_Produk2')
@@ -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)); $('#Harga_Pokok').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Beli').val()) + FoniaJS.StrToFloat($('#Harga_Tambah').val()), 0));
}, },
calc_Modal: function(){ calc_Modal() {
new Request({ new Request({
url: this.PHP + '/check_modal', url: this.PHP + '/check_modal',
sendParam: ['InvID','SatuanID'], sendParam: ['InvID','SatuanID'],
@@ -502,7 +502,7 @@ var ProdukJS = {
}).send(); }).send();
}, },
calc_Harga: function(tipe){ calc_Harga(tipe) {
var harga = FoniaJS.StrToFloat($('#Harga_Jual').val()); var harga = FoniaJS.StrToFloat($('#Harga_Jual').val());
var pjual = FoniaJS.StrToFloat($('#Persen_Jual').val()); var pjual = FoniaJS.StrToFloat($('#Persen_Jual').val());
var hmodal = FoniaJS.StrToFloat($('#Harga_Modal').val()); var hmodal = FoniaJS.StrToFloat($('#Harga_Modal').val());
+9 -9
View File
@@ -14,7 +14,7 @@ var ProdukGrupJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Grup').keydown((e) => { $('#Cari_Grup').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var ProdukGrupJS = {
FoniaJS.setFocus('#Cari_Grup'); FoniaJS.setFocus('#Cari_Grup');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_grup', url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_InvID='+ID], sendParam: ['mode_detail='+mode,'Grup_InvID='+ID],
@@ -40,15 +40,15 @@ var ProdukGrupJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request({ new Request({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
@@ -58,8 +58,8 @@ var ProdukGrupJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_InvID','Kode_Grup','Nama_Grup','Margin','Aktif','Cari_Grup'], sendParam: ['mode_detail','Grup_InvID','Kode_Grup','Nama_Grup','Margin','Aktif','Cari_Grup'],
onSuccess: () => { onSuccess: () => {
@@ -69,9 +69,9 @@ var ProdukGrupJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Grup'] sendParam: ['Cari_Grup']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var RekPOSJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Rekpos').keydown((e) => { $('#Cari_Rekpos').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var RekPOSJS = {
FoniaJS.setFocus('#Cari_Rekpos'); FoniaJS.setFocus('#Cari_Rekpos');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_rekpos', url: this.PHP + '/form_rekpos',
sendParam: ['mode_detail='+mode,'KartuID='+ID], sendParam: ['mode_detail='+mode,'KartuID='+ID],
@@ -40,17 +40,17 @@ var RekPOSJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','KartuID='+acell[0],'Cari_Rekpos'], sendParam: ['mode_detail=delete','KartuID='+acell[0],'Cari_Rekpos'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -58,8 +58,8 @@ var RekPOSJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KartuID','Kode_Kartu','Nama_Kartu','Kode_Rek','Aktif','Cari_Rekpos'], sendParam: ['mode_detail','KartuID','Kode_Kartu','Nama_Kartu','Kode_Rek','Aktif','Cari_Rekpos'],
onSuccess: () => { onSuccess: () => {
@@ -69,9 +69,9 @@ var RekPOSJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Rekpos'] sendParam: ['Cari_Rekpos']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var SatuanJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Satuan').keydown((e) => { $('#Cari_Satuan').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var SatuanJS = {
FoniaJS.setFocus('#Cari_Satuan'); FoniaJS.setFocus('#Cari_Satuan');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_satuan', url: this.PHP + '/form_satuan',
sendParam: ['mode_detail='+mode,'SatuanID='+ID], sendParam: ['mode_detail='+mode,'SatuanID='+ID],
@@ -40,17 +40,17 @@ var SatuanJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','SatuanID='+acell[0],'Cari_Satuan'], sendParam: ['mode_detail=delete','SatuanID='+acell[0],'Cari_Satuan'],
onSuccess: () => { onSuccess: () => {
@@ -60,8 +60,8 @@ var SatuanJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','SatuanID','Kode_Satuan','Nama_Satuan','Aktif','Cari_Satuan'], sendParam: ['mode_detail','SatuanID','Kode_Satuan','Nama_Satuan','Aktif','Cari_Satuan'],
onSuccess: () => { onSuccess: () => {
@@ -71,9 +71,9 @@ var SatuanJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Satuan'] sendParam: ['Cari_Satuan']
}).send(); }).send();
+9 -9
View File
@@ -14,7 +14,7 @@ var SupplierJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Sup').keydown((e) => { $('#Cari_Sup').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var SupplierJS = {
FoniaJS.setFocus('#Cari_Sup'); FoniaJS.setFocus('#Cari_Sup');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_supplier', url: this.PHP + '/form_supplier',
sendParam: ['mode_detail='+mode,'SupID='+ID], sendParam: ['mode_detail='+mode,'SupID='+ID],
@@ -38,15 +38,15 @@ var SupplierJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request({ new Request({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
@@ -60,8 +60,8 @@ var SupplierJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Telp_Sup','No_NPWP','No_NITKU','Aktif','Cari_Sup'], sendParam: ['mode_detail','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Telp_Sup','No_NPWP','No_NITKU','Aktif','Cari_Sup'],
onSuccess: (adata) => { onSuccess: (adata) => {
@@ -73,9 +73,9 @@ var SupplierJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Sup'] sendParam: ['Cari_Sup']
}).send(); }).send();
+10 -10
View File
@@ -14,7 +14,7 @@ var VarianJS = {
PHP: '', PHP: '',
KODE: '', KODE: '',
index: function(){ index() {
this.data_query('detail'); this.data_query('detail');
$('#Cari_Varian').keydown((e) => { $('#Cari_Varian').keydown((e) => {
var key = e.keyCode || e.which || 0; var key = e.keyCode || e.which || 0;
@@ -28,7 +28,7 @@ var VarianJS = {
FoniaJS.setFocus('#Cari_Varian'); FoniaJS.setFocus('#Cari_Varian');
}, },
detail_show: function(mode, ID){ detail_show(mode, ID) {
new Request({ new Request({
url: this.PHP + '/form_varian', url: this.PHP + '/form_varian',
sendParam: ['mode_detail='+mode,'VarianID='+ID], sendParam: ['mode_detail='+mode,'VarianID='+ID],
@@ -40,17 +40,17 @@ var VarianJS = {
}).send(); }).send();
}, },
detail_tambah: function(){ detail_tambah() {
this.detail_show('insert', 0); this.detail_show('insert', 0);
}, },
detail_ubah: function(acell){ detail_ubah(acell) {
this.detail_show('update', acell[0]); this.detail_show('update', acell[0]);
}, },
detail_hapus: function(acell){ detail_hapus(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => { FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','VarianID='+acell[0],'Cari_Varian'], sendParam: ['mode_detail=delete','VarianID='+acell[0],'Cari_Varian'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!') onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
@@ -58,8 +58,8 @@ var VarianJS = {
}, 'danger'); }, 'danger');
}, },
detail_save: function(){ detail_save() {
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['mode_detail','VarianID','Nama_Varian','Aktif','Cari_Varian'], sendParam: ['mode_detail','VarianID','Nama_Varian','Aktif','Cari_Varian'],
onSuccess: () => { onSuccess: () => {
@@ -69,9 +69,9 @@ var VarianJS = {
}).send(); }).send();
}, },
data_query: function(tipe, mode){ data_query(tipe, mode) {
if (tipe=="detail"){ if (tipe=="detail"){
new Request.JSONF({ new Request_JSF({
url: this.PHP + '/table_detail', url: this.PHP + '/table_detail',
sendParam: ['Cari_Varian'] sendParam: ['Cari_Varian']
}).send(); }).send();
+4 -5
View File
@@ -6,7 +6,7 @@
Description : Class umum untuk Aplikasi Invesa Description : Class umum untuk Aplikasi Invesa
Created By : Siau Pheng (siaupheng@3fonia.com). Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : February 10th, 2012. Created Date : February 10th, 2012.
Last Modified : September 1st, 2026. Last Modified : October 31st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM. (c) 3FONIA Software; WWW.3FONIA.COM.
@@ -16,11 +16,10 @@ declare(strict_types=1);
namespace App\Utils; namespace App\Utils;
use flight\Session;
final class Invesa { final class Invesa {
public const ppn = [ 0=>"Tanpa PPN", 1=>"PPN", 3=>"Spesial 1", 4=>"Spesial 2", 5=>"Spesial 3" ]; public const ppn = [ 0=>"Tanpa PPN", 1=>"PPN", 3=>"Spesial 1", 4=>"Spesial 2", 5=>"Spesial 3" ];
public const old_printer = [ "TM-U220" ];
public function __construct() { public function __construct() {
} }
@@ -158,9 +157,9 @@ final class Invesa {
/************************* PRINTER THERMAL *************************/ /************************* PRINTER THERMAL *************************/
public static function Printer_Thermal(Session $session, string $printer): bool { public static function Printer_Thermal(string $printer): bool {
$is_thermal = true; $is_thermal = true;
foreach($session->get('APP_INV',['OLD_PRINTER'=>[]])['OLD_PRINTER'] as $old) { foreach (self::old_printer as $old) {
if (str_contains($printer, $old)) { if (str_contains($printer, $old)) {
$is_thermal = false; $is_thermal = false;
break; break;
-1
View File
@@ -52,7 +52,6 @@ if (count($_apps) > 0 && ($_apps['APP_CODE'] ?? "") !== $apps['APP_CODE']) {
if (empty($session->get('WEB_APP'))) { if (empty($session->get('WEB_APP'))) {
$row = $app->db()->fetchRow("SELECT * FROM app_config WHERE REG_ID = ?", [$apps['APP_CODE']]); $row = $app->db()->fetchRow("SELECT * FROM app_config WHERE REG_ID = ?", [$apps['APP_CODE']]);
if ($row) $apps = array_merge($apps, $row->getData()); if ($row) $apps = array_merge($apps, $row->getData());
if ($apps['APP_BUILD'] ?? "" !== "") $apps['APP_VER'] = $apps['APP_BUILD'];
$apps['CREATOR_YEARS'] = ($apps['CREATOR_YEAR'] !== date('Y')) ? $apps['CREATOR_YEAR']." - ".date('Y') : $apps['CREATOR_YEAR']; $apps['CREATOR_YEARS'] = ($apps['CREATOR_YEAR'] !== date('Y')) ? $apps['CREATOR_YEAR']." - ".date('Y') : $apps['CREATOR_YEAR'];
$apps = array_merge($apps, Register::reg_status($db, $apps)); $apps = array_merge($apps, Register::reg_status($db, $apps));
$session->set('WEB_APP', $apps); $session->set('WEB_APP', $apps);