load->model('MStocks'); $this->load->model('MSales'); $this->load->model('MPurchases'); checkLogin(); } public function _remap($alias = "", $params = array()) { // dd($this->session); $data['dataValue'] = $this->session; $data['pageTitle'] = "Sales"; $datas['fiscalStart'] =NepaliDate($this->session->FiscalYear->fiscalyear_from); $datas['fiscalEnd'] =NepaliDate($this->session->FiscalYear->fiscalyear_to); switch ($alias) { case 'purchase_vs_sales': $data['StockRecords']=$this->MStocks->getStockRecords(); $data['PurchaseDetails'] = $this->MPurchases->getItemPurchases(); $data['SalesDetails'] = $this->MSales->getItemSales(); $data['StockItems'] = $this->MStocks->getStockSummary($datas); loadview("inventory/reports/purchase_vs_sales", $data); break; default: } } }