二开-老单单据自定义日期字段默认为空
首先看这个帖子,了解插件如何开发 https://wenku.my7c.com/link/s/ltfaZ,这个帖子里已经有源码了,再这个源码基础上添加文中代码编译后放到k3erp目录即可查看效果;
效果图
首先找到自定义字段再表头的位置
添加代码,加载单据事件
Private Sub m_BillTransfer_LoadBillEnd(ByVal ShowType As Long)
If m_BillTransfer.SaveVect Is Nothing Then
If lngUserDatePlace > 0 Then
m_BillTransfer.SetHead lngUserDatePlace, ""
End If
End If
End Sub
Private Sub m_BillTransfer_NewBillEnd()
If lngUserDatePlace > 0 Then
m_BillTransfer.SetHead lngUserDatePlace, ""
End If
End Sub
Private Function GetHeadCtlOrderByFieldName(ByVal strFieldName As String) As Long
Dim i As Long
For i = 1 To UBound(m_BillTransfer.HeadCtl)
If UCase(Trim(m_BillTransfer.HeadCtl(i).FieldName)) = UCase(Trim(strFieldName)) Then
GetHeadCtlOrderByFieldName = i
Exit Function
End If
Next i
GetHeadCtlOrderByFieldName = 0
End Function
二开-老单单据自定义日期字段默认为空
本文2024-09-16 16:25:14发表“k3wise知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3wise-9113.html