Example #1
0
 /**
  * @param            $tblAddressList
  * @param TblAddress $invoiceAddress
  * @param TblInvoice $tblInvoice
  *
  * @return Layout
  */
 private static function layoutAddress($tblAddressList, TblAddress $invoiceAddress, TblInvoice $tblInvoice)
 {
     if (!empty($tblAddressList)) {
         /** @var TblAddress[] $tblAddressList */
         foreach ($tblAddressList as &$tblAddress) {
             if ($invoiceAddress != null && $invoiceAddress->getId() === $tblAddress->getId()) {
                 $AddressType = new MapMarker() . ' Rechnungsadresse';
                 $PanelType = Panel::PANEL_TYPE_SUCCESS;
             } else {
                 $AddressType = new MapMarker() . ' Adresse';
                 $PanelType = Panel::PANEL_TYPE_DEFAULT;
             }
             $tblAddress = new LayoutColumn(new Panel($AddressType, new Address($tblAddress), $PanelType, new Primary('Auswählen', '/Billing/Bookkeeping/Invoice/IsNotConfirmed/Address/Change', new Ok(), array('Id' => $tblInvoice->getId(), 'AddressId' => $tblAddress->getId()))), 3);
         }
     } else {
         $tblAddressList = array(new LayoutColumn(new Warning('Keine Adressen hinterlegt', new \SPHERE\Common\Frontend\Icon\Repository\Warning())));
     }
     return new Layout(new LayoutGroup(new LayoutRow($tblAddressList), new Title('Adressen')));
 }
 /**
  * @param TblAddress $tblAddress
  */
 public function setServiceManagementAddress(TblAddress $tblAddress = null)
 {
     $this->serviceManagement_Address = null === $tblAddress ? null : $tblAddress->getId();
 }