If e.DataCol.Name = "确认出入库" Then
Dim dr As DataRow
Dim filter1 As String
Dim filter2 As String
Dim filter As String = "1=1"
If e.DataRow.isnull("品名") = False Then
filter &= " and [品名] = '" & e.DataRow("品名") & "'"
End If
If e.DataRow.isnull("批号") = False Then
filter &= " and [批号] = '" & e.DataRow("批号") & "'"
End If
If e.DataRow.isnull("物料编码") = False Then
filter &= " and [物料编码] = '" & e.DataRow("物料编码") & "'"
End If
filter1 = filter & " and [库位] = '" & e.DataRow("库位") & "' and [货权] = '" & e.DataRow("货权") & "'"
filter2 = filter & " and [库位] = '" & e.DataRow("库位") & "' and [货权] = '" & e.DataRow("货权") & "' and [日期]='" & Date.today & "'"
dr = DataTables("总库存表").SQLFind(Filter1 ) '在行政区域表查找所输入省市和县市的行
If dr IsNot Nothing Then
Dim Sum1 As Single=DataTables("入库明细表").Compute("Sum(入库重量)",filter2)
dr("今日入库")=sum1
dr.Save
end if
End If
老师好,我用以上代码执行 ,入库几百个品种,其他品种都OK。唯独 这个品种怎么都找不到,也无法计算重量。请教下是啥原因
品种 批号 物料编码
C16SKTS
ZE36041201 11931000160C006100