Package com.rakaizsys.eims.model.finance

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

TOP

Related Classes of com.rakaizsys.eims.model.finance.Bill

Copyright © 2018 www.massapicom. 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.