Example #1
0
 /**
  * @param $LeadTimeFollow
  * @param $LeadTimeFirst
  * @param $DebtorNumber
  * @param $BankName
  * @param $Owner
  * @param $CashSign
  * @param $IBAN
  * @param $BIC
  * @param $Description
  * @param $PaymentType
  * @param $ServiceManagement_Person
  *
  * @return TblDebtor
  */
 public function actionAddDebtor($DebtorNumber, $LeadTimeFirst, $LeadTimeFollow, $BankName, $Owner, $CashSign, $IBAN, $BIC, $Description, $PaymentType, $ServiceManagement_Person)
 {
     $Manager = $this->Connection->getEntityManager();
     $Entity = new TblDebtor();
     $Entity->setLeadTimeFirst($LeadTimeFirst);
     $Entity->setLeadTimeFollow($LeadTimeFollow);
     $Entity->setDebtorNumber($DebtorNumber);
     $Entity->setBankName($BankName);
     $Entity->setOwner($Owner);
     $Entity->setCashSign($CashSign);
     $Entity->setIBAN($IBAN);
     $Entity->setBIC($BIC);
     $Entity->setDescription($Description);
     $Entity->setPaymentType(Banking::useService()->entityPaymentTypeById($PaymentType));
     $Entity->setServiceManagementPerson($ServiceManagement_Person);
     $Manager->saveEntity($Entity);
     Protocol::useService()->createInsertEntry($this->Connection->getDatabase(), $Entity);
     return $Entity;
 }