qty => [ 'qty' ],
ordnumber => [ 'order.ordnumber' ],
customer => [ 'lower(customer.name)', ],
- position => [ 'trans_id', 'runningnumber' ],
+ position => [ 'trans_id', 'position' ],
reqdate => [ 'COALESCE(orderitems.reqdate, order.reqdate)' ],
orddate => [ 'order.orddate' ],
- sellprice => [ 'sellprice' ],
- discount => [ 'discount' ],
+ sellprice => [ 'orderitems.sellprice' ],
+ discount => [ 'orderitems.discount' ],
transdate => [ 'orderitems.transdate::date', 'order.reqdate' ],
},
default => [ 'position', 1 ],