以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 窗口显示错误 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=130905) |
-- 作者:lfz123 -- 发布时间:2019/2/11 14:51:00 -- 窗口显示错误 甜老师请教:我写了这样一段代码出现如图一的显示错误,重新打开显示又是正常的如图二,结果正确,只是影响显示结果 代码如下: If e.sender.Value = "02 结转未交增值税" Then Dim pr As Row = Tables("凭证").Current Dim dr As DataRow = DataTables("税金统计").find("年份= \'"& pr("年份") & "\'and 月份= \'"& pr("月份") & "\' ") If dr IsNot Nothing Then t.rows(0)("借方金额") = dr("销项_税额") - dr("进项_税额") t.rows(1)("贷方金额") = dr("销项_税额") - dr("进项_税额") End If End If |
-- 作者:有点甜 -- 发布时间:2019/2/11 14:57:00 -- 1、请确定是执行哪段代码后出现的错误;
2、贴出完整的影响的代码。 |
-- 作者:lfz123 -- 发布时间:2019/2/11 15:12:00 -- 如果没有黄色代码显示是正常的喔!我只不过是调用了其他表的金额自动填写上去了 Dim str1 As String = e.sender.Value Dim str As String = str1.SubString(0,2) Dim drs As List (of DataRow) = DataTables("常用凭证").Select("编号 = \'"& str & "\'") For y As Integer = 0 To drs.Count - 1 Dim t As Table = Tables("凭证.凭证明细") Dim nma() As String = {"摘要","科目代码","借方金额","贷方金额","现金流科目"} \'A-常用凭证 表数据来源列 Dim nmb() As String = {"摘要","科目代码","借方金额","贷方金额","现金流科目"} \'B- 凭证.凭证明细 表数据接收列 Dim r As Row = t.AddNew For i As Integer = 0 To nma.Length - 1 r(nmb(i)) = drs(y)(nma(i)) Next If e.sender.Value = "01 缴纳税金" Then Dim dr1 As DataRow = DataTables("会计科目").find("科目代码 = \'"& r("科目代码") & "\' ") If r("科目代码") <> "1002001" And dr1("期末余额") > 0 Then r("借方金额") = dr1("期末余额") Else r("贷方金额") = t.Compute("sum(借方金额)") End If ElseIf e.sender.Value = "02 结转未交增值税" Then Dim pr As Row = Tables("凭证").Current Dim dr As DataRow = DataTables("税金统计").find("年份= \'"& pr("年份") & "\'and 月份= \'"& pr("月份") & "\' ") If dr IsNot Nothing Then t.rows(0)("借方金额") = dr("销项_税额") - dr("进项_税额") t.rows(1)("贷方金额") = dr("销项_税额") - dr("进项_税额") End If End If Next
[此贴子已经被作者于2019/2/11 15:13:44编辑过]
|
-- 作者:有点甜 -- 发布时间:2019/2/11 18:43:00 -- 试试这样
ElseIf e.sender.Value = "02 结转未交增值税" Then systemready = false systemready = true |