Ver código fonte

修改登陆时,Model Detail不显示Add To Portfolio。
修改Shop Order -> Store Order,Sales Order -> Purchase Order.
Order List增加Select按钮实现多选订单,取消侧滑添加到合并表单。
修改合并订单时检测需要合并的订单中是否存在当前正在编辑的订单。
Cart增加Print按钮,并实现其功能。
修改Calculate Price -> Store Price.

Pen Li 9 anos atrás
pai
commit
478673bcc9

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


+ 12 - 0
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,4 +2,16 @@
 <Bucket
    type = "0"
    version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            scope = "0"
+            stopOnStyle = "0">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
 </Bucket>

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

@@ -27,6 +27,7 @@
 #import "NotificationNameCenter.h"
 #import "Singleton.h"
 #import "JKMessageBoxController.h"
+#import "PDFViewController.h"
 
 #define ALERT_FREE 1024
 #define ALERT_DEL 1025
@@ -45,9 +46,12 @@
 
 @property (nonatomic,strong) NSOperationQueue *dataOperationQueue;
 @property (strong, nonatomic) IBOutlet UIButton *emailButton;
+@property (strong, nonatomic) IBOutlet UIButton *printButton;
 
 @property (nonatomic,assign) BOOL currentOrderIsMerged;
 
+@property (nonatomic,copy) NSString *print_url;
+
 @end
 
 @implementation CartViewController
@@ -469,13 +473,14 @@
     
     //    self.collectionview.layer.shadowPath =[UIBezierPath bezierPathWithRect:self.collectionview.bounds].CGPath;
 }
+
 - (void)viewWillAppear:(BOOL)animated
 {
     
     [super viewWillAppear:animated];
     
-    // email 39 cancel 44 place order
-    
+    // print 13 email 19 cancel 24 place order
+
     // Shop 权限检查
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     if (appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {
@@ -484,44 +489,61 @@
             CGRect frame0 = self.cancelOrderButton.frame;
             CGRect frame1 = self.placeOrderButton.frame;
             CGRect frame2 = self.emailButton.frame;
+            CGRect frame3 = self.printButton.frame;
             
             CGFloat x = CGRectGetMaxX(frame1) - frame0.size.width;
             frame0.origin.x = x;
             self.cancelOrderButton.frame = frame0;
             
-            x -= 39 + CGRectGetWidth(frame2);
+            x -= 19 + CGRectGetWidth(frame2);
             frame2.origin.x = x;
             self.emailButton.frame = frame2;
             
+            x -= 13 + CGRectGetWidth(frame3);
+            frame3.origin.x = x;
+            self.printButton.frame = frame3;
+            
             self.placeOrderButton.hidden = YES;
         } else {
             self.placeOrderButton.hidden = NO;
             CGSize size = cancelButtonFrame.size;
-            CGFloat x = CGRectGetMinX(self.placeOrderButton.frame) - 44 - size.width;// 44 为间距
+            CGFloat x = CGRectGetMinX(self.placeOrderButton.frame) - 24 - size.width;
             CGFloat y = CGRectGetMinY(self.placeOrderButton.frame);
             self.cancelOrderButton.frame = CGRectMake(x, y, size.width, size.height);
             
             CGRect frame2 = self.emailButton.frame;
-            x -= 39 + CGRectGetWidth(frame2);
+            x -= 19 + CGRectGetWidth(frame2);
             frame2.origin.x = x;
             self.emailButton.frame = frame2;
+            
+            CGRect frame3 = self.printButton.frame;
+            x -= 13 + CGRectGetWidth(frame3);
+            frame3.origin.x = x;
+            self.printButton.frame = frame3;
         }
     } else {
 //        self.cancelOrderButton.frame = cancelButtonFrame;
         self.placeOrderButton.hidden = NO;
         CGSize size = cancelButtonFrame.size;
-        CGFloat x = CGRectGetMinX(self.placeOrderButton.frame) - 44 - size.width;// 44 为间距
+        CGFloat x = CGRectGetMinX(self.placeOrderButton.frame) - 24 - size.width;
         CGFloat y = CGRectGetMinY(self.placeOrderButton.frame);
         self.cancelOrderButton.frame = CGRectMake(x, y, size.width, size.height);
         
         CGRect frame2 = self.emailButton.frame;
-        x -= 39 + CGRectGetWidth(frame2);
+        x -= 19 + CGRectGetWidth(frame2);
         frame2.origin.x = x;
         self.emailButton.frame = frame2;
+        
+        CGRect frame3 = self.printButton.frame;
+        x -= 13 + CGRectGetWidth(frame3);
+        frame3.origin.x = x;
+        self.printButton.frame = frame3;
     }
     
     // 离线隐藏Email
     self.emailButton.hidden = appDelegate.offline_mode;
+    // 离线隐藏Print
+    self.printButton.hidden = appDelegate.offline_mode;
         
 //    [self reload_data]; // 视图没及时刷新
     
@@ -616,6 +638,7 @@
                 self.content_arr = [RAUtils dictionary2array:cart_json count_fields:@"count" item_mark:@"item_" items_mark:nil];
                 self.currentOrderIsMerged = [[cart_json valueForKey:@"is_merged_order"] boolValue];
                 [self.itemListTable reloadData];
+                self.print_url = [cart_json valueForKey:@"cart_print_url"];
                 
                 [self refresh_total];
                 
@@ -2726,7 +2749,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
                            
                        }else {
                            
-                           
+                           [RAUtils message_alert:@"Send Email Success" title:@"Message" controller:weakself];
                            
                        }
                        
@@ -2749,6 +2772,36 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     
 }
 
+- (IBAction)printCartButtonClick:(UIButton *)sender {
+    
+    PDFViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"];
+    
+    ViewController.url = self.print_url;
+    ViewController.canSave = false;
+    ViewController.isLocalfile=NO;
+    NSString* subject;
+    
+    NSString* cur_time =[RAUtils current_date];
+    subject =@"Cart Print";
+    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    NSString* customer_email=    [appDelegate.customerInfo valueForKey:@"customer_email"];
+    
+    
+    NSMutableArray* send_to = [[NSMutableArray alloc]init];
+    if(customer_email.length>0)
+    {
+        send_to=[[customer_email componentsSeparatedByString:NSLocalizedString(@";", nil)] mutableCopy];
+        
+    }
+    ViewController.mail_to = send_to;
+    
+    ViewController.attachment_name = [NSString stringWithFormat:@"NPD_Product_List %@.pdf",cur_time];
+    ViewController.mail_subject = subject;
+    
+    ViewController.hidenavi = false;
+    [self.navigationController pushViewController:ViewController animated:YES];
+    
+}
 
 
 @end

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

@@ -954,6 +954,13 @@ self.isrefreshing=false;
         
          NSMutableDictionary* section_json = [[self.detail_data objectForKey:@"img_section"] mutableCopy];
         
+        if (!appDelegate.user) { // 没有登录时隐藏add to portfolio,使add to cart与add to wishlist对齐
+            cell.btnaddPortfolio.hidden = YES;
+            CGRect wishListFrame = cell.btnaddWish.frame;
+            CGRect cartFrame = cell.btnaddCart.frame;
+            cartFrame.origin.x = wishListFrame.origin.x;
+            cell.btnaddCart.frame = cartFrame;
+        }
         
        
         if (appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {

+ 3 - 1
RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.h

@@ -10,7 +10,9 @@
 /**SelectUploadOrderViewController用于合并订单*/
 @interface SelectUploadOrderViewController : UIViewController
 
-@property (nonatomic , copy) void (^returnValue)(NSArray* SelectedOrder);
+@property (nonatomic , copy) void (^deleteBlock)(NSString* deleteOrderID);
+
+@property (nonatomic , copy) void (^clearBlock)();
 
 @property (nonatomic,copy) void (^mergeBlock)(NSDictionary *dic);// 合并成功
 

+ 82 - 23
RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.m

@@ -14,6 +14,7 @@
 #import "DefaultAppearance.h"
 #import "iSalesNetwork.h"
 #import "RAUtils.h"
+#import "AppDelegate.h"
 
 @interface SelectUploadOrderViewController ()<UITableViewDataSource,UITableViewDelegate>
 
@@ -122,47 +123,97 @@
         return;
     }
     
-//    if (!self.mergeTo) {
-//        [RAUtils message_alert:@"Please choose an order to copy information from." title:@"Warning" controller:self];
-//        return;
-//    }
+    
+    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    __weak typeof(self) weakself = self;
     
     __block NSMutableString *order_ids = [NSMutableString string];
     __block NSString *checked_id = nil;
     
+    __block BOOL closeOrder = YES;
     [self.mergeList enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        
         NSDictionary *dic = (NSDictionary *)obj;
         // order_id
         NSString *order_id = [NSString stringWithFormat:@"%@",[dic objectForKey:@"order_id"]];
-//        int check = [[dic objectForKey:@"check"] integerValue];
+        // order_code
+        NSString *order_code = [NSString stringWithFormat:@"%@",[dic objectForKey:@"order_code"]];
         
         [order_ids appendString:[NSString stringWithFormat:@"%@,",order_id]];
         if (idx == 0) {
             checked_id = order_id;
         }
         
-    }];
-    
-    [order_ids deleteCharactersInRange:NSMakeRange(order_ids.length - 1, 1)];
-    
-    NSMutableDictionary *params = [NSMutableDictionary dictionary];
-    [params setObject:order_ids forKey:@"order_ids"];
-    [params setObject:checked_id forKey:@"targetOrderId"];
-    
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Merge Order"];
+        // 检查是否被自己打开
+        if ([order_code isEqualToString:appDelegate.order_code]) {
+            closeOrder = NO;
+            *stop = YES;
+            
+            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"can not add to combine list because current order is opened. Do you want to close order and add to combine list?" preferredStyle:UIAlertControllerStyleAlert];
+            
+            UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                
+                closeOrder = NO;
+                
+            }];
+            
+            UIAlertAction *closeOrderAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                
+                
+                [alertVC dismissViewControllerAnimated:YES completion:nil];
+                // 关闭订单
+                UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+                NSDictionary* order_json = [iSalesNetwork release_Order:order_code];
+                
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    
+                    [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                    if([[order_json valueForKey:@"result"] intValue]==2)
+                    {
+                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+                        
+                        [appDelegate closeOrder];
+                        closeOrder = YES;
+                        
+                        [weakself uploadButtonClicked:weakself.uploadButton];
+                        
+                    } else {
+                        // 释放失败
+                        closeOrder = NO;
+                        [RAUtils message_alert:@"Release Order Failed!" title:@"Warning" controller:weakself];
+                    }
+                });
+            }];
+            
+            [alertVC addAction:cancelAction];
+            [alertVC addAction:closeOrderAction];
+            
+            [weakself presentViewController:alertVC animated:YES completion:nil];
+        }
 
-    NSDictionary *ret = [iSalesNetwork merge_order:params];
-    
-    [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+    }];
     
-    [self.navigationController dismissViewControllerAnimated:YES completion:^{
+    if (closeOrder) {
+        [order_ids deleteCharactersInRange:NSMakeRange(order_ids.length - 1, 1)];
         
-        if (self.mergeBlock) {
-            self.mergeBlock(ret);
-        }
+        NSMutableDictionary *params = [NSMutableDictionary dictionary];
+        [params setObject:order_ids forKey:@"order_ids"];
+        [params setObject:checked_id forKey:@"targetOrderId"];
         
-    }];
+        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Merge Order"];
+        
+        NSDictionary *ret = [iSalesNetwork merge_order:params];
+        
+        [waitalert dismissWithClickedButtonIndex:0 animated:YES];
+        
+        [self.navigationController dismissViewControllerAnimated:YES completion:^{
+            
+            if (weakself.mergeBlock) {
+                weakself.mergeBlock(ret);
+            }
+            
+        }];
+    }
     
     
 }
@@ -307,7 +358,12 @@
         
         NSDictionary *dic = [self.mergeList objectAtIndex:indexPath.row];
         [self.mergeList removeObject:dic];
-        self.mergeTo = nil;
+//        self.mergeTo = nil;
+        NSString *order_id = [NSString stringWithFormat:@"%@",[dic objectForKey:@"order_id"]];
+        if (self.deleteBlock) {
+            self.deleteBlock(order_id);
+        }
+        
         
         [tableView reloadData];
     }];
@@ -321,6 +377,9 @@
 }
 
 - (void)onClearClick:(id)sender {
+    if (self.clearBlock) {
+        self.clearBlock();
+    }
     [self.mergeList removeAllObjects];
     [self.syncDataTableView reloadData];
 }

+ 304 - 146
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -33,6 +33,7 @@
 @property (nonatomic,strong) NSMutableDictionary *shop_order_filter;
 
 @property (strong, nonatomic) IBOutlet UIBarButtonItem *mergeListButton;
+@property (strong, nonatomic) IBOutlet UIBarButtonItem *editOrderListButton;
 @property (strong, nonatomic) IBOutlet UISegmentedControl *orderTypeSegmentControl;
 
 @end
@@ -139,7 +140,7 @@
     //    ref.hidden = true;
     [ref addTarget:self action:@selector(manually_refresh) forControlEvents:UIControlEventValueChanged];
     [self.table_order addSubview:ref];
-    
+    self.table_order.allowsMultipleSelectionDuringEditing = YES;
     
 //    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
 //    NSString *documents = [paths objectAtIndex:0];
@@ -312,24 +313,38 @@
         // 合并订单的权限
         if ([Singleton sharedInstance].permissions_merge_order) { // 能够合并
             
+            // 4 6 顺序不能换
+            if (![items containsObject:self.editOrderListButton]) { // 没显示button
+                [items insertObject:self.editOrderListButton atIndex:4];
+            }
+            
             if (![items containsObject:self.mergeListButton]) { // 没显示button
-                [items insertObject:self.mergeListButton atIndex:4];
-                self.toolbarView.items = items;
+                [items insertObject:self.mergeListButton atIndex:6];
             }
+
+            self.toolbarView.items = items;
             
         } else { // 不能合并
             if ([items containsObject:self.mergeListButton]) { // 显示button
                 [items removeObject:self.mergeListButton];
-                self.toolbarView.items = items;
             }
+            if ([items containsObject:self.editOrderListButton]) { // 显示button
+                [items removeObject:self.editOrderListButton];
+            }
+            
+            self.toolbarView.items = items;
         }
         
         // Check For Saved Order 不能合并
         if(self.init_style==OL_OPEN) {
-            if ([items containsObject:self.mergeListButton]) {
+            if ([items containsObject:self.mergeListButton]) { // 显示button
                 [items removeObject:self.mergeListButton];
-                self.toolbarView.items = items;
             }
+            if ([items containsObject:self.editOrderListButton]) { // 显示button
+                [items removeObject:self.editOrderListButton];
+            }
+            
+            self.toolbarView.items = items;
 
         }
 
@@ -338,8 +353,12 @@
 //        self.mergeListButton.hidden = YES;
         if ([items containsObject:self.mergeListButton]) { // 显示button
             [items removeObject:self.mergeListButton];
-            self.toolbarView.items = items;
         }
+        if ([items containsObject:self.editOrderListButton]) { // 显示button
+            [items removeObject:self.editOrderListButton];
+        }
+        
+        self.toolbarView.items = items;
     }
     
     // 非Customer用户不用区分Sales Order 和 Shop Order
@@ -1103,7 +1122,9 @@
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
     
-    
+    if (tableView.isEditing) { // 编辑模式下不响应
+        return;
+    }
     //
     if(indexPath.row==self.content_data.count)
         return;
@@ -1385,137 +1406,137 @@
         
     } else if (appDelegate.user_type==USER_ROLE_CUSTOMER) {
         
-        UITableViewRowAction *add2MergeListAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Add To Combine List" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-            
-            NSString *orderCode = [NSString stringWithFormat:@"%@",[self.content_data[indexPath.row] valueForKey:@"order_code"]];
-            
-            
-            NSString *create_by = [self.content_data[indexPath.row] valueForKey:@"create_by"];
-            NSString *create_time = [self.content_data[indexPath.row] valueForKey:@"purchase_time"];
-            
-            __block BOOL contain = NO;
-            [self.mergeList enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-               
-                NSString *so_id = [(NSDictionary *)obj objectForKey:@"so_id"];
-                if ([so_id isEqualToString:so]) {
-                    
-                    contain = YES;
-                    
-                    *stop = YES;
-                }
-                
-            }]; // 避免重复添加
-            
-            
-            if (!contain) {
-                
-                __block BOOL closeOrder = NO;
-                // 检查是否被自己打开
-                if ([orderCode isEqualToString:appDelegate.order_code]) {
-                    
-                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"can not add to combine list because current order is opened. Do you want to close order and add to combine list?" preferredStyle:UIAlertControllerStyleAlert];
-                    
-                    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                        
-                        closeOrder = NO;
-                        [alertVC dismissViewControllerAnimated:YES completion:nil];
-                        
-                    }];
-                    
-                    UIAlertAction *closeOrderAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                        
-                        
-                        [alertVC dismissViewControllerAnimated:YES completion:nil];
-                        // 关闭订单
-                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
-                        NSDictionary* order_json = [iSalesNetwork release_Order:orderCode];
-                        
-                        dispatch_async(dispatch_get_main_queue(), ^{
-                            
-                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-                            if([[order_json valueForKey:@"result"] intValue]==2)
-                            {
-                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-
-                                [appDelegate closeOrder];
-                                closeOrder = YES;
-                                
-                                // 锁订单/检查是否被别人锁定
-                                NSDictionary *lock_dic = [iSalesNetwork lock_order:orderCode]; // 和open一样,只不过不用更新car count
-
-                                
-                                if ([[lock_dic objectForKey:@"result"] integerValue] == RESULT_TRUE) {
-                                    
-                                    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
-                                    
-                                    [dic setValue:orderid forKey:@"order_id"];
-                                    [dic setValue:so forKey:@"so_id"];
-                                    [dic setValue:create_by forKey:@"create_by"];
-                                    [dic setValue:create_time forKey:@"create_time"];
-                                    [dic setValue:[NSNumber numberWithInteger:0] forKey:@"check"]; // 合并到
-                                    
-                                    [self.mergeList addObject:dic];
-                                    
-                                } else {
-                                    
-                                    [RAUtils message_alert:[lock_dic objectForKey:@"err_msg"] title:@"Warning" controller:self];
-                                    
-                                }
-
-                                
-                            }
-                            else
-                            {
-                                closeOrder = NO;
-                                [RAUtils message_alert:[order_json valueForKey:@"err_msg"] title:@"Release Order" controller:self] ;
-                            }
-                            
-                            
-                            
-                        });
-
-                        
-                        
-                    }];
-                    
-                    [alertVC addAction:cancelAction];
-                    [alertVC addAction:closeOrderAction];
-                    
-                    [self presentViewController:alertVC animated:YES completion:nil];
-                    
-                } else {
-                    
-                    closeOrder = YES;
-                    // 锁订单/检查是否被别人锁定
-                    NSDictionary *lock_dic = [iSalesNetwork lock_order:orderCode]; // 和open一样,只不过不用更新car count
-                    
-                    if ([[lock_dic objectForKey:@"result"] integerValue] == RESULT_TRUE) {
-                        
-                        NSMutableDictionary *dic = [NSMutableDictionary dictionary];
-                        
-                        [dic setValue:orderid forKey:@"order_id"];
-                        [dic setValue:so forKey:@"so_id"];
-                        [dic setValue:create_by forKey:@"create_by"];
-                        [dic setValue:create_time forKey:@"create_time"];
-                        [dic setValue:[NSNumber numberWithInteger:0] forKey:@"check"]; // 合并到
-                        
-                        [self.mergeList addObject:dic];
-                        
-                    } else {
-                        
-                        [RAUtils message_alert:[lock_dic objectForKey:@"err_msg"] title:@"Warning" controller:self];
-                        
-                    }
-                }
-                
-            }
-            
-            [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationFade];
-            
-            DebugLog(@"%@",self.mergeList);
-            
-        }];
-        add2MergeListAction.backgroundColor = UIColorFromRGB(0x336699);
+//        UITableViewRowAction *add2MergeListAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Add To Combine List" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
+//            
+//            NSString *orderCode = [NSString stringWithFormat:@"%@",[self.content_data[indexPath.row] valueForKey:@"order_code"]];
+//            
+//            
+//            NSString *create_by = [self.content_data[indexPath.row] valueForKey:@"create_by"];
+//            NSString *create_time = [self.content_data[indexPath.row] valueForKey:@"purchase_time"];
+//            
+//            __block BOOL contain = NO;
+//            [self.mergeList enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+//               
+//                NSString *so_id = [(NSDictionary *)obj objectForKey:@"so_id"];
+//                if ([so_id isEqualToString:so]) {
+//                    
+//                    contain = YES;
+//                    
+//                    *stop = YES;
+//                }
+//                
+//            }]; // 避免重复添加
+//            
+//            
+//            if (!contain) {
+//                
+//                __block BOOL closeOrder = NO;
+//                // 检查是否被自己打开
+//                if ([orderCode isEqualToString:appDelegate.order_code]) {
+//                    
+//                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"can not add to combine list because current order is opened. Do you want to close order and add to combine list?" preferredStyle:UIAlertControllerStyleAlert];
+//                    
+//                    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+//                        
+//                        closeOrder = NO;
+//                        [alertVC dismissViewControllerAnimated:YES completion:nil];
+//                        
+//                    }];
+//                    
+//                    UIAlertAction *closeOrderAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+//                        
+//                        
+//                        [alertVC dismissViewControllerAnimated:YES completion:nil];
+//                        // 关闭订单
+//                        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Release Order"];
+//                        NSDictionary* order_json = [iSalesNetwork release_Order:orderCode];
+//                        
+//                        dispatch_async(dispatch_get_main_queue(), ^{
+//                            
+//                            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                            if([[order_json valueForKey:@"result"] intValue]==2)
+//                            {
+//                                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//
+//                                [appDelegate closeOrder];
+//                                closeOrder = YES;
+//
+//                                // 锁订单/检查是否被别人锁定
+//                                NSDictionary *lock_dic = [iSalesNetwork lock_order:orderCode]; // 和open一样,只不过不用更新car count
+//
+//                                
+//                                if ([[lock_dic objectForKey:@"result"] integerValue] == RESULT_TRUE) {
+//                                    
+//                                    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
+//                                    
+//                                    [dic setValue:orderid forKey:@"order_id"];
+//                                    [dic setValue:so forKey:@"so_id"];
+//                                    [dic setValue:create_by forKey:@"create_by"];
+//                                    [dic setValue:create_time forKey:@"create_time"];
+//                                    [dic setValue:[NSNumber numberWithInteger:0] forKey:@"check"]; // 合并到
+//                                    
+//                                    [self.mergeList addObject:dic];
+//                                    
+//                                } else {
+//                                    
+//                                    [RAUtils message_alert:[lock_dic objectForKey:@"err_msg"] title:@"Warning" controller:self];
+//                                    
+//                                }
+//
+//                                
+//                            }
+//                            else
+//                            {
+//                                closeOrder = NO;
+//                                [RAUtils message_alert:[order_json valueForKey:@"err_msg"] title:@"Release Order" controller:self] ;
+//                            }
+//                            
+//                            
+//                            
+//                        });
+//
+//                        
+//                        
+//                    }];
+//                    
+//                    [alertVC addAction:cancelAction];
+//                    [alertVC addAction:closeOrderAction];
+//                    
+//                    [self presentViewController:alertVC animated:YES completion:nil];
+//                    
+//                } else {
+//                    
+//                    closeOrder = YES;
+//                    // 锁订单/检查是否被别人锁定
+//                    NSDictionary *lock_dic = [iSalesNetwork lock_order:orderCode]; // 和open一样,只不过不用更新car count
+//                    
+//                    if ([[lock_dic objectForKey:@"result"] integerValue] == RESULT_TRUE) {
+//                        
+//                        NSMutableDictionary *dic = [NSMutableDictionary dictionary];
+//                        
+//                        [dic setValue:orderid forKey:@"order_id"];
+//                        [dic setValue:so forKey:@"so_id"];
+//                        [dic setValue:create_by forKey:@"create_by"];
+//                        [dic setValue:create_time forKey:@"create_time"];
+//                        [dic setValue:[NSNumber numberWithInteger:0] forKey:@"check"]; // 合并到
+//                        
+//                        [self.mergeList addObject:dic];
+//                        
+//                    } else {
+//                        
+//                        [RAUtils message_alert:[lock_dic objectForKey:@"err_msg"] title:@"Warning" controller:self];
+//                        
+//                    }
+//                }
+//                
+//            }
+//            
+//            [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationFade];
+//            
+//            DebugLog(@"%@",self.mergeList);
+//            
+//        }];
+//        add2MergeListAction.backgroundColor = UIColorFromRGB(0x336699);
         
         // Cancel Order Action
         UITableViewRowAction *cancelAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Cancel Order"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
@@ -1599,12 +1620,12 @@
         if([order_status isEqualToString:@"Saved Order"]&&appDelegate.can_cancel_order)
             [actionArr addObject:cancelAction];
         
-        if ([Singleton sharedInstance].permissions_merge_order) {// 有合并订单的权限
-            if (self.orderType == 0) {// Sales Order不能合并
-                [actionArr addObject:add2MergeListAction];
-            }
-
-        }
+//        if ([Singleton sharedInstance].permissions_merge_order) {// 有合并订单的权限
+//            if (self.orderType == 0) {// Sales Order不能合并
+//                [actionArr addObject:add2MergeListAction];
+//            }
+//
+//        }
         return actionArr;
     }
     
@@ -1760,8 +1781,24 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 #pragma mark - button action
 
+- (NSIndexPath *)indexPathOfDeleteOrder:(NSString *)orderID {
+    for (NSIndexPath *indexPath in self.table_order.indexPathsForSelectedRows) {
+        
+        NSString* orderid= [NSString stringWithFormat:@"%@",[self.content_data[indexPath.row] valueForKey:@"order_id"]];
+        if ([orderid isEqualToString:orderID]) {
+            return indexPath;
+        }
+    }
+    return nil;
+}
+
 - (IBAction)mergeListButtonClick:(UIBarButtonItem *)sender {
     
+    BOOL orderReady = [self handleSelectedOrders];
+    
+    if (!orderReady) {
+        return; // 有Order被锁
+    }
     
     if (!self.mergeList.count) {
         
@@ -1789,6 +1826,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
             if([[ret objectForKey:@"result"]integerValue] == RESULT_TRUE) {
                 
                 [weakself.mergeList removeAllObjects];
+                [strongself.table_order endEditing:YES];
                 [strongself ReloadData];
                 
             } else {
@@ -1800,12 +1838,90 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
         
     };
     
+    mergeVC.deleteBlock = ^(NSString *orderID){
+        NSIndexPath *indexPath = [weakself indexPathOfDeleteOrder:orderID];
+        [weakself.table_order deselectRowAtIndexPath:indexPath animated:YES];
+    };
+    
+    mergeVC.clearBlock = ^{
+        for (NSDictionary *order in self.mergeList) {
+            
+            NSString *order_id = [NSString stringWithFormat:@"%@",[order objectForKey:@"order_id"]];
+            NSIndexPath *indexPath = [weakself indexPathOfDeleteOrder:order_id];
+            [weakself.table_order deselectRowAtIndexPath:indexPath animated:YES];
+        }
+    };
+    
     nav.modalPresentationStyle = UIModalPresentationFormSheet;
     
     [self presentViewController:nav animated:YES completion:nil];
     
 }
 
+- (BOOL)handleSelectedOrders {
+    
+    [self.mergeList removeAllObjects];
+    for (NSIndexPath *indexPath in self.table_order.indexPathsForSelectedRows) {
+       
+        NSString* so= [self.content_data[indexPath.row] valueForKey:@"so#"];
+        NSString* orderid= [self.content_data[indexPath.row] valueForKey:@"order_id"];
+        NSString *create_by = [self.content_data[indexPath.row] valueForKey:@"create_by"];
+        NSString *create_time = [self.content_data[indexPath.row] valueForKey:@"purchase_time"];
+        NSString *orderCode = [NSString stringWithFormat:@"%@",[self.content_data[indexPath.row] valueForKey:@"order_code"]];
+        
+        NSMutableDictionary *dic = [NSMutableDictionary dictionary];
+        
+        [dic setValue:orderid forKey:@"order_id"];
+        [dic setValue:orderCode forKey:@"order_code"];
+        [dic setValue:so forKey:@"so_id"];
+        [dic setValue:create_by forKey:@"create_by"];
+        [dic setValue:create_time forKey:@"create_time"];
+        [dic setValue:[NSNumber numberWithInteger:0] forKey:@"check"]; // 合并到
+        
+        [self.mergeList addObject:dic];
+
+    }
+    
+    return YES;
+}
+
+- (IBAction)editOrderListButtonClick:(UIBarButtonItem *)sender {
+
+    if (self.table_order.isEditing) {
+        // 结束选择时恢复
+        if ([Singleton sharedInstance].customer_can_see_sales_Order) { // 有查看Sales order 权限
+            if (self.orderTypeSegmentControl.numberOfSegments == 1) {
+                [self.orderTypeSegmentControl insertSegmentWithTitle:@"Purchase Order" atIndex:1 animated:YES];
+            }
+        }
+        
+        self.status_cadedate = nil;
+        [self loadfilter];
+        [self ReloadData];
+        
+        [self.table_order setEditing:NO animated:YES];
+        sender.title = @"Select";
+        [self.mergeList removeAllObjects];
+        
+    } else {
+        // 选择时不能选择Sales Order
+        if(self.orderTypeSegmentControl.numberOfSegments > 1) {
+            [self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
+        }
+        // 切换filter
+        NSData *data=[NSData dataWithContentsOfFile:[[NSBundle mainBundle]  pathForResource:@"status_filter_cadedate_open" ofType:@"json" ]];
+        NSError *error=nil;
+        self.status_cadedate = [[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error] mutableCopy];
+        // 刷新,取Saved Order
+        [self ReloadData];
+        
+        [self.table_order setEditing:YES animated:YES];
+        sender.title = @"Exit";
+        
+    }
+    
+}
+
 - (void)changeOrderType:(NSInteger)ordertype {
     self.orderType = ordertype;
     [Singleton sharedInstance].customer_order_type = ordertype;
@@ -1823,6 +1939,48 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
                 break;
         }
     }
+    
+    NSMutableArray *items = [self.toolbarView.items mutableCopy];
+    if (ordertype == 1) {
+        // 不能合并
+        if ([items containsObject:self.mergeListButton]) { // 显示button
+            [items removeObject:self.mergeListButton];
+        }
+        if ([items containsObject:self.editOrderListButton]) { // 显示button
+            [items removeObject:self.editOrderListButton];
+        }
+        
+        self.toolbarView.items = items;
+       
+    } else {
+        
+        // 合并订单的权限
+        if ([Singleton sharedInstance].permissions_merge_order) { // 能够合并
+            
+            // 4 6 顺序不能换
+            if (![items containsObject:self.editOrderListButton]) { // 没显示button
+                [items insertObject:self.editOrderListButton atIndex:4];
+            }
+            
+            if (![items containsObject:self.mergeListButton]) { // 没显示button
+                [items insertObject:self.mergeListButton atIndex:6];
+            }
+            
+            self.toolbarView.items = items;
+            
+        } else { // 不能合并
+            if ([items containsObject:self.mergeListButton]) { // 显示button
+                [items removeObject:self.mergeListButton];
+            }
+            if ([items containsObject:self.editOrderListButton]) { // 显示button
+                [items removeObject:self.editOrderListButton];
+            }
+            
+            self.toolbarView.items = items;
+        }
+        
+    }
+    
     [self ReloadData];
 }
 
@@ -1852,7 +2010,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     } else { // 解锁
         if ([Singleton sharedInstance].customer_can_see_sales_Order) { // 有查看Sales order 权限
             if (self.orderTypeSegmentControl.numberOfSegments == 1) {
-                [self.orderTypeSegmentControl insertSegmentWithTitle:@"Sales Order List(Send to NPD)" atIndex:1 animated:YES];
+                [self.orderTypeSegmentControl insertSegmentWithTitle:@"Purchase Order" atIndex:1 animated:YES];
             }
         }
         

+ 89 - 73
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -953,27 +953,27 @@
                                 <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                 <prototypes>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DetailHeaderCell" rowHeight="550" id="PCZ-Ci-oQf" customClass="DetailHeaderCell">
-                                        <rect key="frame" x="0.0" y="55.5" width="768" height="550"/>
+                                        <rect key="frame" x="0.0" y="56" width="768" height="550"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PCZ-Ci-oQf" id="DiR-eY-PiR">
-                                            <frame key="frameInset" width="768" height="549.5"/>
+                                            <frame key="frameInset" width="768" height="549"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="USD 123.45" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fD8-Km-IT3">
-                                                    <frame key="frameInset" minY="19.68%" width="192" height="26" maxX="51"/>
+                                                    <frame key="frameInset" minY="19.69%" width="192" height="26" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="21"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" id="dlZ-DL-v21">
-                                                    <frame key="frameInset" minX="11.16%" minY="90.93%" width="320" height="37"/>
+                                                    <frame key="frameInset" minX="11.16%" minY="91.02%" width="320" height="37"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <color key="pageIndicatorTintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <color key="currentPageIndicatorTintColor" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </pageControl>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="FwX-9Z-HgC">
-                                                    <frame key="frameInset" minY="29.12%" width="268" height="79" maxX="51"/>
+                                                    <frame key="frameInset" minY="29.15%" width="268" height="79" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <state key="normal">
@@ -984,49 +984,49 @@
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Availability" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="81d-7O-22H">
-                                                    <frame key="frameInset" minY="50.80%" width="131" height="20" maxX="188"/>
+                                                    <frame key="frameInset" minY="50.85%" width="131" height="20" maxX="188"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Incoming stock" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fNy-qU-zpJ">
-                                                    <frame key="frameInset" minY="56.39%" width="131" height="21" maxX="188"/>
+                                                    <frame key="frameInset" minY="56.44%" width="131" height="21" maxX="188"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" restorationIdentifier="property" text="property" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v0v-80-iIZ">
-                                                    <frame key="frameInset" minY="42.49%" width="131" height="20" maxX="188"/>
+                                                    <frame key="frameInset" minY="42.53%" width="131" height="20" maxX="188"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="count" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="U9s-Ng-Fzb">
-                                                    <frame key="frameInset" minY="50.80%" width="130" height="20" maxX="51"/>
+                                                    <frame key="frameInset" minY="50.85%" width="130" height="20" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="count" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="GP5-lh-dfh">
-                                                    <frame key="frameInset" minY="56.39%" width="130" height="21" maxX="51"/>
+                                                    <frame key="frameInset" minY="56.44%" width="130" height="21" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="prop val" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="EvS-UE-8Nb">
-                                                    <frame key="frameInset" minY="42.49%" width="130" height="20" maxX="51"/>
+                                                    <frame key="frameInset" minY="42.53%" width="130" height="20" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <view contentMode="scaleToFill" restorationIdentifier="PhotoStackView" id="xCF-6W-Mpc" customClass="PhotoStackView">
-                                                    <frame key="frameInset" minX="8.37%" minY="53.87%" width="350" height="349"/>
+                                                    <frame key="frameInset" minX="8.37%" minY="54.00%" width="350" height="349"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                 </view>
                                                 <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="L3L-K2-xev">
@@ -1035,31 +1035,31 @@
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </imageView>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="selector_name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qoq-Cs-JnE">
-                                                    <frame key="frameInset" minX="70.82%" minY="28.71%" width="134" height="20"/>
+                                                    <frame key="frameInset" minX="70.82%" minY="28.73%" width="134" height="20"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="selector_val" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="h0i-f7-JHW">
-                                                    <frame key="frameInset" minX="77.82%" minY="34.18%" width="191" height="20"/>
+                                                    <frame key="frameInset" minX="77.82%" minY="34.22%" width="191" height="20"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="EY8-ki-JTY">
-                                                    <frame key="frameInset" minY="29.47%" width="70" height="71" maxX="247"/>
+                                                    <frame key="frameInset" minY="29.50%" width="70" height="71" maxX="247"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </imageView>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Quantity" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Eh5-ug-TjC">
-                                                    <frame key="frameInset" minY="74.55%" width="66" height="21" maxX="253"/>
+                                                    <frame key="frameInset" minY="74.62%" width="66" height="21" maxX="253"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="8bl-N2-vQ8" customClass="DefaultImageButton">
-                                                    <frame key="frameInset" minY="95.40%" width="123" height="39" maxX="187"/>
+                                                    <frame key="frameInset" minY="95.49%" width="123" height="39" maxX="187"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" title="Add to portfolio" backgroundImage="btn_addtoportfolio">
                                                         <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
@@ -1070,35 +1070,35 @@
                                                     </connections>
                                                 </button>
                                                 <stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minimumValue="1" maximumValue="100" id="CbC-vM-IGL">
-                                                    <frame key="frameInset" minY="74.93%" width="93" height="29" maxX="51"/>
+                                                    <frame key="frameInset" minY="75.00%" width="93" height="29" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                 </stepper>
                                                 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="1" borderStyle="roundedRect" minimumFontSize="17" id="aRf-kp-OGg">
-                                                    <frame key="frameInset" minY="74.88%" width="60" height="30" maxX="153"/>
+                                                    <frame key="frameInset" minY="74.95%" width="60" height="30" maxX="153"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                     <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
                                                 </textField>
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="select" id="tGi-MX-FEf">
-                                                    <frame key="frameInset" minY="31.40%" width="25" height="24" maxX="56"/>
+                                                    <frame key="frameInset" minY="31.43%" width="25" height="24" maxX="56"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                 </imageView>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ETA" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Usu-57-rC5">
-                                                    <frame key="frameInset" minY="61.87%" width="30" height="21" maxX="289"/>
+                                                    <frame key="frameInset" minY="61.93%" width="30" height="21" maxX="289"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Ydc-b8-vOC">
-                                                    <frame key="frameInset" minY="61.87%" width="130" height="21" maxX="51"/>
+                                                    <frame key="frameInset" minY="61.93%" width="130" height="21" maxX="51"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Model QTY in Cart" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="g3j-Vx-s9x">
-                                                    <frame key="frameInset" minY="67.36%" width="263" height="21" maxX="56"/>
+                                                    <frame key="frameInset" minY="67.42%" width="263" height="21" maxX="56"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -1112,19 +1112,19 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <view contentMode="scaleToFill" id="HE5-zj-CRh" userLabel="Description RTLabel" customClass="RTLabel">
-                                                    <frame key="frameInset" minX="4.56%" minY="7.89%" width="90.76%" height="55"/>
+                                                    <frame key="frameInset" minX="4.56%" minY="7.90%" width="90.76%" height="55"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </view>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Price:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tuB-FV-n4t">
-                                                    <frame key="frameInset" minY="19.68%" width="74" height="26" maxX="245"/>
+                                                    <frame key="frameInset" minY="19.69%" width="74" height="26" maxX="245"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="21"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="AHJ-EJ-V5A" customClass="DefaultImageButton">
-                                                    <frame key="frameInset" minY="95.40%" width="124" height="39" maxX="54"/>
+                                                    <frame key="frameInset" minY="95.49%" width="124" height="39" maxX="54"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <state key="normal" title="Add to wish list" backgroundImage="btn_addtowish">
@@ -1141,7 +1141,7 @@
                                                     </connections>
                                                 </button>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="P9c-rP-A3n" customClass="DefaultImageButton">
-                                                    <frame key="frameInset" minY="86.19%" width="124" height="39" maxX="121"/>
+                                                    <frame key="frameInset" minY="86.28%" width="124" height="39" maxX="121"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="22"/>
                                                     <state key="normal" title="Add to cart" backgroundImage="btn_addtocart_large">
@@ -1153,14 +1153,14 @@
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uvh-e3-ZNr">
-                                                    <frame key="frameInset" minY="29.89%" width="147" height="61" maxX="88"/>
+                                                    <frame key="frameInset" minY="29.92%" width="147" height="61" maxX="88"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="k7m-sd-nvE">
-                                                    <frame key="frameInset" minY="94.86%" width="124" height="34" maxX="186"/>
+                                                    <frame key="frameInset" minY="94.95%" width="124" height="34" maxX="186"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" title="Notify Me">
                                                         <color key="titleColor" red="0.60000002379999995" green="0.40000000600000002" blue="0.20000000300000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -1271,12 +1271,12 @@
                                         <rect key="frame" x="0.0" y="1205.5" width="768" height="600"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gSx-f2-mrB" id="k28-H7-ddZ">
-                                            <frame key="frameInset" width="768" height="600"/>
+                                            <frame key="frameInset" width="768" height="599"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                         </tableViewCellContentView>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DetailInfoCell" rowHeight="44" id="hYM-aE-rjR" customClass="DetailKVCell">
-                                        <rect key="frame" x="0.0" y="1805.5" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="1806" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hYM-aE-rjR" id="o59-aa-UU2">
                                             <frame key="frameInset" width="768" height="43"/>
@@ -2522,6 +2522,35 @@
                                 </subviews>
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </view>
+                            <toolbar hidden="YES" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="GnW-hP-0qy">
+                                <frame key="frameInset" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                                <items>
+                                    <barButtonItem title="Select All" id="Qyh-x9-Q29">
+                                        <connections>
+                                            <action selector="OnEditSelectClick:" destination="Cwo-Rn-ZMW" id="3D3-qA-vse"/>
+                                        </connections>
+                                    </barButtonItem>
+                                    <barButtonItem width="42" style="plain" systemItem="fixedSpace" id="66X-eV-fRj"/>
+                                    <barButtonItem title="Move To Wish List" id="Lpc-ux-UXx">
+                                        <connections>
+                                            <action selector="onEditAddWishClick:" destination="Cwo-Rn-ZMW" id="eVr-uf-YyO"/>
+                                        </connections>
+                                    </barButtonItem>
+                                    <barButtonItem width="42" style="plain" systemItem="fixedSpace" id="ihh-tY-5qv"/>
+                                    <barButtonItem title="Delete" id="SsF-JY-rqj">
+                                        <connections>
+                                            <action selector="onEditDelClick:" destination="Cwo-Rn-ZMW" id="tm8-L9-kFI"/>
+                                        </connections>
+                                    </barButtonItem>
+                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="Glm-CT-fPy"/>
+                                    <barButtonItem title="End Edit" id="Wir-x4-EFU">
+                                        <connections>
+                                            <action selector="onEndEditClick:" destination="Cwo-Rn-ZMW" id="vSi-ae-lDw"/>
+                                        </connections>
+                                    </barButtonItem>
+                                </items>
+                            </toolbar>
                             <view contentMode="scaleToFill" id="NPc-ws-YtX">
                                 <frame key="frameInset" height="124"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
@@ -2580,8 +2609,8 @@
                                             <action selector="onPlaceOrder:" destination="Cwo-Rn-ZMW" eventType="touchUpInside" id="oox-kf-LJE"/>
                                         </connections>
                                     </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="HXI-1Z-Yo5" customClass="DefaultImageButton">
-                                        <frame key="frameInset" minY="83" width="30" height="30" maxX="188"/>
+                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="HXI-1Z-Yo5" customClass="DefaultImageButton">
+                                        <frame key="frameInset" minY="83" width="30" height="30" maxX="168"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                         <state key="normal" title="Cancel Order" backgroundImage="btn_cancelorder">
                                             <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
@@ -2674,45 +2703,24 @@
                                         </connections>
                                     </button>
                                     <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="1k1-dx-91p">
-                                        <frame key="frameInset" minY="83" width="46" height="30" maxX="257"/>
+                                        <frame key="frameInset" minY="83" width="46" height="30" maxX="217"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                         <state key="normal" title="Email"/>
                                         <connections>
                                             <action selector="emailButtonClick:" destination="Cwo-Rn-ZMW" eventType="touchUpInside" id="LPb-ex-p8b"/>
                                         </connections>
                                     </button>
+                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="xdj-ay-aU1">
+                                        <frame key="frameInset" minY="83" width="46" height="30" maxX="276"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                        <state key="normal" title="Print"/>
+                                        <connections>
+                                            <action selector="printCartButtonClick:" destination="Cwo-Rn-ZMW" eventType="touchUpInside" id="dRI-Id-WiZ"/>
+                                        </connections>
+                                    </button>
                                 </subviews>
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </view>
-                            <toolbar hidden="YES" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="GnW-hP-0qy">
-                                <frame key="frameInset" height="44"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
-                                <items>
-                                    <barButtonItem title="Select All" id="Qyh-x9-Q29">
-                                        <connections>
-                                            <action selector="OnEditSelectClick:" destination="Cwo-Rn-ZMW" id="3D3-qA-vse"/>
-                                        </connections>
-                                    </barButtonItem>
-                                    <barButtonItem width="42" style="plain" systemItem="fixedSpace" id="66X-eV-fRj"/>
-                                    <barButtonItem title="Move To Wish List" id="Lpc-ux-UXx">
-                                        <connections>
-                                            <action selector="onEditAddWishClick:" destination="Cwo-Rn-ZMW" id="eVr-uf-YyO"/>
-                                        </connections>
-                                    </barButtonItem>
-                                    <barButtonItem width="42" style="plain" systemItem="fixedSpace" id="ihh-tY-5qv"/>
-                                    <barButtonItem title="Delete" id="SsF-JY-rqj">
-                                        <connections>
-                                            <action selector="onEditDelClick:" destination="Cwo-Rn-ZMW" id="tm8-L9-kFI"/>
-                                        </connections>
-                                    </barButtonItem>
-                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="Glm-CT-fPy"/>
-                                    <barButtonItem title="End Edit" id="Wir-x4-EFU">
-                                        <connections>
-                                            <action selector="onEndEditClick:" destination="Cwo-Rn-ZMW" id="vSi-ae-lDw"/>
-                                        </connections>
-                                    </barButtonItem>
-                                </items>
-                            </toolbar>
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
@@ -2734,6 +2742,7 @@
                         <outlet property="label_weight" destination="5XQ-b9-pCs" id="T2j-4T-MeJ"/>
                         <outlet property="mum" destination="636-3h-qpT" id="oVo-Z4-hgK"/>
                         <outlet property="placeOrderButton" destination="jew-M1-our" id="sFD-dz-VUB"/>
+                        <outlet property="printButton" destination="xdj-ay-aU1" id="GEW-Tj-veM"/>
                         <outlet property="toolbar" destination="GnW-hP-0qy" id="etW-tE-Wxa"/>
                         <outlet property="toolpanel" destination="NPc-ws-YtX" id="2pQ-ZI-TEp"/>
                     </connections>
@@ -3005,7 +3014,7 @@
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="i9Q-TF-bBL"/>
                                     <barButtonItem style="plain" id="dZA-gs-cR2">
                                         <searchBar key="customView" contentMode="redraw" searchBarStyle="minimal" placeholder="Sale order number, sales rep, create by, contact" id="afv-fP-PRn">
-                                            <rect key="frame" x="215" y="0.0" width="364" height="44"/>
+                                            <rect key="frame" x="191" y="0.0" width="364" height="44"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                             <textInputTraits key="textInputTraits"/>
                                             <connections>
@@ -3014,13 +3023,19 @@
                                         </searchBar>
                                     </barButtonItem>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="VhY-Il-XfG"/>
+                                    <barButtonItem title="Select" id="Q7S-7Q-MQM">
+                                        <connections>
+                                            <action selector="editOrderListButtonClick:" destination="Jst-hh-WTF" id="12x-HB-TA6"/>
+                                        </connections>
+                                    </barButtonItem>
+                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="kuR-14-mMo"/>
                                     <barButtonItem image="trans" id="1xy-6z-T44">
                                         <color key="tintColor" red="0.60000002379999995" green="0.40000000600000002" blue="0.20000000300000001" alpha="1" colorSpace="calibratedRGB"/>
                                         <connections>
                                             <action selector="mergeListButtonClick:" destination="Jst-hh-WTF" id="AJ1-4H-oBD"/>
                                         </connections>
                                     </barButtonItem>
-                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="kuR-14-mMo"/>
+                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="dTA-d3-CTE"/>
                                     <barButtonItem image="neworder" id="wye-VI-b4W">
                                         <color key="tintColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <connections>
@@ -3039,7 +3054,7 @@
                                         <rect key="frame" x="0.0" y="22" width="768" height="66"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="H8t-DU-AtW" id="q6R-9a-SsD">
-                                            <frame key="frameInset" width="768" height="66"/>
+                                            <frame key="frameInset" width="768" height="65"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="WEB1509140024" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fu3-Bf-ZH2" userLabel="So#">
@@ -3050,14 +3065,14 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345678.00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="N3e-hc-gFF" userLabel="price">
-                                                    <frame key="frameInset" minY="23" width="100" maxX="176" maxY="22"/>
+                                                    <frame key="frameInset" minY="23" width="100" maxX="176" maxY="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" heightSizable="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="02/02/2015 10:10:10" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qf1-u6-uMA" userLabel="date">
-                                                    <frame key="frameInset" minY="11" width="148" maxX="15" maxY="12"/>
+                                                    <frame key="frameInset" minY="11" width="148" maxX="15" maxY="11"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" heightSizable="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -3078,7 +3093,7 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99999" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kLZ-2K-sGp">
-                                                    <frame key="frameInset" minY="5" width="100" maxX="176" maxY="40"/>
+                                                    <frame key="frameInset" minY="5" width="100" maxX="176" maxY="39"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" heightSizable="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -3147,8 +3162,8 @@
                                 <frame key="frameInset" minY="66" height="29"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES"/>
                                 <segments>
-                                    <segment title="Shop Order List(Created for customer)"/>
-                                    <segment title="Sales Order List(Send to NPD)"/>
+                                    <segment title="Store Order"/>
+                                    <segment title="Purchase Order"/>
                                 </segments>
                                 <connections>
                                     <action selector="orderTypeChanged:" destination="Jst-hh-WTF" eventType="valueChanged" id="cmC-na-IVt"/>
@@ -3168,6 +3183,7 @@
                     <connections>
                         <outlet property="btnStatusFilter" destination="WKH-18-Hk1" id="cc8-kJ-brm"/>
                         <outlet property="btn_newOrder" destination="wye-VI-b4W" id="kUg-HU-O7w"/>
+                        <outlet property="editOrderListButton" destination="Q7S-7Q-MQM" id="A9X-mI-Lid"/>
                         <outlet property="label_filter" destination="yE9-Jb-XL3" id="uXH-zJ-zVW"/>
                         <outlet property="label_net_err" destination="Uyh-tU-Vl5" id="WWd-x3-f1A"/>
                         <outlet property="mergeListButton" destination="1xy-6z-T44" id="a5e-Xz-XaI"/>
@@ -6420,11 +6436,11 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="22" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Vyi-Ez-P2a" id="LVn-pY-YDc">
-                                            <frame key="frameInset" width="768" height="44"/>
+                                            <frame key="frameInset" width="768" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <view contentMode="scaleToFill" id="N1s-I8-bJv" customClass="RTLabel">
-                                                    <frame key="frameInset" minX="15" minY="8" maxX="59" maxY="8"/>
+                                                    <frame key="frameInset" minX="15" minY="8" maxX="59" maxY="7"/>
                                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </view>

+ 3 - 3
RedAnt ERP Mobile/iSales-NPD/CUL.storyboard

@@ -39,7 +39,7 @@
                             </button>
                             <button opaque="NO" contentMode="left" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mw1-Vv-KOj">
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <state key="normal" title="Set Calculate Price">
+                                <state key="normal" title="Set Store Price">
                                     <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                 </state>
                                 <connections>
@@ -106,10 +106,10 @@
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CategoryPriceCell" rowHeight="47" id="rnb-EK-8yY" customClass="CategoryPriceCell">
-                                        <rect key="frame" x="0.0" y="28" width="768" height="47"/>
+                                        <rect key="frame" x="0.0" y="28" width="1000" height="47"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rnb-EK-8yY" id="WGZ-Bw-E4C">
-                                            <frame key="frameInset" width="768" height="46.5"/>
+                                            <frame key="frameInset" width="1000" height="46.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Dinning" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3fh-vo-1qn">

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

@@ -15,7 +15,7 @@
 
 //#define ab_lager @"Delivery price"
 #define flat_price @"MSRP"
-#define given_price @"Calculated price"
+#define given_price @"store price"
 
 #import "Singleton.h"