add saldo IRS
This commit is contained in:
@@ -50,4 +50,22 @@ export class CoaService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async findByName(name: string) {
|
||||
try {
|
||||
return await this.coaRepository.findOneOrFail({ name: name });
|
||||
} catch (e) {
|
||||
if (e instanceof EntityNotFoundError) {
|
||||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
error: 'COA Data not found',
|
||||
},
|
||||
HttpStatus.NOT_FOUND,
|
||||
);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user