X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fdb%2Fpo_db.inc;h=a904c2ff4b396cf47135975c05b31b6362a7dd61;hb=97c5e11dd178b2b10edd2b99276b3347470fafc8;hp=0afbe1626292c98bac2236a586afdabf2948e650;hpb=9a101a373c2b0575d65c481724d857298ec06fe9;p=fa-stable.git diff --git a/purchasing/includes/db/po_db.inc b/purchasing/includes/db/po_db.inc index 0afbe162..a904c2ff 100644 --- a/purchasing/includes/db/po_db.inc +++ b/purchasing/includes/db/po_db.inc @@ -294,6 +294,8 @@ function get_sql_for_po_search_completed($from, $to, $supplier_id=ALL_TEXT, $loc porder.ord_date, supplier.curr_code, Sum(line.unit_price*line.quantity_ordered) AS OrderValue, + Sum(line.delivery_date < '". date2sql(Today()) ."' + AND (line.quantity_ordered > line.quantity_received)) As OverDue, porder.into_stock_location, chk.isopen FROM ".TB_PREF."purch_orders as porder