X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fitems_cart.inc;h=12e1ab244694ddbc2f9673aa43205ed4d1f3b06b;hb=5dc52342439c424585dec995bafcfbf0ccae829f;hp=0f8b3c35462aefee00d8531d97dee54834742958;hpb=286e6233d6d7d63fbaafea42475ecbd5f4cf0dd0;p=fa-stable.git diff --git a/includes/ui/items_cart.inc b/includes/ui/items_cart.inc index 0f8b3c35..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; }