Exemple #1
0
 /**
  * Check if report with same account and report date already fetched
  *
  * @param Mage_Paypal_Model_Report_Settlement $report
  * @param string $accountId
  * @param string $reportDate
  * @return bool
  */
 public function loadByAccountAndDate(Mage_Paypal_Model_Report_Settlement $report, $accountId, $reportDate)
 {
     $select = $this->_getReadAdapter()->select()->from($this->getMainTable())->where('account_id=?', $accountId)->where('report_date=?', $reportDate);
     if ($data = $this->_getReadAdapter()->fetchRow($select)) {
         $report->addData($data);
     }
     return $this;
 }
Exemple #2
0
 /**
  * Check if report with same account and report date already fetched
  *
  * @param Mage_Paypal_Model_Report_Settlement $report
  * @param string $accountId
  * @param string $reportDate
  * @return Mage_Paypal_Model_Resource_Report_Settlement
  */
 public function loadByAccountAndDate(Mage_Paypal_Model_Report_Settlement $report, $accountId, $reportDate)
 {
     $adapter = $this->_getReadAdapter();
     $select = $adapter->select()->from($this->getMainTable())->where('account_id = :account_id')->where('report_date = :report_date');
     $data = $adapter->fetchRow($select, array(':account_id' => $accountId, ':report_date' => $reportDate));
     if ($data) {
         $report->addData($data);
     }
     return $this;
 }