VendorCheck.js 1.3 KB

12345678910111213141516171819202122232425262728
  1. Ext.define('saas.model.report.VendorCheck', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'pi_date', type: 'date' }, // 单据日期
  5. { name: 'pi_inoutno', type: 'string' }, // 单号
  6. { name: 'pi_class', type: 'string' }, // 业务类型
  7. { name: 'pd_pdno', type: 'int' }, // 序号
  8. { name: 'pr_code', type: 'string' }, // 物料编号
  9. { name: 'pr_brand', type: 'string' }, // 品牌
  10. { name: 'pr_detail', type: 'string' }, // 名称
  11. { name: 'pr_orispeccode', type: 'string' }, // 型号
  12. { name: 'pr_spec', type: 'string' }, // 规格
  13. { name: 'qty', type: 'float' }, // 数量
  14. { name: 'pd_unit', type: 'string' }, // 单位
  15. { name: 'pd_netprice', type: 'float' }, // 单价
  16. { name: 'pd_nettotal', type: 'float' }, // 金额
  17. { name: 'pd_taxrate', type: 'float' }, // 税率
  18. { name: 'pd_ordertotal-pd_nettotal', type: 'float', // 税额
  19. convert: function(v, rec) {
  20. var t = (rec.get('pd_ordertotal') || 0.0) - (rec.get('pd_nettotal') || 0.0);
  21. return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  22. },
  23. depends: ['pd_ordertotal', 'pd_nettotal']
  24. },
  25. { name: 'pd_ordertotal', type: 'float' }, // 价税合计
  26. ],
  27. });