TotalRecDetail.js 1.1 KB

1234567891011121314151617181920212223
  1. Ext.define('saas.model.report.TotalRecDetail', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'cm_yearmonth', type: 'string' }, // 期间
  5. { name: 'cm_custname', type: 'string' }, // 客户名称
  6. { name: 'cm_currency', type:'string' }, //币别
  7. { name: 'cm_beginpreamount', type: 'float' }, // 期初预收
  8. { name: 'cm_beginamount', type: 'float' }, // 期初应收
  9. { name: 'cm_nowpreamount', type: 'float' }, // 本期预收
  10. { name: 'cm_nowamount', type: 'float' }, // 本期应收
  11. { name: 'cm_nowpayamount', type: 'float' }, // 本期核销
  12. { name: 'cm_endpreamount', type: 'float' }, // 期末预收
  13. { name: 'cm_endamount', type: 'float' }, // 期末应收
  14. { name: 'cm_endamount-cm_endpreamount', type: 'float', // 应收余额
  15. convert: function(v, rec) {
  16. var t = (rec.get('cm_endamount') || 0.0) - (rec.get('cm_endpreamount') || 0.0);
  17. return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  18. },
  19. depends: ['cm_endamount', 'cm_endpreamount']
  20. }
  21. ],
  22. });