Fixed GET continuation after timeot and logout page access without authorization.
[fa-stable.git] / purchasing / includes / db / po_db.inc
index ca67638f05b537832dfdb89c3160173c0413d8cd..1f5f57504a17fae58880bfdb6bb0b057a06a3804 100644 (file)
@@ -24,6 +24,8 @@ function delete_po($po)
 
 function add_po(&$po_obj)
 {
+       global $Refs;
+
        begin_transaction();
 
      /*Insert to purchase order header record */
@@ -56,11 +58,11 @@ function add_po(&$po_obj)
        }
      }
 
-       references::save(systypes::po(), $po_obj->order_no, $po_obj->reference);
+       $Refs->save(ST_PURCHORDER, $po_obj->order_no, $po_obj->reference);
 
-       //add_comments(systypes::po(), $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments);
+       //add_comments(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments);
 
-       add_audit_trail(systypes::po(), $po_obj->order_no, $po_obj->orig_order_date);
+       add_audit_trail(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date);
        commit_transaction();
 
        return $po_obj->order_no;
@@ -116,7 +118,7 @@ function update_po(&$po_obj)
                db_query($sql, "One of the purchase order detail records could not be updated");
     }
 
-       //add_comments(systypes::po(), $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments);
+       //add_comments(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments);
 
        commit_transaction();
 
@@ -189,8 +191,8 @@ function read_po_items($order_no, &$order, $open_items_only=false)
                {
                        if ($data['supplier_description'] != "")
                                $myrow['description'] = $data['supplier_description'];
-                       if ($data['suppliers_uom'] != "")
-                               $myrow['units'] = $data['suppliers_uom'];
+                       //if ($data['suppliers_uom'] != "")
+                       //      $myrow['units'] = $data['suppliers_uom'];
                }               
             if (is_null($myrow["units"]))
             {