<?php

Doo::loadCore('db/DooModel');

class receiptDetail extends DooModel {

    public $rdid;
    public $item;
    public $staff;
    
    public $itemCategory;
    public $price;
    
    public $date;
    public $pastDate;
    public $cid;
    
    public $rid;
    public $status;
    
    public $_table = 'CLD_receiptDetail';
    public $_primarykey = 'rdid';
    
    public $_fields = array('rdid', 'item', 'staff', 'itemCategory', 'price', 'date','pastDate', 'cid', 'rid', 'status');

    /*
    function getClientByCid($cid){
    	$sql = "select * from " . $this->_table . " as a left join CLD_staff as b on (a.sid=b.sid)  where a.cid= '".$cid."' " ;
		
    	$query = Doo::db ()->query ( $sql );
		
		$result = $query->fetch ();
		
		return $result;
    }
    
    public function getProjectByIdList($projectid){
    	return $this->find ( array ('where' => "pid= '".$projectid."'", 'asArray' => TRUE ) );
    }
    */
}

?>