市场结算管理市场业绩公式修正

master
zhengyongxing 5 years ago
parent d5e7546c51
commit 8cc9bdb0c6

@ -501,34 +501,61 @@ class MarketPercentageController extends ThinkController
$data[$key]['performance_commission'] = "=ROUND("; $data[$key]['performance_commission'] = "=ROUND(";
$data[$key]['achievement_bonus'] = "=ROUND("; $data[$key]['achievement_bonus'] = "=ROUND(";
if ($value['performance_profit'] != "0.00") {
if ($value['achievement_profit'] != "0.00") {
$data[$key]['performance_commission'] .= "J{$line}*(F{$line}/100)"; $data[$key]['performance_commission'] .= "J{$line}*(F{$line}/100)";
$data[$key]['achievement_bonus'] .= "J{$line}*(H{$line}/100)"; $data[$key]['achievement_bonus'] .= "J{$line}*(H{$line}/100)";
} }
if ($value['achievement_profit'] != "0.00") {
if ($data[$key]['performance_commission'] == "=ROUND(") { if ($value['performance_profit'] != "0.00") {
$data[$key]['performance_commission'] .= "K{$line}*(G{$line}/100),2)";
} else { if ($data[$key]['performance_commission'] != '=ROUND(') {
$data[$key]['performance_commission'] .= "+K{$line}*(G{$line}/100),2)"; $data[$key]['performance_commission'] .= "+K{$line}*(G{$line}/100),2)";
} else {
$data[$key]['performance_commission'] .= "K{$line}*(G{$line}/100),2)";
} }
if ($data[$key]['achievement_bonus'] == "=ROUND(") { if ($data[$key]['achievement_bonus'] != '=ROUND(') {
$data[$key]['achievement_bonus'] .= "K{$line}*(I{$line}/100),2)";
} else {
$data[$key]['achievement_bonus'] .= "+K{$line}*(I{$line}/100),2)"; $data[$key]['achievement_bonus'] .= "+K{$line}*(I{$line}/100),2)";
} else {
$data[$key]['achievement_bonus'] .= "K{$line}*(I{$line}/100),2)";
} }
// $data[$key]['achievement_bonus'] .= "J{$line}*(H{$line}/100)";
} else { } else {
$data[$key]['performance_commission'] .= ",2)"; $data[$key]['performance_commission'] .= ',2)';
$data[$key]['achievement_bonus'] .= ",2)"; $data[$key]['achievement_bonus'] .= ',2)';
} }
if ($data[$key]['performance_commission'] == '=ROUND(,2)') {
$data[$key]['performance_commission'] = "0.00";
}
if ($data[$key]['achievement_bonus'] == '=ROUND(,2)') {
$data[$key]['achievement_bonus'] = "0.00";
} // if ($value['achievement_profit'] != "0.00") {
// if ($data[$key]['performance_commission'] == "=ROUND(") {
// $data[$key]['performance_commission'] .= "K{$line}*(G{$line}/100),2)";
// } else {
// $data[$key]['performance_commission'] .= "+K{$line}*(G{$line}/100),2)";
// }
//
// if ($data[$key]['achievement_bonus'] == "=ROUND(") {
// $data[$key]['achievement_bonus'] .= "K{$line}*(I{$line}/100),2)";
// } else {
// $data[$key]['achievement_bonus'] .= "+K{$line}*(I{$line}/100),2)";
// }
// } else {
// $data[$key]['performance_commission'] .= ",2)";
// $data[$key]['achievement_bonus'] .= ",2)";
// }
//
// if ($data[$key]['performance_commission'] == '=ROUND(,2)') {
// $data[$key]['performance_commission'] = "0.00";
// }
//
// if ($data[$key]['achievement_bonus'] == '=ROUND(,2)') {
// $data[$key]['achievement_bonus'] = "0.00";
// }
// $data[$key]['performance_commission'] = "=ROUND(J{$line}*(F{$line}/100)+J{$line}*(G{$line}/100),2)"; // $data[$key]['performance_commission'] = "=ROUND(J{$line}*(F{$line}/100)+J{$line}*(G{$line}/100),2)";
// $data[$key]['achievement_bonus'] = "=ROUND(J{$line}*(H{$line}/100)+J{$line}*(I{$line}/100),2)"; // $data[$key]['achievement_bonus'] = "=ROUND(J{$line}*(H{$line}/100)+J{$line}*(I{$line}/100),2)";

Loading…
Cancel
Save