Examples of Bill


Examples of com.finiac.model.Bill

  {
  //  final DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
        final Calendar c = Calendar.getInstance();
        long billId;
        int month;
        Bill bill1 = new Bill();
        Sales sales= new Sales();
        String dateInFormat;
        month=c.get(Calendar.MONTH)+1;
        if(month<10)
          dateInFormat="0"+month+"/";
        else
          dateInFormat=month+"/";
        if(c.get(Calendar.DAY_OF_MONTH)<10) // value of month starts fro        
          dateInFormat+="0"+c.get(Calendar.DAY_OF_MONTH)+"/";
        else
          dateInFormat+=c.get(Calendar.DAY_OF_MONTH)+"/";
       
      dateInFormat+= c.get(Calendar.YEAR);
      if(request.getSession().getAttribute("billId")!=null)
      {
        float amount=0;
        billId=Long.parseLong(request.getSession().getAttribute("billId").toString());
        System.out.println("control in " +billId);
        List<Sales> salesList= salesDAO.selectByBillId(billId);
        for(int i=0;i<salesList.size();i++)
      {
        sales = salesList.get(i);
        amount+=sales.getTotal();
     
        bill1=billDAO.selectBill(billId);
        bill1.setAmount(amount);
        billDAO.updateBill(bill1);
      }
    Bill bill= new Bill(0, dateInFormat);
    billId= billDAO.createBill(bill);
    request.getSession().setAttribute("billId", billId);
    return new ModelAndView("redirect:listBill.htm");
  }
View Full Code Here

Examples of com.finiac.model.Bill

        stockAlertLimit = stockAlertSettingsDAO.getSettings();
      }
        if(product.getQtyAvail()< Float.parseFloat(stockAlertLimit.getValue()))
          stockAlertString="stockAlert="+temp;   
      billId= Long.parseLong(request.getSession().getAttribute("billId").toString());
      Bill bill = new Bill();
      bill= billDAO.selectBill(billId);
      Sales sales= new Sales(product, qtySold, total,bill ,1); //Sales(Product productId, float qtySold, float total, long billId , int isActive)
      salesDAO.newSalesEntry(sales)
      return new ModelAndView("redirect:listBill.htm?"+stockAlertString);
    }
View Full Code Here

Examples of com.finiac.model.Bill

    if(request.getSession().getAttribute("billId")!=null// to update total field of bill table of request is comming
      {    System.out.println("control in ");                       // from add new list;
        float amt=0;
        long billId;
        Sales sales= new Sales();
        Bill bill1= new Bill();
        billId=Long.parseLong(request.getSession().getAttribute("billId").toString());
        System.out.println("control in " +billId);
        List<Sales> salesList= salesDAO.selectByBillId(billId);
        for(int i=0;i<salesList.size();i++)
      {
        sales = salesList.get(i);
        amt+=sales.getTotal();
     
        bill1=billDAO.selectBill(billId);
        bill1.setAmount(amt);
        billDAO.updateBill(bill1);
      }
    ModelMap modelMap = new ModelMap();
    modelMap.addAttribute("items", partialPaymentDAO.listAll());
    modelMap.addAttribute("partialPay", new PartialPayment());
View Full Code Here

Examples of com.finiac.model.Bill

  {
    long billNo =Long.parseLong(request.getParameter("billNo"));
    long admissionNo=Long.parseLong(request.getParameter("admissionNo"));
    float amount = Long.parseLong(request.getParameter("amount"));
    float balanceAmt;
    Bill bill= new Bill();
    Student student= new Student();
    bill=billDAO.selectBill(billNo);
    student=studentDAO.selectByAdmissionNo(admissionNo);
    balanceAmt=bill.getAmount()-amount;
    PartialPayment pay = new PartialPayment(student, bill, balanceAmt);
    partialPaymentDAO.addDetails(pay);
    return new ModelAndView("redirect:listPartialPay.htm");
  }
View Full Code Here

Examples of com.finiac.model.Bill

  @SuppressWarnings("unchecked")
  @Override
  public long createBill(Bill bill)
  {
    hibernateTemplate.save(bill);
    Bill lastBill = new Bill();
    List<Bill> billList = hibernateTemplate.find("from Bill where id = (select max(id) from Bill)");
    for(int i=0;i<billList.size();i++)
    {
      lastBill = billList.get(i);
    }
    return lastBill.getId();
   
  }
View Full Code Here

Examples of com.finiac.model.Bill

  @SuppressWarnings("unchecked")
  @Override
  public long lastBillId()
  {
    Bill lastBill = new Bill();
    List<Bill> billList = hibernateTemplate.find("from Bill where id = (select max(id) from Bill)");
    for(int i=0;i<billList.size();i++)
    {
      lastBill = billList.get(i);
    }
    return lastBill.getId();
   
  }
View Full Code Here

Examples of com.finiac.model.Bill


  @SuppressWarnings("unchecked")
  @Override
  public Bill selectBill(long id) {
    Bill bill = new Bill();
    List<Bill> billList = hibernateTemplate.find("from Bill where id ="+id);
    for(int i=0;i<billList.size();i++)
    {
      bill = billList.get(i);
    }
View Full Code Here

Examples of com.rakaizsys.eims.model.finance.Bill

    }
  }

  protected void doBtnPrintBillActionPerformed(ActionEvent e) {
    try {
      Bill bill = new Bill();
      bill.setBillDate(new Date());
      bill.setCustomer((Customer) PropertyUtils.getProperty(dbObject,
          "customer"));
      bill.setName("Bill for customer : " + bill.getCustomer());
      TemplateTableModel model = (TemplateTableModel) tableServices
          .getModel();
      SQLMapHolder.sqlMap.startTransaction();
      SQLMapHolder.sqlMap.insert("insertBill", bill);
      for (DBObject serv : model.getDbObjects()) {
        CustomerService service = (CustomerService) serv;
        BillItem billItem = new BillItem();
        billItem.setBill(bill);
        billItem.setQuantity(1);
        billItem.setPrice(service.getTotalCost());
        billItem.setItem(service.getService().getItem());
        bill.getBillItems().add(billItem);
        SQLMapHolder.sqlMap.insert("insertBillItem", billItem);
      }
      SQLMapHolder.sqlMap.commitTransaction();
      Map params = new HashMap(1);
      params.put("BILL", bill);
View Full Code Here

Examples of de.scoopgmbh.copper.monitoring.example.adapter.Bill

          billableServices.add(((BillableService)response.getResponse()));
        }
      }
      for(Response<?> response: all){
        if (response.getResponse() instanceof Bill){
          Bill bill = ((Bill)response.getResponse());
          BigDecimal sum = new BigDecimal(0);
          for (BillableService billableService: billableServices){
            sum = sum.add(billableService.getAmount());
          }
          bill.setTotalAmount(sum);
          billAdapter.publishBill(bill);
          billableServices.clear();
        }
      }
     
View Full Code Here

Examples of gov.nysenate.openleg.model.Bill

            // Normally it is always sent to the base bill and broadcasted to amendments
            // In our 2009 data set we are missing tons of base amendments and it actually
            // needs to be broadcasted backwards to the original bill.
            // Make sure we are in the amendment list and that if we are active, that no one else is
            for (String versionKey : bill.getAmendments()) {
                Bill billVersion = storage.getBill(versionKey);
                if (!billVersion.getAmendments().contains(bill.getBillId())) {
                    billVersion.addAmendment(bill.getBillId());
                }
                if (bill.isActive()) {
                    billVersion.setActive(false);
                }
                billVersion.setSponsor(bill.getSponsor());
                billVersion.setCoSponsors(bill.getCoSponsors());
                billVersion.setOtherSponsors(bill.getOtherSponsors());
                billVersion.setMultiSponsors(bill.getMultiSponsors());
                billVersion.setLawSection(bill.getLawSection());
                billVersion.setLaw(bill.getLaw());
                billVersion.setSummary(bill.getSummary());
                storage.set(billVersion);
                ChangeLogger.record(storage.key(billVersion), storage);
            }
            if (bill.isUniBill()) {
                // Uni bills share text, always sent to the senate bill.
                Bill uniBill = storage.getBill(bill.getSameAs());
                if (uniBill != null) {
                    String billText = bill.getFulltext();
                    String uniBillText = uniBill.getFulltext();

                    if (billText.isEmpty()) {
                        if (!uniBillText.isEmpty()) {
                            // if we are empty then we must need their text
                            bill.setFulltext(uniBillText);
                        }
                    }
                    else if (!billText.equals(uniBillText)) {
                        // If we differ, then we must have just changed, share the text
                        uniBill.setFulltext(bill.getFulltext());
                    }
                    storage.set(uniBill);
                }
            }

            storage.set(bill);
            ChangeLogger.record(storage.key(bill), storage);
        }
        else {
            // When saving an unpublished bill make sure that references to it are removed
            // from other bills and find a new bill to make active.
            List<String> amendments = bill.getAmendments();
            if (amendments.size() > 0) {
                // This assumes that the last amendment on the list is the most recent one.
                // TODO: In rare cases with multiple substitutions this might not be the right thing to do!
                String newActiveBill = amendments.get(amendments.size()-1);

                // Remove all references to the unpublished bill from other versions.
                for (String versionKey : bill.getAmendments()) {
                    Bill billVersion = storage.getBill(versionKey);
                    billVersion.removeAmendment(bill.getBillId());
                    if (bill.isActive() && versionKey.equals(newActiveBill)) {
                        billVersion.setActive(true);
                    }
                    storage.set(billVersion);
                    ChangeLogger.record(storage.key(billVersion), storage);
                }
            }
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.