rabin 3 rokov pred
rodič
commit
74544e3153
1 zmenil súbory, kde vykonal 15 pridanie a 5 odobranie
  1. 15 5
      service/agent/lib/Agreement.php

+ 15 - 5
service/agent/lib/Agreement.php

@@ -1179,27 +1179,37 @@ class Agreement
 
         $content = array();
 
-        # 这里加判断
-        $type = 1;
+        $type = 2;
 
         if (!isset($info['soft_cash'])) {
             $info['soft_cash'] = $info['price'];
         }
 
+        # 这里加判断
+        if ($role['type'] == 2 && $role['area'] == 1) {
+            $type = 1;   
+        } elseif ($info['soft_cash'] > 6000 && $info['soft_cash'] <= 30000 && $info['soft_cash']%5000 == 0) {
+            $type = 3;
+        } elseif ($info['soft_cash'] <= 6000 && $info['soft_cash']%1000 == 0) {
+            $type = 4;
+        } else {
+            $type = 2;
+        }
+
         # 城市代理
         if ($type == 1) {
             $name = '城市代理版';
-            $year = 6;
+            $year = 1;
             $cash = '3.1合同金额:按定制收费,合计总金额['.$info['soft_cash'].']元,其中总金额的90%为软件服务费,总金额的10%为购买开店所需电器及菜品费用。';
         }
         # 定制版
         elseif ($type == 2) {
             $name = '定制版';
-            $year = 6;
+            $year = 1;
             $cash = '3.1合同金额:按定制收费,合计总金额['.$info['soft_cash'].']元。';
         }
         # 升级版
-        elseif ($type == 1) {
+        elseif ($type == 3) {
             $name = '升级版';
             $year = 6;
             $cash = '3.1合同金额:5000元/每年,合计总金额['.$info['soft_cash'].']元。';