question: public void createCashBasedJournalEntriesAndReversalsForSavingsCharges ( final Office office , final String currencyCode , final CASH_ACCOUNTS_FOR_SAVINGS accountTypeToBeDebited , final CASH_ACCOUNTS_FOR_SAVINGS accountTypeToBeCredited , final Long savingsProductId , final Long paymentTypeId , final Long loanId , final String transactionId , final Date transactionDate , final BigDecimal totalAmount , final Boolean isReversal , final List < ChargePaymentDTO > chargePaymentDTOs ) { if ( chargePaymentDTOs . size ( ) != 1 ) { throw new PlatformDataIntegrityException ( "Recent Portfolio changes w.r.t Charges for Savings have Broken the accounting code" , "Recent Portfolio changes w.r.t Charges for Savings have Broken the accounting code" ) ; } ChargePaymentDTO chargePaymentDTO = chargePaymentDTOs . get ( 0 ) ; final GLAccount chargeSpecificAccount = getLinkedGLAccountForSavingsCharges ( savingsProductId , accountTypeToBeCredited . getValue ( ) , chargePaymentDTO . getChargeId ( ) ) ; final GLAccount savingsControlAccount = getLinkedGLAccountForSavingsProduct ( savingsProductId , accountTypeToBeDebited . getValue ( ) , paymentTypeId ) ; if ( isReversal ) { createDebitJournalEntryForSavings ( office , currencyCode , chargeSpecificAccount , loanId , transactionId , transactionDate , totalAmount ) ; createCreditJournalEntryForSavings ( office , currencyCode , savingsControlAccount , loanId , transactionId , transactionDate , totalAmount ) ; } else { createDebitJournalEntryForSavings ( office , currencyCode , savingsControlAccount , loanId , transactionId , transactionDate , totalAmount ) ; createCreditJournalEntryForSavings ( office , currencyCode , chargeSpecificAccount , loanId , transactionId , transactionDate , totalAmount ) ; } }
target:  Convenience method that creates a pair of related Debits and Credits for Cash Based accounting. The target accounts for debits and credits are switched in case of a reversal