/**
  * 
  */
 public function deletar()
 {
     if (!$this->comprovantePagamento) {
         throw new Exception('Comprovante nao informado.');
     }
     $tbComprovantePagamentoxPlanilhaAprovacao = new ComprovantePagamentoxPlanilhaAprovacao();
     $tbComprovantePagamentoxPlanilhaAprovacao->delete(array('idComprovantePagamento = ?' => $this->comprovantePagamento));
     $vwAnexarComprovantes = new vwAnexarComprovantes();
     $vwAnexarComprovantes->excluirArquivo($this->comprovantePagamento);
     $tbComprovantePagamento = new ComprovantePagamento();
     $comprovantePagamentoRow = $tbComprovantePagamento->fetchRow(array('idComprovantePagamento = ?' => $this->comprovantePagamento));
     if ($comprovantePagamentoRow && $comprovantePagamentoRow->idFornecedorExterior) {
         $idfornecedorInvoice = $comprovantePagamentoRow->idFornecedorExterior;
     }
     $comprovantePagamentoRow->delete();
     if (isset($idfornecedorInvoice)) {
         $fornecedorInvoiceTable = new FornecedorInvoice();
         $fornecedorInvoiceTable->getAdapter()->getProfiler()->setEnabled(true);
         $fornecedorInvoiceTable->delete(array('idFornecedorExterior = ?' => $idfornecedorInvoice));
     }
 }