fix: when changing reservation to order do not re-order cancelled tickets
authorKonrad Rosenbaum <konrad@silmor.de>
Thu, 21 Nov 2013 17:24:20 +0000 (18:24 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Thu, 21 Nov 2013 17:24:20 +0000 (18:24 +0100)
www/inc/wext/order.php

index e1165b9..d48acc6 100644 (file)
@@ -475,8 +475,10 @@ class WOOrder extends WOOrderAbstract
                //change tickets
                $ticks=WTticket::selectFromDB("orderid=".$db->escapeInt($ord->orderid));
                foreach($ticks as $tick){
-                       $tick->status=WTticket::Ordered;
-                       $tick->update();
+                        if($tick->status==WTticket::Reserved){
+                                $tick->status=WTticket::Ordered;
+                                $tick->update();
+                       }
                }
                //return
                $order=WOOrder::fromTableorder($ord);