52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
/*******************************************************************
|
|
|
|
PHP Class : /Controller/Report/Beli/MutasiController
|
|
Description : Laporan Mutasi Pembelian
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : April 3rd, 2013.
|
|
Last Modified : October 2nd, 2026.
|
|
|
|
(c) 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var RepoBeliMutasiJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
index() {
|
|
$('#butCetak').click(() => this.proses_print(true));
|
|
$('#butPreview').click(() => this.proses_print());
|
|
$('#butExcel').click(() => this.proses_dload());
|
|
},
|
|
|
|
proses_print(prt) {
|
|
if ($('#SupID').val()==0){
|
|
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
|
$('#SupID').focus();
|
|
return;
|
|
}
|
|
var cetak = new Printer(this.PHP + '/print');
|
|
cetak.add_param("CabID");
|
|
cetak.add_param("SupID");
|
|
cetak.add_param("Tgl_From");
|
|
cetak.add_param("Tgl_To");
|
|
if (prt) cetak.doPrint(); else cetak.doPreview();
|
|
},
|
|
|
|
proses_dload() {
|
|
if ($('#SupID').val()==0){
|
|
FoniaJS.showError("Silakan pilih Nama Supplier !");
|
|
$('#SupID').focus();
|
|
return;
|
|
}
|
|
var dload = new Download(this.PHP + '/excel');
|
|
dload.addParam("CabID");
|
|
dload.addParam("SupID");
|
|
dload.addParam("Tgl_From");
|
|
dload.addParam("Tgl_To");
|
|
dload.download();
|
|
}
|
|
|
|
};
|