Refactor member and product scripts to use concise method definitions

- Updated all function declarations to use ES6 shorthand method syntax in member.js, member_grup.js, point_barang.js, point_skema.js, point_tipe.js, kategori.js, operator.js, produk.js, produk_grup.js, rekpos.js, satuan.js, supplier.js, and varian.js.
This commit is contained in:
2026-11-01 14:57:54 +07:00
parent be2091eddd
commit aaaf0a9215
92 changed files with 749 additions and 749 deletions
+10 -10
View File
@@ -14,7 +14,7 @@ var PPOBTXJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('tabel-detail');
$('#Cari_TX').keydown((e) => {
var key = e.keyCode || e.which || 0;
@@ -28,44 +28,44 @@ var PPOBTXJS = {
FoniaJS.setFocus('#Cari_TX');
},
proses_print: function(oc, no_cetak){
proses_print(oc, no_cetak) {
var cetak = new PrinterPos('report/nota/ppob');
cetak.add_param("Nomor_Cetak", no_cetak);
cetak.add_param("Open_Cash", oc);
cetak.exec();
},
proses_delete: function(no_tx){
proses_delete(no_tx) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send();
},
proses_reproc: function(no_tx){
proses_reproc(no_tx) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX='+no_tx,'Tgl_From','Tgl_To','Cari_TX']
}).send();
},
nota_print: function(acell){
nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]);
}, 'info');
},
nota_delete: function(acell){
nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => this.proses_delete(acell[0]), this, 'DELETE '+acell[0]);
}, 'danger');
},
nota_reproc: function(acell){
nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => this.proses_reproc(acell[0]), 'warning');
},
nota_detail: function(acell){
nota_detail(acell) {
new Request({
url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]],
@@ -75,7 +75,7 @@ var PPOBTXJS = {
}).send();
},
saldo_ppob: function(){
saldo_ppob() {
new Request({
url: this.PHP + '/form_saldo',
onSuccess: (adata) => {
@@ -85,7 +85,7 @@ var PPOBTXJS = {
}).send();
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="tabel-detail"){
new Request_JSF({
url: this.PHP + '/table_tx',
+17 -17
View File
@@ -19,7 +19,7 @@ var PrabayarJS = {
KATE_PREFIX: [1,2,3,4],
KATE_TOKEN: [5],
index: function(){
index() {
$('#Cari_PPOB').keydown((e) => {
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('tabel-tx');
@@ -34,7 +34,7 @@ var PrabayarJS = {
this.data_query('pole-config');
},
proses_print: function(oc, no_cetak){
proses_print(oc, no_cetak) {
var cetak = new PrinterPos('apps/php/repo/nota.php');
cetak.add_param("data", "ppob-pos");
cetak.add_param("Nomor_Cetak", no_cetak);
@@ -42,31 +42,31 @@ var PrabayarJS = {
cetak.exec();
},
proses_delete: function(){
proses_delete() {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=delete','No_TX']
}).send();
},
proses_reproc: function(ft){
proses_reproc(ft) {
new Request_JSF({
url: this.PHP + '/table_tx',
sendParam: ['mode_detail=reproc','No_TX','FT='+ft]
}).send();
},
proses_cancel: function(){
proses_cancel() {
FoniaJS.showConfirm('Konfirmasi', 'Apakah Anda yakin ingin membatalkan ?', () => this.data_query('master','cancel'), 'danger');
},
nota_print: function(acell){
nota_print(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin ingin cetak ulang Nota "'+acell[0]+'" ?', () => {
this.proses_print(0, acell[0]);
}, 'info');
},
nota_delete: function(acell){
nota_delete(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus Nota "'+acell[0]+'" ?', () => {
FoniaJS.showAuth(() => {
$('#No_TX').val(acell[0]);
@@ -75,14 +75,14 @@ var PrabayarJS = {
}, 'danger');
},
nota_reproc: function(acell){
nota_reproc(acell) {
FoniaJS.showConfirm('Konfirmasi', 'Yakin proses ulang "'+acell[0]+'" ?', () => {
$('#No_TX').val(acell[0]);
this.proses_reproc();
}, 'warning');
},
nota_detail: function(acell){
nota_detail(acell) {
new Request({
url: this.PHP + '/form_tx',
sendParam: ['No_TX='+acell[0]],
@@ -92,7 +92,7 @@ var PrabayarJS = {
}).send();
},
kasir_show: function(){
kasir_show() {
if ($('#Tujuan').val()=='') {
FoniaJS.showInfo('Silahkan masukkan Nomor Tujuan !');
FoniaJS.setFocus('#Tujuan');
@@ -163,14 +163,14 @@ var PrabayarJS = {
}).send();
},
kasir_hitung: function(){
kasir_hitung() {
const totBayar = FoniaJS.StrToFloat($('#popTotal_Tunai').val()) + FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const totSisa = totBayar - FoniaJS.StrToFloat($('#popTotal_Jual').val());
$('#popTotal_Bayar').val(totBayar);
$('#popTotal_Sisa').val(FoniaJS.FloatToStr(totSisa, 2)).removeClass('border-danger border-success').addClass((totSisa < 0) ? 'border-danger' : 'border-success');
},
kasir_simpan: function(){
kasir_simpan() {
const totTunai = FoniaJS.StrToFloat($('#popTotal_Tunai').val());
const totKartu = FoniaJS.StrToFloat($('#popTotal_Kartu').val());
const jenKartu = $('#popKartuID').val();
@@ -203,7 +203,7 @@ var PrabayarJS = {
this.data_query('master', 'save');
},
data_query: function(tipe, mode){
data_query(tipe, mode) {
if (tipe=='master'){
mode = (mode) ? mode : '';
var sparam = ['mode='+mode,'No_TX'];
@@ -266,7 +266,7 @@ var PrabayarJS = {
}
},
oc_KateID: function(){
oc_KateID() {
if ($.inArray(parseInt($('#KateID').val()), this.KATE_TOKEN) !== -1) {
$('.rowToken').removeClass('d-none');
$('.rowPulsa').addClass('d-none');
@@ -280,7 +280,7 @@ var PrabayarJS = {
}).send();
},
oc_Tujuan: function(){
oc_Tujuan() {
if ($('#Tujuan').val()=='') return false;
if ($.inArray(parseInt($('#KateID').val()), this.KATE_PREFIX) === -1) return false;
new Request_JSF({
@@ -289,7 +289,7 @@ var PrabayarJS = {
}).send();
},
oc_OpeID: function(){
oc_OpeID() {
if ($('#OpeID').val()==0) return false;
new Request_JSF({
url: this.PHP + '/option_produk',
@@ -297,7 +297,7 @@ var PrabayarJS = {
}).send();
},
oc_ProdukID: function(){
oc_ProdukID() {
const obj = $('#ProdukID');
var harga = $(obj).find(":selected").attr('olabel');
$('#Harga_Jual').val(harga);
+5 -5
View File
@@ -14,7 +14,7 @@ var TopupJS = {
PHP: '',
KODE: '',
index: function(){
index() {
this.data_query('tabel-detail');
$('#butTambah').click(() => this.tx_tambah());
$('#Cari_Topup').keydown((e) => {
@@ -29,11 +29,11 @@ var TopupJS = {
FoniaJS.setFocus('#Cari_Topup');
},
tx_info: function(acell){
tx_info(acell) {
this.winInfo = FoniaJS.showWindow('', 'Informasi Topup Saldo', '<div class="form-control fs-4">'+acell[6]+'</div>', 'md');
},
tx_tambah: function(){
tx_tambah() {
new Request({
url: this.PHP + '/form_topup',
onSuccess: (a) => {
@@ -46,7 +46,7 @@ var TopupJS = {
}).send();
},
tx_simpan: function(){
tx_simpan() {
if (parseInt($('#Jumlah').val())==0) {
FoniaJS.showError('Silakan isi Jumlah lebih dari NOL !');
$('#Jumlah').focus();
@@ -59,7 +59,7 @@ var TopupJS = {
}).send();
},
data_query: function(tipe){
data_query(tipe) {
if (tipe=="tabel-detail"){
new Request_JSF({
url: this.PHP + '/table_detail',