Changed direct sales document line descriptions to be editable (via edit link)
[fa-stable.git] / sales / includes / cart_class.inc
index ce885a3285e12ce72f53a91f4670d322353cc9b2..1f54a613b487ef5f065ff1350010a4131187c00e 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
 /* Definition of the cart class
 this class can hold all the information for:
 
@@ -292,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;