Add empty string checks for GL and account codes

Updated validation in TransactionService to throw exceptions if GL or account codes are null or empty, ensuring more robust input validation for GL-to-GL and account-to-account transactions.
dev-pending-01-02-2026
Naeem Ullah 1 week ago
parent 25fd316087
commit 8a21307b27

@ -108,7 +108,7 @@ public class TransactionService {
String drLocation = gLtoGLRequest.getDebitGl().getPlcLocacode();
String crLocation = gLtoGLRequest.getCreditGl().getPlcLocacode();
if(crGL == null || drGL == null) {
if (crGL == null || crGL.isEmpty() || drGL == null || drGL.isEmpty()) {
throw new MissingGLCodeException(gLtoGLRequest.getPorOrgacode());
}
@ -160,7 +160,7 @@ public class TransactionService {
String crAcc = accountToAccountDTO.getCreditAcc().getMbmBkmsnumber();
String drAcc = accountToAccountDTO.getDebitAcc().getMbmBkmsnumber();
if(crAcc == null || drAcc == null) {
if (crAcc == null || crAcc.isEmpty() || drAcc == null || drAcc.isEmpty()) {
throw new MissingAccountException(accountToAccountDTO.getPorOrgacode());
}

Loading…
Cancel
Save