Пример #1
0
             break;
         }
     }
     if ($fail_transaction == FALSE) {
         //$pf->FailTransaction();
         $pf->CommitTransaction();
         Redirect::Page(URLBuilder::getURL(array('refresh' => TRUE), '../CloseWindow.php'));
         break;
     } else {
         $pf->FailTransaction();
     }
 default:
     if ($id != '' and $action != 'submit') {
         Debug::Text(' ID was passed: ' . $id, __FILE__, __LINE__, __METHOD__, 10);
         $pclf = new PunchControlListFactory();
         $pclf->getByPunchId($id);
         foreach ($pclf as $pc_obj) {
             //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
             //Get punches
             $plf = new PunchListFactory();
             //$plf->getByPunchControlId( $pc_obj->getId() );
             $plf->getById($id);
             if ($plf->getRecordCount() > 0) {
                 $p_obj = $plf->getCurrent();
             } else {
                 $punch_data = NULL;
             }
             //Get Station data.
             $station_data = FALSE;
             $slf = new StationListFactory();
             if ($p_obj->getStation() != FALSE) {