+ # if the join condition in these blocks are met, the column
+ # of the scecified table will gently override (coalesce actually) the original value
+ # use it to conditionally coalesce values from subtables
+ my @column_override = (
+ # column name, prefix, joins_needed
+ [ 'description', 'ioi.', 'invoice_oi' ],
+ [ 'deliverydate', 'ioi.', 'invoice_oi' ],
+ [ 'transdate' , 'apoe.', 'apoe' ],
+ [ 'unit' , 'ioi.', 'invoice_oi' ],
+ );
+
+ # careful with renames. these are HARD, and any filters done on the original column will break