Lines 2186-2192
sub GetLateOrders {
Link Here
|
2186 |
if ($dbdriver eq "mysql") { |
2186 |
if ($dbdriver eq "mysql") { |
2187 |
$select .= " |
2187 |
$select .= " |
2188 |
aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, |
2188 |
aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, |
2189 |
(aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * " . _get_rounding_sql("aqorders.rrp") . " AS subtotal, |
2189 |
(aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, |
2190 |
DATEDIFF(CAST(now() AS date),closedate) AS latesince |
2190 |
DATEDIFF(CAST(now() AS date),closedate) AS latesince |
2191 |
"; |
2191 |
"; |
2192 |
if ( defined $delay ) { |
2192 |
if ( defined $delay ) { |
Lines 2198-2204
sub GetLateOrders {
Link Here
|
2198 |
# FIXME: account for IFNULL as above |
2198 |
# FIXME: account for IFNULL as above |
2199 |
$select .= " |
2199 |
$select .= " |
2200 |
aqorders.quantity AS quantity, |
2200 |
aqorders.quantity AS quantity, |
2201 |
aqorders.quantity * "._get_rounding_sql("aqorders.rrp")." AS subtotal, |
2201 |
aqorders.quantity * aqorders.rrp AS subtotal, |
2202 |
(CAST(now() AS date) - closedate) AS latesince |
2202 |
(CAST(now() AS date) - closedate) AS latesince |
2203 |
"; |
2203 |
"; |
2204 |
if ( defined $delay ) { |
2204 |
if ( defined $delay ) { |
2205 |
- |
|
|