private void addIndirectAdvanceAssignments(OrderElement orderElement) {
orderElement
.removeDirectAdvancesInList(getDirectAdvanceAssignmentsAndAllInAncest());
for (DirectAdvanceAssignment directAdvanceAssignment : orderElement.directAdvanceAssignments) {
IndirectAdvanceAssignment indirectAdvanceAssignment = IndirectAdvanceAssignment
.create();
indirectAdvanceAssignment.setAdvanceType(directAdvanceAssignment
.getAdvanceType());
indirectAdvanceAssignment.setOrderElement(this);
this.addIndirectAdvanceAssignment(indirectAdvanceAssignment);
}
if (orderElement instanceof OrderLineGroup) {
for (IndirectAdvanceAssignment indirectAdvanceAssignment : ((OrderLineGroup) orderElement)