/** * Pobiera obiekt Logic_Interest z bezpośrednio przekazanymi danymi. Obiekt nie jest powiązany z żadną konkretną negocjacją. * @param $customerTypeId * @param $brandId * @param $engagement * @param $amount * @param $duration * @param $newMoney * @param $counterOfferNo * @param null|float $expectance * @return Logic_Interest */ public static function getForDebug($customerTypeId, $brandId, $engagement, $amount, $duration, $newMoney, $counterOfferNo, $expectance = null) { $interest = new self(); $interest->customerTypeId = $customerTypeId; $interest->brandId = $brandId; $interest->customer = new Logic_Customer_Mock($engagement); $interest->depositAmount = $amount; $filter = new Zend_Filter_Int(); if (strpos($duration, 'M') !== false) { $months = $filter->filter($duration); $interest->depositDays = $months % 12 * 30 + ($months - $months % 12) / 12 * 365; } elseif (strpos($duration, 'D') !== false) { $interest->depositDays = $filter->filter($duration); } elseif (strpos($duration, 'Y') !== false) { $interest->depositDays = $filter->filter($duration) * 365; } $interest->newMoney = $newMoney; $interest->counterOfferNo = $counterOfferNo; $interest->customerExpectance = $expectance; $interest->_baseValue = 0.0; $interest->depInit(); return $interest; }