|
@@ -1093,6 +1093,15 @@
|
|
|
[self.navigationController popViewControllerAnimated:true];
|
|
[self.navigationController popViewControllerAnimated:true];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
|
|
+
|
|
|
|
|
+ if ([Singleton sharedInstance].customer_order_type == 0) {
|
|
|
|
|
+ [self releaseOrderAfterSave];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// if ([[upparams valueForKey:@"close_on_save"] boolValue]) {
|
|
// if ([[upparams valueForKey:@"close_on_save"] boolValue]) {
|
|
|
// appDelegate.order_code = nil;
|
|
// appDelegate.order_code = nil;
|
|
@@ -2298,4 +2307,23 @@
|
|
|
// return pricename;
|
|
// return pricename;
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
|
|
+- (void)releaseOrderAfterSave {
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+
|
|
|
|
|
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
+ [iSalesNetwork release_Order:appDelegate.order_code];
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [appDelegate closeOrder];
|
|
|
|
|
+ [appDelegate SetSo:nil];
|
|
|
|
|
+ appDelegate.cart_count=0;
|
|
|
|
|
+ [appDelegate update_count_mark];
|
|
|
|
|
+ [((MainViewController*)appDelegate.main_vc) switchToHome];
|
|
|
|
|
+
|
|
|
|
|
+ [self prepareReturn:nil];
|
|
|
|
|
+ [self.navigationController popToRootViewControllerAnimated:false];
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
@end
|
|
@end
|