Преглед изворни кода

1.修改NPD Customer不能提交订单。

Pen Li пре 8 година
родитељ
комит
25c2e67f95

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

@@ -321,7 +321,7 @@
     
     if (!self.isResume) {
         // 正常情况
-        if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
+        if (appDelegate.user_type == USER_ROLE_CUSTOMER && appDelegate.customer_type == CustomerTypeStore) {
             // customer的订单必须是Sales Order并且有提交权限才能提交
             if ([Singleton sharedInstance].currentOrderIsMerged && [Singleton sharedInstance].permissions_submit_order) {
                 
@@ -334,7 +334,7 @@
         
     } else {
         // 恢复
-        if (self.userType == USER_ROLE_CUSTOMER) {
+        if (self.userType == USER_ROLE_CUSTOMER && appDelegate.customer_type == CustomerTypeStore) {
             // customer的订单必须是Sales Order并且有提交权限才能提交
             if (canSubmit) {
                 [items addObject:self.btnSubmitOrder];

+ 2 - 2
RedAnt ERP Mobile/common/Functions/order/RAOrderPreviewController.m

@@ -320,7 +320,7 @@
     
     if (!self.isResume) {
         // 正常情况
-        if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
+        if (appDelegate.user_type == USER_ROLE_CUSTOMER && appDelegate.customer_type == CustomerTypeStore) {
             // customer的订单必须是Sales Order并且有提交权限才能提交
             if ([Singleton sharedInstance].currentOrderIsMerged && [Singleton sharedInstance].permissions_submit_order) {
                 
@@ -333,7 +333,7 @@
         
     } else {
         // 恢复
-        if (self.userType == USER_ROLE_CUSTOMER) {
+        if (self.userType == USER_ROLE_CUSTOMER && appDelegate.customer_type == CustomerTypeStore) {
             // customer的订单必须是Sales Order并且有提交权限才能提交
             if (canSubmit) {
                 [items addObject:self.btnSubmitOrder];