Class AccountingProcessorHelper

java.lang.Object
org.apache.fineract.accounting.journalentry.service.AccountingProcessorHelper

public class AccountingProcessorHelper extends Object
  • Field Details

  • Constructor Details

    • AccountingProcessorHelper

      public AccountingProcessorHelper()
  • Method Details

    • populateLoanDtoFromDTO

      public LoanDTO populateLoanDtoFromDTO(org.apache.fineract.portfolio.loanaccount.data.AccountingBridgeDataDTO accountingBridgeData)
    • getChargeOffMappingByCodeValue

      public org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping getChargeOffMappingByCodeValue(Long loanProductId, org.apache.fineract.portfolio.PortfolioProductType productType, Long chargeOffReasonId)
    • getClassificationMappingByCodeValue

      public org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping getClassificationMappingByCodeValue(Long loanProductId, org.apache.fineract.portfolio.PortfolioProductType productType, Long classificationId, String classificationType)
    • populateSavingsDtoFromMap

      public SavingsDTO populateSavingsDtoFromMap(Map<String,Object> accountingBridgeData, boolean cashBasedAccountingEnabled, boolean accrualBasedAccountingEnabled)
    • populateSharesDtoFromMap

      public SharesDTO populateSharesDtoFromMap(Map<String,Object> accountingBridgeData, boolean cashBasedAccountingEnabled, boolean accrualBasedAccountingEnabled)
    • populateClientTransactionDtoFromMap

      public ClientTransactionDTO populateClientTransactionDtoFromMap(Map<String,Object> accountingBridgeData)
    • createJournalEntriesForLoanCharges

      public void createJournalEntriesForLoanCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeDebited, Integer accountTypeToBeCredited, Long loanProductId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, List<ChargePaymentDTO> chargePaymentDTOs)
      Convenience method that creates a pair of related Debits and Credits for Accrual Based accounting. The target accounts for debits and credits are switched in case of a reversal
      Parameters:
      office - office
      currencyCode - currencyCode
      accountTypeToBeDebited - Enum of the placeholder GLAccount to be debited
      accountTypeToBeCredited - Enum of the placeholder of the GLAccount to be credited
      loanProductId - loanProductId
      loanId - loanId
      transactionId - transactionId
      transactionDate - transactionDate
      totalAmount - totalAmount
      chargePaymentDTOs - chargePaymentDTOs
    • createCashBasedJournalEntriesAndReversalsForSavings

      public void createCashBasedJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeDebited, Integer accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
      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
      Parameters:
      office -
      accountTypeToBeDebited - Enum of the placeholder GLAccount to be debited
      accountTypeToBeCredited - Enum of the placeholder of the GLAccount to be credited
      savingsProductId -
      paymentTypeId -
      loanId -
      transactionId -
      transactionDate -
      amount -
      isReversal -
    • createJournalEntriesForLoan

      public void createJournalEntriesForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeDebited, Integer accountTypeToBeCredited, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
      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
      Parameters:
      office -
      accountTypeToBeDebited - Enum of the placeholder GLAccount to be debited
      accountTypeToBeCredited - Enum of the placeholder of the GLAccount to be credited
      loanProductId -
      paymentTypeId -
      loanId -
      transactionId -
      transactionDate -
      amount -
    • createJournalEntriesForLoan

      public void createJournalEntriesForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeDebited, org.apache.fineract.accounting.glaccount.domain.GLAccount accountToBeCredited, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createSplitJournalEntriesForLoan

      public void createSplitJournalEntriesForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, List<org.apache.fineract.accounting.journalentry.service.JournalAmountHolder> splitAccountsHolder, org.apache.fineract.accounting.journalentry.service.JournalAmountHolder totalAccountHolder, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate)
    • createCreditJournalEntryForLoan

      public void createCreditJournalEntryForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForLoan accountMappingType, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createCreditJournalEntryForLoan

      public void createCreditJournalEntryForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan accountMappingType, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • checkForBranchClosures

      public void checkForBranchClosures(org.apache.fineract.accounting.closure.domain.GLClosure latestGLClosure, LocalDate transactionDate)
      Parameters:
      latestGLClosure -
      transactionDate -
    • getLatestClosureByBranch

      public org.apache.fineract.accounting.closure.domain.GLClosure getLatestClosureByBranch(long officeId)
    • createCashBasedJournalEntriesAndReversalsForSavingsTax

      public void createCashBasedJournalEntriesAndReversalsForSavingsTax(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForSavings accountTypeToBeDebited, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForSavings accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal, List<TaxPaymentDTO> taxDetails)
      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
      Parameters:
      office -
      currencyCode -
      accountTypeToBeDebited - Enum of the placeholder GLAccount to be debited
      accountTypeToBeCredited - Enum of the placeholder of the GLAccount to be credited
      savingsProductId -
      paymentTypeId -
      savingsId -
      transactionId -
      transactionDate -
      amount -
      isReversal -
      taxDetails -
    • createAccrualBasedJournalEntriesAndReversalsForSavingsTax

      public void createAccrualBasedJournalEntriesAndReversalsForSavingsTax(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings accountTypeToBeDebited, org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal, List<TaxPaymentDTO> taxDetails)
    • createCashBasedDebitJournalEntriesAndReversalsForSavings

      public void createCashBasedDebitJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeDebited, Long savingsProductId, Long paymentTypeId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • createCashBasedCreditJournalEntriesAndReversalsForSavings

      public void createCashBasedCreditJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • createCashBasedCreditJournalEntriesAndReversalsForSavings

      public void createCashBasedCreditJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Long creditAccountId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • createAccrualBasedDebitJournalEntriesAndReversalsForSavings

      public void createAccrualBasedDebitJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeDebited, Long savingsProductId, Long paymentTypeId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • createAccrualBasedCreditJournalEntriesAndReversalsForSavings

      public void createAccrualBasedCreditJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Integer accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • createAccrualBasedBasedCreditJournalEntriesAndReversalsForSavings

      public void createAccrualBasedBasedCreditJournalEntriesAndReversalsForSavings(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Long creditAccountId, Long savingsId, String transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • createDebitJournalEntryForLoan

      public void createDebitJournalEntryForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountMappingTypeId, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createDebitJournalEntryForLoan

      public void createDebitJournalEntryForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount, org.apache.fineract.accounting.glaccount.domain.GLAccount account)
    • createDebitJournalEntryForLoanCharges

      public void createDebitJournalEntryForLoanCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountMappingTypeId, Long loanProductId, Long chargeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createCreditJournalEntryForLoanCharges

      public void createCreditJournalEntryForLoanCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountMappingTypeId, Long loanProductId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, List<ChargePaymentDTO> chargePaymentDTOs)
    • createDebitJournalEntryForLoanCharges

      public void createDebitJournalEntryForLoanCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountMappingTypeId, Long loanProductId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, List<ChargePaymentDTO> chargePaymentDTOs)
    • createCashBasedJournalEntriesAndReversalsForSavingsCharges

      public void createCashBasedJournalEntriesAndReversalsForSavingsCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForSavings accountTypeToBeDebited, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForSavings accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, Boolean isReversal, List<ChargePaymentDTO> chargePaymentDTOs)
      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
      Parameters:
      office - office
      currencyCode - currencyCode
      accountTypeToBeDebited - Enum of the placeholder GLAccount to be debited
      accountTypeToBeCredited - Enum of the placeholder of the GLAccount to be credited
      savingsProductId - savingsProductId
      paymentTypeId - paymentTypeId
      loanId - loanId
      transactionId - transactionId
      transactionDate - transactionDate
      totalAmount - totalAmount
      isReversal - isReversal
      chargePaymentDTOs - chargePaymentDTOs
    • createAccrualBasedJournalEntriesAndReversalsForSavingsCharges

      public void createAccrualBasedJournalEntriesAndReversalsForSavingsCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings accountTypeToBeDebited, org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings accountTypeToBeCredited, Long savingsProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, Boolean isReversal, List<ChargePaymentDTO> chargePaymentDTOs)
    • getOfficeById

      public org.apache.fineract.organisation.office.domain.Office getOfficeById(long officeId)
    • createCreditJournalEntryForLoan

      public void createCreditJournalEntryForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountMappingTypeId, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createCreditJournalEntryForLoan

      public void createCreditJournalEntryForLoan(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Long loanId, String transactionId, LocalDate transactionDate, BigDecimal amount, org.apache.fineract.accounting.glaccount.domain.GLAccount account)
    • createProvisioningDebitJournalEntry

      public void createProvisioningDebitJournalEntry(LocalDate transactionDate, Long provisioningEntryId, org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.glaccount.domain.GLAccount account, BigDecimal amount)
    • createProvisioningCreditJournalEntry

      public void createProvisioningCreditJournalEntry(LocalDate transactionDate, Long provisioningEntryId, org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.glaccount.domain.GLAccount account, BigDecimal amount)
    • createJournalEntriesForShares

      public void createJournalEntriesForShares(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountTypeToDebitId, int accountTypeToCreditId, Long shareProductId, Long paymentTypeId, Long shareAccountId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createDebitJournalEntryForShares

      public void createDebitJournalEntryForShares(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountTypeToDebitId, Long shareProductId, Long paymentTypeId, Long shareAccountId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createCreditJournalEntryForShares

      public void createCreditJournalEntryForShares(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, int accountTypeToCreditId, Long shareProductId, Long paymentTypeId, Long shareAccountId, String transactionId, LocalDate transactionDate, BigDecimal amount)
    • createCashBasedJournalEntriesForSharesCharges

      public void createCashBasedJournalEntriesForSharesCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForShares accountTypeToBeDebited, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForShares accountTypeToBeCredited, Long shareProductId, Long paymentTypeId, Long shareAccountId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, List<ChargePaymentDTO> chargePaymentDTOs)
    • createCashBasedJournalEntryForSharesCharges

      public void createCashBasedJournalEntryForSharesCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForShares accountTypeToBeCredited, Long shareProductId, Long shareAccountId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, List<ChargePaymentDTO> chargePaymentDTOs)
    • revertCashBasedJournalEntryForSharesCharges

      public void revertCashBasedJournalEntryForSharesCharges(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForShares accountTypeToBeCredited, Long shareProductId, Long shareAccountId, String transactionId, LocalDate transactionDate, BigDecimal totalAmount, List<ChargePaymentDTO> chargePaymentDTOs)
    • getLinkedGLAccountForLoanProduct

      public org.apache.fineract.accounting.glaccount.domain.GLAccount getLinkedGLAccountForLoanProduct(Long loanProductId, int accountMappingTypeId, Long paymentTypeId)
    • createCreditJournalEntryOrReversalForClientPayments

      public BigDecimal createCreditJournalEntryOrReversalForClientPayments(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Long clientId, Long transactionId, LocalDate transactionDate, Boolean isReversal, List<ClientChargePaymentDTO> clientChargePaymentDTOs)
    • createDebitJournalEntryOrReversalForClientChargePayments

      public void createDebitJournalEntryOrReversalForClientChargePayments(org.apache.fineract.organisation.office.domain.Office office, String currencyCode, Long clientId, Long transactionId, LocalDate transactionDate, BigDecimal amount, Boolean isReversal)
    • getValueForFeeOrPenaltyIncomeAccount

      public Integer getValueForFeeOrPenaltyIncomeAccount(String chargeRefundChargeType)
    • persistJournalEntry

      public org.apache.fineract.accounting.journalentry.domain.JournalEntry persistJournalEntry(org.apache.fineract.accounting.journalentry.domain.JournalEntry journalEntry)