Ejemplo n.º 1
0
 /**
  * @return \Application\Model\Collection\ItineraryCollection
  * @param int $idFolioImport
  */
 private function getItinerary($idBooking)
 {
     $value = ItineraryQuery::create()->whereAdd(Itinerary::ID_BOOKING, $idBooking)->find();
     return $value;
 }
Ejemplo n.º 2
0
 /**
  * @author joseluis
  */
 public function detailsAction()
 {
     $params = $this->getRequest()->getParams();
     $id = $params['id'];
     $this->view->contentTitle = $this->i18n->_('Booking Details');
     $booking = BookingQuery::create()->findByPK($id)->toArray();
     $booking['folio'] = FolioImportQuery::create()->findByPK($booking['id_folio_import'])->getFolio();
     $freightForwarder = BookingFileQuery::create()->whereAdd(BookingFile::ID_BOOKING, $booking['id_booking'])->whereAdd(BookingFile::DOCUMENT_TYPE, $this->setDocumentType('FreightForwarder'))->count();
     if ($freightForwarder) {
         $freightForwarder = BookingFileQuery::create()->whereAdd(BookingFile::ID_BOOKING, $booking['id_booking'])->whereAdd(BookingFile::DOCUMENT_TYPE, $this->setDocumentType('FreightForwarder'))->findOne()->getContent();
         $booking['freight_forwarder'] = basename($freightForwarder);
     }
     $BlMaster = BookingFileQuery::create()->whereAdd(BookingFile::ID_BOOKING, $booking['id_booking'])->whereAdd(BookingFile::DOCUMENT_TYPE, $this->setDocumentType('BlMaster'))->count();
     if ($BlMaster) {
         $BlMaster = BookingFileQuery::create()->whereAdd(BookingFile::ID_BOOKING, $booking['id_booking'])->whereAdd(BookingFile::DOCUMENT_TYPE, $this->setDocumentType('BlMaster'))->findOne()->getContent();
         $booking['bl_master'] = basename($BlMaster);
     }
     $myItinerary = ItineraryQuery::create()->whereAdd(Itinerary::ID_BOOKING, $id)->count();
     if ($myItinerary) {
         $myItinerary = ItineraryQuery::create()->whereAdd(Itinerary::ID_BOOKING, $id)->fetchAll();
         $booking['myItinerary'] = $myItinerary;
     }
     $this->view->booking = $booking;
     $this->view->setTpl('Details');
 }