StartTransaction(); return true; } /** * @return bool */ function Done() { Debug::Arr( $this->tmp_data, 'Pay Stub TMP Data: ', __FILE__, __LINE__, __METHOD__, 10 ); //Call pre-save() first, so calculates the totals. $this->setEnableCalcTotal( true ); $this->preSave(); if ( $this->Validate() ) { $this->CommitTransaction(); //$this->FailTransaction(); return true; } $this->FailTransaction(); //Fails Transaction $this->CommitTransaction(); //Rollback occurs here. This is important when looping over many employees that may have a pay stub that fails. return false; } } ?>