时间：- if(session('iszb')=='是'){ 所属店铺：
} 员工姓名：
清空查询 if(display(CONTROLLER_NAME.'/dayin')){打印}

统计时间 | 提成金额
--- | ---
if(isset($_REQUEST['time1']) && $_REQUEST['time1'] != ''&&isset($_REQUEST['time2']) && $_REQUEST['time2'] != ''){ $nian=substr($_REQUEST['time1'],0,4); }else{ $nian=date("Y",time()); } if(session('iszb')=='是'){ if(isset($_REQUEST['shopid']) && $_REQUEST['shopid'] != ''){ $map=" and shopid=".I('shopid')." "; $shopname=get_shop_name($_REQUEST['shopid']); }else{ $shopname='全部店铺'; } }else{ $map=" and shopid=".session('shopid')." "; $shopname=get_shop_name(session('shopid')); } if(isset($_REQUEST['juname']) && $_REQUEST['juname'] != ''){ $map.=" and juname='".I('juname')."' "; } if(isset($_REQUEST['time1']) && $_REQUEST['time1'] != ''&&isset($_REQUEST['time2']) && $_REQUEST['time2'] != ''){
if(session('iszb')=='是'){{$_REQUEST['shopid']|get_shop_name=###}}{$_REQUEST['juname']}{$_REQUEST['time1']}-{$_REQUEST['time2']} | echo M('ticheng')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$map)->sum('jine');
} for ($i=1;$i<13;$i+=1){
if(session('iszb')=='是'){{$_REQUEST['shopid']|get_shop_name=###}}{$_REQUEST['juname']}{$nian}年{$i}月 | if($i<10){ echo M('ticheng')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$map)->sum('jine'); }else{ echo M('ticheng')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$map)->sum('jine'); }
}