VB进销存管理系统毕业论文 第7页
Format(dsRec.Fields("CKDJ").Value, "##,##0.00"))
itmX.SubItems(9) = IIf(dsRec.Fields("CKJE").Value = "", "", Format(dsRec.Fields("CKJE").Value, "##,##0.00")) '
itmX.SubItems(10) = rd_theSL
itmX.SubItems(11) = Format(m_drCash, "##,##0.00")
dsRec.MoveNext
Loop
End Sub
Private Sub DoStyle()
Dim intWid As Integer
intWid = 1200
LstView.ColumnHeaders.Add , , "序号", 600
LstView.ColumnHeaders.Add , , "日期", 1000, lvwColumnRight
LstView.ColumnHeaders.Add , , "凭证编号", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "摘要", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "收入数量", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "收入单价", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "收入金额", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "发出数量", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "发出单价", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "发出金额", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "结存数量", intWid, lvwColumnRight
LstView.ColumnHeaders.Add , , "结存金额", intWid, lvwColumnRight
End Sub
Private Sub Form_Resize()
On Error Resume Next
LstView.Move 0, 100 + 500 + 50, Me.ScaleWidth, Me.ScaleHeight - Me.StatusBar1.Height - 650
End Sub
Private Function GetInitData(m_giNum As Single, m_giCash As Double) As Boolean
Dim drRec_1 As ADODB.Recordset
Dim drRec_2 As ADODB.Recordset
Dim drSQL As String
GetInitData = True
m_giNum = -2002.1994
m_giCash = -2002.1994
drSQL = "select * from T_SFC Where BHBH='" & m_CLBH & "'"
drSQL = drSQL & " AND Month(YFYF)=" & m_Month & " AND Year(YFYF)=" & m_Year
Set drRec_1 = AppCN.Execute(drSQL)
If drRec_1.EOF Then
drSQL = "select * from T_SFC_QC Where BHBH='" & m_CLBH & "'"
drSQL = drSQL & " AND Month(YFYF)=" & m_Month & " AND Year(YFYF)=" & m_Year
Set drRec_2 = AppCN.Execute(drSQL)
If drRec_2.EOF Then
MsgBox "没有盘点,没有期初期末数据!"
GetInitData = False
Else
m_giNum = drRec_2.Fields("QCSL").Value
www.751com.cn ").Value
m_giCash = drRec_1.Fields("QCJE").Value
End If
drRec_1.Close: Set drRec_1 = Nothing
End Function
Private Sub Form_Unload(Cancel As Integer)
m_CLBH = ""
m_Month = 0
m_Year = 0
End Sub
Private Sub DoRemain(m_drNum As Single, m_drCash As Double)
Dim rd_theSL As Single
Dim rd_theJE As Double
Dim rd_RKJE As Double, rd_CKJE As Double
rd_theSL = m_drNum
rd_theJE = m_drCash
For I = 1 To Me.LstView.ListItems.Count
rd_theSL = rd_theSL + Val(LstView.ListItems(I).SubItems(4)) - Val(LstView.ListItems(I).SubItems(7))
LstView.ListItems(I).SubItems(10) = rd_theSL
If rd_theSL <> 0 Then
rd_CKJE = Val(Format(LstView.ListItems(I).SubItems(9), "###0.00"))
rd_theJE = rd_theJE + rd_RKJE - rd_CKJE
Else
rd_theJE = 0
End If
LstView.ListItems(I).SubItems(11) = Format(rd_theJE, "##,##0.00")
NextEnd Sub
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页