first commit

This commit is contained in:
2026-10-29 13:34:31 +07:00
commit 45e4595c57
255 changed files with 35457 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
/*******************************************************************
PHP Class : /Controller/Table/Gel/GajiController
Description : Master Standar Gaji
Created By : Siau Pheng ([email protected]).
Created Date : September 17th, 2014.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var GajiJS = {
PHP: '',
KODE: '',
index: function(){
$('#butUbah').click(() => this.proses_edit());
$('#butSimpan').click(() => this.proses_save());
this.data_query('view');
},
proses_edit: function(){
this.data_query('update');
},
proses_save: function(){
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'],
onSuccess: (ajson) => {
$('#divMaster').html(ajson.html);
this.update_event();
FoniaJS.showInfo('Data Standar Gaji Karyawan sukses disimpan!');
}
}).send()
},
data_query: function(mode){
new Request({
url: this.PHP + '/form_gaji',
sendParam: ['mode_detail='+mode,'REG_ID'],
onSuccess: (ajson) => {
$('#divMaster').html(ajson.html);
this.update_event();
}
}).send()
},
update_event: function(){
if ($.inArray($('#mode_detail').val(), ['update']) >= 0) {
$("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false);
} else {
$("#butUbah").prop('disabled', false);
$("#butSimpan").prop('disabled', true);
}
}
};
+83
View File
@@ -0,0 +1,83 @@
/*******************************************************************
PHP Class : /Controller/Table/Gel/GrupController
Description : Master Grup Rekening
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var RekGrupJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Rek').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Rek').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Rek');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_RekID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Rekening', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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[1]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_RekID='+acell[0],'Cari_Rek'],
onSuccess: () => {
FoniaJS.showInfo('Proses hapus data sukses!');
}
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_RekID','Nama_Grup','Aktif','Cari_Rek'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Rek']
}).send();
}
}
};
+79
View File
@@ -0,0 +1,79 @@
/*******************************************************************
PHP Class : /Controller/Table/Gel/KaryawanController
Description : Master Karyawan
Created By : Siau Pheng ([email protected]).
Created Date : July 7th, 2015.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var KaryawanJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Karya').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Karya').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Karya');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_karya',
sendParam: ['mode_detail='+mode,'KaryaID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Data Karyawan', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => $('#winDetail').find('#butWSimpan').click(() => this.detail_save()));
}
}).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> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','KaryaID='+acell[0],'Cari_Karya'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KaryaID','Nama_Karya','Gaji_Harian','Tgl_Masuk','Tgl_Keluar','Aktif','Cari_Karya'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Karya']
}).send();
}
}
};
+102
View File
@@ -0,0 +1,102 @@
/*******************************************************************
PHP Class : /Controller/Table/Gel/RekController
Description : Master Rekening
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2010.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var RekJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#butPrint').click(() => this.print_show());
$('#Cari_Rek').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Rek').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Rek');
},
print_show: function(){
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
this.winDPrint = FoniaJS.showWindow('DPrint', 'Cetak Daftar Rekening', ajson.html, 'lg', [{},{"i":"butWCetak","v":"Cetak","c":"info"},{"i":"butWPreview","v":"Pratinjau","c":"secondary"}], () => {
$('#winDPrint')
.find('#butWCetak').click(() => this.print_rek(true)).end()
.find('#butWPreview').click(() => this.print_rek());
});
}
}).send();
},
print_rek: function(prt){
var cetak = new Printer(this.PHP + '/print_rek');
cetak.add_param("Grup_RekID");
cetak.add_param("Level");
cetak.add_param("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint);
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_rek',
sendParam: ['mode_detail='+mode,'Kode_Rek='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Rekening', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => $('#winDetail').find('#butWSimpan').click(() => this.detail_save()));
}
}).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[1]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Kode_Rek='+acell[0],'Cari_Rek'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Kode_Rek','Kode_Induk','Nama_Rek','Grup_RekID','Level','Mode','Kas_Rek','Aktif','Cari_Rek'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Rek']
}).send();
}
}
};
+102
View File
@@ -0,0 +1,102 @@
/*******************************************************************
PHP Class : /Controller/Table/Member/MemberController
Description : Master Member
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2010.
Last Modified : September 3rd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var MemberJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#butPrint').click(() => this.print_show());
$('#Cari_Member').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Member').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Member');
},
print_show: function(){
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
this.winDPrint = FoniaJS.showWindow('DPrint', 'Cetak Daftar Member', ajson.html, 'lg', [{},{"i":"butWCetak","v":"Cetak","c":"info"},{"i":"butWPreview","v":"Pratinjau","c":"secondary"}], () => {
$('#winDPrint')
.find('#butWCetak').click(() => this.print_member(true)).end()
.find('#butWPreview').click(() => this.print_member());
});
}
}).send();
},
print_member: function(prt){
var cetak = new Printer(this.PHP + '/print_member');
cetak.add_param("Grup_MemberID");
cetak.add_param("Aktif");
cetak.add_param("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint);
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_member',
sendParam: ['mode_detail='+mode,'MemberID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Member', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => $('#winDetail').find('#butWSimpan').click(() => this.detail_save()));
}
}).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> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','MemberID='+acell[0],'Cari_Member'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
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'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Member']
}).send();
}
}
};
+83
View File
@@ -0,0 +1,83 @@
/*******************************************************************
PHP Class : /Controller/Table/Member/MembergrupController
Description : Master Grup Member
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 3rd, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var MemberGrupJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Member').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Member').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Member');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_MemberID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Member', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_MemberID='+acell[0],'Cari_Member'],
onSuccess: () => {
FoniaJS.showInfo('Proses hapus data sukses!');
}
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_MemberID','Kode_Grup','Nama_Grup','Aktif','Cari_Member'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Member']
}).send();
}
}
};
+83
View File
@@ -0,0 +1,83 @@
/*******************************************************************
PHP Class : /Controller/Table/Member/PointbarangController
Description : Master Point Penukanan Barang
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var PointBarangJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Barang').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Barang').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Barang');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_barang',
sendParam: ['mode_detail='+mode,'InvPID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Point Penukaran Barang', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','InvPID='+acell[0],'Cari_Barang'],
onSuccess: () => {
FoniaJS.showInfo('Proses hapus data sukses!');
}
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','InvPID','Point_TipeID','Nama_Barang','SatuanID','Nilai_Barang','Nilai_Point','Aktif','Cari_Barang'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Barang']
}).send();
}
}
};
+153
View File
@@ -0,0 +1,153 @@
/*******************************************************************
PHP Class : /Controller/Table/Member/PointskemaController
Description : Master Skema Point Member
Created By : Siau Pheng ([email protected]).
Created Date : September 28th, 2014.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var PointSkemaJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Skema').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Skema').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Skema');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_skema',
sendParam: ['mode_detail='+mode,'PointID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Skema Point Member', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail')
.find('#butWSimpan').click(() => this.detail_save()).end()
.find('#butBrow1').click(() => this.grup_form()).end()
.find('#butBrow2').click(() => this.barang_form());
});
}
}).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[5]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','PointID='+acell[0],'Cari_Skema'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
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'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
grup_form: function(){
new Request({
url: this.PHP + '/form_grup',
sendParam: ['Grup_Barang'],
onSuccess: (ajson) => {
this.winGrup = FoniaJS.showWindow('Grup', 'Daftar Grup Barang', ajson.html, 'lg', [{i:'butWSAll',v:'Cek Semua',c:'info'},{i:'butWCAll',v:'Hapus Semua',c:'info'},{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winGrup')
.find('#butWSAll').click(() => this.grup_semua()).end()
.find('#butWCAll').click(() => this.grup_clear()).end()
.find('#butWSimpan').click(() => this.grup_save());
});
}
}).send();
},
grup_semua: function(){
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', true);
},
grup_clear: function(){
$('#tabGrupList input.form-check-input[type=checkbox]').prop('checked', false);
},
grup_save: function(){
var alist = [];
$('#tabGrupList tbody input.form-check-input[type=checkbox]:checked').map((i, b) => {
alist.push($(b).val());
});
$('#Grup_Barang').val(alist.join());
FoniaJS.closeWindow(this.winGrup);
},
barang_form: function(){
new Request({
url: this.PHP + '/form_barang',
sendParam: ['Kode_Barang'],
onSuccess: (ajson) => {
this.winBarang = FoniaJS.showWindow('Barang', 'Daftar Barang', ajson.html, 'lg', null, () => {
FoniaJS.AutoComplete('#Nama_Produk', this.PHP + '/auto_produk', ['Kode_Barang'], {'selectFunc': this.Produk_Comp});
this.data_query("tabel-barang");
});
}
}).send();
},
barang_hapus: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_barang',
sendParam: ['mode_detail=delete','InvID='+acell[0],'Kode_Barang'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Skema']
}).send();
} else if (tipe=="tabel-barang"){
new Request.JSONF({
url: this.PHP + '/table_barang',
sendParam: ['Kode_Barang'],
onSuccess: () => FoniaJS.setFocus('#Nama_Produk')
}).send();
}
},
Produk_Comp: function(item){
new Request.JSONF({
url: PointSkemaJS.PHP + '/table_barang',
sendParam: ['mode_detail=insert','Kode_Barang','InvID='+item.value]
}).send();
$('#Nama_Produk').val('').focus();
}
};
+83
View File
@@ -0,0 +1,83 @@
/*******************************************************************
PHP Class : /Controller/Table/Member/PointtipeController
Description : Master Tipe Point Member
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 4th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var PointTipeJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Tipe').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Tipe').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Tipe');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_tipe',
sendParam: ['mode_detail='+mode,'Point_TipeID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Tipe Point Member', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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[1]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Point_TipeID='+acell[0],'Cari_Tipe'],
onSuccess: () => {
FoniaJS.showInfo('Proses hapus data sukses!');
}
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Point_TipeID','Nama_Tipe','Txt_Struk1','Txt_Struk2','Aktif','Cari_Tipe'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Tipe']
}).send();
}
}
};
+54
View File
@@ -0,0 +1,54 @@
/*******************************************************************
PHP Class : /Controller/Table/Ppob/KategoriController
Description : Master Kategori PPOB
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 1st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var PPOBKateJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Kate').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Kate').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Kate');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_kategori',
sendParam: ['mode_detail='+mode,'KateID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Kategori PPOB', ajson.html, 'lg', [{},{i:'butTutup'}]);
}
}).send();
},
detail_ubah: function(acell){
this.detail_show('update', acell[0]);
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Kate']
}).send();
}
}
};
+54
View File
@@ -0,0 +1,54 @@
/*******************************************************************
PHP Class : /Controller/Table/Ppob/OperatorController
Description : Master Operator PPOB
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 1st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var PPOBOpeJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Ope').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Ope').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Ope');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_operator',
sendParam: ['mode_detail='+mode,'OpeID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Operator PPOB', ajson.html, 'lg', [{},{i:'butTutup'}]);
}
}).send();
},
detail_ubah: function(acell){
this.detail_show('update', acell[0]);
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Ope']
}).send();
}
}
};
+115
View File
@@ -0,0 +1,115 @@
/*******************************************************************
PHP Class : /Controller/Table/Ppob/ProdukController
Description : Master Produk PPOB
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : September 1st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var PPOBProdukJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show());
$('#butUpdate').click(() => this.update_show());
$('#Cari_Produk').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('tabel-produk');
});
$('#butSearch').click((e) => this.data_query('tabel-produk'));
$('#butAll').click(() => {
$('#Cari_Produk').val('');
this.data_query('tabel-produk');
});
FoniaJS.setFocus('#Cari_Produk');
},
print_show: function(){
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
this.winDPrint = FoniaJS.showWindow('DPrint', 'Cetak Daftar Produk PPOB', ajson.html, 'lg', [{},{"i":"butWCetak","v":"Cetak","c":"info"},{"i":"butWPreview","v":"Pratinjau","c":"secondary"}], () => {
$('#winDPrint')
.find('#butWCetak').click(() => this.print_produk(true)).end()
.find('#butWPreview').click(() => this.print_produk());
});
}
}).send();
},
print_produk: function(prt){
var cetak = new Printer(this.PHP + '/print_produk');
cetak.add_param("KateID");
cetak.add_param("OpeID");
cetak.add_param("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint);
},
update_show: function(){
new Request({
url: this.PHP + '/detail_update',
onSuccess: (ajson) => {
this.winDUpdate = FoniaJS.showWindow('DUpdate', 'Update Produk PPOB', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Proses',c:'success'}], () => {
$('#winDUpdate').find('#butWSimpan').click(() => this.update_proses());
});
}
}).send();
},
update_proses: function(){
new Request.JSONF({
url: this.PHP + '/proses_update',
sendParam: ['K_Kate','K_Ope'],
onSuccess: (ajson) => {
FoniaJS.closeWindow(this.winDUpdate);
this.data_query('tabel-produk');
}
}).send();
},
produk_show: function(mode, ID){
new Request({
url: this.PHP + '/form_produk',
sendParam: ['mode_detail='+mode,'ProdukID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Produk PPOB', ajson.html, 'xl', [{},{i:'butBatal'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.produk_simpan());
});
}
}).send();
},
produk_ubah: function(acell){
this.produk_show('update', acell[0]);
},
produk_simpan: function(){
new Request.JSONF({
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'],
onSuccess: (adata) => {
if (adata.status){
FoniaJS.showInfo('Proses simpan data sukses!');
} else FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="tabel-produk"){
new Request.JSONF({
url: this.PHP + '/table_produk',
sendParam: ['Cari_Produk']
}).send();
}
}
};
+519
View File
@@ -0,0 +1,519 @@
/*******************************************************************
PHP Class : /Controller/Table/ProdukController
Description : Master Barang
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : August 27th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var ProdukJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('tabel-produk');
$('#butPrint').click(() => this.print_show());
$('#butFilter').click(() => this.filter_show());
$('#Cari_Produk').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('tabel-produk');
});
$('#butSearch').click((e) => this.data_query('tabel-produk'));
$('#butAll').click(() => {
$('#Cari_Produk').val('');
this.data_query('tabel-produk');
});
FoniaJS.setFocus('#Cari_Produk');
},
print_show: function(){
new Request({
url: this.PHP + '/detail_print',
onSuccess: (ajson) => {
this.winDPrint = FoniaJS.showWindow('DPrint', 'Cetak Daftar Barang', ajson.html, 'lg', [{},{"i":"butWCetak","v":"Cetak","c":"info"},{"i":"butWPreview","v":"Pratinjau","c":"secondary"}], () => {
$('#winDPrint')
.find('#butWCetak').click(() => this.print_produk(true)).end()
.find('#butWPreview').click(() => this.print_produk());
});
}
}).send();
},
print_produk: function(prt){
var cetak = new Printer(this.PHP + '/print_barang');
cetak.add_param("SupID");
cetak.add_param("Grup_InvID");
cetak.add_param("Grup_MemberID");
cetak.add_param("Tgl_Cetak");
if (prt) cetak.doPrint(); else cetak.doPreview();
FoniaJS.closeWindow(this.winDPrint);
},
filter_show: function(){
new Request({
url: this.PHP + '/detail_filter',
sendParam: ['Filter_Produk'],
onSuccess: (ajson) => {
this.winFilter = FoniaJS.showWindow('Filter', 'Filter Produk Sesuai Grup', ajson.html, 400, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winFilter').find('#butWSimpan').click(() => this.filter_simpan());
});
$('#Fi_Produk').focus();
}
}).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({
url: this.PHP + '/detail_produk',
sendParam: ['mode='+mode,'InvID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Barang', ajson.html, 'xl', [{},{i:'butWBtl',v:'Batal',c:'danger'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail')
.find('#butWSimpan').click(() => this.produk_simpan()).end()
.find('#butWBtl').click(() => this.produk_batal());
this.data_query('tabel-kemasan');
this.data_query('tabel-varian');
this.data_query('tabel-harga');
});
}
}).send();
},
produk_restore: function(acell){
new Request({
url: this.PHP + '/detail_restore',
sendParam: ['InvID='+acell[0]],
onSuccess: (ajson) => {
this.winBRest = FoniaJS.showWindow('BRest', 'Informasi Backup Barang', ajson.html, 'xl', [], () => this.data_query('tabel-restore'));
}
}).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>', () => {
new Request({
url: this.PHP + '/proses_restore',
sendParam: ['InvID','MD5Key='+acell[1]],
onSuccess: (adata) => {
FoniaJS.showInfo('Sukses restore Data Barang ini!');
}
}).send();
}, 'danger');
},
produk_restore_form: function(acell, div){
new Request({
url: this.PHP + '/form_restore',
sendParam: ['InvID','MD5Key='+acell[1]],
onSuccess: (adata) => $(div).html(adata.html)
}).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> ?', () => {
FoniaJS.showAuth(() => {
new Request({
url: this.PHP + '/proses_simpan',
sendParam: ['mode=del','InvID='+acell[0]],
onSuccess: (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!');
}
}
}).send();
}, this, 'HAPUS BARANG : '+acell[1]);
}, 'danger');
},
produk_simpan: function(){
new Request({
url: this.PHP + '/proses_simpan',
sendParam: ['mode','InvID','Grup_InvID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'StokID','NormalID','PPN','Harga_Beli','Harga_Tambah','Stok_Min','Stok_Max','Aktif'],
onSuccess: (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);
}
}).send();
},
produk_batal: function(){
if ($('#mode').val()=='add'){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Penambahan Barang ?', () => {
new Request({
url: this.PHP + '/proses_simpan',
sendParam: ['mode=cancel','InvID','mode_before=add'],
onSuccess: () => {
this.data_query('tabel-produk');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
}, 'danger');
return false;
}
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan batalkan Perubahan Detail Barang ?', () => {
new Request({
url: this.PHP + '/proses_simpan',
sendParam: ['mode=cancel','InvID'],
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
}).send();
}, 'danger');
},
brow_produk: function(){
var _isi = new String('<div class="row mb-1"><div class="col"><div class="input-group"><input class="form-control" id="Cari_Produk2" placeholder="Kunci Pencarian" type="text"><button class="btn btn-info shadow-none" type="button" id="butSearch">Cari</button><button class="btn btn-secondary shadow-none" type="button" id="butAll">Semua</button></div></div></div><div id="divBrowProduk">&nbsp;</div>');
this.winBProduk = FoniaJS.showWindow('BProduk', 'Daftar Barang', _isi, 'xl', '', () => {
$('#winBProduk').find('#Cari_Produk2').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('brow-produk');
});
$('#winBProduk').find('#butSearch').click((e) => this.data_query('brow-produk'));
$('#winBProduk').find('#butAll').click(() => {
$('#winBProduk').find('#Cari_Produk2').val('');
this.data_query('brow-produk');
});
this.data_query('brow-produk');
FoniaJS.setFocus('#Cari_Produk2');
});
},
produk_select: function(acell){
FoniaJS.closeWindow(this.winBProduk);
new Request({
url: this.PHP + '/proses_copy',
sendParam: ['InvID','InvBaruID='+acell[0]],
onSuccess: (adata) => {
if (adata.status==true){
this.data_query('tabel-kemasan');
this.data_query('tabel-varian');
this.data_query('tabel-harga');
FoniaJS.showInfo('Salin data Kemasan & Harga dari barang lain telah selesai.');
}else{
FoniaJS.showInfo('Ada masalah dalam proses salin data!');
}
}
}).send();
},
kemasan_copy: function(){
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(){
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','','','<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({
url: this.PHP + '/form_kemasan',
sendParam: ['InvID','InvKemasanID='+acell[0],'Satuan_Stok='+$('#StokID').find(':selected').text()],
onSuccess: (adata) => {
$(div).html(adata.html);
$(div)
.find('#butBatalKemasan').click((e) => this.kemasan_batal()).end()
.find('#butSimpanKemasan').click((e) => this.kemasan_check());
}
}).send();
},
kemasan_del: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','mode_detail=delete','InvID','InvKemasanID='+acell[0],'SatuanLamaID='+acell[1],'Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => {
FoniaJS.showInfo('Proses hapus data sukses!');
var _obtn = $('button:contains("Salin Kemasan")');
if (_obtn) _obtn.removeClass('btn-info').addClass('btn-warning');
}
}).send();
}, 'danger');
},
kemasan_save: function(){
if ($('#Qty').val()==0){
FoniaJS.showInfo('Mohon isi jumlah Qty / Kemasan !');
return false;
}
new Request.JSONF({
url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','mode_detail=update','InvID','InvKemasanID','SatuanID','SatuanLamaID','Qty','Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => {
FoniaJS.showInfo('Sukses menyimpan kemasan produk.');
this.data_query('tabel-varian');
this.data_query('tabel-harga');
var _obtn = $('button:contains("Salin Kemasan")');
if (_obtn) _obtn.removeClass('btn-info').addClass('btn-warning');
}
}).send();
},
kemasan_check: function(){
if ($('#SatuanID').val()==$('#SatuanLamaID').val()) {
this.kemasan_save();
return;
}
new Request({
url: this.PHP + '/check_kemasan',
sendParam: ['InvID','SatuanID'],
onSuccess: (adata) => {
if (adata.ada==true) {
FoniaJS.showInfo("Nama kemasan telah ada dalam sistem!");
} else {
this.kemasan_save();
}
}
}).send();
},
varian_batal: function(){
var dt = $('#divVarianTabel').DataTable(), tr, l_row;
tr = $('#butBatalVarian').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);
},
varian_add: function(){
var dt = $('#divVarianTabel').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','','','','<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();
},
varian_form: function(acell, div){
new Request({
url: this.PHP + '/form_varian',
sendParam: ['InvID','InvVarianID='+acell[0]],
onSuccess: (adata) => {
$(div).html(adata.html);
$(div)
.find('#butBatalVarian').click((e) => this.varian_batal()).end()
.find('#butSimpanVarian').click((e) => this.varian_check());
}
}).send();
},
varian_del: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[4]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=delete','InvID','InvVarianID='+acell[0]],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
varian_save: function(){
new Request.JSONF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','mode_detail=update','InvID','InvVarianID','SatuanID','VarianID','Kode_Barcode'],
onSuccess: () => FoniaJS.showInfo('Sukses menyimpan varian produk.')
}).send();
},
varian_check: function(){
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#VarianID').val()==$('#VarianLamaID').val()) && ($('#Kode_Barcode').val()==$('#Kode_BarcodeLama').val())) {
this.varian_save();
return;
}
new Request({
url: this.PHP + '/check_varian',
sendParam: ['InvID','SatuanID','VarianID','Kode_Barcode'],
onSuccess: (adata) => {
if (adata.ada==true) {
FoniaJS.showInfo("Nama varian telah ada dalam sistem!");
} else {
this.varian_save();
}
}
}).send();
},
harga_batal: function(){
var dt = $('#divHargaTabel').DataTable(), tr, l_row;
tr = $('#butBatalHarga').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);
},
harga_add: function(){
var dt = $('#divHargaTabel').DataTable(), l_row;
dt.order([0,'desc']);
l_row = dt.row(':last');
if (!dt.data().count() || l_row.data()[0]!=='0'){
if (FoniaJS.user_level(2)) {
dt.row.add(['0','','',0,0,0,0,'<a class="table-icon fon-tabel-dt" tabindex="-1" title="Detail"><i class="bi-pencil"></i></a>']).draw(true);
} else dt.row.add(['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();
},
harga_form: function(acell, div){
new Request({
url: this.PHP + '/form_harga',
sendParam: ['InvID','InvHargaID='+acell[0]],
onSuccess: (adata) => {
$(div).html(adata.html);
$(div)
.find('#butBatalHarga').click((e) => this.harga_batal()).end()
.find('#butSimpanHarga').click((e) => this.harga_check());
this.calc_Modal();
this.calc_Harga(1);
}
}).send();
},
harga_del: function(acell){
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[1]+' - '+acell[2]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=delete','InvID','InvHargaID='+acell[0]],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
harga_save: function(){
new Request.JSONF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','mode_detail=update','InvID','InvHargaID','SatuanID','Grup_MemberID','Harga_Jual'],
onSuccess: () => FoniaJS.showInfo('Sukses menyimpan harga produk.')
}).send();
},
harga_check: function(){
if (($('#SatuanID').val()==$('#SatuanLamaID').val()) && ($('#Grup_MemberID').val()==$('#GrupLamaID').val())) {
this.harga_save();
return;
}
new Request({
url: this.PHP + '/check_harga',
sendParam: ['InvID','SatuanID','Grup_MemberID'],
onSuccess: (adata) => {
if (adata.ada==true) {
FoniaJS.showInfo("Harga jual per member telah ada dalam sistem!");
} else {
this.harga_save();
}
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="tabel-produk"){
new Request.JSONF({
url: this.PHP + '/tabel_produk',
sendParam: ['Cari_Produk','Filter_Produk']
}).send();
} else if (tipe=="tabel-kemasan"){
new Request.JSONF({
url: this.PHP + '/tabel_kemasan',
sendParam: ['mode','InvID','Satuan_Stok='+$('#StokID').find(":selected").text()],
onSuccess: () => {
var _obtn = $('button:contains("Salin Kemasan")');
if (_obtn) _obtn.removeClass('btn-info').addClass('btn-warning');
}
}).send();
} else if (tipe=="tabel-varian"){
new Request.JSONF({
url: this.PHP + '/tabel_varian',
sendParam: ['mode','InvID']
}).send();
} else if (tipe=="tabel-harga"){
new Request.JSONF({
url: this.PHP + '/tabel_harga',
sendParam: ['mode','InvID']
}).send();
} else if (tipe=="tabel-restore"){
new Request.JSONF({
url: this.PHP + '/tabel_restore',
sendParam: ['InvID']
}).send();
} else if (tipe=="brow-produk"){
new Request.JSONF({
url: this.PHP + '/brow_produk',
sendParam: ['Cari_Produk2'],
onSuccess: () => FoniaJS.setFocus('#Cari_Produk2')
}).send();
}
},
hitung_HPP: function(){
$('#Harga_Pokok').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Beli').val()) + FoniaJS.StrToFloat($('#Harga_Tambah').val()), 0));
},
calc_Modal: function(){
new Request({
url: this.PHP + '/check_modal',
sendParam: ['InvID','SatuanID'],
onSuccess: (ajson) => {
if (ajson) {
$('#Harga_Modal').val(FoniaJS.FloatToStr(FoniaJS.StrToFloat($('#Harga_Pokok').val()) * ajson.Qty));
this.calc_Harga(1);
}
}
}).send();
},
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 == 0 ? 0 : (harga - hmodal) / harga * 100), 2));
} else {
$('#Harga_Jual').val(FoniaJS.FloatToStr(hmodal / (100 - pjual) * 100));
}
},
calc_Harga1: () => ProdukJS.calc_Harga(1),
calc_Harga2: () => ProdukJS.calc_Harga(2),
};
+81
View File
@@ -0,0 +1,81 @@
/*******************************************************************
PHP Class : /Controller/Table/ProdukgrupController
Description : Master Grup Barang
Created By : Siau Pheng ([email protected]).
Created Date : February 8th, 2011.
Last Modified : August 31st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var ProdukGrupJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Grup').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Grup').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Grup');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_grup',
sendParam: ['mode_detail='+mode,'Grup_InvID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Grup Barang', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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> ?', () => {
new Request({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','Grup_InvID='+acell[0],'Cari_Grup'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','Grup_InvID','Kode_Grup','Nama_Grup','Margin','Aktif','Cari_Grup'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Grup']
}).send();
}
}
};
+81
View File
@@ -0,0 +1,81 @@
/*******************************************************************
PHP Class : /Controller/Table/RekposController
Description : Master Jenis Pembayaran POS
Created By : Siau Pheng ([email protected]).
Created Date : September 9th, 2014.
Last Modified : August 31st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var RekPOSJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Rekpos').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Rekpos').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Rekpos');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_rekpos',
sendParam: ['mode_detail='+mode,'KartuID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Jenis Pembayaran POS', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','KartuID='+acell[0],'Cari_Rekpos'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','KartuID','Kode_Kartu','Nama_Kartu','Kode_Rek','Aktif','Cari_Rekpos'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Rekpos']
}).send();
}
}
};
+83
View File
@@ -0,0 +1,83 @@
/*******************************************************************
PHP Class : /Controller/Table/SatuanController
Description : Master Satuan
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : August 31st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var SatuanJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Satuan').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Satuan').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Satuan');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_satuan',
sendParam: ['mode_detail='+mode,'SatuanID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Satuan', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','SatuanID='+acell[0],'Cari_Satuan'],
onSuccess: () => {
FoniaJS.showInfo('Proses hapus data sukses!');
}
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','SatuanID','Kode_Satuan','Nama_Satuan','Aktif','Cari_Satuan'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Satuan']
}).send();
}
}
};
+85
View File
@@ -0,0 +1,85 @@
/*******************************************************************
PHP Class : /Controller/Table/SupplierController
Description : Master Supplier
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2010.
Last Modified : August 31st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var SupplierJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Sup').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click(() => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Sup').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Sup');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_supplier',
sendParam: ['mode_detail='+mode,'SupID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Supplier', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => $('#winDetail').find('#butWSimpan').click(() => this.detail_save()));
}
}).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> ?', () => {
new Request({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','SupID='+acell[0],'Cari_Sup'],
onSuccess: (adata) => {
if (adata.status==true){
FoniaJS.showInfo('Proses hapus data sukses!');
} else FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
}
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','SupID','Kode_Sup','Nama_Sup','Alamat_Sup','Telp_Sup','No_NPWP','No_NITKU','Aktif','Cari_Sup'],
onSuccess: (adata) => {
if (adata.status==true){
FoniaJS.showInfo('Proses simpan data sukses!');
} else FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Sup']
}).send();
}
}
};
+81
View File
@@ -0,0 +1,81 @@
/*******************************************************************
PHP Class : /Controller/Table/VarianController
Description : Master Varian
Created By : Siau Pheng ([email protected]).
Created Date : May 19th, 2010.
Last Modified : August 31st, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var VarianJS = {
PHP: '',
KODE: '',
index: function(){
this.data_query('detail');
$('#Cari_Varian').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
});
$('#butSearch').click((e) => this.data_query('detail'));
$('#butAll').click(() => {
$('#Cari_Varian').val('');
this.data_query('detail');
});
FoniaJS.setFocus('#Cari_Varian');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP + '/form_varian',
sendParam: ['mode_detail='+mode,'VarianID='+ID],
onSuccess: (ajson) => {
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Varian', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
});
}
}).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[1]+'"</b> ?', () => {
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail=delete','VarianID='+acell[0],'Cari_Varian'],
onSuccess: () => FoniaJS.showInfo('Proses hapus data sukses!')
}).send();
}, 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['mode_detail','VarianID','Nama_Varian','Aktif','Cari_Varian'],
onSuccess: () => {
FoniaJS.showInfo('Proses simpan data sukses!');
FoniaJS.closeWindow(this.winDetail);
}
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP + '/table_detail',
sendParam: ['Cari_Varian']
}).send();
}
}
};