"Batch Reference", values, 2);
Batch batch = contract.getBatch(batchReference);
String mpanCoreStr = GeneralImport.addField(csvElement,
"Mpan Core", values, 3);
MpanCore mpanCore = MpanCore.getMpanCore(mpanCoreStr);
String issueDateStr = GeneralImport.addField(csvElement,
"Issue Date", values, 4);
Date issueDate = new MonadDate(issueDateStr).getDate();
String startDateStr = GeneralImport.addField(csvElement,
"Start Date", values, 5);
HhStartDate startDate = new HhStartDate(startDateStr);
String finishDateStr = GeneralImport.addField(csvElement,
"Finish Date", values, 6);
HhStartDate finishDate = new HhStartDate(finishDateStr);
String netStr = GeneralImport
.addField(csvElement, "Net", values, 7);
BigDecimal net = new BigDecimal(netStr);
String vatStr = GeneralImport
.addField(csvElement, "Vat", values, 8);
BigDecimal vat = new BigDecimal(vatStr);
String grossStr = GeneralImport.addField(csvElement, "Gross",
values, 9);
BigDecimal gross = new BigDecimal(grossStr);
String account = GeneralImport.addField(csvElement,
"Account Reference", values, 10);
String reference = GeneralImport.addField(csvElement, "Reference",
values, 11);
String typeCode = GeneralImport.addField(csvElement, "Type",
values, 12);
BillType type = BillType.getBillType(typeCode);
String breakdown = GeneralImport.addField(csvElement, "Breakdown",
values, 13);
String kwhStr = GeneralImport.addField(csvElement, "kWh", values,
14);
BigDecimal kwh = new BigDecimal(kwhStr);
Bill bill = batch.insertBill(mpanCore.getSupply(), account,
reference, issueDate, startDate, finishDate, kwh, net, vat,
gross, type, breakdown);
for (int i = 15; i < values.length; i += 11) {
String meterSerialNumber = GeneralImport.addField(csvElement,
"Meter Serial Number", values, i);