Ext.define('saas.model.report.Sale', { extend: 'saas.model.Base', fields: [ { name: 'id', type: 'int' }, { name: 'sa_code', type: 'string' }, { name: 'sa_custname', type: 'string' }, { name: 'sa_sendstatus', type: 'string' }, { name: 'sa_seller', type: 'string' }, { name: 'sa_date', type: 'date' }, { name: 'sd_prodcode', type: 'string' }, { name: 'pr_brand', type: 'string' }, { name: 'pr_detail', type: 'string' }, { name: 'pr_orispeccode', type: 'string' }, { name: 'pr_spec', type: 'string' }, { name: 'sd_qty', type: 'float' }, { name: 'pr_unit', type: 'string' }, { name: 'sd_price', type: 'float' }, { name: 'sd_netprice', type: 'float' }, { name: 'sd_price', type: 'float' }, { name: 'sd_nettotal', type: 'float' }, { name: 'sd_taxrate', type: 'float' }, { name: 'sd_total - sd_nettotal', type: 'float', convert: function(v, rec) { var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0); return Number(saas.util.BaseUtil.numberFormat(t, 2, false)); }, depends: ['sd_total', 'sd_nettotal'] }, { name: 'sd_total', type: 'float' }, { name: 'sd_pdsendqty', type: 'float' }, { name: 'sd_remark', type: 'string' }, ], });