时间：- 业务员：
清空查询 if(display(CONTROLLER_NAME.'/dayin')){打印}

统计时间 | 合同总金额 | 已回款 | 待回款 | 已开票 | 已付款/支出 | 统计
--- | --- | --- | --- | --- | --- | ---
实际收款 | 实际付款
if(isset($_REQUEST['jingban']) && $_REQUEST['jingban'] != ''){ $jingban=" and jingban='".$_REQUEST['jingban']."'"; } if(isset($_REQUEST['time1']) && $_REQUEST['time1'] != ''&&isset($_REQUEST['time2']) && $_REQUEST['time2'] != ''){ $nian=substr($_REQUEST['time1'],0,4); }else{ $nian=date("Y",time()); } if(isset($_REQUEST['time1']) && $_REQUEST['time1'] != ''&&isset($_REQUEST['time2']) && $_REQUEST['time2'] != ''){
{$_REQUEST['time1']}-{$_REQUEST['time2']} {$_REQUEST['jingban']} | echo M('hetong')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('jine'); | echo M('hetong')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('yishou'); | echo M('hetong')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('weishou'); | echo M('hetong')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('kaipiao'); | echo M('hetong')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('yifu'); | echo M('shou')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('jine'); | echo M('fukuan')->where("addtime > '".$_REQUEST['time1']." 00:00:00' and addtime < '".$_REQUEST['time2']." 59:59:59'".$jingban)->sum('jine');
} for ($i=1;$i<13;$i+=1){
{$nian}年{$i}月 | if($i<10){ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('jine'); }else{ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('jine'); } | if($i<10){ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('yishou'); }else{ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('yishou'); } | if($i<10){ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('weishou'); }else{ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('weishou'); } | if($i<10){ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('kaipiao'); }else{ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('kaipiao'); } | if($i<10){ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('yifu'); }else{ echo M('hetong')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('yifu'); } | if($i<10){ echo M('shou')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('jine'); }else{ echo M('shou')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('jine'); } | if($i<10){ echo M('fukuan')->where("addtime like '%".$nian."-%' and addtime like '%0".$i."-%'".$jingban)->sum('jine'); }else{ echo M('fukuan')->where("addtime like '%".$nian."-%' and addtime like '%".$i."-%'".$jingban)->sum('jine'); }
}