Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Tabelle 4.7.4: Übersicht, spezifische Anpassungen und Erweiterungen

 

4.8.1 Zuordnungslogik

Die Zuordnung von eingehenden Bankumsätzen zu Referenzobjekten (Rechnungen, o.ä.) ist in der Methode findMatchingReferences() der abstrakten Klasse org.nuclet.mt940.logic.AbstractMT940Logic realisiert. Die Zuordnung erfolgt standardmäßig auf Grundlage der herausgestellten Referenznummer der Referenzobjekte:

...

Codeblock
languagejava
titleorg.nuclet.mt940.logic.AbstractMT940Logic
firstline355
linenumberstrue
collapsetrue
    /**
     * Matches the given bank transaction with a map of references: 
     * 
     * If the transaction's field "information to account owner" contains the reference, the related 
     * BusinessObject will be memorised, i.e. a list of all matching entries will be returned.
     * 
     * @note A more sophisticated, application specific, behaviour might be implemented in
     * dedicated subclasses
     * 
     * @param boBankTransaction a BusinessObject of type <code>BankTransaction</code>
     * @param mpReferences a map of references to be matched
     * @return a list of all BusinessObject that relate to a matching reference
     * 
     * @throws BusinessException might be thrown by implementing classes in case of errors or other exceptions
     */
    protected List<BusinessObject> findMatchingReferences(final BankTransaction boBankTransaction, 
        final Map<BusinessObject, String> mpReferences) 
    throws 
        BusinessException        
    {
        final ArrayList<BusinessObject> lstMatchingReferences = new ArrayList<BusinessObject>();
        final Set<BusinessObject> stReferencedBusinessObjects = mpReferences.keySet();
        
        // Check, if a matching reference exists...
        for (final BusinessObject businessObject : stReferencedBusinessObjects) {
            final String strReference = mpReferences.get(businessObject);
                
            if (boBankTransaction.getInformationToAccountOwner().indexOf(strReference) > 0) {
                log("matching reference found: " + strReference);
             
                lstMatchingReferences.add(businessObject);
            }
        }
        return lstMatchingReferences;
    }

 

4.8.2 Eindeutigkeitsprüfung

Die Prüfung, ob ein eingehender Datensatz aus dem MT940-Import bereits in der Datenbank vorhanden ist, wird in der Methode doesBankTransactionAlreadyExist() der abstrakten Klasse org.nuclet.mt940.logic.AbstractMT940Logic realisiert. Standardmäßig werden bei diesem Abgleich die folgenden Attribute berücksichtigt:

...

Codeblock
languagejava
titleorg.nuclet.mt940.AbstractMT940Logic
firstline321
linenumberstrue
collapsetrue
    /**
     * Checks, if a representation of the given bank transaction has already been stored to the database.
     * 
     * Identifiying criteria could be a combination of:
     * 
     * - entry date
     * - value date
     * - amount
     * - debit credit mark
     * - business transaction type code / bank transaction type
     * - information to account owner 
     * 
     * @param transaction a given bank transaction, representated by a <code>Mt940Transaction</code> object
     * 
     * @return true, if a representation of the given bank transaction has already been stored to the database
     * 
     * @throws BusinessException might be thrown in case of errors or other exceptions
     */
    public boolean doesBankTransactionAlreadyExist(MT940Transaction transaction) throws BusinessException
    {
        Query<BankTransaction> qryGetExistingBankTransactions = QueryProvider.create(BankTransaction.class);          
        final DebitCreditMark debitCreditMark = debitCreditMarkFacade.getDebitCreditMark(transaction.getDebitCreditMark().getName());
        BankTransactionType bankTransactionType = null;
        
        if (transaction.getBusinessTransactionTypeCode() != null) {
            bankTransactionType = bankTransactionTypeFacade.getBankTransactionType(transaction.getBusinessTransactionTypeCode());
            
            qryGetExistingBankTransactions.where(BankTransaction.EntryDate.eq(transaction.getEntryDate()))
               .and(BankTransaction.ValueDate.eq(transaction.getValueDate()))
               .and(BankTransaction.Amount.eq(transaction.getAmount()))
               .and(BankTransaction.DebitCreditMark.eq(debitCreditMark.getId()))
               .and(BankTransaction.BankTransactionType.eq(bankTransactionType.getId()))
               .and(BankTransaction.InformationToAccountOwner.eq(transaction.getInformationToAccountOwner()));
        } else {
        
            qryGetExistingBankTransactions.where(BankTransaction.EntryDate.eq(transaction.getEntryDate()))
                   .and(BankTransaction.ValueDate.eq(transaction.getValueDate()))
                   .and(BankTransaction.Amount.eq(transaction.getAmount()))
                   .and(BankTransaction.DebitCreditMark.eq(debitCreditMark.getId()))
                   .and(BankTransaction.InformationToAccountOwner.eq(transaction.getInformationToAccountOwner()));
        }
                                                                                                                       
        final List<BankTransaction> lstBankTransactions = QueryProvider.execute(qryGetExistingBankTransactions);               
        
        return (lstBankTransactions != null && lstBankTransactions.size() > 0);
    }

 

4.8.3 Zahlungsbedingungen

Die Prüfung, ob Zahlungsbedingungen (Zahlungseingang, Gesamtbetrag erhalten, Skontobedingung) erfüllt sind, wird in der Java-Regel org.nuclet.mt940.rule.CheckBankTransactionRef realisiert. In dieser Regel ist die Priorisierung der zu prüfenden Zahlungsbedingungen festgelegt, und es wird bei Erfüllung der Zahlungsbedingungen ein Statuswechsel auf dem Referenzobjekt (bzw. den Referenzobjekten) initiert.

...