model.php 889 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * The model file of workestimation module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package workestimation
  9. * @link https://www.zentao.net
  10. */
  11. class workestimationModel extends model
  12. {
  13. /**
  14. * Get budget by projectID.
  15. *
  16. * @param int $projectID
  17. * @access public
  18. * @return object|null
  19. */
  20. public function getBudget($projectID)
  21. {
  22. $budget = $this->dao->select('*')->from(TABLE_WORKESTIMATION)
  23. ->where('project')->eq($projectID)
  24. ->andWhere('deleted')->eq('0')
  25. ->fetch();
  26. return $budget ? $budget : null;
  27. }
  28. }