first commit
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/barcode.js
|
||||
Desc. : JS - Cetak Barcode Label
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2013.
|
||||
Last Modified : October 2nd, 2025.
|
||||
|
||||
(c) 2013 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoBarcodeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print();}.bind(this));
|
||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP, ['data=auto-produk'], {'selectFunc': RepoBarcodeJS.Produk_Comp});
|
||||
$('#butBrow').click(function(){this.produk_brow();}.bind(this));
|
||||
$('#butPL').click(function(){this.load_printer();}.bind(this));
|
||||
$('#Nama_Produk').focus();
|
||||
},
|
||||
|
||||
proses_print: function(){
|
||||
if ($('#InvID').val() == 0){
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
FoniaJS.setFocus('Nama_Produk');
|
||||
return;
|
||||
}
|
||||
if ($('#Printer').val() == ''){
|
||||
FoniaJS.showError('Silakan pilih Nama Printer Barcode !');
|
||||
return;
|
||||
}
|
||||
var cetak = new cPRINTERPOS(this.PHP);
|
||||
cetak.setPrinter($('#Printer').val());
|
||||
cetak.add_param("data", "print-barcode");
|
||||
cetak.add_param("InvID");
|
||||
cetak.add_param("SatuanID");
|
||||
cetak.add_param("Qty");
|
||||
cetak.add_param("Kode_Sup");
|
||||
cetak.add_param("Printer");
|
||||
cetak.exec();
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 900, '', function(){
|
||||
$('#winBProduk')
|
||||
.find('#Cari_Produk').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('brow-produk');
|
||||
}.bind(this)).end()
|
||||
.find('#butSearch').click(function(e){
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this)).end()
|
||||
.find('#butAll').click(function(){
|
||||
$('#winBProduk').find('#Cari_Produk').val('');
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this));
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#SatuanID').val(acell[1]);
|
||||
$('#Kode_SKU').val(acell[2]);
|
||||
$('#Nama_Produk').val(acell[4]);
|
||||
this.update_Sup();
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=brow-produk','Cari_Produk'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
var adata = item.data.split(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#SatuanID').val(adata[1]);
|
||||
$('#Kode_SKU').val(adata[0]);
|
||||
RepoBarcodeJS.update_Sup();
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
update_Sup: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=opt-sup','InvID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
load_printer: function(){
|
||||
var parent = this;
|
||||
qz.printers.find().then(function(data){
|
||||
var _dafprt = '';
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
_dafprt += data[i] + '|';
|
||||
};
|
||||
new Request.JSONF({
|
||||
url: parent.PHP,
|
||||
sendParam: ['data=load-printer','Printer='+_dafprt,'DefPrint='+$('#configPrinter').html()]
|
||||
}).send();
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/dana_pos.js
|
||||
Desc. : JS - Laporan Penerimaan Kasir / POS
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 8th, 2012.
|
||||
Last Modified : September 30th, 2025.
|
||||
|
||||
(c) 2012 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoDanaPOSJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butPOS').click(function(){this.proses_pos();}.bind(this));
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
},
|
||||
|
||||
proses_pos: function(){
|
||||
if ($('#KasirID').val()==0){
|
||||
FoniaJS.showError("Untuk Cetak POS silakan pilih salah satu Nama Pengguna!");
|
||||
$('#KasirID').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new cPRINTERPOS(this.PHP);
|
||||
cetak.add_param("data", "print-pos");
|
||||
cetak.add_param("Tipe", "R");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("KasirID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
cetak.exec();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("KasirID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("KasirID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/jual.js
|
||||
Desc. : JS - Laporan Penjualan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : April 12th, 2011.
|
||||
Last Modified : September 30th, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoJualJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/jual_analisa.js
|
||||
Desc. : JS - Laporan Analisa Penjualan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 9th, 2013.
|
||||
Last Modified : October 4th, 2025.
|
||||
|
||||
(c) 2013 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoJualAnaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Urut");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/jual_rekap.js
|
||||
Desc. : JS - Laporan Rekap Penjualan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 9th, 2013.
|
||||
Last Modified : October 4th, 2025.
|
||||
|
||||
(c) 2013 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoJualRekapJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,160 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/label.js
|
||||
Desc. : JS - Cetak Label Harga Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 13th, 2014.
|
||||
Last Modified : October 5th, 2025.
|
||||
|
||||
(c) 2014 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoLabelJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(q){//oke
|
||||
$('#butHapus').click(function(){this.proses_empty();}.bind(this));
|
||||
$('#butPrint').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
proses_empty: function(){//oke
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-detail','mode_detail=empty']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_print: function(prt){//oke
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
produk_brow: function(){//oke
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 900, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winBProduk')
|
||||
.find('#butWSimpan').click(function(){this.produk_simpan();}.bind(this)).end()
|
||||
.find('#Cari_Produk').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('brow-produk');
|
||||
}.bind(this)).end()
|
||||
.find('#butSearch').click(function(e){
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this)).end()
|
||||
.find('#butAll').click(function(){
|
||||
$('#winBProduk').find('#Cari_Produk').val('');
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this));
|
||||
this.data_query('brow-produk');
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
produk_simpan: function(){//oke
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-detail','mode_detail=simpan-produk'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_brow: function(){//oke
|
||||
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"> </div>');
|
||||
this.winBGrup = FoniaJS.showWindow('BGrup', 'Daftar Grup Barang', _isi, 900, null, function(){
|
||||
$('#winBGrup')
|
||||
.find('#Cari_Grup').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('brow-grup');
|
||||
}.bind(this)).end()
|
||||
.find('#butSearch').click(function(e){
|
||||
this.data_query('brow-grup');
|
||||
}.bind(this)).end()
|
||||
.find('#butAll').click(function(){
|
||||
$('#winBGrup').find('#Cari_Grup').val('');
|
||||
this.data_query('brow-grup');
|
||||
}.bind(this));
|
||||
this.data_query('brow-grup');
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
grup_select: function(acell){//oke
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-detail','mode_detail=simpan-grup','Grup_InvID='+acell[0]],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winBGrup);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){//oke
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-tx','mode_detail=update','ID='+acell[0]],
|
||||
onSuccess: function(a){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Barang', a.html, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail')
|
||||
.find('#butWSimpan').click(function(){this.detail_simpan();}.bind(this)).end()
|
||||
.find('#Nama_Produk').keyup(function(e){
|
||||
if (-1!==$.inArray(e.which, [13,9])) this.detail_simpan();
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
}.bind(this), false);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){//oke
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-detail','mode_detail=delete','ID='+acell[0]]
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){//oke
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-detail','mode_detail','ID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){//oke
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-detail','mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=brow-produk','Cari_Produk'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
}
|
||||
}).send();
|
||||
} else if (tipe=="brow-grup"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=brow-grup','Cari_Grup'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/opname.js
|
||||
Desc. : JS - Laporan Opname Stok Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 8th, 2012.
|
||||
Last Modified : October 4th, 2025.
|
||||
|
||||
(c) 2012 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoOpnameJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("KasirID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("KasirID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,61 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/stok_akhir.js
|
||||
Desc. : JS - Laporan Stok Akhir Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 24th, 2011.
|
||||
Last Modified : October 1st, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoStokAkhirJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("SupID");
|
||||
cetak.add_param("Grup_InvID");
|
||||
cetak.add_param("Tanggal");
|
||||
cetak.add_param("Urut");
|
||||
cetak.add_param("Harga");
|
||||
cetak.add_param("Min_Stok");
|
||||
cetak.add_param("Min_Qty");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Grup_InvID");
|
||||
dload.add_param("Tanggal");
|
||||
dload.add_param("Urut");
|
||||
dload.add_param("Harga");
|
||||
dload.add_param("Min_Stok");
|
||||
dload.add_param("Min_Qty");
|
||||
dload.download();
|
||||
},
|
||||
|
||||
oc_MinStok: function(){
|
||||
if ($('#Min_Stok').val()=='Y') {
|
||||
$('#Min_Qty').prop({disabled:false, readonly:false});
|
||||
FoniaJS.setFocus('#Min_Qty')
|
||||
} else {
|
||||
$('#Min_Qty').prop({disabled:true, readonly:true}).val(0);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/repo/stok_mutasi.js
|
||||
Desc. : JS - Laporan Mutasi Stok Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : July 16th, 2011.
|
||||
Last Modified : October 2nd, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoStokMutasiJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
||||
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
||||
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP, ['data=auto-produk'], {'selectFunc': RepoStokMutasiJS.Produk_Comp});
|
||||
$('#butBrow').click(function(){this.produk_brow();}.bind(this));
|
||||
$('#Nama_Produk').focus();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
$('#Nama_Produk').focus();
|
||||
return;
|
||||
}
|
||||
var cetak = new cPRINTER(this.PHP);
|
||||
cetak.add_param("data", "print");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("InvID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
if ($('#InvID').val()==0) {
|
||||
FoniaJS.showError('Silakan masukkan Nama Barang !');
|
||||
$('#Nama_Produk').focus();
|
||||
return;
|
||||
}
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "export");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("InvID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
},
|
||||
|
||||
produk_brow: function(){
|
||||
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"> </div>');
|
||||
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 900, '', function(){
|
||||
$('#winBProduk')
|
||||
.find('#Cari_Produk').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('brow-produk');
|
||||
}.bind(this)).end()
|
||||
.find('#butSearch').click(function(e){
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this)).end()
|
||||
.find('#butAll').click(function(){
|
||||
$('#winBProduk').find('#Cari_Produk').val('');
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this));
|
||||
this.data_query('brow-produk');
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#Nama_Produk').val(acell[3]);
|
||||
$('#Tgl_From').focus();
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=brow-produk','Cari_Produk'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
$('#InvID').val(item.value);
|
||||
$('#Tgl_From').focus();
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user