Skip to content

Commit

Permalink
hotfix exclusão de parcela
Browse files Browse the repository at this point in the history
  • Loading branch information
Brunobento1990 committed Nov 3, 2024
1 parent 9379a05 commit 30e7ffd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OpenAdm.Application/Services/ParcelaService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ public async Task<bool> ExcluirAsync(Guid id)
var parcela = await _faturaContasAReceberRepository.GetByIdAsync(id)
?? throw new ExceptionApi("Não foi possível localizar a parcela");

if (!string.IsNullOrWhiteSpace(parcela.IdExterno))
{
throw new ExceptionApi("Não é possível excluir uma parcela com integração com o mercado pago!");
}

await _faturaContasAReceberRepository.DeleteAsync(parcela);

return true;
Expand Down

0 comments on commit 30e7ffd

Please sign in to comment.