title: Call back before insert not work in Grocery CRUD
body: <p>My Controller, inserts a row in invHdrData Table,
  i want the Max Doc Number in that Table to insert a Doc Number automatically
  The callback before insert not works.
  So Where is the problem?
  I would greatly appreciate it if you kindly give me some answers :)</p>
  
  <p>My Controller :</p>
  
  <pre><code>        public function sanads()
  {
          $crud = new grocery_CRUD();
          $crud-&gt;set_theme('datatables');
          $crud-&gt;set_table('invhdrdata');
          $crud-&gt;set_subject('BLAH BLAH BLAH');
          $crud-&gt;columns('FiscalYear','StoreNo','DocType','CreateDate','UpdateDate');
          $crud-&gt;fields('FiscalYear','StoreNo','DocType','DocNo','CreateDate','UpdateDate');
          $crud-&gt;callback_before_insert(array($this,'maxDocNoCon'));
          $crud-&gt;field_type('DocNo','invisible');
          $output = $crud-&gt;render();
          $this-&gt;_example_output($output);
  }
  </code></pre>
  
  <p>Another Function in Controller:</p>
  
  <pre><code>    public function maxDocNoCon($post_array) {
      $this-&gt;load-&gt;model('inv_model');
      $post_array['DocNo'] = $this-&gt;inv_model-&gt;maxDocNoMod($post_array['FiscalYear'],$post_array['StoreNo'],$post_array['DocType']);
      $test['DocNo'] = (int)explode(",", $post_array['DocNo'])+1;
      return $test;
  }
  </code></pre>
  
  <p>My Model:</p>
  
  <pre><code>    function maxDocNoMod($FiscalYear,$StoreNo,$DocType){
      $this-&gt;db-&gt;select_max('DocNo');
      $this-&gt;db-&gt;where('FiscalYear', $FiscalYear);
      $this-&gt;db-&gt;where('StoreNo', $StoreNo);
      $this-&gt;db-&gt;where('DocType', $DocType);
      $data = $this-&gt;db-&gt;get('invhdrdata');
      if ($data-&gt;num_rows() != 1) {
          // there should only be one row - anything else is an error
          return false;
      }
      return $data-&gt;row()-&gt;DocNo;
  }
  </code></pre>