📄 frminvoiceselect.frm
字号:
VERSION 5.00
Object = "{9C4B12C2-D5CE-11D1-9ABC-444553540000}#1.0#0"; "GACEDIT.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmInvoiceSelect
BorderStyle = 1 'Fixed Single
Caption = "选择单据"
ClientHeight = 5310
ClientLeft = 45
ClientTop = 330
ClientWidth = 8775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5310
ScaleWidth = 8775
StartUpPosition = 2 '屏幕中心
Begin GATLCTRLLibCtl.CalEdit curInput
Height = 345
Left = 7560
OleObjectBlob = "frmInvoiceSelect.frx":0000
TabIndex = 7
Top = 3750
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdOkCancel
Caption = "全部取消(&C)"
Height = 350
Index = 3
Left = 7500
TabIndex = 3
Top = 1410
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Caption = "全部选择(&A)"
Height = 350
Index = 2
Left = 7500
TabIndex = 2
Top = 1020
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Cancel = -1 'True
Height = 350
Index = 1
Left = 7500
Style = 1 'Graphical
TabIndex = 1
Tag = "1002"
Top = 630
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Default = -1 'True
Height = 350
Index = 0
Left = 7500
Style = 1 'Graphical
TabIndex = 0
Tag = "1001"
Top = 240
UseMaskColor = -1 'True
Width = 1210
End
Begin MSFlexGridLib.MSFlexGrid GrdCol
Bindings = "frmInvoiceSelect.frx":0081
Height = 4995
Left = 60
TabIndex = 6
Top = 240
Width = 7365
_ExtentX = 12991
_ExtentY = 8811
_Version = 393216
Cols = 20
FixedCols = 0
RowHeightMin = 270
BackColorBkg = -2147483643
GridColor = -2147483633
GridColorFixed = -2147483640
AllowBigSelection= 0 'False
FocusRect = 0
GridLinesFixed = 0
AllowUserResizing= 1
End
Begin MSRDC.MSRDC Data1
Height = 330
Left = 7500
Top = 4860
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
_Version = 393216
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 3
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label lblTitle
AutoSize = -1 'True
Caption = "币种:"
Height = 180
Index = 1
Left = 1410
TabIndex = 5
Top = 30
Visible = 0 'False
Width = 540
End
Begin VB.Label lblTitle
AutoSize = -1 'True
Caption = "单位:"
Height = 180
Index = 0
Left = 120
TabIndex = 4
Top = 30
Visible = 0 'False
Width = 540
End
End
Attribute VB_Name = "frmInvoiceSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private frmName As Form
Private lngReceiptTypeID As Long
Private strColName() As String
Private strCurrDec As String
Private lngCurrDec As Long
Private blnSucceed As Boolean
Private WithEvents mclsGrid As Grid
Attribute mclsGrid.VB_VarHelpID = -1
Private xlngColNo() As Long
Private Type Invoice2Activity
lngTheRowNO As Long '单据行号
lngMeRowNO As Long 'Grid行号
lngItemID As Long '商品ID
lngInvoiceDetailID As Long '发票明细ID
lngActivityDetailID As Long '业务明细ID
dblQuantity As Double '本次开票数量
dblCurrAmount As Double '本次开票金额
lngVoucherID As Long
End Type
Private Type DataofRow
lngActivityDetailID As Long '业务明细ID
lngItemID As Long '商品ID
dblFactor As Double '折算因子
lngVoucherID As Long '业务单据凭证ID
dblCurrAmount As Double '业务单据原币金额
dblTaxCurrAmount As Double '业务单据原币税额
dblAmount As Double '业务单据本币金额
dblTaxAmount As Double '业务单据本币税额
dblCurrInvoiceAmount As Double '业务单据原币开票金额
dblPriceTax As Double
dblPrice As Double
dblTaxRate As Double
strTax As String
strJob As String
strCustom0 As String
strCustom1 As String
strCustom2 As String
strCustom3 As String
strCustom4 As String
strCustom5 As String
strProduceNum As String
strProduceDate As String
strValidDate As String
intValidDay As Integer
lngUnitID As Long
lngTaxID As Long
lngJobID As Long
lngCustomID0 As Long
lngCustomID1 As Long
lngCustomID2 As Long
lngCustomID3 As Long
lngCustomID4 As Long
lngCustomID5 As Long
blnNoChange As Boolean
End Type
Private ObtendData() As Invoice2Activity
Private DataofGrid() As DataofRow
Private blnCancelOK As Boolean
Private mblnBillCanNotChange As Boolean '发票已记帐标志
Private mlngRowNO As Long
Private mdblInvoiceQuantityTotal As Double
Private mdblCurrInvoiceAmountTotal As Double
Private mblnFirst As Boolean
Public Function ShowMe(frmTmp As Form, ByVal blnCanNotChange As Boolean, Optional ByVal lngRowno As Long = 0) As Boolean
Set frmName = frmTmp
lngReceiptTypeID = C2lng(frmName.lblHead(2).Tag)
mlngRowNO = lngRowno
mblnBillCanNotChange = blnCanNotChange
On Error Resume Next
blnSucceed = False
Me.Show vbModal
ShowMe = blnSucceed
End Function
Private Sub Form_Activate()
If Me.HelpContextID <> 0 Then
SetHelpID Me.HelpContextID
End If
If mblnFirst Then
mblnFirst = False
RefreshGrid
End If
End Sub
Private Sub Form_Load()
frmName.HwndForMsg = Me.hWnd
Screen.MousePointer = vbHourglass
Utility.LoadFormResPicture Me
Select Case lngReceiptTypeID
Case 8
Me.Caption = "选择开票入库单"
Case 20
Me.Caption = "选择开票出库单"
End Select
lngCurrDec = CurrencyDec(frmName.getFieldID(7))
strCurrDec = FormatString(lngCurrDec)
lblTitle(0).Caption = " 单位:" & " " & frmName.lblHead(1).Caption
If mlngRowNO > 0 Then
lblTitle(0).Left = lblTitle(0).Left - Me.TextWidth(" ")
lblTitle(0).Caption = lblTitle(0).Caption & Chr(13) & " 商品: " & frmName.GrdCol.TextMatrix(mlngRowNO, 1)
GrdCol.top = GrdCol.top + 200
GrdCol.Height = GrdCol.Height - 200
cmdOkCancel(0).top = cmdOkCancel(0).top + 200
cmdOkCancel(1).top = cmdOkCancel(1).top + 200
cmdOkCancel(2).top = cmdOkCancel(2).top + 200
cmdOkCancel(3).top = cmdOkCancel(3).top + 200
End If
lblTitle(0).Visible = True
lblTitle(1).Visible = True
mblnFirst = True
End Sub
Private Sub RefreshGrid()
Dim i As Long
Dim j As Long
Dim lngTmp As Long
Dim strSql As String
GrdCol.Redraw = False
Set mclsGrid = New Grid
Set mclsGrid.Grid = GrdCol
mclsGrid.ListSet.ViewId = 999999999 '虚拟视图
mclsGrid.ColOfs = 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -