Examples of SepaSammelUeberweisung


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

  @Override
  protected void exportObject(Object o, int idx, JobContext ctx) throws Exception
  {
    Properties props = ctx.props;

    SepaSammelUeberweisung u = (SepaSammelUeberweisung) o;
    Konto k = u.getKonto();

    // Wir nehmen das Flag von der ersten Sammel-Ueberweisung
    if (idx == 0)
    {
      String batchbook = MetaKey.SEPA_BATCHBOOK.get(u);
      if (batchbook != null)
        props.setProperty("batchbook", batchbook);
     
      props.setProperty("pmtinfid", StringUtils.trimToEmpty(u.getPmtInfId()));

    }
   
    Integer count = (Integer) ctx.meta.get("count");
    if (count == null)
      count = 0;
   
    List<SepaSammelUeberweisungBuchung> buchungen = u.getBuchungen();
    for (int i=0;i<buchungen.size();++i)
    {
      SepaSammelUeberweisungBuchung b = buchungen.get(i);
      props.setProperty(SepaUtil.insertIndex("dst.bic",count),      StringUtils.trimToEmpty(b.getGegenkontoBLZ()));
      props.setProperty(SepaUtil.insertIndex("dst.iban",count),     StringUtils.trimToEmpty(b.getGegenkontoNummer()));
View Full Code Here

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

        ssl.delete();
      }

      // SEPA-Sammelueberweisungen
      list = getSepaSammelUeberweisungen();
      SepaSammelUeberweisung ssu = null;
      while (list.hasNext())
      {
        ssu = (SepaSammelUeberweisung) list.next();
        ssu.delete();
      }

      // und noch die Protokolle
      list = getProtokolle();
      Protokoll p = null;
View Full Code Here

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

   */
  public String getName() throws ApplicationException
  {
    try
    {
      SepaSammelUeberweisung r = (SepaSammelUeberweisung) this.getContext(CTX_ENTITY);
      Konto k = r.getKonto();
      return i18n.tr("{0}: ({1}) {2} {3} als SEPA-Sammel�berweisung absenden",k.getLongName(),r.getBezeichnung(),HBCI.DECIMALFORMAT.format(r.getSumme()),k.getWaehrung());
    }
    catch (RemoteException re)
    {
      Logger.error("unable to determine job name",re);
      throw new ApplicationException(i18n.tr("Auftragsbezeichnung nicht ermittelbar: {0}",re.getMessage()));
View Full Code Here

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

  /**
   * @see de.willuhn.jameica.hbci.rmi.Duplicatable#duplicate()
   */
  public Duplicatable duplicate() throws RemoteException
  {
    SepaSammelUeberweisung u = null;
    try
    {
      u = (SepaSammelUeberweisung) getService().createObject(SepaSammelUeberweisung.class,null);
     
      u.transactionBegin();
      u.setBezeichnung(this.getBezeichnung());
      u.setKonto(this.getKonto());
      u.setTermin(new Date());
      u.setPmtInfId(getPmtInfId());
      u.store();
     
      List<SepaSammelUeberweisungBuchung> list = this.getBuchungen();
      for (SepaSammelUeberweisungBuchung t:list)
      {
        SepaSammelUeberweisungBuchung copy = (SepaSammelUeberweisungBuchung) t.duplicate();
        copy.setSammelTransfer(u);
        copy.store();
      }
      u.transactionCommit();
      return (Duplicatable) u;
    }
    catch (Exception e)
    {
      if (u != null)
        u.transactionRollback();
      Logger.error("unable to duplicate sepa sammeltransfer",e);
      throw new RemoteException(i18n.tr("Fehler beim Duplizieren des SEPA-Sammelauftrages"),e);
    }
  }
View Full Code Here

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

   
    if (source.length == 0)
      throw new ApplicationException(i18n.tr("Bitte w�hlen Sie einen oder mehrere Auftr�ge aus"));

   
    SepaSammelUeberweisung tx = null;
   
    try
    {
      HBCIDBService service = Settings.getDBService();
      Map<String,SepaSammelUeberweisung> map = new HashMap<String,SepaSammelUeberweisung>();
      boolean inDb = false;
      ////////////////////////////////////////
      // 1. Iterieren ueber die Auftraege, um herauszufinden, wieviele Sammel-Auftraege es werden
      for (AuslandsUeberweisung l:source)
      {
        inDb |= !l.isNewObject();
        String key = this.createKey(l);
        SepaSammelUeberweisung s = map.get(key);
        if (s == null)
        {
          s = (SepaSammelUeberweisung) service.createObject(SepaSammelUeberweisung.class,null);
          s.setKonto(l.getKonto());
          s.setBezeichnung(i18n.tr("SEPA-Sammel�berweisung vom {0}",HBCI.LONGDATEFORMAT.format(new Date())));
          map.put(key,s);
        }
      }
     
      // Abfrage anzeigen, ob die Einzelauftraege geloescht werden sollen
      // a) wenn mindestens einer in der DB existierte
      // b) oder mehr als ein Sammelauftrag entsteht.
      boolean delete = false;
      int count = map.size();
      if (count > 1 || inDb)
      {
        SepaUeberweisungMergeDialog dialog = new SepaUeberweisungMergeDialog(SepaUeberweisungMergeDialog.POSITION_CENTER,count,inDb);
        Object o = dialog.open();
        if (o != null)
          delete = ((Boolean)o).booleanValue();
      }
     
      // OK, wir duerfen weiter machen. Erstmal die Sammelauftraege anlegen
      Iterator<SepaSammelUeberweisung> list = map.values().iterator();
      while (list.hasNext())
      {
        SepaSammelUeberweisung s = list.next();
       
        if (tx == null)
        {
          tx = s;
          tx.transactionBegin();
        }
       
        s.store();
        Application.getMessagingFactory().sendMessage(new ImportMessage(s));
      }
     
      // jetzt iterieren wir nochmal ueber die Einzelauftraege und ordnen sie den
      // Sammelauftraegen zu
      for (AuslandsUeberweisung l:source)
      {
        String key = this.createKey(l);
        SepaSammelUeberweisung s = map.get(key);
       
       
        if (s == null) // WTF?
        {
          Logger.error("unable to find sepa transfer for key " + key);
          continue;
        }
       
        SepaSammelUeberweisungBuchung b = s.createBuchung();
        b.setBetrag(l.getBetrag());
        b.setEndtoEndId(l.getEndtoEndId());
        b.setGegenkontoBLZ(l.getGegenkontoBLZ());
        b.setGegenkontoName(l.getGegenkontoName());
        b.setGegenkontoNummer(l.getGegenkontoNummer());
View Full Code Here

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

      u = (SepaSammelUeberweisungBuchung) context;
    }
    else
    {
      try {
        SepaSammelUeberweisung s = (SepaSammelUeberweisung) context;
        u = (SepaSammelUeberweisungBuchung) s.createBuchung();
      }
      catch (RemoteException e)
      {
        // Dann halt nicht
      }
View Full Code Here

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

    {
      if (o == null || !(o instanceof SepaSammelUeberweisung))
        return false;
      try
      {
        SepaSammelUeberweisung u = (SepaSammelUeberweisung) o;
        return !u.ausgefuehrt();
      }
      catch (Exception e)
      {
        Logger.error("error while enable check in menu item",e);
      }
View Full Code Here

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

      else if (context instanceof SepaSammelUeberweisungBuchung)
      {
        try
        {
          SepaSammelUeberweisungBuchung b = (SepaSammelUeberweisungBuchung) context;
          SepaSammelUeberweisung st = (SepaSammelUeberweisung) b.getSammelTransfer();
          u = (AuslandsUeberweisung) Settings.getDBService().createObject(AuslandsUeberweisung.class,null);
          u.setBetrag(b.getBetrag());
          u.setGegenkontoBLZ(b.getGegenkontoBLZ());
          u.setGegenkontoName(b.getGegenkontoName());
          u.setGegenkontoNummer(b.getGegenkontoNummer());
          u.setZweck(b.getZweck());
          u.setEndtoEndId(b.getEndtoEndId());
         
          if (st != null)
          {
            u.setKonto(st.getKonto());
            u.setTermin(st.getTermin());
          }
        }
        catch (RemoteException re)
        {
          Logger.error("error while creating transfer",re);
View Full Code Here

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

   * Wenn nichts angegeben ist, wird eine leere Sammel-Ueberweisung erstellt und angezeigt.
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    SepaSammelUeberweisung u = null;

    if (context instanceof SepaSammelUeberweisung)
    {
      u = (SepaSammelUeberweisung) context;
    }
    else if (context instanceof Konto)
    {
      try {
        Konto k = (Konto) context;
        u = (SepaSammelUeberweisung) Settings.getDBService().createObject(SepaSammelUeberweisung.class,null);
        if (!k.hasFlag(Konto.FLAG_DISABLED) && !k.hasFlag(Konto.FLAG_OFFLINE) && StringUtils.trimToNull(k.getIban()) != null)
          u.setKonto(k);
      }
      catch (RemoteException e)
      {
        // Dann halt nicht
      }
View Full Code Here

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

     */
    public String getDescription()
    {
      try
      {
        SepaSammelUeberweisung t = this.schedule.getContext();
        Konto k = t.getKonto();
        return i18n.tr("{0}SEPA-Sammel�berweisung: {1} {2} �berweisen\n\n{3}\n\nKonto: {4}",
                       (this.schedule.isPlanned() ? (i18n.tr("Geplant") + ":\n") : ""),
                       HBCI.DECIMALFORMAT.format(t.getSumme()),
                       k.getWaehrung(),
                       t.getBezeichnung(),
                       k.getLongName());
      }
      catch (RemoteException re)
      {
        Logger.error("unable to build description",re);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.