first commit
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Report/Inv/BarcodeController
|
||||
Description : Laporan Barcode Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2013.
|
||||
Last Modified : October 14th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoInvBarcodeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
$('#butCetak').click(() => this.proses_print());
|
||||
$('#butLoadPrinter').click(() => this.load_printer());
|
||||
$('#butBrowProduk').click(() => this.produk_brow());
|
||||
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', [], {'selectFunc':this.Produk_Comp});
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
},
|
||||
|
||||
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 PrinterPos(this.PHP + '/barcode');
|
||||
cetak.setPrinter($('#Printer').val());
|
||||
cetak.add_param("InvID");
|
||||
cetak.add_param("SatuanID");
|
||||
cetak.add_param("VarianID");
|
||||
cetak.add_param("Qty");
|
||||
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, 'xl', '', () => {
|
||||
$('#winBProduk')
|
||||
.find('#Cari_Produk').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key == 13 && e.target.value != '') this.data_query('brow-produk');
|
||||
}).end()
|
||||
.find('#butSearch').click(() => this.data_query('brow-produk')).end()
|
||||
.find('#butAll').click(() => {
|
||||
$('#winBProduk').find('#Cari_Produk').val('');
|
||||
this.data_query('brow-produk');
|
||||
});
|
||||
this.data_query('brow-produk');
|
||||
});
|
||||
},
|
||||
|
||||
produk_select: function(acell){
|
||||
FoniaJS.closeWindow(this.winBProduk);
|
||||
$('#InvID').val(acell[0]);
|
||||
$('#SatuanID').val(acell[1]);
|
||||
$('#VarianID').val(acell[2]);
|
||||
$('#Kode_SKU').val(acell[3]);
|
||||
$('#Nama_Produk').val(acell[5]);
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
Produk_Comp: function(item){
|
||||
var adata = item.data.split(':');
|
||||
$('#InvID').val(item.value);
|
||||
$('#SatuanID').val(adata[0]);
|
||||
$('#VarianID').val(adata[1]);
|
||||
$('#Kode_SKU').val(adata[2]);
|
||||
$('#Nama_Produk').val(item.text);
|
||||
FoniaJS.setFocus('#Qty');
|
||||
},
|
||||
|
||||
load_printer: function(){
|
||||
qz.printers.find().then((data) => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/load_printer',
|
||||
sendParam: ['Printer='+JSON.stringify(data),'DefPrint='+$('#configPrinter').html()]
|
||||
}).send();
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Report/Inv/HutangController
|
||||
Description : Laporan Hutang Supplier
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : July 17th, 2011.
|
||||
Last Modified : October 8th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoInvHutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
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 Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("SupID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,142 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Report/Inv/LabelController
|
||||
Description : Cetak Label Harga
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 13th, 2014.
|
||||
Last Modified : October 16th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoInvLabelJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(q){
|
||||
$('#butHapus').click(() => this.proses_empty());
|
||||
$('#butPrint').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
this.data_query('tabel-detail', 'empty', ((typeof(q)!=='undefined') ? q : ''));
|
||||
},
|
||||
|
||||
proses_empty: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=empty']
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
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, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winBProduk')
|
||||
.find('#butWSimpan').click(() => this.produk_simpan()).end()
|
||||
.find('#Cari_Produk').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key == 13 && e.target.value != '') this.data_query('brow-produk');
|
||||
}).end()
|
||||
.find('#butSearch').click(() => this.data_query('brow-produk')).end()
|
||||
.find('#butAll').click(() => {
|
||||
$('#winBProduk').find('#Cari_Produk').val('');
|
||||
this.data_query('brow-produk');
|
||||
});
|
||||
this.data_query('brow-produk');
|
||||
});
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-produk'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBProduk)
|
||||
}).send();
|
||||
},
|
||||
|
||||
grup_brow: function(){
|
||||
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, 'xl', '', () => {
|
||||
$('#winBGrup')
|
||||
.find('#Cari_Grup').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('brow-grup');
|
||||
}).end()
|
||||
.find('#butSearch').click(() => this.data_query('brow-grup')).end()
|
||||
.find('#butAll').click(() => {
|
||||
$('#winBGrup').find('#Cari_Grup').val('');
|
||||
this.data_query('brow-grup');
|
||||
});
|
||||
this.data_query('brow-grup');
|
||||
});
|
||||
},
|
||||
|
||||
grup_select: function(acell){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBGrup)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
new Request({
|
||||
url: this.PHP + '/form_detail',
|
||||
sendParam: ['mode_detail=update','ID='+acell[0]],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Barang', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail')
|
||||
.find('#butWSimpan').click(() => this.detail_simpan())
|
||||
.find('#Nama_Produk').keyup((e) => {
|
||||
if (-1!==$.inArray(e.which, [13,9])) this.detail_simpan();
|
||||
});
|
||||
FoniaJS.setFocus('#Nama_Produk');
|
||||
}, false);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','ID='+acell[0]]
|
||||
}).send();
|
||||
}, 'danger');
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
}).send();
|
||||
} else if (tipe=="brow-grup"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/brow_grup',
|
||||
sendParam: ['Cari_Grup'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Grup')
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,82 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Report/Inv/PiutangController
|
||||
Description : Laporan Piutang Member
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : July 17th, 2011.
|
||||
Last Modified : October 8th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoInvPiutangJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
$('#butCetak').click(() => this.proses_print(true));
|
||||
$('#butPreview').click(() => this.proses_print());
|
||||
$('#butExcel').click(() => this.proses_dload());
|
||||
$('#butBrowMember').click(() => this.member_brow());
|
||||
FoniaJS.AutoComplete('#Nama_Member', this.PHP + '/auto_member', [], {'selectFunc':this.Member_Comp});
|
||||
},
|
||||
|
||||
proses_print: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print');
|
||||
cetak.add_param("Tipe");
|
||||
cetak.add_param("CabID");
|
||||
cetak.add_param("MemberID");
|
||||
cetak.add_param("Tgl_From");
|
||||
cetak.add_param("Tgl_To");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
},
|
||||
|
||||
proses_dload: function(){
|
||||
var dload = new Download(this.PHP + '/excel');
|
||||
dload.add_param("Tipe");
|
||||
dload.add_param("CabID");
|
||||
dload.add_param("MemberID");
|
||||
dload.add_param("Tgl_From");
|
||||
dload.add_param("Tgl_To");
|
||||
dload.download();
|
||||
},
|
||||
|
||||
member_brow: function(){
|
||||
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"> </div>');
|
||||
this.winBMember = FoniaJS.showWindow('BMember', 'Daftar Member', _isi, 'xl', '', () => {
|
||||
$('#winBMember')
|
||||
.find('#Cari_Member').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key == 13 && e.target.value != '') this.data_query('brow-member');
|
||||
}).end()
|
||||
.find('#butSearch').click(() => this.data_query('brow-member')).end()
|
||||
.find('#butAll').click(() => {
|
||||
$('#winBMember').find('#Cari_Member').val('');
|
||||
this.data_query('brow-member');
|
||||
});
|
||||
this.data_query('brow-member');
|
||||
});
|
||||
},
|
||||
|
||||
member_select: function(acell){
|
||||
FoniaJS.closeWindow(this.winBMember);
|
||||
$('#MemberID').val(acell[0]);
|
||||
$('#Nama_Member').val(acell[1]);
|
||||
},
|
||||
|
||||
data_query: function(tipe){
|
||||
if (tipe=="brow-member"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/brow_member',
|
||||
sendParam: ['Cari_Member'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Member')
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
Member_Comp: function(item){
|
||||
$('#MemberID').val(item.value);
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user