Przeglądaj źródła

修复离线在缺货Model Detail中Check For Saved Order后返回Category时数据为空。
修复New Order时先清除了Order Code,在New Order不成功时界面错误。

Pen Li 9 lat temu
rodzic
commit
5ec5098be9

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


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

@@ -7299,7 +7299,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         NSString *price = params[@"price"];
         price_min = 0;
         price_max = MAXFLOAT;
-        if (appDelegate.user) {
+        if (appDelegate.user && price != nil) {
             NSArray *priceTypeArray = [self get_contact_default_price_type:nil db:db];
             NSMutableString *priceName = [NSMutableString string];
             for (int i = 0; i < priceTypeArray.count; i++) {
@@ -7351,7 +7351,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         where =[NSString stringWithFormat:@"%@ %@ %@ %@ %@ %@ and is_active = 1",cateWhere,best_seller,alert,available_condition,qty,price];
         
     }
-    
+    DebugLog(@"offline category where: %@",where);
     count = [iSalesDB get_recordcount:db table:@"product" where:where];
     
     if (!appDelegate.user) {

+ 2 - 2
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -747,8 +747,8 @@
         
         if(appDelegate.order_code && appDelegate.order_code.length>0)
         {
-            appDelegate.order_code= nil;
-            [appDelegate SetSo:nil];
+//            appDelegate.order_code= nil;
+//            [appDelegate SetSo:nil];
             
             if (appDelegate.user_type == USER_ROLE_EMPLOYEE) {
                 //     MainViewController* main_vc=(MainViewController*)appDelegate.main_vc;