コード例 #1
0
ファイル: Data.php プロジェクト: BozzaCoon/SPHERE-Framework
 /**
  * @param TblBasket $tblBasket
  * @param TblPerson $tblPerson
  * @param TblDebtor $tblDebtor
  *
  * @return TblTempInvoice|null
  */
 public function actionCreateTempInvoice(TblBasket $tblBasket, TblPerson $tblPerson, TblDebtor $tblDebtor)
 {
     $Manager = $this->Connection->getEntityManager();
     $Entity = $Manager->getEntity('TblTempInvoice')->findOneBy(array(TblTempInvoice::ATTR_SERVICE_BILLING_BASKET => $tblBasket->getId(), TblTempInvoice::ATTR_SERVICE_MANAGEMENT_PERSON => $tblPerson->getId(), TblTempInvoice::ATTR_SERVICE_BILLING_DEBTOR => $tblDebtor->getId()));
     if (null === $Entity) {
         $Entity = new TblTempInvoice();
         $Entity->setServiceBillingBasket($tblBasket);
         $Entity->setServiceManagementPerson($tblPerson);
         $Entity->setServiceBillingDebtor($tblDebtor);
         $Manager->saveEntity($Entity);
         Protocol::useService()->createInsertEntry($this->Connection->getDatabase(), $Entity);
     }
     return $Entity;
 }
コード例 #2
0
ファイル: Data.php プロジェクト: BozzaCoon/SPHERE-Framework
 /**
  * @param TblPerson $tblPerson
  *
  * @return TblDebtor[]|bool
  */
 public function entityDebtorAllByPerson(TblPerson $tblPerson)
 {
     $EntityList = $this->Connection->getEntityManager()->getEntity('TblDebtor')->findBy(array(TblDebtor::ATTR_SERVICE_MANAGEMENT_PERSON => $tblPerson->getId()));
     return null === $EntityList ? false : $EntityList;
 }
コード例 #3
0
 /**
  * @param null|TblPerson $ServiceManagementPerson
  */
 public function setServiceManagementPerson(TblPerson $ServiceManagementPerson)
 {
     $this->ServiceManagementPerson = null === $ServiceManagementPerson ? null : $ServiceManagementPerson->getId();
     //todo
 }
コード例 #4
0
 /**
  * @param TblPerson $tblPerson
  */
 public function setServiceManagementPerson(TblPerson $tblPerson = null)
 {
     $this->serviceManagement_Person = null === $tblPerson ? null : $tblPerson->getId();
 }
コード例 #5
0
ファイル: Data.php プロジェクト: BozzaCoon/SPHERE-Framework
 /**
  * @param TblBasket $tblBasket
  * @param TblPerson $tblPerson
  *
  * @return TblBasketPerson
  */
 public function actionAddBasketPerson(TblBasket $tblBasket, TblPerson $tblPerson)
 {
     $Manager = $this->Connection->getEntityManager();
     $Entity = $Manager->getEntity('TblBasketPerson')->findOneBy(array(TblBasketPerson::ATTR_TBL_Basket => $tblBasket->getId(), TblBasketPerson::ATTR_SERVICE_MANAGEMENT_PERSON => $tblPerson->getId()));
     if (null === $Entity) {
         $Entity = new TblBasketPerson();
         $Entity->setTblBasket($tblBasket);
         $Entity->setServiceManagementPerson($tblPerson);
         $Manager->saveEntity($Entity);
         Protocol::useService()->createInsertEntry($this->Connection->getDatabase(), $Entity);
     }
     return $Entity;
 }