Foxtable(狐表)用户栏目专家坐堂 → 按周汇总工资为何这个小计显示的还是每天的?


  共有3429人关注过本帖树形打印复制链接

主题:按周汇总工资为何这个小计显示的还是每天的?

帅哥哟,离线,有人找我吗?
yetle
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:858 积分:6381 威望:0 精华:0 注册:2017/2/13 9:04:00
按周汇总工资为何这个小计显示的还是每天的?  发帖心情 Post By:2020/10/16 9:25:00 [显示全部帖子]

Dim tB As Table = Tables("月工资表_table1")
Dim tB2 As Table = Tables("月工资表_table2")
If Forms("月工资表").Opened()
Dim yf As String = e.Form.Controls("TextBox1").text
Dim nf As String = e.Form.Controls("TextBox2").text
Dim xm As String = e.Form.Controls("TextBox3").text
tB.Fill(" Select b.组别 As 班组 ,a.实际生产员工,sum(a.件数*a.工价) As 工资 f rom 派发工序表  a left join 员工管理 b on a.实际生产员工=b.姓名 where  MONTH(a.扫码时间) = convert(int, " & yf & ") And year(a.扫码时间)=convert(int, " & nf & ")  and 实际生产员工='" & xm & "'  and 单据状态='已完成' GROUP BY b.组别,a.实际生产员工 order by 班组 " , "xsc_erp",True)
 
tB2.Fill(" select (convert(varchar(8),[扫码时间],112)) as 日期,订单号,款号,工价,实际生产员工,工序号,工序名,sum(件数*工价) As 工资,sum(件数) as 件数 f rom [BD-ERP].[dbo].[派发工序表]  a where  MONTH(扫码时间) = convert(int, " & yf & ")  And year(扫码时间)=convert(int, " & nf & ") and 实际生产员工='" & xm & "'  and 单据状态='已完成' group by 订单号,款号,工价,实际生产员工,工序号,工序名,扫码时间 order by 实际生产员工,工序号,(convert(varchar(8),[扫码时间],112)) " , "xsc_erp",True)
End If



Dim g As Subtotalgroup
tB2.SubtotalGroups.Clear() 


g = New Subtotalgroup 
g.GroupOn = "日期"
g.TotalOn = "工资" 
g.DateGroup = DateGroupEnum.day '按年分组
tB2.SubtotalGroups.Add(g)

g = New Subtotalgroup 
g.GroupOn = "日期"
g.TotalOn = "工资" 
g.DateGroup = DateGroupEnum.week '按年分组
tB2.SubtotalGroups.Add(g)

g = New Subtotalgroup
g.GroupOn = "*"
g.TotalOn = "工资"
tB2.SubtotalGroups.Add(g)
tB2.Subtotal()

 回到顶部