/**
  * Get recipient client user id
  *
  * @return int
  */
 public function getClientUserId()
 {
     /*$prefix = $this->isPrimary ? 'primary_' : 'secondary_';
     
             return $prefix . $this->owner->getId();*/
     return $this->isPrimary ? $this->owner->getId() : null;
 }
Ejemplo n.º 2
0
 /**
  * Is client account owner has complete signature
  *
  * @param AccountOwnerInterface $accountOwner
  * @param DocumentSignature $signature
  * @return bool
  * @throws \RuntimeException
  */
 public function isOwnerSignatureCompleted(AccountOwnerInterface $accountOwner, DocumentSignature $signature)
 {
     $criteria = array('documentSignature' => $signature);
     $owner = $accountOwner->getObjectToSave();
     if ($accountOwner->getType() === ClientAccountOwner::OWNER_TYPE_SELF) {
         $criteria['clientOwner'] = $owner;
     } else {
         $criteria['contactOwner'] = $owner;
     }
     $ownerSignature = $this->ownerSignatureRepository->findOneBy($criteria);
     if (!$ownerSignature) {
         throw new \RuntimeException('Owner document signature does not exist.');
     }
     return $ownerSignature->isCompleted();
 }
 private function getOwnerInformationTabs(AccountOwnerInterface $owner, $isJoint = false)
 {
     $prefix = '';
     if ($isJoint) {
         $prefix = 'joint_';
     }
     $tabs = array();
     $fullName = new TextTab();
     $fullName->setTabLabel($prefix . 'full_name')->setValue($owner->getFullName());
     $tabs[] = $fullName;
     $ssn = new TextTab();
     $ssn->setTabLabel($prefix . 'ssn')->setValue($owner->getSsnTin());
     $tabs[] = $ssn;
     $dob = new TextTab();
     $dob->setTabLabel($prefix . 'dob')->setValue($owner->getBirthDate()->format('m-d-Y'));
     $tabs[] = $dob;
     $homeStreet = new TextTab();
     $homeStreet->setTabLabel($prefix . 'home_address_street')->setValue($owner->getStreet());
     $tabs[] = $homeStreet;
     $homeCity = new TextTab();
     $homeCity->setTabLabel($prefix . 'home_address_city')->setValue($owner->getCity());
     $tabs[] = $homeCity;
     $homeState = new TextTab();
     $homeState->setTabLabel($prefix . 'home_address_state')->setValue($owner->getState() ? $owner->getState()->getName() : '');
     $tabs[] = $homeState;
     $homeZip = new TextTab();
     $homeZip->setTabLabel($prefix . 'home_address_zip')->setValue($owner->getZip());
     $tabs[] = $homeZip;
     $primaryPhone = new TextTab();
     $primaryPhone->setTabLabel($prefix . 'primary_phone_number')->setValue($owner->getPhoneNumber());
     $tabs[] = $primaryPhone;
     $emailAddress = new TextTab();
     $emailAddress->setTabLabel($prefix . 'email_address')->setValue($owner->getEmail());
     $tabs[] = $emailAddress;
     // If is different mailing address
     if ($owner->getIsDifferentAddress()) {
         $mailingStreet = new TextTab();
         $mailingStreet->setTabLabel($prefix . 'mailing_address_street')->setValue($owner->getMailingStreet());
         $tabs[] = $mailingStreet;
         $mailingCity = new TextTab();
         $mailingCity->setTabLabel($prefix . 'mailing_address_city')->setValue($owner->getMailingCity());
         $tabs[] = $mailingCity;
         $mailingState = new TextTab();
         $mailingState->setTabLabel($prefix . 'mailing_address_state')->setValue($owner->getMailingState() ? $owner->getMailingState()->getName() : '');
         $tabs[] = $mailingState;
         $mailingZip = new TextTab();
         $mailingZip->setTabLabel($prefix . 'mailing_address_zip')->setValue($owner->getMailingZip());
         $tabs[] = $mailingZip;
     }
     // Check employment type
     $employmentType = $owner->getEmploymentType();
     if ($employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_RETIRED || $employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_UNEMPLOYED) {
         $employmentStatus = new RadioGroupTab();
         $employmentStatus->setGroupName($prefix . 'employment_status')->setValue(strtolower($employmentType))->setSelected(true);
         $tabs[] = $employmentStatus;
         $incomeSource = new TextTab();
         $incomeSource->setTabLabel($prefix . 'source_of_income')->setValue($owner->getIncomeSource());
         $tabs[] = $incomeSource;
     } elseif ($employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_EMPLOYED || $employmentType === Profile::CLIENT_EMPLOYMENT_TYPE_SELF_EMPLOYED) {
         $employerName = new TextTab();
         $employerName->setTabLabel($prefix . 'employer_name')->setValue($owner->getEmployerName());
         $tabs[] = $employerName;
         $occupation = new TextTab();
         $occupation->setTabLabel($prefix . 'occupation')->setValue($owner->getOccupation());
         $tabs[] = $occupation;
         $businessType = new TextTab();
         $businessType->setTabLabel($prefix . 'type_of_business')->setValue($owner->getBusinessType());
         $tabs[] = $businessType;
         $employerStreet = new TextTab();
         $employerStreet->setTabLabel($prefix . 'employer_address_street')->setValue($owner->getEmployerAddress());
         $tabs[] = $employerStreet;
         $employerCity = new TextTab();
         $employerCity->setTabLabel($prefix . 'employer_address_city')->setValue($owner->getEmploymentCity());
         $tabs[] = $employerCity;
         $employerState = new TextTab();
         $employerState->setTabLabel($prefix . 'employer_address_state')->setValue($owner->getEmploymentState() ? $owner->getEmploymentState()->getName() : '');
         $tabs[] = $employerState;
         $employerZip = new TextTab();
         $employerZip->setTabLabel($prefix . 'employer_address_zip')->setValue($owner->getEmploymentZip());
         $tabs[] = $employerZip;
     }
     $isUsCitizen = new RadioGroupTab();
     $isUsCitizen->setGroupName($prefix . 'is_us_citizen')->setValue('yes')->setSelected(true);
     $tabs[] = $isUsCitizen;
     if ($owner->getIsSeniorPoliticalFigure()) {
         $isSeniorPoliticalFigure = new CheckboxTab();
         $isSeniorPoliticalFigure->setTabLabel($prefix . 'is_senior_political_figure')->setSelected(true);
         $fields = $owner->getSeniorSpfName() . ', ' . $owner->getSeniorPoliticalTitle() . ', ' . $owner->getSeniorAccountOwnerRelationship() . ', ' . $owner->getSeniorCountryOffice();
         $spfFields = new TextTab();
         $spfFields->setTabLabel($prefix . 'spf_fields')->setValue($fields);
         $tabs[] = $isSeniorPoliticalFigure;
         $tabs[] = $spfFields;
     }
     return $tabs;
 }
Ejemplo n.º 4
0
 public function sendDocusignJointAccountOwnerEmail(AccountOwnerInterface $jointOwner, User $ria)
 {
     $template = $this->parameters['template']['docusign_joint_account_owner'];
     $fromEmail = $this->parameters['from_email']['docusign_joint_account_owner'];
     $context = array('joint_owner' => $jointOwner, 'ria' => $ria, 'logo' => $this->getRiaLogo($ria->getId()));
     $this->sendMessage($template, $fromEmail, $jointOwner->getEmail(), $context);
 }