BigDecimal net, BigDecimal vat, BigDecimal gross, BillType type,
String breakdown) throws HttpException {
setReference(reference);
setAccount(account);
if (issueDate == null) {
throw new InternalException("The issue date may not be null.");
}
setIssueDate(issueDate);
if (startDate.getDate().after(finishDate.getDate())) {
throw new UserException("The bill start date " + startDate
+ " can't be after the finish date " + finishDate + ".");
}
setStartDate(startDate);
setFinishDate(finishDate);
if (kwh == null) {
throw new InternalException("kwh can't be null.");
}
setKwh(kwh);
setNet(net);
setVat(vat);
setGross(gross);
if (type == null) {
throw new InternalException("Type can't be null.");
}
setType(type);
setBreakdown(breakdown);
}