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

1.修改USAI,清除NPD标记。

Pen Li 8 лет назад
Родитель
Сommit
7a2b6b0b3e

+ 2 - 2
RedAnt ERP Mobile/common/ERPUtils.m

@@ -182,7 +182,7 @@
 //    URL_LOGOUT
 //    URL_LOGOUT
 //    URL_RETRIEVE_PASS // forget password
 //    URL_RETRIEVE_PASS // forget password
 //    URL_REQUEST_LOGIN // request login
 //    URL_REQUEST_LOGIN // request login
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     if ([urlString isEqualToString:URL_REQUEST_LOGIN] || [urlString isEqualToString:URL_RETRIEVE_PASS] || [urlString isEqualToString:URL_UPDATE_AUTH]) {
     if ([urlString isEqualToString:URL_REQUEST_LOGIN] || [urlString isEqualToString:URL_RETRIEVE_PASS] || [urlString isEqualToString:URL_UPDATE_AUTH]) {
         return @"Login View";
         return @"Login View";
     }
     }
@@ -253,7 +253,7 @@
 
 
 + (void)googleAnalyticsSendRequestString:(NSString *)urlString WithScreen:(NSString *)screenName Action:(NSString *)action Extra:(NSDictionary *)extra {
 + (void)googleAnalyticsSendRequestString:(NSString *)urlString WithScreen:(NSString *)screenName Action:(NSString *)action Extra:(NSDictionary *)extra {
 
 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     if (!screenName && !action && !extra) {
     if (!screenName && !action && !extra) {
         return;
         return;
     }
     }

+ 26 - 5
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -467,7 +467,7 @@
 //#ifdef BUILD_HMLG
 //#ifdef BUILD_HMLG
 //    NSString* versionNum = [NSString stringWithFormat:@"HMLG %@ Build %@",version,build];
 //    NSString* versionNum = [NSString stringWithFormat:@"HMLG %@ Build %@",version,build];
 //#endif
 //#endif
-//#ifdef BUILD_NPD
+//#if defined(BUILD_NPD) || defined(BUILD_USAI)
 //    NSString* versionNum = [NSString stringWithFormat:@"npd %@ Build %@",version,build];
 //    NSString* versionNum = [NSString stringWithFormat:@"npd %@ Build %@",version,build];
 //#endif
 //#endif
 //#ifdef BUILD_HOMER
 //#ifdef BUILD_HOMER
@@ -1718,7 +1718,7 @@
     //    [map setValue:@"rect_search_history" forKey:@"img"];
     //    [map setValue:@"rect_search_history" forKey:@"img"];
     //    [self.sideMenuItems addObject:map.copy];
     //    [self.sideMenuItems addObject:map.copy];
     //
     //
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [map setValue:@"Scanner Setting" forKey:@"title"];
     [map setValue:@"Scanner Setting" forKey:@"title"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
     [self.sideMenuItems addObject:map.copy];
@@ -1806,11 +1806,11 @@
     [map setValue:@"rect_change_password" forKey:@"img"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
     [self.sideMenuItems addObject:map.copy];
     
     
-    [map setValue:@"NPD Website" forKey:@"title"];
+    [map setValue:[NSString stringWithFormat:@"%@ Website",COMPANY_SHORT_NAME] forKey:@"title"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
     [self.sideMenuItems addObject:map.copy];
     
     
-    [map setValue:@"NPD Policy" forKey:@"title"];
+    [map setValue:[NSString stringWithFormat:@"%@ Policy",COMPANY_SHORT_NAME] forKey:@"title"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
     [self.sideMenuItems addObject:map.copy];
     
     
@@ -1828,7 +1828,7 @@
     [map setValue:@"rect_change_password" forKey:@"img"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
     [self.sideMenuItems addObject:map.copy];
     
     
-    [map setValue:@"Policy" forKey:@"title"];
+    [map setValue:@"USAI Policy" forKey:@"title"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
     [self.sideMenuItems addObject:map.copy];
     
     
@@ -2178,9 +2178,13 @@
         
         
 #ifdef BUILD_NPD
 #ifdef BUILD_NPD
         NSString* title = @"NPD BLOG";
         NSString* title = @"NPD BLOG";
+#endif
         
         
+#ifdef BUILD_USAI
+        NSString* title = @"USAI BLOG";
 #endif
 #endif
         
         
+        title = [NSString stringWithFormat:@"%@ BLOG",COMPANY_SHORT_NAME];
         
         
         WebViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
         WebViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
         ViewController.url = url;
         ViewController.url = url;
@@ -2310,6 +2314,23 @@
         
         
         
         
         
         
+        [self.navigationController pushViewController:ViewController animated:YES];
+        
+    }
+    else if([title isEqualToString:@"USAI Policy"])
+    {
+        
+        NSString* url = URL_NPD_POLICY;
+        
+        
+        NSString* title = @"USAI Policy";
+        
+        WebViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
+        ViewController.url = url;
+        ViewController.title = title;
+        
+        
+        
         [self.navigationController pushViewController:ViewController animated:YES];
         [self.navigationController pushViewController:ViewController animated:YES];
         
         
     }
     }

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

@@ -2621,7 +2621,7 @@
         NSMutableArray* arr=[@[] mutableCopy];
         NSMutableArray* arr=[@[] mutableCopy];
 
 
         BOOL condition = outOfStock;
         BOOL condition = outOfStock;
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
 #ifdef OFFLINE_MODE
 #ifdef OFFLINE_MODE
         condition = !appDelegate.offline_mode && outOfStock;
         condition = !appDelegate.offline_mode && outOfStock;
 #endif
 #endif

+ 1 - 1
RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.m

@@ -614,7 +614,7 @@
 - (void)treeView:(RATreeView *)treeView didSelectRowForItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo
 - (void)treeView:(RATreeView *)treeView didSelectRowForItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo
 {
 {
     
     
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     NSDictionary *data = item;
     NSDictionary *data = item;
     int count = [[data valueForKey:@"count"] intValue];
     int count = [[data valueForKey:@"count"] intValue];
     if(count==0)
     if(count==0)

+ 1 - 1
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m

@@ -232,7 +232,7 @@
     
     
     filterVC.OkClick =^(NSString *ids,NSString* modelname,NSString* modeldescrip,NSString* available,NSString* QTY,NSString* alert,NSString* price,NSString* bestseller)
     filterVC.OkClick =^(NSString *ids,NSString* modelname,NSString* modeldescrip,NSString* available,NSString* QTY,NSString* alert,NSString* price,NSString* bestseller)
     {
     {
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
         NSArray *idArr = [ids componentsSeparatedByString:@","];
         NSArray *idArr = [ids componentsSeparatedByString:@","];
         if (idArr.count == 1) {
         if (idArr.count == 1) {
             self.categoryString = [@"Category" stringByAppendingString:[self categoryString:ids node:menu level:0]];
             self.categoryString = [@"Category" stringByAppendingString:[self categoryString:ids node:menu level:0]];

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

@@ -569,7 +569,7 @@
         
         
         NSString *msg = nil;
         NSString *msg = nil;
         BOOL continueAdd = YES;
         BOOL continueAdd = YES;
-// #ifdef BUILD_NPD
+// #if defined(BUILD_NPD) || defined(BUILD_USAI)
         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
             
             
@@ -1556,7 +1556,7 @@
 /**检查是否缺货*/
 /**检查是否缺货*/
 - (void)checkAvailability:(int)availability buyQTY:(int)buyQty cartQTY:(int)cartQty { // availability不可以通过textField.text取得
 - (void)checkAvailability:(int)availability buyQTY:(int)buyQty cartQTY:(int)cartQty { // availability不可以通过textField.text取得
     
     
-//#ifdef BUILD_NPD
+//#if defined(BUILD_NPD) || defined(BUILD_USAI)
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     if (!appDelegate.bLogin  || buyQty < 1) {
     if (!appDelegate.bLogin  || buyQty < 1) {
         return;
         return;

+ 1 - 1
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -1104,7 +1104,7 @@ self.isrefreshing=false;
 #endif
 #endif
         } else {
         } else {
             
             
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
             NSString *qtyStr = [section_json valueForKey:@"Availability"];
             NSString *qtyStr = [section_json valueForKey:@"Availability"];
             
             
             __weak typeof(self) weakself = self;
             __weak typeof(self) weakself = self;

+ 2 - 2
RedAnt ERP Mobile/common/Functions/modelDetail/HomerModelDetailHeaderCell.m

@@ -406,7 +406,7 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
         
         
         NSString *msg = nil;
         NSString *msg = nil;
         BOOL continueAdd = YES;
         BOOL continueAdd = YES;
-        // #ifdef BUILD_NPD
+        // #if defined(BUILD_NPD) || defined(BUILD_USAI)
         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
             
             
@@ -1228,7 +1228,7 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
 /**检查是否缺货*/
 /**检查是否缺货*/
 - (void)checkAvailability:(int)availability buyQTY:(int)buyQty cartQTY:(int)cartQty { // availability不可以通过textField.text取得
 - (void)checkAvailability:(int)availability buyQTY:(int)buyQty cartQTY:(int)cartQty { // availability不可以通过textField.text取得
     
     
-    //#ifdef BUILD_NPD
+    //#if defined(BUILD_NPD) || defined(BUILD_USAI)
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     if (!appDelegate.bLogin  || buyQty < 1) {
     if (!appDelegate.bLogin  || buyQty < 1) {
         return;
         return;

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

@@ -4198,7 +4198,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                 }
                 }
                 
                 
             }
             }
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
             cuft=ucbf*count;
             cuft=ucbf*count;
             weight= uweight*count;
             weight= uweight*count;
 #endif
 #endif

+ 1 - 1
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -296,7 +296,7 @@
     
     
     UIImage *submit_img = [[UIImage imageNamed:@"commit"] imageWithRenderingMode:UIImageRenderingModeAutomatic];
     UIImage *submit_img = [[UIImage imageNamed:@"commit"] imageWithRenderingMode:UIImageRenderingModeAutomatic];
     
     
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     submit_img = [[UIImage imageNamed:@"submit_red"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
     submit_img = [[UIImage imageNamed:@"submit_red"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
 #endif
 #endif
     
     

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

@@ -185,7 +185,7 @@
     
     
 //    self.btnSign.tintColor = UIColorFromRGB(0x996633);
 //    self.btnSign.tintColor = UIColorFromRGB(0x996633);
     
     
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     self.btnCopy =[[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"order_copy"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
     self.btnCopy =[[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"order_copy"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
                                                    style:UIBarButtonItemStylePlain
                                                    style:UIBarButtonItemStylePlain
                                                   target:self
                                                   target:self
@@ -401,8 +401,8 @@
     ViewController.mail_to = send_to;
     ViewController.mail_to = send_to;
     NSString* subject = nil;
     NSString* subject = nil;
     
     
-#ifdef BUILD_NPD
-    subject=[NSString stringWithFormat:@"%@ -- SO# %@ from NEW PACIFIC DIRECT,INC.",company,so];
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
+    subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,so,COMPANY_NAME];
     
     
     if (appDelegate.user_type == USER_ROLE_CUSTOMER&&self.is_shoporder) {
     if (appDelegate.user_type == USER_ROLE_CUSTOMER&&self.is_shoporder) {
         NSString *companyName = [appDelegate.customerInfo objectForKey:@"customer_name"];
         NSString *companyName = [appDelegate.customerInfo objectForKey:@"customer_name"];
@@ -687,7 +687,7 @@
                             //                                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
                             //                                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
                             //                                if(self.selectOrder)
                             //                                if(self.selectOrder)
                             //                                    self.selectOrder(self.content_data);
                             //                                    self.selectOrder(self.content_data);
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
                             int count = [[self.content_data objectForKey:@"count"] intValue];
                             int count = [[self.content_data objectForKey:@"count"] intValue];
                             for (int i = 0; i < count; i++) {
                             for (int i = 0; i < count; i++) {
                                 NSString *key = [NSString stringWithFormat:@"section_%d",i];
                                 NSString *key = [NSString stringWithFormat:@"section_%d",i];
@@ -775,7 +775,7 @@
                             if([[order_json valueForKey:@"result"] intValue]==2)
                             if([[order_json valueForKey:@"result"] intValue]==2)
                             {
                             {
                                 
                                 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
                                 int count = [[weakSelf.content_data objectForKey:@"count"] intValue];
                                 int count = [[weakSelf.content_data objectForKey:@"count"] intValue];
                                 for (int i = 0; i < count; i++) {
                                 for (int i = 0; i < count; i++) {
                                     NSString *key = [NSString stringWithFormat:@"section_%d",i];
                                     NSString *key = [NSString stringWithFormat:@"section_%d",i];
@@ -921,7 +921,7 @@
 //                                //                                if(self.selectOrder)
 //                                //                                if(self.selectOrder)
 //                                //                                    self.selectOrder(self.content_data);
 //                                //                                    self.selectOrder(self.content_data);
 //
 //
-//#ifdef BUILD_NPD
+//#if defined(BUILD_NPD) || defined(BUILD_USAI)
 //                                int count = [[self.content_data objectForKey:@"count"] intValue];
 //                                int count = [[self.content_data objectForKey:@"count"] intValue];
 //                                for (int i = 0; i < count; i++) {
 //                                for (int i = 0; i < count; i++) {
 //                                    NSString *key = [NSString stringWithFormat:@"section_%d",i];
 //                                    NSString *key = [NSString stringWithFormat:@"section_%d",i];
@@ -1349,7 +1349,7 @@
     //        return 150;
     //        return 150;
     
     
  
  
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     NSDictionary *section_item = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",indexPath.section]];
     NSDictionary *section_item = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",indexPath.section]];
     NSDictionary *data = [section_item objectForKey:@"data"];
     NSDictionary *data = [section_item objectForKey:@"data"];
     NSString *type = [section_item objectForKey:@"type"];
     NSString *type = [section_item objectForKey:@"type"];
@@ -1554,7 +1554,7 @@
     
     
     NSString*labeltitle = nil;
     NSString*labeltitle = nil;
     
     
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     NSDictionary *section_item = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",section]];
     NSDictionary *section_item = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",section]];
     NSString *title = [section_item objectForKey:@"title"];
     NSString *title = [section_item objectForKey:@"title"];
     labeltitle = title;
     labeltitle = title;
@@ -1734,7 +1734,7 @@
      self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
      self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
      
      
      */
      */
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     NSUInteger section = sender.tag;
     NSUInteger section = sender.tag;
     NSMutableDictionary *section_item = [[self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",section]] mutableCopy];
     NSMutableDictionary *section_item = [[self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",section]] mutableCopy];
     NSString *title = [section_item objectForKey:@"title"];
     NSString *title = [section_item objectForKey:@"title"];
@@ -1843,13 +1843,13 @@
     
     
     if(self.content_data==nil)
     if(self.content_data==nil)
         return 0;
         return 0;
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     return [[self.content_data objectForKey:@"count"] integerValue];
     return [[self.content_data objectForKey:@"count"] integerValue];
 #endif
 #endif
     
     
-#ifdef BUILD_USAI
-    return [[self.content_data objectForKey:@"count"] integerValue];
-#endif
+//#ifdef BUILD_USAI
+//    return [[self.content_data objectForKey:@"count"] integerValue];
+//#endif
     
     
 #if defined(BUILD_HOMER) || defined(BUILD_GATIT)
 #if defined(BUILD_HOMER) || defined(BUILD_GATIT)
     return [[self.content_data objectForKey:@"count"] integerValue];
     return [[self.content_data objectForKey:@"count"] integerValue];
@@ -1865,7 +1865,7 @@
 }
 }
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
 {
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     
     
     NSDictionary *section_item = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",section]];
     NSDictionary *section_item = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",section]];
     NSDictionary *data = [section_item objectForKey:@"data"];
     NSDictionary *data = [section_item objectForKey:@"data"];
@@ -1960,7 +1960,7 @@
         }
         }
     }
     }
     if(section==3) {
     if(section==3) {
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
         return 6;
         return 6;
 #endif
 #endif
         
         
@@ -1985,7 +1985,7 @@
     UIApplication * app = [UIApplication sharedApplication];
     UIApplication * app = [UIApplication sharedApplication];
     AppDelegate *appDelegate = (AppDelegate *)[app delegate];
     AppDelegate *appDelegate = (AppDelegate *)[app delegate];
  
  
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     /**
     /**
      * ver1.90
      * ver1.90
      */
      */
@@ -3167,7 +3167,7 @@
                     cell.priceLabel.text =[self.content_data valueForKey:@"Shipping"];
                     cell.priceLabel.text =[self.content_data valueForKey:@"Shipping"];
                     break;
                     break;
                 case 2: {
                 case 2: {
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
                     cell.chargeLabel.text = @"Liftgate Fee(No loading dock):";
                     cell.chargeLabel.text = @"Liftgate Fee(No loading dock):";
                     cell.priceLabel.text =[self.content_data valueForKey:@"Liftgate Fee(No loading dock)"];
                     cell.priceLabel.text =[self.content_data valueForKey:@"Liftgate Fee(No loading dock)"];
 #endif
 #endif
@@ -3185,7 +3185,7 @@
                 }
                 }
                     break;
                     break;
                 case 3: {
                 case 3: {
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
                     cell.chargeLabel.text = @"Handling Fee:";
                     cell.chargeLabel.text = @"Handling Fee:";
                     cell.priceLabel.text =[self.content_data valueForKey:@"Handling Fee"];
                     cell.priceLabel.text =[self.content_data valueForKey:@"Handling Fee"];
 #endif
 #endif

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/AboutViewController.m

@@ -33,7 +33,7 @@
     NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
     NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
-//#ifdef BUILD_NPD
+//#if defined(BUILD_NPD) || defined(BUILD_USAI)
 //    NSString* versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
 //    NSString* versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
 //#endif
 //#endif
 //
 //

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

@@ -47,7 +47,7 @@
     self.requestLoginBtn.hidden = YES;
     self.requestLoginBtn.hidden = YES;
 #endif
 #endif
     
     
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     self.title=COMPANY_SHORT_NAME;
     self.title=COMPANY_SHORT_NAME;
     self.checkOfflineMode.hidden=false;
     self.checkOfflineMode.hidden=false;
 #endif
 #endif
@@ -517,7 +517,7 @@
 
 
 - (IBAction)requestLoginBtnClicked:(UIButton *)sender {
 - (IBAction)requestLoginBtnClicked:(UIButton *)sender {
 
 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     WebViewController *webVC = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
     WebViewController *webVC = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
     webVC.url = URL_REQUEST_LOGIN;
     webVC.url = URL_REQUEST_LOGIN;
     webVC.title = @"Request Login";
     webVC.title = @"Request Login";

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

@@ -1338,7 +1338,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     ViewController.filename = [NSString stringWithFormat:@"HOMER_Wish_List.pdf"];
     ViewController.filename = [NSString stringWithFormat:@"HOMER_Wish_List.pdf"];
 #endif
 #endif
     
     
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     ViewController.filename = [NSString stringWithFormat:@"NPD_Wish_List.pdf"];
     ViewController.filename = [NSString stringWithFormat:@"NPD_Wish_List.pdf"];
 #endif
 #endif
  */
  */

+ 3 - 3
RedAnt ERP Mobile/common/data_provider/RANetwork.m

@@ -286,7 +286,7 @@ NSString *const ScreenCodeOfflineSync = @"Offline Sync Screen";
         }
         }
         [extra setObject:[params objectForKey:@"user"] forKey:@"user"];
         [extra setObject:[params objectForKey:@"user"] forKey:@"user"];
     }
     }
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
     [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
 #endif
 #endif
     return [self get_json:url parameters:params file:nil];
     return [self get_json:url parameters:params file:nil];
@@ -480,7 +480,7 @@ repeat:
             {
             {
                 [RANetwork err_log:[RAUtils base64en:[RAConvertor dict2string:params]] result:[RAUtils base64en:[RAConvertor dict2string:ret]] module:url code:RESULT_NET_ERROR];
                 [RANetwork err_log:[RAUtils base64en:[RAConvertor dict2string:params]] result:[RAUtils base64en:[RAConvertor dict2string:ret]] module:url code:RESULT_NET_ERROR];
             }
             }
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
             [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
             [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
 #endif
 #endif
             return jsonData;
             return jsonData;
@@ -547,7 +547,7 @@ repeat:
             NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsobj
             NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsobj
                                                                options:0
                                                                options:0
                                                                  error:nil];
                                                                  error:nil];
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
             [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
             [ERPUtils googleAnalyticsSendRequestString:url WithScreen:screenName Action:userAction Extra:extra];
 #endif
 #endif
             return jsonData;
             return jsonData;

+ 7 - 7
RedAnt ERP Mobile/iSales-GATIT/AppDelegate.m

@@ -561,8 +561,8 @@ void UncaughtExceptionHandler(NSException *exception) {
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString *versionNum = @"";
     NSString *versionNum = @"";
-#ifdef BUILD_NPD
-    versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
+    versionNum = [NSString stringWithFormat:@"Version: %@ %@ Build %@",COMPANY_SHORT_NAME,version,build];
 #endif
 #endif
     
     
 #ifdef BUILD_HMLG
 #ifdef BUILD_HMLG
@@ -913,7 +913,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     self.disable_trigger = false;
     self.disable_trigger = false;
     [self initialExceptionHandler];
     [self initialExceptionHandler];
     [self becomeObserver];
     [self becomeObserver];
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [self setUpGoogleAnalytics];
     [self setUpGoogleAnalytics];
 #endif
 #endif
     
     
@@ -1158,7 +1158,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     self.forgroundDate = nil;
     self.forgroundDate = nil;
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
 #endif
 #endif
 }
 }
@@ -3149,9 +3149,9 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
     ViewController.mail_to = arrsend_to;
     ViewController.mail_to = arrsend_to;
 
 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from NEW PACIFIC DIRECT,INC.",company,soid];//[arr_subject componentsJoinedByString:@" : "];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];//[arr_subject componentsJoinedByString:@" : "];
     
     
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
@@ -3159,7 +3159,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
 #else
 #else
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from Homelegance.",company,soid];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];
     
     
 #endif
 #endif
     
     

+ 5 - 5
RedAnt ERP Mobile/iSales-HOMER/AppDelegate.m

@@ -561,7 +561,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString *versionNum = @"";
     NSString *versionNum = @"";
 /*
 /*
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
     versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
 #endif
 #endif
     
     
@@ -919,7 +919,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     self.disable_trigger = false;
     self.disable_trigger = false;
     [self initialExceptionHandler];
     [self initialExceptionHandler];
     [self becomeObserver];
     [self becomeObserver];
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [self setUpGoogleAnalytics];
     [self setUpGoogleAnalytics];
 #endif
 #endif
     
     
@@ -1164,7 +1164,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     self.forgroundDate = nil;
     self.forgroundDate = nil;
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
 #endif
 #endif
 }
 }
@@ -3154,9 +3154,9 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
     ViewController.mail_to = arrsend_to;
     ViewController.mail_to = arrsend_to;
 
 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from NEW PACIFIC DIRECT,INC.",company,soid];//[arr_subject componentsJoinedByString:@" : "];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];//[arr_subject componentsJoinedByString:@" : "];
     
     
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];

+ 7 - 7
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -554,8 +554,8 @@ void UncaughtExceptionHandler(NSException *exception) {
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString *versionNum = @"";
     NSString *versionNum = @"";
-#ifdef BUILD_NPD
-    versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
+    versionNum = [NSString stringWithFormat:@"Version: %@ %@ Build %@",COMPANY_SHORT_NAME,version,build];
 #endif
 #endif
     
     
 #ifdef BUILD_HMLG
 #ifdef BUILD_HMLG
@@ -908,7 +908,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     self.disable_trigger = false;
     self.disable_trigger = false;
     [self initialExceptionHandler];
     [self initialExceptionHandler];
     [self becomeObserver];
     [self becomeObserver];
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [self setUpGoogleAnalytics];
     [self setUpGoogleAnalytics];
 #endif
 #endif
     
     
@@ -1153,7 +1153,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     self.forgroundDate = nil;
     self.forgroundDate = nil;
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
 #endif
 #endif
 }
 }
@@ -3106,9 +3106,9 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
     ViewController.mail_to = arrsend_to;
     ViewController.mail_to = arrsend_to;
 
 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from NEW PACIFIC DIRECT,INC.",company,soid];//[arr_subject componentsJoinedByString:@" : "];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];//[arr_subject componentsJoinedByString:@" : "];
     
     
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
@@ -3116,7 +3116,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
 #else
 #else
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from Homelegance.",company,soid];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];
     
     
 #endif
 #endif
     
     

+ 7 - 7
RedAnt ERP Mobile/iSales-USAI/AppDelegate.m

@@ -554,8 +554,8 @@ void UncaughtExceptionHandler(NSException *exception) {
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* build =[infoDict objectForKey:@"CFBundleVersion"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString* version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     NSString *versionNum = @"";
     NSString *versionNum = @"";
-#ifdef BUILD_NPD
-    versionNum = [NSString stringWithFormat:@"Version: npd %@ Build %@",version,build];
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
+    versionNum = [NSString stringWithFormat:@"Version: %@ %@ Build %@",COMPANY_SHORT_NAME,version,build];
 #endif
 #endif
     
     
 #ifdef BUILD_HMLG
 #ifdef BUILD_HMLG
@@ -908,7 +908,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     self.disable_trigger = false;
     self.disable_trigger = false;
     [self initialExceptionHandler];
     [self initialExceptionHandler];
     [self becomeObserver];
     [self becomeObserver];
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [self setUpGoogleAnalytics];
     [self setUpGoogleAnalytics];
 #endif
 #endif
     
     
@@ -1153,7 +1153,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     NSTimeInterval timing = [[NSDate date] timeIntervalSinceDate:self.forgroundDate];
     self.forgroundDate = nil;
     self.forgroundDate = nil;
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
     [GoogleAnalyst trackTimingWithCategory:@"foreground" interval:timing name:@"user used time" label:nil];
 #endif
 #endif
 }
 }
@@ -3106,9 +3106,9 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
     ViewController.mail_to = arrsend_to;
     ViewController.mail_to = arrsend_to;
 
 
-#ifdef BUILD_NPD
+#if defined(BUILD_NPD) || defined(BUILD_USAI)
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from NEW PACIFIC DIRECT,INC.",company,soid];//[arr_subject componentsJoinedByString:@" : "];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];//[arr_subject componentsJoinedByString:@" : "];
     
     
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
     if (self.user_type == USER_ROLE_CUSTOMER && ![Singleton sharedInstance].currentOrderIsMerged) {
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
         NSString *companyName = [self.customerInfo objectForKey:@"customer_name"];
@@ -3116,7 +3116,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     }
     }
 #else
 #else
     
     
-    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from Homelegance.",company,soid];
+    NSString* subject=[NSString stringWithFormat:@"%@ -- SO# %@ from %@",company,soid,COMPANY_NAME];
     
     
 #endif
 #endif
     
     

+ 5 - 5
RedAnt ERP Mobile/iSales-USAI/config.h

@@ -281,12 +281,12 @@
 
 
 
 
 
 
-#define  URL_CHECK_OFFLINE  @"https://www.newpacificdirect.com/offline/initDatas.htm"
+#define  URL_CHECK_OFFLINE  @"https://central.united-us.com/demo/shopping/offline/initDatas.htm"
 
 
-#define  URL_DOWNLOAD_OFFLINE  @"https://www.newpacificdirect.com/offline/downloadDatas.htm"
+#define  URL_DOWNLOAD_OFFLINE  @"https://central.united-us.com/demo/shopping/offline/downloadDatas.htm"
 
 
-#define  URL_FINISH_DOWNLOAD_OFFLINE  @"https://www.newpacificdirect.com/offline/confirmVersion.htm"
-#define  URL_UPLOAD_OFFLINE  @"https://www.newpacificdirect.com/offline/uploadOfflineData.htm"
+#define  URL_FINISH_DOWNLOAD_OFFLINE  @"https://central.united-us.com/demo/shopping/offline/confirmVersion.htm"
+#define  URL_UPLOAD_OFFLINE  @"https://central.united-us.com/demo/shopping/offline/uploadOfflineData.htm"
 
 
 #define  URL_CATEGORYADDALL  @"https://central.united-us.com/demo/shopping/isales/categoryAddAllTo.htm"
 #define  URL_CATEGORYADDALL  @"https://central.united-us.com/demo/shopping/isales/categoryAddAllTo.htm"
 #define  URL_SEARCHADDALL  @"https://central.united-us.com/demo/shopping/isales/searchAddAllTo.htm"
 #define  URL_SEARCHADDALL  @"https://central.united-us.com/demo/shopping/isales/searchAddAllTo.htm"
@@ -308,7 +308,7 @@
 
 
 #define URL_EMAIL_WISHLIST @"https://central.united-us.com/demo/shopping/isales/sendWishListEmail.htm"
 #define URL_EMAIL_WISHLIST @"https://central.united-us.com/demo/shopping/isales/sendWishListEmail.htm"
 
 
-#define URL_BLOG @"https://www.newpacificdirect.com/blog"
+#define URL_BLOG @"https://central.united-us.com/demo/shopping/blog"
 
 
 #define  URL_MOVE_TO_BACK_ORDER @"https://central.united-us.com/demo/shopping/isales/moveToBackOrder.htm"
 #define  URL_MOVE_TO_BACK_ORDER @"https://central.united-us.com/demo/shopping/isales/moveToBackOrder.htm"