X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fcart_class.inc;h=1f54a613b487ef5f065ff1350010a4131187c00e;hb=c2f32b7b39e8c21c29f66fee832938b2ad2f31cb;hp=96faeb1ca0e765287f20aa95ebae52b0db616d43;hpb=b6af4ea4c99734cfd051395289107bbba5a405e9;p=fa-stable.git diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index 96faeb1c..1f54a613 100644 --- a/sales/includes/cart_class.inc +++ b/sales/includes/cart_class.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ /* Definition of the cart class this class can hold all the information for: @@ -17,7 +26,7 @@ class cart var $trans_type; // invoice, order, delivery note ... var $trans_no = array();// array (num1=>ver1,..) or 0 for new var $so_type = 0; // for sales order: simple=0 template=1 - + var $cart_id; // used to detect multi-tab edition conflits var $line_items; //array of objects of class line_details var $src_docs = array(); // array of arrays(num1=>ver1,...) or 0 for no src @@ -77,6 +86,7 @@ class cart $this->dimension_id = 0; $this->dimension2_id = 0; $this->read($type, $trans_no, $view ); + $this->cart_id = uniqid(''); } //------------------------------------------------------------------------- @@ -179,7 +189,7 @@ class cart if ($this->cash) { $this->Location = $pos['pos_location']; $this->location_name = $pos['location_name']; - $this->cash_account = $pos['account_code']; + $this->cash_account = $pos['pos_account']; $this->account_name = $pos['bank_account_name']; } } else @@ -291,8 +301,10 @@ class cart return 0; } - function update_cart_item($line_no, $qty, $price, $disc) + function update_cart_item($line_no, $qty, $price, $disc, $description="") { + if ($description != "") + $this->line_items[$line_no]->item_description = $description; $this->line_items[$line_no]->quantity = $qty; $this->line_items[$line_no]->qty_dispatched = $qty; $this->line_items[$line_no]->price = $price;