Пример #1
0
 /**
  * @param Stage $Stage
  */
 private function menuButton(Stage $Stage)
 {
     $Stage->addButton(new Standard('Rollen', new Link\Route(__NAMESPACE__ . '/Role'), new TagList(), array(), 'Zusammenstellung von Berechtigungen'));
     $Stage->addButton(new Standard('Zugriffslevel', new Link\Route(__NAMESPACE__ . '/Level'), new Tag(), array(), 'Gruppen von Privilegien'));
     $Stage->addButton(new Standard('Privilegien', new Link\Route(__NAMESPACE__ . '/Privilege'), new TileBig(), array(), 'Gruppen von Rechten'));
     $Stage->addButton(new Standard('Rechte', new Link\Route(__NAMESPACE__ . '/Right'), new TileList(), array(), 'Geschützte Routen'));
 }
Пример #2
0
 /**
  * @param bool $Clear
  *
  * @return Stage
  */
 public function frontendCache($Clear = false)
 {
     $Stage = new Stage('Cache', 'Status');
     $Stage->addButton(new Standard('Cache löschen', '/Platform/System/Cache', null, array('Clear' => true), 'Cache leeren'));
     $Stage->addButton(new External('phpMemcachedAdmin', $this->getRequest()->getPathBase() . '/UnitTest/Console/phpMemcachedAdmin-1.2.2'));
     if ($Clear) {
         (new CacheType(new ApcUser(), true))->getCache()->clearCache();
         (new CacheType(new Apcu(), true))->getCache()->clearCache();
         (new CacheType(new Memcached(), true))->getCache()->clearCache();
         (new CacheType(new OpCache(), true))->getCache()->clearCache();
         (new CacheType(new TwigCache(), true))->getCache()->clearCache();
     }
     $Stage->setContent(new Layout(array(new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new Memcached(), true))->getCache()))), new Title('Memcached')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new Apcu(), true))->getCache()))), new Title('APCu')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new Memory(), true))->getCache()))), new Title('Memory')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new OpCache(), true))->getCache()))), new Title('Zend OpCache')), new LayoutGroup(new LayoutRow(new LayoutColumn(new Status((new CacheType(new TwigCache(), true))->getCache()))), new Title('Twig')))));
     return $Stage;
 }
Пример #3
0
 /**
  * @return Stage
  */
 public function frontendPlatform()
 {
     $Stage = new Stage('Test', 'Frontend');
     $Stage->setMessage('Message: Red alert.Processor of a distant x-ray vision, lower the death!Make it so, chemical wind!Fantastic nanomachines, to the alpha quadrant.Boldly sonic showers lead to the understanding.The death is a ship-wide cosmonaut.Wobble nosily like a post-apocalyptic space suit.Cosmonauts are the emitters of the fantastic ionic cannon.Where is the strange teleporter?');
     $Stage->addButton(new Standard('Link', new Route(__NAMESPACE__)));
     $Stage->setContent((new Form(new FormGroup(array(new FormRow(array(new FormColumn(new AutoCompleter('AutoCompleter', 'AutoCompleter', 'AutoCompleter', array('123', '234', '345')), 3), new FormColumn(array(new CheckBox('CheckBox', 'CheckBox', 'c1'), new RadioBox('RadioBox1', 'RadioBox1a', '1a')), 3), new FormColumn(new DatePicker('DatePicker', 'DatePicker', 'DatePicker'), 3), new FormColumn(new FileUpload('FileUpload', 'FileUpload', 'FileUpload'), 3))), new FormRow(array(new FormColumn(new HiddenField('HiddenField', 'HiddenField', 'HiddenField'), 3), new FormColumn(new NumberField('NumberField', 'NumberField', 'NumberField'), 3), new FormColumn(new PasswordField('PasswordField', 'PasswordField', 'PasswordField'), 3), new FormColumn(array(new RadioBox('RadioBox1', 'RadioBox1b', '1b'), new RadioBox('RadioBox2', 'RadioBox2', '2'), new RadioBox('RadioBox3', 'RadioBox3', '3')), 3))), new FormRow(array(new FormColumn(new SelectBox('SelectBox', 'SelectBox', array('0' => 'A', '2' => '1', '3' => '2', '4' => '3')), 3), new FormColumn(new TextArea('TextArea', 'TextArea', 'TextArea'), 3), new FormColumn(new TextCaptcha('TextCaptcha', 'TextCaptcha', 'TextCaptcha'), 3), new FormColumn(new TextField('TextField', 'TextField', 'TextField'), 3)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Form-Title')), array(new Primary('Primary'), new Danger('Danger'), new Success('Success'), new Reset('Reset'))))->setConfirm('Wirklich?') . new Layout(array(new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new Badge('Badge')), 3), new LayoutColumn(array(new Container('Container')), 3), new LayoutColumn(array(new Header('Header')), 3))), new LayoutRow(array(new LayoutColumn(array(new Label('Label')), 3), new LayoutColumn(array(new Listing('Listing')), 3), new LayoutColumn(array(new Panel('Panel', array('Conten 1', 'Content 2', 'Content 3'), Panel::PANEL_TYPE_DEFAULT, 'Footer')), 3), new LayoutColumn(array(new PullRight('PullRight')), 3))), new LayoutRow(array(new LayoutColumn(array(new Thumbnail(FileSystem::getFileLoader('/Common/Style/Resource/logo_kreide2.png'), 'Title', 'Description', array(new \SPHERE\Common\Frontend\Link\Repository\Primary('Primary', '')))), 3), new LayoutColumn(array(new Well('Well', array())), 3), new LayoutColumn(new TableData(array(array('A' => 1, 'B' => '2'), array('A' => 2, 'B' => '34567890'))), 6))), new LayoutRow(array(new LayoutColumn(array('<hr/>'))))), new Title('Layout-Title')), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(new LayoutTabs(array(new LayoutTab('Name1', 0), new LayoutTab('Name2', 1), new LayoutTab('Name3', 2))), 3)))), new Title('Layout Development')))));
     return $Stage;
 }
Пример #4
0
 /**
  * @return Stage
  */
 public function frontendLayoutAccount()
 {
     $Stage = new Stage('Benutzerkonten');
     $Stage->setMessage('Hier können neue Nutzerzugänge angelegt und bestehende Benutzerkonten bearbeitet bzw. gelöscht werden');
     $Stage->addButton(new Standard('Neues Benutzerkonto anlegen', '/Setting/Authorization/Account/Create', new Pencil()));
     $Stage->setContent($this->layoutAccount());
     return $Stage;
 }
Пример #5
0
 /**
  * @return Stage
  */
 public function frontendShutdown()
 {
     $Stage = new Stage('Betriebsstörung', 'Fehler in der Anwendung');
     $Stage->setMessage('<strong>Problem:</strong> Nach Aufruf der Anwendung arbeitet diese nicht wie erwartet');
     $Stage->setContent(($this->getRequest()->getPathInfo() != '/Platform/Assistance/Error/Shutdown' ? new Danger(new \SPHERE\Common\Frontend\Icon\Repository\Warning() . '<samp>' . $this->getRequest()->getPathInfo() . '</samp>') : '') . (($Error = error_get_last()) ? new Warning(new \SPHERE\Common\Frontend\Icon\Repository\Info() . '<samp>' . $Error['message'] . '<br/>' . $Error['file'] . ':' . $Error['line'] . '</samp>') : '') . '<h2><small>Mögliche Ursachen</small></h2>' . new Info('Dieser Bereich der Anwendung wird eventuell gerade gewartet') . new Danger('Die Anwendung hat erkannt, dass das System nicht fehlerfrei arbeiten kann') . new Danger('Die interne Kommunikation der Anwendung mit weiteren, notwendigen Resourcen zum Beispiel Programmen kann gestört sein') . '<h2><small> Mögliche Lösungen </small></h2> ' . new Info('Versuchen Sie die Anwendung zu einem späteren Zeitpunkt erneut aufzurufen') . new Success('Bitte wenden Sie sich an den Support damit das Problem schnellstmöglich behoben werden kann'));
     if ($this->getRequest()->getPathInfo() != '/Platform/Assistance/Error') {
         $Stage->addButton(new Primary('Fehlerbericht senden', '/Platform/Assistance/Support/Ticket', null, array('TicketSubject' => urlencode('Fehler in der Anwendung'), 'TicketMessage' => urlencode($this->getRequest()->getPathInfo() . ': ' . $Error['message'] . '<br/>' . $Error['file'] . ':' . $Error['line']))));
     }
     return $Stage;
 }
Пример #6
0
 /**
  * @param $Id
  *
  * @return Stage
  */
 public function frontendItemSelect($Id)
 {
     $Stage = new Stage();
     $Stage->setTitle('Leistung');
     $Stage->setDescription('Artikel auswählen');
     $Stage->addButton(new Primary('Zurück', '/Billing/Inventory/Item', new ChevronLeft()));
     if (empty($Id)) {
         $Stage->setContent(new Warning('Die Daten konnten nicht abgerufen werden'));
     } else {
         $tblCommodity = Commodity::useService()->entityCommodityById($Id);
         if (empty($tblCommodity)) {
             $Stage->setContent(new Warning('Die Leistung konnte nicht abgerufen werden'));
         } else {
             $tblCommodityItem = Commodity::useService()->entityCommodityItemAllByCommodity($tblCommodity);
             $tblItemAllByCommodity = Commodity::useService()->entityItemAllByCommodity($tblCommodity);
             $tblItemAll = Item::useService()->entityItemAll();
             if (!empty($tblItemAllByCommodity)) {
                 $tblItemAll = array_udiff($tblItemAll, $tblItemAllByCommodity, function (TblItem $ObjectA, TblItem $ObjectB) {
                     return $ObjectA->getId() - $ObjectB->getId();
                 });
             }
             if (!empty($tblCommodityItem)) {
                 array_walk($tblCommodityItem, function (TblCommodityItem $tblCommodityItem) {
                     $tblItem = $tblCommodityItem->getTblItem();
                     $tblCommodityItem->Name = $tblItem->getName();
                     $tblCommodityItem->Description = $tblItem->getDescription();
                     $tblCommodityItem->PriceString = $tblItem->getPriceString();
                     $tblCommodityItem->TotalPriceString = $tblCommodityItem->getTotalPriceString();
                     $tblCommodityItem->QuantityString = str_replace('.', ',', $tblCommodityItem->getQuantity());
                     $tblCommodityItem->CostUnit = $tblItem->getCostUnit();
                     $tblCommodityItem->Option = (new Danger('Entfernen', '/Billing/Inventory/Commodity/Item/Remove', new Minus(), array('Id' => $tblCommodityItem->getId())))->__toString();
                 });
             }
             if (!empty($tblItemAll)) {
                 /** @var TblItem $tblItem */
                 foreach ($tblItemAll as $tblItem) {
                     $tblItem->PriceString = $tblItem->getPriceString();
                     $tblItem->Option = (new Form(new FormGroup(new FormRow(array(new FormColumn(new TextField('Item[Quantity]', 'Menge', '', new Quantity()), 7), new FormColumn(new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Hinzufügen', new Plus()), 5)))), null, '/Billing/Inventory/Commodity/Item/Add', array('tblCommodityId' => $tblCommodity->getId(), 'tblItemId' => $tblItem->getId())))->__toString();
                 }
             }
             $Stage->setContent(new Layout(array(new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(new Panel('Name', $tblCommodity->getName(), Panel::PANEL_TYPE_SUCCESS), 4), new LayoutColumn(new Panel('Beschreibung', $tblCommodity->getDescription(), Panel::PANEL_TYPE_SUCCESS), 8))))), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new TableData($tblCommodityItem, null, array('Name' => 'Name', 'Description' => 'Beschreibung', 'CostUnit' => 'Kostenstelle', 'PriceString' => 'Preis', 'QuantityString' => 'Menge', 'TotalPriceString' => 'Gesamtpreis', 'Option' => 'Option'))))))), new Title('vorhandene Artikel')), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new TableData($tblItemAll, null, array('Name' => 'Name', 'Description' => 'Beschreibung', 'CostUnit' => 'Kostenstelle', 'PriceString' => 'Preis', 'Option' => 'Option'))))))), new Title('mögliche Artikel')))));
         }
     }
     return $Stage;
 }
Пример #7
0
 /**
  * @param $Id
  * @param $InvoiceItem
  *
  * @return Stage
  */
 public function frontendInvoiceItemEdit($Id, $InvoiceItem)
 {
     $Stage = new Stage();
     $Stage->setTitle('Rechnung');
     $Stage->setDescription('Artikel Bearbeiten');
     $Stage->addButton(new Primary('Zurück', '/Billing/Bookkeeping/Invoice/IsNotConfirmed/Edit', new ChevronLeft(), array('Id' => $Id)));
     if (empty($Id)) {
         $Stage->setContent(new Warning('Die Daten konnten nicht abgerufen werden'));
     } else {
         $tblInvoiceItem = Invoice::useService()->entityInvoiceItemById($Id);
         if (empty($tblInvoiceItem)) {
             $Stage->setContent(new Warning('Der Artikel konnte nicht abgerufen werden'));
         } else {
             $Global = $this->getGlobal();
             if (!isset($Global->POST['InvoiceItems'])) {
                 $Global->POST['InvoiceItem']['Price'] = str_replace('.', ',', $tblInvoiceItem->getItemPrice());
                 $Global->POST['InvoiceItem']['Quantity'] = str_replace('.', ',', $tblInvoiceItem->getItemQuantity());
                 $Global->savePost();
             }
             $Stage->setContent(new Layout(array(new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(new Panel('Leistung-Name', $tblInvoiceItem->getCommodityName(), Panel::PANEL_TYPE_SUCCESS), 3), new LayoutColumn(new Panel('Artikel-Name', $tblInvoiceItem->getItemName(), Panel::PANEL_TYPE_SUCCESS), 3), new LayoutColumn(new Panel('Artikel-Beschreibung', $tblInvoiceItem->getItemDescription(), Panel::PANEL_TYPE_SUCCESS), 6))))), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(Invoice::useService()->executeEditInvoiceItem(new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new TextField('InvoiceItem[Price]', 'Preis in €', 'Preis', new MoneyEuro()), 6), new FormColumn(new TextField('InvoiceItem[Quantity]', 'Menge', 'Menge', new Quantity()), 6)))))), new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Änderungen speichern')), $tblInvoiceItem, $InvoiceItem))))))))));
         }
     }
     return $Stage;
 }
Пример #8
0
 /**
  * @param Stage $Stage
  */
 private function menuButton(Stage $Stage)
 {
     $Stage->addButton(new Standard('Status', new Link\Route(__NAMESPACE__), null, array(), 'Datenbankverbindungen'));
     $Stage->addButton(new Standard('Simulation', new Link\Route(__NAMESPACE__ . '/Setup/Simulation'), null, array(), 'Anzeige von Strukturänderungen'));
     $Stage->addButton(new Standard('Durchführung', new Link\Route(__NAMESPACE__ . '/Setup/Execution'), null, array(), 'Durchführen von Strukturänderungen und einspielen zugehöriger Daten'));
     $Stage->addButton(new External('phpMyAdmin', $this->getRequest()->getPathBase() . '/UnitTest/Console/phpMyAdmin-4.3.12'));
 }
Пример #9
0
 /**
  * @param $Id
  * @param $Basket
  *
  * @return Stage
  */
 public function frontendBasketSummary($Id, $Basket = null)
 {
     $Stage = new Stage();
     $Stage->setTitle('Warenkorb');
     $Stage->setDescription('Zusammenfassung');
     $Stage->setMessage('Schließen Sie den Warenkorb zur Fakturierung ab');
     $Stage->addButton(new Primary('Zurück', '/Billing/Accounting/Basket/Person/Select', new ChevronLeft(), array('Id' => $Id)));
     $tblBasket = Basket::useService()->entityBasketById($Id);
     $tblBasketItemAll = Basket::useService()->entityBasketItemAllByBasket($tblBasket);
     if (!empty($tblBasketItemAll)) {
         array_walk($tblBasketItemAll, function (TblBasketItem &$tblBasketItem) {
             $tblCommodity = $tblBasketItem->getServiceBillingCommodityItem()->getTblCommodity();
             $tblItem = $tblBasketItem->getServiceBillingCommodityItem()->getTblItem();
             $tblBasketItem->CommodityName = $tblCommodity->getName();
             $tblBasketItem->ItemName = $tblItem->getName();
             $tblBasketItem->TotalPriceString = $tblBasketItem->getTotalPriceString();
             $tblBasketItem->QuantityString = str_replace('.', ',', $tblBasketItem->getQuantity());
             $tblBasketItem->PriceString = $tblBasketItem->getPriceString();
         });
     }
     $tblBasket = Basket::useService()->entityBasketById($Id);
     $tblPersonByBasketList = Basket::useService()->entityPersonAllByBasket($tblBasket);
     $Stage->setContent(new Layout(array(new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(new Panel('Warenkorb - Nummer', $tblBasket->getId(), Panel::PANEL_TYPE_SUCCESS), 3), new LayoutColumn(new Panel('Warenkorb - Name', $tblBasket->getName(), Panel::PANEL_TYPE_SUCCESS), 6), new LayoutColumn(new Panel('Erstellt am', $tblBasket->getCreateDate(), Panel::PANEL_TYPE_SUCCESS), 3))))), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new TableData($tblBasketItemAll, null, array('CommodityName' => 'Leistung', 'ItemName' => 'Artikel', 'PriceString' => 'Preis', 'QuantityString' => 'Menge', 'TotalPriceString' => 'Gesamtpreis'))))))), new Title('Artikel')), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new TableData($tblPersonByBasketList, null, array('FirstName' => 'Vorname', 'LastName' => 'Nachname'))))))), new Title('Personen')), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(Basket::useService()->executeCheckBasket(new Form(new FormGroup(array(new FormRow(array(new FormColumn(new DatePicker('Basket[Date]', 'Zahlungsdatum (Fälligkeit)', 'Zahlungsdatum (Fälligkeit)', new Time()), 3)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Zahlungsdatum')), new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Warenkorb fakturieren (prüfen)')), $tblBasket, $Basket)))))))));
     return $Stage;
 }
Пример #10
0
 /**
  * @param $Account
  *
  * @return Stage
  */
 public function frontendAccountCreate($Account)
 {
     $Stage = new Stage();
     $Stage->setTitle('FIBU-Konto');
     $Stage->setDescription('Hinzufügen');
     $Stage->addButton(new Primary('Zurück', '/Billing/Accounting/Account', new ChevronLeft()));
     $tblAccountKey = Account::useService()->entityKeyValueAll();
     $tblAccountType = Account::useService()->entityTypeValueAll();
     $Stage->setContent(Account::useService()->executeAddAccount(new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new TextField('Account[Number]', 'Kennziffer', 'Kennziffer', new BarCode()), 6), new FormColumn(new TextField('Account[Description]', 'Beschreibung', 'Beschreibung', new Conversation()), 6))), new FormRow(array(new FormColumn(new SelectBox('Account[Key]', 'Mehrwertsteuer', array('Value' => $tblAccountKey)), 6), new FormColumn(new SelectBox('Account[Type]', 'Typ', array('Name' => $tblAccountType)), 6)))))), new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Hinzufügen')), $Account));
     return $Stage;
 }
Пример #11
0
 /**
  * @param $Id
  * @param $Item
  *
  * @return Stage
  */
 public function frontendItemEdit($Id, $Item)
 {
     $Stage = new Stage();
     $Stage->setTitle('Artikel');
     $Stage->setDescription('Bearbeiten');
     $Stage->setMessage('<b>Hinweis:</b> <br>
         Ist ein Bildungsgang unter der <i>Bedingung Bildungsgang</i> ausgewählt, wird der Artikel nur für
         Personen (Schüler) berechnet welche diesem Bildungsgang angehören. <br>
         Ist eine Kind-Reihenfolge unter der <i>Bedingung Kind-Reihenfolge</i> ausgewählt, wird der Artikel nur für
         Personen (Schüler) berechnet welche dieser Kind-Reihenfolge entsprechen. <br>
         Beide Bedingungen können einzeln ausgewählt werden, bei der Wahl beider Bedingungen werden diese
         <b>Und</b> verknüpft.
     ');
     $Stage->addButton(new Primary('Zurück', '/Billing/Inventory//Item', new ChevronLeft()));
     //        $tblCourseAll = Management::serviceCourse()->entityCourseAll();   //todo
     //        array_unshift( $tblCourseAll, new TblCourse( '' ) );
     //        $tblChildRankAll = Management::serviceStudent()->entityChildRankAll();
     //        array_unshift( $tblChildRankAll, new TblChildRank( '' ) );
     if (empty($Id)) {
         $Stage->setContent(new Warning('Die Daten konnten nicht abgerufen werden'));
     } else {
         $tblItem = Item::useService()->entityItemById($Id);
         if (empty($tblItem)) {
             $Stage->setContent(new Warning('Der Artikel konnte nicht abgerufen werden'));
         } else {
             $Global = $this->getGlobal();
             if (!isset($Global->POST['Item'])) {
                 $Global->POST['Item']['Name'] = $tblItem->getName();
                 $Global->POST['Item']['Description'] = $tblItem->getDescription();
                 $Global->POST['Item']['Price'] = str_replace('.', ',', $tblItem->getPrice());
                 $Global->POST['Item']['CostUnit'] = $tblItem->getCostUnit();
                 //                    if ( $tblItem->getServiceManagementCourse() ) {
                 //                        $Global->POST['Item']['Course'] = $tblItem->getServiceManagementCourse()->getId();
                 //                    }
                 //                    if ( $tblItem->getServiceManagementStudentChildRank() ) {
                 //                        $Global->POST['Item']['ChildRank'] = $tblItem->getServiceManagementStudentChildRank()->getId();
                 //                    }
                 $Global->savePost();
             }
             $Stage->setContent(Item::useService()->executeEditItem(new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new TextField('Item[Name]', 'Name', 'Name', new Conversation()), 6), new FormColumn(new TextField('Item[Price]', 'Preis in €', 'Preis', new MoneyEuro()), 6))), new FormRow(array(new FormColumn(new TextField('Item[CostUnit]', 'Kostenstelle', 'Kostenstelle', new Money()), 6))), new FormRow(array(new FormColumn(new TextField('Item[Description]', 'Beschreibung', 'Beschreibung', new Conversation()), 12)))))), new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Änderungen speichern')), $tblItem, $Item));
         }
     }
     return $Stage;
 }
Пример #12
0
 /**
  * @param $Debtor
  * @param $Id
  *
  * @return Stage
  */
 public function frontendBankingPersonSelect($Debtor, $Id)
 {
     $Stage = new Stage();
     $Stage->setTitle('Debitoreninformationen');
     $Stage->addButton(new Primary('Zurück', '/Billing/Accounting/Banking/Person', new ChevronLeft()));
     //        $PersonName = Management::servicePerson()->entityPersonById( $Id )->getFullName();  //todo
     $PersonName = false;
     //        $PersonType = Management::servicePerson()->entityPersonById( $Id )->getTblPersonType();
     $PersonType = false;
     $tblPaymentType = Banking::useService()->entityPaymentTypeAll();
     $tblCommodity = Commodity::useService()->entityCommodityAll();
     //        $tblPerson = Management::servicePerson()->entityPersonById( $Id );
     $tblPerson = false;
     //todo
     //        $tblStudent = Management::serviceStudent()->entityStudentByPerson( $tblPerson );
     $tblStudent = false;
     //todo
     if ($tblStudent) {
         if ($tblStudent->getStudentNumber() === 0) {
             $tblStudent->setStudentNumber('Nicht vergeben');
         }
     }
     $Global = $this->getGlobal();
     $Global->POST['Debtor']['Owner'] = $PersonName;
     if (!isset($Global->POST['Debtor']['PaymentType'])) {
         $Global->POST['Debtor']['PaymentType'] = Banking::useService()->entityPaymentTypeByName('SEPA-Lastschrift')->getId();
     }
     if (Banking::useService()->entityDebtorByServiceManagementPerson($Id) == true) {
         $tblDebtor = Banking::useService()->entityDebtorByServiceManagementPerson($Id);
     }
     $Global->savePost();
     $Stage->setContent(new Layout(array(new LayoutGroup(array(empty($tblStudent) ? new LayoutRow(array(new LayoutColumn(array(new Panel(new Person() . ' Debitor', $PersonName, Panel::PANEL_TYPE_SUCCESS)), 6), new LayoutColumn(array(new Panel(new Group() . '. Personengruppe', $PersonType, Panel::PANEL_TYPE_SUCCESS)), 6))) : null, !empty($tblStudent) ? new LayoutRow(array(new LayoutColumn(array(new Panel(new Person() . ' Debitor', $PersonName, Panel::PANEL_TYPE_WARNING)), 4), new LayoutColumn(array(new Panel(new Group() . '. Schülernummer', $tblStudent, Panel::PANEL_TYPE_PRIMARY)), 4), new LayoutColumn(array(new Panel(new Group() . '. Personengruppe', $PersonType, Panel::PANEL_TYPE_WARNING)), 4))) : null)), new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(Banking::useService()->executeAddDebtor(new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(new TextField('Debtor[DebtorNumber]', 'Debitornummer', 'Debitornummer', new BarCode()), 12), new FormColumn(new SelectBox('Debtor[PaymentType]', 'Bezahlmethode', array(TblPaymentType::ATTR_NAME => $tblPaymentType), new Money()), 4), new FormColumn(new TextField('Debtor[LeadTimeFirst]', 'Vorlaufzeit in Tagen', 'Ersteinzug', new Time()), 4), new FormColumn(new TextField('Debtor[LeadTimeFollow]', 'Vorlaufzeit in Tagen', 'Folgeeinzug', new Time()), 4), new FormColumn(new TextField('Debtor[Description]', 'Beschreibung', 'Beschreibung', new Conversation()), 12)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Debitor')), new FormGroup(array(new FormRow(array(new FormColumn(new TextField('Debtor[Owner]', 'Vorname Nachname', 'Inhaber', new Person()), 6), new FormColumn(new TextField('Debtor[BankName]', 'Name der Bank', 'Name der Bank', new Building()), 6), new FormColumn(new TextField('Debtor[IBAN]', 'XXXX XXXX XXXX XXXX XXXX XX', 'IBAN', new BarCode()), 4), new FormColumn(new TextField('Debtor[BIC]', 'XXXX XX XX XXX', 'BIC', new BarCode()), 4), new FormColumn(new TextField('Debtor[CashSign]', 'Kassenzeichen', 'Kassenzeichen', new Nameplate()), 4)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Bankdaten')), new FormGroup(array(new FormRow(array(new FormColumn(new TextField('Debtor[Reference]', 'Referenz', 'Mandatsreferenz', new BarCode()), 4), new FormColumn(new DatePicker('Debtor[ReferenceDate]', 'Datum', 'Erstellungsdatum', new Time()), 4), new FormColumn(new SelectBox('Debtor[Commodity]', 'Leistung', array('Name' => $tblCommodity), new Time()), 4)))), new \SPHERE\Common\Frontend\Form\Repository\Title('Mandatsreferenz'))), new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Hinzufügen')), $Debtor, $Id))))))), !empty($tblDebtor) ? new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(new Form(array(new FormGroup(array(new FormRow(array(new FormColumn(array(new TableData($tblDebtor, null, array('DebtorNumber' => 'Debitorennummer', 'BankName' => 'Name der Bank', 'IBAN' => 'IBAN', 'BIC' => 'BIC', 'Owner' => 'Inhaber'))))))))))), 12)))), new Title('Vorhandene Debitorennummer(n)')) : null)));
     return $Stage;
 }