X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fcart_class.inc;h=ce885a3285e12ce72f53a91f4670d322353cc9b2;hb=c4424cf66138c50851e9f73ee2f30b6b32e6d182;hp=628ab43a3ea5e3fd34ea59ed2f03db2b65e769db;hpb=fd59c60718609c1bf3240a303030167a4f1b1885;p=fa-stable.git diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index 628ab43a..ce885a32 100644 --- a/sales/includes/cart_class.inc +++ b/sales/includes/cart_class.inc @@ -17,7 +17,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 +77,7 @@ class cart $this->dimension_id = 0; $this->dimension2_id = 0; $this->read($type, $trans_no, $view ); + $this->cart_id = uniqid(''); } //------------------------------------------------------------------------- @@ -179,7 +180,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 @@ -306,7 +307,7 @@ class cart function remove_from_cart($line_no) { - unset($this->line_items[$line_no]); + array_splice($this->line_items, $line_no, 1); } function clear_items()