Эх сурвалжийг харах

1.修改NPD离线Cancel Order查询条件。

Pen Li 8 жил өмнө
parent
commit
13de762d3b

+ 14 - 4
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -8777,8 +8777,13 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         NSArray *order_status_array = [orderStatus componentsSeparatedByString:@","];
         if (order_status_array.count == 1) {
             int status_value = [[order_status_array firstObject] integerValue];
-            if (status_value <= 1 || status_value == 3) {
-                where = [where stringByAppendingString:[NSString stringWithFormat:@" and o.status = %d",status_value]];
+            if (status_value <= 1 || status_value == 3 || status_value == 15) {
+                
+                if (status_value == 15 || status_value == 3) {
+                    where = [where stringByAppendingString:[NSString stringWithFormat:@" and (o.status = 3 or o.erpOrderStatus = 15)"]];
+                } else {
+                    where = [where stringByAppendingString:[NSString stringWithFormat:@" and o.status = %d",status_value]];
+                }
             } else {
                 where = [where stringByAppendingString:[NSString stringWithFormat:@" and o.erpOrderStatus = %d",status_value]];
             }
@@ -8794,8 +8799,13 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 //                where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %@",condition,status]];
                 
                 int status_value = [status integerValue];
-                if (status_value <= 1 || status_value == 3) {
-                    where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %d",condition,status_value]];
+                if (status_value <= 1 || status_value == 3 || status_value == 15) {
+                    
+                    if (status_value == 15 || status_value == 3) {
+                        where = [where stringByAppendingString:[NSString stringWithFormat:@" %@ (o.status = 3 or o.erpOrderStatus = 15)",condition]];
+                    } else {
+                        where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %d",condition,status_value]];
+                    }
                 } else {
                     where = [where stringByAppendingString:[NSString stringWithFormat:@" %@ o.erpOrderStatus = %d",condition,status_value]];
                 }