B70340 4 лет назад
Родитель
Сommit
ad6e28c365
20 измененных файлов: 1721 добавлений и 971 удалений
  1. Двоичные данные
      工巧明智能管理系統/.vs/我的系統/v16/.suo
  2. 1
    1
      工巧明智能管理系統/我的系統/MyModule/MyModule.vb
  3. Двоичные данные
      工巧明智能管理系統/我的系統/bin/Debug/GCM-ERP-SYS.exe
  4. Двоичные данные
      工巧明智能管理系統/我的系統/bin/Debug/GCM-ERP-SYS.pdb
  5. Двоичные данные
      工巧明智能管理系統/我的系統/obj/x86/Debug/GCM-ERP-SYS.exe
  6. Двоичные данные
      工巧明智能管理系統/我的系統/obj/x86/Debug/GCM-ERP-SYS.pdb
  7. 65
    0
      工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbproj.FileListAbsolute.txt
  8. Двоичные данные
      工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbproj.GenerateResource.cache
  9. Двоичные данные
      工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbproj.ResolveComReference.cache
  10. Двоичные данные
      工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbprojAssemblyReference.cache
  11. 33
    7
      工巧明智能管理系統/我的系統/財務系統管理/匯率修改.Designer.vb
  12. 14
    13
      工巧明智能管理系統/我的系統/財務系統管理/匯率修改.vb
  13. 609
    313
      工巧明智能管理系統/我的系統/財務系統管理/營運報表.Designer.vb
  14. 729
    512
      工巧明智能管理系統/我的系統/財務系統管理/營運報表.vb
  15. 106
    37
      工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單一覽表.Designer.vb
  16. 106
    56
      工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單一覽表.vb
  17. 2
    0
      工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單審核.Designer.vb
  18. 1
    1
      工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單審核.vb
  19. 42
    26
      工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單申請.Designer.vb
  20. 13
    5
      工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單申請.vb

Двоичные данные
工巧明智能管理系統/.vs/我的系統/v16/.suo Просмотреть файл


+ 1
- 1
工巧明智能管理系統/我的系統/MyModule/MyModule.vb Просмотреть файл

@@ -6,7 +6,7 @@
6 6
     Public 登入權限AQL As String = "姓名, 帳號, 密碼, 密碼日期, CC00, CC01, CC02, CC03, CC04, CC05, CC06, CC07, CC08, CC09, CC10, CC11, CC12, CC13, CC14, CC15, CC16, CC17, CC18, CC19, CC20, CC21, CC22, 
7 7
                                     CC23, CC24, CC25, CC26"
8 8
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
9
-    Public 版本 As String = "2020051901"
9
+    Public 版本 As String = "2020112301"
10 10
     '----系統閒置-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
11 11
     Public 判斷重登 As Boolean : Public 重登確認 As Boolean : Public 主頁開啟 As Boolean
12 12
     Public timeExit As Integer = 0 : Public timeExit2 As Integer = 0 : Public timeNow As Integer = 0 : Public timeNow2 As Integer = 0 : Public 密碼時限 As Integer = 30

Двоичные данные
工巧明智能管理系統/我的系統/bin/Debug/GCM-ERP-SYS.exe Просмотреть файл


Двоичные данные
工巧明智能管理系統/我的系統/bin/Debug/GCM-ERP-SYS.pdb Просмотреть файл


Двоичные данные
工巧明智能管理系統/我的系統/obj/x86/Debug/GCM-ERP-SYS.exe Просмотреть файл


Двоичные данные
工巧明智能管理系統/我的系統/obj/x86/Debug/GCM-ERP-SYS.pdb Просмотреть файл


+ 65
- 0
工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbproj.FileListAbsolute.txt Просмотреть файл

@@ -476,3 +476,68 @@ F:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\GCM-ERP-SY
476 476
 F:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\bin\Debug\GCM-ERP-SYS.pdb
477 477
 F:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\bin\Debug\GCM-ERP-SYS.xml
478 478
 F:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.vbprojAssemblyReference.cache
479
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\bin\Debug\GCM-ERP-SYS.exe.config
480
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\bin\Debug\GCM-ERP-SYS.exe
481
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\bin\Debug\GCM-ERP-SYS.pdb
482
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\bin\Debug\GCM-ERP-SYS.xml
483
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.vbprojAssemblyReference.cache
484
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.vbproj.ResolveComReference.cache
485
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.營運報表.resources
486
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.計算機.resources
487
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.會計科目管理.resources
488
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.測試下載.resources
489
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.營運成本收支單_對帳表.resources
490
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.營運成本收支單一覽表.resources
491
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.營運成本收支單審核.resources
492
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.營運成本收支單申請.resources
493
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.網段.resources
494
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統開發功能點檢表.resources
495
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統開發點檢控制表.resources
496
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統對應電腦註冊.resources
497
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統登出.resources
498
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統通用變數管理.resources
499
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.FTP資料夾管理.resources
500
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.人員入職資料表.resources
501
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.人員ID卡系統配置設定.resources
502
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.工作日誌與代辦事項.resources
503
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.個人帳號管理.resources
504
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統編碼原則_1.resources
505
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.開發文件存放區.resources
506
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.出庫紀錄表.resources
507
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.列印清單.resources
508
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.原代碼存放區.resources
509
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.品牌清單.resources
510
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.庫存管理.resources
511
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.服務項目成本建檔.resources
512
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.業務專案控制表.resources
513
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機台零件BOM表.resources
514
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機台零件成本建檔.resources
515
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機構件零件BOM表.resources
516
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.供應商資料.resources
517
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機構件零件成本建檔.resources
518
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機構科目清單.resources
519
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機構組件零件BOM表.resources
520
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.機構組件零件成本建檔.resources
521
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統使用者管理.resources
522
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.系統執行檔版本管理.resources
523
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.進貨管理.resources
524
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.銷貨管理.resources
525
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.零組件零件BOM表.resources
526
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.零組件零件成本建檔.resources
527
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.財務流水帳系統.resources
528
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.私有財務.resources
529
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.分類查詢.resources
530
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.匯率修改.resources
531
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.卜卦.resources
532
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.Login.resources
533
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.GCM_ERP_SYS.resources
534
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.Resources.resources
535
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.SplashScreen1.resources
536
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.月份查詢.resources
537
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.卜卦2.resources
538
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.零件成本建檔.resources
539
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.vbproj.GenerateResource.cache
540
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\工巧明智能管理系統.vbproj.CoreCompileInputs.cache
541
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\GCM-ERP-SYS.exe
542
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\GCM-ERP-SYS.xml
543
+G:\GCM-ERP-SYS\工巧明智能管理系統\我的系統\obj\x86\Debug\GCM-ERP-SYS.pdb

Двоичные данные
工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbproj.GenerateResource.cache Просмотреть файл


Двоичные данные
工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbproj.ResolveComReference.cache Просмотреть файл


Двоичные данные
工巧明智能管理系統/我的系統/obj/x86/Debug/工巧明智能管理系統.vbprojAssemblyReference.cache Просмотреть файл


+ 33
- 7
工巧明智能管理系統/我的系統/財務系統管理/匯率修改.Designer.vb Просмотреть файл

@@ -39,6 +39,8 @@ Partial Class 匯率修改
39 39
         Me.CheckBox1 = New System.Windows.Forms.CheckBox()
40 40
         Me.TextBox4 = New System.Windows.Forms.TextBox()
41 41
         Me.TextBox5 = New System.Windows.Forms.TextBox()
42
+        Me.TextBox6 = New System.Windows.Forms.TextBox()
43
+        Me.Label4 = New System.Windows.Forms.Label()
42 44
         CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
43 45
         Me.SuspendLayout()
44 46
         '
@@ -65,7 +67,7 @@ Partial Class 匯率修改
65 67
         '
66 68
         Me.Button2.Font = New System.Drawing.Font("微軟正黑體", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
67 69
         Me.Button2.ForeColor = System.Drawing.Color.DarkGreen
68
-        Me.Button2.Location = New System.Drawing.Point(12, 155)
70
+        Me.Button2.Location = New System.Drawing.Point(12, 185)
69 71
         Me.Button2.Name = "Button2"
70 72
         Me.Button2.Size = New System.Drawing.Size(101, 34)
71 73
         Me.Button2.TabIndex = 11
@@ -77,7 +79,7 @@ Partial Class 匯率修改
77 79
         Me.Button4.Enabled = False
78 80
         Me.Button4.Font = New System.Drawing.Font("微軟正黑體", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
79 81
         Me.Button4.ForeColor = System.Drawing.Color.Green
80
-        Me.Button4.Location = New System.Drawing.Point(119, 155)
82
+        Me.Button4.Location = New System.Drawing.Point(119, 185)
81 83
         Me.Button4.Name = "Button4"
82 84
         Me.Button4.Size = New System.Drawing.Size(120, 74)
83 85
         Me.Button4.TabIndex = 12
@@ -89,7 +91,7 @@ Partial Class 匯率修改
89 91
         Me.Button5.Enabled = False
90 92
         Me.Button5.Font = New System.Drawing.Font("微軟正黑體", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
91 93
         Me.Button5.ForeColor = System.Drawing.Color.Black
92
-        Me.Button5.Location = New System.Drawing.Point(12, 195)
94
+        Me.Button5.Location = New System.Drawing.Point(12, 225)
93 95
         Me.Button5.Name = "Button5"
94 96
         Me.Button5.Size = New System.Drawing.Size(101, 34)
95 97
         Me.Button5.TabIndex = 19
@@ -98,6 +100,7 @@ Partial Class 匯率修改
98 100
         '
99 101
         'DataGridView4
100 102
         '
103
+        Me.DataGridView4.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
101 104
         DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
102 105
         DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control
103 106
         DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -128,7 +131,7 @@ Partial Class 匯率修改
128 131
         Me.DataGridView4.RowHeadersWidth = 5
129 132
         Me.DataGridView4.RowTemplate.Height = 24
130 133
         Me.DataGridView4.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.[True]
131
-        Me.DataGridView4.Size = New System.Drawing.Size(331, 217)
134
+        Me.DataGridView4.Size = New System.Drawing.Size(410, 247)
132 135
         Me.DataGridView4.TabIndex = 39
133 136
         '
134 137
         'Label2
@@ -192,7 +195,7 @@ Partial Class 匯率修改
192 195
         '
193 196
         Me.TextBox4.Enabled = False
194 197
         Me.TextBox4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
195
-        Me.TextBox4.Location = New System.Drawing.Point(64, 235)
198
+        Me.TextBox4.Location = New System.Drawing.Point(277, 38)
196 199
         Me.TextBox4.Name = "TextBox4"
197 200
         Me.TextBox4.Size = New System.Drawing.Size(83, 23)
198 201
         Me.TextBox4.TabIndex = 90
@@ -202,17 +205,38 @@ Partial Class 匯率修改
202 205
         '
203 206
         Me.TextBox5.Enabled = False
204 207
         Me.TextBox5.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
205
-        Me.TextBox5.Location = New System.Drawing.Point(153, 235)
208
+        Me.TextBox5.Location = New System.Drawing.Point(366, 38)
206 209
         Me.TextBox5.Name = "TextBox5"
207 210
         Me.TextBox5.Size = New System.Drawing.Size(83, 23)
208 211
         Me.TextBox5.TabIndex = 91
209 212
         Me.TextBox5.Visible = False
210 213
         '
214
+        'TextBox6
215
+        '
216
+        Me.TextBox6.Enabled = False
217
+        Me.TextBox6.Font = New System.Drawing.Font("微軟正黑體", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
218
+        Me.TextBox6.Location = New System.Drawing.Point(92, 154)
219
+        Me.TextBox6.Name = "TextBox6"
220
+        Me.TextBox6.Size = New System.Drawing.Size(147, 29)
221
+        Me.TextBox6.TabIndex = 93
222
+        '
223
+        'Label4
224
+        '
225
+        Me.Label4.AutoSize = True
226
+        Me.Label4.Font = New System.Drawing.Font("微軟正黑體", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
227
+        Me.Label4.Location = New System.Drawing.Point(13, 157)
228
+        Me.Label4.Name = "Label4"
229
+        Me.Label4.Size = New System.Drawing.Size(73, 20)
230
+        Me.Label4.TabIndex = 92
231
+        Me.Label4.Text = "美金匯率"
232
+        '
211 233
         '匯率修改
212 234
         '
213 235
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
214 236
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
215
-        Me.ClientSize = New System.Drawing.Size(583, 236)
237
+        Me.ClientSize = New System.Drawing.Size(667, 265)
238
+        Me.Controls.Add(Me.TextBox6)
239
+        Me.Controls.Add(Me.Label4)
216 240
         Me.Controls.Add(Me.TextBox5)
217 241
         Me.Controls.Add(Me.TextBox4)
218 242
         Me.Controls.Add(Me.CheckBox1)
@@ -249,4 +273,6 @@ Partial Class 匯率修改
249 273
     Friend WithEvents CheckBox1 As CheckBox
250 274
     Friend WithEvents TextBox4 As TextBox
251 275
     Friend WithEvents TextBox5 As TextBox
276
+    Friend WithEvents TextBox6 As TextBox
277
+    Friend WithEvents Label4 As Label
252 278
 End Class

+ 14
- 13
工巧明智能管理系統/我的系統/財務系統管理/匯率修改.vb Просмотреть файл

@@ -7,9 +7,9 @@ Public Class 匯率修改
7 7
     Dim dr As SqlDataReader : Dim dr1 As SqlDataReader
8 8
     Dim zaq As New DataSet : Dim ds2 As DataSet
9 9
     Private Sub Set_grid()
10
-        DataGridView4.Columns(0).Width = 60 : DataGridView4.Columns(1).Width = 60
11
-        DataGridView4.Columns(2).Width = 60 : DataGridView4.Columns(3).Width = 60
12
-        DataGridView4.Columns(4).Width = 60
10
+        DataGridView4.Columns(0).FillWeight = 60 : DataGridView4.Columns(1).FillWeight = 60
11
+        DataGridView4.Columns(2).FillWeight = 60 : DataGridView4.Columns(3).FillWeight = 60
12
+        DataGridView4.Columns(4).FillWeight = 60 : DataGridView4.Columns(5).FillWeight = 60
13 13
     End Sub
14 14
     Private Sub Set_日期()
15 15
         TextBox4.Text = Format(DateTimePicker1.Value, "yyyy") : TextBox5.Text = Format(DateTimePicker1.Value, "MM")
@@ -20,7 +20,7 @@ Public Class 匯率修改
20 20
         DataGridView4.ColumnHeadersHeight = 25
21 21
         DataGridView4.AllowUserToAddRows = False
22 22
         If conn2.State = ConnectionState.Closed Then : conn2.ConnectionString = ConString : conn2.Open() : End If
23
-        SQL2 = "SELECT 年, 月, 買進匯率, 賣出匯率, 中心匯率 FROM 歷史匯率表 ORDER BY 年 DESC, 月 DESC"
23
+        SQL2 = "SELECT 年, 月, 買進匯率, 賣出匯率, 中心匯率, 美金匯率 FROM 歷史匯率表 ORDER BY 年 DESC, 月 DESC"
24 24
         cmd2.Connection = conn2 : cmd2.CommandText = SQL2 : wsx.SelectCommand = cmd2 : wsx.Fill(zaq) : DataGridView4.DataSource = zaq.Tables(0) : conn2.Close()
25 25
     End Sub
26 26
     Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView4.CellClick
@@ -28,6 +28,7 @@ Public Class 匯率修改
28 28
             TextBox2.Text = DataGridView4(2, e.RowIndex).Value.ToString
29 29
             TextBox3.Text = DataGridView4(3, e.RowIndex).Value.ToString
30 30
             TextBox1.Text = DataGridView4(4, e.RowIndex).Value.ToString
31
+            TextBox6.Text = DataGridView4(5, e.RowIndex).Value.ToString
31 32
         End If
32 33
     End Sub
33 34
     Private Sub Set_日期寫入()
@@ -37,14 +38,14 @@ Public Class 匯率修改
37 38
         cmd1.Connection = conn1 : cmd1.CommandText = SQL1 : dr1 = cmd1.ExecuteReader
38 39
         If dr1.Read() Then
39 40
             If conn.State = ConnectionState.Closed Then : conn.Open() : End If
40
-            SQL = "UPDATE 歷史匯率表 SET 買進匯率 = '" & TextBox2.Text & "', 賣出匯率 = '" & TextBox3.Text & "', 中心匯率 = '" & TextBox1.Text & "' " &
41
-                          "WHERE (年 LIKE '" & TextBox4.Text & "%') AND (月 LIKE '" & TextBox5.Text & "%')"
41
+            SQL = "UPDATE 歷史匯率表 SET 買進匯率 = '" & TextBox2.Text & "', 賣出匯率 = '" & TextBox3.Text & "', 中心匯率 = '" & TextBox1.Text & "', 美金匯率 = '" & TextBox6.Text & "'  
42
+                   WHERE (年 LIKE '" & TextBox4.Text & "%') AND (月 LIKE '" & TextBox5.Text & "%')"
42 43
             cmd.Connection = conn : cmd.CommandText = SQL : cmd.ExecuteNonQuery()
43 44
             conn.Close()
44 45
         Else
45 46
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
46
-            SQL = "INSERT INTO 歷史匯率表 (年, 月, 買進匯率, 賣出匯率, 中心匯率) VALUES ('" & TextBox4.Text & "','" & TextBox5.Text & "
47
-                          ','" & TextBox2.Text & "', '" & TextBox3.Text & "', '" & TextBox1.Text & "')"
47
+            SQL = "INSERT INTO 歷史匯率表 (年, 月, 買進匯率, 賣出匯率, 中心匯率, 美金匯率) VALUES ('" & TextBox4.Text & "','" & TextBox5.Text & "
48
+                          ','" & TextBox2.Text & "', '" & TextBox3.Text & "', '" & TextBox1.Text & "', '" & TextBox6.Text & "')"
48 49
             cmd.Connection = conn : cmd.CommandText = SQL : cmd.ExecuteNonQuery()
49 50
             conn.Close()
50 51
         End If
@@ -62,9 +63,9 @@ Public Class 匯率修改
62 63
         conn.Close() : dr.Close()
63 64
 
64 65
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
65
-        SQL = "SELECT 買進匯率, 賣出匯率 FROM 歷史匯率表  WHERE (年 LIKE '" & TextBox4.Text & "%') AND (月 LIKE '" & TextBox5.Text & "%')"
66
+        SQL = "SELECT 買進匯率, 賣出匯率, 美金匯率 FROM 歷史匯率表  WHERE (年 LIKE '" & TextBox4.Text & "%') AND (月 LIKE '" & TextBox5.Text & "%')"
66 67
         cmd.Connection = conn : cmd.CommandText = SQL : dr = cmd.ExecuteReader
67
-        If dr.Read() Then : TextBox2.Text = dr("買進匯率").ToString : TextBox3.Text = dr("賣出匯率").ToString : End If
68
+        If dr.Read() Then : TextBox2.Text = dr("買進匯率").ToString : TextBox3.Text = dr("賣出匯率").ToString : TextBox3.Text = dr("美金匯率").ToString : End If
68 69
         If TextBox1.Text = "" Then : TextBox1.Text = "0.00" : End If
69 70
         conn.Close() : dr.Close()
70 71
         Set_歷史匯率清單() : Set_grid() : Set_日期()
@@ -80,10 +81,10 @@ Public Class 匯率修改
80 81
         GCM_ERP_SYS.Timer1.Enabled = True
81 82
     End Sub
82 83
     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
83
-        TextBox1.Enabled = True : TextBox2.Enabled = True : TextBox3.Enabled = True : Button4.Enabled = True : Button5.Enabled = True
84
+        TextBox1.Enabled = True : TextBox2.Enabled = True : TextBox3.Enabled = True : TextBox6.Enabled = True : Button4.Enabled = True : Button5.Enabled = True
84 85
     End Sub
85 86
     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
86
-        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : Button4.Enabled = False : Button5.Enabled = False
87
+        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox6.Enabled = False : Button4.Enabled = False : Button5.Enabled = False
87 88
     End Sub
88 89
     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
89 90
         If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Then
@@ -101,7 +102,7 @@ Public Class 匯率修改
101 102
                 Set_日期寫入()
102 103
             End If
103 104
         End If
104
-        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : Button4.Enabled = False : Button5.Enabled = False
105
+        TextBox1.Enabled = False : TextBox2.Enabled = False : TextBox3.Enabled = False : TextBox6.Enabled = False : Button4.Enabled = False : Button5.Enabled = False
105 106
         Set_歷史匯率清單() : Set_grid() : Set_日期()
106 107
     End Sub
107 108
     Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged

+ 609
- 313
工巧明智能管理系統/我的系統/財務系統管理/營運報表.Designer.vb
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 729
- 512
工巧明智能管理系統/我的系統/財務系統管理/營運報表.vb
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 106
- 37
工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單一覽表.Designer.vb Просмотреть файл

@@ -33,7 +33,7 @@ Partial Class 營運成本收支單一覽表
33 33
         Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
34 34
         Me.Label5 = New System.Windows.Forms.Label()
35 35
         Me.TextBox4 = New System.Windows.Forms.TextBox()
36
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
36
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
37 37
         Me.Label3 = New System.Windows.Forms.Label()
38 38
         Me.TextBox3 = New System.Windows.Forms.TextBox()
39 39
         Me.Label1 = New System.Windows.Forms.Label()
@@ -47,8 +47,8 @@ Partial Class 營運成本收支單一覽表
47 47
         Me.Button1 = New System.Windows.Forms.Button()
48 48
         Me.Button3 = New System.Windows.Forms.Button()
49 49
         Me.Label4 = New System.Windows.Forms.Label()
50
-        Me.DateTimePicker3 = New System.Windows.Forms.DateTimePicker()
51
-        Me.DateTimePicker4 = New System.Windows.Forms.DateTimePicker()
50
+        Me.結束日期_dtp = New System.Windows.Forms.DateTimePicker()
51
+        Me.開始日期_dtp = New System.Windows.Forms.DateTimePicker()
52 52
         Me.TextBox6 = New System.Windows.Forms.TextBox()
53 53
         Me.Label9 = New System.Windows.Forms.Label()
54 54
         Me.TextBox7 = New System.Windows.Forms.TextBox()
@@ -76,7 +76,12 @@ Partial Class 營運成本收支單一覽表
76 76
         Me.Label16 = New System.Windows.Forms.Label()
77 77
         Me.TextBox15 = New System.Windows.Forms.TextBox()
78 78
         Me.Label17 = New System.Windows.Forms.Label()
79
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
79
+        Me.中間日期_dtp = New System.Windows.Forms.DateTimePicker()
80
+        Me.下個月_bt = New System.Windows.Forms.Button()
81
+        Me.上個月_bt = New System.Windows.Forms.Button()
82
+        Me.一般月_ch = New System.Windows.Forms.CheckBox()
83
+        Me.會計月_ch = New System.Windows.Forms.CheckBox()
84
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
80 85
         CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).BeginInit()
81 86
         CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
82 87
         Me.ContextMenuStrip1.SuspendLayout()
@@ -140,23 +145,23 @@ Partial Class 營運成本收支單一覽表
140 145
         Me.TextBox4.Size = New System.Drawing.Size(74, 23)
141 146
         Me.TextBox4.TabIndex = 866
142 147
         '
143
-        'DataGridView1
148
+        '明細_dgv
144 149
         '
145 150
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
146
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
147
-        Me.DataGridView1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
151
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
152
+        Me.明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
148 153
             Or System.Windows.Forms.AnchorStyles.Left) _
149 154
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
150
-        Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
151
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
152
-        Me.DataGridView1.Location = New System.Drawing.Point(328, 82)
153
-        Me.DataGridView1.Name = "DataGridView1"
154
-        Me.DataGridView1.RowHeadersWidth = 5
155
+        Me.明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
156
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
157
+        Me.明細_dgv.Location = New System.Drawing.Point(328, 82)
158
+        Me.明細_dgv.Name = "明細_dgv"
159
+        Me.明細_dgv.RowHeadersWidth = 5
155 160
         DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
156
-        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle2
157
-        Me.DataGridView1.RowTemplate.Height = 24
158
-        Me.DataGridView1.Size = New System.Drawing.Size(1227, 524)
159
-        Me.DataGridView1.TabIndex = 865
161
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
162
+        Me.明細_dgv.RowTemplate.Height = 24
163
+        Me.明細_dgv.Size = New System.Drawing.Size(1227, 524)
164
+        Me.明細_dgv.TabIndex = 865
160 165
         '
161 166
         'Label3
162 167
         '
@@ -211,11 +216,11 @@ Partial Class 營運成本收支單一覽表
211 216
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
212 217
         Me.DataGridView4.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
213 218
         Me.DataGridView4.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
214
-        Me.DataGridView4.Location = New System.Drawing.Point(9, 56)
219
+        Me.DataGridView4.Location = New System.Drawing.Point(9, 82)
215 220
         Me.DataGridView4.Name = "DataGridView4"
216 221
         Me.DataGridView4.RowHeadersWidth = 5
217 222
         Me.DataGridView4.RowTemplate.Height = 24
218
-        Me.DataGridView4.Size = New System.Drawing.Size(315, 500)
223
+        Me.DataGridView4.Size = New System.Drawing.Size(315, 474)
219 224
         Me.DataGridView4.TabIndex = 857
220 225
         '
221 226
         'DateTimePicker2
@@ -292,21 +297,21 @@ Partial Class 營運成本收支單一覽表
292 297
         Me.Label4.TabIndex = 888
293 298
         Me.Label4.Text = "到"
294 299
         '
295
-        'DateTimePicker3
300
+        '結束日期_dtp
296 301
         '
297
-        Me.DateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
298
-        Me.DateTimePicker3.Location = New System.Drawing.Point(128, 30)
299
-        Me.DateTimePicker3.Name = "DateTimePicker3"
300
-        Me.DateTimePicker3.Size = New System.Drawing.Size(91, 23)
301
-        Me.DateTimePicker3.TabIndex = 887
302
+        Me.結束日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
303
+        Me.結束日期_dtp.Location = New System.Drawing.Point(128, 30)
304
+        Me.結束日期_dtp.Name = "結束日期_dtp"
305
+        Me.結束日期_dtp.Size = New System.Drawing.Size(91, 23)
306
+        Me.結束日期_dtp.TabIndex = 887
302 307
         '
303
-        'DateTimePicker4
308
+        '開始日期_dtp
304 309
         '
305
-        Me.DateTimePicker4.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
306
-        Me.DateTimePicker4.Location = New System.Drawing.Point(8, 30)
307
-        Me.DateTimePicker4.Name = "DateTimePicker4"
308
-        Me.DateTimePicker4.Size = New System.Drawing.Size(91, 23)
309
-        Me.DateTimePicker4.TabIndex = 886
310
+        Me.開始日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
311
+        Me.開始日期_dtp.Location = New System.Drawing.Point(8, 30)
312
+        Me.開始日期_dtp.Name = "開始日期_dtp"
313
+        Me.開始日期_dtp.Size = New System.Drawing.Size(91, 23)
314
+        Me.開始日期_dtp.TabIndex = 886
310 315
         '
311 316
         'TextBox6
312 317
         '
@@ -575,12 +580,71 @@ Partial Class 營運成本收支單一覽表
575 580
         Me.Label17.TabIndex = 970
576 581
         Me.Label17.Text = "現金"
577 582
         '
583
+        '中間日期_dtp
584
+        '
585
+        Me.中間日期_dtp.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
586
+        Me.中間日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
587
+        Me.中間日期_dtp.Location = New System.Drawing.Point(32, 100)
588
+        Me.中間日期_dtp.Name = "中間日期_dtp"
589
+        Me.中間日期_dtp.Size = New System.Drawing.Size(43, 23)
590
+        Me.中間日期_dtp.TabIndex = 1168
591
+        Me.中間日期_dtp.Visible = False
592
+        '
593
+        '下個月_bt
594
+        '
595
+        Me.下個月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
596
+        Me.下個月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
597
+        Me.下個月_bt.Location = New System.Drawing.Point(267, 56)
598
+        Me.下個月_bt.Name = "下個月_bt"
599
+        Me.下個月_bt.Size = New System.Drawing.Size(57, 23)
600
+        Me.下個月_bt.TabIndex = 1170
601
+        Me.下個月_bt.Text = "下個月"
602
+        Me.下個月_bt.UseVisualStyleBackColor = True
603
+        '
604
+        '上個月_bt
605
+        '
606
+        Me.上個月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
607
+        Me.上個月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
608
+        Me.上個月_bt.Location = New System.Drawing.Point(209, 56)
609
+        Me.上個月_bt.Name = "上個月_bt"
610
+        Me.上個月_bt.Size = New System.Drawing.Size(57, 23)
611
+        Me.上個月_bt.TabIndex = 1169
612
+        Me.上個月_bt.Text = "上個月"
613
+        Me.上個月_bt.UseVisualStyleBackColor = True
614
+        '
615
+        '一般月_ch
616
+        '
617
+        Me.一般月_ch.AutoSize = True
618
+        Me.一般月_ch.Checked = True
619
+        Me.一般月_ch.CheckState = System.Windows.Forms.CheckState.Checked
620
+        Me.一般月_ch.Location = New System.Drawing.Point(128, 58)
621
+        Me.一般月_ch.Name = "一般月_ch"
622
+        Me.一般月_ch.Size = New System.Drawing.Size(63, 20)
623
+        Me.一般月_ch.TabIndex = 1172
624
+        Me.一般月_ch.Text = "一般月"
625
+        Me.一般月_ch.UseVisualStyleBackColor = True
626
+        '
627
+        '會計月_ch
628
+        '
629
+        Me.會計月_ch.AutoSize = True
630
+        Me.會計月_ch.Location = New System.Drawing.Point(36, 58)
631
+        Me.會計月_ch.Name = "會計月_ch"
632
+        Me.會計月_ch.Size = New System.Drawing.Size(63, 20)
633
+        Me.會計月_ch.TabIndex = 1171
634
+        Me.會計月_ch.Text = "會計月"
635
+        Me.會計月_ch.UseVisualStyleBackColor = True
636
+        '
578 637
         '營運成本收支單一覽表
579 638
         '
580 639
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
581 640
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
582 641
         Me.ClientSize = New System.Drawing.Size(1562, 611)
583 642
         Me.ContextMenuStrip = Me.ContextMenuStrip1
643
+        Me.Controls.Add(Me.一般月_ch)
644
+        Me.Controls.Add(Me.會計月_ch)
645
+        Me.Controls.Add(Me.下個月_bt)
646
+        Me.Controls.Add(Me.上個月_bt)
647
+        Me.Controls.Add(Me.中間日期_dtp)
584 648
         Me.Controls.Add(Me.Label2)
585 649
         Me.Controls.Add(Me.TextBox2)
586 650
         Me.Controls.Add(Me.Label12)
@@ -609,8 +673,8 @@ Partial Class 營運成本收支單一覽表
609 673
         Me.Controls.Add(Me.Button1)
610 674
         Me.Controls.Add(Me.Button3)
611 675
         Me.Controls.Add(Me.Label4)
612
-        Me.Controls.Add(Me.DateTimePicker3)
613
-        Me.Controls.Add(Me.DateTimePicker4)
676
+        Me.Controls.Add(Me.結束日期_dtp)
677
+        Me.Controls.Add(Me.開始日期_dtp)
614 678
         Me.Controls.Add(Me.TextBox5)
615 679
         Me.Controls.Add(Me.Label10)
616 680
         Me.Controls.Add(Me.Button2)
@@ -626,13 +690,13 @@ Partial Class 營運成本收支單一覽表
626 690
         Me.Controls.Add(Me.DataGridView4)
627 691
         Me.Controls.Add(Me.Label1)
628 692
         Me.Controls.Add(Me.Label3)
693
+        Me.Controls.Add(Me.明細_dgv)
629 694
         Me.Controls.Add(Me.DataGridView2)
630
-        Me.Controls.Add(Me.DataGridView1)
631 695
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
632 696
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
633 697
         Me.Name = "營運成本收支單一覽表"
634 698
         Me.Text = "營運成本收支單一覽表"
635
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
699
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
636 700
         CType(Me.DataGridView4, System.ComponentModel.ISupportInitialize).EndInit()
637 701
         CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
638 702
         Me.ContextMenuStrip1.ResumeLayout(False)
@@ -647,7 +711,7 @@ Partial Class 營運成本收支單一覽表
647 711
     Friend WithEvents DateTimePicker1 As DateTimePicker
648 712
     Friend WithEvents Label5 As Label
649 713
     Friend WithEvents TextBox4 As TextBox
650
-    Friend WithEvents DataGridView1 As DataGridView
714
+    Friend WithEvents 明細_dgv As DataGridView
651 715
     Friend WithEvents Label3 As Label
652 716
     Friend WithEvents TextBox3 As TextBox
653 717
     Friend WithEvents Label1 As Label
@@ -661,8 +725,8 @@ Partial Class 營運成本收支單一覽表
661 725
     Friend WithEvents Button1 As Button
662 726
     Friend WithEvents Button3 As Button
663 727
     Friend WithEvents Label4 As Label
664
-    Friend WithEvents DateTimePicker3 As DateTimePicker
665
-    Friend WithEvents DateTimePicker4 As DateTimePicker
728
+    Friend WithEvents 結束日期_dtp As DateTimePicker
729
+    Friend WithEvents 開始日期_dtp As DateTimePicker
666 730
     Friend WithEvents TextBox6 As TextBox
667 731
     Friend WithEvents Label9 As Label
668 732
     Friend WithEvents TextBox7 As TextBox
@@ -690,4 +754,9 @@ Partial Class 營運成本收支單一覽表
690 754
     Friend WithEvents Label16 As Label
691 755
     Friend WithEvents TextBox15 As TextBox
692 756
     Friend WithEvents Label17 As Label
757
+    Friend WithEvents 中間日期_dtp As DateTimePicker
758
+    Friend WithEvents 下個月_bt As Button
759
+    Friend WithEvents 上個月_bt As Button
760
+    Friend WithEvents 一般月_ch As CheckBox
761
+    Friend WithEvents 會計月_ch As CheckBox
693 762
 End Class

+ 106
- 56
工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單一覽表.vb Просмотреть файл

@@ -28,7 +28,7 @@ Public Class 營運成本收支單一覽表
28 28
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
29 29
         SQL1 = "SELECT 支付單號 AS 收支單號, 申請人, 申請日期, 審核人, 審核日期, 核准圖檔,  簽名編碼 FROM 公帳控制表 
30 30
                 WHERE (審核人 NOT LIKE '') AND (審核人 NOT LIKE '作廢%') AND 
31
-                審核日期 BETWEEN '" & Strings.Format(DateTimePicker4.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(DateTimePicker3.Value, "yyyy/MM/dd") & "'
31
+                審核日期 BETWEEN '" & Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd") & "'
32 32
                 ORDER BY 審核日期 DESC"
33 33
         cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : DataGridView4.DataSource = ds1.Tables(0) : conn.Close()
34 34
 
@@ -47,7 +47,7 @@ Public Class 營運成本收支單一覽表
47 47
                 FROM        公帳控制表 RIGHT OUTER JOIN
48 48
                             公帳流水帳 ON 公帳控制表.支付單號 = 公帳流水帳.支付單號 RIGHT OUTER JOIN
49 49
                             會計科目 ON 公帳流水帳.類別 = 會計科目.編號
50
-                WHERE      (公帳控制表.審核日期 BETWEEN '" & Strings.Format(DateTimePicker4.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(DateTimePicker3.Value, "yyyy/MM/dd") & "')
50
+                WHERE      (公帳控制表.審核日期 BETWEEN '" & Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd") & "')
51 51
                 GROUP BY    會計科目.第一階, 會計科目.第二階, 會計科目.會計科目, LEFT(會計科目.編號, 7), 
52 52
                             LEFT(公帳控制表.審核日期, 7), 公帳流水帳.銀行, 公帳流水帳.匯率
53 53
                 ORDER BY    幣別, LEFT(公帳控制表.審核日期, 7), LEFT(會計科目.編號, 7)"
@@ -69,53 +69,54 @@ Public Class 營運成本收支單一覽表
69 69
         DataGridView2.Columns(4).ReadOnly = True : DataGridView2.Columns(5).ReadOnly = True : DataGridView2.Columns(6).ReadOnly = True : DataGridView2.Columns(7).ReadOnly = True
70 70
     End Sub
71 71
     Private Sub Set_費用清單()
72
-        DataGridView1.DataSource = Nothing : ds.Clear()
73
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
74
-        DataGridView1.ColumnHeadersHeight = 25
75
-        DataGridView1.AllowUserToAddRows = False
76
-        DataGridView1.RowTemplate.Height = 35
72
+        明細_dgv.DataSource = Nothing : ds.Clear()
73
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
74
+        明細_dgv.ColumnHeadersHeight = 25
75
+        明細_dgv.AllowUserToAddRows = False
76
+        明細_dgv.RowTemplate.Height = 35
77 77
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
78 78
         SQL1 = "SELECT      公帳流水帳.支付單號, 公帳流水帳.項次, 會計科目.會計科目, 公帳流水帳.明細 AS 用途, 
79
-                            公帳流水帳.零用金, 公帳流水帳.支票數 AS 支票, 公帳流水帳.收入 AS 現金, 
80
-                            公帳流水帳.支出, 公帳流水帳.備註 AS 票期, 公帳流水帳.匯率, 公帳流水帳.銀行 AS 幣別, 公帳流水帳.類別, 公帳流水帳.流水號
79
+                            Cast(公帳流水帳.零用金 AS money) AS 零用金, Cast(公帳流水帳.支票數 AS money) AS 支票, Cast(公帳流水帳.收入 AS money) AS 現金, 
80
+                            Cast(公帳流水帳.支出 AS money) AS 支出, 公帳流水帳.備註 AS 票期, 公帳流水帳.匯率, 公帳流水帳.銀行 AS 幣別, 公帳流水帳.類別, 公帳流水帳.流水號
81 81
                 FROM        公帳流水帳 INNER JOIN
82 82
                             會計科目 ON 公帳流水帳.類別 = 會計科目.編號
83 83
                 WHERE      (公帳流水帳.支付單號 LIKE '" & TextBox1.Text & "')
84 84
                 ORDER BY    公帳流水帳.項次"
85
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
85
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
86 86
 
87
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).FillWeight = 80 : DataGridView1.Columns(2).FillWeight = 300 : DataGridView1.Columns(3).FillWeight = 500
88
-        DataGridView1.Columns(4).FillWeight = 140 : DataGridView1.Columns(5).FillWeight = 140 : DataGridView1.Columns(6).FillWeight = 140 : DataGridView1.Columns(7).FillWeight = 140
89
-        DataGridView1.Columns(8).FillWeight = 140 : DataGridView1.Columns(9).FillWeight = 140 : DataGridView1.Columns(10).FillWeight = 140 : DataGridView1.Columns(11).Visible = False
90
-        DataGridView1.Columns(12).Visible = False
87
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).FillWeight = 80 : 明細_dgv.Columns(2).FillWeight = 300 : 明細_dgv.Columns(3).FillWeight = 500
88
+        明細_dgv.Columns(4).FillWeight = 140 : 明細_dgv.Columns(5).FillWeight = 140 : 明細_dgv.Columns(6).FillWeight = 140 : 明細_dgv.Columns(7).FillWeight = 140
89
+        明細_dgv.Columns(8).FillWeight = 140 : 明細_dgv.Columns(9).FillWeight = 140 : 明細_dgv.Columns(10).FillWeight = 140 : 明細_dgv.Columns(11).Visible = False
90
+        明細_dgv.Columns(12).Visible = False
91 91
 
92
-        DataGridView1.Columns(1).ReadOnly = True : DataGridView1.Columns(2).ReadOnly = True : DataGridView1.Columns(9).ReadOnly = True : DataGridView1.Columns(10).ReadOnly = True
92
+        明細_dgv.Columns(1).ReadOnly = True : 明細_dgv.Columns(2).ReadOnly = True : 明細_dgv.Columns(9).ReadOnly = True : 明細_dgv.Columns(10).ReadOnly = True
93 93
 
94
-        DataGridView1.Columns(4).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(5).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(6).DefaultCellStyle.Format = "#,##0.00"
95
-        DataGridView1.Columns(7).DefaultCellStyle.Format = "#,##0.00" : DataGridView1.Columns(8).DefaultCellStyle.Format = "#,##0.00"
96
-        DataGridView1.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
97
-        DataGridView1.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
98
-        DataGridView1.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
99
-        DataGridView1.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
100
-        DataGridView1.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
101
-        DataGridView1.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
102
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
103
-        DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
94
+        明細_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(5).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00"
95
+        明細_dgv.Columns(7).DefaultCellStyle.Format = "#,##0.00"
96
+        明細_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
97
+        明細_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
98
+        明細_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
99
+        明細_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
100
+        明細_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
101
+        明細_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
102
+        明細_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
103
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
104 104
 
105
-        TextBox5.Text = "0.00.00" : TextBox7.Text = "0.00.00" : TextBox6.Text = "0.00" : TextBox10.Text = "0.00" : TextBox11.Text = "0.00"
106
-        TextBox2.Text = "0.00.00" : TextBox8.Text = "0.00.00" : TextBox15.Text = "0.00" : TextBox12.Text = "0.00" : TextBox9.Text = "0.00"
107
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
108
-            If DataGridView1.Rows(i).Cells("幣別").Value = "台幣現金" Then
109
-                TextBox5.Text = Val(TextBox5.Text) + DataGridView1.Rows(i).Cells("現金").Value
110
-                TextBox7.Text = Val(TextBox7.Text) + DataGridView1.Rows(i).Cells("支出").Value
111
-                TextBox10.Text = Val(TextBox10.Text) + DataGridView1.Rows(i).Cells("零用金").Value
112
-                TextBox11.Text = Val(TextBox11.Text) + DataGridView1.Rows(i).Cells("支票").Value
105
+        TextBox5.Text = "0.00" : TextBox7.Text = "0.00" : TextBox6.Text = "0.00" : TextBox10.Text = "0.00" : TextBox11.Text = "0.00"
106
+        TextBox2.Text = "0.00" : TextBox8.Text = "0.00" : TextBox15.Text = "0.00" : TextBox12.Text = "0.00" : TextBox9.Text = "0.00"
107
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
108
+            If 明細_dgv.Rows(i).Cells("幣別").Value = "台幣現金" Then
109
+                TextBox5.Text = Val(TextBox5.Text) + 明細_dgv.Rows(i).Cells("現金").Value
110
+                TextBox7.Text = Val(TextBox7.Text) + 明細_dgv.Rows(i).Cells("支出").Value
111
+                TextBox10.Text = Val(TextBox10.Text) + 明細_dgv.Rows(i).Cells("零用金").Value
112
+                TextBox11.Text = Val(TextBox11.Text) + 明細_dgv.Rows(i).Cells("支票").Value
113 113
             End If
114
-            If DataGridView1.Rows(i).Cells("幣別").Value = "人民幣現金" Then
115
-                TextBox15.Text = Val(TextBox15.Text) + DataGridView1.Rows(i).Cells("現金").Value
116
-                TextBox12.Text = Val(TextBox12.Text) + DataGridView1.Rows(i).Cells("支出").Value
117
-                TextBox2.Text = Val(TextBox2.Text) + DataGridView1.Rows(i).Cells("零用金").Value
118
-                TextBox8.Text = Val(TextBox8.Text) + DataGridView1.Rows(i).Cells("支票").Value
114
+            If 明細_dgv.Rows(i).Cells("幣別").Value = "人民幣現金" Then
115
+                TextBox15.Text = Val(TextBox15.Text) + 明細_dgv.Rows(i).Cells("現金").Value
116
+                TextBox12.Text = Val(TextBox12.Text) + 明細_dgv.Rows(i).Cells("支出").Value
117
+
118
+                TextBox2.Text = Val(TextBox2.Text) + 明細_dgv.Rows(i).Cells("零用金").Value
119
+                TextBox8.Text = Val(TextBox8.Text) + 明細_dgv.Rows(i).Cells("支票").Value
119 120
             End If
120 121
         Next i
121 122
         TextBox6.Text = Val(TextBox10.Text) + Val(TextBox5.Text) - Val(TextBox7.Text) : TextBox9.Text = Val(TextBox2.Text) + Val(TextBox15.Text) - Val(TextBox12.Text)
@@ -126,11 +127,28 @@ Public Class 營運成本收支單一覽表
126 127
         TextBox2.Text = Strings.Format(Val(TextBox2.Text), "#,##0.00") : TextBox8.Text = Strings.Format(Val(TextBox8.Text), "#,##0.00") : TextBox15.Text = Strings.Format(Val(TextBox15.Text), "#,##0.00")
127 128
         TextBox12.Text = Strings.Format(Val(TextBox12.Text), "#,##0.00") : TextBox9.Text = Strings.Format(Val(TextBox9.Text), "#,##0.00")
128 129
     End Sub
130
+    Private Sub 日期格式()
131
+        If 會計月_ch.Checked = True Then
132
+            '-------------日期一----------------------------------------------------------------------------------------
133
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
134
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(-1)
135
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "26" : 開始日期_dtp.Value = DTP
136
+            '-------------日期二----------------------------------------------------------------------------------------
137
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "25" : 結束日期_dtp.Value = DTP
138
+        Else
139
+            '-------------日期一----------------------------------------------------------------------------------------
140
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(1)
141
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
142
+            '-------------日期二----------------------------------------------------------------------------------------
143
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 結束日期_dtp.Value = DTP
144
+            結束日期_dtp.Value = 結束日期_dtp.Value.AddMonths(1) : 結束日期_dtp.Value = 結束日期_dtp.Value.AddDays(-1)
145
+        End If
146
+    End Sub
129 147
     Private Sub 營運費用支付單一覽表_Load(sender As Object, e As EventArgs) Handles MyBase.Load
130 148
         Me.MdiParent = GCM_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
131 149
         DTP = Strings.Left(Strings.Format(Today(), "yyyy/MM/dd"), 8) & "01"
132
-        DateTimePicker4.Value = DTP : DateTimePicker3.Value = Today()
133
-        DataGridView2.Visible = False : RadioButton1.Checked = True
150
+        開始日期_dtp.Value = DTP : 結束日期_dtp.Value = Today()
151
+        日期格式() : DataGridView2.Visible = False : RadioButton1.Checked = True
134 152
     End Sub
135 153
     Private Sub DataGridView4_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView4.CellClick
136 154
         If e.RowIndex = -1 Then : Else
@@ -171,11 +189,11 @@ Public Class 營運成本收支單一覽表
171 189
     End Sub
172 190
     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
173 191
         DTP = Strings.Format(Today(), "yyyy/MM/dd")
174
-        DateTimePicker4.Value = DTP : DateTimePicker3.Value = DTP
192
+        開始日期_dtp.Value = DTP : 結束日期_dtp.Value = DTP
175 193
     End Sub
176 194
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
177 195
         DTP = Strings.Left(Strings.Format(Today(), "yyyy/MM/dd"), 8) & "01"
178
-        DateTimePicker4.Value = DTP : DateTimePicker3.Value = Today()
196
+        開始日期_dtp.Value = DTP : 結束日期_dtp.Value = Today()
179 197
     End Sub
180 198
     Private Sub 彙總計算()
181 199
         If RadioButton1.Checked = False And RadioButton2.Checked = True Then
@@ -189,10 +207,12 @@ Public Class 營運成本收支單一覽表
189 207
                     TextBox11.Text = Val(TextBox11.Text) + DataGridView2.Rows(i).Cells("支票").Value
190 208
                 End If
191 209
                 If DataGridView2.Rows(i).Cells("幣別").Value = "人民幣現金" Then
192
-                    TextBox15.Text = Val(TextBox15.Text) + DataGridView2.Rows(i).Cells("現金").Value
193
-                    TextBox12.Text = Val(TextBox12.Text) + DataGridView2.Rows(i).Cells("支出").Value
194
-                    TextBox2.Text = Val(TextBox2.Text) + DataGridView2.Rows(i).Cells("零用金").Value
195
-                    TextBox8.Text = Val(TextBox8.Text) + DataGridView2.Rows(i).Cells("支票").Value
210
+                    If DataGridView2.Rows(i).Cells("主項").Value <> "上月結存" Then
211
+                        TextBox15.Text = Val(TextBox15.Text) + DataGridView2.Rows(i).Cells("現金").Value
212
+                        TextBox12.Text = Val(TextBox12.Text) + DataGridView2.Rows(i).Cells("支出").Value
213
+                        TextBox2.Text = Val(TextBox2.Text) + DataGridView2.Rows(i).Cells("零用金").Value
214
+                        TextBox8.Text = Val(TextBox8.Text) + DataGridView2.Rows(i).Cells("支票").Value
215
+                    End If
196 216
                 End If
197 217
             Next i
198 218
             TextBox6.Text = Val(TextBox10.Text) + Val(TextBox5.Text) - Val(TextBox7.Text) : TextBox9.Text = Val(TextBox2.Text) + Val(TextBox15.Text) - Val(TextBox12.Text)
@@ -204,19 +224,49 @@ Public Class 營運成本收支單一覽表
204 224
             TextBox12.Text = Strings.Format(Val(TextBox12.Text), "#,##0.00") : TextBox9.Text = Strings.Format(Val(TextBox9.Text), "#,##0.00")
205 225
         End If
206 226
     End Sub
207
-    Private Sub DateTimePicker4_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker4.ValueChanged
227
+    Private Sub 上個月_bt_Click(sender As Object, e As EventArgs) Handles 上個月_bt.Click
228
+        If 會計月_ch.Checked = True Then
229
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
230
+            開始日期_dtp.Value = 中間日期_dtp.Value
231
+            結束日期_dtp.Value = 中間日期_dtp.Value
232
+        Else
233
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
234
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
235
+            結束日期_dtp.Value = 中間日期_dtp.Value
236
+        End If
237
+        日期格式()
238
+    End Sub
239
+    Private Sub 下個月_bt_Click(sender As Object, e As EventArgs) Handles 下個月_bt.Click
240
+        If 會計月_ch.Checked = True Then
241
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
242
+            開始日期_dtp.Value = 中間日期_dtp.Value
243
+            結束日期_dtp.Value = 中間日期_dtp.Value
244
+        Else
245
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
246
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
247
+            結束日期_dtp.Value = 中間日期_dtp.Value
248
+        End If
249
+        日期格式()
250
+    End Sub
251
+    Private Sub DateTimePicker4_ValueChanged(sender As Object, e As EventArgs) Handles 開始日期_dtp.ValueChanged
208 252
         Set_清單1() : Set_清單2() : 彙總計算()
209 253
     End Sub
210
-    Private Sub DateTimePicker3_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker3.ValueChanged
254
+    Private Sub DateTimePicker3_ValueChanged(sender As Object, e As EventArgs) Handles 結束日期_dtp.ValueChanged
211 255
         Set_清單1() : Set_清單2() : 彙總計算()
212 256
     End Sub
257
+    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月_ch.Click
258
+        會計月_ch.Checked = True : 一般月_ch.Checked = False : 日期格式()
259
+    End Sub
260
+    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月_ch.Click
261
+        會計月_ch.Checked = False : 一般月_ch.Checked = True : 日期格式()
262
+    End Sub
213 263
     Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.Click
214
-        DataGridView1.Visible = True : DataGridView2.Visible = False : RadioButton1.Checked = True : RadioButton2.Checked = False
264
+        明細_dgv.Visible = True : DataGridView2.Visible = False : RadioButton1.Checked = True : RadioButton2.Checked = False
215 265
         TextBox5.Text = "0.00" : TextBox7.Text = "0.00" : TextBox6.Text = "0.00" : TextBox10.Text = "0.00" : TextBox11.Text = "0.00" : DataGridView4.Enabled = True
216 266
     End Sub
217 267
     Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.Click
218
-        DataGridView1.Visible = False : DataGridView2.Visible = True : RadioButton1.Checked = False : RadioButton2.Checked = True
219
-        TextBox1.Text = "" : TextBox3.Text = "" : TextBox4.Text = "" : DataGridView1.DataSource = Nothing : ds.Clear() : DataGridView4.Enabled = False
268
+        明細_dgv.Visible = False : DataGridView2.Visible = True : RadioButton1.Checked = False : RadioButton2.Checked = True
269
+        TextBox1.Text = "" : TextBox3.Text = "" : TextBox4.Text = "" : 明細_dgv.DataSource = Nothing : ds.Clear() : DataGridView4.Enabled = False
220 270
         彙總計算()
221 271
     End Sub
222 272
     Private Sub TextBox14_TextChanged(sender As Object, e As EventArgs) Handles TextBox14.TextChanged
@@ -248,11 +298,11 @@ Public Class 營運成本收支單一覽表
248 298
             xlSheet.Cells(2, 1) = "收款日期" : xlSheet.Cells(2, 2) = "會計科目" : xlSheet.Cells(2, 3) = "客戶或用途"
249 299
             xlSheet.Cells(2, 4) = "零用金" : xlSheet.Cells(2, 5) = "支票" : xlSheet.Cells(2, 6) = "現金" : xlSheet.Cells(2, 7) = "支出" : xlSheet.Cells(2, 8) = "現金餘額" : xlSheet.Cells(2, 9) = "票期"
250 300
 
251
-            For i As Integer = 0 To DataGridView1.Rows.Count - 1
252
-                xlSheet.Cells(i + 3, 1) = DateTimePicker1.Value : xlSheet.Cells(i + 3, 2) = DataGridView1.Rows(i).Cells("會計科目").Value
253
-                xlSheet.Cells(i + 3, 3) = DataGridView1.Rows(i).Cells("用途").Value : xlSheet.Cells(i + 3, 4) = DataGridView1.Rows(i).Cells("零用金").Value
254
-                xlSheet.Cells(i + 3, 5) = DataGridView1.Rows(i).Cells("支票").Value : xlSheet.Cells(i + 3, 6) = DataGridView1.Rows(i).Cells("現金").Value
255
-                xlSheet.Cells(i + 3, 7) = DataGridView1.Rows(i).Cells("支出").Value : xlSheet.Cells(i + 3, 9) = DataGridView1.Rows(i).Cells("票期").Value
301
+            For i As Integer = 0 To 明細_dgv.Rows.Count - 1
302
+                xlSheet.Cells(i + 3, 1) = DateTimePicker1.Value : xlSheet.Cells(i + 3, 2) = 明細_dgv.Rows(i).Cells("會計科目").Value
303
+                xlSheet.Cells(i + 3, 3) = 明細_dgv.Rows(i).Cells("用途").Value : xlSheet.Cells(i + 3, 4) = 明細_dgv.Rows(i).Cells("零用金").Value
304
+                xlSheet.Cells(i + 3, 5) = 明細_dgv.Rows(i).Cells("支票").Value : xlSheet.Cells(i + 3, 6) = 明細_dgv.Rows(i).Cells("現金").Value
305
+                xlSheet.Cells(i + 3, 7) = 明細_dgv.Rows(i).Cells("支出").Value : xlSheet.Cells(i + 3, 9) = 明細_dgv.Rows(i).Cells("票期").Value
256 306
                 If i = 0 Then
257 307
                     xlSheet.Cells(i + 3, 8) = "=D3+F3-G3"
258 308
                 Else

+ 2
- 0
工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單審核.Designer.vb Просмотреть файл

@@ -230,6 +230,8 @@ Partial Class 營運成本收支單審核
230 230
         'CheckBox1
231 231
         '
232 232
         Me.CheckBox1.AutoSize = True
233
+        Me.CheckBox1.Checked = True
234
+        Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
233 235
         Me.CheckBox1.Location = New System.Drawing.Point(833, 5)
234 236
         Me.CheckBox1.Name = "CheckBox1"
235 237
         Me.CheckBox1.Size = New System.Drawing.Size(39, 20)

+ 1
- 1
工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單審核.vb Просмотреть файл

@@ -33,7 +33,7 @@ Public Class 營運成本收支單審核
33 33
         DataGridView1.RowTemplate.Height = 35
34 34
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
35 35
         SQL1 = "SELECT      公帳流水帳.支付單號, 公帳流水帳.項次, 會計科目.會計科目, 公帳流水帳.明細 AS 用途, 
36
-                            公帳流水帳.零用金, 公帳流水帳.支票數 AS 支票, Cast(公帳流水帳.收入 AS money) AS 現金, 
36
+                            Cast(公帳流水帳.零用金 AS money) AS 零用金, Cast(公帳流水帳.支票數 AS money) AS 支票, Cast(公帳流水帳.收入 AS money) AS 現金, 
37 37
                             Cast(公帳流水帳.支出 AS money) AS 支出, 公帳流水帳.備註 AS 票期, 公帳流水帳.匯率, 公帳流水帳.銀行 AS 幣別, 公帳流水帳.類別, 公帳流水帳.流水號
38 38
                 FROM        公帳流水帳 INNER JOIN
39 39
                             會計科目 ON 公帳流水帳.類別 = 會計科目.編號

+ 42
- 26
工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單申請.Designer.vb Просмотреть файл

@@ -76,8 +76,9 @@ Partial Class 營運成本收支單申請
76 76
         Me.TextBox9 = New System.Windows.Forms.TextBox()
77 77
         Me.ComboBox6 = New System.Windows.Forms.ComboBox()
78 78
         Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
79
-        Me.ComboBox7 = New System.Windows.Forms.ComboBox()
80
-        Me.TextBox10 = New System.Windows.Forms.TextBox()
79
+        Me.幣別_cb = New System.Windows.Forms.ComboBox()
80
+        Me.人民幣匯率_tb = New System.Windows.Forms.TextBox()
81
+        Me.美金匯率_tb = New System.Windows.Forms.TextBox()
81 82
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
82 83
         CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
83 84
         Me.ContextMenuStrip1.SuspendLayout()
@@ -359,6 +360,8 @@ Partial Class 營運成本收支單申請
359 360
         'CheckBox1
360 361
         '
361 362
         Me.CheckBox1.AutoSize = True
363
+        Me.CheckBox1.Checked = True
364
+        Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
362 365
         Me.CheckBox1.Location = New System.Drawing.Point(827, 6)
363 366
         Me.CheckBox1.Name = "CheckBox1"
364 367
         Me.CheckBox1.Size = New System.Drawing.Size(39, 20)
@@ -535,25 +538,36 @@ Partial Class 營運成本收支單申請
535 538
         Me.ProgressBar1.Size = New System.Drawing.Size(909, 23)
536 539
         Me.ProgressBar1.TabIndex = 897
537 540
         '
538
-        'ComboBox7
539
-        '
540
-        Me.ComboBox7.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
541
-        Me.ComboBox7.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
542
-        Me.ComboBox7.FormattingEnabled = True
543
-        Me.ComboBox7.Items.AddRange(New Object() {"台幣現金", "人民幣現金"})
544
-        Me.ComboBox7.Location = New System.Drawing.Point(1118, 30)
545
-        Me.ComboBox7.Name = "ComboBox7"
546
-        Me.ComboBox7.Size = New System.Drawing.Size(119, 24)
547
-        Me.ComboBox7.TabIndex = 898
548
-        '
549
-        'TextBox10
550
-        '
551
-        Me.TextBox10.Location = New System.Drawing.Point(872, 4)
552
-        Me.TextBox10.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
553
-        Me.TextBox10.Name = "TextBox10"
554
-        Me.TextBox10.Size = New System.Drawing.Size(62, 23)
555
-        Me.TextBox10.TabIndex = 899
556
-        Me.TextBox10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
541
+        '幣別_cb
542
+        '
543
+        Me.幣別_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
544
+        Me.幣別_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
545
+        Me.幣別_cb.FormattingEnabled = True
546
+        Me.幣別_cb.Items.AddRange(New Object() {"台幣現金", "人民幣現金", "美金"})
547
+        Me.幣別_cb.Location = New System.Drawing.Point(1118, 30)
548
+        Me.幣別_cb.Name = "幣別_cb"
549
+        Me.幣別_cb.Size = New System.Drawing.Size(119, 24)
550
+        Me.幣別_cb.TabIndex = 898
551
+        '
552
+        '人民幣匯率_tb
553
+        '
554
+        Me.人民幣匯率_tb.Location = New System.Drawing.Point(892, 230)
555
+        Me.人民幣匯率_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
556
+        Me.人民幣匯率_tb.Name = "人民幣匯率_tb"
557
+        Me.人民幣匯率_tb.Size = New System.Drawing.Size(175, 23)
558
+        Me.人民幣匯率_tb.TabIndex = 899
559
+        Me.人民幣匯率_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
560
+        Me.人民幣匯率_tb.Visible = False
561
+        '
562
+        '美金匯率_tb
563
+        '
564
+        Me.美金匯率_tb.Location = New System.Drawing.Point(892, 261)
565
+        Me.美金匯率_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
566
+        Me.美金匯率_tb.Name = "美金匯率_tb"
567
+        Me.美金匯率_tb.Size = New System.Drawing.Size(175, 23)
568
+        Me.美金匯率_tb.TabIndex = 900
569
+        Me.美金匯率_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
570
+        Me.美金匯率_tb.Visible = False
557 571
         '
558 572
         '營運成本收支單申請
559 573
         '
@@ -561,8 +575,9 @@ Partial Class 營運成本收支單申請
561 575
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
562 576
         Me.ClientSize = New System.Drawing.Size(1249, 611)
563 577
         Me.ContextMenuStrip = Me.ContextMenuStrip1
564
-        Me.Controls.Add(Me.TextBox10)
565
-        Me.Controls.Add(Me.ComboBox7)
578
+        Me.Controls.Add(Me.美金匯率_tb)
579
+        Me.Controls.Add(Me.人民幣匯率_tb)
580
+        Me.Controls.Add(Me.幣別_cb)
566 581
         Me.Controls.Add(Me.ProgressBar1)
567 582
         Me.Controls.Add(Me.ComboBox6)
568 583
         Me.Controls.Add(Me.TextBox9)
@@ -592,7 +607,6 @@ Partial Class 營運成本收支單申請
592 607
         Me.Controls.Add(Me.TextBox4)
593 608
         Me.Controls.Add(Me.Label28)
594 609
         Me.Controls.Add(Me.Label27)
595
-        Me.Controls.Add(Me.DataGridView1)
596 610
         Me.Controls.Add(Me.Label3)
597 611
         Me.Controls.Add(Me.TextBox3)
598 612
         Me.Controls.Add(Me.TextBox1)
@@ -600,6 +614,7 @@ Partial Class 營運成本收支單申請
600 614
         Me.Controls.Add(Me.RadioButton2)
601 615
         Me.Controls.Add(Me.RadioButton1)
602 616
         Me.Controls.Add(Me.Label2)
617
+        Me.Controls.Add(Me.DataGridView1)
603 618
         Me.Controls.Add(Me.DataGridView2)
604 619
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
605 620
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
@@ -663,6 +678,7 @@ Partial Class 營運成本收支單申請
663 678
     Friend WithEvents TextBox9 As TextBox
664 679
     Friend WithEvents ComboBox6 As ComboBox
665 680
     Friend WithEvents ProgressBar1 As ProgressBar
666
-    Friend WithEvents ComboBox7 As ComboBox
667
-    Friend WithEvents TextBox10 As TextBox
681
+    Friend WithEvents 幣別_cb As ComboBox
682
+    Friend WithEvents 人民幣匯率_tb As TextBox
683
+    Friend WithEvents 美金匯率_tb As TextBox
668 684
 End Class

+ 13
- 5
工巧明智能管理系統/我的系統/財務系統管理/營運成本收支單申請.vb Просмотреть файл

@@ -95,11 +95,11 @@ Public Class 營運成本收支單申請
95 95
     End Sub
96 96
     Private Sub 匯率()
97 97
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
98
-        SQL1 = "SELECT 中心匯率 FROM 歷史匯率表 
98
+        SQL1 = "SELECT 中心匯率, 美金匯率 FROM 歷史匯率表 
99 99
                 WHERE (年 LIKE '" & Strings.Left(Format(DateTimePicker1.Value, "yyyyMMdd"), 4) & "%') AND (月 LIKE '" & Strings.Mid(Format(DateTimePicker1.Value, "yyyyMMdd"), 5, 2) & "%')"
100 100
         cmd.Connection = conn : cmd.CommandText = SQL1 : dr = cmd.ExecuteReader
101 101
         If dr.Read() Then
102
-            TextBox10.Text = dr("中心匯率").ToString : conn.Close() : dr.Close()
102
+            人民幣匯率_tb.Text = dr("中心匯率").ToString : 美金匯率_tb.Text = dr("美金匯率").ToString : conn.Close() : dr.Close()
103 103
         Else
104 104
             conn.Close() : dr.Close() : 匯率修改.Close() : 匯率修改.Show() : 匯率修改.BringToFront()
105 105
         End If
@@ -329,7 +329,7 @@ Public Class 營運成本收支單申請
329 329
         End If
330 330
     End Sub
331 331
     Private Sub 新增一筆資料ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 新增一筆資料ToolStripMenuItem.Click
332
-        If ComboBox6.Text = "" Or ComboBox7.Text = "" Then
332
+        If ComboBox6.Text = "" Or 幣別_cb.Text = "" Then
333 333
             MsgBox("沒有選擇會計科目或幣別。")
334 334
         Else
335 335
             If TextBox1.Text = "" Then
@@ -346,10 +346,18 @@ Public Class 營運成本收支單申請
346 346
             ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1
347 347
             End If
348 348
             If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
349
-            If ComboBox7.Text = "台幣現金" Then : 匯率1 = 1 : Else : 匯率1 = TextBox10.Text : End If
349
+
350
+            If 幣別_cb.Text = "台幣現金" Then
351
+                匯率1 = 1
352
+            ElseIf 幣別_cb.Text = "人民幣現金" Then
353
+                匯率1 = 人民幣匯率_tb.Text
354
+            ElseIf 幣別_cb.Text = "美金" Then
355
+                匯率1 = 美金匯率_tb.Text
356
+            End If
357
+
350 358
             SQL1 = "INSERT INTO 公帳流水帳 (流水號, 銀行, 日期, 類別, 收入, 支出, 明細, 人員, 支付單號, 項次, 會計, 出納, 現金, 備用金, 公帳, 支票, 
351 359
                             出納日期, 零用金, 支票數, 匯率, 備註) " &
352
-                   "VALUES (N'" & 新流水1 & "', N'" & ComboBox7.Text & "', N'" & DTP & "', N'" & ComboBox6.Text & "', N'0', N'0', N'', N'" & gUserName & "', N'" & TextBox1.Text & "', N'" & 新項次 &
360
+                   "VALUES (N'" & 新流水1 & "', N'" & 幣別_cb.Text & "', N'" & DTP & "', N'" & ComboBox6.Text & "', N'0', N'0', N'', N'" & gUserName & "', N'" & TextBox1.Text & "', N'" & 新項次 &
353 361
                         "', N'0', N'0', N'0', N'0', N'0', N'0', N'" & DTP & "', N'0', N'0', N'" & 匯率1 & "', N'')"
354 362
             cmd.Connection = conn : cmd.CommandText = SQL1 : cmd.ExecuteNonQuery()
355 363
             Set_費用清單()

Загрузка…
Отмена
Сохранить