【VB开源代码栏目提醒】:本文主要为网学会员提供E销售利润.frm,希望对需要E销售利润.frm网友有所帮助,学习一下!
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmsaleProfit
Caption = "销售利润"
ClientHeight = 6495
ClientLeft = 60
ClientTop = 450
ClientWidth = 9000
LinkTopic = "Form1"
ScaleHeight = 6495
ScaleWidth = 9000
StartUpPosition = 3 '窗口缺省
Begin MSDataGridLib.DataGrid DataGrid1
Height = 3015
Left = 120
TabIndex = 16
Top = 2160
Width = 8655
_ExtentX = 15266
_ExtentY = 5318
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "各商品销售利润"
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Frame Frame1
Caption = "合计结果"
Height = 1935
Left = 60
TabIndex = 7
Top = 120
Width = 8655
Begin VB.Label Label2
BorderStyle = 1 'Fixed Single
ForeColor = &H00000040&
Height = 495
Index = 3
Left = 5880
TabIndex = 15
Top = 1080
Width = 2055
End
Begin VB.Label Label1
Caption = "销售利润:"
Height = 255
Index = 3
Left = 4680
TabIndex = 14
Top = 1200
Width = 975
End
Begin VB.Label Label2
BorderStyle = 1 'Fixed Single
ForeColor = &H00000040&
Height = 495
Index = 2
Left = 1800
TabIndex = 13
Top = 1080
Width = 2055
End
Begin VB.Label Label1
Caption = "税收总金额:"
Height = 255
Index = 2
Left = 480
TabIndex = 12
Top = 1200
Width = 1095
End
Begin VB.Label Label2
BorderStyle = 1 'Fixed Single
ForeColor = &H00000040&
Height = 495
Index = 1
Left = 5880
TabIndex = 11
Top = 360
Width = 2055
End
Begin VB.Label Label1
Caption = "成本总金额:"
Height = 255
Index = 1
Left = 4560
TabIndex = 10
Top = 480
Width = 1095
End
Begin VB.Label Label2
BorderStyle = 1 'Fixed Single
ForeColor = &H00000000&
Height = 495
Index = 0
Left = 1800
TabIndex = 9
Top = 360
Width = 2055
End
Begin VB.Label Label1
Caption = "销售总金额:"
Height = 255
Index = 0
Left = 480
TabIndex = 8
Top = 480
Width = 1095
End
End
Begin VB.Frame Frame2
Caption = "统计条件"
Height = 975
Left = 120
TabIndex = 0
Top = 5280
Width = 8655
Begin VB.CommandButton CmdSearch
BackColor = &H00C0C0C0&
Caption = "查询"
Height = 360
Left = 6840
Style = 1 'Graphical
TabIndex = 2
Top = 360
Width = 800
End
Begin VB.CommandButton CmdExit
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 360
Left = 7800
Style = 1 'Graphical
TabIndex = 1
Top = 360
Width = 800
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 375
Left = 4200
TabIndex = 3
Top = 360
Width = 1935
_ExtentX = 3413
_ExtentY = 661
_Version = 393216
Format = 61997057
CurrentDate = 38911
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1200
TabIndex = 4
Top = 360
Width = 1935
_ExtentX = 3413
_ExtentY = 661
_Version = 393216
Format = 61997057
CurrentDate = 38911
End
Begin VB.Label Label8
Caption = "起始日期:"
Height = 255
Index = 1
Left = 360
TabIndex = 6
Top = 480
Width = 1095
End
Begin VB.Label Label8
Caption = "结束日期:"
Height = 255
Index = 2
Left = 3360
TabIndex = 5
Top = 480
Width = 1095
End
End
End
Attribute VB_Name = "frmsaleProfit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim SQL As String
Dim msg As String
Private Sub CmdSearch_Click()
Dim rs As ADODB.Recordset
Dim XiaoShou As Double '保存总销售金额
Dim ChenBen As Double '保存总成本金额
Dim ShuiShou As Double '保存总税收金额
Dim result As Double '保存总利润金额
'按商品编号进行统计
SQL = "SELECT commodityID, SUM(saleNumber) AS saleNumber, SUM(totalAmount) AS 销售金额,"
SQL = SQL & "Sum(costSPrice*saleNumber)as 成本总金额 ,SUM(allowance) AS allowa
上一篇:
DataService_ini.cpp
下一篇:
心力衰竭的中医证素及常见证型