Advertisement
matthewpoer

MIS/TMS Record Filters - Current

May 8th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1.     /**
  2.      * Closed/Complete status list
  3.      */
  4.     private $final_statuses = array('Closed','Completed');
  5.    
  6.     /**
  7.      * Open statuses list
  8.      */
  9.     private $open_statuses = array('Open','WEB_REG','InProcess');
  10.    
  11.     /*
  12.      * We only proceed if the SLX Ticket is of a certain area (Field Service)
  13.      * and is InProcess or Open status and account.c_TMSintegration is checked ('T')
  14.      */
  15.     if($this->slx_object['c_TMSintegration'] == 'T' && $this->slx_object['AREA'] == 'Field Service'
  16.         && in_array($this->slx_object['TEXT'],$this->open_statuses)) {
  17.         $this->sync_related = FALSE;
  18.        
  19.     /*
  20.      * Alternativly, if it is C_SENDTOTMS ('T') and Status is Closed/Completed
  21.      * and AREA is Field Service|Routine Service
  22.      */
  23.     } elseif($this->slx_object['C_SENDTOTMS'] == 'T' && ($this->slx_object['AREA'] == 'Field Service' ||
  24.         $this->slx_object['AREA'] == 'Routine Service') && in_array($this->slx_object['TEXT'],$this->final_statuses)) {
  25.         $this->sync_related = TRUE;
  26.    
  27.     } else {
  28.         // exit
  29.     }
  30.    
  31.     // logic for updating or creating the TMS WorkOrder
  32.    
  33.     if($this->sync_related == TRUE){
  34.         // drop & re-create the Time Charges and Material Issues records
  35.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement