[eluser]jleequeen[/eluser]
I'm getting the following error:
Quote:Fatal error: Call to a member function total_purchases_amount() on a non-object in C:\Apache2.2\htdocs\Local_Water_Supply_Plan\application\models\calculations_model.php on line 311
Here is the code the error references from my calculations_model.
Code:
function total_available_supply($pwsid, $year) {
$this->load->model('purchases_model');
$this->load->model('ground_model');
$this->load->model('surface_model');
$purchases = $this->purchases_model->total_purchases_amount($pwsid, $year);
$surface = $this->surface_model->total_surface_amount($pwsid, $year);
$ground = $this->ground_model->total_ground_amount($pwsid, $year);
return $purchases + $surface + $ground;
}
As you can see I'm trying to load some other models within my calculation model. Can you do this? Is that why it is throwing the error? Any help would be awesome.