public ReceiptHeader createUnsavedReceiptHeader(String receiptnumber,char receiptType,String refNum,String statusCode,User user,EgwStatus status) throws NumberFormatException {
  ReceiptHeader receiptHeader=new ReceiptHeader();
  receiptHeader.setReceipttype(receiptType);
  if (receiptnumber != null) {
    receiptHeader.setReceiptnumber(receiptnumber + getRandomNumber());
  }
  receiptHeader.setReferencenumber(refNum);
  receiptHeader.setConsumerCode("10-10-111-20");
  receiptHeader.setService(createServiceDetails());
  receiptHeader.setCreatedDate(new Date());
  receiptHeader.setLastModifiedDate(new Date());
  receiptHeader.setCreatedBy(user);
  receiptHeader.setLastModifiedBy(user);
  receiptHeader.setIsReconciled(false);
  receiptHeader.setManualreceiptnumber("292929");
  if (status == null) {
    receiptHeader.setStatus(createEgwStatus(statusCode,CollectionConstants.MODULE_NAME_RECEIPTHEADER));
  }
 else {
    receiptHeader.setStatus(status);
  }
  receiptHeader.setPaidBy("Test Payee");
  receiptHeader.setReceiptMisc(createUnSavedReceiptMisc(receiptHeader));
  receiptHeader.addReceiptDetail(createUnsavedReceiptDetail(createCOA("1100201"),BigDecimal.valueOf(100.00),BigDecimal.ZERO,createFunction("Test Function"),1L,"testGLCodeDescription",receiptHeader,true));
  return receiptHeader;
}

public ReceiptHeader createUnsavedReceiptHeader ( String receiptnumber , char receiptType , String refNum , String statusCode , User user , EgwStatus status ) throws NumberFormatException { ReceiptHeader receiptHeader = new ReceiptHeader ( ) ; receiptHeader . setReceipttype ( receiptType ) ; if ( receiptnumber != null ) { receiptHeader . setReceiptnumber ( receiptnumber + getRandomNumber ( ) ) ; } receiptHeader . setReferencenumber ( refNum ) ; receiptHeader . setConsumerCode ( "10-10-111-20" ) ; receiptHeader . setService ( createServiceDetails ( ) ) ; receiptHeader . setCreatedDate ( new Date ( ) ) ; receiptHeader . setLastModifiedDate ( new Date ( ) ) ; receiptHeader . setCreatedBy ( user ) ; receiptHeader . setLastModifiedBy ( user ) ; receiptHeader . setIsReconciled ( false ) ; receiptHeader . setManualreceiptnumber ( "292929" ) ; if ( status == null ) { receiptHeader . setStatus ( createEgwStatus ( statusCode , CollectionConstants . MODULE_NAME_RECEIPTHEADER ) ) ; } else { receiptHeader . setStatus ( status ) ; } receiptHeader . setPaidBy ( "Test Payee" ) ; receiptHeader . setReceiptMisc ( createUnSavedReceiptMisc ( receiptHeader ) ) ; receiptHeader . addReceiptDetail ( createUnsavedReceiptDetail ( createCOA ( "1100201" ) , BigDecimal . valueOf ( 100.00 ) , BigDecimal . ZERO , createFunction ( "Test Function" ) , 1L , "testGLCodeDescription" , receiptHeader , true ) ) ; return receiptHeader ; }
creates a receipt header with given details
