<?php

class AppLaporanDir extends Database {

   protected $mSqlFile= 'module/laporan_dir_barcode/business/laporan_dir.sql.php';
   
   function __construct($connectionNumber=0) {
      parent::__construct($connectionNumber);
      #$this->setDebugOn();
   }
   
	function GetDataUserByUsername($name)
   {
      if (isset($this->mUserByUserName[$name])) return $this->mUserByUserName[$name];
      $result = $this->Open($this->mSqlQueries['get_data_user_by_user_name'], array($name));  
      $this->mUserByUserName[$name] = $result[0];
      
		return $result[0];
   }
	
   # multiunit
	function getDataDir($gudangId, $unitId){
		$User = $this->GetDataUserByUsername($_SESSION['username']);
		$kodeSistem = $User['unitkerjaKodeSistem']; 
		$result = $this->Open($this->mSqlQueries['get_list_dir'],array($gudangId,$gudangId,$unitId,$unitId,$kodeSistem,$kodeSistem.'.%'));
		
		return $result;
	}
}
?>
