Class MergeOrderPositionsTask

java.lang.Object
ch.tocco.nice2.optional.order.api.action.invoice.tasks.AbstractOrderGeneratorTask
ch.tocco.nice2.optional.order.spi.action.invoice.tasks.MergeOrderPositionsTask
All Implemented Interfaces:
OrderGeneratorTask, PersistTask<Tuple3<Entity,InvoicePropertiesContribution,Collection<OrderGeneratorBean>>,Tuple3<Entity,InvoicePropertiesContribution,Collection<OrderGeneratorBean>>>

@Component public class MergeOrderPositionsTask extends AbstractOrderGeneratorTask
this task merges Order_position entities if all relations and field on the detail form are the same, except: - nr - quantity - total_net - total_vat - total_gross - relOrder (we only get Order_position entities from the same orders anyway) while merging, the quantity and discount fields from two order positions are added up