主题:奇怪的问题
功能是判断输入销售数量不能大于当前库存数量 问题就是当窗口中有数据 我重新改数量 这时我输入的数量大于当前库存数量 我保存时不作下面的处理了直接保存了
可是我新增一行录入数量当大于当前库存数量 这时就作下面的处理了 为什么会这样呢
vi_unit_1=dw_2.getitemnumber(vi_count,"outhouse_mount")
old_qty1 =dec(dw_2.getitemstring(vi_count,"dw_6.getitemNumber(dw_6.getrow(),cgstore_mount"))
tvs_cg_unit1= dw_2.getitemstring(vi_count,"cargo_cg_unit1")
if isnull(old_qty1) then
old_qty1 = 0
end if
if real(vi_unit_1)>old_qty1 and old_qty1 <> 0 then
beep(1)
messagebox("录入错误","销售数量不能大于当前库存数量"+string(old_qty1)+tvs_cg_unit1)
dw_2.setcolumn("outhouse_mount")
return 1
end if
可是我新增一行录入数量当大于当前库存数量 这时就作下面的处理了 为什么会这样呢
vi_unit_1=dw_2.getitemnumber(vi_count,"outhouse_mount")
old_qty1 =dec(dw_2.getitemstring(vi_count,"dw_6.getitemNumber(dw_6.getrow(),cgstore_mount"))
tvs_cg_unit1= dw_2.getitemstring(vi_count,"cargo_cg_unit1")
if isnull(old_qty1) then
old_qty1 = 0
end if
if real(vi_unit_1)>old_qty1 and old_qty1 <> 0 then
beep(1)
messagebox("录入错误","销售数量不能大于当前库存数量"+string(old_qty1)+tvs_cg_unit1)
dw_2.setcolumn("outhouse_mount")
return 1
end if