make sure cancelled orders are not shown as open
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Mon, 12 Jul 2010 19:17:01 +0000 (19:17 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Mon, 12 Jul 2010 19:17:01 +0000 (19:17 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@559 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/mwin/orderstab.cpp

index b275390..43e46ca 100644 (file)
@@ -118,11 +118,16 @@ qint64 MOrdersTab::oldestOrderStamp(int age)
 //helper: finds out whether an order should be printed.
 static inline bool candoUpdateOrders(int omode,const MOOrderInfo&ord)
 {
+       //show all?
        if(omode==ORDERALL)return true;
+       //do not show cancelled ones per default
+       if(ord.isCancelled())return false;
+       //select by mask
        if((omode&ORDERPAY)!=0 && ord.needsPayment())return true;
        if((omode&ORDERREFUND)!=0 && ord.needsRefund())return true;
        if((omode&ORDERUNSENT)!=0 && !ord.isSent())return true;
        if((omode&ORDERRESERVE)!=0 && ord.isReservation())return true;
+       //no match: ignore the entry
        return false;
 }