From d20bc96e4f89bc579877d61d064837883f4b9877 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 10 Dec 2008 13:12:21 +0000 Subject: [PATCH] [0000099] New line added to inventory adjustment/transfer sometimes overwrites old one. --- CHANGELOG.txt | 4 ++++ includes/ui/items_cart.inc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 463b46b8..60355f1d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/includes/ui/items_cart.inc b/includes/ui/items_cart.inc index a2d3e2d2..a526852a 100644 --- a/includes/ui/items_cart.inc +++ b/includes/ui/items_cart.inc @@ -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); } } -- 2.30.2