以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]自动录入代码求助  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=1147)

--  作者:号子
--  发布时间:2008/11/16 13:28:00
--  [求助]自动录入代码求助
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.rar


1.“总表”中如果发票登记_开票确定则自动在“开票记录表”中增加一行并填入“总表”中的车次,车号,收货单位,发货单位,运费结算_重量、运价,运费等数据。
2.开票记录表中,两个抵扣唯一存在,如不存在则在确定打印时示警,如确定抵扣方则自动在税号前加“+”号,打印列确定后,打开报表“开票证明”打印预览。
3.开票证明模板帮改一改,要求实现同单位(一票)打印5行数据,(模板中服务项目要求9行)
[此贴子已经被作者于2008-11-16 13:28:24编辑过]

--  作者:gdtgl
--  发布时间:2008/11/16 21:05:00
--  
在收货_抵扣 和 发票登记_登记 中的datacolchanged事件中更新了代码。(注:楼的主编号列没仔细看写什么了,也删了,重新增加。)

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.table


--  作者:号子
--  发布时间:2008/11/16 21:38:00
--  

发票登记搞定,抵扣加+还不能达到要求,收货和发货只能存在一方抵扣,楼上的却能双方共同存在,且确定一次加一次“+”。发票登记中不能自动输入税号,(税号来源于基本资料,又及,发票记录中的审核列就是打印确定列)。


--  作者:gdtgl
--  发布时间:2008/11/16 23:36:00
--  
Dim ba As  string = Tables("开票记录").Current("收货_单位")
Dim bb As  string = Tables("基本资料").Current("客户名称")
dim s2 as datarow = datatables("基本资料").find("客户名称 = \'" & ba & "\' ")
if e.DataCol.Name = "收货_抵扣"  and e.datarow("收货_抵扣") = true  and  e.datarow("发货_抵扣") = false  then
   e.datarow("收货_税号") = "+" & s2("税号")
  elseif e.DataCol.Name = "发货_抵扣" and  e.datarow("发货_抵扣") = true and e.datarow("收货_抵扣") = false  then
      e.datarow("发货_税号") = "+" & s2("税号")
   elseif  e.datarow("收货_抵扣") = true and e.datarow("发货_抵扣") = true then
       messagebox.show("请规范录入")
end if

--  作者:gdtgl
--  发布时间:2008/11/16 23:38:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.table


--  作者:号子
--  发布时间:2008/11/17 8:20:00
--  
录入税号OK,加减“+”号有待完善:在发票记录中取消抵扣时,没能自动去掉”+“号,提示出现情况:当改变抵扣方(如现在收货抵扣要改发货方抵扣)提问“确定要改变抵扣方吗”即可(延用易表提示习惯,嘿嘿)。
--  作者:号子
--  发布时间:2008/11/17 15:50:00
--  
Dim ba As  string = Tables("开票记录").Current("收货_单位")
Dim bb As  string = Tables("基本资料").Current("客户名称")
dim s2 as datarow = datatables("基本资料").find("客户名称 = \'" & ba & "\' ")
if e.DataCol.Name = "收货_抵扣"  and e.datarow("收货_抵扣") = true  and  e.datarow("发货_抵扣") = false  then
   e.datarow("收货_税号") = "+" & s2("税号")
  elseif e.DataCol.Name = "发货_抵扣" and  e.datarow("发货_抵扣") = true and e.datarow("收货_抵扣") = false  then
      e.datarow("发货_税号") = "+" & s2("税号")
   elseif  e.DataCol.Name = "收货_抵扣" and e.datarow("收货_抵扣") = true and e.datarow("发货_抵扣") = true then
       e.datarow("收货_税号") = "+" & s2("税号")
       e.datarow("发货_税号") = s2("税号")
       e.datarow("发货_抵扣") = false
  elseif  e.DataCol.Name = "发货_抵扣" and e.datarow("发货_抵扣") = true and e.datarow("收货_抵扣") = true then
       e.datarow("发货_税号") = "+" & s2("税号")
       e.datarow("收货_税号") = s2("税号")
       e.datarow("收货_抵扣") = false
  elseif  e.DataCol.Name = "收货_抵扣" and e.datarow("收货_抵扣") = false then
       e.datarow("收货_税号") = s2("税号")
       elseif  e.DataCol.Name = "发货_抵扣" and e.datarow("发货_抵扣") = false then
       e.datarow("发货_税号") = s2("税号")
end if

改了一下,成了,嘿嘿