diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index e75d464ac..a441c54f0 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -1083,22 +1083,17 @@ public function auto_rrdae(){ $error_repeat = 0; if (!empty($promotes)) { - switch ($settlement) { - case 1: - $fun = 'promoteWithdrawWeeklyByPromote'; - break; - case 2: - $fun = 'promoteWithdrawPerMonthByPromote'; - break; - case 3: - $fun = 'promoteWithdrawRecoupByPromote'; - break; - } foreach ($promotes as $promote) { - if ($fun == 'promoteWithdrawRecoupByPromote') { - $result = $withdrawModel->$fun($promote); - } else { - $result = $withdrawModel->$fun($promote, $initial); + switch ($settlement) { + case 1: + $result = $withdrawModel->promoteWithdrawWeeklyByPromote($promote, $initial); + break; + case 2: + $result = $withdrawModel->promoteWithdrawRecoupByPromote($promote, $initial); + break; + case 3: + $result = $withdrawModel->promoteWithdrawRecoupByPromote($promote); + break; } switch ($result) { case -4: