Examples of Quotation


Examples of cl.molavec.jpa.entities.Quotation

      //Entities
      QuotationProperties qp = null;
    QUser quser = null;
    Customer customer = null;
    Company company = null;
    Quotation quotation =null;
   
   
    EntityManager em = this.emf.createEntityManager();
    em.getTransaction().begin();
   
   
    try {
      qp = this.quotationPropertiesFactory();
    } catch (IOException | MaxFileSizeException e) {
      Assert.fail(e.getMessage());
    }
   
    em.persist(qp);
    for(int i=0;i<QUSERS;i++){//Usuarios que generarán cotizaciones
      quser = podamf.manufacturePojo(QUser.class);
      em.persist(quser);
      for(int j=0;j<CUSTOMERS;j++){ //información de a quien va dirigida la cotización
        customer = podamf.manufacturePojo(Customer.class);
              company = podamf.manufacturePojo(Company.class);
              em.persist(customer);
              em.persist(company);
              for(int k=0;k<QUOTATIONS;k++){ //construcción cotización------------
                quotation = podamf.manufacturePojo(Quotation.class);
                quotation.setUser(quser);
                quotation.setCustomer(customer);
                quotation.setCompany(company);
                quotation.setQuotationProperties(qp);
                List<Item> itemList = new ArrayList<Item>();
                for(int l=0;l<ITEMS;l++){ //item de la cotización
                  Item item = podamf.manufacturePojo(Item.class);
                  em.persist(item);
                  itemList.add(item);
                }
                quotation.setItems(itemList);
                em.persist(quotation);
              }
      }
    }
   
View Full Code Here

Examples of cl.molavec.jpa.entities.Quotation

  }

  @Test
  public void test() {

    Quotation quotation = factory.manufacturePojo(Quotation.class);

    System.out.println("quotation.getId(): " + quotation.getId());
    System.out.println("quotation.getcustomId(): " + quotation.getCustomId());
   
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    System.out.println("quotation.getDate(): " +  format.format(quotation.getDate().getTime()));
    System.out.println("quotation.getState(): " + quotation.getState());
   
    Assert.assertEquals(0, quotation.getId());

  }
View Full Code Here

Examples of com.suarte.core.Quotation

        if (myType.equals("quotation")) {
            response.setContentType("application/pdf");

            id = Long.valueOf(request.getParameter("id"));
            Quotation quotation = quotationManager.get(id);

            QuotationToPdf pdf = new QuotationToPdf();
            pdf.write(quotation, response.getOutputStream());

            response.getOutputStream().close();
View Full Code Here

Examples of com.suarte.core.Quotation

                    "/applicationContext.xml"
                };
    }

    public void testStoreQuotation(){
        Quotation quotation = new Quotation();
        quotation.setTransDate(new Date());
        quotation.setDescription("Test with set this");

        quotation.addDetail(new QuotationDetail(null, 1, 0f, 0f, 0f));
        //manager.save(quotation);
        //setComplete();
    }
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.