If e.DataCol.Name = "bs0130" Then '统计销售订单月收款状态
If e.NewValue Is Nothing Then '
e.DataRow("bs0133") = Nothing '
Else
Dim ddys As DataRow '订单账单已收
Dim ddje As DataRow '订单账单金额
ddje = DataTables("sdbs01").Compute("sum(bs0117)", "[bs01730] = '" & e.NewValue & "' and bs0104 = '" & e.DataRow("bs0104") & "'")
ddys = DataTables("sdbs01").Compute("sum(bs0141)", "[bs01730] = '" & e.NewValue & "' and bs0104 = '" & e.DataRow("bs0104") & "'")
If ddje > ddys Then
e.DataRow("bs0133") = "未收完"
Else
e.DataRow("bs0133") = "已收完"
End If
End If
End If
这样弄不成功
[此贴子已经被作者于2023/12/25 19:34:55编辑过]