Examples of Invoice


Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Invoice

  }

  private InvoiceTableModel initInvoiceData(final Customer customer)
  {
    final GregorianCalendar gc = new GregorianCalendar(2000, 10, 23);
    final Invoice invoice = new Invoice(customer, gc.getTime(), "A-000-0123");

    final Article mainboard = new Article("MB.001", "Ancient Mainboard", 199.50f);
    final Article hardDisk = new Article
        ("HD.201", "Very Slow Harddisk", 99.50f, "No warranty");
    final Article memory = new Article("MEM.36", "Dusty RAM modules", 59.99f);
    final Article operatingSystem = new Article
        ("OS.36", "QDOS with C/PM compatibility module", 259.99f, "Serial #44638-444-123");
    invoice.addArticle(mainboard);
    invoice.addArticle(hardDisk);
    invoice.addArticle(memory);
    invoice.addArticle(memory);
    invoice.addArticle(operatingSystem);

    final InvoiceTableModel invoiceData = new InvoiceTableModel();
    invoiceData.addInvoice(invoice);
    return invoiceData;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Invoice

  }

  private InvoiceTableModel initInvoiceData(final Customer customer)
  {
    final GregorianCalendar gc = new GregorianCalendar(2000, 10, 23);
    final Invoice invoice = new Invoice(customer, gc.getTime(), "A-000-0123");

    final Article mainboard = new Article("MB.001", "Ancient Mainboard", 199.50f);
    final Article hardDisk = new Article
        ("HD.201", "Very Slow Harddisk", 99.50f, "No warranty");
    final Article memory = new Article("MEM.36", "Dusty RAM modules", 59.99f);
    final Article operatingSystem = new Article
        ("OS.36", "QDOS with C/PM compatibility module", 259.99f, "Serial #44638-444-123");
    invoice.addArticle(mainboard);
    invoice.addArticle(hardDisk);
    invoice.addArticle(memory);
    invoice.addArticle(memory);
    invoice.addArticle(operatingSystem);

    final InvoiceTableModel invoiceData = new InvoiceTableModel();
    invoiceData.addInvoice(invoice);
    return invoiceData;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Invoice

  {
    final Customer customer =
        new Customer("Will", "Snowman", "Mr.", "12 Federal Plaza",
            "12346", "AnOtherTown", "Lilliput");
    final GregorianCalendar gc = new GregorianCalendar(2000, 10, 23);
    final Invoice invoice = new Invoice(customer, gc.getTime(), "A-000-0123");

    final Article mainboard = new Article("MB.001", "Ancient Mainboard", 199.50f);
    final Article hardDisk = new Article
        ("HD.201", "Very Slow Harddisk", 99.50f, "No warranty");
    final Article memory = new Article("MEM.36", "Dusty RAM modules", 59.99f);
    final Article operatingSystem = new Article
        ("OS.36", "QDOS with C/PM compatibility module", 259.99f, "Serial #44638-444-123");
    invoice.addArticle(mainboard);
    invoice.addArticle(hardDisk);
    invoice.addArticle(memory);
    invoice.addArticle(memory);
    invoice.addArticle(operatingSystem);

    final InvoiceTableModel data = new InvoiceTableModel();
    data.addInvoice(invoice);
    return data;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Invoice

  public void invalidateCaches()
  {
    int size = 0;
    for (int i = 0; i < invoices.size(); i++)
    {
      final Invoice inv = getInvoice(i);
      size += inv.getArticleCount();
    }
    this.totalSize = size;
    this.invoicePerRow = null;
    this.articlesPerRow = null;
    this.articleCountPerRow = null;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Invoice

    int currentRow = 0;
    final int invoiceSize = invoices.size();
    for (int i = 0; i < invoiceSize; i++)
    {
      final Invoice inv = (Invoice) invoices.get(i);
      final int articleCount = inv.getArticleCount();
      for (int ac = 0; ac < articleCount; ac++)
      {
        invoicePerRow[currentRow] = inv;
        articlesPerRow[currentRow] = inv.getArticle(ac);
        articleCountPerRow[currentRow] = inv.getArticleCount(ac);
        currentRow += 1;
      }
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.demo.ancient.demo.invoice.model.Invoice

   */
  public Object getValueAt(final int rowIndex, final int columnIndex)
  {
    // just make sure we can access the invoices by the array
    fillCache();
    final Invoice inv = invoicePerRow[rowIndex];
    final Article art = articlesPerRow[rowIndex];

    switch (columnIndex)
    {
      case 0:
        return inv;
      case 1:
        return inv.getCustomer().getFirstName();
      case 2:
        return inv.getCustomer().getLastName();
      case 3:
        return inv.getCustomer().getStreet();
      case 4:
        return inv.getCustomer().getTown();
      case 5:
        return inv.getCustomer().getPostalCode();
      case 6:
        return inv.getCustomer().getCountry();
      case 7:
        return inv.getCustomer().getSalutation();
      case 8:
        return inv.getDate();
      case 9:
        return inv.getInvoiceNumber();
      case 10:
        return art.getName();
      case 11:
        return art.getArticleNumber();
      case 12:
View Full Code Here

Examples of org.wso2.carbon.billing.core.dataobjects.Invoice

        List<Subscription> subscriptions = handlerContext.getSubscriptions();
        Map<Integer, Invoice> invoiceMap = new HashMap<Integer, Invoice>();
       
        for (Subscription subscription : subscriptions) {
            Customer customer = subscription.getCustomer();
            Invoice invoice = customer.getActiveInvoice();
            if (invoiceMap.get(customer.getId()) == null) {
                invoiceMap.put(customer.getId(), invoice);
            }

            // if the activeUtil date is passed, we are making them inactive
            /*if (subscription.getActiveUntil().getTime() < System.currentTimeMillis()) {
                // we are making the subscription inactive
                subscription.setActive(false);
                dataAccessObject.updateSubscription(subscription);
            }*/
        }

        // from the invoice set we are calculating the purchase orders
        for (Invoice invoice : invoiceMap.values()) {
            // save the invoice first
            dataAccessObject.addInvoice(invoice);
            subscriptions = invoice.getSubscriptions();
            for (Subscription subscription : subscriptions) {
                // associate the subscription with the invoice.
                int invoiceSubscriptionId =
                        dataAccessObject.addInvoiceSubscription(invoice, subscription);
                // now iterate all the items and save it in invoice subscription item space
                if (subscription.getItem() != null) {
                    addInvoiceSubscriptionItem(subscription.getItem(), invoiceSubscriptionId);
                }
            }

            if (invoice.getPayments() != null) {
                for (Payment payment : invoice.getPayments()) {
                    payment.setInvoice(invoice);
                    dataAccessObject.associatePaymentWithInvoice(payment, invoice);
                }
            }
        }
View Full Code Here

Examples of org.wso2.carbon.billing.core.dataobjects.Invoice

            if (!customerSet.contains(customer.getId())) {
                customerSet.add(customer.getId());
                rulesInput.add(customer);

                // add the invoice too
                Invoice invoice = customer.getActiveInvoice();
                rulesInput.add(invoice);

                // add each purchases
                List<Payment> payments = invoice.getPayments();
                if (payments != null) {
                    for (Payment payment : payments) {
                        rulesInput.add(payment);
                    }
                }
View Full Code Here

Examples of org.yaml.snakeyaml.Invoice

        return new TestSuite(StressEmitterTest.class);
    }

    public void testPerformance() {
        Yaml loader = new Yaml();
        Invoice invoice = loader.loadAs(Util.getLocalResource("specification/example2_27.yaml"),
                Invoice.class);
        Yaml dumper = new Yaml();
        long time1 = System.nanoTime();
        dumper.dumpAsMap(invoice);
        long time2 = System.nanoTime();
View Full Code Here

Examples of oss.ngocminh.lego.data.Invoice

   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    List<Entity> orders = (List<Entity>)
        request.getSession().getAttribute("orders");
    Invoice invoice = new Invoice();
    invoice.put("orders", orders);
    invoice.put("user", SessionUtils.getUser(request));
    invoice.put("shipType", request.getAttribute("shipType"));
    invoice.put("payType", request.getAttribute("payType"));
    invoice.put("note", request.getAttribute("note"));
    invoice.put("address_id", request.getAttribute("address_id"));
    invoice.put("time", new Date());
   
    Connection conn = null;
    try {
      conn = getConnection();
      invoiceDAO = new InvoiceDAO();
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.