first commit
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/karyawan.js
|
||||
Desc. : JS - Tabel Master Karyawan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : July 7th, 2015.
|
||||
Last Modified : October 8th, 2025.
|
||||
|
||||
(c) 2015 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var KaryawanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Karya').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Karya').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Karya');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=karya-detail','mode_detail='+mode,'KaryaID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Data Karyawan', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail','KaryaID','Nama_Karya','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Karya']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/merek.js
|
||||
Desc. : JS - Tabel Master Merek Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : October 18th, 2025.
|
||||
|
||||
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var MerekJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Merek').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Merek').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Merek');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=merek-detail','mode_detail='+mode,'MerekID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Merek', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail=delete','MerekID='+acell[0],'Cari_Merek'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail','MerekID','Kode_Merek','Nama_Merek','Aktif','Cari_Merek'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Merek']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,293 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/produk.js
|
||||
Desc. : JS - Tabel Master Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : January 10th, 2026.
|
||||
|
||||
(c) 2010 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var ProdukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butFilter').click(function(){this.filter_show();}.bind(this));
|
||||
this.data_query('tabel-produk');
|
||||
$('#Cari_Produk').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-produk');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('tabel-produk');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Produk').val('');
|
||||
this.data_query('tabel-produk');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
},
|
||||
|
||||
filter_show: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-filter','Filter_Produk'],
|
||||
onSuccess: function(txt){
|
||||
this.winFilter = FoniaJS.showWindow('Filter', 'Filter Produk Sesuai Grup', txt, 400, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winFilter').find('#butWSimpan').click(function(){this.filter_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
$('#Fi_Produk').focus();
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_simpan: function(){
|
||||
$('#Filter_Produk').val($('#Fi_Produk').val());
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-produk');
|
||||
},
|
||||
|
||||
produk_show: function(mode, ID){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-produk','mode='+mode,'InvID='+ID],
|
||||
onSuccess: function(ajson){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Barang', ajson.html, 'xl', [{},{i:'butWBtl',v:'Batal',c:'danger'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail')
|
||||
.find('#butWSimpan').click(function(){this.produk_simpan();}.bind(this)).end()
|
||||
.find('#butWBtl').click(function(){this.produk_batal();}.bind(this));
|
||||
this.data_query('tabel-kemasan');
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_restore: function(acell){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-detail','InvID='+acell[0]],
|
||||
onSuccess: function(ajson){
|
||||
this.winBRest = FoniaJS.showWindow('BRest', 'Informasi Backup Barang', ajson.html, 'xl', [], function(){
|
||||
this.data_query('restore-tabel');
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_restore_select: function(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>', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-proses','InvID','MD5Key='+acell[1]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
FoniaJS.showInfo('Sukses restore Data Barang ini!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses restore!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
produk_restore_form: function(acell, div){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-form','InvID','MD5Key='+acell[1]],
|
||||
onSuccess: function(adata){
|
||||
$(div).html(adata.html);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_tambah: function(){
|
||||
this.produk_show('add', 0);
|
||||
},
|
||||
|
||||
produk_ubah: function(acell){
|
||||
this.produk_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
produk_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','InvID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('tabel-produk');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','InvID','Grup_InvID','MerekID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'StokID','NormalID','Harga_Beli','Harga_Tambah','Stok_Min','Stok_Max','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('tabel-produk');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_batal: function(){
|
||||
if ($('#mode').val()=='add'){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Barang ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=cancel','InvID','mode_before=add'],
|
||||
onSuccess: function(){
|
||||
this.data_query('tabel-produk');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
return false;
|
||||
}
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Perubahan Detail Barang ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=cancel','InvID'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
kemasan_batal: function(){
|
||||
var dt = $('#divKemasanTabel').DataTable(), tr, l_row;
|
||||
tr = $('#butBatalKemasan').closest('tr');
|
||||
l_row = dt.row(tr.prev('tr'));
|
||||
if (l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
if (l_row.data()[0]=='0') l_row.remove().draw(true);
|
||||
},
|
||||
|
||||
kemasan_add: function(){
|
||||
var dt = $('#divKemasanTabel').DataTable(), l_row;
|
||||
dt.order([0,'desc']);
|
||||
l_row = dt.row(':last');
|
||||
if (!dt.data().count() || l_row.data()[0]!=='0'){
|
||||
dt.row.add(['0','','SKU_BARU','',0,0,0,0,0,'<a class="table-icon fon-tabel-dt" tabindex="-1" title="Detail"><i class="bi-pencil"></i></a>']).draw(true);
|
||||
l_row = dt.row(':last');
|
||||
}
|
||||
if (!l_row.child.isShown()) l_row.nodes().to$().find('.fon-tabel-dt').click();
|
||||
},
|
||||
|
||||
kemasan_form: function(acell, div){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-kemasan','InvID','InvKemasanID='+acell[0],'Nama_Satuan='+$('#StokID').find(':selected').text()],
|
||||
onSuccess: function(adata){
|
||||
$(div).html(adata.html);
|
||||
$(div)
|
||||
.find('#butBatalKemasan').click(function(e){
|
||||
this.kemasan_batal();
|
||||
}.bind(this)).end()
|
||||
.find('#butSimpanKemasan').click(function(e){
|
||||
this.kemasan_check();
|
||||
}.bind(this));
|
||||
this.calc_Modal();
|
||||
this.calc_Harga(1);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_del: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kemasan','mode','mode_detail=delete','InvID','InvKemasanID='+acell[0]],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
kemasan_save: function(){
|
||||
if ($('#Qty').val()==0){
|
||||
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kemasan','mode','mode_detail=update','InvID','InvKemasanID','SatuanID','SatuanLamaID','Kode_Barcode','Qty','Harga_Jual'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Sukses menyimpan kemasan produk.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
kemasan_check: function(){
|
||||
if ($('#SatuanID').val()==$('#SatuanLamaID').val()) {
|
||||
this.kemasan_save();
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=check-kemasan','InvID','SatuanID'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.ada==true) {
|
||||
FoniaJS.showInfo("Nama kemasan telah ada dalam sistem!");
|
||||
} else {
|
||||
this.kemasan_save();
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-produk','Cari_Produk','Filter_Produk']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kemasan"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kemasan','mode','InvID']
|
||||
}).send();
|
||||
} else if (tipe=="restore-tabel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=restore-tabel','InvID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
hitung_HPP: function(){
|
||||
$('#Harga_Pokok').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Beli').val()) + FoniaJS.StrToFloat($('#Harga_Tambah').val()), 0));
|
||||
},
|
||||
|
||||
calc_Modal: function(){
|
||||
$('#Harga_Modal').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Pokok').val()) * FoniaJS.StrToFloat($('#Qty').val())));
|
||||
this.calc_Harga(1);
|
||||
},
|
||||
|
||||
calc_Harga: function(tipe){
|
||||
var harga = FoniaJS.StrToFloat($('#Harga_Jual').val());
|
||||
var pjual = FoniaJS.StrToFloat($('#Persen_Jual').val());
|
||||
var hmodal = FoniaJS.StrToFloat($('#Harga_Modal').val());
|
||||
if (tipe==1){
|
||||
$('#Persen_Jual').val(FoniaJS.FloatToStr((harga - hmodal) / harga * 100, 2));
|
||||
} else {
|
||||
$('#Harga_Jual').val(FoniaJS.FloatToStr(hmodal / (100 - pjual) * 100));
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/produk_grup.js
|
||||
Desc. : JS - Tabel Master Grup Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 8th, 2011.
|
||||
Last Modified : October 5th, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var ProdukGrupJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Grup').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Grup').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Grup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=grup-detail','mode_detail='+mode,'Grup_InvID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Barang', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_check();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail=delete','Grup_InvID='+acell[0],'Cari_Grup'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_check: function(){
|
||||
var _kode = $('#Kode_Grup').val();
|
||||
if (!_kode.match(/^[0-9]+$/)) {
|
||||
FoniaJS.showError('Tolong pastikan kembali Kode Grup adalah angka !');
|
||||
FoniaJS.setFocus('#Kode_Grup');
|
||||
return;
|
||||
}
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kode-check','Grup_InvID','Kode_Grup'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.ada==true) {
|
||||
FoniaJS.showInfo('Kode Grup telah ada dalam sistem!');
|
||||
} else {
|
||||
this.detail_save();
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail','Grup_InvID','Kode_Grup','Nama_Grup','Margin','Aktif','Cari_Grup'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Grup']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/rek_pos.js
|
||||
Desc. : JS - Tabel Master Jenis Pembayaran POS
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : September 9th, 2014.
|
||||
Last Modified : October 8th, 2025.
|
||||
|
||||
(c) 2014 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RekPOSJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Kartu').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Kartu').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Kartu');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kartu-detail','mode_detail='+mode,'KartuID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Jenis Pembayaran POS', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail=delete','KartuID='+acell[0],'Cari_Kartu'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail','KartuID','Kode_Kartu','Nama_Kartu','Aktif','Cari_Kartu'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Kartu']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/satuan.js
|
||||
Desc. : JS - Tabel Master Satuan Barang
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : October 5th, 2025.
|
||||
|
||||
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var SatuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Satuan').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Satuan').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Satuan');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=satuan-detail','mode_detail='+mode,'SatuanID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Satuan', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail=delete','SatuanID='+acell[0],'Cari_Satuan'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail','SatuanID','Kode_Satuan','Nama_Satuan','Aktif','Cari_Satuan'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Satuan']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/supplier.js
|
||||
Desc. : JS - Tabel Master Supplier
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : October 7th, 2025.
|
||||
|
||||
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var SupplierJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Sup').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Sup').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Sup');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=sup-detail','mode='+mode,'SupID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Supplier', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','SupID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Kota_Sup','Telp_Sup','Email_Sup','Kontak_Sup','No_NPWP','No_NITKU','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Sup']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : INVENTORY AND SALES SYSTEMS
|
||||
Module : /apps/js/tab/tx_kas.js
|
||||
Desc. : JS - Tabel Master Jenis Transaksi Kas
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : July 7th, 2015.
|
||||
Last Modified : October 8th, 2025.
|
||||
|
||||
(c) 2015 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TXKasJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_TX').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_TX').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_TX');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tx-detail','mode_detail='+mode,'TXID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Jenis Transaksi Kas', txt, 600, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('insert', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail=delete','TXID='+acell[0],'Cari_TX'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode_detail','TXID','Grup_TX','Kode_TX','Nama_TX','Aktif','Cari_TX'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_TX']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user