@ -60,6 +60,15 @@ public class TransactionService {
Double creditAmount = accountGLTransactionRequest . getCreditGl ( ) . getSgtGntramtfc ( ) ;
Double creditAmount = accountGLTransactionRequest . getCreditGl ( ) . getSgtGntramtfc ( ) ;
Double debitAmount = accountGLTransactionRequest . getDebitAcc ( ) . getSgtGntramtfc ( ) ;
Double debitAmount = accountGLTransactionRequest . getDebitAcc ( ) . getSgtGntramtfc ( ) ;
if ( accountGLTransactionRequest . getCreditGl ( ) . getPcaGlaccode ( ) = = null | | accountGLTransactionRequest . getCreditGl ( ) . getPcaGlaccode ( ) . isEmpty ( ) ) {
throw new MissingGLCodeException ( accountGLTransactionRequest . getPorOrgacode ( ) ) ;
}
if ( accountGLTransactionRequest . getDebitAcc ( ) . getMbmBkmsnumber ( ) = = null | | accountGLTransactionRequest . getDebitAcc ( ) . getMbmBkmsnumber ( ) . isEmpty ( ) ) {
throw new MissingAccountException ( accountGLTransactionRequest . getPorOrgacode ( ) ) ;
}
if ( creditAmount = = null | | debitAmount = = null ) {
if ( creditAmount = = null | | debitAmount = = null ) {
throw new MissingTransactionAmountException ( accountGLTransactionRequest . getPorOrgacode ( ) ) ;
throw new MissingTransactionAmountException ( accountGLTransactionRequest . getPorOrgacode ( ) ) ;
}
}
@ -211,6 +220,14 @@ public class TransactionService {
BigDecimal creditAmount = glToAccountDTO . getCreditAcc ( ) . getSgtGntramtfc ( ) ;
BigDecimal creditAmount = glToAccountDTO . getCreditAcc ( ) . getSgtGntramtfc ( ) ;
BigDecimal debitAmount = glToAccountDTO . getDebitGl ( ) . getSgtGntramtfc ( ) ;
BigDecimal debitAmount = glToAccountDTO . getDebitGl ( ) . getSgtGntramtfc ( ) ;
if ( glToAccountDTO . getDebitGl ( ) . getPcaGlaccode ( ) = = null | | glToAccountDTO . getDebitGl ( ) . getPcaGlaccode ( ) . isEmpty ( ) ) {
throw new MissingGLCodeException ( glToAccountDTO . getPorOrgacode ( ) ) ;
}
if ( glToAccountDTO . getCreditAcc ( ) . getMbmBkmsnumber ( ) = = null | | glToAccountDTO . getCreditAcc ( ) . getMbmBkmsnumber ( ) . isEmpty ( ) ) {
throw new MissingAccountException ( glToAccountDTO . getPorOrgacode ( ) ) ;
}
if ( ! creditAmount . equals ( debitAmount ) ) {
if ( ! creditAmount . equals ( debitAmount ) ) {
throw new TransactionAmountException ( glToAccountDTO . getPorOrgacode ( ) ) ;
throw new TransactionAmountException ( glToAccountDTO . getPorOrgacode ( ) ) ;
}
}