public function filterRow(Gpf_Data_Row $row) { if ($row->get('commType') == Pap_Common_Constants::TYPE_SALE) { $row->set('actionName', $this->_('per Sale')); } if ($row->get(self::KEY_COLUMN_ID) == null) { $row->set(self::KEY_COLUMN_ID, "NEW_".$row->get('commTypeId')); } return $row; }
public function filterRow(Gpf_Data_Row $row) { $row->set('valid_from', $this->createDateTime($row->get('valid_from'))->toLocaleDate()); $row->set('valid_to', $this->createDateTime($row->get('valid_to'))->toLocaleDate()); $this->replaceConstants($row); if (!$row->get('validity')) { $this->decreaseCount++; return null; } return $row; }
public function filterRow(Gpf_Data_Row $row) { if ($row->get('name') != null) { $row->set('name', $this->_localize($row->get('name'))); } if ($row->get('description') != null) { $row->set('description', $this->_localize($row->get('description'))); } return $row; }
private function createObject(Gpf_Data_Row $row, $headers) { $object = new stdClass(); $object->data = new stdClass(); $object->data->code = $row->get('code'); $object->items = array(); foreach ($headers as $header) { $object->data->{$header} = $row->get($header); } return $object; }
public function filterRow(Gpf_Data_Row $row) { $row->add('commissionsexist', Gpf::NO); if ($this->commissionsTable->findCampaignInCommExistsRecords($row->get("id"), $this->commissions)) { $row->set('commissionsexist', Gpf::YES); } $row->add('commissionsdetails', $this->commissionsTable->getCommissionsDescription($row->get("id"), $this->commissions, $this->getCommissionGroupId($row))); $row->set('name', $this->_localize($row->get('name'))); return parent::filterRow($row); }
public function filterRow(Gpf_Data_Row $row) { if ($row->get('type') == Gpf_Lang_Parser_Translation::TYPE_METADATA) { return null; } $search = $this->filters->getFilter('search'); if (sizeof($search) == 1) { $searchString = $search[0]->getValue(); if (strpos($row->get('source'), $searchString) === false && strpos($row->get('translation'), $searchString) === false) { return null; } } return parent::filterRow($row); }
/** * @param $row * @return DataRow or null */ public function filterRow(Gpf_Data_Row $row) { if ($row->get(Gpf_Db_Table_ActiveViews::ACTIVEVIEWID) == Gpf_View_ViewService::DEFAULT_VIEW_ID) { $row->set(Gpf_Db_Table_Views::NAME, Gpf_View_ViewService::DEFAULT_VIEW_NAME); } return $row; }
public function addData(Gpf_Data_Row $record) { $this->lastRecord = $this->data->createRecord(); $this->lastRecord->set(self::WIDGET_ID, $this->id++ . ""); foreach ($this->lastRecord as $name => $value) { if ($name == self::WIDGET_ID) { continue; } if ($this->lastRecord->contains($name)) { $this->lastRecord->set($name, $record->get($name) . ""); } } $this->data->addRecord($this->lastRecord); }
public function filterRow(Gpf_Data_Row $row) { $row->set('campaign', $this->_localize($row->get('campaign'))); return $row; }
/** * @param $row * @return DataRow or null */ public function filterRow(Gpf_Data_Row $row) { $row->set(self::COLUMN_RECURRENCE_NAME, $this->_localize($row->get(self::COLUMN_RECURRENCE_NAME))); return $row; }
private function processValues(Gpf_Data_Row $row) { $this->approvedCommissions += $row->get(Pap_Db_Table_Transactions::COMMISSION); $this->pendingCommissions += $row->get('pendingAmount'); $this->declinedCommissions += $row->get('declinedAmount'); if (!$row->contains('amounttopay')) { $row->add('amounttopay', $row->get(Pap_Db_Table_Transactions::COMMISSION)); } $this->amountToPay += $row->get('amounttopay'); $row->set(Pap_Db_Table_Transactions::COMMISSION, $this->round($row->get(Pap_Db_Table_Transactions::COMMISSION))); $row->set('pendingAmount', $this->round($row->get('pendingAmount'))); $row->set('declinedAmount', $this->round($row->get('declinedAmount'))); $row->set('amounttopay', $this->round($row->get('amounttopay'))); }
public function filterRow(Gpf_Data_Row $row) { if ($row->get('comtype') == Pap_Common_Constants::TYPE_SALE) { $row->set('comtypeName', $this->_('per Sale')); } return $row; }
private function setCommissionGroupId(Gpf_Data_Row $row) { if (!is_null(($commissionGroupId = $this->commissionsGroupTable->getUserCommissionGroup($row->get(Pap_Db_Table_Campaigns::ID), $this->getUserID())))) { $row->set('commissiongroupid', $commissionGroupId); return; } try { $row->set('commissiongroupid', $this->commissionsTable->getDefaultCommissionGroup($row->get(Pap_Db_Table_Campaigns::ID))); } catch (Gpf_DbEngine_NoRowException $e) { } }
public function filterRow(Gpf_Data_Row $row) { $row->add('isdefault', Gpf::NO); if ($row->get('id') == Gpf_Settings::get(Pap_Settings::DEFAULT_MERCHANT_ID)) { $row->set('isdefault', Gpf::YES); } return $row; }
public function load(Gpf_Data_Row $row) { foreach ($row as $columnName => $columnValue) { $this->setField($columnName, $row->get($columnName)); } }
/** * @param Gpf_Data_Row $row */ private function addVATData(Gpf_Data_Row $row) { try { $user = new Pap_Common_User(); $user->setId($row->get('userid')); $user->load(); } catch (Gpf_Exception $e) { $row->add('vat', $this->_('N/A')); $row->add('amounttopay', $this->_('N/A')); return; } $currency = Pap_Common_Utils_CurrencyUtils::getDefaultCurrency(); $payout = new Pap_Common_Payout($user, $currency, $row->get(Pap_Db_Table_Transactions::COMMISSION), null); if (!$payout->getApplyVat()) { $row->add('vat', $this->_('N/A')); $row->add('amounttopay', $row->get(Pap_Db_Table_Transactions::COMMISSION)); return; } $row->add('vat', $payout->getVatPercentage() . ' %'); $row->add('amounttopay', $payout->getAmountWithVat()); }
/** * @param $row * @return DataRow or null */ public function filterRow(Gpf_Data_Row $row) { if ($this->isColumnRequired('psales') || $this->isColumnRequired('pcommissions')) { $row->add('psales', $this->computePercentageValue($row->get('salesCount'), $this->subAffSaleCount)); $row->add('pcommissions', $this->computePercentageValue($row->get('commissions'), $this->subAffCommissions)); } return $row; }
public function filterRow(Gpf_Data_Row $row) { $row->set(Pap_Db_Table_Campaigns::NAME, $this->_localize($row->get(Pap_Db_Table_Campaigns::NAME))); return $row; }
/** * @param $row * @return DataRow or null */ public function filterRow(Gpf_Data_Row $row) { $row->set(Pap_Db_Table_Transactions::R_STATUS, Pap_Common_Constants::getStatusAsText($row->get(Pap_Db_Table_Transactions::R_STATUS))); $row->set(Pap_Db_Table_Transactions::PAYOUT_STATUS, Pap_Common_Constants::getPayoutStatusAsText($row->get(Pap_Db_Table_Transactions::PAYOUT_STATUS))); $row->set(Pap_Db_Table_Transactions::R_TYPE, Pap_Common_Constants::getTypeAsText($row->get(Pap_Db_Table_Transactions::R_TYPE))); return $row; }