Fixed sql error during sales order line update with line cancelation.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 30 Aug 2009 16:13:45 +0000 (16:13 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 30 Aug 2009 16:13:45 +0000 (16:13 +0000)
CHANGELOG.txt
sales/includes/db/sales_order_db.inc

index 7a08f0372f27eed10c0a3c96df72df67868a2418..0e20b4367f29986343266d6a6ff50229faf7a4fb 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+30-Aug-2009 Janusz Dobrowolski
+# Fixed sql error during sales order line update with line cancelation.
+$ /sales/includes/db/sales_order_db.inc
+
 ------------------------------- Release 2.1.5 ----------------------------------
 26-Aug-2009 Joe Hung
 ! Release 2.1.5
index 28aebb36edeb564b7c9e078269e28fdd9d1ee7e4..3cdceada63e519a81a63b75fb1d2152d8b6e1b6e 100644 (file)
@@ -378,11 +378,9 @@ function sales_order_has_deliveries($order_no)
 
 function close_sales_order($order_no)
 {
-       // set the quantity of each item to the already sent quantity. this will mark item as closed.
+       // set the quantity of each item to the already sent quantity. this will mark item as closed.
        $sql = "UPDATE ".TB_PREF."sales_order_details
-               SET quantity = qty_sent,
-                       type = 0,
-                       WHERE order_no = $order_no";
+               SET quantity = qty_sent WHERE order_no = $order_no";
 
        db_query($sql, "The sales order detail record could not be updated");
 }