$map['_string'] .= " and create_time <= ".(strtotime(I('create_time_end')) + 86400);
}
}
$login_uid = is_login();
$login_uid = is_login();
$list = M('settlement_sheet', 'tab_')->where($map)->page($p, $row)->order("if (audit_user ={$login_uid}, 0,1 ) and status = 3, all_status desc, create_time desc")->select();
$list = M('settlement_sheet', 'tab_')->where($map)->page($p, $row)->order("if (audit_user ={$login_uid}, 0,1 ) and status = 3, all_status desc, create_time desc")->select();
@ -136,7 +137,7 @@ class SettlementController extends ThinkController
}
}
$result = M('spend', 'tab_')->query("
$result = M('spend', 'tab_')->query("
SELECT
SELECT
sum(s.pay_amount) as amount, g.relation_game_id, g.relation_game_name, p.partner, p.id as p_id, p.channel_rate, p.invoice_rate, g.id as game_id
TRUNCATE(sum(s.pay_amount), 2) as amount, g.relation_game_id, g.relation_game_name, p.partner, p.id as p_id, p.channel_rate, p.invoice_rate, g.id as game_id
FROM
FROM
tab_spend as s
tab_spend as s
INNER JOIN tab_game g on s.game_id = g.id
INNER JOIN tab_game g on s.game_id = g.id
@ -178,7 +179,7 @@ class SettlementController extends ThinkController
html += '<labelclass="instanceof_text">月流水:</label>';
html += '<selectname="instanceof[]"style="width: 50px;margin-right: 10px;">';
html += '<optionvalue="1">≥</option>';
html += '<optionvalue="2">></option>';
html += '</select>';
html += '<divclass="turnover">';
html += '<inputtype="text"class="txt"name="turnover[]"value=""placeholder="请输入金额"onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')"style="width: 100px;margin-right: 10px;">';
html += '<span></span>';
html += '</div>';
html += '<label>分成比例:</label>';
html += '<divclass="turnover-ratio">';
html += '<inputtype="text"class="txt"name="turnover_ratio[]"value=""placeholder="请输入比例"onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')"style="width: 60px;">';
html += '<spanclass="form_unit"style="margin-right: 10px;">%</span>';
html += '<spanclass="error-message"></span>';
html += '</div>';
html += '</div>';
$('.list-ratio').append(html);
if ($('.list-ratio').children().length > 1 && delBtn.children('i').hasClass('iconfont-unselected')) {