Ext.define('saas.model.report.SaleRec', { extend: 'saas.model.Base', fields: [ { name: 'id', type: 'int' }, { name: 'rb_code', type: 'string' }, { name: 'rb_custname', type: 'string' }, { name: 'rb_date', type: 'date' }, { name: 'sd_prodcode', type: 'string' }, { name: 'rbd_slcode', type: 'string' }, { name: 'rbd_slkind', type: 'string' }, { name: 'pi_nettotal', type: 'float' }, { name: 'pi_total', type: 'float' }, { name: 'rbd_nowbalance', type: 'float' }, { name: 'rb_backrate', type: 'float' }, { name: 'pi_total-pi_nettotal', type: 'float', convert: function(v, rec) { var t = (rec.get('pi_total') || 0.0) - (rec.get('pi_nettotal') || 0.0); return Number(saas.util.BaseUtil.numberFormat(t, 2, false)); }, depends: ['pi_total', 'pi_nettotal'] },{ name: 'rb_remark', type: 'string' } ], });