X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fitems_cart.inc;h=12e1ab244694ddbc2f9673aa43205ed4d1f3b06b;hb=7b398ba8033a22ceaf057692ea3b5338c8bd3ea7;hp=b0d3a609cd30d5c9a9a53d5b63d6e04bf4fb6bf4;hpb=273c1123941a13bc2975756732d0216150d88380;p=fa-stable.git diff --git a/includes/ui/items_cart.inc b/includes/ui/items_cart.inc index b0d3a609..12e1ab24 100644 --- a/includes/ui/items_cart.inc +++ b/includes/ui/items_cart.inc @@ -113,13 +113,16 @@ class items_cart return false; } - function update_gl_item($index, $dimension_id, $dimension2_id, $amount, $reference, $description=null) + function update_gl_item($index, $code_id, $dimension_id, $dimension2_id, $amount, $reference, $description=null) { + $this->gl_items[$index]->code_id = $code_id; $this->gl_items[$index]->dimension_id = $dimension_id; $this->gl_items[$index]->dimension2_id = $dimension2_id; $this->gl_items[$index]->amount = $amount; $this->gl_items[$index]->reference = $reference; - if ($description != null) + if ($description == null) + $this->gl_items[$index]->description = get_gl_account_name($code_id); + else $this->gl_items[$index]->description = $description; } @@ -218,7 +221,9 @@ class line_item function check_qoh($location, $date_, $reverse) { - if (!sys_prefs::allow_negative_stock()) + global $SysPrefs; + + if (!$SysPrefs->allow_negative_stock()) { if (has_stock_holding($this->mb_flag)) {