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 recognizeStatus(Pap_Db_CommissionType $commissionType) { if($commissionType->getApproval() == Pap_Db_CommissionType::APPROVAL_AUTOMATIC) { return Pap_Common_Constants::STATUS_APPROVED; } return Pap_Common_Constants::STATUS_PENDING; }
public function setStatusFromType(Pap_Db_CommissionType $commissionType) { if($commissionType->getApproval() == Pap_Db_CommissionType::APPROVAL_AUTOMATIC) { $this->setStatus(Pap_Common_Constants::STATUS_APPROVED); return; } $this->setStatus(Pap_Common_Constants::STATUS_PENDING); }