private String populateLineItemAdditionalCharge(LineItemOrder lineItemOrder) { if (lineItemOrder.getAllowanceMonetaryDetail() != null) { if (lineItemOrder .getAllowanceMonetaryDetail() .get(0) .getAllowanceMonetaryLineItemInformation() != null) { return "0"; // lineItemOrder.getAllowanceMonetaryDetail().get(0).getAllowanceMonetaryLineItemInformation().get(0).getAmount(); } } return null; }
private List getItemNote(LineItemOrder lineItemOrder) { List itemNoteList = new ArrayList(); if (lineItemOrder.getItemDescriptionList() != null && lineItemOrder.getItemDescriptionList().size() > 0) { for (int itemNote = 0; itemNote < lineItemOrder.getItemDescriptionList().size(); itemNote++) { if (lineItemOrder.getItemDescriptionList().get(itemNote).getItemCharacteristicCode() != null && lineItemOrder .getItemDescriptionList() .get(itemNote) .getItemCharacteristicCode() .contains("08")) { OleInvoiceNote oleInvoiceNote = new OleInvoiceNote(); oleInvoiceNote.setNote(lineItemOrder.getItemDescriptionList().get(itemNote).getData()); itemNoteList.add(oleInvoiceNote); } } } if (lineItemOrder.getAllowanceMonetaryDetail() != null) { if (lineItemOrder .getAllowanceMonetaryDetail() .get(0) .getAllowanceMonetaryLineItemInformation() != null) { OleInvoiceNote oleInvoiceNote = new OleInvoiceNote(); oleInvoiceNote.setNote( "The service charge for this item is $" + lineItemOrder .getAllowanceMonetaryDetail() .get(0) .getAllowanceMonetaryLineItemInformation() .get(0) .getAmount()); itemNoteList.add(oleInvoiceNote); } } return itemNoteList; }