function getMhsDetDPP(grid, rowIdx){ var jnsbiaya='DPP'; var thnmasuk = Ext.getCmp('cb.thmasuk').getValue(); var prodi = Ext.getCmp('frm.prodi').getValue(); var jnskelas = Ext.getCmp('jnskls').getValue(); var biaya = Ext.getCmp('biayaa').getValue(); var thnakademik = Ext.getCmp('thnakd').getValue(); var stsemester = Ext.getCmp('stsmt').getValue(); var jumlahbayardpp = 0; // -- GRID DETAIL DPP var ds_DPPdet = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'mahasiswa_controller/get_DPPdet', method: 'POST' }), baseParams: { nim:Ext.getCmp('paramnimdpp').getValue(), kdstsemester:stsemester}, 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" } ], listeners: { load: function(store, records, options) { ds_DPPdet.each(function (rec) { jumlahbayardpp += parseFloat(rec.get('jmlbayar')); }); Ext.getCmp('nf.totalDPP').setValue(jumlahbayardpp); } } }); 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: '.', labelAlign: 'right' //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.Panel({ 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, }, items: [{ id: 'tf.jbiaya-det', fieldLabel: 'Jenis Biaya', value: jnsbiaya, //dari record }, { id: 'tf.thmasuk-det', fieldLabel: 'Tahun Masuk', value: thnmasuk //dari record }, { id: 'tf.prodi-det', fieldLabel: 'Program Studi', width: 270, value: prodi, //dari form utama }, { id: 'tf.jkelas-det', fieldLabel: 'Jenis Kelas', value: jnskelas, //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.stsmt-det', fieldLabel: 'Tahun Akademik - Semester', value: thnakademik, //dari record }] }, { xtype: 'fieldset', items: [gp_DPPdet], }] }); var wDPPdet = new Ext.Window({ title: 'Detail History Pembayaran DPP', modal: true, resizable: false, layout: 'fit', width:500, height:400, items: [fpDPPdet] }).show(); }