From 0924a0f433b4c7266fa05a0ec33829d1bb84c791 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sat, 9 Jul 2016 12:50:17 +0100 Subject: [PATCH] Revert "Move create_temp_table to Reports Controller constructor out of Model one" (#729) This reverts commit dc0611958600584b7b2e730e59326726d3d787dc. --- application/controllers/Reports.php | 7 +------ application/models/reports/Report.php | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index 7bb5b2ae1..788eb5a2e 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -21,13 +21,8 @@ class Reports extends Secure_Controller { redirect('no_access/reports/reports_' . $submodule_id); } - - //Create our temp tables to work with the data in our report - $this->Sale->create_temp_table(); - $this->Receiving->create_temp_table(); - $this->Item->create_temp_table(); } - + $this->load->helper('report'); } diff --git a/application/models/reports/Report.php b/application/models/reports/Report.php index 53d29f2e2..b450600c4 100644 --- a/application/models/reports/Report.php +++ b/application/models/reports/Report.php @@ -10,6 +10,11 @@ abstract class Report extends CI_Model $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate'); $this->output->set_header('Cache-Control: post-check=0, pre-check=0', FALSE); $this->output->set_header('Pragma: no-cache'); + + //Create our temp tables to work with the data in our report + $this->Sale->create_temp_table(); + $this->Receiving->create_temp_table(); + $this->Item->create_temp_table(); } //Returns the column names used for the report