/** * Generate collection of tabs * * @return TabCollection */ public function generate() { $client = $this->account->getClient(); $ria = $client->getRia(); $companyInfo = $ria->getRiaCompanyInformation(); $primaryApplicant = $this->account->getPrimaryApplicant(); $tabs = array(); $advisorCode = new TextTab(); $advisorCode->setTabLabel('advisor#')->setValue($this->getAdvisorCode($companyInfo)); $tabs[] = $advisorCode; $accountNumber = new TextTab(); $accountNumber->setTabLabel('account#')->setValue($this->account->getAccountNumber()); $tabs[] = $accountNumber; $firmName = new TextTab(); $firmName->setTabLabel('firm_name')->setValue($companyInfo->getName()); $tabs[] = $firmName; $primaryContact = new TextTab(); $primaryContact->setTabLabel('primary_contact')->setValue($companyInfo->getPrimaryFirstName() . ' ' . $companyInfo->getPrimaryLastName()); $tabs[] = $primaryContact; $accountTypeTab = new RadioGroupTab(); $accountTypeTab->setGroupName('account_type')->setValue('cash')->setSelected(true); $tabs[] = $accountTypeTab; $ownerTabs = $this->getOwnerInformationTabs($primaryApplicant); $type = new RadioGroupTab(); $type->setGroupName('type')->setSelected(true); if ($this->account->isJointType()) { $type->setValue('joint'); } else { $type->setValue('individual'); } $tabs[] = $type; $tabs = array_merge($tabs, $ownerTabs); if ($this->account->isJointType()) { $jointOwnerTabs = $this->getOwnerInformationTabs($this->account->getSecondaryApplicant(), true); $tabs = array_merge($tabs, $jointOwnerTabs); } $cashSweepTab = new RadioGroupTab(); $cashSweepTab->setGroupName('cash_sweep_vehicle')->setValue('td_ameritrade_fdic')->setSelected(true); $tabs[] = $cashSweepTab; return new TabCollection($tabs); }
/** * Generate collection of tabs * * @return TabCollection */ public function generate() { $client = $this->account->getClient(); $companyInformation = $client->getRiaCompanyInformation(); $tabs = array(); $advisorCode = new TextTab(); $advisorCode->setTabLabel('advisor#')->setValue($this->getAdvisorCode($companyInformation)); $tabs[] = $advisorCode; $accountNumber = new TextTab(); $accountNumber->setTabLabel('account#')->setValue($this->account->getAccountNumber()); $tabs[] = $accountNumber; $accountOwner = $this->account->getPrimaryApplicant(); $transferInformation = $this->account->getTransferInformation(); $accountTitleTab = new TextTab(); $accountTitleTab->setTabLabel('account_title')->setValue($this->account->getTypeString()); $tabs[] = $accountTitleTab; $ssnTab = new TextTab(); $ssnTab->setTabLabel('ssn')->setValue($accountOwner->getSsnTin()); $tabs[] = $ssnTab; $accountType = $this->getAccountTypeTabValue(); $accountTypeTab = new RadioGroupTab(); $accountTypeTab->setGroupName('account_type')->setValue($accountType)->setSelected(true); $tabs[] = $accountTypeTab; // Information on the account transferring from $accountTitle = $transferInformation->getAccountTitle() . ' ' . $this->account->getTypeName(); $transferFromAccountTitleTab = new TextTab(); $transferFromAccountTitleTab->setTabLabel('transfer_from_account_title')->setValue($accountTitle); $tabs[] = $transferFromAccountTitleTab; $transferFromAccountNumberTab = new TextTab(); $transferFromAccountNumberTab->setTabLabel('transfer_from_account_number')->setValue($transferInformation->getAccountNumber()); $tabs[] = $transferFromAccountNumberTab; $transferFromFirmTab = new TextTab(); $transferFromFirmTab->setTabLabel('transfer_from_delivering_firm_name')->setValue($transferInformation->getFinancialInstitution()); $tabs[] = $transferFromFirmTab; $transferFromFirmAddressTab = new TextTab(); $transferFromFirmAddressTab->setTabLabel('transfer_from_firm_address')->setValue($transferInformation->getFirmAddress()); $tabs[] = $transferFromFirmAddressTab; $transferFromFirmPhoneTab = new TextTab(); $transferFromFirmPhoneTab->setTabLabel('transfer_from_phone_number')->setValue($transferInformation->getPhoneNumber()); $tabs[] = $transferFromFirmPhoneTab; $transferFromAccountTypeTab = new RadioGroupTab(); $transferFromAccountTypeTab->setGroupName('transfer_from_account_type')->setValue($accountType)->setSelected(true); $tabs[] = $transferFromAccountTypeTab; // -------------------------------------------- $brokerageFirmTransferTypeTab = new RadioGroupTab(); $brokerageFirmTransferTypeTab->setGroupName('brokerage_firm_transfer_type')->setValue('full')->setSelected(true); $tabs[] = $brokerageFirmTransferTypeTab; $bankTransferTypeTab = new RadioGroupTab(); $bankTransferTypeTab->setGroupName('bank_transfer_type')->setValue('full')->setSelected(true); $tabs[] = $bankTransferTypeTab; $depositCertificatesTab = new RadioGroupTab(); $depositCertificatesTab->setGroupName('deposit_certificates')->setValue('redeem_cd_immediately')->setSelected(true); $tabs[] = $depositCertificatesTab; $deliveringAccountTitle = $transferInformation->getDeliveringAccountTitle(); $ameritradeAccountTitle = $transferInformation->getAmeritradeAccountTitle(); if (strlen($deliveringAccountTitle) > 0) { $deliveringAccountTitleTab = new TextTab(); $deliveringAccountTitleTab->setTabLabel('delivering_account_title')->setValue($deliveringAccountTitle); $tabs[] = $deliveringAccountTitleTab; } if (strlen($ameritradeAccountTitle) > 0) { $ameritradeAccountTitleTab = new TextTab(); $ameritradeAccountTitleTab->setTabLabel('td_ameritrade_account_title')->setValue($ameritradeAccountTitle); $tabs[] = $ameritradeAccountTitleTab; } return new TabCollection($tabs); }