function pKwiBayar(){ RH.startTimer('tf.timekwi-byr'); /** THE COMMON STORE */ var ds_carabyr = store_carabyr(); var ds_jbiaya = store_jbiaya(); var ds_stsmt = store_stsmt(); //THE GRID HISTORY (AT THE BOTTOM) // --- DPK var ds_dpk = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_DPK_byNim', method: 'POST' }), //baseParams: { nim: npm}, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" } , { name: "nokuitansi" }, { name: "tglkuitansi" } , { name: "idcarabyr" }, { name: "kdcarabyr" } , { name: "nmcarabyr" }, { name: "noref" } , { name: "useridinput" }, { name: "jmlbayar" } , { name: "totalDPK" } ] }); var cm_dpk = new Ext.grid.ColumnModel([{ header: 'No. Kuitansi', width: 100, dataIndex: 'nokuitansi', sortable: true }, { header: 'Tgl. Kuitansi', width: 100, dataIndex: 'tglkuitansi', sortable: true, }, { header: 'Cara Bayar', width: 100, dataIndex: 'nmcarabyr', sortable: true }, { header: 'No. Ref./Bukti Transfer', width: 200, dataIndex: 'noref', sortable: true }, { header: 'Penerima', width: 170, dataIndex: 'useridinput', sortable: true }, { header: 'Jumlah Bayar', width: 150, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' /* field: { xtype: 'numericfield', decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.' }, summaryType : 'sum' */ }] ); var gp_dpk = new Ext.grid.GridPanel({ id: 'gp.dpk-byr', title: 'DPK', ds: ds_dpk, cm: cm_dpk, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 200, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], //bbar: [{xtype:'textfield', fieldLabel:'Total Bayar'}], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', listeners: { //rowdblclick: dblclk_dpk } }); // --- DPP var ds_dpp = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_DPP_byNim', method: 'POST' }), //baseParams: { nim:npm, kdprodi:kdprodi, thmasuk:thmasuk, idjnskls:idjnskls }, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" }, { name: "kdjnsbiaya" } , { name: "thmasuk" }, { name: "kdprodi" } , { name: "idjnskls" }, { name: "kdstsemester" }, { name: "nmthnakademik" } , { name: "biaya" }, { name: "diskon" }, { name: "jmlbayar" } , { name: "persenbayar" }, { name: "sisa" } , { name: "persensisa" }, { name: "statuslunas" } ] }); var cm_dpp = new Ext.grid.ColumnModel([{ header: 'Semester', width: 165, dataIndex: 'kdstsemester', sortable: true, hidden:true }, { header: 'Tahun Akademik - Semester', width: 165, dataIndex: 'nmthnakademik', sortable: true }, { header: 'Biaya', width: 100, dataIndex: 'biaya', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Diskon', width: 100, dataIndex: 'diskon', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Total Bayar', width: 100, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Persentase Bayar', width: 120, dataIndex: 'persenbayar', sortable: true, xtype: 'numbercolumn', format:'0.00', align:'right' }, { header: 'Tunggakan', width: 100, dataIndex: 'sisa', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Persentase Sisa', width: 100, dataIndex: 'persensisa', sortable: true, xtype: 'numbercolumn', format:'0.00', align:'right' }, { header: 'Status', width: 110, dataIndex: 'statuslunas', sortable: true }] ); var gp_dpp = new Ext.grid.GridPanel({ id: 'gp.dpp-byr', title: 'DPP/SPP', ds: ds_dpp, cm: cm_dpp, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 200, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', listeners: { rowclick: showDPPdet } }); // --- CUTI var ds_ct = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_CT_byNim', method: 'POST' }), //baseParams: { nim:npm, kdprodi:kdprodi, thmasuk:thmasuk, idjnskls:idjnskls }, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" }, { name: "kdjnsbiaya" } , { name: "thmasuk" }, { name: "kdprodi" } , { name: "idjnskls" }, { name: "kdstsemester" }, { name: "nmthnakademik" } , { name: "biaya" }, { name: "diskon" }, { name: "jmlbayar" } , { name: "persenbayar" }, { name: "sisa" } , { name: "persensisa" }, { name: "statuslunas" } ] }); var cm_ct = new Ext.grid.ColumnModel([{ header: 'Semester', width: 165, dataIndex: 'kdstsemester', sortable: true, hidden:true }, { header: 'Tahun Akademik - Semester', width: 165, dataIndex: 'nmthnakademik', sortable: true }, { header: 'Biaya', width: 100, dataIndex: 'biaya', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Diskon', width: 100, dataIndex: 'diskon', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Total Bayar', width: 100, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Persentase Bayar', width: 120, dataIndex: 'persenbayar', sortable: true, xtype: 'numbercolumn', format:'0.00', align:'right' }, { header: 'Tunggakan', width: 100, dataIndex: 'sisa', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Persentase Sisa', width: 100, dataIndex: 'persensisa', sortable: true, xtype: 'numbercolumn', format:'0.00', align:'right' }, { header: 'Status', width: 110, dataIndex: 'statuslunas', sortable: true }] ); var gp_ct = new Ext.grid.GridPanel({ id: 'gp.ct-byr', title: 'CUTI', ds: ds_ct, cm: cm_ct, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 200, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', }); // --- TIDAK AKTIF var ds_ta = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_TA_byNim', method: 'POST' }), //baseParams: { nim:npm, kdprodi:kdprodi, thmasuk:thmasuk, idjnskls:idjnskls }, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" }, { name: "kdjnsbiaya" } , { name: "thmasuk" }, { name: "kdprodi" } , { name: "idjnskls" }, { name: "kdstsemester" }, { name: "nmthnakademik" } , { name: "biaya" }, { name: "diskon" }, { name: "jmlbayar" } , { name: "persenbayar" }, { name: "sisa" } , { name: "persensisa" }, { name: "statuslunas" } ] }); var cm_ta = new Ext.grid.ColumnModel([{ header: 'Semester', width: 165, dataIndex: 'kdstsemester', sortable: true, hidden:true }, { header: 'Tahun Akademik - Semester', width: 165, dataIndex: 'nmthnakademik', sortable: true }, { header: 'Biaya', width: 100, dataIndex: 'biaya', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Diskon', width: 100, dataIndex: 'diskon', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Total Bayar', width: 100, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Persentase Bayar', width: 120, dataIndex: 'persenbayar', sortable: true, xtype: 'numbercolumn', format:'0.00', align:'right' }, { header: 'Tunggakan', width: 100, dataIndex: 'sisa', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }, { header: 'Persentase Sisa', width: 100, dataIndex: 'persensisa', sortable: true, xtype: 'numbercolumn', format:'0.00', align:'right' }, { header: 'Status', width: 110, dataIndex: 'statuslunas', sortable: true }] ); var gp_ta = new Ext.grid.GridPanel({ id: 'gp.ta-byr', title: 'TIDAK AKTIF', ds: ds_ta, cm: cm_ta, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 200, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', }); // --- KONFERSI var ds_kon = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_KON_byNim', method: 'POST' }), //baseParams: { nim: npm}, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" } , { name: "nokuitansi" }, { name: "tglkuitansi" } , { name: "idcarabyr" }, { name: "kdcarabyr" } , { name: "nmcarabyr" }, { name: "noref" } , { name: "useridinput" }, { name: "jmlbayar" } , { name: "totalDPK" } ] }); var cm_kon = new Ext.grid.ColumnModel([{ header: 'No. Kuitansi', width: 100, dataIndex: 'nokuitansi', sortable: true }, { header: 'Tgl. Kuitansi', width: 100, dataIndex: 'tglkuitansi', sortable: true, }, { header: 'Cara Bayar', width: 100, dataIndex: 'nmcarabyr', sortable: true }, { header: 'No. Ref./Bukti Transfer', width: 200, dataIndex: 'noref', sortable: true }, { header: 'Penerima', width: 170, dataIndex: 'useridinput', sortable: true }, { header: 'Jumlah Bayar', width: 150, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' /* field: { xtype: 'numericfield', decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.' }, summaryType : 'sum' */ }] ); var gp_kon = new Ext.grid.GridPanel({ id: 'gp.kon-byr', title: 'KONVERSI', ds: ds_kon, cm: cm_kon, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 200, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], //bbar: [{xtype:'textfield', fieldLabel:'Total Bayar'}], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', listeners: { //rowdblclick: dblclk_dpk } }); // --- DP9 var ds_dp9 = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_DP9_byNim', method: 'POST' }), //baseParams: { nim: npm}, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" } , { name: "nokuitansi" }, { name: "tglkuitansi" } , { name: "idcarabyr" }, { name: "kdcarabyr" } , { name: "nmcarabyr" }, { name: "noref" } , { name: "useridinput" }, { name: "jmlbayar" } , { name: "totalDPK" } ] }); var cm_dp9 = new Ext.grid.ColumnModel([{ header: 'No. Kuitansi', width: 100, dataIndex: 'nokuitansi', sortable: true }, { header: 'Tgl. Kuitansi', width: 100, dataIndex: 'tglkuitansi', sortable: true, }, { header: 'Cara Bayar', width: 100, dataIndex: 'nmcarabyr', sortable: true }, { header: 'No. Ref./Bukti Transfer', width: 200, dataIndex: 'noref', sortable: true }, { header: 'Penerima', width: 170, dataIndex: 'useridinput', sortable: true }, { header: 'Jumlah Bayar', width: 150, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' /* field: { xtype: 'numericfield', decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.' }, summaryType : 'sum' */ }] ); var gp_dp9 = new Ext.grid.GridPanel({ id: 'gp.dp9-byr', title: 'DPP Semester 9', ds: ds_dp9, cm: cm_dp9, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 200, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], //bbar: [{xtype:'textfield', fieldLabel:'Total Bayar'}], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', listeners: { //rowdblclick: dblclk_dpk } }); //THE FORM PANEL var fKeuBayar = new Ext.form.FormPanel({ //xtype: 'form', id: 'fp.keubayar', title: 'Penerimaan Kas Kuliah', iconCls:'silk-money', //layout: 'form', width: 900, Height: 1000, layout: { type: 'form', pack: 'center', align: 'center' }, frame: true, margin: '0 0 15', autoScroll: true, tbar: [ { text: 'Baru', iconCls: 'silk-add', handler: function(){ fnNewKuitansi();} } , { text: 'Simpan', id:'bt.save-kwi', iconCls: 'silk-save', handler: function(){ fnSaveKuitansi(); } } , { text: 'Cetak', iconCls: 'silk-printer', id:'bt.cetak-kwi', disabled: true, handler: function(){ cetakKwitansi(); } } , { text: 'Batal', id:'bt.cancel-kwi',iconCls: 'silk-cancel', disabled:true, handler: function(){ fnCancelKuitansi() } } , { text: 'Cari', iconCls: 'silk-find', handler: function(){ fnSearchKuitansi() } } , { text: 'Refresh', iconCls: 'silk-arrow-refresh', handler: function(){saveKwiSuccess();} } , {xtype: 'tbfill' } , { xtype:'form', items:[{ xtype: 'textfield', id:'tf.userid', disabled: true, labelAlign: 'right', fieldLabel: 'Penerima', width:150, value: USERNAME }] }], defaults: { labelWidth: 200, labelAlign: 'right', width: 950, }, items: [{ // FIELD SET -- NO KWITANSI & CARA BAYAR xtype: 'fieldset', title: 'Kuitansi', id:'fs.kuitansi', layout: 'column', defaults: { labelWidth: 200, labelAlign: 'right' }, items: [{ //COLUMN 1 layout: 'form', columnWidth: 0.60, items: [{ xtype: 'textfield', fieldLabel: 'No. Kuitansi', id: 'tf.nokwi-byr', emptyText:'Auto-generate', width: 150, readOnly: true, disabled: true, },{ xtype: 'container', fieldLabel: 'Tgl. Kuitansi', layout: 'hbox', defaults: { hideLabel: 'true' }, items: [{ xtype: 'datefield', id: 'df.tgkwi-byr', width: 150, value: new Date() }, { xtype: 'textfield', id: 'tf.timekwi-byr', margins: '0 0 0 6', width: 100, readOnly: true, }] }] }, { //COLUMN 2 layout: 'form', columnWidth: 0.40, items: [{ xtype: 'combo', fieldLabel: 'Cara Bayar', id: 'cb.cara-byr', width: 150, allowBlank: false, store: ds_carabyr, valueField: 'idcarabyr', displayField: 'nmcarabyr', editable: false, triggerAction: 'all', forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', }, { xtype: 'textfield', fieldLabel: 'No. Ref./Bukti Transfer', id: 'tf.noref-byr', submitValue: true, width: 150, }] }] }, { // --- FIELD SET -- MAHASISWA xtype: 'fieldset', title: 'Mahasiswa', id:'fs.mahasiswa', items: [{ xtype: 'container', fieldLabel: 'NPM', layout: 'hbox', defaults: { hideLabel: 'true' }, items: [{ xtype: 'textfield', id: 'tf.nim_mhs-byr', width: 150, readOnly: true , emptyText:'penting' }, { xtype: 'button', id: 'bt.nim-byr', iconCls: 'silk-find', /*text: '...',*/ margins: '0 0 0 6', width: 25, handler: function(){ wLookupMhsByr(); } }] }, { xtype: 'textfield', fieldLabel: 'Nama Mahasiswa', id: 'tf.nama_mhs-byr', disabled: true, width: 400, readOnly: true }, { //xtype: 'form', layout: 'column', items: [{ layout: 'form', columnWidth: 0.60, //COL 1 defaultType: 'textfield', items: [{ id: 'tf.prodi-byr', fieldLabel: 'Program Studi', width: 300, readOnly: true, disabled: true, emptyText:'penting' }, { id: 'tf.thmasuk-byr', fieldLabel: 'Tahun Masuk', width: 100, readOnly: true, disabled: true, emptyText:'penting' }, { id: 'hf.kdprodi-byr', hidden: true, //xtype:'hiddenfield' //di ExtJS 4 }] }, { layout: 'form', columnWidth: 0.40, //COL 2 defaultType: 'textfield', items: [{ id: 'tf.jkelas-byr', fieldLabel: 'Jenis Kelas', width: 150, readOnly: true, disabled: true, emptyText:'penting', //allowBlank:false, }, { id: 'tf.stmhs-byr', fieldLabel: 'Status Mahasiswa', width: 150, readOnly: true, disabled: true, }, { id: 'hf.idjnskls-byr', hidden: true, //xtype:'hiddenfield' }] }] }] }, { // --- FIELD SET -- PEMBAYARAN xtype: 'fieldset', title: 'Pembayaran', id:'fs.pembayaran', items: [{ xtype: 'compositefield', //UNTUK STATUS SEMESTER items: [{ xtype: 'combo', fieldLabel: 'Jenis Biaya', id: 'cb.jbiaya-byr', width: 150, store: ds_jbiaya, valueField: 'idjnsbiaya', displayField: 'kdjnsbiaya', editable: false, allowBlank: false, triggerAction: 'all', forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this, select: cb_jbiaya_selected } },{ xtype: 'textfield', id: 'hidealertbiayax', width: 90, hidden: true },{ xtype: 'label', text: '', id: 'alertbiayax', style: 'color: red;font-size:12px;', }] }, { layout: 'column', //UNTUK STATUS SEMESTER items: [{ layout: 'form', columnWidth: 0.45, defaults: { labelWidth: 150, labelAlign: 'right'}, items: [{ xtype: 'combo', fieldLabel: 'Tahun Akademik - Semester', id: 'cb.stsmt-byr', store: ds_stsmt, width: 150, valueField: 'kdstsemester', displayField: 'nmsmt',//'nmsmt', editable: false, triggerAction: 'all', forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this, select: cb_stsmt_selected } }] }, { layout: 'form', columnWidth: 0.35, defaults: { labelWidth: 50, labelAlign: 'right'}, items: [{ xtype: 'textfield', fieldLabel: 'Tahun Akademik', id: 'tf.thak-byr', readOnly: true, disabled: true, width: 90, hidden: true, fieldStyle: 'background-color: #AAFFCC;', }] }, { layout: 'form', columnWidth: 0.20, defaults: { labelWidth: 50, labelAlign: 'right'}, items: [{ xtype: 'textfield', fieldLabel: 'Semester', id: 'tf.smt-byr', readOnly: true, disabled: true, width: 90, hidden: true, }] }, { id: 'hf.kdstsemester-byr', hidden: true, xtype:'textfield', validator: function(){ var nokui = Ext.getCmp('tf.nokwi-byr').getValue(); if (nokui) { setBiaya(); } } }] }, { xtype: 'numericfield', fieldLabel: 'Biaya', id: 'nf.biaya-byr', readOnly: true, disabled: true, width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, //disabledCls: 'af-item-disabled', }, { xtype: 'container', fieldLabel: 'Diskon', layout: 'hbox', items: [{ xtype: 'numericfield', id: 'nf.diskon-byr', readOnly: true, disabled: true, width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, }, { xtype: 'numericfield', id: 'nf.persendiskon-byr', readOnly: true, disabled: true, width: 50, margins: '0 0 0 4', value: 0, decimalPrecision: 0, }, { xtype: 'label', text: '%', margins: '0 0 0 4', }] }, { xtype: 'numericfield', fieldLabel: 'Biaya Setelah Diskon', id: 'nf.setelahdiskon-byr', readOnly: true, disabled: true, width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, }, { xtype: 'container', fieldLabel: 'Total Sudah Dibayar', layout: 'hbox', items: [{ xtype: 'numericfield', id: 'nf.total-byr', readOnly: true, disabled: true, width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, }, { xtype: 'numericfield', id: 'nf.persentotal-byr', readOnly: true, disabled: true, width: 50, margins: '0 0 0 4', value: 0, decimalPrecision: 0, }, { xtype: 'label', text: '%', margins: '0 0 0 4', }] }, { xtype: 'numericfield', fieldLabel: 'Sisa yang Harus Dibayar', id: 'nf.sisa-byr', readOnly: true, disabled: true, width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, }, { xtype: 'container', fieldLabel: 'Jumlah Bayar', layout: 'hbox', items: [{ xtype: 'numericfield', //fieldLabel: 'Jumlah Bayar', id: 'nf.jum-byr', width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, listeners: { 'render': function(c) { c.getEl().on('keyup', function() { var labelalertbayar = Ext.getCmp('lb.info-save-cancel'); var values = Ext.getCmp('nf.jum-byr').getValue(); if (RH.isEmpty('nf.jum-byr')) { labelalertbayar.setText('Tidak Boleh Kosong atau 0!'); } else { labelalertbayar.setText(''); setTerbilang(); hitungKembalian(); } }, c); } } }, { xtype: 'label', id: 'lb.info-save-cancel', text: 'Tidak Boleh Kosong atau 0!', style: 'color:red', margins: '0 0 0 10', }] }, { xtype: 'textfield', fieldLabel: 'Terbilang', id: 'tf.terbilang-byr', width: 650, readOnly: true, disabled: true, }, { xtype: 'textfield', fieldLabel: 'Status', id: 'tf.status-byr', width: 150, readOnly: true, disabled: true, }, { //CALCULATE TOOLS layout: 'column', items: [{ layout: 'form', columnWidth: 0.60, items: [{xtype: 'textfield', width:100, hidden: true}] }, { layout: 'form', columnWidth: 0.40, defaultType: 'numericfield', defaults: { labelAlign:'right', width: 150, decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, }, items: [{ id: 'nf.terima-byr', fieldLabel: 'Uang yang Diterima', listeners: { 'render': function(c) { c.getEl().on('keyup', function() { hitungKembalian(); }, c); } } }, { id: 'nf.kembali-byr', fieldLabel: 'Kembalian', disabled:true }] }] }] }, { // --- FIELD SET -- HISTORY PEMBAYARAN xtype: 'fieldset', title: 'History Pembayaran', id: 'fieldset.history-byr', layout: 'form', hidden: true, items: [{ xtype:'panel', height:200, items:[gp_dpk], bbar: [{xtype: 'tbfill'}, { xtype:'form', items:[{ xtype:'numericfield', fieldLabel:'Total Bayar DPK', id:'nf.totalDPK', readOnly: true, disabled: false, width:150, decimalSeparator: ',', decimalPrecision: 0, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: 0, }] }] }, { xtype:'panel', height:200, items:[gp_dpp], }, { xtype:'panel', height:200, items:[gp_ct], }, { xtype:'panel', height:200, items:[gp_ta], }, { xtype:'panel', height:200, items:[gp_kon], }, { xtype:'panel', height:200, items:[gp_dp9], }] }] }); SET_PAGE_CONTENT(fKeuBayar); /* var pKeuByr = new Ext.Panel({ bodyStyle: 'padding: 5px', title: '', iconCls: 'silk-group-add', frame: false, items: [fKeuBayar] }); SET_PAGE_CONTENT(fKeuBayar); */ } function wLookupMhsByr(){ var grid_mhs = gridLookupMhsKeu(); var winMhskeu = new Ext.Window({ title: 'Daftar Mahasiswa', modal: true, layout: 'fit', width:720, height:400, items: [grid_mhs] }); grid_mhs.on('rowdblclick', function(grid, rowIdx){ var rec = grid_mhs.store.getAt(rowIdx); var nim = rec.data['nim']; var kdprodi = rec.data['kdprodi']; var thnmasuk = rec.data['thnmasuk']; var idjnskls = rec.data['idjnskls']; // SET VALUES OF FIELDSET MAHASISWA RH.setCompValue('tf.nim_mhs-byr', rec.data['nim']), RH.setCompValue('tf.nama_mhs-byr', rec.data['nmmhs']), RH.setCompValue('hf.kdprodi-byr', rec.data['kdprodi']), RH.setCompValue('tf.prodi-byr', rec.data['nmprodi']), RH.setCompValue('tf.thmasuk-byr', rec.data['thnmasuk']), RH.setCompValue('hf.idjnskls-byr', rec.data['idjnskls']), RH.setCompValue('tf.jkelas-byr', rec.data['kdnmklsmhs']), RH.setCompValue('tf.stmhs-byr', rec.data['nmstaktiv']), // SET DATA BIAYA setBiaya(); // SHIW HISTORY BAYAR showHistoryBayar(nim, kdprodi, thnmasuk, idjnskls); winMhskeu.close(); }, this ); winMhskeu.show(); } function cb_jbiaya_selected(combo, records){ /* if(records.data['kdjnsbiaya']=='DPK' || records.data['kdjnsbiaya']=='KON'){ Ext.getCmp('cb.stsmt-byr').setValue(''); Ext.getCmp('cb.stsmt-byr').hide(); } else { Ext.getCmp('cb.stsmt-byr').show(); } */ setBiaya(); } function cb_stsmt_selected(combo, records){ var th_ak = records.data['nmthnakademik']; var smt = records.data['nmjnssemester']; RH.setCompValue('tf.thak-byr', th_ak); RH.setCompValue('tf.smt-byr', smt); //SET BIAYA setBiaya(); } function setBiaya(){ //Parameter values var nim = RH.getCompValue('tf.nim_mhs-byr'); var kdprodi = RH.getCompValue('hf.kdprodi-byr', true); var thmasuk = RH.getCompValue('tf.thmasuk-byr', true); var idjnskls = RH.getCompValue('hf.idjnskls-byr', true); var idjnsbiaya = RH.getCompValue('cb.jbiaya-byr', true); var kdjnsbiaya = RH.getFieldValue('cb.jbiaya-byr', 'idjnsbiaya', 'kdjnsbiaya'); //utk mudah bedakan DPP & DPK var kdstsemester1 = RH.getCompValue('cb.stsmt-byr', true); var kdstsemester2 = RH.getCompValue('hf.kdstsemester-byr', true); var kdstsemester = (kdstsemester2) ? kdstsemester2:kdstsemester1; var labelalertbiayax = Ext.getCmp('alertbiayax'); //RESET VALUE FIRST, BEFORE SET RH.setCompValue('nf.biaya-byr',0); RH.setCompValue('nf.diskon-byr',0); RH.setCompValue('nf.persendiskon-byr',0); RH.setCompValue('nf.setelahdiskon-byr',0); RH.setCompValue('nf.total-byr',0); RH.setCompValue('nf.persentotal-byr',0); RH.setCompValue('nf.sisa-byr',0); RH.setCompValue('tf.status-byr',''); if (idjnsbiaya == '7') { Ext.getCmp('nf.biaya-byr').enable(); return; } /* if (kdjnsbiaya == 'DPK' || kdjnsbiaya == 'KON') { if(kdprodi=='' || thmasuk=='' || idjnskls=='' || idjnsbiaya=='') return; } else if (kdjnsbiaya != 'DPK' || kdjnsbiaya != 'KON') { if(kdjnsbiaya=='' || thmasuk=='' || idjnskls=='' || idjnsbiaya=='' || kdstsemester=='') return; } */ if(kdjnsbiaya=='' || thmasuk=='' || idjnskls=='' || idjnsbiaya=='' || kdstsemester=='') return; //getbiaya Ext.Ajax.request({ url: BASE_URL + 'kwitansi_controller/get_biaya_byr', method: 'POST', params :{ nim: nim, kdprodi: kdprodi, thmasuk: thmasuk, idjnskls: idjnskls, idjnsbiaya: idjnsbiaya, kdjnsbiaya: kdjnsbiaya, kdstsemester: kdstsemester }, scope: this, async:false, //waitMsg: "Biaya sedang diproses...", success: function(result){ var jsonData = Ext.decode(result.responseText); //bisa utk Ext3 dan Ext4 var dataArray = jsonData.data; if (jsonData.result=='0') { labelalertbiayax.setText('Biaya Kuliah Belum Di Setting'); RH.setCompValue('hidealertbiayax', 'Biaya Kuliah Belum Di Setting'); } else { labelalertbiayax.setText(''); RH.setCompValue('hidealertbiayax', ''); if(dataArray == null || dataArray =='') return; var data = dataArray[0]; if(data == null || data =='') return; if(data.biaya == null || data.biaya == '' || data.biaya == '0') return; var sisa = parseFloat(data.sisa); var status = (sisa > 0)? 'Belum Lunas' : 'LUNAS'; RH.setCompValue('nf.biaya-byr', parseFloat(data.biaya)); /* RH.setCompValue('nf.diskon-byr', 0); RH.setCompValue('nf.persendiskon-byr', 0); RH.setCompValue('nf.setelahdiskon-byr', parseFloat(data.biaya)); */ RH.setCompValue('nf.total-byr', parseFloat(data.jmlbayar)); RH.setCompValue('nf.persentotal-byr', parseFloat(data.persenbayar)); RH.setCompValue('nf.sisa-byr', sisa); RH.setCompValue('tf.status-byr', status); setdiskon(); } } }); } function setdiskon(){ var nim = RH.getCompValue('tf.nim_mhs-byr'); var kdprodi = RH.getCompValue('hf.kdprodi-byr', true); var thmasuk = RH.getCompValue('tf.thmasuk-byr', true); var idjnskls = RH.getCompValue('hf.idjnskls-byr', true); var idjnsbiaya = RH.getCompValue('cb.jbiaya-byr', true); var kdjnsbiaya = RH.getFieldValue('cb.jbiaya-byr', 'idjnsbiaya', 'kdjnsbiaya'); //utk mudah bedakan DPP & DPK var kdstsemester = RH.getCompValue('cb.stsmt-byr'); //getdiskon Ext.Ajax.request({ url: BASE_URL + 'kwitansi_controller/get_diskon_byr', method: 'POST', params :{ nim: nim, kdprodi: kdprodi, thmasuk: thmasuk, idjnskls: idjnskls, idjnsbiaya: idjnsbiaya, kdjnsbiaya: kdjnsbiaya, kdstsemester: kdstsemester }, scope: this, async:false, //waitMsg: "Biaya sedang diproses...", success: function(result){ var jsonData = Ext.decode(result.responseText); //bisa utk Ext3 dan Ext4 var dataArray = jsonData.data; if(dataArray == null || dataArray =='') return; var data = dataArray[0]; if(data == null || data =='') return; if(data.diskon == null || data.diskon == '' || data.diskon == '0') return; var biayaa = Ext.getCmp("nf.biaya-byr").getValue(); var persenn = (data.diskon * 100) / biayaa; var afterdiskon = biayaa - data.diskon; var totbayar = Ext.getCmp("nf.total-byr").getValue(); var sisa = afterdiskon - totbayar; RH.setCompValue('nf.diskon-byr', parseFloat(data.diskon)); RH.setCompValue('nf.persendiskon-byr', persenn); RH.setCompValue('nf.setelahdiskon-byr', afterdiskon); RH.setCompValue('nf.sisa-byr', sisa); RH.setCompValue('tf.status-byr', (sisa > 0)? 'Belum Lunas' : 'LUNAS'); } }); } function setTerbilang(){ //fungsi terbilang(bilangan) di RH.Functions.js (common) var strTerbilang = terbilang(RH.getCompValue('nf.jum-byr')); RH.setCompValue('tf.terbilang-byr', strTerbilang); } function hitungKembalian(){ var jumbyr = RH.getCompValue('nf.jum-byr'); RH.setCompValue('nf.terima-byr',jumbyr); var trmbyr = RH.getCompValue('nf.terima-byr'); var kembali = trmbyr - jumbyr; RH.setCompValue('nf.kembali-byr', kembali); } function showHistoryBayar(nim, kdprodi, thmasuk, idjnskls){ //Reload the Store of Grid History Pembayaran DPK + DPP + CUTI + TIDAK AKTIF + KONFERSI var dpkStore = Ext.getCmp('gp.dpk-byr').store; var dppStore = Ext.getCmp('gp.dpp-byr').store; var ctStore = Ext.getCmp('gp.ct-byr').store; var taStore = Ext.getCmp('gp.ta-byr').store; var konStore = Ext.getCmp('gp.kon-byr').store; var dp9Store = Ext.getCmp('gp.dp9-byr').store; //when reload DPK, set totalDPK in callback function dpkStore.reload({ params: { nim: nim}, callback: function(results){ if(results == 0){ RH.setCompValue('nf.totalDPK', 0); return; } var record = dpkStore.getAt(0); var totalDPK = record.data['totalDPK']; RH.setCompValue('nf.totalDPK', totalDPK); } }); dppStore.reload({params: { nim: nim, kdprodi: kdprodi, thmasuk: thmasuk, idjnskls: idjnskls } }); ctStore.reload({params: { nim: nim, kdprodi: kdprodi, thmasuk: thmasuk, idjnskls: idjnskls } }); taStore.reload({params: { nim: nim, kdprodi: kdprodi, thmasuk: thmasuk, idjnskls: idjnskls } }); konStore.reload({ params: { nim: nim}, /* callback: function(results){ if(results == 0){ RH.setCompValue('nf.totalDPK', 0); return; } var record = dpkStore.getAt(0); var totalDPK = record.data['totalDPK']; RH.setCompValue('nf.totalDPK', totalDPK); } */ }); dp9Store.reload({ params: { nim: nim}, /* callback: function(results){ if(results == 0){ RH.setCompValue('nf.totalDPK', 0); return; } var record = dpkStore.getAt(0); var totalDPK = record.data['totalDPK']; RH.setCompValue('nf.totalDPK', totalDPK); } */ }); //Ext.getCmp('gp.dpk-byr').view.refresh(); //Ext.getCmp('fieldset.history-byr').setHeight('auto'); Ext.getCmp('fieldset.history-byr').show(); } function showDPPdet(grid, rowIdx){ var dppStore = Ext.getCmp('gp.dpp-byr').store; var rec = dppStore.getAt(rowIdx); var nim = rec.data['nim']; var kdstsemester = rec.data['kdstsemester']; var thnakademik = rec.data['nmthnakademik']; var kdjnsbiaya = rec.data['kdjnsbiaya']; var thmasuk = rec.data['thmasuk']; var kdprodi = rec.data['kdprodi']; var idjnskls = rec.data['idjnskls']; var biaya = rec.data['biaya']; var jmlbayar = rec.data['jmlbayar']; // -- GRID DETAIL DPP var ds_DPPdet = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'kwitansi_controller/get_DPPdet', method: 'POST' }), baseParams: { nim:nim, kdstsemester:kdstsemester}, totalProperty: 'results', autoLoad : true, root: 'data', fields: [ { name: "nim" }, { name: "nokuitansi" } , { name: "tglkuitansi"}, { name: "idcarabyr" } , { name: "kdcarabyr" }, { name: "nmcarabyr"} , { name: "noref" }, { name: "useridinput" } , { name: "jmlbayar" } ] }); var cm_DPPdet = new Ext.grid.ColumnModel([{ header: 'No. Kuitansi', width: 100, dataIndex: 'nokuitansi', sortable: true }, { header: 'Tgl. Kuitansi', width: 70, dataIndex: 'tglkuitansi', sortable: true, //renderer: Ext.util.Format.dateRenderer('m-d-Y g:i A') }, { header: 'Cara Bayar', width: 80, dataIndex: 'nmcarabyr', sortable: true }, { header: 'No. Ref./Bukti Transfer', width: 100, dataIndex: 'noref', sortable: true }, { header: 'Penerima', width: 100, hidden: true, dataIndex: 'useridinput', sortable: true }, { header: 'Jumlah Bayar', width: 100, dataIndex: 'jmlbayar', sortable: true, xtype: 'numbercolumn', format:'0,000', align:'right' }] ); var gp_DPPdet = new Ext.grid.GridPanel({ id: 'gp.DPPdet', ds: ds_DPPdet, cm: cm_DPPdet, sm: new Ext.grid.RowSelectionModel({ singleSelect: true}), view: new Ext.grid.GridView({ emptyText: '< Belum ada Data >'}), forceFit: true, height: 160, //width: 720, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], bbar: [ { xtype:'tbfill' }, { xtype: 'form', items: [{ xtype:'numericfield', fieldLabel:'Total', id:'nf.totalDPP', readOnly: true, width:100, decimalSeparator: ',', decimalPrecision: 0, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', value: jmlbayar, //value jmlbayar diambil dari record DPPstore yg call grid ini }] }], autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, layout: 'anchor', }); // -- FORM PANEL (DISPLAY) DETAIL DPP var fpDPPdet = new Ext.form.FormPanel({ id: 'fp.DPPdet', layout: 'form', forceFit: true, //width:500, height:400, margin: '0 0 10', frame: true, defaults: { labelWidth: 170, labelAlign: 'right'}, items: [{ xtype: 'fieldset', //flex: 1, defaultType: 'textfield', defaults: { labelWidth: 170, labelAlign: 'right', width:120, readOnly: true, disabled:true, }, items: [{ id: 'tf.jbiaya-det', fieldLabel: 'Jenis Biaya', value: kdjnsbiaya, //dari record }, { id: 'tf.thmasuk-det', fieldLabel: 'Tahun Masuk', value: thmasuk //dari record }, { id: 'tf.prodi-det', fieldLabel: 'Program Studi', width: 270, value: Ext.getCmp('tf.prodi-byr').getValue(), //dari form utama }, { id: 'tf.jkelas-det', fieldLabel: 'Jenis Kelas', value: Ext.getCmp('tf.jkelas-byr').getValue(), //dari form utama },{ xtype:'numericfield', id: 'nf.biaya-det', fieldLabel: 'Biaya', value: biaya, //dari record decimalSeparator: ',', decimalPrecision: 2, alwaysDisplayDecimals: true, useThousandSeparator: true, thousandSeparator: '.', },{ id: 'tf.thnsmt-det', fieldLabel: 'Tahun Akademik - Semester', value: thnakademik, //dari record },{ id: 'tf.stsmt-det', fieldLabel: 'Status Semester', value: kdstsemester, hidden:true //dari record }] }, { xtype: 'fieldset', items: [gp_DPPdet], }] }); var wDPPdet = new Ext.Window({ title: 'Detail History Pembayaran DPP', modal: true, layout: 'fit', width:500, height:400, items: [fpDPPdet] }).show(); } function fnNewKuitansi(){ RH.startTimer('tf.timekwi-byr'); RH.resetForm('fp.keubayar'); // Ext.getCmp('bt.save-kwi').enable(); Ext.getCmp('bt.cancel-kwi').disable(); Ext.getCmp('lb.info-save-cancel').setText('Tidak Boleh Kosong atau 0!'); //ENABLE FIELDSET FORM & HIDE the history grid Ext.getCmp('fs.kuitansi').enable(); Ext.getCmp('fs.mahasiswa').enable(); Ext.getCmp('fs.pembayaran').enable(); Ext.getCmp('fieldset.history-byr').hide(); } //FOR SAVING/INSERT DATA function fnSaveKuitansi(){ //PREFIX NO KUITANSI var nmbiaya = RH.getFieldValue('cb.jbiaya-byr','idjnsbiaya','kdjnsbiaya'); nmbiaya = nmbiaya.trim(); var year = (RH.getCompValue('df.tgkwi-byr')).getFullYear(); //var prefixNOKWI = nmbiaya + '-' + year + '-'; var alertx = RH.getCompValue('hidealertbiayax'); var stat = RH.getCompValue('tf.status-byr'); if(RH.isEmpty('df.tgkwi-byr')){ RH.warning('Tgl. Kuitansi harus diisi'); return; }; if(RH.isEmpty('cb.cara-byr')){ RH.warning('Cara Bayar harus diisi'); return; }; if(RH.isEmpty('tf.nim_mhs-byr')){ RH.warning('NPM harus diisi'); return; }; if(RH.isEmpty('cb.jbiaya-byr')){ RH.warning('Jenis Biaya harus diisi'); return; }; if(alertx != ''){ return; }; if(nmbiaya != 'DPK' || nmbiaya != 'KON'){ if(RH.isEmpty('cb.stsmt-byr')){ RH.warning('Tahun Akademik - Semester harus diisi'); return; }; } if(stat == 'LUNAS'){ RH.warning('Pembayaran Sudah Lunas'); return; }; if(RH.isEmpty('nf.jum-byr')){ RH.warning('Jumlah Bayar harus diisi'); return; }; // SET AUTO NOKUITANSI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Ext.Ajax.request({ url: BASE_URL + 'kwitansi_controller/get_autoNOKWI', method: 'POST', //params :{ prefix : prefixNOKWI }, params :{ kdbiaya: nmbiaya, thn: year}, scope: this, async:false, waitMsg: "No. Kuitansi sedang diproses...", success: function(result){ var jsonData = Ext.decode(result.responseText); //bisa utk Ext3 dan Ext4 var nokwi = jsonData.nokuitansi; RH.setCompValue('tf.nokwi-byr', nokwi); if(RH.getCompValue('tf.nokwi-byr')=='0') { RH.warning('No. Kuitansi gagal dibuat'); return; } else { //// INSERT NEW KUITANSI-BAYAR ############################### var form = RH.getForm('fp.keubayar'); if(form.isValid()){ form.submit({ url: BASE_URL +'kwitansi_controller/insert_kuitansi', method: 'POST', params: getInsertKwiParams(), waitMsg: 'Tunggu, sedang proses menyimpan...', success: function(){ //RH.freezeTimer('tf.timekwi-byr'); Ext.Msg.alert("Info:", msgSaveSuccess); saveKwiSuccess(); Ext.getCmp('lb.info-save-cancel').setText('Uang sejumlah ini baru saja dibayarkan'); Ext.getCmp('bt.cancel-kwi').enable(); }, failure: function(){ Ext.Msg.alert("Info:", msgSaveFail); }, }); } else { Ext.Msg.alert("Info:", msgSaveInvalid); } } } }); } function fnCancelKuitansi(){ var nokwi = RH.getCompValue('tf.nokwi-byr'); var cancelMsg = "Anda yakin membatalkan kuitansi ini?\n No. Kuitansi: " + nokwi; var cUrl = BASE_URL +'kwitansi_controller/cancel_kuitansi'; var form = RH.getForm('fp.keubayar'); Ext.Msg.show({ title: "Konfirmasi", msg: cancelMsg, buttons: Ext.Msg.YESNO, fn: function(btn) { if (btn == 'yes') { form.submit({ url: cUrl, params: { nokuitansi: nokwi, useridupdate: USERID, tglupdate: new Date() }, method: 'POST', success: function() { Ext.Msg.alert("Info", "Kuitansi No. "+ nokwi +" telah dibatalkan"); saveKwiSuccess(); Ext.getCmp('bt.cancel-kwi').disable(); Ext.getCmp('lb.info-save-cancel').setText('Uang sejumlah ini baru saja DIBATALKAN'); }, failure: function() { Ext.Msg.alert("Info", "Pembatalan kuitansi No. "+ nokwi +" gagal!"); } }); } } }) } function fnSearchKuitansi(){ Ext.getCmp('bt.cetak-kwi').enable(); wGridKwi(); } function getInsertKwiParams(){ return new Object({ nokuitansi : RH.getCompValue('tf.nokwi-byr'), tglkuitansi: RH.getCompValue('df.tgkwi-byr'), jamkuitansi: RH.getCompValue('tf.timekwi-byr'), idcarabyr: RH.getCompValue('cb.cara-byr'), noref: RH.getCompValue('tf.noref-byr'), idjnsbiaya: RH.getCompValue('cb.jbiaya-byr'), kdstsemester : RH.getCompValue('cb.stsmt-byr'), nim : RH.getCompValue('tf.nim_mhs-byr'), jmlbayar : RH.getCompValue('nf.jum-byr'), catatan : '', tglinput : new Date(), tglupdate : new Date(), useridinput : USERID, useridupdate : USERID, idstkuitansi : 1, }); } function saveKwiSuccess(){ Ext.getCmp('bt.save-kwi').disable(); //DISABLE FIELDSET FORM EXCEPT the history grid Ext.getCmp('fs.kuitansi').disable(); Ext.getCmp('fs.mahasiswa').disable(); Ext.getCmp('fs.pembayaran').disable(); //RH.setCompValue('nf.jum-byr',0); //RH.setCompValue('nf.terima-byr',0); //RH.setCompValue('nf.kembali-byr',0); //UPDATE form biaya & pembayaran setBiaya(); //RELOAD history GRID showHistoryBayar(RH.getCompValue('tf.nim_mhs-byr'), //nim, RH.getCompValue('hf.kdprodi-byr'), //kdprodi, RH.getCompValue('tf.thmasuk-byr'), //thmasuk, RH.getCompValue('hf.idjnskls-byr') //idjnskls ); } function cetakKwitansi(nokwitansi){ nokwitansi = Ext.getCmp('tf.nokwi-byr').getValue(); totbyr = Ext.getCmp('nf.biaya-byr').getValue(); sisabyr = Ext.getCmp('nf.sisa-byr').getValue(); var parsing = nokwitansi + 'istra'; parsing = parsing + totbyr + 'istra'; parsing = parsing + sisabyr + 'istra'; var win = window.open(); var cekdiskon = Ext.getCmp('nf.diskon-byr').getValue(); if(cekdiskon == ""){ //Ext.Msg.alert("Info", "kosong"); win.location.reload(); win.location = BASE_URL + 'rpt/cetak_kuitansi/pcetak_kuitansi/' + parsing; }else{ //Ext.Msg.alert("Info", "adaan"); win.location.reload(); win.location = BASE_URL + 'rpt/cetak_kuitansi/pcetak_kuitansi/' + parsing; cetakKwitansiDiskon(nokwitansi); } } function cetakKwitansiDiskon(nokwitansi){ nokwitansi = Ext.getCmp('tf.nokwi-byr').getValue(); totbyr = Ext.getCmp('nf.biaya-byr').getValue(); sisabyr = Ext.getCmp('nf.sisa-byr').getValue(); diskon = Ext.getCmp('nf.diskon-byr').getValue(); var parsing = nokwitansi + 'istra'; parsing = parsing + totbyr + 'istra'; parsing = parsing + sisabyr + 'istra'; parsing = parsing + diskon + 'istra'; var win = window.open(); win.location.reload(); win.location = BASE_URL + 'rpt/cetak_diskon/pcetak_diskon/' + parsing; }