Exemple #1
0
 public static function checkIfExists($startTime)
 {
     $task = self::getStartTime($startTime);
     if (!is_null($task)) {
         appGlobals::existsMessage(appGlobals::getTaskTableName(), $task->start_time, $task->id);
     }
     return $task;
 }
 public static function checkIfExists($text)
 {
     $timeCardFormat = TimeCardFormat::where('description', '=', $text)->first();
     if (!is_null($timeCardFormat)) {
         appGlobals::existsMessage(appGlobals::getTimeCardFormatTableName(), $timeCardFormat->description, $timeCardFormat->id);
     }
     return $timeCardFormat;
 }
 /**
  * @param $timeCardHoursWorked
  *
  * @return mixed
  */
 public static function checkIfExists($timeCardHoursWorked)
 {
     $timeCardHoursWorked = self::where('time_card_id', '=', $timeCardHoursWorked->time_card_id)->first();
     if (!is_null($timeCardHoursWorked)) {
         appGlobals::existsMessage(appGlobals::getTimeCardHoursWorkedTableName(), $timeCardHoursWorked->time_card_id, $timeCardHoursWorked->date_worked);
     }
     return $timeCardHoursWorked;
 }
Exemple #4
0
 public static function checkIfExists($text)
 {
     $work = Work::where('work_type_description', '=', $text)->first();
     if (!is_null($work)) {
         appGlobals::existsMessage(appGlobals::getWorkTableName(), $work->work_type_description, $work->id);
     }
     return $work;
 }
Exemple #5
0
 /**
  * reads Project table by unique index
  *  - if not found, emit a not found message.
  *  - if found return the $project record to the caller.
  *
  * @param [in] $text
  * @return a record.
  */
 public static function checkIfExists($text)
 {
     $client = Client::where('name', '=', $text)->first();
     if (!is_null($client)) {
         appGlobals::existsMessage(appGlobals::getClientTableName(), $client->name, $client->id);
     }
     return $client;
 }
Exemple #6
0
 /**
  * reads Project table by unique index
  *  - if not found, emit a not found message.
  *  - if found return the $project record to the caller.
  *
  * @param [in] $text
  * @return a record.
  */
 public static function checkIfExists($text)
 {
     $project = Project::where('name', '=', $text)->first();
     if (!is_null($project)) {
         appGlobals::existsMessage(appGlobals::getProjectTableName(), $project->name, $project->id);
     }
     return $project;
 }
Exemple #7
0
 /**
  * reads Project table by unique index
  *  - if not found, emit a not found message.
  *  - if found return the $project record to the caller.
  *
  * @param [in] $text
  * @return record.
  */
 public static function checkIfExists($text)
 {
     $workType = WorkType::where('type', '=', $text)->first();
     if (!is_null($workType)) {
         appGlobals::existsMessage(appGlobals::getWorkTypeTableName(), $workType->type, $workType->id);
     }
     return $workType;
 }
Exemple #8
0
 /**
  * If time card found set $inTimeCard to found time card.  If not found don't $inTimeCard.
  *
  * @param $inTimeCard
  *
  * @return mixed
  */
 public static function checkIfExists(&$inTimeCard)
 {
     $timeCard = self::where('work_id', $inTimeCard->work_id)->where('time_card_format_id', '=', $inTimeCard->time_card_format_id)->first();
     if (!is_null($timeCard)) {
         $inTimeCard = $timeCard;
         appGlobals::existsMessage(appGlobals::getTimeCardTableName(), $timeCard->iso_beginning_dow_date, $timeCard->id);
     }
     return $timeCard;
 }