Package de.willuhn.jameica.hbci.rmi

Examples of de.willuhn.jameica.hbci.rmi.Address


        return;
     
      if (!(event.data instanceof Address))
        return;
     
      Address a = (Address) event.data;

      try {
        getEmpfaengerName().setText(a.getName());
        getEmpfaengerKonto().setValue(a.getIban());
        getEmpfaengerBic().setValue(a.getBic());

        // Wenn der Empfaenger aus dem Adressbuch kommt, deaktivieren wir die Checkbox
        getStoreEmpfaenger().setValue(Boolean.FALSE);
       
        try
        {
          String zweck = (String) getZweck().getValue();
          if ((zweck != null && zweck.length() > 0))
            return;
         
          DBIterator list = getTransfer().getList();
          list.addFilter("empfaenger_konto = ?",a.getIban());
          list.setOrder("order by id desc");
          if (list.hasNext())
          {
            HibiscusTransfer t = (HibiscusTransfer) list.next();
            getZweck().setValue(t.getZweck());
View Full Code Here


      }
    }
    else if (context instanceof Address)
    {
      try {
        Address e = (Address) context;
        d = (SepaDauerauftrag) Settings.getDBService().createObject(SepaDauerauftrag.class,null);
        d.setGegenkonto(e);
      }
      catch (RemoteException e)
      {
View Full Code Here

   * @return true, wenn es eine Hibiscus-Adresse ist.
   * @throws RemoteException
   */
  public boolean isHibiscusAdresse() throws RemoteException
  {
    Address a = getAddress();
    return (a instanceof HibiscusAddress);
  }
View Full Code Here

  public Part getUmsatzListe() throws RemoteException
  {
    if (this.umsatzList != null)
      return this.umsatzList;

    Address a = this.getAddress();
    DBIterator list = UmsatzUtil.getUmsaetzeBackwards();
    // BUGZILLA 1328 https://www.willuhn.de/bugzilla/show_bug.cgi?id=1328
    // wenn wir eine IBAN haben, muessen wir auch nach der suchen.
    // BUGZILLA 1395 wenn der Adressbuch-Eintrag nur IBAN hat und keine Kontonummer/BLZ, dann nur nach IBAN suchen
    String iban = a.getIban();
    String konto = a.getKontonummer();
   
    if (StringUtils.isNotEmpty(iban)) // haben wir eine IBAN?
    {
      if (StringUtils.isNotEmpty(konto)) // haben wir ausserdem Konto/BLZ?
        list.addFilter("((empfaenger_konto like ? and empfaenger_blz = ?) or lower(empfaenger_konto) = ?)","%" + konto, a.getBlz(), iban.toLowerCase());
      else // nur IBAN // BUGZILLA 1395
        list.addFilter("lower(empfaenger_konto) = ?",iban.toLowerCase());
    }
    else
    {
      list.addFilter("empfaenger_konto like ?","%" + konto);
      list.addFilter("empfaenger_blz = ?",a.getBlz());
    }

    this.umsatzList = new UmsatzList(list,new UmsatzDetail());
    ((UmsatzList)this.umsatzList).setFilterVisible(false);
    return this.umsatzList;
View Full Code Here

  public Input getBank() throws RemoteException
  {
    if (this.bank == null)
    {
      String s = null;
      Address a = getAddress();
      if (a instanceof HibiscusAddress)
        s = ((HibiscusAddress)a).getBank();
      this.bank = new TextInput(s, HBCIProperties.HBCI_FOREIGNTRANSFER_USAGE_MAXLENGTH);
      this.bank.setEnabled(isHibiscusAdresse());
    }
View Full Code Here

        if (!k.hasFlag(Konto.FLAG_DISABLED) && !k.hasFlag(Konto.FLAG_OFFLINE) && StringUtils.trimToNull(k.getIban()) != null)
          u.setKonto(k);
      }
      else if (context instanceof Address)
      {
        Address e = (Address) context;
        u = (AuslandsUeberweisung) Settings.getDBService().createObject(AuslandsUeberweisung.class,null);
        u.setGegenkonto(e);
      }
      else if (context instanceof Umsatz)
      {
        Umsatz umsatz = (Umsatz) context;
        u = (AuslandsUeberweisung) Settings.getDBService().createObject(AuslandsUeberweisung.class,null);
        u.setBetrag(Math.abs(umsatz.getBetrag())); // negative Betraege automatisch in positive umwandeln
        u.setGegenkontoName(umsatz.getGegenkontoName());
        u.setKonto(umsatz.getKonto());
        u.setTermin(new Date());

        // BUGZILLA 1437
        // Wenn wir ein Gegenkonto haben, dann pruefen wir, ob es wie eine IBAN aussieht.
        // Falls ja, uebernehmen wir sie. Falls nicht, schauen wir im Adressbuch, ob
        // wir die Adresse kennen und dort vielleicht BIC und IBAN haben
        String kto = StringUtils.trimToEmpty(umsatz.getGegenkontoNummer());
        String blz = StringUtils.trimToEmpty(umsatz.getGegenkontoBLZ());
        if (kto.length() <= 10 && kto.length() > 0 && blz.length() > 0) // aber nur, wenn wir auch was zum Suchen im Adressbuch haben
        {
          // kann keine IBAN sein. Die ist per Definition laenger
         
          // Also im Adressbuch schauen
          HibiscusAddress address = (HibiscusAddress) Settings.getDBService().createObject(HibiscusAddress.class,null);
          address.setBlz(blz);
          address.setKontonummer(kto);
          AddressbookService book = (AddressbookService) Application.getServiceFactory().lookup(HBCI.class,"addressbook");
          Address a = book.contains(address);
          kto = a != null ? a.getIban() : null;
          blz = a != null ? a.getBic() : null;
        }
       
       
        u.setGegenkontoBLZ(blz);
        u.setGegenkontoNummer(kto);
View Full Code Here

      }
      ///////////////////////////////////////////////////////////////
      // Address
      else if (context instanceof Address)
      {
        Address a = (Address) context;
        items.add(create(a.getName(),a.getKontonummer(),a.getBlz()));
      }
      else if (context instanceof Address[])
      {
        Address[] list = (Address[]) context;
        for (int i=0;i<list.length;++i)
        {
          Address a = list[i];
          items.add(create(a.getName(),a.getKontonummer(),a.getBlz()));
        }
      }
      ///////////////////////////////////////////////////////////////

      if (items.size() == 0)
View Full Code Here

          List found = EmpfaengerList.this.book.findAddresses(text);
          if (found == null)
            return;
          for (int i=0;i<found.size();++i)
          {
            Address a = (Address) found.get(i);
            if (filter == null || filter.accept(a))
              EmpfaengerList.this.addItem(a);
          }

          // Fertig. Jetzt nochmal neu sortieren
View Full Code Here

        return;
     
      if (!(event.data instanceof Address))
        return;
     
      Address a = (Address) event.data;

      try {

        // Checken, ob wir in der Adresse Mandats-Daten haben
        if (a instanceof HibiscusAddress)
View Full Code Here

      public void handleAction(Object context) throws ApplicationException
      {
        try
        {
          AdresseAuswahlDialog d = new AdresseAuswahlDialog(AdresseAuswahlDialog.POSITION_MOUSE,filter);
          Address a = (Address) d.open();
          if (a != null)
          {
            input.setValue(a);
          }
        }
View Full Code Here

TOP

Related Classes of de.willuhn.jameica.hbci.rmi.Address

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.