|
|
|
|
@ -110,13 +110,16 @@ public class TransactionService {
|
|
|
|
|
String crGL = gLtoGLRequest.getCreditGl().getPcaGlaccode();
|
|
|
|
|
String drGL = gLtoGLRequest.getDebitGl().getPcaGlaccode();
|
|
|
|
|
|
|
|
|
|
String drLocation = gLtoGLRequest.getDebitGl().getPlcLocacode();
|
|
|
|
|
String crLocation = gLtoGLRequest.getCreditGl().getPlcLocacode();
|
|
|
|
|
|
|
|
|
|
if(crGL == null || drGL == null) {
|
|
|
|
|
return ResponseEntity
|
|
|
|
|
.badRequest()
|
|
|
|
|
.body("Credit and Debit GL codes are required");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(crGL.equals(drGL)) {
|
|
|
|
|
if(crGL.equals(drGL) && drLocation.equals(crLocation)) {
|
|
|
|
|
return ResponseEntity
|
|
|
|
|
.badRequest()
|
|
|
|
|
.body("Credit and Debit GL codes cannot be same");
|
|
|
|
|
|