| 
					
				 | 
			
			
				@@ -126,6 +126,13 @@ class Agreement 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		$agreement = Dever::db('setting/agreement')->getData();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		$role = Dever::db('setting/role')->find($order['role']);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         foreach ($agreement as $k => $v) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ($k == 3) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (isset($order['soft_cash']) && $order['soft_cash'] > 0) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $order['price'] = $order['soft_cash'];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    continue;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	if ($k >= 5) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		continue;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	}
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1175,29 +1182,33 @@ class Agreement 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 这里加判断
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $type = 1;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!isset($info['soft_cash'])) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $info['soft_cash'] = $info['price'];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 城市代理
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ($type == 1) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $name = '城市代理版';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $year = 6;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $cash = '3.1合同金额:按定制收费,合计总金额['.$info['agent_cash'].']元,其中总金额的90%为软件服务费,总金额的10%为购买开店所需电器及菜品费用。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $cash = '3.1合同金额:按定制收费,合计总金额['.$info['soft_cash'].']元,其中总金额的90%为软件服务费,总金额的10%为购买开店所需电器及菜品费用。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 定制版
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         elseif ($type == 2) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $name = '定制版';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $year = 6;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $cash = '3.1合同金额:按定制收费,合计总金额['.$info['agent_cash'].']元。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $cash = '3.1合同金额:按定制收费,合计总金额['.$info['soft_cash'].']元。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 升级版
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         elseif ($type == 1) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $name = '升级版';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $year = 6;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $cash = '3.1合同金额:5000元/每年,合计总金额['.$info['agent_cash'].']元。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $cash = '3.1合同金额:5000元/每年,合计总金额['.$info['soft_cash'].']元。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         # 基础版
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $name = '基础版';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $year = 6;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $cash = '3.1合同金额:1000元/每年,合计总金额['.$info['agent_cash'].']元。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $cash = '3.1合同金额:1000元/每年,合计总金额['.$info['soft_cash'].']元。';
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $content[] = $this->content('', '鉴于甲方购买乙方名称为《 厨人易料业务管理系统 》版本为《 '.$name.' 》的系统使用权(以下简称为“软件”),双方经协商一致,由乙方为甲方提供软件服务,双方达成本服务合同。');
 
			 |