Browse Source

1.移除第三方库AFNetworking。
2.使用NetworkUtil修改文件上传。
3.Model Detail和Cart增加MPack。

Pen Li 8 years ago
parent
commit
cfffdd9deb

+ 24 - 29
RedAnt ERP Mobile/HMLG Mobile.xcodeproj/project.pbxproj

@@ -33,7 +33,7 @@
 		4289808E1E24B2C2005F1BD8 /* LineDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 4289807D1E24B2C2005F1BD8 /* LineDrawable.m */; };
 		4289808F1E24B2C2005F1BD8 /* pdfCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4289807F1E24B2C2005F1BD8 /* pdfCreator.m */; };
 		428980901E24B2C2005F1BD8 /* PDFDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980811E24B2C2005F1BD8 /* PDFDrawable.m */; };
-		428980911E24B2C2005F1BD8 /* PDFPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980831E24B2C2005F1BD8 /* PDFPage.m */; };
+		428980911E24B2C2005F1BD8 /* RAPDFPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980831E24B2C2005F1BD8 /* RAPDFPage.m */; };
 		428980921E24B2C2005F1BD8 /* RectDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980851E24B2C2005F1BD8 /* RectDrawable.m */; };
 		428980931E24B2C2005F1BD8 /* TableDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980871E24B2C2005F1BD8 /* TableDrawable.m */; };
 		428980941E24B2C2005F1BD8 /* TextDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980891E24B2C2005F1BD8 /* TextDrawable.m */; };
@@ -59,6 +59,8 @@
 		42BEF3A41E8A4D0700632AB6 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BEF3A31E8A4D0700632AB6 /* CoreData.framework */; };
 		42D587B81F789731006B13F5 /* HWWeakTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D587B71F789731006B13F5 /* HWWeakTimer.m */; };
 		42D587BB1F7898F7006B13F5 /* ModelDescriptionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D587BA1F7898F7006B13F5 /* ModelDescriptionController.m */; };
+		42F9FAD71F8C5A8700D9C781 /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F9FAD31F8C5A8600D9C781 /* NetworkUtils.m */; };
+		42F9FAD81F8C5A8700D9C781 /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F9FAD61F8C5A8600D9C781 /* RANetworkTaskDelegate.m */; };
 		715002021D13CDBE00F5927F /* BundleDetailButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 715002011D13CDBE00F5927F /* BundleDetailButton.m */; };
 		715850431CF6F0C400856B20 /* DefaultAppearance.m in Sources */ = {isa = PBXBuildFile; fileRef = 715850421CF6F0C400856B20 /* DefaultAppearance.m */; };
 		716AF8DE1D792157001188E0 /* offline_status_filter_cadedate.json in Resources */ = {isa = PBXBuildFile; fileRef = 716AF8DD1D792157001188E0 /* offline_status_filter_cadedate.json */; };
@@ -124,7 +126,7 @@
 		7183E9221CF29F4500524787 /* ScanApiHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7183E8F81CF29F4500524787 /* ScanApiHelper.mm */; };
 		7183E9231CF29F4500524787 /* softScanBeep.wav in Resources */ = {isa = PBXBuildFile; fileRef = 7183E8FA1CF29F4500524787 /* softScanBeep.wav */; };
 		7183E9241CF29F4500524787 /* include in Resources */ = {isa = PBXBuildFile; fileRef = 7183E8FB1CF29F4500524787 /* include */; };
-		7183E9E21CF29FCB00524787 /* PDFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183E9291CF29FCB00524787 /* PDFViewController.m */; };
+		7183E9E21CF29FCB00524787 /* RAPDFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183E9291CF29FCB00524787 /* RAPDFViewController.m */; };
 		7183E9E31CF29FCB00524787 /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183E92B1CF29FCB00524787 /* WebViewController.m */; };
 		7183E9E41CF29FCB00524787 /* AddressEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183E92E1CF29FCB00524787 /* AddressEditorViewController.m */; };
 		7183E9E51CF29FCB00524787 /* CycleScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183E9311CF29FCB00524787 /* CycleScrollView.m */; };
@@ -225,7 +227,6 @@
 		7183EA5E1CF2A77000524787 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7183EA5D1CF2A77000524787 /* CoreGraphics.framework */; };
 		7183EA601CF2A77B00524787 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7183EA5F1CF2A77A00524787 /* UIKit.framework */; };
 		7183EA621CF2A78700524787 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7183EA611CF2A78700524787 /* Foundation.framework */; };
-		7183EA641CF2A7B500524787 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7183EA631CF2A7B500524787 /* libPods.a */; };
 		7183EA6D1CF2B05C00524787 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183EA681CF2B05C00524787 /* NSData+Base64.m */; };
 		7183EA6E1CF2B05C00524787 /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183EA6A1CF2B05C00524787 /* NSData+CommonCrypto.m */; };
 		7183EA6F1CF2B05C00524787 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7183EA6C1CF2B05C00524787 /* NSString+Base64.m */; };
@@ -298,8 +299,8 @@
 		4289807F1E24B2C2005F1BD8 /* pdfCreator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = pdfCreator.m; sourceTree = "<group>"; };
 		428980801E24B2C2005F1BD8 /* PDFDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDFDrawable.h; sourceTree = "<group>"; };
 		428980811E24B2C2005F1BD8 /* PDFDrawable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDFDrawable.m; sourceTree = "<group>"; };
-		428980821E24B2C2005F1BD8 /* PDFPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDFPage.h; sourceTree = "<group>"; };
-		428980831E24B2C2005F1BD8 /* PDFPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDFPage.m; sourceTree = "<group>"; };
+		428980821E24B2C2005F1BD8 /* RAPDFPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAPDFPage.h; sourceTree = "<group>"; };
+		428980831E24B2C2005F1BD8 /* RAPDFPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RAPDFPage.m; sourceTree = "<group>"; };
 		428980841E24B2C2005F1BD8 /* RectDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RectDrawable.h; sourceTree = "<group>"; };
 		428980851E24B2C2005F1BD8 /* RectDrawable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RectDrawable.m; sourceTree = "<group>"; };
 		428980861E24B2C2005F1BD8 /* TableDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableDrawable.h; sourceTree = "<group>"; };
@@ -353,6 +354,10 @@
 		42D587B71F789731006B13F5 /* HWWeakTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HWWeakTimer.m; path = common/AutoScrollImage/HWWeakTimer.m; sourceTree = SOURCE_ROOT; };
 		42D587B91F7898F7006B13F5 /* ModelDescriptionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelDescriptionController.h; path = common/Functions/modelDetail/ModelDescriptionController.h; sourceTree = SOURCE_ROOT; };
 		42D587BA1F7898F7006B13F5 /* ModelDescriptionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelDescriptionController.m; path = common/Functions/modelDetail/ModelDescriptionController.m; sourceTree = SOURCE_ROOT; };
+		42F9FAD31F8C5A8600D9C781 /* NetworkUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = ../../common/NetworkUtils.m; sourceTree = "<group>"; };
+		42F9FAD41F8C5A8600D9C781 /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../common/NetworkUtils.h; sourceTree = "<group>"; };
+		42F9FAD51F8C5A8600D9C781 /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
+		42F9FAD61F8C5A8600D9C781 /* RANetworkTaskDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RANetworkTaskDelegate.m; path = ../../common/upload/RANetworkTaskDelegate.m; sourceTree = "<group>"; };
 		715002001D13CDBE00F5927F /* BundleDetailButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BundleDetailButton.h; path = common/Functions/BundleDetailButton.h; sourceTree = SOURCE_ROOT; };
 		715002011D13CDBE00F5927F /* BundleDetailButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BundleDetailButton.m; path = common/Functions/BundleDetailButton.m; sourceTree = SOURCE_ROOT; };
 		715850411CF6F0C400856B20 /* DefaultAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefaultAppearance.h; path = common/Functions/DefaultAppearance.h; sourceTree = SOURCE_ROOT; };
@@ -480,8 +485,8 @@
 		7183E8FA1CF29F4500524787 /* softScanBeep.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = softScanBeep.wav; path = "../ScanApiSDK-10.2.227-2/softScanBeep.wav"; sourceTree = "<group>"; };
 		7183E8FB1CF29F4500524787 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = include; path = "../ScanApiSDK-10.2.227-2/include"; sourceTree = "<group>"; };
 		7183E9271CF29FA600524787 /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
-		7183E9281CF29FCB00524787 /* PDFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFViewController.h; path = "../common/Functions/PDF+Web/PDFViewController.h"; sourceTree = "<group>"; };
-		7183E9291CF29FCB00524787 /* PDFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDFViewController.m; path = "../common/Functions/PDF+Web/PDFViewController.m"; sourceTree = "<group>"; };
+		7183E9281CF29FCB00524787 /* RAPDFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAPDFViewController.h; path = "../common/Functions/PDF+Web/RAPDFViewController.h"; sourceTree = "<group>"; };
+		7183E9291CF29FCB00524787 /* RAPDFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAPDFViewController.m; path = "../common/Functions/PDF+Web/RAPDFViewController.m"; sourceTree = "<group>"; };
 		7183E92A1CF29FCB00524787 /* WebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebViewController.h; path = "../common/Functions/PDF+Web/WebViewController.h"; sourceTree = "<group>"; };
 		7183E92B1CF29FCB00524787 /* WebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebViewController.m; path = "../common/Functions/PDF+Web/WebViewController.m"; sourceTree = "<group>"; };
 		7183E92D1CF29FCB00524787 /* AddressEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressEditorViewController.h; path = ../common/Functions/address/AddressEditorViewController.h; sourceTree = "<group>"; };
@@ -653,8 +658,6 @@
 		7183EA421CF2A06600524787 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		7183EA451CF2A06E00524787 /* iSalesNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iSalesNavigationController.h; path = ../common/iSalesNavigationController.h; sourceTree = "<group>"; };
 		7183EA461CF2A06E00524787 /* iSalesNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesNavigationController.m; path = ../common/iSalesNavigationController.m; sourceTree = "<group>"; };
-		7183EA481CF2A1F300524787 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
-		7183EA491CF2A1F300524787 /* Pods.release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
 		7183EA4D1CF2A6DF00524787 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
 		7183EA4F1CF2A70800524787 /* libScanApiCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libScanApiCore.a; path = "ScanApiSDK-10.2.227-2/lib/libScanApiCore.a"; sourceTree = "<group>"; };
 		7183EA511CF2A71A00524787 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
@@ -724,7 +727,6 @@
 				7183EA5E1CF2A77000524787 /* CoreGraphics.framework in Frameworks */,
 				7183EA601CF2A77B00524787 /* UIKit.framework in Frameworks */,
 				7183EA621CF2A78700524787 /* Foundation.framework in Frameworks */,
-				7183EA641CF2A7B500524787 /* libPods.a in Frameworks */,
 				42BEF3931E8A4C7D00632AB6 /* FirebaseAnalytics.framework in Frameworks */,
 				42BEF39C1E8A4C7D00632AB6 /* libGoogleAnalytics.a in Frameworks */,
 			);
@@ -816,8 +818,8 @@
 				4289807F1E24B2C2005F1BD8 /* pdfCreator.m */,
 				428980801E24B2C2005F1BD8 /* PDFDrawable.h */,
 				428980811E24B2C2005F1BD8 /* PDFDrawable.m */,
-				428980821E24B2C2005F1BD8 /* PDFPage.h */,
-				428980831E24B2C2005F1BD8 /* PDFPage.m */,
+				428980821E24B2C2005F1BD8 /* RAPDFPage.h */,
+				428980831E24B2C2005F1BD8 /* RAPDFPage.m */,
 				428980841E24B2C2005F1BD8 /* RectDrawable.h */,
 				428980851E24B2C2005F1BD8 /* RectDrawable.m */,
 				428980861E24B2C2005F1BD8 /* TableDrawable.h */,
@@ -1018,7 +1020,6 @@
 			isa = PBXGroup;
 			children = (
 				7183E9251CF29F4B00524787 /* HMLG */,
-				7183EA4A1CF2A1F300524787 /* Pods */,
 				7183E8451CF2913E00524787 /* Products */,
 				7183EA651CF2A9DC00524787 /* Frameworks */,
 				7183E8931CF29F3900524787 /* utils */,
@@ -1159,6 +1160,10 @@
 				42A85BF61E6004180058A9CE /* ERPUtils.m */,
 				42A85BF91E6004180058A9CE /* PDFUtils.h */,
 				42A85BFA1E6004180058A9CE /* PDFUtils.m */,
+				42F9FAD41F8C5A8600D9C781 /* NetworkUtils.h */,
+				42F9FAD31F8C5A8600D9C781 /* NetworkUtils.m */,
+				42F9FAD51F8C5A8600D9C781 /* RANetworkTaskDelegate.h */,
+				42F9FAD61F8C5A8600D9C781 /* RANetworkTaskDelegate.m */,
 				7183E88F1CF29F3900524787 /* iSalesNetwork.h */,
 				7183E8901CF29F3900524787 /* iSalesNetwork.m */,
 				71BF06FF1D2F3CCC00981938 /* OLDataProvider.h */,
@@ -1314,8 +1319,8 @@
 		7183E92C1CF29FCB00524787 /* PDF+Web */ = {
 			isa = PBXGroup;
 			children = (
-				7183E9281CF29FCB00524787 /* PDFViewController.h */,
-				7183E9291CF29FCB00524787 /* PDFViewController.m */,
+				7183E9281CF29FCB00524787 /* RAPDFViewController.h */,
+				7183E9291CF29FCB00524787 /* RAPDFViewController.m */,
 				7183E92A1CF29FCB00524787 /* WebViewController.h */,
 				7183E92B1CF29FCB00524787 /* WebViewController.m */,
 			);
@@ -1626,16 +1631,6 @@
 			path = "../iSales-NPD";
 			sourceTree = "<group>";
 		};
-		7183EA4A1CF2A1F300524787 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				7183EA481CF2A1F300524787 /* Pods.debug.xcconfig */,
-				7183EA491CF2A1F300524787 /* Pods.release.xcconfig */,
-			);
-			name = Pods;
-			path = ..;
-			sourceTree = "<group>";
-		};
 		7183EA651CF2A9DC00524787 /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
@@ -1849,9 +1844,10 @@
 				7183E9171CF29F4500524787 /* CommonEditorCellSwitch.m in Sources */,
 				7183E9EE1CF29FCB00524787 /* CartGeneralNotesViewController.m in Sources */,
 				4289806A1E24A9DE005F1BD8 /* OfflineUnlockViewController.m in Sources */,
+				42F9FAD81F8C5A8700D9C781 /* RANetworkTaskDelegate.m in Sources */,
 				7183E89D1CF29F3900524787 /* qrinput.c in Sources */,
 				7183E9061CF29F4500524787 /* NIDropDown.m in Sources */,
-				428980911E24B2C2005F1BD8 /* PDFPage.m in Sources */,
+				428980911E24B2C2005F1BD8 /* RAPDFPage.m in Sources */,
 				7183EA0A1CF29FCB00524787 /* DetailKVCell.m in Sources */,
 				7183EA331CF29FCB00524787 /* SettingViewController.m in Sources */,
 				7183E9E51CF29FCB00524787 /* CycleScrollView.m in Sources */,
@@ -1942,6 +1938,7 @@
 				7183EA141CF29FCB00524787 /* OrderDetailHtmlCell.m in Sources */,
 				42BEF39F1E8A4C7D00632AB6 /* README.md in Sources */,
 				7183EA321CF29FCB00524787 /* ScannerSettingViewController.m in Sources */,
+				42F9FAD71F8C5A8700D9C781 /* NetworkUtils.m in Sources */,
 				428980901E24B2C2005F1BD8 /* PDFDrawable.m in Sources */,
 				7183E9FD1CF29FCB00524787 /* RATreeView+UIScrollView.m in Sources */,
 				7183EA021CF29FCB00524787 /* ContactListViewController.m in Sources */,
@@ -2009,7 +2006,7 @@
 				7183EA381CF29FCB00524787 /* WatchListViewController.m in Sources */,
 				42BEF39B1E8A4C7D00632AB6 /* GoogleAnalyst.m in Sources */,
 				7183EA131CF29FCB00524787 /* CreateOrderViewController.m in Sources */,
-				7183E9E21CF29FCB00524787 /* PDFViewController.m in Sources */,
+				7183E9E21CF29FCB00524787 /* RAPDFViewController.m in Sources */,
 				7183E9FF1CF29FCB00524787 /* CreditCardEditorViewController.m in Sources */,
 				42A85BFB1E6004180058A9CE /* ERPUtils.m in Sources */,
 				4289801F1E24925A005F1BD8 /* SortButton.m in Sources */,
@@ -2167,7 +2164,6 @@
 		};
 		7183E85C1CF2913E00524787 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 7183EA481CF2A1F300524787 /* Pods.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -2200,7 +2196,6 @@
 		};
 		7183E85D1CF2913E00524787 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 7183EA491CF2A1F300524787 /* Pods.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";

+ 0 - 1
RedAnt ERP Mobile/Podfile

@@ -1,3 +1,2 @@
 source 'https://github.com/CocoaPods/Specs.git'
 platform :ios, '7.0'
-pod 'AFNetworking', '~> 2.5'

+ 2 - 29
RedAnt ERP Mobile/Podfile.lock

@@ -1,30 +1,3 @@
-PODS:
-  - AFNetworking (2.6.1):
-    - AFNetworking/NSURLConnection (= 2.6.1)
-    - AFNetworking/NSURLSession (= 2.6.1)
-    - AFNetworking/Reachability (= 2.6.1)
-    - AFNetworking/Security (= 2.6.1)
-    - AFNetworking/Serialization (= 2.6.1)
-    - AFNetworking/UIKit (= 2.6.1)
-  - AFNetworking/NSURLConnection (2.6.1):
-    - AFNetworking/Reachability
-    - AFNetworking/Security
-    - AFNetworking/Serialization
-  - AFNetworking/NSURLSession (2.6.1):
-    - AFNetworking/Reachability
-    - AFNetworking/Security
-    - AFNetworking/Serialization
-  - AFNetworking/Reachability (2.6.1)
-  - AFNetworking/Security (2.6.1)
-  - AFNetworking/Serialization (2.6.1)
-  - AFNetworking/UIKit (2.6.1):
-    - AFNetworking/NSURLConnection
-    - AFNetworking/NSURLSession
+PODFILE CHECKSUM: a3d88bebbde78920a8aaab7ee4e0e4456246ed89
 
-DEPENDENCIES:
-  - AFNetworking (~> 2.5)
-
-SPEC CHECKSUMS:
-  AFNetworking: 8e4e60500beb8bec644cf575beee72990a76d399
-
-COCOAPODS: 0.39.0
+COCOAPODS: 1.2.1.beta.1

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


+ 107 - 69
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -27,7 +27,8 @@
 #import "RAUtils.h"
 #import "CommonEditorCellImg.h"
 
-#import "AFHTTPSessionManager.h"
+//#import "AFHTTPSessionManager.h"
+#import "NetworkUtils.h"
 
 #import "CustomIOSAlertView.h"
 #import "DefaultAppearance.h"
@@ -4954,78 +4955,25 @@
             {
                 NSData *imageData = UIImagePNGRepresentation(img);
                 
-                AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
-                
-                
-                
                 NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 if(appDelegate.user!=nil)
                     [params setValue:appDelegate.user forKey:@"user"];
-                //    if(appDelegate.contact_id!=nil)
-                //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
                 if(appDelegate.password!=nil)
                     [params setValue:appDelegate.password forKey:@"password"];
                 
-                
-                NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_IMG parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-                    [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test.jpg" mimeType:@"image/png"];
-                } error:nil];
-                
-                
-                
-                AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
-                
-                
-                
-                
-                NSProgress *progress = nil;
                 UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Upload Signature"];
-                NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
-                    
-                    //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
-                    
-                    
-                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                
+                [NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *json) {
                     
-                    if (error) {
-                        
-                        NSString* err_msg = [error localizedDescription];
-                        DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
-                        
-                        
-                        NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                        
-                        DebugLog(@"data string: %@",str);
-                        
-                        [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:weakself] ;
-                        
-                    } else {
-                        DebugLog(@"response ");
-                        
-                        
-                        
-                        NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
-                        
-                        // 再将NSData转为字符串
-                        NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-                        
-                        //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                        
-                        DebugLog(@"data string: %@",jsonStr);
-                        
-                        NSDictionary* json = responseObject;
-                        
+                    dispatch_async(dispatch_get_main_queue(), ^{
+                        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
                         
-                        //NSMutableArray* arr_ret = [[NSMutableArray alloc] init];
                         if([[json valueForKey:@"result"] intValue]==2)
                         {
                             NSString* img_url_down = json[@"img_url_aname"];
-                            //                            if(img_url_down.length==0)
-                            //                                img_url_down=@"";
+
                             NSString* img_url_up = json[@"img_url"];
-                            //                            if(img_url_up.length==0)
-                            //                                img_url_up=@"";
                             
                             NSMutableDictionary* item_json =((NSMutableArray*)weakself.content_data_control[indexPath.section])[indexPath.row];
                             
@@ -5033,7 +4981,7 @@
                             [item_json setValue:img_url_up forKey:@"value"];
                             [item_json setValue:@"true" forKey:@"dirty"];
                             NSMutableDictionary* section_json = [[weakself.content_data_download objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]] mutableCopy];
-                            [section_json setObject:item_json forKey:[NSString stringWithFormat:@"item_%d",indexPath.row]];
+                            [section_json setObject:item_json forKey:[NSString stringWithFormat:@"item_%ld",indexPath.row]];
                             
                             [weakself.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
                             weakself.content_data_control = [weakself translate_json:weakself.content_data_download changed:weakself.changed_data];
@@ -5050,16 +4998,106 @@
                             [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:weakself] ;
                         }
                         
-                        
-                        
-                        
-                        
-                        
-                    }
-                    //
-                }];
+                    });
+                    
+                } Progress:nil DecryptHandler:nil];
+                
                 
-                [uploadTask resume];
+                
+//                AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
+//
+//                NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_IMG parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//                    [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test.jpg" mimeType:@"image/png"];
+//                } error:nil];
+//
+//
+//
+//                AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+//
+//
+//
+//
+//                NSProgress *progress = nil;
+//                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Upload Signature"];
+//                NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+//
+//                    //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
+//
+//
+//                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//
+//                    if (error) {
+//
+//                        NSString* err_msg = [error localizedDescription];
+//                        DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+//
+//
+//                        NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                        DebugLog(@"data string: %@",str);
+//
+//                        [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:weakself] ;
+//
+//                    } else {
+//                        DebugLog(@"response ");
+//
+//
+//
+//                        NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
+//
+//                        // 再将NSData转为字符串
+//                        NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+//
+//                        //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                        DebugLog(@"data string: %@",jsonStr);
+//
+//                        NSDictionary* json = responseObject;
+//
+//
+//                        //NSMutableArray* arr_ret = [[NSMutableArray alloc] init];
+//                        if([[json valueForKey:@"result"] intValue]==2)
+//                        {
+//                            NSString* img_url_down = json[@"img_url_aname"];
+//                            //                            if(img_url_down.length==0)
+//                            //                                img_url_down=@"";
+//                            NSString* img_url_up = json[@"img_url"];
+//                            //                            if(img_url_up.length==0)
+//                            //                                img_url_up=@"";
+//
+//                            NSMutableDictionary* item_json =((NSMutableArray*)weakself.content_data_control[indexPath.section])[indexPath.row];
+//
+//                            [item_json setValue:img_url_down forKey:@"avalue"];
+//                            [item_json setValue:img_url_up forKey:@"value"];
+//                            [item_json setValue:@"true" forKey:@"dirty"];
+//                            NSMutableDictionary* section_json = [[weakself.content_data_download objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]] mutableCopy];
+//                            [section_json setObject:item_json forKey:[NSString stringWithFormat:@"item_%d",indexPath.row]];
+//
+//                            [weakself.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
+//                            weakself.content_data_control = [weakself translate_json:weakself.content_data_download changed:weakself.changed_data];
+//
+//
+//                            CommonEditorCellSignature* cell = (CommonEditorCellSignature*) [weakself.editorTable cellForRowAtIndexPath:indexPath];
+//
+//                            cell.imageviewSignature.image = signimg;
+//
+//
+//                        }
+//                        else
+//                        {
+//                            [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:weakself] ;
+//                        }
+//
+//
+//
+//
+//
+//
+//                    }
+//                    //
+//                }];
+//
+//                [uploadTask resume];
             }
         }
         

+ 8 - 1
RedAnt ERP Mobile/common/Functions/cart/ModelItemCell.m

@@ -377,7 +377,14 @@
     if(qty==0)
         qty=self.stepper.minimumValue;
     
-    
+#ifdef MPACK
+    if ((int)qty % (int)self.stepper.stepValue != 0) {
+        UIViewController* vc=[RAUtils getViewController :self];
+        [((CartViewController *)vc).itemListTable reloadData];
+        [RAUtils message_alert:[NSString stringWithFormat:@"Sold in quantities of %d",(int)(self.stepper.stepValue)] title:@"Change Model Count" controller:vc];
+        return;
+    }
+#endif
     
         
         int c=qty;

+ 8 - 0
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -545,7 +545,15 @@
 {
     int count=[self.quantity_text.text intValue];
     
+#ifdef MPACK
     
+    if (count % self.step != 0) {
+        UIViewController *vc= [RAUtils getViewController:self];
+        [RAUtils message_alert:[NSString stringWithFormat:@"Sold in quantities of %d",(int)(self.stepper.stepValue)] title:@"Add to cart" controller:vc];
+        return;
+    }
+    
+#endif
     
     int c=[self.count_Label.text intValue];
     DebugLog(@"count label : %@ , convert:%d", self.count_Label.text ,c);

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

@@ -12,8 +12,8 @@
 #import "AESCrypt.h"
 #import "AppDelegate.h"
 #import "ZipArchive.h"
-#import "UIProgressView+AFNetworking.h"
-#import "AFHTTPSessionManager.h"
+//#import "UIProgressView+AFNetworking.h"
+//#import "AFHTTPSessionManager.h"
 #import "AppDelegate.h"
 #import "pdfCreator.h"
 #import "Singleton.h"

+ 195 - 118
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -22,7 +22,7 @@
 #import "RAPDFViewController.h"
 #import "SignatureViewController.h"
 #import "MainViewController.h"
-#import "AFHTTPSessionManager.h"
+//#import "AFHTTPSessionManager.h"
 #import "DefaultAppearance.h"
 #import "DefaultTableHeaderView.h"
 #import "OLDataProvider.h"
@@ -745,86 +745,18 @@
     }
     else
     {
-    
-    
-    
-    
-    
-    
-    //    UIAlertView * waitalert = [[UIAlertView alloc] initWithTitle:@"wait" message:@"uploading" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
-    //    [waitalert show];
-    
-    NSData *imageData = UIImagePNGRepresentation(img);
-    
-    AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
-    
-    
-    
-    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
-    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-    if(appDelegate.user!=nil)
-        [params setValue:appDelegate.user forKey:@"user"];
-    //    if(appDelegate.contact_id!=nil)
-    //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
-    if(appDelegate.password!=nil)
-        [params setValue:appDelegate.password forKey:@"password"];
-    
-    DebugLog(URL_UPLOAD_IMG);
-    
-    NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_IMG parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-        [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test.jpg" mimeType:@"image/png"];
-    } error:nil];
-    
-    
-    //        NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:WEBSERVICE_URL parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-    //            [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test" mimeType:@"image/png"];
-    //        } error:nil];
-    //
-    AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
-    
-    
-    
-    //manager.responseSerializer.acceptableContentTypes = [self.operationManager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"];
-    
-    
-    
-    //
-    NSProgress *progress = nil;
-    
-    NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
-        
-        //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
-        
-        
+
+        NSData *imageData = UIImagePNGRepresentation(img);
+        NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
         
+        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+        if(appDelegate.user!=nil)
+            [params setValue:appDelegate.user forKey:@"user"];
+        if(appDelegate.password!=nil)
+            [params setValue:appDelegate.password forKey:@"password"];
         
-        if (error) {
-            
-            NSString* err_msg = [error localizedDescription];
-            DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
-            
-            
-            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-            
-            DebugLog(@"data string: %@",str);
-            
-            [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
-            
-        } else {
-            DebugLog(@"response ");
-            
-            
-            
-            NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
-            
-            // 再将NSData转为字符串
-            NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-            
-            //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-            
-            DebugLog(@"data string: %@",jsonStr);
-            
-            NSDictionary* json = responseObject;
+        __weak typeof(self) weakSelf = self;
+        [NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *json) {
             
             if([[json valueForKey:@"result"] intValue]==2)
             {
@@ -835,81 +767,67 @@
                     UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
                     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                         
-                        NSDictionary* order_json = [iSalesNetwork sign_Order:self.order_code path:img_url_up];
+                        NSDictionary* order_json = [iSalesNetwork sign_Order:weakSelf.order_code path:img_url_up];
                         
                         dispatch_async(dispatch_get_main_queue(), ^{
                             [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
                             if([[order_json valueForKey:@"result"] intValue]==2)
                             {
-                                //                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-                                //                                appDelegate.order_code = self.order_code;
-                                //                                [appDelegate SetSo:[self.content_data valueForKey:@"so#"]];
-                                //
-                                //
-                                //                                appDelegate.customerInfo=[[self.content_data objectForKey:@"customerInfo"] mutableCopy];
-                                //
-                                //                                appDelegate.contact_id=[appDelegate.customerInfo valueForKey:@"customer_cid"];
-                                //                                [self.navigationController popViewControllerAnimated:false];
-                                //
-                                //                                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
-                                //                                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
-                                //                                if(self.selectOrder)
-                                //                                    self.selectOrder(self.content_data);
                                 
 #ifdef BUILD_NPD
-                                int count = [[self.content_data objectForKey:@"count"] intValue];
+                                int count = [[weakSelf.content_data objectForKey:@"count"] intValue];
                                 for (int i = 0; i < count; i++) {
                                     NSString *key = [NSString stringWithFormat:@"section_%d",i];
-                                    NSMutableDictionary *section = [[self.content_data objectForKey:key] mutableCopy];
+                                    NSMutableDictionary *section = [[weakSelf.content_data objectForKey:key] mutableCopy];
                                     NSString *type = [section objectForKey:@"type"];
                                     if ([type isEqualToString:@"sign_url"]) {
                                         [section setObject:img_url_down forKey:@"data"];
-                                        [self.content_data setObject:section forKey:key];
+                                        [weakSelf.content_data setObject:section forKey:key];
                                         break;
                                     }
                                 }
 #endif
                                 
 #ifdef BUILD_HOMER
-                                int count = [[self.content_data objectForKey:@"count"] intValue];
+                                int count = [[weakSelf.content_data objectForKey:@"count"] intValue];
                                 for (int i = 0; i < count; i++) {
                                     NSString *key = [NSString stringWithFormat:@"section_%d",i];
-                                    NSMutableDictionary *section = [[self.content_data objectForKey:key] mutableCopy];
+                                    NSMutableDictionary *section = [[weakSelf.content_data objectForKey:key] mutableCopy];
                                     NSString *type = [section objectForKey:@"type"];
                                     if ([type isEqualToString:@"sign_url"]) {
                                         [section setObject:img_url_down forKey:@"data"];
-                                        [self.content_data setObject:section forKey:key];
+                                        [weakSelf.content_data setObject:section forKey:key];
                                         break;
                                     }
                                 }
 #endif
 #ifdef BUILD_GATIT
-                                int count = [[self.content_data objectForKey:@"count"] intValue];
+                                int count = [[weakSelf.content_data objectForKey:@"count"] intValue];
                                 for (int i = 0; i < count; i++) {
                                     NSString *key = [NSString stringWithFormat:@"section_%d",i];
-                                    NSMutableDictionary *section = [[self.content_data objectForKey:key] mutableCopy];
+                                    NSMutableDictionary *section = [[weakSelf.content_data objectForKey:key] mutableCopy];
                                     NSString *type = [section objectForKey:@"type"];
                                     if ([type isEqualToString:@"sign_url"]) {
                                         [section setObject:img_url_down forKey:@"data"];
-                                        [self.content_data setObject:section forKey:key];
+                                        [weakSelf.content_data setObject:section forKey:key];
                                         break;
                                     }
                                 }
 #endif
                                 
 #ifdef BUILD_HMLG
-                                [self.content_data setValue:img_url_down forKey:@"sign_url"];
+                                [weakSelf.content_data setValue:img_url_down forKey:@"sign_url"];
 #endif
                                 //self.btnSign.enabled = false;
-                                [self.detailTable reloadData];
+                                [weakSelf.detailTable reloadData];
                                 
-                                [RAUtils message_alert:@"Successful." title:@"Signature" controller:self];
+                                [RAUtils message_alert:@"Successful." title:@"Signature" controller:weakSelf];
                                 
                                 
                             }
                             else
                             {
-                                [RAUtils message_alert:[order_json valueForKey:@"err_msg"] title:@"Signature" controller:self] ;
+                                [RAUtils message_alert:[order_json valueForKey:@"err_msg"] title:@"Signature" controller:weakSelf] ;
                             }
                             
                             
@@ -922,19 +840,178 @@
             }
             else
             {
-                [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:self] ;
+                [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:weakSelf] ;
             }
             
-            
-            
-            
-            
-            
-        }
-        //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-    }];
-    
-    [uploadTask resume];
+        } Progress:nil DecryptHandler:nil];
+        
+//    AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
+//    DebugLog(URL_UPLOAD_IMG);
+//
+//    NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_IMG parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//        [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test.jpg" mimeType:@"image/png"];
+//    } error:nil];
+//
+//
+//    //        NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:WEBSERVICE_URL parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//    //            [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test" mimeType:@"image/png"];
+//    //        } error:nil];
+//    //
+//    AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+//
+//
+//
+//    //manager.responseSerializer.acceptableContentTypes = [self.operationManager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"];
+//
+//
+//
+//    //
+//    NSProgress *progress = nil;
+//
+//    NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+//
+//        //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
+//
+//
+//
+//
+//        if (error) {
+//
+//            NSString* err_msg = [error localizedDescription];
+//            DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+//
+//
+//            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//            DebugLog(@"data string: %@",str);
+//
+//            [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
+//
+//        } else {
+//            DebugLog(@"response ");
+//
+//
+//
+//            NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
+//
+//            // 再将NSData转为字符串
+//            NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+//
+//            //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//            DebugLog(@"data string: %@",jsonStr);
+//
+//            NSDictionary* json = responseObject;
+//
+//            if([[json valueForKey:@"result"] intValue]==2)
+//            {
+//                NSString* img_url_down = json[@"img_url_aname"];
+//                NSString* img_url_up = json[@"img_url"];
+//
+//                {
+//                    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
+//                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//
+//                        NSDictionary* order_json = [iSalesNetwork sign_Order:self.order_code path:img_url_up];
+//
+//                        dispatch_async(dispatch_get_main_queue(), ^{
+//                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                            if([[order_json valueForKey:@"result"] intValue]==2)
+//                            {
+//                                //                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//                                //                                appDelegate.order_code = self.order_code;
+//                                //                                [appDelegate SetSo:[self.content_data valueForKey:@"so#"]];
+//                                //
+//                                //
+//                                //                                appDelegate.customerInfo=[[self.content_data objectForKey:@"customerInfo"] mutableCopy];
+//                                //
+//                                //                                appDelegate.contact_id=[appDelegate.customerInfo valueForKey:@"customer_cid"];
+//                                //                                [self.navigationController popViewControllerAnimated:false];
+//                                //
+//                                //                                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
+//                                //                                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+//                                //                                if(self.selectOrder)
+//                                //                                    self.selectOrder(self.content_data);
+//
+//#ifdef BUILD_NPD
+//                                int count = [[self.content_data objectForKey:@"count"] intValue];
+//                                for (int i = 0; i < count; i++) {
+//                                    NSString *key = [NSString stringWithFormat:@"section_%d",i];
+//                                    NSMutableDictionary *section = [[self.content_data objectForKey:key] mutableCopy];
+//                                    NSString *type = [section objectForKey:@"type"];
+//                                    if ([type isEqualToString:@"sign_url"]) {
+//                                        [section setObject:img_url_down forKey:@"data"];
+//                                        [self.content_data setObject:section forKey:key];
+//                                        break;
+//                                    }
+//                                }
+//#endif
+//
+//#ifdef BUILD_HOMER
+//                                int count = [[self.content_data objectForKey:@"count"] intValue];
+//                                for (int i = 0; i < count; i++) {
+//                                    NSString *key = [NSString stringWithFormat:@"section_%d",i];
+//                                    NSMutableDictionary *section = [[self.content_data objectForKey:key] mutableCopy];
+//                                    NSString *type = [section objectForKey:@"type"];
+//                                    if ([type isEqualToString:@"sign_url"]) {
+//                                        [section setObject:img_url_down forKey:@"data"];
+//                                        [self.content_data setObject:section forKey:key];
+//                                        break;
+//                                    }
+//                                }
+//#endif
+//#ifdef BUILD_GATIT
+//                                int count = [[self.content_data objectForKey:@"count"] intValue];
+//                                for (int i = 0; i < count; i++) {
+//                                    NSString *key = [NSString stringWithFormat:@"section_%d",i];
+//                                    NSMutableDictionary *section = [[self.content_data objectForKey:key] mutableCopy];
+//                                    NSString *type = [section objectForKey:@"type"];
+//                                    if ([type isEqualToString:@"sign_url"]) {
+//                                        [section setObject:img_url_down forKey:@"data"];
+//                                        [self.content_data setObject:section forKey:key];
+//                                        break;
+//                                    }
+//                                }
+//#endif
+//
+//#ifdef BUILD_HMLG
+//                                [self.content_data setValue:img_url_down forKey:@"sign_url"];
+//#endif
+//                                //self.btnSign.enabled = false;
+//                                [self.detailTable reloadData];
+//
+//                                [RAUtils message_alert:@"Successful." title:@"Signature" controller:self];
+//
+//
+//                            }
+//                            else
+//                            {
+//                                [RAUtils message_alert:[order_json valueForKey:@"err_msg"] title:@"Signature" controller:self] ;
+//                            }
+//
+//
+//
+//                        });
+//                    });
+//                }
+//
+//
+//            }
+//            else
+//            {
+//                [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:self] ;
+//            }
+//
+//
+//
+//
+//
+//
+//        }
+//        //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//    }];
+//
+//    [uploadTask resume];
     }
     
 }

+ 109 - 87
RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m

@@ -8,8 +8,8 @@
 
 #import "ImageUploadViewController.h"
 
-#import "UIProgressView+AFNetworking.h"
-#import "AFHTTPSessionManager.h"
+//#import "UIProgressView+AFNetworking.h"
+//#import "AFHTTPSessionManager.h"
 
 #import "config.h"
 #import "RAUtils.h"
@@ -17,6 +17,7 @@
 #import "OLDataProvider.h"
 #import "ERPUtils.h"
 #import "iSalesNetwork.h"
+#import "NetworkUtils.h"
 
 //#import "UIAlertView+AFNetworking.h"
 
@@ -256,107 +257,128 @@
         
         NSData *imageData = UIImagePNGRepresentation(self.imgview.image);
         
-        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
-        
-        
-        
         NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
         
         if(appDelegate.user!=nil)
             [params setValue:appDelegate.user forKey:@"user"];
-        //    if(appDelegate.contact_id!=nil)
-        //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
         if(appDelegate.password!=nil)
             [params setValue:appDelegate.password forKey:@"password"];
         
+//        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
+//
+//        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_IMG parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//            [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test.jpg" mimeType:@"image/png"];
+//        } error:nil];
+//
+//
+//        //        NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:WEBSERVICE_URL parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//        //            [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test" mimeType:@"image/png"];
+//        //        } error:nil];
+//        //
+//        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+//
+//
+//
+//        //manager.responseSerializer.acceptableContentTypes = [self.operationManager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"];
+//
+//
+//
+//        //
+//        NSProgress *progress = nil;
+//
+//        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+//
+//            //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
+//
+//
+//
+//
+//            if (error) {
+//
+//                NSString* err_msg = [error localizedDescription];
+//                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+//
+//
+//                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",str);
+//                [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
+//
+//            } else {
+//                DebugLog(@"response ");
+//
+//
+//
+//                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
+//
+//                // 再将NSData转为字符串
+//                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+//
+//                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",jsonStr);
+//
+//                NSDictionary* json = responseObject;
+//
+//
+//                if([[json valueForKey:@"result"] intValue]==2)
+//                {
+//                    NSString* img_url_down = json[@"img_url_aname"];
+//                    NSString* img_url_up = json[@"img_url"];
+//
+//                    if(self.returnValue)
+//                        self.returnValue(img_url_down,img_url_up,self.imgview.image);
+//
+//                    [self.navigationController popViewControllerAnimated:false];
+//                }
+//                else
+//                {
+//                    [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:self] ;
+//                }
+//
+//
+//            }
+//            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        }];
+//
+//
+//
+//
+//        [self.uploadProgress setProgressWithUploadProgressOfTask:uploadTask animated:true];
+//        //
+//
+//
+//
+//
+//
+//
+//        [uploadTask resume];
         
-        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_IMG parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-            [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test.jpg" mimeType:@"image/png"];
-        } error:nil];
-        
-        
-        //        NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:WEBSERVICE_URL parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-        //            [formData appendPartWithFileData:imageData name:@"upfile" fileName:@"test" mimeType:@"image/png"];
-        //        } error:nil];
-        //
-        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
-        
-        
-        
-        //manager.responseSerializer.acceptableContentTypes = [self.operationManager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"];
-        
-        
-        
-        //
-        NSProgress *progress = nil;
+        __weak typeof(self) weakSelf = self;
         
-        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
-            
-            //        [progress removeObserver:self forKeyPath:@"fractionCompleted"];
-            
-            
-            
-            
-            if (error) {
-                
-                NSString* err_msg = [error localizedDescription];
-                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
-                
-                
-                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",str);
-                [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
-                
-            } else {
-                DebugLog(@"response ");
-                
-                
-                
-                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
-                
-                // 再将NSData转为字符串
-                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-                
-                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",jsonStr);
-                
-                NSDictionary* json = responseObject;
-                
-                
-                if([[json valueForKey:@"result"] intValue]==2)
+        [NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *result) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                if([[result valueForKey:@"result"] intValue]==2)
                 {
-                    NSString* img_url_down = json[@"img_url_aname"];
-                    NSString* img_url_up = json[@"img_url"];
+                    NSString* img_url_down = result[@"img_url_aname"];
+                    NSString* img_url_up = result[@"img_url"];
                     
-                    if(self.returnValue)
-                        self.returnValue(img_url_down,img_url_up,self.imgview.image);
+                    if(weakSelf.returnValue)
+                        weakSelf.returnValue(img_url_down,img_url_up,self.imgview.image);
+                    
+                    [weakSelf.navigationController popViewControllerAnimated:false];
                     
-                    [self.navigationController popViewControllerAnimated:false];
                 }
                 else
                 {
-                    [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:self] ;
+                    [RAUtils message_alert:[result valueForKey:@"err_msg"] title:@"Upload Image" controller:weakSelf] ;
                 }
-                
-                
-            }
-            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-        }];
-        
-        
-        
-        
-        [self.uploadProgress setProgressWithUploadProgressOfTask:uploadTask animated:true];
-        //
-        
-        
-        
-        
-        
-        
-        [uploadTask resume];
+            });
+        } Progress:^(NSURLSessionTask *task, double progress) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [weakSelf.uploadProgress setProgress:progress animated:YES];
+            });
+        } DecryptHandler:nil];
         
     }
 }

+ 21 - 10
RedAnt ERP Mobile/common/data_provider/iSalesNetwork.m

@@ -276,7 +276,18 @@ NSString *const ScreenCodeOfflineSync = @"Offline Sync Screen";
 //}
 +(NSData*)get_json : (NSString*) url parameters:(NSMutableDictionary *) params //delegate:(id < NSURLConnectionDelegate >)delegate
 {
-    
+    NSString *screenName = [params valueForKey:kScreenName];
+    NSString *userAction = [params valueForKey:kAction];
+    NSMutableDictionary *extra = [[params valueForKey:kExtra] mutableCopy];
+    if ([userAction isEqualToString:@"Login"]) {
+        if (!extra) {
+            extra = [NSMutableDictionary dictionary];
+        }
+        [extra setObject:[params objectForKey:@"user"] forKey:@"user"];
+    }
+#ifdef BUILD_NPD
+    [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
+#endif
     return [self get_json:url parameters:params file:nil];
     
     int retry = 0;
@@ -305,15 +316,15 @@ NSString *const ScreenCodeOfflineSync = @"Offline Sync Screen";
     [params setValue:uuid.UUIDString forKey:@"idfv"];
 #endif
     
-    NSString *screenName = [params valueForKey:kScreenName];
-    NSString *userAction = [params valueForKey:kAction];
-    NSMutableDictionary *extra = [[params valueForKey:kExtra] mutableCopy];
-    if ([userAction isEqualToString:@"Login"]) {
-        if (!extra) {
-            extra = [NSMutableDictionary dictionary];
-        }
-        [extra setObject:[params objectForKey:@"user"] forKey:@"user"];
-    }
+//    NSString *screenName = [params valueForKey:kScreenName];
+//    NSString *userAction = [params valueForKey:kAction];
+//    NSMutableDictionary *extra = [[params valueForKey:kExtra] mutableCopy];
+//    if ([userAction isEqualToString:@"Login"]) {
+//        if (!extra) {
+//            extra = [NSMutableDictionary dictionary];
+//        }
+//        [extra setObject:[params objectForKey:@"user"] forKey:@"user"];
+//    }
     
 repeat:
     {

+ 0 - 69
RedAnt ERP Mobile/iSales-DEMO.xcodeproj/project.pbxproj

@@ -155,12 +155,9 @@
 		71DF74981C57614C00F2789C /* PhotoStackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DF74941C57614C00F2789C /* PhotoStackViewController.m */; };
 		71FFBBEF1C608DCD00D91DC2 /* iSalesDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBEC1C608DCD00D91DC2 /* iSalesDB.m */; };
 		71FFBBF01C608DCD00D91DC2 /* iSalesNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBEE1C608DCD00D91DC2 /* iSalesNetwork.m */; };
-		A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C694180C757B34E24180D628 /* libPods.a */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
-		6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
 		713F76A61929F4A7006A7305 /* iSales-DEMO.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iSales-DEMO.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		713F76A91929F4A7006A7305 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
 		713F76AB1929F4A7006A7305 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@@ -442,7 +439,6 @@
 		71FFBBEC1C608DCD00D91DC2 /* iSalesDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesDB.m; path = common/data_provider/iSalesDB.m; sourceTree = SOURCE_ROOT; };
 		71FFBBED1C608DCD00D91DC2 /* iSalesNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iSalesNetwork.h; path = common/data_provider/iSalesNetwork.h; sourceTree = SOURCE_ROOT; };
 		71FFBBEE1C608DCD00D91DC2 /* iSalesNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesNetwork.m; path = common/data_provider/iSalesNetwork.m; sourceTree = SOURCE_ROOT; };
-		C694180C757B34E24180D628 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -460,7 +456,6 @@
 				713F76AC1929F4A7006A7305 /* CoreGraphics.framework in Frameworks */,
 				713F76AE1929F4A7006A7305 /* UIKit.framework in Frameworks */,
 				713F76AA1929F4A7006A7305 /* Foundation.framework in Frameworks */,
-				A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -508,7 +503,6 @@
 				713F76AF1929F4A7006A7305 /* iSales-DEMO */,
 				713F76A81929F4A7006A7305 /* Frameworks */,
 				713F76A71929F4A7006A7305 /* Products */,
-				CA33503C644B4B30FB07E665 /* Pods */,
 			);
 			sourceTree = "<group>";
 		};
@@ -535,7 +529,6 @@
 				713F76AB1929F4A7006A7305 /* CoreGraphics.framework */,
 				713F76AD1929F4A7006A7305 /* UIKit.framework */,
 				713F76C81929F4A7006A7305 /* XCTest.framework */,
-				C694180C757B34E24180D628 /* libPods.a */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";
@@ -1012,15 +1005,6 @@
 			name = AutoScrollImage;
 			sourceTree = "<group>";
 		};
-		CA33503C644B4B30FB07E665 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */,
-				6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */,
-			);
-			name = Pods;
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -1028,12 +1012,9 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 713F76D81929F4A7006A7305 /* Build configuration list for PBXNativeTarget "iSales-DEMO" */;
 			buildPhases = (
-				83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */,
 				713F76A21929F4A7006A7305 /* Sources */,
 				713F76A31929F4A7006A7305 /* Frameworks */,
 				713F76A41929F4A7006A7305 /* Resources */,
-				9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */,
-				BCE8779EB44C92756196E042 /* Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -1098,54 +1079,6 @@
 		};
 /* End PBXResourcesBuildPhase section */
 
-/* Begin PBXShellScriptBuildPhase section */
-		83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Check Pods Manifest.lock";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n    cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n    exit 1\nfi\n";
-			showEnvVarsInLog = 0;
-		};
-		9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Embed Pods Frameworks";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		BCE8779EB44C92756196E042 /* Copy Pods Resources */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Copy Pods Resources";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-/* End PBXShellScriptBuildPhase section */
-
 /* Begin PBXSourcesBuildPhase section */
 		713F76A21929F4A7006A7305 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
@@ -1389,7 +1322,6 @@
 		};
 		713F76D91929F4A7006A7305 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -1408,7 +1340,6 @@
 		};
 		713F76DA1929F4A7006A7305 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";

+ 24 - 82
RedAnt ERP Mobile/iSales-GATIT.xcodeproj/project.pbxproj

@@ -47,6 +47,8 @@
 		42D9A0231EB02DA6008AF7AF /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42D9A0221EB02DA6008AF7AF /* AdSupport.framework */; };
 		42D9A0251EB03994008AF7AF /* libAdIdAccess.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42D9A0241EB03994008AF7AF /* libAdIdAccess.a */; };
 		42DC12F11F0CD98E00A4C011 /* OrderDetailPickInfoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42DC12F01F0CD98E00A4C011 /* OrderDetailPickInfoCell.m */; };
+		42F9FACF1F8C592700D9C781 /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F9FACE1F8C592700D9C781 /* NetworkUtils.m */; };
+		42F9FAD21F8C595A00D9C781 /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F9FAD11F8C595A00D9C781 /* RANetworkTaskDelegate.m */; };
 		710274251CC606C4009FD219 /* UserListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 710274241CC606C4009FD219 /* UserListViewController.m */; };
 		7111E5721C76C557004763B3 /* customer_info_template_edit.json in Resources */ = {isa = PBXBuildFile; fileRef = 7111E5711C76C557004763B3 /* customer_info_template_edit.json */; };
 		71131F921CA1372300DBF6E2 /* SimplifiedBuyingProgramViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71131F911CA1372300DBF6E2 /* SimplifiedBuyingProgramViewController.m */; };
@@ -57,7 +59,7 @@
 		712AFEDA1DBA050200254965 /* ImageDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFECC1DBA050200254965 /* ImageDrawable.m */; };
 		712AFEDB1DBA050200254965 /* LineDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFECE1DBA050200254965 /* LineDrawable.m */; };
 		712AFEDC1DBA050200254965 /* PDFDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFED01DBA050200254965 /* PDFDrawable.m */; };
-		712AFEDD1DBA050200254965 /* PDFPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFED21DBA050200254965 /* PDFPage.m */; };
+		712AFEDD1DBA050200254965 /* RAPDFPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFED21DBA050200254965 /* RAPDFPage.m */; };
 		712AFEDE1DBA050200254965 /* TableDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFED41DBA050200254965 /* TableDrawable.m */; };
 		712AFEDF1DBA050200254965 /* TextDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFED61DBA050200254965 /* TextDrawable.m */; };
 		712AFEE21DBA077F00254965 /* pdfCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFEE11DBA077F00254965 /* pdfCreator.m */; };
@@ -97,7 +99,7 @@
 		7161FEB51D61B24900157EE1 /* creditcardpayment.html in Resources */ = {isa = PBXBuildFile; fileRef = 7161FEB21D61B24900157EE1 /* creditcardpayment.html */; };
 		7161FEB61D61B24900157EE1 /* normalpayment.html in Resources */ = {isa = PBXBuildFile; fileRef = 7161FEB31D61B24900157EE1 /* normalpayment.html */; };
 		7161FEB71D61B24900157EE1 /* orderinfo.html in Resources */ = {isa = PBXBuildFile; fileRef = 7161FEB41D61B24900157EE1 /* orderinfo.html */; };
-		7162A4FE1C585FFB00AB630E /* PDFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A4FB1C585FFB00AB630E /* PDFViewController.m */; };
+		7162A4FE1C585FFB00AB630E /* RAPDFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A4FB1C585FFB00AB630E /* RAPDFViewController.m */; };
 		7162A4FF1C585FFB00AB630E /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A4FD1C585FFB00AB630E /* WebViewController.m */; };
 		7162A5021C586F5B00AB630E /* AddressEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A5011C586F5B00AB630E /* AddressEditorViewController.m */; };
 		7162A5091C586FC100AB630E /* CycleScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7162A5041C586FC100AB630E /* CycleScrollView.m */; };
@@ -266,7 +268,6 @@
 		71DF74981C57614C00F2789C /* PhotoStackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DF74941C57614C00F2789C /* PhotoStackViewController.m */; };
 		71FFBBE91C60894900D91DC2 /* iSalesDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE61C60894900D91DC2 /* iSalesDB.m */; };
 		71FFBBEA1C60894900D91DC2 /* iSalesNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */; };
-		A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C694180C757B34E24180D628 /* libPods.a */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -350,8 +351,10 @@
 		42D9A0241EB03994008AF7AF /* libAdIdAccess.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libAdIdAccess.a; sourceTree = "<group>"; };
 		42DC12EF1F0CD98E00A4C011 /* OrderDetailPickInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OrderDetailPickInfoCell.h; path = common/Functions/order/OrderDetailPickInfoCell.h; sourceTree = SOURCE_ROOT; };
 		42DC12F01F0CD98E00A4C011 /* OrderDetailPickInfoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OrderDetailPickInfoCell.m; path = common/Functions/order/OrderDetailPickInfoCell.m; sourceTree = SOURCE_ROOT; };
-		56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
-		6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
+		42F9FACD1F8C592600D9C781 /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../common/NetworkUtils.h; sourceTree = "<group>"; };
+		42F9FACE1F8C592700D9C781 /* NetworkUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = ../../common/NetworkUtils.m; sourceTree = "<group>"; };
+		42F9FAD01F8C595A00D9C781 /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
+		42F9FAD11F8C595A00D9C781 /* RANetworkTaskDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RANetworkTaskDelegate.m; path = ../../common/upload/RANetworkTaskDelegate.m; sourceTree = "<group>"; };
 		710274231CC606C4009FD219 /* UserListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserListViewController.h; path = common/Functions/sidemenu/UserListViewController.h; sourceTree = SOURCE_ROOT; };
 		710274241CC606C4009FD219 /* UserListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserListViewController.m; path = common/Functions/sidemenu/UserListViewController.m; sourceTree = SOURCE_ROOT; };
 		7111E5711C76C557004763B3 /* customer_info_template_edit.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = customer_info_template_edit.json; path = common/Functions/contact/customer_info_template_edit.json; sourceTree = SOURCE_ROOT; };
@@ -370,8 +373,8 @@
 		712AFECE1DBA050200254965 /* LineDrawable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LineDrawable.m; path = common/pdfCreator/LineDrawable.m; sourceTree = SOURCE_ROOT; };
 		712AFECF1DBA050200254965 /* PDFDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFDrawable.h; path = common/pdfCreator/PDFDrawable.h; sourceTree = SOURCE_ROOT; };
 		712AFED01DBA050200254965 /* PDFDrawable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDFDrawable.m; path = common/pdfCreator/PDFDrawable.m; sourceTree = SOURCE_ROOT; };
-		712AFED11DBA050200254965 /* PDFPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFPage.h; path = common/pdfCreator/PDFPage.h; sourceTree = SOURCE_ROOT; };
-		712AFED21DBA050200254965 /* PDFPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDFPage.m; path = common/pdfCreator/PDFPage.m; sourceTree = SOURCE_ROOT; };
+		712AFED11DBA050200254965 /* RAPDFPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAPDFPage.h; path = common/pdfCreator/RAPDFPage.h; sourceTree = SOURCE_ROOT; };
+		712AFED21DBA050200254965 /* RAPDFPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAPDFPage.m; path = common/pdfCreator/RAPDFPage.m; sourceTree = SOURCE_ROOT; };
 		712AFED31DBA050200254965 /* TableDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableDrawable.h; path = common/pdfCreator/TableDrawable.h; sourceTree = SOURCE_ROOT; };
 		712AFED41DBA050200254965 /* TableDrawable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableDrawable.m; path = common/pdfCreator/TableDrawable.m; sourceTree = SOURCE_ROOT; };
 		712AFED51DBA050200254965 /* TextDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextDrawable.h; path = common/pdfCreator/TextDrawable.h; sourceTree = SOURCE_ROOT; };
@@ -442,8 +445,8 @@
 		7161FEB21D61B24900157EE1 /* creditcardpayment.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = creditcardpayment.html; path = common/Functions/offline/creditcardpayment.html; sourceTree = SOURCE_ROOT; };
 		7161FEB31D61B24900157EE1 /* normalpayment.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = normalpayment.html; path = common/Functions/offline/normalpayment.html; sourceTree = SOURCE_ROOT; };
 		7161FEB41D61B24900157EE1 /* orderinfo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = orderinfo.html; path = common/Functions/offline/orderinfo.html; sourceTree = SOURCE_ROOT; };
-		7162A4FA1C585FFB00AB630E /* PDFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFViewController.h; path = "common/Functions/PDF+Web/PDFViewController.h"; sourceTree = SOURCE_ROOT; };
-		7162A4FB1C585FFB00AB630E /* PDFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDFViewController.m; path = "common/Functions/PDF+Web/PDFViewController.m"; sourceTree = SOURCE_ROOT; };
+		7162A4FA1C585FFB00AB630E /* RAPDFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAPDFViewController.h; path = "common/Functions/PDF+Web/RAPDFViewController.h"; sourceTree = SOURCE_ROOT; };
+		7162A4FB1C585FFB00AB630E /* RAPDFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAPDFViewController.m; path = "common/Functions/PDF+Web/RAPDFViewController.m"; sourceTree = SOURCE_ROOT; };
 		7162A4FC1C585FFB00AB630E /* WebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebViewController.h; path = "common/Functions/PDF+Web/WebViewController.h"; sourceTree = SOURCE_ROOT; };
 		7162A4FD1C585FFB00AB630E /* WebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebViewController.m; path = "common/Functions/PDF+Web/WebViewController.m"; sourceTree = SOURCE_ROOT; };
 		7162A5001C586F5B00AB630E /* AddressEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressEditorViewController.h; path = common/Functions/address/AddressEditorViewController.h; sourceTree = SOURCE_ROOT; };
@@ -754,7 +757,6 @@
 		71FFBBE61C60894900D91DC2 /* iSalesDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesDB.m; path = common/data_provider/iSalesDB.m; sourceTree = SOURCE_ROOT; };
 		71FFBBE71C60894900D91DC2 /* iSalesNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iSalesNetwork.h; path = common/data_provider/iSalesNetwork.h; sourceTree = SOURCE_ROOT; };
 		71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesNetwork.m; path = common/data_provider/iSalesNetwork.m; sourceTree = SOURCE_ROOT; };
-		C694180C757B34E24180D628 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -781,7 +783,6 @@
 				713F76AC1929F4A7006A7305 /* CoreGraphics.framework in Frameworks */,
 				713F76AE1929F4A7006A7305 /* UIKit.framework in Frameworks */,
 				713F76AA1929F4A7006A7305 /* Foundation.framework in Frameworks */,
-				A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */,
 				42BEF34F1E89FE1100632AB6 /* FirebaseAnalytics.framework in Frameworks */,
 				42BEF3571E89FE1200632AB6 /* libGoogleAnalytics.a in Frameworks */,
 			);
@@ -1107,8 +1108,8 @@
 				712AFECE1DBA050200254965 /* LineDrawable.m */,
 				712AFECF1DBA050200254965 /* PDFDrawable.h */,
 				712AFED01DBA050200254965 /* PDFDrawable.m */,
-				712AFED11DBA050200254965 /* PDFPage.h */,
-				712AFED21DBA050200254965 /* PDFPage.m */,
+				712AFED11DBA050200254965 /* RAPDFPage.h */,
+				712AFED21DBA050200254965 /* RAPDFPage.m */,
 				712AFED31DBA050200254965 /* TableDrawable.h */,
 				712AFED41DBA050200254965 /* TableDrawable.m */,
 				712AFED51DBA050200254965 /* TextDrawable.h */,
@@ -1174,7 +1175,6 @@
 				713F76AB1929F4A7006A7305 /* CoreGraphics.framework */,
 				713F76AD1929F4A7006A7305 /* UIKit.framework */,
 				713F76C81929F4A7006A7305 /* XCTest.framework */,
-				C694180C757B34E24180D628 /* libPods.a */,
 			);
 			name = Frameworks;
 			path = ..;
@@ -1228,7 +1228,6 @@
 				713F76B71929F4A7006A7305 /* iSales-GATIT-Prefix.pch */,
 				713F76A81929F4A7006A7305 /* Frameworks */,
 				713F76A71929F4A7006A7305 /* Products */,
-				CA33503C644B4B30FB07E665 /* Pods */,
 			);
 			path = "iSales-GATIT";
 			sourceTree = "<group>";
@@ -1398,6 +1397,10 @@
 				42BF67CB1E5179970081F90A /* ERPUtils.m */,
 				71FFBBE51C60894900D91DC2 /* iSalesDB.h */,
 				71FFBBE61C60894900D91DC2 /* iSalesDB.m */,
+				42F9FACD1F8C592600D9C781 /* NetworkUtils.h */,
+				42F9FACE1F8C592700D9C781 /* NetworkUtils.m */,
+				42F9FAD01F8C595A00D9C781 /* RANetworkTaskDelegate.h */,
+				42F9FAD11F8C595A00D9C781 /* RANetworkTaskDelegate.m */,
 				71FFBBE71C60894900D91DC2 /* iSalesNetwork.h */,
 				71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */,
 				71BF06F91D2F3CAC00981938 /* OLDataProvider.h */,
@@ -1570,8 +1573,8 @@
 		7190F1091BBBCAF100B2F243 /* PDF+Web */ = {
 			isa = PBXGroup;
 			children = (
-				7162A4FA1C585FFB00AB630E /* PDFViewController.h */,
-				7162A4FB1C585FFB00AB630E /* PDFViewController.m */,
+				7162A4FA1C585FFB00AB630E /* RAPDFViewController.h */,
+				7162A4FB1C585FFB00AB630E /* RAPDFViewController.m */,
 				7162A4FC1C585FFB00AB630E /* WebViewController.h */,
 				7162A4FD1C585FFB00AB630E /* WebViewController.m */,
 			);
@@ -1815,16 +1818,6 @@
 			name = AutoScrollImage;
 			sourceTree = "<group>";
 		};
-		CA33503C644B4B30FB07E665 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */,
-				6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */,
-			);
-			name = Pods;
-			path = ..;
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -1832,12 +1825,9 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 713F76D81929F4A7006A7305 /* Build configuration list for PBXNativeTarget "iSales-GATIT" */;
 			buildPhases = (
-				83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */,
 				713F76A21929F4A7006A7305 /* Sources */,
 				713F76A31929F4A7006A7305 /* Frameworks */,
 				713F76A41929F4A7006A7305 /* Resources */,
-				9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */,
-				BCE8779EB44C92756196E042 /* Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -1932,54 +1922,6 @@
 		};
 /* End PBXResourcesBuildPhase section */
 
-/* Begin PBXShellScriptBuildPhase section */
-		83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Check Pods Manifest.lock";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n    cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n    exit 1\nfi\n";
-			showEnvVarsInLog = 0;
-		};
-		9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Embed Pods Frameworks";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		BCE8779EB44C92756196E042 /* Copy Pods Resources */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Copy Pods Resources";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-/* End PBXShellScriptBuildPhase section */
-
 /* Begin PBXSourcesBuildPhase section */
 		713F76A21929F4A7006A7305 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
@@ -2028,6 +1970,7 @@
 				7162A5251C58706C00AB630E /* CategoryCellSmall.m in Sources */,
 				712AFEDA1DBA050200254965 /* ImageDrawable.m in Sources */,
 				428980721E24B1E9005F1BD8 /* Singleton.m in Sources */,
+				42F9FAD21F8C595A00D9C781 /* RANetworkTaskDelegate.m in Sources */,
 				712C40B91C731126000E6831 /* ItemNotesViewController.m in Sources */,
 				7162A5AD1C58735900AB630E /* TearSheetParamViewController.m in Sources */,
 				7141DD611C5747CE00F7DF59 /* NSData+Base64.m in Sources */,
@@ -2102,7 +2045,7 @@
 				7162A54A1C58719D00AB630E /* RATreeView+UIScrollView.m in Sources */,
 				7162A55D1C58724700AB630E /* ContactListViewController.m in Sources */,
 				7162A5751C58728D00AB630E /* LineView.m in Sources */,
-				712AFEDD1DBA050200254965 /* PDFPage.m in Sources */,
+				712AFEDD1DBA050200254965 /* RAPDFPage.m in Sources */,
 				428980481E249339005F1BD8 /* JKMessageBoxController.m in Sources */,
 				7162A5741C58728D00AB630E /* DetailViewController.m in Sources */,
 				71DF748E1C57608F00F2789C /* UILabel+FontAppearance.m in Sources */,
@@ -2125,6 +2068,7 @@
 				7162A5811C5872EF00AB630E /* HomeTableViewCellBanner.m in Sources */,
 				7162A5E61C58781000AB630E /* iSalesNavigationController.m in Sources */,
 				7141DD631C5747CE00F7DF59 /* NSString+Base64.m in Sources */,
+				42F9FACF1F8C592700D9C781 /* NetworkUtils.m in Sources */,
 				7162A5C41C5873BB00AB630E /* ItemSearchViewController.m in Sources */,
 				7162A5481C58719D00AB630E /* RATreeView+TableViewDataSource.m in Sources */,
 				42D3A4A31EFA6D36007A54C1 /* PhotoPreviewCell.m in Sources */,
@@ -2149,7 +2093,7 @@
 				7162A51A1C58704600AB630E /* ModelItemCell.m in Sources */,
 				7141DD511C57459B00F7DF59 /* qrencode.c in Sources */,
 				7162A5451C58719D00AB630E /* RATreeView.m in Sources */,
-				7162A4FE1C585FFB00AB630E /* PDFViewController.m in Sources */,
+				7162A4FE1C585FFB00AB630E /* RAPDFViewController.m in Sources */,
 				71DF74841C57608F00F2789C /* ImageScrollerViewController.m in Sources */,
 				71DF74861C57608F00F2789C /* ImageViewController.m in Sources */,
 				7162A5821C5872EF00AB630E /* HomeTableViewCellButtonBanner.m in Sources */,
@@ -2326,7 +2270,6 @@
 		};
 		713F76D91929F4A7006A7305 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -2370,7 +2313,6 @@
 		};
 		713F76DA1929F4A7006A7305 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";

+ 224 - 122
RedAnt ERP Mobile/iSales-GATIT/AppDelegate.m

@@ -9,11 +9,11 @@
 #import "AppDelegate.h"
 #import "UILabel+FontAppearance.h"
 #import "MainViewController.h"
-#import "PDFViewController.h"
+#import "RAPDFViewController.h"
 #import "ZipArchive.h"
 #import "DefaultAppearance.h"
 #import "OLDataProvider.h"
-#import "AFHTTPSessionManager.h"
+//#import "AFHTTPSessionManager.h"
 #import "SelectUploadOrderViewController.h"
 #import "iSalesDB.h"
 #import "iSalesNetwork.h"
@@ -1203,6 +1203,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         }
     });
 }
+
 -(void) upload_offline:(NSString*) ver useInternalAddress:(bool)buseinternaladdress orderid:(NSArray*)arr_order
 {
     [self add_downloadlog:@"Begin sync, please wait."];
@@ -1219,20 +1220,14 @@ void UncaughtExceptionHandler(NSException *exception) {
         
         [ERPUtils googleAnalyticsSendRequestString:nil WithScreen:ScreenCodeOfflineSync Action:nil Extra:nil];
         
-        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
-        
-        serializer.timeoutInterval=300;
-        
         NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
         
         if(appDelegate.user!=nil)
             [params setValue:appDelegate.user forKey:@"user"];
-        //    if(appDelegate.contact_id!=nil)
-        //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
         if(appDelegate.password!=nil)
             [params setValue:appDelegate.password forKey:@"password"];
         
-
+        
 #if TARGET_IPHONE_SIMULATOR//模拟器
         [params setValue:@"simulator_uuid" forKey:@"idfv"];
 #elif TARGET_OS_IPHONE//真机
@@ -1240,134 +1235,241 @@ void UncaughtExceptionHandler(NSException *exception) {
         NSUUID* uuid =dev.identifierForVendor;
         [params setValue:uuid.UUIDString forKey:@"idfv"];
 #endif
-        
-        
-        
-        
-        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_OFFLINE parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-            [formData appendPartWithFileData:data name:@"upfile" fileName:[upfile lastPathComponent] mimeType:@"application/zip"];
-        } error:nil];
-        
-        
-        
-        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
-        
-        NSProgress *progress = nil;
-        
-        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
-            
+        __weak typeof(self) weakSelf = self;
+        [NetworkUtils upload:data FileName:[upfile lastPathComponent] Params:params ToHost:URL_UPLOAD_OFFLINE Result:^(NSMutableDictionary *json) {
             
-            
-            if (error) {
-                
-                NSString* err_msg = [error localizedDescription];
-                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
-                
-                
-                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",str);
-                [self add_downloadlog:err_msg];
-                [self add_downloadlog:@"Can not connect to server please try again."];
-                [self.settingUI onSyncFinish];
-                
-            } else {
-                DebugLog(@"response ");
-                
-                
-                
-                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
-                
-                // 再将NSData转为字符串
-                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-                
-                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",jsonStr);
+            if([[json valueForKey:@"result"] intValue]==2)
+            {
+                NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
+                if (out_of_stock_ids) {
+                    [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
+                }
                 
-                NSDictionary* json = responseObject;
+                [weakSelf add_downloadlog:@"Upload successful."];
+                appDelegate.disable_trigger=true;
+                NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
                 
+                [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
+                [iSalesDB execSql:@"delete from wishlist"];
+                [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
+                [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
+                [iSalesDB execSql:@"delete from offline_portfolio"];
+                [iSalesDB execSql:@"delete from offline_pdf"];
+                [OLDataProvider offline_clear_PDFCache];
                 
-                if([[json valueForKey:@"result"] intValue]==2)
+                NSString* contactMap = json[@"contactMap"];
+                if(contactMap.length>0)
                 {
-                    NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
-                    if (out_of_stock_ids) {
-                        [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
-                    }
-                    
-                    [self add_downloadlog:@"Upload successful."];
-                    appDelegate.disable_trigger=true;
-                    NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
-                    
-                    [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
-                    [iSalesDB execSql:@"delete from wishlist"];
-                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
-                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
-                    [iSalesDB execSql:@"delete from offline_portfolio"];
-                    [iSalesDB execSql:@"delete from offline_pdf"];
-                    [OLDataProvider offline_clear_PDFCache];
-                    
-                    NSString* contactMap = json[@"contactMap"];
-                    if(contactMap.length>0)
+                    NSDictionary* contactjson = [RAUtils string2dict:contactMap];
+                    NSArray *keys= [contactjson allKeys];
+                    //遍历keys
+                    for(int i=0;i<[keys count];i++)
                     {
-                        NSDictionary* contactjson = [RAUtils string2dict:contactMap];
-                        NSArray *keys= [contactjson allKeys];
-                        //遍历keys
-                        for(int i=0;i<[keys count];i++)
-                        {
-                            //得到当前key
-                            NSString *key=[keys objectAtIndex:i];
-                            //如果key不是pic,说明value是字符类型,比如name:Boris
-                            NSString* value = [contactjson valueForKey:key];
-                            
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
-
-                        }
+                        //得到当前key
+                        NSString *key=[keys objectAtIndex:i];
+                        //如果key不是pic,说明value是字符类型,比如name:Boris
+                        NSString* value = [contactjson valueForKey:key];
+                        
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
+                        
                     }
-                    //                    NSDictionary* contactjson= upjson[@"contact"];
-                    //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
-                    //                    NSDictionary* orderjson= upjson[@"order"];
-                    
-                    appDelegate.disable_trigger=false;
-                    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-                    [defaults removeObjectForKey:@"Forcedownload"];
-                    [defaults setBool:true forKey:@"Forcedownload"];
-                    [defaults synchronize];
-                    
-                    [self download_offline:ver useInternalAddress:buseinternaladdress];
-                    
-                }
-                else
-                {
-                    [self add_downloadlog:[json valueForKey:@"msg"]];
-                    [self add_downloadlog:@"Sync canceled."];
-                    [self.settingUI onSyncFinish];
                 }
                 
+                appDelegate.disable_trigger=false;
+                NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+                [defaults removeObjectForKey:@"Forcedownload"];
+                [defaults setBool:true forKey:@"Forcedownload"];
+                [defaults synchronize];
+                
+                [weakSelf download_offline:ver useInternalAddress:buseinternaladdress];
                 
             }
-            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-        }];
-        
-        
-        
-        
-        
-        
-        
-        [uploadTask resume];
+            else
+            {
+                [weakSelf add_downloadlog:[json valueForKey:@"msg"]];
+                [weakSelf add_downloadlog:@"Sync canceled."];
+                [weakSelf.settingUI onSyncFinish];
+            }
+            
+        } Progress:^(NSURLSessionTask *task, double progress) {
+            
+        } DecryptHandler:nil];
         
     }
     
-    
-    
     return;
 }
+
+//-(void) upload_offline:(NSString*) ver useInternalAddress:(bool)buseinternaladdress orderid:(NSArray*)arr_order
+//{
+//    [self add_downloadlog:@"Begin sync, please wait."];
+//    [self add_downloadlog:@"Prepare upload data."];
+//    //   NSArray* arr_order=[OLDataProvider enumOfflineOrder];
+//    NSDictionary* upjson=[OLDataProvider prepareUpload:arr_order];
+//
+//    NSString* upfile=upjson[@"file"];
+//
+//    {
+//        NSData* data = [NSData dataWithContentsOfFile: upfile];
+//        UIApplication * app = [UIApplication sharedApplication];
+//        AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//
+//        [ERPUtils googleAnalyticsSendRequestString:nil WithScreen:ScreenCodeOfflineSync Action:nil Extra:nil];
+//
+//        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
+//
+//        serializer.timeoutInterval=300;
+//
+//        NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
+//
+//        if(appDelegate.user!=nil)
+//            [params setValue:appDelegate.user forKey:@"user"];
+//        //    if(appDelegate.contact_id!=nil)
+//        //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
+//        if(appDelegate.password!=nil)
+//            [params setValue:appDelegate.password forKey:@"password"];
+//
+//
+//#if TARGET_IPHONE_SIMULATOR//模拟器
+//        [params setValue:@"simulator_uuid" forKey:@"idfv"];
+//#elif TARGET_OS_IPHONE//真机
+//        UIDevice * dev = [UIDevice currentDevice];
+//        NSUUID* uuid =dev.identifierForVendor;
+//        [params setValue:uuid.UUIDString forKey:@"idfv"];
+//#endif
+//
+//
+//
+//
+//        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_OFFLINE parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//            [formData appendPartWithFileData:data name:@"upfile" fileName:[upfile lastPathComponent] mimeType:@"application/zip"];
+//        } error:nil];
+//
+//
+//
+//        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+//
+//        NSProgress *progress = nil;
+//
+//        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+//
+//
+//
+//            if (error) {
+//
+//                NSString* err_msg = [error localizedDescription];
+//                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+//
+//
+//                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",str);
+//                [self add_downloadlog:err_msg];
+//                [self add_downloadlog:@"Can not connect to server please try again."];
+//                [self.settingUI onSyncFinish];
+//
+//            } else {
+//                DebugLog(@"response ");
+//
+//
+//
+//                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
+//
+//                // 再将NSData转为字符串
+//                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+//
+//                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",jsonStr);
+//
+//                NSDictionary* json = responseObject;
+//
+//
+//                if([[json valueForKey:@"result"] intValue]==2)
+//                {
+//                    NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
+//                    if (out_of_stock_ids) {
+//                        [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
+//                    }
+//
+//                    [self add_downloadlog:@"Upload successful."];
+//                    appDelegate.disable_trigger=true;
+//                    NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
+//
+//                    [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
+//                    [iSalesDB execSql:@"delete from wishlist"];
+//                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
+//                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
+//                    [iSalesDB execSql:@"delete from offline_portfolio"];
+//                    [iSalesDB execSql:@"delete from offline_pdf"];
+//                    [OLDataProvider offline_clear_PDFCache];
+//
+//                    NSString* contactMap = json[@"contactMap"];
+//                    if(contactMap.length>0)
+//                    {
+//                        NSDictionary* contactjson = [RAUtils string2dict:contactMap];
+//                        NSArray *keys= [contactjson allKeys];
+//                        //遍历keys
+//                        for(int i=0;i<[keys count];i++)
+//                        {
+//                            //得到当前key
+//                            NSString *key=[keys objectAtIndex:i];
+//                            //如果key不是pic,说明value是字符类型,比如name:Boris
+//                            NSString* value = [contactjson valueForKey:key];
+//
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
+//
+//                        }
+//                    }
+//                    //                    NSDictionary* contactjson= upjson[@"contact"];
+//                    //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
+//                    //                    NSDictionary* orderjson= upjson[@"order"];
+//
+//                    appDelegate.disable_trigger=false;
+//                    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+//                    [defaults removeObjectForKey:@"Forcedownload"];
+//                    [defaults setBool:true forKey:@"Forcedownload"];
+//                    [defaults synchronize];
+//
+//                    [self download_offline:ver useInternalAddress:buseinternaladdress];
+//
+//                }
+//                else
+//                {
+//                    [self add_downloadlog:[json valueForKey:@"msg"]];
+//                    [self add_downloadlog:@"Sync canceled."];
+//                    [self.settingUI onSyncFinish];
+//                }
+//
+//
+//            }
+//            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        }];
+//
+//
+//
+//
+//
+//
+//
+//        [uploadTask resume];
+//
+//    }
+//
+//
+//
+//    return;
+//}
 -(void) download_offline:(NSString*) ver useInternalAddress:(bool)buseinternaladdress
 {
     NSString *plistPath = [RAUtils get_config_path];
@@ -2929,7 +3031,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 
 -(void) printPdf:(NSString*) url company:(NSString*)company send_to:(NSString*)send_to soid:(NSString*)soid content:(NSString*)content
 {
-    PDFViewController *ViewController = [self.main_vc.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"];
+    RAPDFViewController *ViewController = [self.main_vc.storyboard instantiateViewControllerWithIdentifier:@"RAPDFViewController"];
     ViewController.url = url;
     ViewController.canSave = false;
     

+ 0 - 70
RedAnt ERP Mobile/iSales-HOMER.xcodeproj/project.pbxproj

@@ -274,7 +274,6 @@
 		71E9F6C51F8B58740052C78E /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E9F6C31F8B58740052C78E /* RANetworkTaskDelegate.m */; };
 		71FFBBE91C60894900D91DC2 /* iSalesDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE61C60894900D91DC2 /* iSalesDB.m */; };
 		71FFBBEA1C60894900D91DC2 /* iSalesNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */; };
-		A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C694180C757B34E24180D628 /* libPods.a */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -360,8 +359,6 @@
 		42D9A0241EB03994008AF7AF /* libAdIdAccess.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libAdIdAccess.a; sourceTree = "<group>"; };
 		42DC12EF1F0CD98E00A4C011 /* OrderDetailPickInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OrderDetailPickInfoCell.h; path = common/Functions/order/OrderDetailPickInfoCell.h; sourceTree = SOURCE_ROOT; };
 		42DC12F01F0CD98E00A4C011 /* OrderDetailPickInfoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OrderDetailPickInfoCell.m; path = common/Functions/order/OrderDetailPickInfoCell.m; sourceTree = SOURCE_ROOT; };
-		56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
-		6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
 		710274231CC606C4009FD219 /* UserListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserListViewController.h; path = common/Functions/sidemenu/UserListViewController.h; sourceTree = SOURCE_ROOT; };
 		710274241CC606C4009FD219 /* UserListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserListViewController.m; path = common/Functions/sidemenu/UserListViewController.m; sourceTree = SOURCE_ROOT; };
 		7111E5711C76C557004763B3 /* customer_info_template_edit.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = customer_info_template_edit.json; path = common/Functions/contact/customer_info_template_edit.json; sourceTree = SOURCE_ROOT; };
@@ -768,7 +765,6 @@
 		71FFBBE61C60894900D91DC2 /* iSalesDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesDB.m; path = common/data_provider/iSalesDB.m; sourceTree = SOURCE_ROOT; };
 		71FFBBE71C60894900D91DC2 /* iSalesNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iSalesNetwork.h; path = common/data_provider/iSalesNetwork.h; sourceTree = SOURCE_ROOT; };
 		71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesNetwork.m; path = common/data_provider/iSalesNetwork.m; sourceTree = SOURCE_ROOT; };
-		C694180C757B34E24180D628 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -795,7 +791,6 @@
 				713F76AC1929F4A7006A7305 /* CoreGraphics.framework in Frameworks */,
 				713F76AE1929F4A7006A7305 /* UIKit.framework in Frameworks */,
 				713F76AA1929F4A7006A7305 /* Foundation.framework in Frameworks */,
-				A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */,
 				42BEF34F1E89FE1100632AB6 /* FirebaseAnalytics.framework in Frameworks */,
 				42BEF3571E89FE1200632AB6 /* libGoogleAnalytics.a in Frameworks */,
 			);
@@ -1188,7 +1183,6 @@
 				713F76AB1929F4A7006A7305 /* CoreGraphics.framework */,
 				713F76AD1929F4A7006A7305 /* UIKit.framework */,
 				713F76C81929F4A7006A7305 /* XCTest.framework */,
-				C694180C757B34E24180D628 /* libPods.a */,
 			);
 			name = Frameworks;
 			path = ..;
@@ -1242,7 +1236,6 @@
 				713F76B71929F4A7006A7305 /* iSales-HOMER-Prefix.pch */,
 				713F76A81929F4A7006A7305 /* Frameworks */,
 				713F76A71929F4A7006A7305 /* Products */,
-				CA33503C644B4B30FB07E665 /* Pods */,
 			);
 			path = "iSales-HOMER";
 			sourceTree = "<group>";
@@ -1835,16 +1828,6 @@
 			name = AutoScrollImage;
 			sourceTree = "<group>";
 		};
-		CA33503C644B4B30FB07E665 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */,
-				6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */,
-			);
-			name = Pods;
-			path = ..;
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -1852,12 +1835,9 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 713F76D81929F4A7006A7305 /* Build configuration list for PBXNativeTarget "iSales-HOMER" */;
 			buildPhases = (
-				83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */,
 				713F76A21929F4A7006A7305 /* Sources */,
 				713F76A31929F4A7006A7305 /* Frameworks */,
 				713F76A41929F4A7006A7305 /* Resources */,
-				9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */,
-				BCE8779EB44C92756196E042 /* Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -1958,54 +1938,6 @@
 		};
 /* End PBXResourcesBuildPhase section */
 
-/* Begin PBXShellScriptBuildPhase section */
-		83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Check Pods Manifest.lock";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n    cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n    exit 1\nfi\n";
-			showEnvVarsInLog = 0;
-		};
-		9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Embed Pods Frameworks";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		BCE8779EB44C92756196E042 /* Copy Pods Resources */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Copy Pods Resources";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-/* End PBXShellScriptBuildPhase section */
-
 /* Begin PBXSourcesBuildPhase section */
 		713F76A21929F4A7006A7305 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
@@ -2352,7 +2284,6 @@
 		};
 		713F76D91929F4A7006A7305 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -2396,7 +2327,6 @@
 		};
 		713F76DA1929F4A7006A7305 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";

+ 224 - 122
RedAnt ERP Mobile/iSales-HOMER/AppDelegate.m

@@ -13,7 +13,7 @@
 #import "ZipArchive.h"
 #import "DefaultAppearance.h"
 #import "OLDataProvider.h"
-#import "AFHTTPSessionManager.h"
+//#import "AFHTTPSessionManager.h"
 #import "SelectUploadOrderViewController.h"
 #import "iSalesDB.h"
 #import "iSalesNetwork.h"
@@ -1210,6 +1210,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         }
     });
 }
+
 -(void) upload_offline:(NSString*) ver useInternalAddress:(bool)buseinternaladdress orderid:(NSArray*)arr_order
 {
     [self add_downloadlog:@"Begin sync, please wait."];
@@ -1226,20 +1227,14 @@ void UncaughtExceptionHandler(NSException *exception) {
         
         [ERPUtils googleAnalyticsSendRequestString:nil WithScreen:ScreenCodeOfflineSync Action:nil Extra:nil];
         
-        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
-        
-        serializer.timeoutInterval=300;
-        
         NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
         
         if(appDelegate.user!=nil)
             [params setValue:appDelegate.user forKey:@"user"];
-        //    if(appDelegate.contact_id!=nil)
-        //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
         if(appDelegate.password!=nil)
             [params setValue:appDelegate.password forKey:@"password"];
         
-
+        
 #if TARGET_IPHONE_SIMULATOR//模拟器
         [params setValue:@"simulator_uuid" forKey:@"idfv"];
 #elif TARGET_OS_IPHONE//真机
@@ -1247,134 +1242,241 @@ void UncaughtExceptionHandler(NSException *exception) {
         NSUUID* uuid =dev.identifierForVendor;
         [params setValue:uuid.UUIDString forKey:@"idfv"];
 #endif
-        
-        
-        
-        
-        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_OFFLINE parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-            [formData appendPartWithFileData:data name:@"upfile" fileName:[upfile lastPathComponent] mimeType:@"application/zip"];
-        } error:nil];
-        
-        
-        
-        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
-        
-        NSProgress *progress = nil;
-        
-        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
-            
+        __weak typeof(self) weakSelf = self;
+        [NetworkUtils upload:data FileName:[upfile lastPathComponent] Params:params ToHost:URL_UPLOAD_OFFLINE Result:^(NSMutableDictionary *json) {
             
-            
-            if (error) {
-                
-                NSString* err_msg = [error localizedDescription];
-                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
-                
-                
-                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",str);
-                [self add_downloadlog:err_msg];
-                [self add_downloadlog:@"Can not connect to server please try again."];
-                [self.settingUI onSyncFinish];
-                
-            } else {
-                DebugLog(@"response ");
-                
-                
-                
-                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
-                
-                // 再将NSData转为字符串
-                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-                
-                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",jsonStr);
+            if([[json valueForKey:@"result"] intValue]==2)
+            {
+                NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
+                if (out_of_stock_ids) {
+                    [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
+                }
                 
-                NSDictionary* json = responseObject;
+                [weakSelf add_downloadlog:@"Upload successful."];
+                appDelegate.disable_trigger=true;
+                NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
                 
+                [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
+                [iSalesDB execSql:@"delete from wishlist"];
+                [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
+                [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
+                [iSalesDB execSql:@"delete from offline_portfolio"];
+                [iSalesDB execSql:@"delete from offline_pdf"];
+                [OLDataProvider offline_clear_PDFCache];
                 
-                if([[json valueForKey:@"result"] intValue]==2)
+                NSString* contactMap = json[@"contactMap"];
+                if(contactMap.length>0)
                 {
-                    NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
-                    if (out_of_stock_ids) {
-                        [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
-                    }
-                    
-                    [self add_downloadlog:@"Upload successful."];
-                    appDelegate.disable_trigger=true;
-                    NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
-                    
-                    [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
-                    [iSalesDB execSql:@"delete from wishlist"];
-                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
-                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
-                    [iSalesDB execSql:@"delete from offline_portfolio"];
-                    [iSalesDB execSql:@"delete from offline_pdf"];
-                    [OLDataProvider offline_clear_PDFCache];
-                    
-                    NSString* contactMap = json[@"contactMap"];
-                    if(contactMap.length>0)
+                    NSDictionary* contactjson = [RAUtils string2dict:contactMap];
+                    NSArray *keys= [contactjson allKeys];
+                    //遍历keys
+                    for(int i=0;i<[keys count];i++)
                     {
-                        NSDictionary* contactjson = [RAUtils string2dict:contactMap];
-                        NSArray *keys= [contactjson allKeys];
-                        //遍历keys
-                        for(int i=0;i<[keys count];i++)
-                        {
-                            //得到当前key
-                            NSString *key=[keys objectAtIndex:i];
-                            //如果key不是pic,说明value是字符类型,比如name:Boris
-                            NSString* value = [contactjson valueForKey:key];
-                            
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
-
-                        }
+                        //得到当前key
+                        NSString *key=[keys objectAtIndex:i];
+                        //如果key不是pic,说明value是字符类型,比如name:Boris
+                        NSString* value = [contactjson valueForKey:key];
+                        
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
+                        
                     }
-                    //                    NSDictionary* contactjson= upjson[@"contact"];
-                    //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
-                    //                    NSDictionary* orderjson= upjson[@"order"];
-                    
-                    appDelegate.disable_trigger=false;
-                    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-                    [defaults removeObjectForKey:@"Forcedownload"];
-                    [defaults setBool:true forKey:@"Forcedownload"];
-                    [defaults synchronize];
-                    
-                    [self download_offline:ver useInternalAddress:buseinternaladdress];
-                    
-                }
-                else
-                {
-                    [self add_downloadlog:[json valueForKey:@"msg"]];
-                    [self add_downloadlog:@"Sync canceled."];
-                    [self.settingUI onSyncFinish];
                 }
                 
+                appDelegate.disable_trigger=false;
+                NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+                [defaults removeObjectForKey:@"Forcedownload"];
+                [defaults setBool:true forKey:@"Forcedownload"];
+                [defaults synchronize];
+                
+                [weakSelf download_offline:ver useInternalAddress:buseinternaladdress];
                 
             }
-            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-        }];
-        
-        
-        
-        
-        
-        
-        
-        [uploadTask resume];
-        
+            else
+            {
+                [weakSelf add_downloadlog:[json valueForKey:@"msg"]];
+                [weakSelf add_downloadlog:@"Sync canceled."];
+                [weakSelf.settingUI onSyncFinish];
+            }
+            
+        } Progress:^(NSURLSessionTask *task, double progress) {
+            
+        } DecryptHandler:nil];
+ 
     }
-    
-    
-    
+
     return;
 }
+
+//-(void) upload_offline:(NSString*) ver useInternalAddress:(bool)buseinternaladdress orderid:(NSArray*)arr_order
+//{
+//    [self add_downloadlog:@"Begin sync, please wait."];
+//    [self add_downloadlog:@"Prepare upload data."];
+//    //   NSArray* arr_order=[OLDataProvider enumOfflineOrder];
+//    NSDictionary* upjson=[OLDataProvider prepareUpload:arr_order];
+//
+//    NSString* upfile=upjson[@"file"];
+//
+//    {
+//        NSData* data = [NSData dataWithContentsOfFile: upfile];
+//        UIApplication * app = [UIApplication sharedApplication];
+//        AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//
+//        [ERPUtils googleAnalyticsSendRequestString:nil WithScreen:ScreenCodeOfflineSync Action:nil Extra:nil];
+//
+//        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
+//
+//        serializer.timeoutInterval=300;
+//
+//        NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
+//
+//        if(appDelegate.user!=nil)
+//            [params setValue:appDelegate.user forKey:@"user"];
+//        //    if(appDelegate.contact_id!=nil)
+//        //        [params setValue:appDelegate.contact_id forKey:@"contactId"];
+//        if(appDelegate.password!=nil)
+//            [params setValue:appDelegate.password forKey:@"password"];
+//
+//
+//#if TARGET_IPHONE_SIMULATOR//模拟器
+//        [params setValue:@"simulator_uuid" forKey:@"idfv"];
+//#elif TARGET_OS_IPHONE//真机
+//        UIDevice * dev = [UIDevice currentDevice];
+//        NSUUID* uuid =dev.identifierForVendor;
+//        [params setValue:uuid.UUIDString forKey:@"idfv"];
+//#endif
+//
+//
+//
+//
+//        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_OFFLINE parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//            [formData appendPartWithFileData:data name:@"upfile" fileName:[upfile lastPathComponent] mimeType:@"application/zip"];
+//        } error:nil];
+//
+//
+//
+//        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+//
+//        NSProgress *progress = nil;
+//
+//        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+//
+//
+//
+//            if (error) {
+//
+//                NSString* err_msg = [error localizedDescription];
+//                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+//
+//
+//                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",str);
+//                [self add_downloadlog:err_msg];
+//                [self add_downloadlog:@"Can not connect to server please try again."];
+//                [self.settingUI onSyncFinish];
+//
+//            } else {
+//                DebugLog(@"response ");
+//
+//
+//
+//                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
+//
+//                // 再将NSData转为字符串
+//                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+//
+//                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",jsonStr);
+//
+//                NSDictionary* json = responseObject;
+//
+//
+//                if([[json valueForKey:@"result"] intValue]==2)
+//                {
+//                    NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
+//                    if (out_of_stock_ids) {
+//                        [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
+//                    }
+//
+//                    [self add_downloadlog:@"Upload successful."];
+//                    appDelegate.disable_trigger=true;
+//                    NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
+//
+//                    [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
+//                    [iSalesDB execSql:@"delete from wishlist"];
+//                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
+//                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
+//                    [iSalesDB execSql:@"delete from offline_portfolio"];
+//                    [iSalesDB execSql:@"delete from offline_pdf"];
+//                    [OLDataProvider offline_clear_PDFCache];
+//
+//                    NSString* contactMap = json[@"contactMap"];
+//                    if(contactMap.length>0)
+//                    {
+//                        NSDictionary* contactjson = [RAUtils string2dict:contactMap];
+//                        NSArray *keys= [contactjson allKeys];
+//                        //遍历keys
+//                        for(int i=0;i<[keys count];i++)
+//                        {
+//                            //得到当前key
+//                            NSString *key=[keys objectAtIndex:i];
+//                            //如果key不是pic,说明value是字符类型,比如name:Boris
+//                            NSString* value = [contactjson valueForKey:key];
+//
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
+//
+//                        }
+//                    }
+//                    //                    NSDictionary* contactjson= upjson[@"contact"];
+//                    //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
+//                    //                    NSDictionary* orderjson= upjson[@"order"];
+//
+//                    appDelegate.disable_trigger=false;
+//                    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+//                    [defaults removeObjectForKey:@"Forcedownload"];
+//                    [defaults setBool:true forKey:@"Forcedownload"];
+//                    [defaults synchronize];
+//
+//                    [self download_offline:ver useInternalAddress:buseinternaladdress];
+//
+//                }
+//                else
+//                {
+//                    [self add_downloadlog:[json valueForKey:@"msg"]];
+//                    [self add_downloadlog:@"Sync canceled."];
+//                    [self.settingUI onSyncFinish];
+//                }
+//
+//
+//            }
+//            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        }];
+//
+//
+//
+//
+//
+//
+//
+//        [uploadTask resume];
+//
+//    }
+//
+//
+//
+//    return;
+//}
 -(void) download_offline:(NSString*) ver useInternalAddress:(bool)buseinternaladdress
 {
     NSString *plistPath = [RAUtils get_config_path];

+ 2 - 0
RedAnt ERP Mobile/iSales-HOMER/config.h

@@ -17,6 +17,8 @@
 #define  COMPANY_WEB @"homelegance.com"
 #define  COMPANY_FULL_NAME @"HOMELEGANCE LA, INC."
 
+#define MPACK
+
 # ifdef DEBUG
 //#define test_server
 # endif

+ 2 - 73
RedAnt ERP Mobile/iSales-NPD.xcodeproj/project.pbxproj

@@ -276,7 +276,6 @@
 		71E9F6C21F8B57E40052C78E /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E9F6C01F8B57E30052C78E /* RANetworkTaskDelegate.m */; };
 		71FFBBE91C60894900D91DC2 /* iSalesDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE61C60894900D91DC2 /* iSalesDB.m */; };
 		71FFBBEA1C60894900D91DC2 /* iSalesNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */; };
-		A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C694180C757B34E24180D628 /* libPods.a */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -372,8 +371,6 @@
 		42DC12F01F0CD98E00A4C011 /* OrderDetailPickInfoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OrderDetailPickInfoCell.m; path = common/Functions/order/OrderDetailPickInfoCell.m; sourceTree = SOURCE_ROOT; };
 		42DC31121D546FBE00BCD1C6 /* category.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = category.json; sourceTree = "<group>"; };
 		42E489601EE63F4E007256A0 /* more_color_64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = more_color_64.png; sourceTree = "<group>"; };
-		56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
-		6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
 		710274231CC606C4009FD219 /* UserListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserListViewController.h; path = common/Functions/sidemenu/UserListViewController.h; sourceTree = SOURCE_ROOT; };
 		710274241CC606C4009FD219 /* UserListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserListViewController.m; path = common/Functions/sidemenu/UserListViewController.m; sourceTree = SOURCE_ROOT; };
 		71073AE51DD41DD8001BC653 /* so_thumb.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = so_thumb.json; sourceTree = "<group>"; };
@@ -772,7 +769,6 @@
 		71FFBBE61C60894900D91DC2 /* iSalesDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesDB.m; path = common/data_provider/iSalesDB.m; sourceTree = SOURCE_ROOT; };
 		71FFBBE71C60894900D91DC2 /* iSalesNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iSalesNetwork.h; path = common/data_provider/iSalesNetwork.h; sourceTree = SOURCE_ROOT; };
 		71FFBBE81C60894900D91DC2 /* iSalesNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesNetwork.m; path = common/data_provider/iSalesNetwork.m; sourceTree = SOURCE_ROOT; };
-		C694180C757B34E24180D628 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -799,7 +795,6 @@
 				713F76AC1929F4A7006A7305 /* CoreGraphics.framework in Frameworks */,
 				713F76AE1929F4A7006A7305 /* UIKit.framework in Frameworks */,
 				713F76AA1929F4A7006A7305 /* Foundation.framework in Frameworks */,
-				A31E80CF7BEA220BD1CC4B97 /* libPods.a in Frameworks */,
 				42BEF34F1E89FE1100632AB6 /* FirebaseAnalytics.framework in Frameworks */,
 				42BEF3571E89FE1200632AB6 /* libGoogleAnalytics.a in Frameworks */,
 			);
@@ -1192,7 +1187,6 @@
 				713F76AB1929F4A7006A7305 /* CoreGraphics.framework */,
 				713F76AD1929F4A7006A7305 /* UIKit.framework */,
 				713F76C81929F4A7006A7305 /* XCTest.framework */,
-				C694180C757B34E24180D628 /* libPods.a */,
 			);
 			name = Frameworks;
 			path = ..;
@@ -1247,7 +1241,6 @@
 				713F76B71929F4A7006A7305 /* iSales-NPD-Prefix.pch */,
 				713F76A81929F4A7006A7305 /* Frameworks */,
 				713F76A71929F4A7006A7305 /* Products */,
-				CA33503C644B4B30FB07E665 /* Pods */,
 			);
 			path = "iSales-NPD";
 			sourceTree = "<group>";
@@ -1849,16 +1842,6 @@
 			name = AutoScrollImage;
 			sourceTree = "<group>";
 		};
-		CA33503C644B4B30FB07E665 /* Pods */ = {
-			isa = PBXGroup;
-			children = (
-				56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */,
-				6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */,
-			);
-			name = Pods;
-			path = ..;
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -1866,12 +1849,9 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 713F76D81929F4A7006A7305 /* Build configuration list for PBXNativeTarget "iSales-NPD" */;
 			buildPhases = (
-				83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */,
 				713F76A21929F4A7006A7305 /* Sources */,
 				713F76A31929F4A7006A7305 /* Frameworks */,
 				713F76A41929F4A7006A7305 /* Resources */,
-				9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */,
-				BCE8779EB44C92756196E042 /* Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -1892,7 +1872,6 @@
 				ORGANIZATIONNAME = "United Software Applications, Inc";
 				TargetAttributes = {
 					713F76A51929F4A7006A7305 = {
-						DevelopmentTeam = HXWLAA5YN5;
 						ProvisioningStyle = Automatic;
 					};
 				};
@@ -1974,54 +1953,6 @@
 		};
 /* End PBXResourcesBuildPhase section */
 
-/* Begin PBXShellScriptBuildPhase section */
-		83B497AF6D8F30851BF07892 /* Check Pods Manifest.lock */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Check Pods Manifest.lock";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n    cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n    exit 1\nfi\n";
-			showEnvVarsInLog = 0;
-		};
-		9D1D98CA53B7A76F53D76557 /* Embed Pods Frameworks */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Embed Pods Frameworks";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-		BCE8779EB44C92756196E042 /* Copy Pods Resources */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Copy Pods Resources";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
-			showEnvVarsInLog = 0;
-		};
-/* End PBXShellScriptBuildPhase section */
-
 /* Begin PBXSourcesBuildPhase section */
 		713F76A21929F4A7006A7305 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
@@ -2368,12 +2299,11 @@
 		};
 		713F76D91929F4A7006A7305 /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				DEVELOPMENT_TEAM = HXWLAA5YN5;
+				DEVELOPMENT_TEAM = "";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/GoogleAnalytics/FirebaseAnalytics/Frameworks",
@@ -2412,12 +2342,11 @@
 		};
 		713F76DA1929F4A7006A7305 /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				DEVELOPMENT_TEAM = HXWLAA5YN5;
+				DEVELOPMENT_TEAM = "";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/GoogleAnalytics/FirebaseAnalytics/Frameworks",

+ 179 - 114
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -13,7 +13,7 @@
 #import "ZipArchive.h"
 #import "DefaultAppearance.h"
 #import "OLDataProvider.h"
-#import "AFHTTPSessionManager.h"
+//#import "AFHTTPSessionManager.h"
 #import "SelectUploadOrderViewController.h"
 #import "iSalesDB.h"
 #import "iSalesNetwork.h"
@@ -1219,10 +1219,6 @@ void UncaughtExceptionHandler(NSException *exception) {
         
         [ERPUtils googleAnalyticsSendRequestString:nil WithScreen:ScreenCodeOfflineSync Action:nil Extra:nil];
         
-        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
-        
-        serializer.timeoutInterval=300;
-        
         NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
         
         if(appDelegate.user!=nil)
@@ -1232,7 +1228,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         if(appDelegate.password!=nil)
             [params setValue:appDelegate.password forKey:@"password"];
         
-
+        
 #if TARGET_IPHONE_SIMULATOR//模拟器
         [params setValue:@"simulator_uuid" forKey:@"idfv"];
 #elif TARGET_OS_IPHONE//真机
@@ -1240,127 +1236,196 @@ void UncaughtExceptionHandler(NSException *exception) {
         NSUUID* uuid =dev.identifierForVendor;
         [params setValue:uuid.UUIDString forKey:@"idfv"];
 #endif
-        
-        
-        
-        
-        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_OFFLINE parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
-            [formData appendPartWithFileData:data name:@"upfile" fileName:[upfile lastPathComponent] mimeType:@"application/zip"];
-        } error:nil];
-        
-        
-        
-        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
-        
-        NSProgress *progress = nil;
-        
-        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+        __weak typeof(self) weakSelf = self;
+        [NetworkUtils upload:data FileName:[upfile lastPathComponent] Params:params ToHost:URL_UPLOAD_OFFLINE Result:^(NSMutableDictionary *json) {
             
-            
-            
-            if (error) {
-                
-                NSString* err_msg = [error localizedDescription];
-                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
-                
-                
-                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",str);
-                [self add_downloadlog:err_msg];
-                [self add_downloadlog:@"Can not connect to server please try again."];
-                [self.settingUI onSyncFinish];
-                
-            } else {
-                DebugLog(@"response ");
-                
-                
-                
-                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
-                
-                // 再将NSData转为字符串
-                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-                
-                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
-                
-                DebugLog(@"data string: %@",jsonStr);
+            if([[json valueForKey:@"result"] intValue]==2)
+            {
+                NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
+                if (out_of_stock_ids) {
+                    [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
+                }
                 
-                NSDictionary* json = responseObject;
+                [weakSelf add_downloadlog:@"Upload successful."];
+                appDelegate.disable_trigger=true;
+                NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
                 
+                [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
+                [iSalesDB execSql:@"delete from wishlist"];
+                [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
+                [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
+                [iSalesDB execSql:@"delete from offline_portfolio"];
+                [iSalesDB execSql:@"delete from offline_pdf"];
+                [OLDataProvider offline_clear_PDFCache];
                 
-                if([[json valueForKey:@"result"] intValue]==2)
+                NSString* contactMap = json[@"contactMap"];
+                if(contactMap.length>0)
                 {
-                    NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
-                    if (out_of_stock_ids) {
-                        [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
-                    }
-                    
-                    [self add_downloadlog:@"Upload successful."];
-                    appDelegate.disable_trigger=true;
-                    NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
-                    
-                    [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
-                    [iSalesDB execSql:@"delete from wishlist"];
-                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
-                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
-                    [iSalesDB execSql:@"delete from offline_portfolio"];
-                    [iSalesDB execSql:@"delete from offline_pdf"];
-                    [OLDataProvider offline_clear_PDFCache];
-                    
-                    NSString* contactMap = json[@"contactMap"];
-                    if(contactMap.length>0)
+                    NSDictionary* contactjson = [RAUtils string2dict:contactMap];
+                    NSArray *keys= [contactjson allKeys];
+                    //遍历keys
+                    for(int i=0;i<[keys count];i++)
                     {
-                        NSDictionary* contactjson = [RAUtils string2dict:contactMap];
-                        NSArray *keys= [contactjson allKeys];
-                        //遍历keys
-                        for(int i=0;i<[keys count];i++)
-                        {
-                            //得到当前key
-                            NSString *key=[keys objectAtIndex:i];
-                            //如果key不是pic,说明value是字符类型,比如name:Boris
-                            NSString* value = [contactjson valueForKey:key];
-                            
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
-                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
-
-                        }
+                        //得到当前key
+                        NSString *key=[keys objectAtIndex:i];
+                        //如果key不是pic,说明value是字符类型,比如name:Boris
+                        NSString* value = [contactjson valueForKey:key];
+                        
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
+                        [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
+                        
                     }
-                    //                    NSDictionary* contactjson= upjson[@"contact"];
-                    //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
-                    //                    NSDictionary* orderjson= upjson[@"order"];
-                    
-                    appDelegate.disable_trigger=false;
-                    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-                    [defaults removeObjectForKey:@"Forcedownload"];
-                    [defaults setBool:true forKey:@"Forcedownload"];
-                    [defaults synchronize];
-                    
-                    [self download_offline:ver useInternalAddress:buseinternaladdress];
-                    
-                }
-                else
-                {
-                    [self add_downloadlog:[json valueForKey:@"msg"]];
-                    [self add_downloadlog:@"Sync canceled."];
-                    [self.settingUI onSyncFinish];
                 }
+                //                    NSDictionary* contactjson= upjson[@"contact"];
+                //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
+                //                    NSDictionary* orderjson= upjson[@"order"];
+                
+                appDelegate.disable_trigger=false;
+                NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+                [defaults removeObjectForKey:@"Forcedownload"];
+                [defaults setBool:true forKey:@"Forcedownload"];
+                [defaults synchronize];
                 
+                [weakSelf download_offline:ver useInternalAddress:buseinternaladdress];
                 
             }
-            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-        }];
-        
-        
-        
-        
-        
+            else
+            {
+                [weakSelf add_downloadlog:[json valueForKey:@"msg"]];
+                [weakSelf add_downloadlog:@"Sync canceled."];
+                [weakSelf.settingUI onSyncFinish];
+            }
+            
+        } Progress:^(NSURLSessionTask *task, double progress) {
+            
+        } DecryptHandler:nil];
         
         
-        [uploadTask resume];
+//        AFHTTPRequestSerializer* serializer=[AFHTTPRequestSerializer serializer] ;
+//
+//        serializer.timeoutInterval=300;
+//
+//        NSMutableURLRequest *request = [serializer multipartFormRequestWithMethod:@"POST" URLString:URL_UPLOAD_OFFLINE parameters:params constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
+//            [formData appendPartWithFileData:data name:@"upfile" fileName:[upfile lastPathComponent] mimeType:@"application/zip"];
+//        } error:nil];
+//
+//
+//
+//        AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+//
+//        NSProgress *progress = nil;
+//
+//        NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
+//
+//
+//
+//            if (error) {
+//
+//                NSString* err_msg = [error localizedDescription];
+//                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+//
+//
+//                NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",str);
+//                [self add_downloadlog:err_msg];
+//                [self add_downloadlog:@"Can not connect to server please try again."];
+//                [self.settingUI onSyncFinish];
+//
+//            } else {
+//                DebugLog(@"response ");
+//
+//
+//
+//                NSData *data = [NSJSONSerialization dataWithJSONObject:(NSDictionary*)responseObject options:kNilOptions error:nil];
+//
+//                // 再将NSData转为字符串
+//                NSString *jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+//
+//                //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+//
+//                DebugLog(@"data string: %@",jsonStr);
+//
+//                NSDictionary* json = responseObject;
+//
+//
+//                if([[json valueForKey:@"result"] intValue]==2)
+//                {
+//                    NSString *out_of_stock_ids = [json valueForKey:@"stock_out_so_id"];
+//                    if (out_of_stock_ids) {
+//                        [RAUtils message_alert:[NSString stringWithFormat:@"Below orders were not submitted because some models were out of stock. You can check from order history under online mode.\n %@",out_of_stock_ids] title:@"Warning" controller:self.main_vc];
+//                    }
+//
+//                    [self add_downloadlog:@"Upload successful."];
+//                    appDelegate.disable_trigger=true;
+//                    NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
+//
+//                    [iSalesDB execSql:@"delete from offline_contact where not sync_data is null"];
+//                    [iSalesDB execSql:@"delete from wishlist"];
+//                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_order where so_id in(%@)",so_id]];
+//                    [iSalesDB execSql:[NSString stringWithFormat:@"delete from offline_cart where so_no in(%@)",so_id]];
+//                    [iSalesDB execSql:@"delete from offline_portfolio"];
+//                    [iSalesDB execSql:@"delete from offline_pdf"];
+//                    [OLDataProvider offline_clear_PDFCache];
+//
+//                    NSString* contactMap = json[@"contactMap"];
+//                    if(contactMap.length>0)
+//                    {
+//                        NSDictionary* contactjson = [RAUtils string2dict:contactMap];
+//                        NSArray *keys= [contactjson allKeys];
+//                        //遍历keys
+//                        for(int i=0;i<[keys count];i++)
+//                        {
+//                            //得到当前key
+//                            NSString *key=[keys objectAtIndex:i];
+//                            //如果key不是pic,说明value是字符类型,比如name:Boris
+//                            NSString* value = [contactjson valueForKey:key];
+//
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where customer_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where receive_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where sender_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where shipping_billto_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where billing_cid='%@' and order_id is null",value,key]];
+//                            [iSalesDB execSql:[NSString stringWithFormat:@"update offline_order set customer_cid='%@' where returnto_cid='%@' and order_id is null",value,key]];
+//
+//                        }
+//                    }
+//                    //                    NSDictionary* contactjson= upjson[@"contact"];
+//                    //                    NSDictionary* wishlistjson= upjson[@"wishlist"];
+//                    //                    NSDictionary* orderjson= upjson[@"order"];
+//
+//                    appDelegate.disable_trigger=false;
+//                    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+//                    [defaults removeObjectForKey:@"Forcedownload"];
+//                    [defaults setBool:true forKey:@"Forcedownload"];
+//                    [defaults synchronize];
+//
+//                    [self download_offline:ver useInternalAddress:buseinternaladdress];
+//
+//                }
+//                else
+//                {
+//                    [self add_downloadlog:[json valueForKey:@"msg"]];
+//                    [self add_downloadlog:@"Sync canceled."];
+//                    [self.settingUI onSyncFinish];
+//                }
+//
+//
+//            }
+//            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//        }];
+//
+//
+//
+//
+//
+//
+//
+//        [uploadTask resume];
         
     }
     

+ 91 - 90
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -796,7 +796,7 @@
             <objects>
                 <navigationController storyboardIdentifier="iSalesNavigationController" definesPresentationContext="YES" useStoryboardIdentifierAsRestorationIdentifier="YES" id="jsC-F8-zYF" customClass="iSalesNavigationController" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="gCJ-vt-f01">
-                        <rect key="frame" x="0.0" y="20" width="768" height="44"/>
+                        <rect key="frame" x="0.0" y="20" width="768" height="48"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <connections>
@@ -2153,7 +2153,7 @@
                                         <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QWz-EJ-Yzy" id="E1L-su-dvV">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="PJV-YE-GvQ">
@@ -2177,7 +2177,7 @@
                                         <rect key="frame" x="0.0" y="44" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TID-OY-afi" id="yuC-0D-Ebs">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Diskspace" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pVO-Tx-wMs">
@@ -2205,7 +2205,7 @@
                                         <rect key="frame" x="0.0" y="88" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Pol-lE-P45" id="FAm-1c-nX0">
-                                            <rect key="frame" x="0.0" y="0.0" width="735" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="735" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Clean Cache" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AHm-p1-51h">
@@ -2253,7 +2253,7 @@
                                         <rect key="frame" x="0.0" y="22" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KaA-n8-IuZ" id="C6b-m1-PvY">
-                                            <rect key="frame" x="0.0" y="0.0" width="735" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="735" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                         </tableViewCellContentView>
                                     </tableViewCell>
@@ -2404,7 +2404,7 @@
             <objects>
                 <navigationController storyboardIdentifier="PopupNavi" definesPresentationContext="YES" useStoryboardIdentifierAsRestorationIdentifier="YES" id="O4f-Xf-sca" customClass="PopupNavigationController" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="jDv-A4-an8">
-                        <rect key="frame" x="0.0" y="20" width="768" height="44"/>
+                        <rect key="frame" x="0.0" y="20" width="768" height="48"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                 </navigationController>
@@ -2929,7 +2929,7 @@
                                     <navigationItem title="View Portfolios" id="SSH-WU-EMm">
                                         <barButtonItem key="rightBarButtonItem" style="plain" id="cOa-Md-aHw">
                                             <searchBar key="customView" contentMode="redraw" searchBarStyle="minimal" placeholder="Name" id="hIq-6S-g7M">
-                                                <rect key="frame" x="468" y="0.0" width="280" height="44"/>
+                                                <rect key="frame" x="468" y="0.0" width="280" height="48"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                                 <textInputTraits key="textInputTraits"/>
                                                 <connections>
@@ -2963,7 +2963,7 @@
                                         <rect key="frame" x="0.0" y="28" width="768" height="66"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wnt-DO-dKG" id="BF2-Qh-ul9">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="65.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="66"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="XKD-dm-WDq" userLabel="name">
@@ -3375,7 +3375,7 @@
                                         <rect key="frame" x="0.0" y="55.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="w28-aV-219" id="yuU-dg-V0S">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="3W6-p2-bhw">
@@ -3460,7 +3460,7 @@
                                         <rect key="frame" x="0.0" y="195.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QPf-Af-7Me" id="irR-6K-df5">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cMV-Rq-Eof">
@@ -3485,7 +3485,7 @@
                                         <rect key="frame" x="0.0" y="239.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Vs9-Qf-vxV" id="3Do-0O-Onj">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uie-Rn-kQk">
@@ -3510,7 +3510,7 @@
                                         <rect key="frame" x="0.0" y="379.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="C8t-En-sTC" id="6ch-Nb-zL4">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c7w-sm-ls3">
@@ -3530,7 +3530,7 @@
                                         <rect key="frame" x="0.0" y="423.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="CVv-i3-6xU" id="5TH-wP-I5s">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="blU-UR-6vw" userLabel="action0">
@@ -3578,7 +3578,7 @@
                                         <rect key="frame" x="0.0" y="467.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uSh-rW-JhP" id="aTm-1j-ybX">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="GYa-6P-Tzy">
@@ -3608,7 +3608,7 @@
                                         <rect key="frame" x="0.0" y="607.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="do6-if-39e" id="RAk-Jz-OB9">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rsb-rv-y43">
@@ -3633,10 +3633,10 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CommonEditorCellEdit" rowHeight="44" id="oRF-Qa-Oo5" customClass="CommonEditorCellEdit">
-                                        <rect key="frame" x="0.0" y="651.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="652" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oRF-Qa-Oo5" id="SDT-4O-3Fg">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="I8B-AK-Xhr">
@@ -3663,7 +3663,7 @@
                                         <rect key="frame" x="0.0" y="695.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="UZ5-RY-yCg" id="3xt-ff-xmR">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v3W-a9-ogk">
@@ -3689,7 +3689,7 @@
                                         <rect key="frame" x="0.0" y="739.5" width="768" height="120"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hgq-kD-iRf" id="9g7-Vy-Z4W">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="20K-3B-t9q">
@@ -3765,7 +3765,7 @@
                                         <rect key="frame" x="0.0" y="55.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="w7f-2o-3My" id="dR2-6K-auD">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="6Gp-fr-acX">
@@ -3850,7 +3850,7 @@
                                         <rect key="frame" x="0.0" y="195.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="s03-lY-Sk5" id="H9Q-Lh-0RC">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5DX-ed-WCB">
@@ -3875,7 +3875,7 @@
                                         <rect key="frame" x="0.0" y="239.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tBL-9H-IHt" id="FMA-VD-5lg">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lxY-Fv-JgT">
@@ -3900,7 +3900,7 @@
                                         <rect key="frame" x="0.0" y="379.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="DjB-vz-gce" id="N8R-s2-YlG">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Dum-yy-vcH">
@@ -3920,7 +3920,7 @@
                                         <rect key="frame" x="0.0" y="423.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Dxk-mD-7s3" id="rYx-1g-cpi">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="C5R-3e-GxE" userLabel="action3">
@@ -3968,7 +3968,7 @@
                                         <rect key="frame" x="0.0" y="467.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8je-xy-cas" id="0Vc-DF-vVj">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xmi-gQ-wHG">
@@ -3998,7 +3998,7 @@
                                         <rect key="frame" x="0.0" y="607.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mOe-CU-sxV" id="Gk5-VC-pbV">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="EEW-ZG-qr9">
@@ -4023,10 +4023,10 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CommonEditorCellEdit" rowHeight="44" id="FQb-Bh-rLr" customClass="CommonEditorCellEdit">
-                                        <rect key="frame" x="0.0" y="651.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="652" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="FQb-Bh-rLr" id="9AV-cF-iRA">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8nO-WG-1Bs">
@@ -4053,7 +4053,7 @@
                                         <rect key="frame" x="0.0" y="695.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wHj-1P-1PF" id="MBN-Df-2u3">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fog-vf-Xdy">
@@ -4079,7 +4079,7 @@
                                         <rect key="frame" x="0.0" y="739.5" width="768" height="120"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cy9-9y-7dy" id="eie-Ln-elB">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7Pi-9c-ezu">
@@ -4586,7 +4586,7 @@
                                         <rect key="frame" x="0.0" y="55.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VsS-mx-QUE" id="swD-Ty-dh5">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="YuT-mx-pzq">
@@ -4647,7 +4647,7 @@
                                         <rect key="frame" x="0.0" y="195.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jMZ-h9-v7w" id="h5V-78-c7u">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="XmU-p0-He0">
@@ -4677,7 +4677,7 @@
                                         <rect key="frame" x="0.0" y="239.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3LN-pk-gwJ" id="m3o-A5-n3D">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2fm-Jo-U0U">
@@ -4697,7 +4697,7 @@
                                         <rect key="frame" x="0.0" y="283.5" width="768" height="120"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ILu-EU-lsU" id="e2Y-b9-F17">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Trd-8e-3Q4">
@@ -4737,10 +4737,10 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CommonEditorCellEdit" rowHeight="44" id="lmh-M6-U15" customClass="CommonEditorCellEdit">
-                                        <rect key="frame" x="0.0" y="403.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="404" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lmh-M6-U15" id="Gr1-AU-eBx">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Q0e-Ec-wPn">
@@ -4775,7 +4775,7 @@
                                         <rect key="frame" x="0.0" y="447.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jKe-Oa-th9" id="md5-yk-kcj">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="3IL-6c-ahc">
@@ -4809,7 +4809,7 @@
                                         <rect key="frame" x="0.0" y="491.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="r9X-D7-CbM" id="NkN-ek-2mk">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tid-qr-O0c">
@@ -4847,7 +4847,7 @@
                                         <rect key="frame" x="0.0" y="631.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ExY-o6-9O4" id="CH0-fk-1Xj">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="w08-lc-sTi">
@@ -4880,7 +4880,7 @@
                                         <rect key="frame" x="0.0" y="771.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZHP-xj-rXt" id="LdD-kY-z21">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ldW-P8-Y2e">
@@ -4960,7 +4960,7 @@
                                         <rect key="frame" x="0.0" y="55.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="n4c-77-hLv" id="DvL-17-pkX">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="NKX-ck-Bay">
@@ -5020,7 +5020,7 @@
                                         <rect key="frame" x="0.0" y="195.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Xog-Cl-i5m" id="POr-6Z-bgE">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0dI-Tu-gdc">
@@ -5046,7 +5046,7 @@
                                         <rect key="frame" x="0.0" y="239.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bU5-1H-8Ym" id="ThQ-zS-Kmf">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bFQ-1F-kTA">
@@ -5068,10 +5068,10 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CommonEditorCellEdit" rowHeight="44" id="59Q-8C-fQM" customClass="CommonEditorCellEdit">
-                                        <rect key="frame" x="0.0" y="283.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="284" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="59Q-8C-fQM" id="nqb-0z-RP8">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hWg-2k-qYt">
@@ -5098,7 +5098,7 @@
                                         <rect key="frame" x="0.0" y="327.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1Ld-bY-s0l" id="keH-oZ-gZA">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="U5y-QU-OQP">
@@ -5123,7 +5123,7 @@
                                         <rect key="frame" x="0.0" y="467.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="n0g-se-pw1" id="MTt-Lc-1Mu">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9Xs-tl-56v">
@@ -5151,7 +5151,7 @@
                                         <rect key="frame" x="0.0" y="511.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lUK-Sp-QMR" id="SU0-Og-nm9">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tfe-Hh-t2Z">
@@ -5494,7 +5494,8 @@ Email: redantsupport@united-us.net</string>
                             </button>
                             <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progressViewStyle="bar" id="N7c-8k-EE4">
                                 <rect key="frame" x="84" y="908" width="600" height="3"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                <color key="backgroundColor" red="0.081770886230000006" green="0.40781933069999998" blue="0.094417002809999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </progressView>
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -5551,7 +5552,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="55.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PRa-4x-STz" id="j94-2I-Aua">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="I53-RA-jOA">
@@ -5611,7 +5612,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="195.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mUu-Gu-4WC" id="Eik-OE-OLM">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Yeo-Oz-wbg">
@@ -5639,7 +5640,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="239.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aY6-fA-U1S" id="DID-HS-9ld">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7Uw-2E-MWV">
@@ -5656,10 +5657,10 @@ Email: redantsupport@united-us.net</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CommonEditorCellEdit" rowHeight="44" id="0TR-tE-XEg" customClass="CommonEditorCellEdit">
-                                        <rect key="frame" x="0.0" y="283.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="284" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0TR-tE-XEg" id="knh-vE-uve">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NGO-Sg-CO2">
@@ -5694,7 +5695,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="327.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="w7k-Sm-sh2" id="wUI-h8-GJ0">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fuN-e3-udZ">
@@ -5728,7 +5729,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="371.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3EE-eu-NG5" id="lbr-V3-fxF">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="aIy-jJ-sd4">
@@ -5761,7 +5762,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="511.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gqK-qF-Nl2" id="jMN-a4-IRZ">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="h0D-S7-dao">
@@ -5831,7 +5832,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="22" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6hT-I3-WW3" id="gKI-En-sgV">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <view contentMode="scaleToFill" id="Eyx-Zr-PLO" customClass="RTLabel">
@@ -5849,7 +5850,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="66" width="768" height="190"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lSe-2G-cT7" id="KDS-aU-tYT">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="189.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="190"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345678.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yQq-ma-HdT" userLabel="unit price">
@@ -5982,7 +5983,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="256" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9rG-Hv-ICg" id="e5s-wc-IkL">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$123456789.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fNL-sW-tkk" userLabel="price">
@@ -6010,7 +6011,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="300" width="768" height="186"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9hm-qp-u5H" id="PQ9-FQ-6Si">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="185.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="186"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <webView userInteractionEnabled="NO" contentMode="scaleToFill" allowsInlineMediaPlayback="NO" mediaPlaybackRequiresUserAction="NO" mediaPlaybackAllowsAirPlay="NO" keyboardDisplayRequiresUserAction="NO" id="9m6-iq-KMk">
@@ -6029,7 +6030,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="486" width="768" height="148"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="s5l-6k-iWO" id="8ms-PN-eNw">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="147.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="148"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="wjN-UC-W3J">
@@ -6053,7 +6054,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="634" width="768" height="218"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PTO-3k-BWh" id="51c-J3-9uN">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="217.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="218"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Tracking Number:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cdf-E6-8nk">
@@ -6536,7 +6537,7 @@ Email: redantsupport@united-us.net</string>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="KVd-zF-Tl0"/>
                                     <barButtonItem style="plain" id="joL-Py-zMr">
                                         <searchBar key="customView" contentMode="redraw" searchBarStyle="minimal" placeholder="Name, Address, Phone etc" id="37s-Zo-qJG">
-                                            <rect key="frame" x="305" y="0.0" width="364" height="44"/>
+                                            <rect key="frame" x="297" y="0.0" width="364" height="44"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                             <textInputTraits key="textInputTraits"/>
                                             <connections>
@@ -6636,7 +6637,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="22" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aNn-5E-yfU" id="blR-1z-uB4">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="140"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" id="Joe-9c-mhx">
@@ -6738,7 +6739,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="162" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0El-DP-xYZ" id="WXt-bL-3En">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="e6Y-d9-upz">
@@ -6772,7 +6773,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="206" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="J3d-cG-qdt" id="j4j-Ny-UDJ">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Way-zK-rPT">
@@ -6805,7 +6806,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="250" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xOa-Xr-gTr" id="j8Z-My-v13">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9dp-dT-Iun">
@@ -6840,7 +6841,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="294" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="INw-X5-a6L" id="dMk-dO-jRe">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="140"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ims-8q-OTf">
@@ -6873,7 +6874,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="434" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WbT-Mq-Y44" id="qI1-h7-szu">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="b2f-XC-2x6">
@@ -6901,7 +6902,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="478" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sAj-KH-YeP" id="hWS-Yn-EOD">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1DW-rj-4BZ">
@@ -6921,7 +6922,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="522" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1bG-aS-FTW" id="u8v-qb-zq2">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="kvi-MS-wS3" userLabel="action3">
@@ -6969,7 +6970,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="566" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="LoG-P8-L3l" id="uQB-ra-pgG">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="140"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Ara-TK-zIp">
@@ -7007,7 +7008,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="706" width="768" height="120"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Y94-S0-YG0" id="Cdh-u2-URo">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="120"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="gKp-K8-IGk">
@@ -7083,7 +7084,7 @@ Email: redantsupport@united-us.net</string>
                                 <rect key="frame" x="0.0" y="22" width="768" height="44"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ebw-26-5Ud" id="gop-RV-8fg">
-                                    <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                 </tableViewCellContentView>
                             </tableViewCell>
@@ -7104,7 +7105,7 @@ Email: redantsupport@united-us.net</string>
             <objects>
                 <navigationController id="SBa-YT-Tv1" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="TWw-rv-IC6">
-                        <rect key="frame" x="0.0" y="20" width="768" height="44"/>
+                        <rect key="frame" x="0.0" y="20" width="768" height="48"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <connections>
@@ -7638,7 +7639,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="55.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7KD-Co-OAK" id="FbA-z6-0iG">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="0A5-Ow-U5x">
@@ -7723,7 +7724,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="195.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kUY-2X-OQd" id="FXj-l5-1mU">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2FF-vy-G2L">
@@ -7743,7 +7744,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="239.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="GVD-y8-KLS" id="RmE-tM-RaX">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="A2L-ee-oMB" userLabel="action0">
@@ -7791,7 +7792,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="283.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nn8-y2-LYf" id="GWS-Tc-qsC">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ogZ-Vl-Dwo">
@@ -7819,7 +7820,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="327.5" width="768" height="120"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fqz-qc-NeD" id="GHW-OE-Nwx">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="119"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="moS-FU-m9o">
@@ -7852,10 +7853,10 @@ Email: redantsupport@united-us.net</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CommonEditorCellEdit" rowHeight="44" id="eag-F8-OBx" customClass="CommonEditorCellEdit">
-                                        <rect key="frame" x="0.0" y="447.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="448" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="eag-F8-OBx" id="5Sg-XI-hR7">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Prv-Tm-7n5">
@@ -7890,7 +7891,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="491.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vBb-qx-uNy" id="aif-s6-qis">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="l8t-DW-xvD">
@@ -7924,7 +7925,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="535.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="P2I-qc-Fio" id="yVb-6C-FGP">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uZE-4G-DMg">
@@ -7962,7 +7963,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="675.5" width="768" height="140"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="V2v-qA-8Zy" id="Qvj-UB-24L">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="139"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lef-HK-LxJ">
@@ -7995,7 +7996,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="815.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zGI-xw-2DP" id="Jy6-oM-9pA">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Jts-22-84A">
@@ -8061,7 +8062,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="28" width="728" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nP5-gn-0Jl" id="MCy-CI-ivv">
-                                            <rect key="frame" x="0.0" y="0.0" width="728" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="728" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="HwF-54-hzr">
@@ -8838,7 +8839,7 @@ Email: redantsupport@united-us.net</string>
         <image name="check_0_24" width="24" height="24"/>
         <image name="check_1_24" width="24" height="24"/>
         <image name="checkbox" width="16" height="16"/>
-        <image name="close" width="32" height="32"/>
+        <image name="close" width="40" height="40"/>
         <image name="contact" width="72" height="72"/>
         <image name="continue" width="131" height="30"/>
         <image name="filter" width="32" height="32"/>
@@ -8851,7 +8852,7 @@ Email: redantsupport@united-us.net</string>
         <image name="mark_wish_32" width="32" height="32"/>
         <image name="menu_open" width="36" height="36"/>
         <image name="more_color_larger" width="32" height="32"/>
-        <image name="newcustomer" width="32" height="32"/>
+        <image name="newcustomer" width="40" height="40"/>
         <image name="neworder" width="40" height="40"/>
         <image name="notifyMe" width="123" height="39"/>
         <image name="npd_logo" width="110" height="13"/>

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -11,7 +11,7 @@
 #define BUILD_NPD
 
 # ifdef DEBUG
-//#define test_server
+#define test_server
 # endif
 
 #define exception_switch 1