function postSave() { if ($this->getEnableCalcSystemTotalTime() == TRUE) { Debug::text('Calc System Total Time Enabled: ', __FILE__, __LINE__, __METHOD__, 10); $this->calcSystemTotalTime(); } else { Debug::text('Calc System Total Time Disabled: ', __FILE__, __LINE__, __METHOD__, 10); } if ($this->getDeleted() == FALSE) { //Handle accruals here, instead of in calcSystemTime as that is too early in the process and user_date_total ID's don't exist yet. $this->calcAccrualPolicy(); //AccrualFactory::deleteOrphans( $this->getUserDateObject()->getUser() ); AccrualFactory::deleteOrphans($this->getUserDateObject()->getUser(), $this->getUserDateObject()->getDateStamp()); } return TRUE; }