.getElementAt(index);
if (ApplicationParamUtil.getNotPackageList().indexOf(
orderLine.getArticleName()) < 0) {
Colli currentColli = ((ColliModel) presentationModel.getBean())
.getObject();
((ColliManager) overviewManager).lazyLoad(currentColli,
new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_LINES,
LazyLoadEnum.NONE } });
Set<OrderLine> orderLines = currentColli.getOrderLines();
if (orderLines == null) {
orderLines = new HashSet<OrderLine>();
}
boolean success = orderLines.remove(orderLine);
if (success) {
orderLine.setColli(null);
currentColli.setOrderLines(orderLines);
if (orderLines.size() == 0) {
currentColli.setPackageDate(null);
}
((ColliManager) overviewManager).saveColli(currentColli);
managerRepository.getOrderLineManager().saveOrderLine(
orderLine);
orderLineList.remove(orderLine);
Order order = currentColli.getOrder();
if (order != null) {
managerRepository.getOrderLineManager().refreshOrder(
order);
order.setOrderComplete(null);
try {
managerRepository.getOrderLineManager().saveOrder(
order);
} catch (ProTransException e) {
Util
.showErrorDialog(window, "Feil", e
.getMessage());
e.printStackTrace();
}
} else {
PostShipment postShipment = currentColli
.getPostShipment();
if (postShipment != null) {
PostShipmentManager postShipmentManager = (PostShipmentManager) ModelUtil
.getBean("postShipmentManager");
postShipment.setPostShipmentComplete(null);