--
Dim Cols1() As String = {"入库日期", "供应商", "货物名称", "规格", "单位", "数量", "单价", "金额", "会计年度", "物料编码", "单号", "单据类型", "结算单价", "结算金额", "往来编码", "科目编码", "科目", "部门"}
Dim Cols2() As String = {"日期", "供应商", "货物名称", "规格", "单位", "数量", "单价", "含税金额", "会计年度", "物料编码", "单号", "单据类型", "结算单价", "结算金额", "往来编号", "科目编码", "科目", "部门"}
Dim s As Table = Tables("采购开单")
Dim a As Table = Tables("已审采购")
For i As Integer = 0 To s.Rows.count - 1
If s.Rows(i)("选择") = True Then\'Or s.Rows(i)("会计年度") Is Nothing Then
Dim s1 As Row = s.Rows(i)
Dim nr As Row = a.AddNew()
nr("立帐编码") = Forms("应付立帐").Controls("TextBox2").text\'\'\'\'\'立帐编码
nr("会计年度") = Forms("应付立帐").Controls("DropBox1").text\'\'\'\'\'\'\'年月
nr("MA005") = Forms("应付立帐").Controls("TextBox4").text\'\'\'\'\'\'\'\'\'\'供应商名称
nr("MA006") = Forms("应付立帐").Controls("DropBox3").text\'\'\'\'\'\'\'\'\'\'供应商编码
For y As Integer = 0 To Cols1.Length - 1
nr(Cols2(y)) = s1(Cols1(y))
Next
Tables("采购开单").Rows(i).Delete()
End If
Next