Package org.kapott.hbci.swift

Examples of org.kapott.hbci.swift.DTAUS


    {
        String ret=null;
       
        if (path.startsWith("sum")) {
            String dtausdata=getLowlevelParams().getProperty(getName()+".data");
            DTAUS  dtaus=new DTAUS(dtausdata.substring(1));
           
            if (path.equals("sumOthers")) {
              // summe der ziel-kontonummern
              long sum=0;
              ArrayList<Transaction> entries=dtaus.getEntries();
              for (Iterator<Transaction> i=entries.iterator();i.hasNext();) {
                DTAUS.Transaction entry= i.next();
                sum += Long.parseLong(entry.otherAccount.number);
              }
              ret=Long.toString(sum);
              if (ret.length()>10) {
                ret=ret.substring(0,10);
              }
             
            } else if (path.equals("sumValue")) {
                // summe der betr�ge
                long sum = 0;
                ArrayList<Transaction> entries = dtaus.getEntries();
                for (Iterator<Transaction> i = entries.iterator(); i.hasNext();) {
                    DTAUS.Transaction entry = i.next();
                    sum += entry.value.getLongValue();
                }
                // TODO: hier wird ziemlich unsch�n direkt auf
                // die SyntaxDE-Funktionen zugegriffen
                String v = HBCIUtils.bigDecimal2String(new BigDecimal(sum).divide(new BigDecimal("100.0")));
                ret = new SyntaxWrt(v, 1, 0).toString();
             
            } else if (path.equals("sumCurr")) {
              // w�hrung des sammlers
                ret=dtaus.getCurr()==DTAUS.CURR_DM?"DEM":"EUR";
           
            } else if (path.equals("sumCount")) {
              // willuhn 2011-05-17 Anzahl der Buchungen, HHD 1.4
              // Anzahl der Buchungen
              ret = Integer.toString(dtaus.getEntries().size());
            }
        } else {
            ret=super.getChallengeParam(path);
        }
       
View Full Code Here


   * @throws RemoteException
   */
  private static DTAUS HibiscusSammelTransfer2DTAUS(SammelTransfer s, int type) throws RemoteException
  {

    DTAUS dtaus = new DTAUS(HibiscusKonto2HBCIKonto(s.getKonto()),type);
    DBIterator buchungen = s.getBuchungen();
    SammelTransferBuchung b = null;
    while (buchungen.hasNext())
    {
      b = (SammelTransferBuchung) buchungen.next();
      final DTAUS.Transaction tr = dtaus.new Transaction();
     
      Konto other = new Konto("DE",b.getGegenkontoBLZ(),b.getGegenkontoNummer());
      other.name = b.getGegenkontoName();

      tr.otherAccount = other;
      tr.value = new Value(String.valueOf(b.getBetrag()));
     
      String key = b.getTextSchluessel();
      if (key != null && key.length() > 0)
        tr.key = key; // Nur setzen, wenn in der Buchung definiert. Gibt sonst in DTAUS#toString eine NPE

      String[] lines = VerwendungszweckUtil.toArray(b);
      for (String line:lines)
      {
        tr.addUsage(line);
      }
     
      dtaus.addEntry(tr);
    }
    return dtaus;
  }
View Full Code Here

TOP

Related Classes of org.kapott.hbci.swift.DTAUS

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.