Source for file ClientDetails.php

Documentation is available at ClientDetails.php

  1. <?php
  2. /* -------------------------------------------------------------------------- */
  3. /* Module      : ClientDetails                                                */
  4. /*                                                                            */
  5. /* Version History :                                                          */
  6. /*                                                                            */
  7. /* Date        Vsn     Author          Description                            */
  8. /* -------------------------------------------------------------------------- */
  9. /* 05/02/09    1.0     S.Lindo         Initial version.                       */
  10. /* -------------------------------------------------------------------------- */
  11. /**
  12.  * Gathers all relevant information for a client and stores them in the session.
  13.  * 
  14.  * @package Default
  15.  * @return void 
  16.  */
  17.                 Zend_Controller_Action_Helper_Abstract
  18.  
  19. {
  20.     public function direct()
  21.     {
  22.         $session Session_Wrapper::getInstance();
  23.  
  24.         $propertyTable new Property();
  25.         $property_id $session->get('property_id');
  26.         if (!isset$property_id))
  27.         {
  28.             $property_id $propertyTable->getMainProperty($session->get('client_id'));
  29.         }
  30.  
  31.         // PROPERTY ID
  32.         $session->set("property_id"$property_id);
  33.         $propertyRow $propertyTable->find($property_id)->getRow(0);
  34.         $description $propertyRow->description;
  35.  
  36.  
  37.  
  38.         // ACCOMMODATION DESCRIPTION below
  39.         $accommodationRowSet $propertyRow->findDependentRowset('Accommodation');
  40.         foreach ($accommodationRowSet as $accommodationRow)
  41.         {
  42.             if ($accommodationRowSet->count(== 1)
  43.             {
  44.                 $session->set("accomm_id"$accommodationRow->accomm_id);
  45.                 if ($accommodationRow->description != null &&
  46.                     $accommodationRow->description != "")
  47.                 {
  48.                     // Override property description
  49.                     $description $accommodationRow->description;
  50.                 }
  51.             else {
  52.                 echo "<BR>Don't forget to cope with 1 property to many accomm";
  53.                 break;
  54.             }
  55.         }
  56.         $session->set("accommDesc"$description);
  57.         // ACCOMMODATION DESCRIPTION above
  58.  
  59.  
  60.  
  61.         // CLIENT SEASON
  62.         $table=new ClientSeason();
  63.         $client_season_id $table->getClientSeasonId($session->get('client_id')$session->get('start_of_month'));
  64.         $session->set("client_season_id"$client_season_id);
  65.  
  66.     }
  67. }

Documentation generated on Fri, 27 Mar 2009 13:48:27 +0000 by phpDocumentor 1.4.1