64 lines
2.0 KiB
JavaScript
64 lines
2.0 KiB
JavaScript
/*******************************************************************
|
|
|
|
App. Name : INVENTORY AND SALES SYSTEMS
|
|
Module : /apps/js/repo/dana_pos.js
|
|
Desc. : JS - Laporan Penerimaan Kasir / POS
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : September 8th, 2012.
|
|
Last Modified : September 30th, 2025.
|
|
|
|
(c) 2012 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var RepoDanaPOSJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
loading: function(){
|
|
$('#butPOS').click(function(){this.proses_pos();}.bind(this));
|
|
$('#butCetak').click(function(){this.proses_print(true);}.bind(this));
|
|
$('#butPreview').click(function(){this.proses_print();}.bind(this));
|
|
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
|
},
|
|
|
|
proses_pos: function(){
|
|
if ($('#KasirID').val()==0){
|
|
FoniaJS.showError("Untuk Cetak POS silakan pilih salah satu Nama Pengguna!");
|
|
$('#KasirID').focus();
|
|
return;
|
|
}
|
|
var cetak = new cPRINTERPOS(this.PHP);
|
|
cetak.add_param("data", "print-pos");
|
|
cetak.add_param("Tipe", "R");
|
|
cetak.add_param("CabID");
|
|
cetak.add_param("KasirID");
|
|
cetak.add_param("Tgl_From");
|
|
cetak.add_param("Tgl_To");
|
|
cetak.exec();
|
|
},
|
|
|
|
proses_print: function(prt){
|
|
var cetak = new cPRINTER(this.PHP);
|
|
cetak.add_param("data", "print");
|
|
cetak.add_param("Tipe");
|
|
cetak.add_param("CabID");
|
|
cetak.add_param("KasirID");
|
|
cetak.add_param("Tgl_From");
|
|
cetak.add_param("Tgl_To");
|
|
if (prt) cetak.doPrint(); else cetak.doPreview();
|
|
},
|
|
|
|
proses_dload: function(){
|
|
var dload = new cEXPORT(this.PHP);
|
|
dload.add_param("data", "export");
|
|
dload.add_param("Tipe");
|
|
dload.add_param("CabID");
|
|
dload.add_param("KasirID");
|
|
dload.add_param("Tgl_From");
|
|
dload.add_param("Tgl_To");
|
|
dload.download();
|
|
}
|
|
|
|
};
|