Ejemplo n.º 1
0
 /**
  * @return Stage
  */
 public function frontendPayment()
 {
     $Stage = new Stage();
     $Stage->setTitle('Zahlungen');
     $Stage->setDescription('Importierte');
     $paymentList = Balance::useService()->entityPaymentAll();
     if ($paymentList) {
         array_walk($paymentList, function (TblPayment &$tblPayment) {
             $tblInvoice = $tblPayment->getTblBalance()->getServiceBillingInvoice();
             if ($tblInvoice) {
                 $tblPayment->InvoiceNumber = $tblInvoice->getNumber();
                 $tblPayment->InvoiceDate = $tblInvoice->getInvoiceDate();
                 $tblPayment->DebtorFullName = $tblInvoice->getDebtorFullName();
                 $tblPayment->DebtorNumber = $tblInvoice->getDebtorNumber();
                 $tblPayment->ValueString = $tblPayment->getValueString();
             }
         });
     }
     $Stage->setContent(new TableData($paymentList, null, array('InvoiceNumber' => 'Rechnungs-Nr.', 'InvoiceDate' => 'Rechnungsdatum', 'Date' => 'Zahlungseingangsdatum', 'DebtorFullName' => 'Debitor', 'DebtorNumber' => 'Debitorennummer', 'ValueString' => 'Betrag')));
     return $Stage;
 }
Ejemplo n.º 2
0
 /**
  * @param $tblItemId
  * @param $tblAccountId
  *
  * @return Stage
  */
 public function frontendItemAccountAdd($tblItemId, $tblAccountId)
 {
     $Stage = new Stage();
     $Stage->setTitle('Artikel');
     $Stage->setDescription('FIBU-Konto Hinzufügen');
     $tblItem = Item::useService()->entityItemById($tblItemId);
     $tblAccount = Account::useService()->entityAccountById($tblAccountId);
     if (!empty($tblItemId) && !empty($tblAccountId)) {
         $Stage->setContent(Item::useService()->executeAddItemAccount($tblItem, $tblAccount));
     }
     return $Stage;
 }
Ejemplo n.º 3
0
 /**
  * @param $Id
  *
  * @return Stage
  */
 public function frontendInvoiceItemRemove($Id)
 {
     $Stage = new Stage();
     $Stage->setTitle('Rechnung');
     $Stage->setDescription('Artikel Entfernen');
     $tblInvoiceItem = Invoice::useService()->entityInvoiceItemById($Id);
     $Stage->setContent(Invoice::useService()->executeRemoveInvoiceItem($tblInvoiceItem));
     return $Stage;
 }
Ejemplo n.º 4
0
 /**
  * @param $Id
  *
  * @return Stage
  */
 public function frontendPictureDelete($Id)
 {
     $Stage = new Stage();
     $Stage->setTitle('Bild');
     $Stage->setDescription('entfernen');
     $tblTestPicture = Test::useService()->getTestPictureById($Id);
     $Stage->setContent(Test::useService()->deleteTblTestPicture($tblTestPicture));
     return $Stage;
 }
Ejemplo n.º 5
0
 /**
  * @param $Id
  * @param $Date
  * @param $Data
  * @param $Save
  *
  * @return Stage
  */
 public function frontendBasketDebtorSelect($Id, $Date, $Data, $Save)
 {
     $Stage = new Stage();
     $Stage->setTitle('Warenkorb');
     $Stage->setDescription('Debitoren zuordnen');
     $Stage->setMessage('Es konnten im Warenkorb nicht zu alle Personen bei allen Leistungen eindeutig ein Debitor
         ermittelt werden. Es werden alle nicht automatisch zuordenbaren Kombinationen von Personen und Leistungen
         angezeigt. Bitte weisen Sie die entsprechenden Debitoren zu');
     $Global = $this->getGlobal();
     if (!isset($Global->POST['Save'])) {
         $Global->POST['Save'] = 1;
     }
     $Global->savePost();
     $tblBasket = Basket::useService()->entityBasketById($Id);
     $tblBasketCommodityList = Basket::useService()->entityBasketCommodityAllByBasket($tblBasket);
     /**@var TblBasketCommodity $tblBasketCommodity */
     array_walk($tblBasketCommodityList, function (TblBasketCommodity $tblBasketCommodity) {
         $tblBasketCommodityDebtorList = Basket::useService()->entityBasketCommodityDebtorAllByBasketCommodity($tblBasketCommodity);
         $tblBasketCommodity->Name = $tblBasketCommodity->getServiceManagementPerson()->getFullName();
         $tblBasketCommodity->Commodity = $tblBasketCommodity->getServiceBillingCommodity()->getName();
         $tblBasketCommodity->Select = new SelectBox('Data[' . $tblBasketCommodity->getId() . ']', '', array('{{ ServiceBillingDebtor.DebtorNumber }}' . ' - {{ ServiceBillingDebtor.ServiceManagementPerson.FullName }}' . '{% if( ServiceBillingDebtor.Description is not empty) %} - {{ ServiceBillingDebtor.Description }}{% endif %}' => $tblBasketCommodityDebtorList));
     });
     $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(Basket::useService()->executeCheckDebtors(new Form(new FormGroup(array(new FormRow(new FormColumn(new TableData($tblBasketCommodityList, null, array('Name' => 'Person', 'Commodity' => 'Leistung', 'Select' => 'Debitorennummer - Debitor - Beschreibung'), false))), new FormRow(array(new FormColumn(new SelectBox('Save', '', array(1 => 'Nicht speichern', 2 => 'Als Standard speichern')), 3), new FormColumn(new \SPHERE\Common\Frontend\Form\Repository\Button\Primary('Debitoren zuordnen (prüfen)'), 3)))))), $Id, $Date, $Data, $Save)))))))));
     return $Stage;
 }
Ejemplo n.º 6
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;
 }
Ejemplo n.º 7
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;
 }
Ejemplo n.º 8
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;
 }