Error: no supplier trans found for given params in Supplier Payment. Fixed.
[fa-stable.git] / purchasing / includes / db / po_db.inc
index 115b73f1f8381c051177fe539712cfb3161479be..23f19a09f582b81b56c8b63ca2df6244ac19a60c 100644 (file)
@@ -160,6 +160,15 @@ function update_po(&$po_obj)
 
 //----------------------------------------------------------------------------------------
 
+function get_po($order_no) {
+    $sql = "SELECT * FROM ".TB_PREF."purch_orders WHERE order_no = ".db_escape($order_no);
+    $result = db_query($sql);
+
+    return db_fetch($result);
+}
+
+//----------------------------------------------------------------------------------------
+
 function read_po_header($order_no, &$order)
 {
        $sql = "SELECT po.*, supplier.*, loc.location_name