<?php
require_once (PATH_TABLES . "activity/goods/GoodsReceivingDetailTable.php") ;
require_once (PATH_MODELS . "base/MasterBase.php") ;

class GoodsReceivingDetailClass extends MasterBase {
	function __construct($db) {
		$this->db 		= $db ;
		$this->tbl 		= GoodsReceivingDetailTable::C_TABLE ;
		$this->fldid 	= GoodsReceivingDetailTable::C_HEADER_ID ;
	}
	function __destruct() {
	}

	function getGoodsReceivingDetail($id){
        $sql = "SELECT * FROM " ;
        $sql .= GoodsReceivingDetailTable::C_TABLE . " WHERE " . GoodsReceivingDetailTable::C_HEADER_ID . " = " . $id;
        
        $rows = $this->db->getTable($sql);

        if(!is_null($rows) && count($rows) > 0){
            return $rows;
        }
        
        return null;
    }
    
}
?>