Esempio n. 1
0
 function load(ObjectManager $manager)
 {
     /** @var BillingSpec $tierSpec */
     $tierSpec = $this->getReference('ria-tier-spec');
     foreach ($this->data as $feeData) {
         $fee = new Fee();
         $fee->setFeeWithoutRetirement($feeData['fee_without_retirement'])->setBillingSpec($tierSpec)->setTierTop($feeData['tier_top']);
         $tierSpec->addFee($fee);
         $manager->persist($fee);
     }
     /** @var BillingSpec $tierSpec */
     $tierSpec = $this->getReference('wealthbot-ria-tier-spec');
     foreach ($this->data as $feeData) {
         $fee = new Fee();
         $fee->setFeeWithoutRetirement($feeData['fee_without_retirement'])->setTierTop($feeData['tier_top']);
         $tierSpec->addFee($fee);
         $manager->persist($fee);
     }
     /** @var BillingSpec $flatSpec */
     $flatSpec = $this->getReference('wealthbot-ria-flat-spec');
     $fee = new Fee();
     $fee->setFeeWithoutRetirement(300);
     $fee->setTierTop($this->maxTier);
     $flatSpec->addFee($fee);
     $manager->persist($fee);
     $manager->flush();
 }
 protected function createAdminBillingSpec($name)
 {
     $fee = new Fee();
     $fee->setFeeWithoutRetirement(500);
     $spec = new BillingSpec();
     $spec->setMaster(true);
     $spec->setMinimalFee(300);
     $spec->setName($name);
     $spec->setOwner(null);
     $spec->setType(BillingSpec::TYPE_FLAT);
     $spec->setFees(array($fee));
     $fee->setBillingSpec($spec);
     $this->em->persist($spec);
     $this->em->persist($fee);
     return $spec;
 }
Esempio n. 3
0
 private function createAdminFees(ObjectManager $manager, User $adminUser)
 {
     $fees = array(array('fee_with_retirement' => 0.004, 'fee_without_retirement' => 0.0025, 'tier_top' => Fee::INFINITY));
     $adminBillingSpec = new BillingSpec();
     $adminBillingSpec->setName('Admin Billing Spec for new RIA');
     $adminBillingSpec->setMinimalFee(0);
     $adminBillingSpec->setType(BillingSpec::TYPE_TIER);
     $adminBillingSpec->setMaster(true);
     $adminBillingSpec->setOwner(null);
     foreach ($fees as $feeRow) {
         $fee = new Fee();
         $fee->setFeeWithRetirement($feeRow['fee_with_retirement']);
         $fee->setFeeWithoutRetirement($feeRow['fee_without_retirement']);
         $fee->setTierTop($feeRow['tier_top']);
         $adminBillingSpec->addFee($fee);
     }
     $manager->persist($adminBillingSpec);
 }
Esempio n. 4
0
 public function returnAdminFees()
 {
     $a = new ArrayCollection();
     foreach ($this->adminFeeData as $feeData) {
         $fee = new Fee();
         $fee->setTierTop($feeData['top_tier']);
         $fee->setFeeWithoutRetirement($feeData['fee_without_retirement']);
         $a->add($fee);
     }
     return $a;
 }
Esempio n. 5
0
 /**
  * Init Default Admin fee for License Fee Relationship
  *
  * @return Fee
  */
 public function initDefaultAdminLicenseFee()
 {
     $fee = new Fee();
     $fee->setFeeWithRetirement(0.0);
     $fee->setFeeWithoutRetirement(0.0);
     $fee->setTierTop(Fee::INFINITY);
     return $fee;
 }