|
@@ -1015,10 +1015,7 @@
|
|
|
ScannerViewController * scannerVC =[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ScannerViewController"];
|
|
ScannerViewController * scannerVC =[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ScannerViewController"];
|
|
|
|
|
|
|
|
|
|
|
|
|
-// LoginViewController * loginvc =[[UIStoryboard storyboardWithName:@"SO" bundle:nil] instantiateViewControllerWithIdentifier:@"LoginViewController"];
|
|
|
|
|
-// ScanOrderScanModelViewController *scanresult = [[UIStoryboard storyboardWithName:@"SO" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderScanModelViewController"];
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ScanOrderModelListViewController* scanresult = [[UIStoryboard storyboardWithName:@"SO" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderModelListViewController"];
|
|
ScanOrderModelListViewController* scanresult = [[UIStoryboard storyboardWithName:@"SO" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderModelListViewController"];
|
|
|
scannerVC.resultvc = scanresult;
|
|
scannerVC.resultvc = scanresult;
|
|
|
[self.navigationController pushViewController:scannerVC animated:true];
|
|
[self.navigationController pushViewController:scannerVC animated:true];
|
|
@@ -1052,52 +1049,6 @@
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
-// if([self.current_VC isKindOfClass:[OrderListViewController class]])
|
|
|
|
|
-// return;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-// UIApplication * app = [UIApplication sharedApplication];
|
|
|
|
|
-// AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
-// if(appDelegate.bLogin==false)
|
|
|
|
|
-// {
|
|
|
|
|
-// LoginViewController * loginvc =[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"LoginViewController"];
|
|
|
|
|
-// // loginvc.delegate = self;
|
|
|
|
|
-// // loginvc.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
|
|
|
|
|
-//
|
|
|
|
|
-// loginvc.returnValue = ^(bool blogin){
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// if(blogin)
|
|
|
|
|
-// {
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [self flipFromViewController:self.current_VC toViewController:self.watchListViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//
|
|
|
|
|
-// UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:loginvc] ;
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// // [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
|
|
|
-//
|
|
|
|
|
-// navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
|
|
|
|
|
-// [self presentViewController:navi animated:YES completion:^{
|
|
|
|
|
-//
|
|
|
|
|
-// // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
|
|
|
|
|
-//
|
|
|
|
|
-// DebugLog(@"LoginViewController present.........");
|
|
|
|
|
-//
|
|
|
|
|
-// // self.btop = false;
|
|
|
|
|
-// // <#code#>
|
|
|
|
|
-// }];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
[self flipFromViewController:self.current_VC toViewController:self.scanHistoryViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
[self flipFromViewController:self.current_VC toViewController:self.scanHistoryViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1386,7 +1337,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
// [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
|
|
|
|
|
@@ -1836,394 +1787,7 @@
|
|
|
return;
|
|
return;
|
|
|
[self clearSelected];
|
|
[self clearSelected];
|
|
|
self.btncart.selected = true;
|
|
self.btncart.selected = true;
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// UIApplication * app = [UIApplication sharedApplication];
|
|
|
|
|
-// AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
-// // MainViewController* main_vc=(MainViewController*)appDelegate.main_vc;
|
|
|
|
|
-// if(appDelegate.bLogin==false&& !RASingleton.sharedInstance.enable_OfflineOrder)
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// LoginViewController * loginvc =[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"LoginViewController"];
|
|
|
|
|
-// // loginvc.delegate = self;
|
|
|
|
|
-// // loginvc.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
|
|
|
|
|
-//
|
|
|
|
|
-// loginvc.returnValue = ^(bool blogin){
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// // UIApplication * app = [UIApplication sharedApplication];
|
|
|
|
|
-// // AppDelegate *appDelegate = (AppDelegate *)[app delegate];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// if(blogin)
|
|
|
|
|
-// {
|
|
|
|
|
-// if(/*appDelegate.user_type==USER_ROLE_EMPLOYEE*/true)
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:false];
|
|
|
|
|
-// if(appDelegate.can_create_order)
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// NSString* msg =@"";
|
|
|
|
|
-// if(appDelegate.contact_id.length>0)
|
|
|
|
|
-// {
|
|
|
|
|
-// msg = [msg stringByAppendingString:@"\n\nCustomer:"];
|
|
|
|
|
-// msg = [msg stringByAppendingString:appDelegate.customerInfo[@"customer_name"]];
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Switch To Cart" message:msg preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertAction *action_1 = [UIAlertAction actionWithTitle:@"Check for saved order" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-// //open exist
|
|
|
|
|
-//
|
|
|
|
|
-// ScanOrderListViewController* ovc =[ [UIStoryboard storyboardWithName:@"ERP_Mobile_Order" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderListViewController"];
|
|
|
|
|
-// ovc.showNavibar = true;
|
|
|
|
|
-// ovc.selectOrder = ^(NSMutableDictionary* order_detail){
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// {
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// self.previous_VC = self.current_VC;
|
|
|
|
|
-// [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//// ovc.init_style = OL_OPEN;
|
|
|
|
|
-// ovc.onCancel = ^(){
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-// ovc.title = @"SAVED ORDER";
|
|
|
|
|
-// [self.navigationController pushViewController:ovc animated:true];
|
|
|
|
|
-// }];
|
|
|
|
|
-// UIAlertAction *action_2 = [UIAlertAction actionWithTitle:@"Create new order" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-// //create new;
|
|
|
|
|
-//
|
|
|
|
|
-// if(appDelegate.customerInfo==nil)// select contact if current contact not exist
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// cvc.contact_type = @"Sales_Order_Customer";
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
-//
|
|
|
|
|
-// appDelegate.contact_id=[value valueForKey:@"customer_cid"];
|
|
|
|
|
-// appDelegate.customerInfo = value;
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//
|
|
|
|
|
-// cvc.onCancel = ^(){
|
|
|
|
|
-//
|
|
|
|
|
-// [RAUtils message_box:@"" message:@"Cannot create order without customer infomation." completion:nil];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-// cvc.onReset = ^(){
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-// };
|
|
|
|
|
-//
|
|
|
|
|
-// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// }];
|
|
|
|
|
-// UIAlertAction *action_3 = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// }];
|
|
|
|
|
-//
|
|
|
|
|
-// [alertController addAction:action_1];
|
|
|
|
|
-// [alertController addAction:action_2];
|
|
|
|
|
-// [alertController addAction:action_3];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [self presentViewController:alertController animated:YES completion:nil];
|
|
|
|
|
-//// UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Switch To Cart", nil) message:msg delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"Check for saved order", nil),NSLocalizedString(@"Create new order", nil), nil];
|
|
|
|
|
-////
|
|
|
|
|
-////
|
|
|
|
|
-////
|
|
|
|
|
-//// // alert.
|
|
|
|
|
-//// [alert show];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Switch To Cart" message:@"Do you want to switch to a pending order?" preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertAction *action_2 = [UIAlertAction actionWithTitle:@"Check for saved order" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-// //open exist
|
|
|
|
|
-//
|
|
|
|
|
-// ScanOrderListViewController* ovc =[ [UIStoryboard storyboardWithName:@"ERP_Mobile_Order" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderListViewController"];
|
|
|
|
|
-// ovc.showNavibar = true;
|
|
|
|
|
-// ovc.selectOrder = ^(NSMutableDictionary* order_detail){
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// {
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// self.previous_VC = self.current_VC;
|
|
|
|
|
-// [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//// ovc.init_style = OL_OPEN;
|
|
|
|
|
-// ovc.onCancel = ^(){
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-// ovc.title = @"SAVED ORDER";
|
|
|
|
|
-// [self.navigationController pushViewController:ovc animated:true];
|
|
|
|
|
-// }];
|
|
|
|
|
-// UIAlertAction *action_3 = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// }];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [alertController addAction:action_2];
|
|
|
|
|
-// [alertController addAction:action_3];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [self presentViewController:alertController animated:YES completion:nil];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//// UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Switch To Cart", nil) message:NSLocalizedString(@"Do you want to switch to a pending order?", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"Check for saved order", nil), nil];
|
|
|
|
|
-////
|
|
|
|
|
-//// // alert.
|
|
|
|
|
-//// [alert show];
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-//// else
|
|
|
|
|
-//// {
|
|
|
|
|
-//// [self checklogin:true];
|
|
|
|
|
-//// self.previous_VC = self.current_VC;
|
|
|
|
|
-//// [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-//// }
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// // self.offset = 0;
|
|
|
|
|
-// // [self.content_data removeAllObjects];
|
|
|
|
|
-// // [self loadpage];
|
|
|
|
|
-// //
|
|
|
|
|
-// // [[self navigationController] setNavigationBarHidden:YES animated:NO];
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//
|
|
|
|
|
-// UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:loginvc] ;
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// // [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
|
|
|
-//
|
|
|
|
|
-// navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
|
|
|
|
|
-// [self presentViewController:navi animated:YES completion:^{
|
|
|
|
|
-//
|
|
|
|
|
-// // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
|
|
|
|
|
-//
|
|
|
|
|
-// DebugLog(@"LoginViewController present.........");
|
|
|
|
|
-//
|
|
|
|
|
-// // self.btop = false;
|
|
|
|
|
-// // <#code#>
|
|
|
|
|
-// }];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-//// if(/*appDelegate.user_type==USER_ROLE_EMPLOYEE&&/*appDelegate.contact_id==nil&&*/appDelegate.order_code==nil)
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// {
|
|
|
|
|
-//// [self checklogin:false];
|
|
|
|
|
-// if(appDelegate.can_create_order)
|
|
|
|
|
-// {
|
|
|
|
|
-// NSString* msg =@"";
|
|
|
|
|
-// if(appDelegate.contact_id.length>0)
|
|
|
|
|
-// {
|
|
|
|
|
-// msg = [msg stringByAppendingString:@"\n\nCustomer:"];
|
|
|
|
|
-// msg = [msg stringByAppendingString:appDelegate.customerInfo[@"customer_name"]];
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Switch To Cart" message:msg preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertAction *action_1 = [UIAlertAction actionWithTitle:@"Check for saved order" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-// //open exist
|
|
|
|
|
-//
|
|
|
|
|
-// ScanOrderListViewController* ovc =[ [UIStoryboard storyboardWithName:@"ERP_Mobile_Order" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderListViewController"];
|
|
|
|
|
-// ovc.showNavibar = true;
|
|
|
|
|
-// ovc.selectOrder = ^(NSMutableDictionary* order_detail){
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// {
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// self.previous_VC = self.current_VC;
|
|
|
|
|
-// [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//// ovc.init_style = OL_OPEN;
|
|
|
|
|
-// ovc.onCancel = ^(){
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-// ovc.title = @"SAVED ORDER";
|
|
|
|
|
-// [self.navigationController pushViewController:ovc animated:true];
|
|
|
|
|
-// }];
|
|
|
|
|
-// UIAlertAction *action_2 = [UIAlertAction actionWithTitle:@"Create new order" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-// //create new;
|
|
|
|
|
-//
|
|
|
|
|
-// if(appDelegate.customerInfo==nil)// select contact if current contact not exist
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// cvc.contact_type = @"Sales_Order_Customer";
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
-//
|
|
|
|
|
-// appDelegate.contact_id=[value valueForKey:@"customer_cid"];
|
|
|
|
|
-// appDelegate.customerInfo = value;
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//
|
|
|
|
|
-// cvc.onCancel = ^(){
|
|
|
|
|
-//
|
|
|
|
|
-// [RAUtils message_box:@"" message:@"Cannot create order without customer infomation." completion:nil];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-// cvc.onReset = ^(){
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-// };
|
|
|
|
|
-//
|
|
|
|
|
-// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// }];
|
|
|
|
|
-// UIAlertAction *action_3 = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// }];
|
|
|
|
|
-//
|
|
|
|
|
-// [alertController addAction:action_1];
|
|
|
|
|
-// [alertController addAction:action_2];
|
|
|
|
|
-// [alertController addAction:action_3];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [self presentViewController:alertController animated:YES completion:nil];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//// UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Switch to cart", nil) message:msg delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"Check for saved order", nil),NSLocalizedString(@"Create new order", nil), nil];
|
|
|
|
|
-////
|
|
|
|
|
-//// // alert.
|
|
|
|
|
-//// [alert show];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Switch To Cart" message:@"Do you want to switch to a pending order?" preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// UIAlertAction *action_2 = [UIAlertAction actionWithTitle:@"Switch to pending order" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-// //open exist
|
|
|
|
|
-//
|
|
|
|
|
-// ScanOrderListViewController* ovc =[ [UIStoryboard storyboardWithName:@"ERP_Mobile_Order" bundle:nil] instantiateViewControllerWithIdentifier:@"ScanOrderListViewController"];
|
|
|
|
|
-// ovc.showNavibar = true;
|
|
|
|
|
-// ovc.selectOrder = ^(NSMutableDictionary* order_detail){
|
|
|
|
|
-// if(appDelegate.order_code==nil)
|
|
|
|
|
-// {
|
|
|
|
|
-// [self neworderforCart];
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// self.previous_VC = self.current_VC;
|
|
|
|
|
-// [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-//// ovc.init_style = OL_OPEN;
|
|
|
|
|
-// ovc.onCancel = ^(){
|
|
|
|
|
-//
|
|
|
|
|
-// [self checklogin:true];
|
|
|
|
|
-//
|
|
|
|
|
-// };
|
|
|
|
|
-// ovc.title = @"SAVED ORDER";
|
|
|
|
|
-// [self.navigationController pushViewController:ovc animated:true];
|
|
|
|
|
-// }];
|
|
|
|
|
-// UIAlertAction *action_3 = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// }];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [alertController addAction:action_2];
|
|
|
|
|
-// [alertController addAction:action_3];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// [self presentViewController:alertController animated:YES completion:nil];
|
|
|
|
|
-//
|
|
|
|
|
-//// UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Switch to cart", nil) message:NSLocalizedString(@"Do you want to Switch to a pending order?", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"Switch to pending order", nil), nil];
|
|
|
|
|
-////
|
|
|
|
|
-//// // alert.
|
|
|
|
|
-//// [alert show];
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// self.previous_VC = self.current_VC;
|
|
|
|
|
-// [self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
|
|
+
|
|
|
self.previous_VC = self.current_VC;
|
|
self.previous_VC = self.current_VC;
|
|
|
[self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
[self flipFromViewController:self.current_VC toViewController:self.cartViewController withDirection:UIViewAnimationOptionTransitionCrossDissolve];
|
|
|
|
|
|
|
@@ -2962,7 +2526,7 @@
|
|
|
UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:offlineVC] ;
|
|
UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:offlineVC] ;
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ navi.modalInPresentation=true;
|
|
|
|
|
|
|
|
|
|
|
|
|
// [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|
|
// [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
|