custfinaModel.php 743 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. //客户.收款单的应用
  3. class agent_custfinaClassModel extends agentModel
  4. {
  5. //状态显示替换
  6. protected function agentrows($rows, $rowd, $uid)
  7. {
  8. $statea = $this->flow->statearrs;
  9. foreach($rowd as $k=>$rs){
  10. $state = $rs['paystatus'];
  11. $ztarr = $statea[$state];
  12. $rows[$k]['statustext'] = $ztarr[0];
  13. $rows[$k]['statuscolor'] = $ztarr[1];
  14. }
  15. return $rows;
  16. }
  17. public function gettotal()
  18. {
  19. $stotal = $this->getwdtotal($this->adminid);
  20. $titles = '';
  21. return array('stotal'=>$stotal,'titles'=> $titles);
  22. }
  23. private function getwdtotal($uid)
  24. {
  25. $where = '`uid`='.$uid.' and `type`=0 and `ispay`=0';
  26. $stotal = m('custfina')->rows($where);
  27. return $stotal;
  28. }
  29. }
粤ICP备19079148号