Ver Fonte

HMLG scan order 1.28
Fix bug

Ray Zhang há 3 anos atrás
pai
commit
99cebb98c2

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

@@ -2519,7 +2519,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 51974;
+				CURRENT_PROJECT_VERSION = 52009;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2536,7 +2536,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.26;
+				MARKETING_VERSION = 1.27;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -2563,7 +2563,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 51974;
+				CURRENT_PROJECT_VERSION = 52009;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2580,7 +2580,7 @@
 					"$(PROJECT_DIR)/ScanApiSDK-10.2.227-2/lib",
 					"$(PROJECT_DIR)/GoogleAnalytics/GoogleAnalytics/Libraries",
 				);
-				MARKETING_VERSION = 1.26;
+				MARKETING_VERSION = 1.27;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

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

@@ -8,9 +8,10 @@
 
 //#import "BasicViewController.h"
 
+#import "ActiveViewController.h"
 static NSString *kScanAddress = @"ScanAddress";
 
-@interface ServerSettingViewController : UIViewController
+@interface ServerSettingViewController : ActiveViewController
 
 //@property (nonatomic,copy) void(^returnValue)(NSString * name, NSString* address);
 @property (nonatomic,weak) UIView *currentFirstResponder;

+ 11 - 1
RedAnt ERP Mobile/HMLG Scan Order/ServerSettingViewController.m

@@ -865,5 +865,15 @@
         }];
         [self presentViewController:alertController animated:true completion:nil];
 }
-
+#pragma mark - RA_NOTIFICAITON
+-(void) refresh_ui
+{
+   
+    [self loadTemplate];
+}
+-(void) reload_data
+{
+   
+    [self refresh_ui];
+}
 @end

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

@@ -17,7 +17,7 @@
 #define RA_NOTIFICATION
 
 # ifdef DEBUG
-//#define test_server
+#define test_server
 # endif
 
 #define exception_switch 1

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

@@ -2915,7 +2915,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 //    int sec =secondsInterval;
     
     
-    bool rtime = [RADataProvider scanRtime:@"2022-07-10"];
+    bool rtime = [RADataProvider scanRtime:@"2022-10-14"];
     NSDictionary *addressDic = [[NSUserDefaults standardUserDefaults] valueForKey:@"ScanAddress"];
     if(rtime && !addressDic)
     {
@@ -2943,6 +2943,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         if (show_name.length) {
             [addressDic setObject:show_name forKey:@"show_name"];
         }
+        addressDic[@"has_erp_site"] = @(true);
         [addressDic setObject:@(price_index) forKey:@"price_index"];
                 [addressDic setObject:@(selectedIndex) forKey:@"selectedIndex"];
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];

+ 16 - 5
RedAnt ERP Mobile/common/data_provider/RADataProvider.m

@@ -143,15 +143,15 @@
 //    2022-07-14。1.17
     //    2022-07-14。1.19
     
-NSDate * ddate =[dateFormatter dateFromString:@"2022-07-27"];
+NSDate * ddate =[dateFormatter dateFromString:@"2022-10-14"];
     
 //    bool review=[cdate earlierDate:ddate];
     NSTimeInterval secondsInterval= [cdate timeIntervalSinceDate:ddate];
     int sec =secondsInterval;
     
-#ifdef DEBUG
-    return false;
-#endif
+//#ifdef DEBUG
+//    return false;
+//#endif
     return sec<0;
 }
 +(void) updateTemplate:(UIViewController*) vc
@@ -236,7 +236,11 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-27"];
                                     
                                     
                                     [RADataProvider load_scan_models];
-                                    [RADataProvider default_price_group];
+                                    
+                                    
+                                    if([self get_price_group:appDelegate.price_group]==nil )
+                                        [RADataProvider default_price_group];
+                                    
         //                            [self loadTemplate];
                                     
                                     
@@ -264,6 +268,8 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-27"];
                         
                         
                         [ActiveViewController Notify:@"ScanSearchViewController" Message:@"Clear"];
+                        [ActiveViewController Notify:@"ServerSettingViewController" Message:RA_NOTIFICATION_REFRESH_UI];
+                        
                         
                     }];
                     
@@ -610,6 +616,11 @@ NSDate * ddate =[dateFormatter dateFromString:@"2022-07-27"];
 }
 +(bool)getSiteHasERP
 {
+    AppDelegate *appDelegate = nil;
+    
+    appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
+   if( [appDelegate.user isEqualToString:@"GUEST"])
+       return false;
     NSDictionary *addressDic = [[NSUserDefaults standardUserDefaults] valueForKey:@"ScanAddress"];;
     if (addressDic) {
         return [addressDic[@"has_erp_site"] boolValue];

+ 20 - 20
RedAnt ERP Mobile/iSales-NPD/Base.lproj/OLM.storyboard

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
     <device id="ipad9_7" orientation="portrait" layout="fullscreen" appearance="light"/>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -283,7 +283,7 @@
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="SelectOrderTableViewCell" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SelectOrderTableViewCell" rowHeight="86" id="XXr-fU-67o" customClass="SelectOrderTableViewCell">
-                                        <rect key="frame" x="0.0" y="44.5" width="768" height="86"/>
+                                        <rect key="frame" x="0.0" y="50" width="768" height="86"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XXr-fU-67o" id="Ohn-hG-mj9">
                                             <rect key="frame" x="0.0" y="0.0" width="768" height="86"/>
@@ -300,7 +300,7 @@
                                                     <rect key="frame" x="10" y="32" width="21" height="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" image="button:hrK-DY-RbO:image"/>
-                                                    <state key="selected" image="260A0786-78BD-4E41-A491-0E35A0615F0D"/>
+                                                    <state key="selected" image="BF2E3A5D-6D1A-445C-A728-2FB46082F510"/>
                                                     <connections>
                                                         <action selector="checkButtonClick:" destination="XXr-fU-67o" eventType="touchUpInside" id="KeU-ld-H4J"/>
                                                     </connections>
@@ -441,7 +441,7 @@
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="LoginListCell" textLabel="hql-hH-AXh" style="IBUITableViewCellStyleDefault" id="0HM-qr-ZyP">
-                                        <rect key="frame" x="0.0" y="44.5" width="360" height="44"/>
+                                        <rect key="frame" x="0.0" y="50" width="360" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0HM-qr-ZyP" id="qg6-aD-3QW">
                                             <rect key="frame" x="0.0" y="0.0" width="360" height="44"/>
@@ -579,7 +579,7 @@
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="LoginListCell" textLabel="cA5-3m-gXL" style="IBUITableViewCellStyleDefault" id="ujk-JC-KZi">
-                                        <rect key="frame" x="0.0" y="44.5" width="360" height="44"/>
+                                        <rect key="frame" x="0.0" y="50" width="360" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ujk-JC-KZi" id="obH-Uq-6vJ">
                                             <rect key="frame" x="0.0" y="0.0" width="360" height="44"/>
@@ -699,7 +699,7 @@
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="URz-TP-ORX">
-                                <rect key="frame" x="654" y="232" width="70" height="31"/>
+                                <rect key="frame" x="646.5" y="230.5" width="77.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="update"/>
                                 <connections>
@@ -707,7 +707,7 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xNv-rw-rP8">
-                                <rect key="frame" x="678" y="343" width="46" height="31"/>
+                                <rect key="frame" x="674.5" y="341.5" width="49.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Set"/>
                                 <connections>
@@ -750,7 +750,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fzf-aI-cFn">
-                                <rect key="frame" x="678" y="39.5" width="46" height="31"/>
+                                <rect key="frame" x="674.5" y="38" width="49.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Set"/>
                                 <connections>
@@ -830,7 +830,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3vw-sE-OsA">
-                                <rect key="frame" x="692" y="51.5" width="46" height="31"/>
+                                <rect key="frame" x="688.5" y="50" width="49.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Set"/>
                                 <connections>
@@ -850,15 +850,15 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TJI-TK-yrX">
-                                <rect key="frame" x="668" y="235" width="70" height="31"/>
+                                <rect key="frame" x="658" y="233.5" width="80" height="34.5"/>
                                 <state key="normal" title="Button"/>
-                                <buttonConfiguration key="configuration" style="plain" title="update"/>
+                                <buttonConfiguration key="configuration" style="plain" title="Update"/>
                                 <connections>
                                     <action selector="onUpdateClick:" destination="4E6-80-nis" eventType="touchUpInside" id="UHo-1S-Tnu"/>
                                 </connections>
                             </button>
                             <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nFJ-HW-wWn">
-                                <rect key="frame" x="692" y="677" width="46" height="31"/>
+                                <rect key="frame" x="688.5" y="675.5" width="49.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Set"/>
                                 <connections>
@@ -931,7 +931,7 @@
                                 </connections>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OM7-ch-z2g">
-                                <rect key="frame" x="624" y="957" width="114" height="31"/>
+                                <rect key="frame" x="608.5" y="953.5" width="129.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Privacy Policy"/>
                                 <connections>
@@ -939,7 +939,7 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BqX-sY-rTI">
-                                <rect key="frame" x="513" y="957" width="63" height="31"/>
+                                <rect key="frame" x="490.5" y="953.5" width="70" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="About"/>
                                 <connections>
@@ -959,7 +959,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hrq-La-ta7">
-                                <rect key="frame" x="314" y="849" width="140" height="31"/>
+                                <rect key="frame" x="303.5" y="838.5" width="161" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Change Password"/>
                                 <connections>
@@ -967,7 +967,7 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SRC-EL-dQp">
-                                <rect key="frame" x="322.5" y="890" width="123" height="31"/>
+                                <rect key="frame" x="313.5" y="883" width="141" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Delete Account"/>
                                 <connections>
@@ -975,7 +975,7 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="veN-AT-j6e">
-                                <rect key="frame" x="692" y="334" width="46" height="31"/>
+                                <rect key="frame" x="688.5" y="332.5" width="49.5" height="34.5"/>
                                 <state key="normal" title="Button"/>
                                 <buttonConfiguration key="configuration" style="plain" title="Set"/>
                                 <connections>
@@ -1077,7 +1077,7 @@
                                 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="If9-Ed-Mke" style="IBUITableViewCellStyleDefault" id="XFZ-pE-gLa">
-                                        <rect key="frame" x="0.0" y="44.5" width="696" height="43.5"/>
+                                        <rect key="frame" x="0.0" y="50" width="696" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="XFZ-pE-gLa" id="bSi-0h-mDn">
                                             <rect key="frame" x="0.0" y="0.0" width="696" height="43.5"/>
@@ -1118,7 +1118,7 @@
         </scene>
     </scenes>
     <resources>
-        <image name="260A0786-78BD-4E41-A491-0E35A0615F0D" width="24" height="24">
+        <image name="BF2E3A5D-6D1A-445C-A728-2FB46082F510" width="24" height="24">
             <mutableData key="keyedArchiveRepresentation">
 YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
 S2V5ZWRBcmNoaXZlctEICVRyb290gAGuCwwZGh8UJCkqMTQ3PUBVJG51bGzWDQ4PEBESExQVFhcYVk5T

+ 3 - 3
common/customUI/CommonEditoriPad/iPadCommonEditorCellModel.xib

@@ -45,7 +45,7 @@
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Masert pack:9999" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DiR-zl-kj1">
-                        <rect key="frame" x="462" y="15" width="140.5" height="21"/>
+                        <rect key="frame" x="461.5" y="15" width="141" height="21"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="21" id="wOR-Sp-CYC"/>
                         </constraints>
@@ -102,8 +102,8 @@
                         <color key="textColor" red="1" green="0.14913141730000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mpack:9999" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ja9-Ui-f2b">
-                        <rect key="frame" x="462" y="106" width="140.5" height="21"/>
+                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mpack:9999" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ja9-Ui-f2b">
+                        <rect key="frame" x="461.5" y="106" width="141" height="21"/>
                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                         <nil key="textColor"/>
                         <nil key="highlightedColor"/>