コード例 #1
0
 public function InsertChequeForRejectedCheque(Gyuser_Model_Cheques $obj)
 {
     list($Day, $Month, $Year) = explode('/', $obj->getDate());
     $stampeddate = mktime(12, 0, 0, $Month, $Day, $Year);
     $date = date("Y-m-d", $stampeddate);
     $data = array('operation_id' => $obj->getOperation_id(), 'client_id' => $obj->getClient_id(), 'bank_account_id' => $obj->getRejected_bank_id(), 'date' => $date, 'check_n' => $obj->getCheck_n(), 'check_zip_code' => $obj->getCheck_zip_code(), 'amount' => $obj->getAmount(), 'status' => $obj->getStatus(), 'rejected_check_payment' => $obj->getRejected_check_payment(), 'rejected_bank_id' => $obj->getRejected_bank_id());
     $id = $this->getDbTable()->insert($data);
     if (!$id) {
         throw new Exception('Error inserting cheque for rejected cheque');
     }
     return $id;
 }