コード例 #1
0
 public function getApprovedCheckDetails($opId)
 {
     $table = $this->getDbTable();
     $select = $table->select();
     $select->from(array('c' => 'cheques'), array('id', 'date as cheque_date', 'check_n', 'amount', 'terceros_today_value', 'status', 'operation_id', 'provider_id', 'liquidacion_id', 'rejected_type'));
     $select->where('c.operation_id = ?', $opId);
     $select->where('c.status != ?', 8);
     $select->where('c.status != ?', 9);
     $resultSet = $this->getDbTable()->fetchAll($select);
     $entries = array();
     foreach ($resultSet as $row) {
         $entry = new Gyuser_Model_Cheques();
         $entry->setId($row->id);
         $entry->setOperation_id($row->operation_id);
         $entry->setDate(date("d/m/Y", strtotime($row->cheque_date)));
         $entry->setCheck_n($row->check_n);
         $entry->setAmount($row->amount);
         $entry->setStatus($row->status);
         $entry->setProvider_id($row->provider_id);
         $entry->setLiquidacion_id($row->liquidacion_id);
         $entry->setRejected_type($row->rejected_type);
         $entry->setTerceros_today_value($row->terceros_today_value);
         $entries[] = $entry;
     }
     return $entries;
 }