View | Details | Raw Unified | Return to bug 18736
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-4 / +2 lines)
Lines 2183-2193 sub GetLateOrders { Link Here
2183
        AND aqbasket.closedate IS NOT NULL
2183
        AND aqbasket.closedate IS NOT NULL
2184
        AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00')
2184
        AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00')
2185
    ";
2185
    ";
2186
    my ($round_sql_start,$round_sql_end) = _get_rounding_sql();
2187
    if ($dbdriver eq "mysql") {
2186
    if ($dbdriver eq "mysql") {
2188
        $select .= "
2187
        $select .= "
2189
        aqorders.quantity - COALESCE(aqorders.quantityreceived,0)                 AS quantity,
2188
        aqorders.quantity - COALESCE(aqorders.quantityreceived,0)                 AS quantity,
2190
        (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * $round_sql_start aqorders.rrp $round_sql_end AS subtotal,
2189
        (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * " . _get_rounding_sql("aqorders.rrp") . " AS subtotal,
2191
        DATEDIFF(CAST(now() AS date),closedate) AS latesince
2190
        DATEDIFF(CAST(now() AS date),closedate) AS latesince
2192
        ";
2191
        ";
2193
        if ( defined $delay ) {
2192
        if ( defined $delay ) {
Lines 2199-2205 sub GetLateOrders { Link Here
2199
        # FIXME: account for IFNULL as above
2198
        # FIXME: account for IFNULL as above
2200
        $select .= "
2199
        $select .= "
2201
                aqorders.quantity                AS quantity,
2200
                aqorders.quantity                AS quantity,
2202
                aqorders.quantity * $round_sql_start aqorders.rrp $round_sql_end AS subtotal,
2201
                aqorders.quantity * "._get_rounding_sql("aqorders.rrp")." AS subtotal,
2203
                (CAST(now() AS date) - closedate)            AS latesince
2202
                (CAST(now() AS date) - closedate)            AS latesince
2204
        ";
2203
        ";
2205
        if ( defined $delay ) {
2204
        if ( defined $delay ) {
2206
- 

Return to bug 18736