Fixed multiply sales document view link generation.
[fa-stable.git] / includes / ui / items_cart.inc
index 6a535725a0188bdb93ef416534b0d0e72a1eb5d8..a2d3e2d2e9a971494eee82baa76baa6d5de04872 100644 (file)
@@ -5,7 +5,7 @@ include_once($path_to_root . "/inventory/includes/inventory_db.inc");
 
 class items_cart
 {
-
+       var $trans_type;
        var $line_items;
        var $gl_items;
 
@@ -24,8 +24,9 @@ class items_cart
        var $person_id;
        var $branch_id;
 
-       function items_cart()
+       function items_cart($type)
        {
+               $this->trans_type = $type;
                $this->clear_items();
        }
 
@@ -82,6 +83,7 @@ class items_cart
                        if ($item_ret != null)
                                return $line_no;
                }
+               return -1;
        }
 
        // ----------- GL item functions