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

hmlg scan order 1.12,修复1.11 测试发现的bug
增加拆分showroom order

Ray Zhang 3 жил өмнө
parent
commit
9b437697f5

+ 6 - 6
RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/project.pbxproj

@@ -2645,7 +2645,7 @@
 					"$(PROJECT_DIR)/common/qrcode",
 					"$(PROJECT_DIR)/common/CommonEditor",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 15.0;
 				LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib";
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
@@ -2699,7 +2699,7 @@
 					"$(PROJECT_DIR)/common/qrcode",
 					"$(PROJECT_DIR)/common/CommonEditor",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 15.0;
 				LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib";
 				SDKROOT = iphoneos;
 				TARGETED_DEVICE_FAMILY = 2;
@@ -2713,7 +2713,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 51332;
+				CURRENT_PROJECT_VERSION = 51350;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2730,7 +2730,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.11;
+				MARKETING_VERSION = 1.12;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -2757,7 +2757,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 51332;
+				CURRENT_PROJECT_VERSION = 51350;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2774,7 +2774,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.11;
+				MARKETING_VERSION = 1.12;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

+ 1 - 1
RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>HMLG Scan Order.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>2</integer>
+			<integer>6</integer>
 		</dict>
 	</dict>
 </dict>

+ 2 - 2
RedAnt ERP Mobile/HMLG Scan Order/HMLG Scan Order-Info.plist

@@ -32,9 +32,9 @@
 		<true/>
 	</dict>
 	<key>NSCameraUsageDescription</key>
-	<string>Try to use camera</string>
+	<string>To scan QR-Code</string>
 	<key>NSPhotoLibraryUsageDescription</key>
-	<string>Try to visit Photo Library</string>
+	<string>To select business card photo</string>
 	<key>UIAppFonts</key>
 	<array>
 		<string>KALINGA.TTF</string>

+ 3 - 3
RedAnt ERP Mobile/HMLG Scan Order/SO.storyboard

@@ -1551,8 +1551,8 @@ Stock</string>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name aaaaaaaaaaaaa aaaaaaaaaa BBBBB  CCCCC" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6dX-9b-w6l" userLabel="name and description">
-                                                            <rect key="frame" x="15" y="37" width="270" height="47"/>
-                                                            <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="16"/>
+                                                            <rect key="frame" x="15" y="37" width="270" height="54"/>
+                                                            <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="9999" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="V3e-A3-y8I" userLabel="qty">
@@ -1660,7 +1660,7 @@ Stock</string>
                                                         <constraint firstItem="8RN-F1-G0M" firstAttribute="centerY" secondItem="Hlt-a1-Obi" secondAttribute="centerY" id="R13-ks-goL"/>
                                                         <constraint firstItem="3Cs-3s-CCg" firstAttribute="top" secondItem="6UY-HP-ApY" secondAttribute="top" constant="11" id="RWt-7Z-Ux1"/>
                                                         <constraint firstItem="Hlt-a1-Obi" firstAttribute="trailing" secondItem="boP-G8-Lp6" secondAttribute="trailing" id="Reb-Rf-V7w"/>
-                                                        <constraint firstItem="93p-eO-r5r" firstAttribute="top" secondItem="6dX-9b-w6l" secondAttribute="bottom" constant="7" id="U4m-dk-ipl"/>
+                                                        <constraint firstItem="93p-eO-r5r" firstAttribute="top" secondItem="6dX-9b-w6l" secondAttribute="bottom" id="U4m-dk-ipl"/>
                                                         <constraint firstItem="sfo-Yw-I0g" firstAttribute="top" secondItem="3Cs-3s-CCg" secondAttribute="top" id="VHF-PX-bed"/>
                                                         <constraint firstItem="8RN-F1-G0M" firstAttribute="leading" secondItem="S0K-Bu-637" secondAttribute="trailing" constant="15" id="c2w-AI-hFk"/>
                                                         <constraint firstItem="S0K-Bu-637" firstAttribute="centerY" secondItem="Hlt-a1-Obi" secondAttribute="centerY" id="lLa-YW-blq"/>

+ 27 - 10
RedAnt ERP Mobile/HMLG Scan Order/ScanListCell.m

@@ -88,12 +88,12 @@
             NSString * unit_price;
             if(RASingleton.sharedInstance.price_type==0)
                 unit_price=_modelJson[@"price0"];
-            else if(_modelJson [@"net_price"])
-                unit_price=_modelJson[@"price3"];
             else if(_modelJson [@"special_price"])
             {
                 unit_price= _modelJson[@"price2"];
             }
+            else if(_modelJson [@"net_price"])
+                unit_price=_modelJson[@"price3"];
             else
             {
                 unit_price= _modelJson[@"price1"];
@@ -181,7 +181,8 @@
     if(![price3 isEqualToString: @"N/A"])
         price3 = [NSString stringWithFormat:@"%.2f",[_modelJson[@"price3"] doubleValue]];
 
-    if(![_modelJson [@"special_price"] boolValue]&& ![price1 isEqualToString: @"N/A"] && [price1 isEqual:price3])
+//    if(![_modelJson [@"special_price"] boolValue]&& ![price1 isEqualToString: @"N/A"] && [price1 isEqual:price3])
+    if((![price1 isEqualToString: @"N/A"] && [price1 isEqual:price3])||(![price2 isEqualToString: @"N/A"] && [price2 isEqual:price3]))
     {
 //        if(RASingleton.sharedInstance.price_type==1)
             _modelJson [@"net_price"] = @true;
@@ -229,28 +230,44 @@
     
     if([_modelJson [@"net_price"] boolValue])
     {
-        if([_modelJson[@"price1"] isEqualToString:@"N/A"])
+//        if([_modelJson[@"price1"] isEqualToString:@"N/A"])
+//        {
+//            _labelPriceNet.text=_modelJson[@"price1"];
+////            _labelPriceNCA.text=@"N/A";
+//        }
+//        else
+//        {
+//            _labelPriceNet.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
+////            _labelPriceNCA.text=@"N/A";
+//        }
+        
+        if([_modelJson[@"price3"] isEqualToString:@"N/A"])
         {
-            _labelPriceNet.text=_modelJson[@"price1"];
-            _labelPriceNCA.text=@"N/A";
+            _labelPriceNet.text=_modelJson[@"price3"];
+//            _labelPriceNCA.text=@"N/A";
         }
         else
         {
-            _labelPriceNet.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
-            _labelPriceNCA.text=@"N/A";
+            _labelPriceNet.text=[RAConvertor currencyNumber:[_modelJson[@"price3"] floatValue]];
+//            _labelPriceNCA.text=@"N/A";
         }
+        
     }
     else
+    {
+        _labelPriceNet.text=@"N/A";
+    }
+    
     {
         if([_modelJson[@"price1"] isEqualToString:@"N/A"])
         {
             _labelPriceNet.text=_modelJson[@"price1"];
-            _labelPriceNCA.text=@"N/A";
+//            _labelPriceNCA.text=@"N/A";
         }
         else
         {
             _labelPriceNCA.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
-            _labelPriceNet.text=@"N/A";
+//            _labelPriceNet.text=@"N/A";
         }
     }
     

+ 38 - 8
RedAnt ERP Mobile/HMLG Scan Order/ScanModelListCell.m

@@ -90,7 +90,8 @@
     if(![price3 isEqualToString: @"N/A"])
         price3 = [NSString stringWithFormat:@"%.2f",[_modelJson[@"price3"] doubleValue]];
 
-    if(![_modelJson [@"special_price"] boolValue]&& ![price1 isEqualToString: @"N/A"] && [price1 isEqual:price3])
+//    if(![_modelJson [@"special_price"] boolValue]&& ![price1 isEqualToString: @"N/A"] && [price1 isEqual:price3])
+    if((![price1 isEqualToString: @"N/A"] && [price1 isEqual:price3])||(![price2 isEqualToString: @"N/A"] && [price2 isEqual:price3]))
     {
 //        if(RASingleton.sharedInstance.price_type==1)
             _modelJson [@"net_price"] = @true;
@@ -123,28 +124,57 @@
     
     if([_modelJson [@"net_price"] boolValue])
     {
-        if([_modelJson[@"price1"] isEqualToString:@"N/A"])
+//        if([_modelJson[@"price1"] isEqualToString:@"N/A"])
+//        {
+//            _labelPriceNet.text=_modelJson[@"price1"];
+////            _labelPriceNCA.text=@"N/A";
+//        }
+//        else
+//        {
+//            _labelPriceNet.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
+////            _labelPriceNCA.text=@"N/A";
+//        }
+        
+        if([_modelJson[@"price3"] isEqualToString:@"N/A"])
         {
-            _labelPriceNet.text=_modelJson[@"price1"];
-            _labelPriceNCA.text=@"N/A";
+            _labelPriceNet.text=_modelJson[@"price3"];
+//            _labelPriceNCA.text=@"N/A";
         }
         else
         {
-            _labelPriceNet.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
-            _labelPriceNCA.text=@"N/A";
+            _labelPriceNet.text=[RAConvertor currencyNumber:[_modelJson[@"price3"] floatValue]];
+//            _labelPriceNCA.text=@"N/A";
         }
+        
     }
     else
+    {
+        _labelPriceNet.text=@"N/A";
+    }
+        
+
+//    {
+//        if([_modelJson[@"price1"] isEqualToString:@"N/A"])
+//        {
+//            _labelPriceNCA.text=_modelJson[@"price1"];
+////            _labelPriceNCA.text=@"N/A";
+//        }
+//        else
+//        {
+//            _labelPriceNCA.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
+////            _labelPriceNet.text=@"N/A";
+//        }
+//    }
     {
         if([_modelJson[@"price1"] isEqualToString:@"N/A"])
         {
             _labelPriceNet.text=_modelJson[@"price1"];
-            _labelPriceNCA.text=@"N/A";
+//            _labelPriceNCA.text=@"N/A";
         }
         else
         {
             _labelPriceNCA.text=[RAConvertor currencyNumber:[_modelJson[@"price1"] floatValue]];
-            _labelPriceNet.text=@"N/A";
+//            _labelPriceNet.text=@"N/A";
         }
     }
     

+ 2 - 2
RedAnt ERP Mobile/HMLG Scan Order/ScanOrderModelListViewController.m

@@ -162,12 +162,12 @@
         NSString * unit_price;
         if(RASingleton.sharedInstance.price_type==0)
             unit_price=jitem[@"price0"];
-        else if(jitem [@"net_price"])
-            unit_price=jitem[@"price3"];
         else if(jitem [@"special_price"])
         {
             unit_price= jitem[@"price2"];
         }
+        else if(jitem [@"net_price"])
+            unit_price=jitem[@"price3"];
         else
         {
             unit_price= jitem[@"price1"];

+ 84 - 80
RedAnt ERP Mobile/HMLG Scan Order/ServerSettingViewController.m

@@ -235,101 +235,105 @@
         NSString *documents = [paths objectAtIndex:0];
         
 //        NSString* file_name=[appDelegate.downloadurl lastPathComponent];
-        
-        dispatch_async(dispatch_get_global_queue(0, 0), ^{
-            
-            NSData*  download_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:appDelegate.downloadurl]];
-            dispatch_async(dispatch_get_main_queue(), ^{
-                
+        __block UIAlertController * waitalert = [RAUtils waiting_alert:self title:@"Update local data" completion:^{
+            dispatch_async(dispatch_get_global_queue(0, 0), ^{
                 
-                
-                if(download_data!=nil)
-                {
-                    
-                    [RAUtils deletefiles:[documents stringByAppendingPathComponent:@"download"]];
+                NSData*  download_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:appDelegate.downloadurl]];
+                dispatch_async(dispatch_get_main_queue(), ^{
                     
-                    NSString* file_name=[appDelegate.downloadurl lastPathComponent];
-                    NSString* path = [documents stringByAppendingPathComponent:file_name];
-                    [RAUtils saveData:download_data toPath:path];
-                    
-                    ZipArchive* zip = [[ZipArchive alloc] init];
-                    NSString* unZipTo=[documents stringByAppendingPathComponent:@"download"];
-//                    NSFileManager* fileManager=[NSFileManager defaultManager];
-//                    [fileManager removeItemAtPath:unZipTo error:nil];
-//                    NSString *unZipTo = [temp stringByAppendingPathComponent:unziplocation];
-                    //
-                    //    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-                    //    NSString *documentPath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
-                    //NSString* zipFile = [documentPath stringByAppendingString:@"/images.zip"] ;
-                    // NSString* unZipTo = img_cache;//[documentPath stringByAppendingString:@"/images"] ;
-                    
-                    DebugLog(@"path: %@",unZipTo);
-                    if( [zip UnzipOpenFile:path Password:nil] ){
-                        BOOL result = [zip UnzipFileTo:unZipTo overWrite:YES];
-                        if( NO==result )
+                    [waitalert dismissViewControllerAnimated:false completion:^{
+                        if(download_data!=nil)
                         {
-                            //            int aaa=0;
-                            //解压失败
-                          
-                            [zip UnzipCloseFile];
-                            //文件损坏,删除文件重试
                             
+                            [RAUtils deletefiles:[documents stringByAppendingPathComponent:@"download"]];
                             
-                            NSFileManager* fileManager=[NSFileManager defaultManager];
-                            //debug
-                //            BOOL blDele= [fileManager removeItemAtPath:zipFile error:nil];
-                            [fileManager removeItemAtPath:path error:nil];
-                            [fileManager removeItemAtPath:unZipTo error:nil];
-                            
-                            [RAUtils message_alert:@"Can not unzip template file, please try download again." title:@"Warrning" controller:self];
+                            NSString* file_name=[appDelegate.downloadurl lastPathComponent];
+                            NSString* path = [documents stringByAppendingPathComponent:file_name];
+                            [RAUtils saveData:download_data toPath:path];
                             
+                            ZipArchive* zip = [[ZipArchive alloc] init];
+                            NSString* unZipTo=[documents stringByAppendingPathComponent:@"download"];
+        //                    NSFileManager* fileManager=[NSFileManager defaultManager];
+        //                    [fileManager removeItemAtPath:unZipTo error:nil];
+        //                    NSString *unZipTo = [temp stringByAppendingPathComponent:unziplocation];
+                            //
+                            //    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+                            //    NSString *documentPath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
+                            //NSString* zipFile = [documentPath stringByAppendingString:@"/images.zip"] ;
+                            // NSString* unZipTo = img_cache;//[documentPath stringByAppendingString:@"/images"] ;
                             
+                            DebugLog(@"path: %@",unZipTo);
+                            if( [zip UnzipOpenFile:path Password:nil] ){
+                                BOOL result = [zip UnzipFileTo:unZipTo overWrite:YES];
+                                if( NO==result )
+                                {
+                                    //            int aaa=0;
+                                    //解压失败
+                                  
+                                    [zip UnzipCloseFile];
+                                    //文件损坏,删除文件重试
+                                    
+                                    
+                                    NSFileManager* fileManager=[NSFileManager defaultManager];
+                                    //debug
+                        //            BOOL blDele= [fileManager removeItemAtPath:zipFile error:nil];
+                                    [fileManager removeItemAtPath:path error:nil];
+                                    [fileManager removeItemAtPath:unZipTo error:nil];
+                                    
+                                    [RAUtils message_alert:@"Can not unzip template file, please try download again." title:@"Warrning" controller:self];
+                                    
+                                    
+                                    
+                                    
+                                }
+                                else
+                                {
+                                    [zip UnzipCloseFile];
+                                    
+                                    
+                                    NSFileManager *fileManager = [NSFileManager defaultManager];
+                                    [fileManager removeItemAtPath:path error:nil];
+                                    [RAUtils message_alert:@"Update template file successful." title:@"Message" controller:self];
+                                    
+        //                            [RADataProvider encrypt_scan_models];
+
+                                    NSMutableDictionary *templateDic = [NSMutableDictionary dictionary];
+                                    NSString* datetime= [RAUtils current_date_time];
+                                    templateDic[@"updatetime"]= datetime;
+                                    [self setUserDefaultsValue:templateDic forKey:@"ScanTemplate"];
+                                    [self loadTemplate];
+                                    [RADataProvider load_scan_models];
+                                    
+                                }
+                                //[zip UnzipCloseFile];
+                            }
+                            else
+                            {
+                                //打开文件失败,通常是文件路径有问题或密码错误。
+                                [RAUtils message_alert:@"Can not unzip template file, please contact the Administrator." title:@"Warrning" controller:self];
+                                
+                        //        NSFileManager *fileManager = [NSFileManager defaultManager];
+                        //        [fileManager removeItemAtPath:zipFile error:nil];
+                            }
                             
                             
+        //                    [iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
+        //
+        //                    UIImage * img =[UIImage imageWithData:downloadimg_data];
+        //                    cell.imageView.image=img;
                         }
                         else
-                        {
-                            [zip UnzipCloseFile];
-                            
-                            
-                            NSFileManager *fileManager = [NSFileManager defaultManager];
-                            [fileManager removeItemAtPath:path error:nil];
-                            [RAUtils message_alert:@"Update template file successful." title:@"Message" controller:self];
-                            
-//                            [RADataProvider encrypt_scan_models];
-
-                            NSMutableDictionary *templateDic = [NSMutableDictionary dictionary];
-                            NSString* datetime= [RAUtils current_date_time];
-                            templateDic[@"updatetime"]= datetime;
-                            [self setUserDefaultsValue:templateDic forKey:@"ScanTemplate"];
-                            [self loadTemplate];
-                            [RADataProvider load_scan_models];
-                            
-                        }
-                        //[zip UnzipCloseFile];
-                    }
-                    else
-                    {
-                        //打开文件失败,通常是文件路径有问题或密码错误。
-                        [RAUtils message_alert:@"Can not unzip template file, please contact the Administrator." title:@"Warrning" controller:self];
-                        
-                //        NSFileManager *fileManager = [NSFileManager defaultManager];
-                //        [fileManager removeItemAtPath:zipFile error:nil];
-                    }
+                            [RAUtils message_alert:@"Can not download template file, please check your server setting or contact the Administrator." title:@"Warrning" controller:self];
+                    }];
                     
+                   
+    //                    cell.imageView.image=[UIImage imageNamed:@"notfound_s"];
                     
-//                    [iSalesDB cache_img:downloadimg_data filename:file_name saveTo:img_url];
-//
-//                    UIImage * img =[UIImage imageWithData:downloadimg_data];
-//                    cell.imageView.image=img;
-                }
-                else
-                    [RAUtils message_alert:@"Can not download template file, please check your server setting or contact the Administrator." title:@"Warrning" controller:self];
-//                    cell.imageView.image=[UIImage imageNamed:@"notfound_s"];
+                });
                 
             });
-            
-        });
+        }];
+
         
         
 //        NSData* downloadimg_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:appDelegate.downloadurl]];

+ 1 - 0
RedAnt ERP Mobile/HMLG Scan Order/StockViewController.h

@@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (strong, nonatomic) NSMutableArray* idata;
 @property (strong, nonatomic) NSMutableArray* bdata;
+@property (strong, nonatomic) NSMutableArray* sdata;
 @property NSUInteger taptime;
 @property (strong, nonatomic) NSIndexPath* lasttap;
 @property (nonatomic , copy) void (^returnValue)(NSMutableDictionary* models);

+ 36 - 14
RedAnt ERP Mobile/HMLG Scan Order/StockViewController.m

@@ -24,7 +24,7 @@
 }
 - (IBAction)onSubmit:(id)sender {
     NSMutableDictionary* models = [NSMutableDictionary new];
-    models[@"count"] = @(self.idata.count+self.bdata.count);
+    models[@"count"] = @(self.idata.count+self.bdata.count+self.sdata.count);
     models[@"title"] =@"Model Information";
     int count=0;
     for(int i=0;i<self.idata.count;i++)
@@ -37,6 +37,11 @@
         models[[NSString stringWithFormat:@"item_%d",count]]=self.bdata[j];
         count++;
     }
+    for(int k=0;k<self.sdata.count;k++)
+    {
+        models[[NSString stringWithFormat:@"item_%d",count]]=self.sdata[k];
+        count++;
+    }
     if(self.returnValue)
         self.returnValue(models);
     
@@ -106,16 +111,25 @@
     
     self.idata = [NSMutableArray new];
     self.bdata = [NSMutableArray new];
-    
+    self.sdata = [NSMutableArray new];
     for(int i=0;i<data.count;i++)
     {
-       if( [ data[i][@"is_back_order"] boolValue])
-       {
-           [_bdata addObject:data[i]];
-       }
-       else{
-           [_idata addObject:data[i]];
-       }
+        if( [ data[i][@"is_showroom_order"] boolValue])
+        {
+            [_sdata addObject:data[i]];
+        }
+        else
+        {
+            if( [ data[i][@"is_back_order"] boolValue])
+            {
+                [_bdata addObject:data[i]];
+            }
+            else{
+                [_idata addObject:data[i]];
+            }
+        }
+        
+
     }
 }
 
@@ -283,19 +297,21 @@
     
     if(section==0)
         return @"In Stock";
-    else
+    else if(section==1)
         return @"Backorder";
-    
+    else
+        return @"Backorder-Showroom";
 }
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    return 2;
+    return 3;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     if(section==0)
         return _idata.count;
-    else
+    else if(section==1)
         return _bdata.count;
+    else return _sdata.count;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -310,11 +326,17 @@
         arr = self.idata;
         cell.btnMove.hidden = false;
     }
-    else
+    else if(indexPath.section==1)
     {
         arr = self.bdata;
         cell.btnMove.hidden = true;
     }
+    else
+
+        {
+            arr = self.sdata;
+            cell.btnMove.hidden = true;
+        }
     cell.labelModel.text = arr[indexPath.row][@"model"];
     cell.labelETD.text = arr[indexPath.row][@"etd"];
     cell.labelQTY.text = [arr[indexPath.row][@"count"] stringValue];

+ 1 - 1
RedAnt ERP Mobile/HMLG Scan Order/config.h

@@ -217,7 +217,7 @@
 #define  URL_UPDATE_AUTH  @"offlineorder_isales.php"
 #define  URL_SEARCH  BASE_URL@"offlineorder_isales.php"
 #define URL_DELETE_ACCOUNT @"offlineorder_isales.php"
-#define URL_PRIVACY @"https://uwa.united-us.net/site/isales_uwa/privacyPolicy.htm"
+#define URL_PRIVACY @"https://erp.homelegance.com/privacyPolicy.htm"
 #define URL_CHANGE_PASSWORD @"offlineorder_isales.php"
 #define URL_SCAN_UPLOAD @"offlineorder_isales.php"
 

+ 1 - 1
RedAnt ERP Mobile/common/AppDelegateBase.m

@@ -2850,7 +2850,7 @@ void UncaughtExceptionHandler(NSException *exception) {
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
        [dateFormatter setDateFormat:@"yyyy-MM-dd"];
 
-NSDate * ddate =[dateFormatter dateFromString:@"2022-07-03"];
+NSDate * ddate =[dateFormatter dateFromString:@"2022-07-06"];
     
 //    bool review=[cdate earlierDate:ddate];
     NSTimeInterval secondsInterval= [cdate timeIntervalSinceDate:ddate];

+ 9 - 6
RedAnt ERP Mobile/common/Functions/OLO/ScanOrderListViewController.m

@@ -151,10 +151,11 @@
     {
         [self.orderTypeSegmentControl setSelectedSegmentIndex:0];
         
-        self.table_order.hidden=true;
-        self.table_upload.hidden = false;
-        [self.table_upload reloadData];
-
+        self.table_order.hidden=false;
+        self.table_submit.hidden = true;
+//        [self.table_upload reloadData];
+        [self.table_order reloadData];
+        [self.table_submit reloadData];
         
 //        onSegmentChanged
     }
@@ -163,9 +164,11 @@
         
         [self.orderTypeSegmentControl setSelectedSegmentIndex:1];
         
-        self.table_order.hidden=false;
-        self.table_upload.hidden = true;
+        self.table_order.hidden=true;
+        self.table_submit.hidden = false;
+//        [self.table_order reloadData];
         [self.table_order reloadData];
+        [self.table_submit reloadData];
     }
     
 }

+ 1 - 1
RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m

@@ -243,7 +243,7 @@
     {
 //        self.scan_val = @"[[\"1111\",\"name0\",\"description\",\"10.1 X 20.2 X 30.3\",\"2\",\"12.34\",\"VIET\",\"VCSF\",\"May\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\"],[\"2222\",\"name1\",\"description\",\"10.1 X 20.2 X 30.3\",\"2\",\"12.34\",\"VIET\",\"VCSF\",\"May\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\",\"123.45\",\"234.56\"]]";
         
-        self.scan_val =@"[\"1000A70AQ\",\"1000A70BK\",\"1000A70WH\",\"1002A70BK\"]";// @"[\"1002A70BK\"]";// 
+        self.scan_val =@"[\"MT-USH08Q\",\"9468BE-2\",\"1000A70WH\",\"1002A70BK\"]";// @"[\"1002A70BK\"]";// 
         [self addtocart];
     }
 

+ 1 - 1
RedAnt ERP Mobile/iSales-CONTRAST.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>iSales-CONTRAST.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>8</integer>
+			<integer>4</integer>
 		</dict>
 		<key>iSales-USAI.xcscheme_^#shared#^_</key>
 		<dict>

+ 16 - 4
common/customUI/commoneditor/CommonEditorViewController.m

@@ -4302,16 +4302,28 @@ if(!self.alert.isBeingDismissed)
             NSString* oldprice =[RAConvertor currencyNumber:unitprice];//[NSString stringWithFormat:@"%.2f",unitprice];
             
 #ifdef SCANNER_ORDER
-            if([item_json[@"is_back_order"] boolValue])
+            
+            if([item_json[@"is_showroom_order"] boolValue])
             {
                 cell.labelBackOrder.hidden=false;
-                cell.contentView.backgroundColor = UIColor.yellowColor;
+                cell.labelBackOrder.text = @"Showroom Order";
+                cell.contentView.backgroundColor = UIColor.orangeColor;
             }
             else
             {
-                cell.labelBackOrder.hidden=true;
-                cell.contentView.backgroundColor = UIColor.whiteColor;
+                if([item_json[@"is_back_order"] boolValue])
+                {
+                    cell.labelBackOrder.hidden=false;
+                    cell.labelBackOrder.text = @"Backorder";
+                    cell.contentView.backgroundColor = UIColor.yellowColor;
+                }
+                else
+                {
+                    cell.labelBackOrder.hidden=true;
+                    cell.contentView.backgroundColor = UIColor.whiteColor;
+                }
             }
+
 #endif
             NSString* newunitprice=@"";
             if(dprice>0)