Ray Zhang 10 yıl önce
ebeveyn
işleme
7304277003

+ 4 - 0
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -1012,6 +1012,10 @@
     self.categoryViewController.cagegoryLabel.text =self.categoryViewController.categoryString;
     //   NSString* sss =[@"Category" stringByAppendingString:[self categoryString:categoryid node:appDelegate.categoryMenu level:0]];
     self.categoryViewController.categoryid = categoryid ;
+    self.categoryViewController.p_alert = nil;
+        self.categoryViewController.p_available = nil;
+        self.categoryViewController.p_price = nil;
+        self.categoryViewController.p_QTY = nil;
     [self.categoryViewController reload_container_getdata:true];
     [self.categoryViewController showCategory];
     if([self.current_VC isKindOfClass:[CategoryViewController class]])

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

@@ -367,7 +367,7 @@
 -(void) addtocart:(int) count
 {
     
-    
+
     if(self.cqty>0)
     {
         
@@ -379,58 +379,199 @@
         
         UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
             
-            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            int c=self.cqty+count;
+            
+            int m=c%self.step;
+            if(m!=0)
+            {
                 
-                NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
                 
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    
-                    
+                
+                UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"Sold in quantities of %d, Are you sure?",self.step] message:nil preferredStyle:UIAlertControllerStyleAlert];
+                //block代码块取代了delegate
+                
+                
+                
+                UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
                     
-                    if([[return_json valueForKey:@"result"] intValue]==2)
-                    {
-
-                        //    NSString* order_code = [return_json valueForKey:@"order_code"];
-                            AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-//                            appDelegate.order_code = order_code;
-//                            
-//                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-//                        appDelegate.order_code = order_code;
-                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                        
+                        NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
                         
+                        dispatch_async(dispatch_get_main_queue(), ^{
                             
-                            if(self.shopCartBlock!=nil)
+                            
+                            
+                            if([[return_json valueForKey:@"result"] intValue]==2)
                             {
-                                UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
                                 
+                                //    NSString* order_code = [return_json valueForKey:@"order_code"];
+                                AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+                                //                            appDelegate.order_code = order_code;
+                                //
+                                //                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+                                //                        appDelegate.order_code = order_code;
+                                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
                                 
-                                CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
-                                UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
-                                iv.image = img;
-                                //                        [self.contentView addSubview:iv];
-                                self.shopCartBlock(iv);
                                 
-                                self.cqty +=count;
-                                if(self.set_cqty)
-                                    self.set_cqty(self.cqty);
+                                if(self.shopCartBlock!=nil)
+                                {
+                                    UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
+                                    
+                                    
+                                    CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
+                                    UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
+                                    iv.image = img;
+                                    //                        [self.contentView addSubview:iv];
+                                    self.shopCartBlock(iv);
+                                    
+                                    self.cqty +=count;
+                                    if(self.set_cqty)
+                                        self.set_cqty(self.cqty);
+                                    
+                                }
                                 
+                                
+                            }
+                            else
+                            {
+                                UIViewController *vc= [RAUtils getViewController:self];
+                                [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
                             }
                             
-                        
-                    }
-                    else
-                    {
-                        UIViewController *vc= [RAUtils getViewController:self];
-                        [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
-                    }
-                    
-                    
+                            
+                            
+                            
+                        });
+                    });
                     
                     
-                });
-            });
+                }];
+                
+                UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+                    NSLog(@"No");
+                }];
+                [alertControl addAction:actionOne];
+                
+                [alertControl addAction:alertthree];
+                
+                //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
+                
+                UIViewController *vc= [RAUtils getViewController:self];
+                [vc presentViewController:alertControl animated:YES completion:nil];
+                
+                
+                
+            }
+            else
+            {
+                            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                
+                                NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
+                
+                                dispatch_async(dispatch_get_main_queue(), ^{
+                
+                
+                
+                                    if([[return_json valueForKey:@"result"] intValue]==2)
+                                    {
+                
+                                        //    NSString* order_code = [return_json valueForKey:@"order_code"];
+                                            AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+                //                            appDelegate.order_code = order_code;
+                //
+                //                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+                //                        appDelegate.order_code = order_code;
+                                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                
+                
+                                            if(self.shopCartBlock!=nil)
+                                            {
+                                                UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
+                
+                
+                                                CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
+                                                UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
+                                                iv.image = img;
+                                                //                        [self.contentView addSubview:iv];
+                                                self.shopCartBlock(iv);
+                
+                                                self.cqty +=count;
+                                                if(self.set_cqty)
+                                                    self.set_cqty(self.cqty);
+                
+                                            }
+                                            
+                                        
+                                    }
+                                    else
+                                    {
+                                        UIViewController *vc= [RAUtils getViewController:self];
+                                        [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
+                                    }
+                                    
+                                    
+                                    
+                                    
+                                });
+                            });
+
+            }
             
             
+//            
+//            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//                
+//                NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
+//                
+//                dispatch_async(dispatch_get_main_queue(), ^{
+//                    
+//                    
+//                    
+//                    if([[return_json valueForKey:@"result"] intValue]==2)
+//                    {
+//
+//                        //    NSString* order_code = [return_json valueForKey:@"order_code"];
+//                            AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+////                            appDelegate.order_code = order_code;
+////                            
+////                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+////                        appDelegate.order_code = order_code;
+//                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+//                        
+//                            
+//                            if(self.shopCartBlock!=nil)
+//                            {
+//                                UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
+//                                
+//                                
+//                                CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
+//                                UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
+//                                iv.image = img;
+//                                //                        [self.contentView addSubview:iv];
+//                                self.shopCartBlock(iv);
+//                                
+//                                self.cqty +=count;
+//                                if(self.set_cqty)
+//                                    self.set_cqty(self.cqty);
+//                                
+//                            }
+//                            
+//                        
+//                    }
+//                    else
+//                    {
+//                        UIViewController *vc= [RAUtils getViewController:self];
+//                        [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
+//                    }
+//                    
+//                    
+//                    
+//                    
+//                });
+//            });
+//            
+            
         }];
         
         UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
@@ -449,26 +590,112 @@
     }
     else
     {
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        
+        int c=self.cqty+count;
+        
+        int m=c%self.step;
+        if(m!=0)
+        {
             
-            NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
             
-            dispatch_async(dispatch_get_main_queue(), ^{
+            
+            UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"Sold in quantities of %d, Are you sure?",self.step] message:nil preferredStyle:UIAlertControllerStyleAlert];
+            //block代码块取代了delegate
+            
+            
+            
+            UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
+                
+                dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                    
+                    NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
+                    
+                    dispatch_async(dispatch_get_main_queue(), ^{
+                        
+                        
+                        
+                        if([[return_json valueForKey:@"result"] intValue]==2)
+                        {
+                            
+                            //    NSString* order_code = [return_json valueForKey:@"order_code"];
+                            AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+                            //                            appDelegate.order_code = order_code;
+                            //
+                            //                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+                            //                        appDelegate.order_code = order_code;
+                            [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                            
+                            
+                            if(self.shopCartBlock!=nil)
+                            {
+                                UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
+                                
+                                
+                                CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
+                                UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
+                                iv.image = img;
+                                //                        [self.contentView addSubview:iv];
+                                self.shopCartBlock(iv);
+                                
+                                self.cqty +=count;
+                                if(self.set_cqty)
+                                    self.set_cqty(self.cqty);
+                                
+                            }
+                            
+                            
+                        }
+                        else
+                        {
+                            UIViewController *vc= [RAUtils getViewController:self];
+                            [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
+                        }
+                        
+                        
+                        
+                        
+                    });
+                });
                 
                 
+            }];
+            
+            UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+                NSLog(@"No");
+            }];
+            [alertControl addAction:actionOne];
+            
+            [alertControl addAction:alertthree];
+            
+            //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
+            
+            UIViewController *vc= [RAUtils getViewController:self];
+            [vc presentViewController:alertControl animated:YES completion:nil];
+            
+            
+            
+        }
+        else
+        {
+            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                 
-                if([[return_json valueForKey:@"result"] intValue]==2)
-                {
-
-                        
- //                       NSString* order_code = [return_json valueForKey:@"order_code"];
-                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-//                        appDelegate.order_code = order_code;
-//                        
-//                    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-//                    appDelegate.order_code = order_code;
-                    [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
+                
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    
+                    
                     
+                    if([[return_json valueForKey:@"result"] intValue]==2)
+                    {
+                        
+                        //    NSString* order_code = [return_json valueForKey:@"order_code"];
+                        AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+                        //                            appDelegate.order_code = order_code;
+                        //
+                        //                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+                        //                        appDelegate.order_code = order_code;
+                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                        
                         
                         if(self.shopCartBlock!=nil)
                         {
@@ -487,19 +714,76 @@
                             
                         }
                         
+                        
+                    }
+                    else
+                    {
+                        UIViewController *vc= [RAUtils getViewController:self];
+                        [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
+                    }
                     
-                }
-                else
-                {
-                    UIViewController *vc= [RAUtils getViewController:self];
-                    [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
-                }
-                
-                
-                
-                
+                    
+                    
+                    
+                });
             });
-        });
+            
+        }
+        
+        
+        //
+        //            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        //
+        //                NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
+        //
+        //                dispatch_async(dispatch_get_main_queue(), ^{
+        //
+        //
+        //
+        //                    if([[return_json valueForKey:@"result"] intValue]==2)
+        //                    {
+        //
+        //                        //    NSString* order_code = [return_json valueForKey:@"order_code"];
+        //                            AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+        ////                            appDelegate.order_code = order_code;
+        ////
+        ////                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+        ////                        appDelegate.order_code = order_code;
+        //                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+        //
+        //
+        //                            if(self.shopCartBlock!=nil)
+        //                            {
+        //                                UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
+        //
+        //
+        //                                CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
+        //                                UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
+        //                                iv.image = img;
+        //                                //                        [self.contentView addSubview:iv];
+        //                                self.shopCartBlock(iv);
+        //
+        //                                self.cqty +=count;
+        //                                if(self.set_cqty)
+        //                                    self.set_cqty(self.cqty);
+        //
+        //                            }
+        //
+        //
+        //                    }
+        //                    else
+        //                    {
+        //                        UIViewController *vc= [RAUtils getViewController:self];
+        //                        [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
+        //                    }
+        //
+        //
+        //
+        //
+        //                });
+        //            });
+        //
+        
     }
     
 }

+ 2 - 2
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m

@@ -1664,7 +1664,7 @@
         NSLog(@"frame.size.height %f",frame.size.height);
         NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
-        if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) || self.collectionview.contentSize.height < frame.size.height)
+        if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) /*|| self.collectionview.contentSize.height < frame.size.height*/)
             
         {
             if(self.isrefreshing)
@@ -1684,7 +1684,7 @@
         NSLog(@"frame.size.height %f",frame.size.height);
         NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
-        if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) || self.collectionview.contentSize.width < frame.size.width)
+        if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) /*|| self.collectionview.contentSize.width < frame.size.width*/)
             
         {
             if(self.isrefreshing)

+ 2 - 2
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m

@@ -1741,7 +1741,7 @@
         NSLog(@"frame.size.height %f",frame.size.height);
         NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
-        if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) || self.collectionview.contentSize.height < frame.size.height)
+        if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) /*|| self.collectionview.contentSize.height < frame.size.height*/)
             
         {
             if(self.isrefreshing)
@@ -1761,7 +1761,7 @@
         NSLog(@"frame.size.height %f",frame.size.height);
         NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
-        if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) || self.collectionview.contentSize.width < frame.size.width)
+        if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) /*|| self.collectionview.contentSize.width < frame.size.width*/)
             
         {
             if(self.isrefreshing)

+ 46 - 27
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -331,7 +331,7 @@
                                                 <rect key="frame" x="0.0" y="49.5" width="290" height="44"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3MW-qC-tOm" id="1li-xE-7Vx">
-                                                    <rect key="frame" x="0.0" y="0.0" width="290" height="44"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="290" height="43.5"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pki-xD-OOT">
@@ -7467,7 +7467,7 @@ redantsupport@united-us.net</string>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="ihu-vW-d0a">
-                                <rect key="frame" x="370" y="189" width="150" height="30"/>
+                                <rect key="frame" x="370" y="236" width="150" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <color key="backgroundColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                                 <state key="normal" title="OK">
@@ -7482,38 +7482,22 @@ redantsupport@united-us.net</string>
                                     <action selector="onSearchClick:" destination="bth-pb-gyc" eventType="touchUpInside" id="PJP-ih-yXm"/>
                                 </connections>
                             </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="EEc-ga-lhk">
-                                <rect key="frame" x="20" y="189" width="100" height="30"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <color key="backgroundColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
-                                <state key="normal" title="Reset">
-                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                </state>
-                                <userDefinedRuntimeAttributes>
-                                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
-                                        <integer key="value" value="15"/>
-                                    </userDefinedRuntimeAttribute>
-                                </userDefinedRuntimeAttributes>
-                                <connections>
-                                    <action selector="onResetClick:" destination="bth-pb-gyc" eventType="touchUpInside" id="b13-bg-HQm"/>
-                                </connections>
-                            </button>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alert:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xZN-jn-WjS">
-                                <rect key="frame" x="20" y="117" width="42" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alert:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xZN-jn-WjS">
+                                <rect key="frame" x="20" y="75" width="120" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Availability:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PQa-Cd-uZk">
-                                <rect key="frame" x="20" y="84" width="85" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Availability:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PQa-Cd-uZk">
+                                <rect key="frame" x="20" y="42" width="120" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="KUP-cb-29A">
-                                <rect key="frame" x="127" y="151" width="393" height="30"/>
+                                <rect key="frame" x="182" y="109" width="338" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Click to select">
                                     <color key="titleColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -7522,15 +7506,32 @@ redantsupport@united-us.net</string>
                                     <action selector="onQTYClick:" destination="bth-pb-gyc" eventType="touchUpInside" id="WV8-OV-BRe"/>
                                 </connections>
                             </button>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sold by QTY:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Feg-2h-dDJ">
-                                <rect key="frame" x="20" y="155" width="99" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sold by QTY:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Feg-2h-dDJ">
+                                <rect key="frame" x="20" y="113" width="120" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="E2B-mt-Xb9">
+                                <rect key="frame" x="182" y="142" width="338" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Click to select">
+                                    <color key="titleColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="onPriceClick:" destination="bth-pb-gyc" eventType="touchUpInside" id="Cog-a5-RcV"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Price:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="FAm-Wp-3w3">
+                                <rect key="frame" x="20" y="146" width="120" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Qir-qH-TY6">
-                                <rect key="frame" x="132" y="113" width="388" height="30"/>
+                                <rect key="frame" x="182" y="71" width="338" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Click to select">
                                     <color key="titleColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -7540,7 +7541,7 @@ redantsupport@united-us.net</string>
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Oi4-ns-KUr">
-                                <rect key="frame" x="127" y="75" width="393" height="30"/>
+                                <rect key="frame" x="182" y="33" width="338" height="30"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <state key="normal" title="Click to select">
                                     <color key="titleColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -7549,6 +7550,22 @@ redantsupport@united-us.net</string>
                                     <action selector="onAvailabilityClick:" destination="bth-pb-gyc" eventType="touchUpInside" id="Gy2-L1-kap"/>
                                 </connections>
                             </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="EEc-ga-lhk">
+                                <rect key="frame" x="20" y="236" width="150" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                                <state key="normal" title="Reset">
+                                    <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                </state>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                        <integer key="value" value="15"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                                <connections>
+                                    <action selector="onResetClick:" destination="bth-pb-gyc" eventType="touchUpInside" id="b13-bg-HQm"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <color key="backgroundColor" red="0.94901960780000005" green="0.93333333330000001" blue="0.91764705879999997" alpha="1" colorSpace="calibratedRGB"/>
                     </view>
@@ -7557,7 +7574,9 @@ redantsupport@united-us.net</string>
                     <connections>
                         <outlet property="buttonAlert" destination="Qir-qH-TY6" id="v2y-hR-vCf"/>
                         <outlet property="buttonAvailability" destination="Oi4-ns-KUr" id="Zge-pK-h4Q"/>
+                        <outlet property="buttonPrice" destination="E2B-mt-Xb9" id="MFa-ED-JCP"/>
                         <outlet property="buttonQTY" destination="KUP-cb-29A" id="AhH-X6-BVo"/>
+                        <outlet property="labelPrice" destination="FAm-Wp-3w3" id="00O-zT-Z9Q"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="pFM-jV-tJo" userLabel="First Responder" sceneMemberID="firstResponder"/>

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/iSales-NPD-Info.plist

@@ -21,7 +21,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>160301</string>
+	<string>160307</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>NSAppTransportSecurity</key>