|
|
@@ -1767,11 +1767,15 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:
|
|
|
|
|
|
}
|
|
|
|
|
|
-- (IBAction)orderTypeChanged:(UISegmentedControl *)sender {
|
|
|
-
|
|
|
- self.orderType = sender.selectedSegmentIndex;
|
|
|
- [Singleton sharedInstance].customer_order_type = self.orderType;
|
|
|
+- (void)changeOrderType:(NSInteger)ordertype {
|
|
|
+ self.orderType = ordertype;
|
|
|
+ [Singleton sharedInstance].customer_order_type = ordertype;
|
|
|
[self ReloadData];
|
|
|
+}
|
|
|
+
|
|
|
+- (IBAction)orderTypeChanged:(UISegmentedControl *)sender {
|
|
|
+
|
|
|
+ [self changeOrderType:sender.selectedSegmentIndex];
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1783,6 +1787,11 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:
|
|
|
|
|
|
- (void)lockOrderListNotification:(NSNotification *)notification {
|
|
|
if ([notification.name isEqual:Lock_Permission_Notification]) {
|
|
|
+ if (self.orderType == 1) {
|
|
|
+ self.orderTypeSegmentControl.selectedSegmentIndex = 0;
|
|
|
+ [self changeOrderType:0];
|
|
|
+ }
|
|
|
+
|
|
|
[self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
|
|
|
} else {
|
|
|
[self.orderTypeSegmentControl insertSegmentWithTitle:@"Sales Order" atIndex:1 animated:YES];
|