Просмотр исходного кода

160928
Fix: offline sync, submit order missing.

Ray Zhang 9 лет назад
Родитель
Сommit
f8d9132b8b
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

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

@@ -26,12 +26,12 @@
     
     
     NSDateFormatter* formatter = [[NSDateFormatter alloc]init];
-    [formatter setDateFormat:@"yyyyMMdd"];
+    [formatter setDateFormat:@"yyMMdd"];
     NSString* date = [formatter stringFromDate:[NSDate date]];
     for(int i=1;i<999;i++)
     {
         
-        soid=[NSString stringWithFormat:@"OFF%@%3d",date,i];
+        soid=[NSString stringWithFormat:@"OFF%@%4d",date,i];
         soid= [soid stringByReplacingOccurrencesOfString:@" " withString:@"0"];
         int count=[iSalesDB get_recordcount:db table:@"offline_order" where:[NSString stringWithFormat:@"so_id='%@'",soid]];
         if(count==0)
@@ -539,7 +539,7 @@
             count++;
         }
         
-        ret[@"count"]=[NSNumber numberWithInt:arr_soid.count ];
+        ret[@"count"]=[NSNumber numberWithInt:count ];
         ret[@"result"]=[NSNumber numberWithInt:RESULT_TRUE ];
         
     }