소스 검색

Input Error ! -> Cannot sign-in,User or password cannot be empty -> Username or Password cannot be blank.
Sign in -> Cannot sign-in,Account already sign in from another device -> You are currently signed in on another device. Please check
Portfolio单选编辑也显示Check Box
离线新建联系人,State is Required
Wish List增加Qty

Pen Li 9 년 전
부모
커밋
71122fd917

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


+ 1 - 0
RedAnt ERP Mobile/common/Functions/cart/ModelItemCell.h

@@ -58,6 +58,7 @@
 @property (strong, nonatomic) IBOutlet UILabel *available_qty_label;
 @property (strong, nonatomic) IBOutlet UILabel *available_qty_value_label;
 
+@property (strong, nonatomic) IBOutlet UILabel *qty_Label; // wish list qty
 
 @property int totalchange;
 

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

@@ -758,7 +758,7 @@
     sqlite3 *db = [iSalesDB get_db];
     
     // order by w.create_time
-    NSString* sqlQuery = [NSString stringWithFormat:@"select w.product_id,m.name||'\n'||m.description,w._id from wishlist as w  left join product as m on w.product_id=m.product_id %@ ;",sort_str];
+    NSString* sqlQuery = [NSString stringWithFormat:@"select w.product_id,m.name||'\n'||m.description,w._id,w.qty from wishlist as w  left join product as m on w.product_id=m.product_id %@ ;",sort_str];
     
 //    NSString* sqlQuery = [NSString stringWithFormat:@"select m.product_id,(m.name||'\n'||m.description) as des,w._id from product as m,wishlist as w where m.product_id = w.product_id %@",sort_str];
     
@@ -805,8 +805,10 @@
             //                url="";
             //            NSString *nsurl = [[NSString alloc]initWithUTF8String:url];
             
+            int qty = sqlite3_column_int(statement, 3);
             
             
+            item[@"cart_count"] = [NSNumber numberWithInt:qty];
             item[@"product_id"]= [NSString stringWithFormat:@"%d",product_id];
             item[@"item_id"]= [NSString stringWithFormat:@"%d",item_id];
             item[@"description"]= nsdescription;

+ 5 - 16
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioEditQTYViewController.m

@@ -42,14 +42,15 @@
     self.editDiscount.text = [NSString stringWithFormat:@"%@", [RAUtils FloatFormat:self.discount] ];
     
     self.labelNewPrice.text = [NSString stringWithFormat:@"%.2f",self.price* (1.0-self.discount/100)];
-    if(self.arr_fashion_ids.count!=1)
-    {
+//    if(self.arr_fashion_ids.count != 1)
+//    {
         self.editQTY.enabled = NO;
         self.editPrice.enabled = NO;
         self.editDiscount.enabled = NO;
         self.tv_linenote.editable = NO;
         
-        self.label_multiItems.text=[NSString stringWithFormat:@"%d items selected",self.ids_count ];
+    self.label_multiItems.text = [NSString stringWithFormat:@"%d items selected",self.ids_count ? self.ids_count :  self.arr_fashion_ids.count];//ids_count多选情况有值,而self.arr_fashion_ids在单选情况才不为空
+
         self.label_multiItems.hidden = false;
         self.editPrice.enabled = false;
         self.editPrice.text = nil;
@@ -58,19 +59,7 @@
         
         self.labelNewPrice.hidden = true;
         self.labelpriceafter.hidden = true;
-    } else {
-        
-        self.qtyCheckButton.selected = YES;
-        self.priceCheckButton.selected = YES;
-        self.discountCheckButton.selected = YES;
-        self.lineNoteCheckButton.selected = YES;
-        
-        self.qtyCheckButton.hidden = YES;
-        self.priceCheckButton.hidden = YES;
-        self.discountCheckButton.hidden = YES;
-        self.lineNoteCheckButton.hidden = YES;
-        self.noticeLabel.hidden = YES;
-    }
+//    }
     
     
     

+ 2 - 2
RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m

@@ -221,7 +221,7 @@
         //        [alert show];
         
         
-        [RAUtils alert_view:@"User or password cannot be empty." title:@"Input Error!"];
+        [RAUtils alert_view:@"Username or Password cannot be blank." title:@"Cannot sign-in"];
         return;
     }
     DebugLog(@"Login...   user= %@ ; password= %@",user,password);
@@ -412,7 +412,7 @@
                         break;
                 }
                 
-                [RAUtils alert_view:msg title:@"Sign in"];
+                [RAUtils alert_view:msg title:@"Cannot sign-in"];
                 
                 
                 

+ 10 - 0
RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m

@@ -701,6 +701,12 @@
     [myView addSubview:titlelabel];
     
     
+    UILabel *qtyLabel = [[UILabel alloc] initWithFrame:CGRectMake(tableView.bounds.size.width - 200, 5.5, 40, 22)];
+    qtyLabel.text = @"QTY";
+    qtyLabel.textAlignment = NSTextAlignmentCenter;
+    qtyLabel.autoresizingMask=UIViewAutoresizingFlexibleWidth;
+    [myView addSubview:qtyLabel];
+    
     return myView;
 }
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
@@ -805,6 +811,10 @@
         
     }
     cell.backgroundColor = [UIColor whiteColor];// [UIColor whiteColor];;
+    
+    int qty = [item_json[@"cart_count"] integerValue];
+    cell.qty_Label.text = [NSString stringWithFormat:@"QTY: %d",qty];
+    
     return cell;
     
 }

+ 1 - 1
RedAnt ERP Mobile/common/const.h

@@ -88,7 +88,7 @@
 #define MSG_VER_LOW @"Current App version is out of date, please update to the latest version."
 #define MSG_ERROR @"Connection failed with Server, please email your IT Admin."//@"Some error occured on server."
 #define MSG_SUCCESS @"Success."
-#define MSG_LOGIN_DEVICE @"Account already sign in from another device."
+#define MSG_LOGIN_DEVICE @"You are currently signed in on another device. Please check"
 #define MSG_TIMEOUT @"Request timeout."
 
 #define MSG_OFFLINE_SUBMIT @"Offline order will be submitted when you login online mode and sync with server."

+ 8 - 0
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -505,6 +505,13 @@
                                                     <rect key="frame" x="731" y="48" width="24" height="24"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                                 </imageView>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="QTY:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lbZ-RY-0aG">
+                                                    <rect key="frame" x="571" y="50" width="160" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
                                             </subviews>
                                         </tableViewCellContentView>
                                         <connections>
@@ -512,6 +519,7 @@
                                             <outlet property="img_checkmark" destination="pUy-h6-w0Y" id="Cgg-LS-Dd1"/>
                                             <outlet property="labelDescription" destination="H2E-H1-CLA" id="3fb-Y0-b1W"/>
                                             <outlet property="labelPrice" destination="MZM-06-tL3" id="rqh-V1-3va"/>
+                                            <outlet property="qty_Label" destination="lbZ-RY-0aG" id="oen-ae-JoO"/>
                                         </connections>
                                     </tableViewCell>
                                 </prototypes>

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

@@ -10,7 +10,7 @@
 #define RedAnt_ERP_Mobile_config_h
 #define BUILD_NPD
 
-//#define test_server
+#define test_server
 
 //#define ENCRYPT_OFF
 

+ 1 - 0
RedAnt ERP Mobile/iSales-NPD/createContact.json

@@ -39,6 +39,7 @@
       "cadedate" : "",
       "control" : "enum",
       "name" : "state",
+      "required" : "true",
       "single_select" : "true"
     },
     "item_12" : {