Procházet zdrojové kódy

161104
Change:
Change submit order check price dialog

Ray Zhang před 9 roky
rodič
revize
c17125caf6

binární
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 63 - 0
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1315,5 +1315,68 @@
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
       </BreakpointProxy>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/order/CreateOrderViewController.m"
+            timestampString = "499932820.54307"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "155"
+            endingLineNumber = "155"
+            landmarkName = "-onCommitOrderClick:"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__48-[CreateOrderViewController onCommitOrderClick:]_block_invoke"
+                  moduleName = "NPD Mobile"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///ios_workspace/RedAnt%20ERP%20Mobile/common/Functions/order/CreateOrderViewController.m"
+                  timestampString = "499932320.548367"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "142"
+                  endingLineNumber = "142"
+                  offsetFromSymbolStart = "124">
+               </Location>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__copy_helper_block_"
+                  moduleName = "NPD Mobile"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///ios_workspace/RedAnt%20ERP%20Mobile/common/Functions/order/CreateOrderViewController.m"
+                  timestampString = "499932320.550038"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "142"
+                  endingLineNumber = "142"
+                  offsetFromSymbolStart = "51">
+               </Location>
+               <Location
+                  shouldBeEnabled = "No"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__destroy_helper_block_"
+                  moduleName = "NPD Mobile"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///ios_workspace/RedAnt%20ERP%20Mobile/common/Functions/order/CreateOrderViewController.m"
+                  timestampString = "499932320.551606"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "142"
+                  endingLineNumber = "142"
+                  offsetFromSymbolStart = "39">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
    </Breakpoints>
 </Bucket>
 </Bucket>

+ 15 - 1
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -10,6 +10,8 @@
 #import "iSalesNetwork.h"
 #import "iSalesNetwork.h"
 #import "MainViewController.h"
 #import "MainViewController.h"
 #import "Singleton.h"
 #import "Singleton.h"
+#import "config.h"
+
 #define SUBMIT_CONFIRM 123
 #define SUBMIT_CONFIRM 123
 #define KEEP_TAIL 456
 #define KEEP_TAIL 456
 #define CLOSE_ACTION 567
 #define CLOSE_ACTION 567
@@ -132,8 +134,20 @@
          */
          */
         NSInteger priceType = [Singleton sharedInstance].npd_shop_price_type;
         NSInteger priceType = [Singleton sharedInstance].npd_shop_price_type;
         if (priceType != 0) {
         if (priceType != 0) {
+
+            NSString* pricename = nil;
+            switch (priceType) {
+                case 1:
+                    pricename=flat_price;
+                    break;
+                case 2:
+                    pricename=given_price;
+                    break;
+                default:
+                    break;
+            }
             
             
-            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"Please Check Your Price Type,Sure It's Delivery Price" preferredStyle:UIAlertControllerStyleAlert];
+            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:[NSString stringWithFormat:@"Current price is %@, please change to %@ and try again.",pricename,ab_lager] preferredStyle:UIAlertControllerStyleAlert];
             
             
             UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                 
                 

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/CategoryPriceCell.m

@@ -8,7 +8,7 @@
 
 
 #import "CategoryPriceCell.h"
 #import "CategoryPriceCell.h"
 #import "SetCategoryPriceController.h"
 #import "SetCategoryPriceController.h"
-
+#import "config.h"
 @interface CategoryPriceCell ()
 @interface CategoryPriceCell ()
 
 
 @property (strong, nonatomic) IBOutlet UILabel *categoryLabel;
 @property (strong, nonatomic) IBOutlet UILabel *categoryLabel;

+ 1 - 3
RedAnt ERP Mobile/iSales-NPD/SetCategoryPriceController.h

@@ -8,9 +8,7 @@
 
 
 #import <UIKit/UIKit.h>
 #import <UIKit/UIKit.h>
 
 
-#define ab_lager @"Delivery price"
-#define flat_price @"Unified selling price"
-#define given_price @"Calculated price"
+
 
 
 typedef void (^setCategoryPriceReturnBlock) (NSDictionary *categoryPrice);
 typedef void (^setCategoryPriceReturnBlock) (NSDictionary *categoryPrice);
 
 

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

@@ -13,7 +13,9 @@
 #define test_server
 #define test_server
 #define exception_switch 1
 #define exception_switch 1
 
 
-
+#define ab_lager @"Delivery price"
+#define flat_price @"Unified selling price"
+#define given_price @"Calculated price"
 
 
 #define PDF_DEBUG false
 #define PDF_DEBUG false