Fix displayed required date
[order_line_extra.git] / includes / order_lines.inc
index dc09a6bcf57d12ddd710fbadfdaa24ebf310e22e..891da684cd16f4e064109f87f0ac69bcaa64502b 100644 (file)
@@ -196,7 +196,7 @@ function get_order_summary($location) {
        , sum(sub.amount) as amount
        , sum(greatest(least(sub.quantity, qoh.quantity - quantity_before), 0))
        , sum(sub.amount*greatest(least(sub.quantity, qoh.quantity - quantity_before), 0)/sub.quantity)
-       ,  `min(required_date)`
+       ,  min(`min(required_date)`)
        , group_concat(distinct order_comment separator ';') as order_comment
        , group_concat(distinct detail_comment separator ';') as detail_comment
                                FROM $sub sub