private function getNameFrom($dataType, Pap_Db_CommissionType $commissionType, $campaignName) { switch ($dataType) { case Pap_Stats_Computer_Graph_Transactions::COUNT: return $this->_('Number of %s', $commissionType->getName() . ' (' . $campaignName . ')'); case Pap_Stats_Computer_Graph_Transactions::COMMISSION: return $this->_('Commission of %s', $commissionType->getName()); case Pap_Stats_Computer_Graph_Transactions::TOTALCOST: return $this->_('Revenue of %s', $commissionType->getName()); } return $this->_('Unknown'); }
public function loadCommissionType(Pap_Db_CommissionType $commissionType) { $this->setField("Id", $commissionType->getId()); $this->setField(Pap_Db_Table_CommissionTypes::TYPE, $commissionType->getType()); $this->setField(Pap_Db_Table_CommissionTypes::NAME, $commissionType->getName()); $this->setField(Pap_Db_Table_CommissionTypes::CODE, $commissionType->getCode()); $this->setField(Pap_Db_Table_CommissionTypes::STATUS, $commissionType->getStatus()); $this->setField(Pap_Db_Table_CommissionTypes::APPROVAL, $commissionType->getApproval()); $this->setField(Pap_Db_Table_CommissionTypes::RECURRENCEPRESETID, $commissionType->getRecurrencePresetId()); $this->setField(Pap_Db_Table_CommissionTypes::ZEROORDERSCOMMISSION, $commissionType->getZeroOrdersCommissions()); $this->setField(Pap_Db_Table_CommissionTypes::SAVEZEROCOMMISSION, $commissionType->getSaveZeroCommissions()); $this->setField(Pap_Db_Table_CommissionTypes::FIXEDCOSTTYPE, $commissionType->getFixedcostType()); $this->setField(Pap_Db_Table_CommissionTypes::FIXEDCOSTVALUE, $commissionType->getFixedcostValue()); }
private function getNameFrom(Pap_Db_CommissionType $commissionType, $tier) { return $this->_('Tier %s - %s', $tier, $commissionType->getName()); }
protected function getActionName($type, $id) { if ($type != Pap_Common_Constants::TYPE_ACTION) { return $this->_('Sale'); } else { $commType = new Pap_Db_CommissionType(); $commType->setId($id); $commType->load(); return $commType->getName(); } }