Examples of taxpayers()


Examples of com.zesped.model.CustomerAccount.taxpayers()

      addError(new LocalizableError("com.zesped.action.SaveClient.businessName.valueNotPresent"));
    } else {
      try {
        connect();
        CustomerAccount oAcc = new CustomerAccount(getSession().getDms(), getSessionAttribute("customer_account_docid"));
        TaxPayer oFoundTaxPayer = oAcc.taxpayers(getSession()).seek(getSession(), sBusinessName);
        if (!oFoundTaxPayer.id().equals(sFormerId))
          addError(new LocalizableError("com.zesped.action.SaveClient.businessNameAlreadyExists"));
        oFoundTaxPayer = oAcc.taxpayers(getSession()).seek(getSession(), sTaxId);
        if (!oFoundTaxPayer.id().equals(sFormerId))
          addError(new LocalizableError("com.zesped.action.SaveClient.taxIdAlreadyExists"));
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

        connect();
        CustomerAccount oAcc = new CustomerAccount(getSession().getDms(), getSessionAttribute("customer_account_docid"));
        TaxPayer oFoundTaxPayer = oAcc.taxpayers(getSession()).seek(getSession(), sBusinessName);
        if (!oFoundTaxPayer.id().equals(sFormerId))
          addError(new LocalizableError("com.zesped.action.SaveClient.businessNameAlreadyExists"));
        oFoundTaxPayer = oAcc.taxpayers(getSession()).seek(getSession(), sTaxId);
        if (!oFoundTaxPayer.id().equals(sFormerId))
          addError(new LocalizableError("com.zesped.action.SaveClient.taxIdAlreadyExists"));
      } catch (ElementNotFoundException clientnotfound) {
      } catch (Exception e) {
        Log.out.error("SaveTaxPayer.validateBusinessName("+sBusinessName+") "+e.getClass().getName()+" "+e.getMessage(), e);
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

        CustomerAccount oCacc = new CustomerAccount(getSession(), oUser);
        Employee oEmpl = new Employee();
        String sEmpl = null;
        if (oEmpl.exists(getSession(), "employee_uuid", oUser.getNickName())!=null)
          sEmpl = oUser.getNickName();
        setSessionAttributes(oUser, oCacc, oCacc.taxpayers(getSession()).byDefault(getSession(),oUser),sEmpl);
        hasorders = (oCacc.orders(getSession()).count()>0);
        disconnect();       
        } catch (AuthenticationException acpt) {
          DAO.log(User.class, "ACTIVATE USER", AtrilEvent.Level.WARNING, email+";"+id+";"+uid);
          Log.out.warn("ActivateUser.form() "+acpt.getClass().getName()+" "+acpt.getMessage(), acpt);
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

        employees = taxpr.employees(getSession()).list(getSession());
      } else {
        CustomerAccount cacc = new CustomerAccount(getSession().getDms(), getSessionAttribute("customer_account_docid"));
        employees = new ArrayList<Employee>();
        bnames = new HashMap<String,String>();
        for (TaxPayer t : cacc.taxpayers(getSession()).list(getSession())) {
          ArrayList<Employee> emps = t.employees(getSession()).list(getSession());
          employees.addAll(emps);
          for (Employee e : emps)
            bnames.put(e.id(), t.getBusinessName());
        }
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

      Log.out.error("BaseEditBean.getTaxPayers() Cache.getObject("+ckey+") "+e.getClass().getName()+" "+e.getMessage(), e);
    }
    if (null==taxpayers) {
        connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
      CustomerAccount oAcc = new CustomerAccount(getSession().getDms().getDocument(getSessionAttribute("customer_account_docid")));
      taxpayers = oAcc.taxpayers(getSession()).list(getSession());
      for (TaxPayer oTxp : taxpayers)
        if (oTxp.getTaxId().length()>0)
          oTxp.setBusinessName(oTxp.getBusinessName()+" ("+oTxp.getTaxId()+")");
      disconnect();
      try {
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

  }

  public Collection<TaxPayer> getTaxPayers() throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    AtrilSession oSes = DAO.getAdminSession("EditEmployee");
    CustomerAccount oAcc = new CustomerAccount(oSes.getDms().getDocument(getSessionAttribute("customer_account_docid")));
    Collection<TaxPayer> taxpayers = oAcc.taxpayers(oSes).list(oSes);
    oSes.disconnect();
    oSes.close();
    return taxpayers;
  }
 
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

        if (ordrs.size()>0) {
        cbought = ordrs.get(0).getCreditsBought().intValue();
        } else {
        cbought = 0;
        }
        ArrayList<TaxPayer> oTxps = oAcc.taxpayers(getSession()).list(getSession());
        for (TaxPayer p : oTxps) {
        cbasic   += p.basicInvoices(getSession()).size();
          cpremium += p.premiumInvoices(getSession()).size();
          ctickets += p.allTickets(getSession()).size();
        }       
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

  }

  public Collection<TaxPayer> getTaxPayers() throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    AtrilSession oSes = DAO.getAdminSession("EditUser");
    CustomerAccount oAcc = new CustomerAccount(oSes.getDms().getDocument(getSessionAttribute("customer_account_docid")));
    Collection<TaxPayer> taxpayers = oAcc.taxpayers(oSes).list(oSes);
    oSes.disconnect();
    oSes.close();
    return taxpayers;
  }
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

    } catch (ElementNotFoundException notfound) {   
      ACCID = CustomerAccount.create(oSes, new User(oSes, USRID), TEST_BUSINESSNAME).id();   
    }
   
    CustomerAccount oAcc = new CustomerAccount(oSes.getDms(), ACCID);
    if (oAcc.taxpayers(oSes).list(oSes).size()==0)
      TaxPayer.create(oSes, oAcc, TEST_BUSINESSNAME+" tax payer", "John Smith", "johnj@junittesting.com", null);

    oSes.disconnect();
    oSes.close();
    }
View Full Code Here

Examples of com.zesped.model.CustomerAccount.taxpayers()

  @Test public void createInvoice()
    throws IllegalArgumentException,AuthorizationManagerAdminException,DuplicatedElementException,ElementNotFoundException,NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
      AtrilSession oSes = openTestSession();
      User oUsr = new User(oSes, USRID);
      CustomerAccount oAcc = new CustomerAccount(oSes.getDms(), ACCID);
      Iterator<TaxPayer> oItr = oAcc.taxpayers(oSes).list(oSes).iterator();
    TaxPayer oTpr = oItr.next();
    oTpr.invoices(oSes).create(oSes, oUsr.getNickName(), CaptureServiceFlavor.BASIC, oTpr.id(), null, null);
      closeTestSession(oSes);
  }
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.