毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

VB进销存管理系统毕业论文 第6页

更新时间:2010-2-25:  来源:毕业论文
VB进销存管理系统毕业论文 第6页
SELECT A.CLBH, B.YFYF, IIf(A.RKSL=0,IIf(ISNULL([QCSL]),0,[QCJE]/[QCSL]),(B.QCJE+A.RKJE)/(B.QCSL+A.RKSL)) AS DJDJ
FROM AVER_MTH_RK2 AS A LEFT JOIN T_SFC_QC AS B ON A.CLBH=B.BHBH;

功能函数
Public Sub Do_Aver_DJ()
Dim da_Rec As ADODB.Recordset
Dim da_SQL As String
Set da_Rec = AppCN.Execute("select * from AVER_DJ")
AppCN.BeginTrans

Do While Not da_Rec.EOF
da_SQL = "update  J_clcl set DJDJ =" & da_Rec.Fields("DJDJ") & " where BHBH= '" & da_Rec.Fields("CLBH") & "'"
AppCN.Execute (da_SQL)

da_SQL = "update K_LLLL_D set JEJE =" & da_Rec.Fields("DJDJ") & " * k_LLLL_D.SLSL where K_LLLL_D.CLBH='" & _
          da_Rec.Fields("CLBH") & "' and K_LLLL_D.DHDH IN (SELECT DHDH FROM AVER_mth_LL2)"
         
AppCN.Execute (da_SQL)
da_Rec.MoveNext
Loop
AppCN.CommitTrans
End Sub
收发存明细,追踪某中材料某月的进出库情况,并显示出是那一帐单据进行操作,如果是领料则在摘要中写明成本项目。计算出每次操作之后的结存数量及金额。
Private Sub CmdMe_Click(Index As Integer)
If Index = 0 Then
Call PrintLstv(Me.LstView, LoadResString(804), "材料[" & m_CLBH & "] 收发存明细A", 1, 1)
Else
Unload Me
End If
End Sub
Private Sub DoGroupCube(SlCol As String, JeCol As String)
Dim arrSlCol() As String
Dim arrJeCol() As String
Dim k As Integer
Dim total As Double
Call ON_GetArray(SlCol, arrSlCol)
Call ON_GetArray(JeCol, arrJeCol)
LstView.ListItems.Add , , ""
LstView.ListItems(LstView.ListItems.Count).SubItems(1) = "总计"
For k = 0 To UBound(arrSlCol)
  total = 0
     For J = 1 To LstView.ListItems.Count
        total = total + Val(LstView.ListItems(J).SubItems(Val(arrSlCol(k))))
     Next
    LstView.ListItems(LstView.ListItems.Count).SubItems(Val(arrSlCol(k))) = total
   
Next
For k = 0 To UBound(arrJeCol)
  total = 0
     For J = 1 To LstView.ListItems.Count
        total = total + Val(LstView.ListItems(J).SubItems(Val(arrJeCol(k))))
     Next
    LstView.ListItems(LstView.ListItems.Count).SubItems(Val(arrJeCol(k))) = Format(total, "###0.00")
Next
End Sub
Private Sub Form_Load()
Dim fl_Num As Single
Dim fl_Cash As Double
Me.Icon = LoadResPicture(101, vbResIcon)
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 4
Me.Caption = "查看[" & m_CLBH & "] 的明细情况"
Call DoStyle
If GetInitData(fl_Num, fl_Cash) = True Then
    Call DoShow(fl_Num, fl_Cash)
'    Call DoRemain(fl_Num, fl_Cash)
End If
End Sub
Private Sub DoShow(m_drNum As Single, m_drCash As Double)
Dim dsRec As ADODB.Recordset
Dim dsSQL As String
Dim I As Integer
Dim itmX
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
dsSQL = "select * from SFC_MXA3 where CLBH='" & m_CLBH & "'"
Set dsRec = AppCN.Execute(dsSQL & " AND Month(KDRQ)=" & m_Month & " AND Year(KDRQ)=" & m_Year)
If dsRec.EOF Then
'    MsgBox "无效的材料编号!"
    Exit Sub
End If
I = 1
Set itmX = LstView.ListItems.Add(, , A & I)
    itmX.SubItems(1) = dsRec.Fields("KDRQ").Value
    itmX.SubItems(3) = "期初数量"
    itmX.SubItems(10) = rd_theSL
    itmX.SubItems(11) = Format(m_drCash, "##,##0.00")
Do While Not dsRec.EOF
    I = I + 1
    Set itmX = LstView.ListItems.Add(, , A & I)
     rd_RKJE = IIf(dsRec.Fields("RKJE").Value = "", 0, dsRec.Fields("RKJE").Value)
     rd_CKJE = IIf(dsRec.Fields("CKJE").Value = "", 0, dsRec.Fields("CKJE").Value)
    
     rd_theSL = rd_theSL + Val(dsRec.Fields("RKSL")) - Val(dsRec.Fields("CKSL"))
     m_drCash = m_drCash + rd_RKJE - rd_CKJE
    itmX.SubItems(1) = dsRec.Fields("KDRQ").Value
    itmX.SubItems(2) = dsRec.Fields("DHDH").Value
    itmX.SubItems(3) = dsRec.Fields("CBXM").Value
    itmX.SubItems(4) = dsRec.Fields("RKSL").Value
    itmX.SubItems(5) = IIf(dsRec.Fields("RKDJ").Value = "", "", Format(dsRec.Fields("RKDJ").Value, "##,##0.00"))
    itmX.SubItems(6) = IIf(dsRec.Fields("RKJE").Value = "", "", Format(dsRec.Fields("RKJE").Value, "##,##0.00")) '
    itmX.SubItems(7) = dsRec.Fields("CKSL").Value
    itmX.SubItems(8) = IIf(dsRec.Fields("CKDJ").Value = "", "",

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

VB进销存管理系统毕业论文 第6页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。