[0000099] New line added to inventory adjustment/transfer sometimes
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 10 Dec 2008 13:12:21 +0000 (13:12 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 10 Dec 2008 13:12:21 +0000 (13:12 +0000)
overwrites old one.

CHANGELOG.txt
includes/ui/items_cart.inc

index 463b46b8f1670f73f4a7fa13096afaa2b9d19d14..60355f1ddbf2da6ccd98c19346b7c0eb066277ad 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+10-Dec-2008 Janusz Dobrowolski
+# [0000099] New line added to inventory transfer/adjustment sometimes overwrites old one.
+$ /inlucdes/ui/items_cart.inc
+
 09-Dec-2008 Janusz Dobrowolski
 # [0000098] Unable issue of credit note for invoice with removed item lines.
 $ /sales/customer_credit_invoice.php
index a2d3e2d2e9a971494eee82baa76baa6d5de04872..a526852af00021dffd601b979dd8e82b22062307 100644 (file)
@@ -67,7 +67,7 @@ class items_cart
 
        function remove_from_cart($line_no)
        {
-                       unset($this->line_items[$line_no]);
+               array_splice($this->line_items, $line_no, 1);
        }
 
        function count_items()
@@ -123,7 +123,7 @@ class items_cart
        {
                if (isset($index))
                {
-                       unset($this->gl_items[$index]);
+                       array_splice($this->gl_items, $line_no, 1);
                }
        }