Pārlūkot izejas kodu

應收控制表新增完成

測試控件命名規則,已改介面如下
應付帳款控制表,票務控制表,財務單據申請

Signed-off-by: B70340 <b70340@gmail.com>
B70340 5 gadus atpakaļ
vecāks
revīzija
5cb7c9fcb9
21 mainītis faili ar 2476 papildinājumiem un 2355 dzēšanām
  1. Binārs
      .vs/MAOJI-ERP-SYS/v16/.suo
  2. 9
    9
      MaoOrange-Hongji/MAOJI-ERP-SYS.vbproj
  3. 116
    38
      MaoOrange-Hongji/Module1/SQL_Module.vb
  4. Binārs
      MaoOrange-Hongji/bin/Debug/MAOJI-ERP-SYS.exe
  5. Binārs
      MaoOrange-Hongji/bin/Debug/MAOJI-ERP-SYS.pdb
  6. Binārs
      MaoOrange-Hongji/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  7. Binārs
      MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.exe
  8. Binārs
      MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.pdb
  9. 1
    1
      MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbproj.CoreCompileInputs.cache
  10. 1
    1
      MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbproj.FileListAbsolute.txt
  11. Binārs
      MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbproj.GenerateResource.cache
  12. Binārs
      MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbprojAssemblyReference.cache
  13. 371
    371
      MaoOrange-Hongji/財務系統管理/應付賬款控制表.Designer.vb
  14. 151
    153
      MaoOrange-Hongji/財務系統管理/應付賬款控制表.vb
  15. 337
    372
      MaoOrange-Hongji/財務系統管理/應收帳款控制表.Designer.vb
  16. 156
    194
      MaoOrange-Hongji/財務系統管理/應收帳款控制表.vb
  17. 72
    12
      MaoOrange-Hongji/財務系統管理/營運成本收支_決算表.vb
  18. 505
    491
      MaoOrange-Hongji/財務系統管理/票務控制表.Designer.vb
  19. 109
    93
      MaoOrange-Hongji/財務系統管理/票務控制表.vb
  20. 442
    442
      MaoOrange-Hongji/財務系統管理/財務單具申請.Designer.vb
  21. 206
    178
      MaoOrange-Hongji/財務系統管理/財務單具申請.vb

Binārs
.vs/MAOJI-ERP-SYS/v16/.suo Parādīt failu


+ 9
- 9
MaoOrange-Hongji/MAOJI-ERP-SYS.vbproj Parādīt failu

@@ -127,6 +127,12 @@
127 127
     <Compile Include="倉儲系統管理\倉儲入庫驗收.vb">
128 128
       <SubType>Form</SubType>
129 129
     </Compile>
130
+    <Compile Include="財務系統管理\應收帳款控制表.Designer.vb">
131
+      <DependentUpon>應收帳款控制表.vb</DependentUpon>
132
+    </Compile>
133
+    <Compile Include="財務系統管理\應收帳款控制表.vb">
134
+      <SubType>Form</SubType>
135
+    </Compile>
130 136
     <Compile Include="財務系統管理\財務單具申請.Designer.vb">
131 137
       <DependentUpon>財務單具申請.vb</DependentUpon>
132 138
     </Compile>
@@ -157,12 +163,6 @@
157 163
     <Compile Include="資料庫系統管理\系統通用變數管理.vb">
158 164
       <SubType>Form</SubType>
159 165
     </Compile>
160
-    <Compile Include="財務系統管理\應收帳款控制表.Designer.vb">
161
-      <DependentUpon>應收帳款控制表.vb</DependentUpon>
162
-    </Compile>
163
-    <Compile Include="財務系統管理\應收帳款控制表.vb">
164
-      <SubType>Form</SubType>
165
-    </Compile>
166 166
     <Compile Include="資料庫系統管理\列印_產品標籤介面.Designer.vb">
167 167
       <DependentUpon>列印_產品標籤介面.vb</DependentUpon>
168 168
     </Compile>
@@ -475,6 +475,9 @@
475 475
     <EmbeddedResource Include="倉儲系統管理\倉儲入庫驗收.resx">
476 476
       <DependentUpon>倉儲入庫驗收.vb</DependentUpon>
477 477
     </EmbeddedResource>
478
+    <EmbeddedResource Include="財務系統管理\應收帳款控制表.resx">
479
+      <DependentUpon>應收帳款控制表.vb</DependentUpon>
480
+    </EmbeddedResource>
478 481
     <EmbeddedResource Include="財務系統管理\財務單具申請.resx">
479 482
       <DependentUpon>財務單具申請.vb</DependentUpon>
480 483
     </EmbeddedResource>
@@ -490,9 +493,6 @@
490 493
     <EmbeddedResource Include="資料庫系統管理\系統通用變數管理.resx">
491 494
       <DependentUpon>系統通用變數管理.vb</DependentUpon>
492 495
     </EmbeddedResource>
493
-    <EmbeddedResource Include="財務系統管理\應收帳款控制表.resx">
494
-      <DependentUpon>應收帳款控制表.vb</DependentUpon>
495
-    </EmbeddedResource>
496 496
     <EmbeddedResource Include="資料庫系統管理\列印_產品標籤介面.resx">
497 497
       <DependentUpon>列印_產品標籤介面.vb</DependentUpon>
498 498
     </EmbeddedResource>

+ 116
- 38
MaoOrange-Hongji/Module1/SQL_Module.vb Parādīt failu

@@ -197,9 +197,6 @@ Module SQL_Module
197 197
     Friend Sub SQL_營運成本明細表項次修改()
198 198
         ConnOpen() : SQL1 = "UPDATE 營運成本明細表 SET 項次 = N'" & PA1 & "' WHERE (流水號 LIKE '" & PA2 & "' AND 項次 LIKE '" & PA3 & "')" : CmdSet_For_dr()
199 199
     End Sub
200
-    Friend Sub SQL_應付賬款_倉儲明細應付立帳修改()
201
-        ConnOpen() : SQL1 = "UPDATE 倉儲明細表 SET 應付立帳 = '" & PA7 & "' WHERE 資料流水號 LIKE '" & PA6 & "'" : CmdSet_For_dr()
202
-    End Sub
203 200
     Friend Sub SQL_支票收支單申請_客戶資料_零售()
204 201
         ConnOpen() : SQL1 = "SELECT 客戶名稱 FROM 零售客戶記錄表 WHERE (出貨單號 LIKE N'" & PA & "')" : CmdSet_For_dr()
205 202
     End Sub
@@ -2149,7 +2146,7 @@ Module SQL_Module
2149 2146
                             供應商資料表 ON 倉儲明細表.供應商編號 = 供應商資料表.編號 LEFT OUTER JOIN
2150 2147
                             物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號
2151 2148
                 WHERE      (倉儲明細表.狀態 LIKE '採購入庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND 
2152
-                           (倉儲明細表.採購下單 BETWEEN '" & Format(應付賬款控制表.DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Format(應付賬款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "')
2149
+                           (倉儲明細表.採購下單 BETWEEN '" & Format(應付賬款控制表.開始日期_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(應付賬款控制表.結束日期_dtp.Value, "yyyy/MM/dd") & "')
2153 2150
                 GROUP BY    倉儲明細表.供應商編號, 供應商資料表.簡稱
2154 2151
                 ORDER BY    倉儲明細表.供應商編號, 供應商資料表.簡稱"
2155 2152
         CmdSet_For_DGV()
@@ -2161,8 +2158,8 @@ Module SQL_Module
2161 2158
                             倉儲明細表.應付立帳, 倉儲明細表.資料流水號, 倉儲明細表.財務單號, 營運成本控制表.申請日期
2162 2159
                 FROM        倉儲明細表 LEFT OUTER JOIN 營運成本控制表 ON 倉儲明細表.財務單號 = 營運成本控制表.支付單號 LEFT OUTER JOIN 供應商資料表 ON 倉儲明細表.供應商編號 = 供應商資料表.編號 
2163 2160
                             LEFT OUTER JOIN 物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號
2164
-                WHERE      (倉儲明細表.狀態 LIKE '採購入庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND (倉儲明細表.供應商編號 LIKE '" & 應付賬款控制表.TextBox1.Text & "') AND 
2165
-                           (倉儲明細表.採購下單 BETWEEN '" & Format(應付賬款控制表.DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Format(應付賬款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "') 
2161
+                WHERE      (倉儲明細表.狀態 LIKE '採購入庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND (倉儲明細表.供應商編號 LIKE '" & 應付賬款控制表.供應商編號_tb.Text & "') AND 
2162
+                           (倉儲明細表.採購下單 BETWEEN '" & Format(應付賬款控制表.開始日期_dtp.Value, "yyyy/MM/dd") & "' AND '" & Format(應付賬款控制表.結束日期_dtp.Value, "yyyy/MM/dd") & "') 
2166 2163
                 ORDER BY    倉儲明細表.單據編號, 倉儲明細表.入庫日期"
2167 2164
         CmdSet_For_DGV()
2168 2165
     End Sub
@@ -2173,7 +2170,7 @@ Module SQL_Module
2173 2170
                             倉儲明細表.應付立帳, 倉儲明細表.資料流水號, 倉儲明細表.財務單號, 營運成本控制表.申請日期
2174 2171
                 FROM        倉儲明細表 LEFT OUTER JOIN 營運成本控制表 ON 倉儲明細表.財務單號 = 營運成本控制表.支付單號 LEFT OUTER JOIN 供應商資料表 ON 倉儲明細表.供應商編號 = 供應商資料表.編號 
2175 2172
                             LEFT OUTER JOIN 物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號
2176
-                WHERE      (倉儲明細表.狀態 LIKE '採購入庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND (倉儲明細表.財務單號 LIKE '" & 應付賬款控制表.TextBox6.Text & "')
2173
+                WHERE      (倉儲明細表.狀態 LIKE '採購入庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND (倉儲明細表.財務單號 LIKE '" & 應付賬款控制表.財務收支單號_tb.Text & "')
2177 2174
                 ORDER BY    倉儲明細表.單據編號, 倉儲明細表.入庫日期"
2178 2175
         CmdSet_For_DGV()
2179 2176
     End Sub
@@ -2185,15 +2182,60 @@ Module SQL_Module
2185 2182
                            營運成本明細表.託收已付日, WW.會計科目 AS 兌現會科, 營運成本明細表.兌現科目, 營運成本明細表.付款銀行, 營運成本明細表.開票人, 營運成本明細表.登錄人, 
2186 2183
                            營運成本明細表.發票人帳號, 營運成本明細表.作帳日期, 營運成本明細表.出納日期, 營運成本明細表.倉儲單號
2187 2184
                 FROM       營運成本明細表 LEFT OUTER JOIN 會計科目 AS QQ ON 營運成本明細表.會計科目 = QQ.編號 LEFT OUTER JOIN 會計科目 AS WW ON 營運成本明細表.兌現科目 = WW.編號
2188
-                WHERE     (營運成本明細表.公司編號 LIKE '%" & 公司編號 & "%') AND  (營運成本明細表.流水號 LIKE '" & 應付賬款控制表.TextBox6.Text & "') AND
2189
-                          (營運成本明細表.作帳日期 BETWEEN '" & Format(應付賬款控制表.DateTimePicker1.Value, "yyyy/MM/dd") &
2190
-                                                    "' AND '" & Format(應付賬款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "')
2185
+                WHERE     (營運成本明細表.公司編號 LIKE '%" & 公司編號 & "%') AND  (營運成本明細表.流水號 LIKE '" & 應付賬款控制表.財務收支單號_tb.Text & "') 
2191 2186
                 ORDER BY   營運成本明細表.項次"
2192 2187
         CmdSet_For_DGV()
2193 2188
     End Sub
2194 2189
     Friend Sub SQL_應收應付單號連接暫存檔新增()
2195 2190
         ConnOpen() : SQL1 = "INSERT INTO 應收應付單號連接暫存檔 (流水單號)  VALUES (N'" & PA19 & "')" : CmdSet_For_dr()
2196 2191
     End Sub
2192
+    '---------------------應收帳款控制表-----------------------------------------------------------------------------------------------------------------
2193
+    Friend Sub SQL_應收賬款主單()
2194
+        ConnOpen()
2195
+        SQL1 = "SELECT      倉儲明細表.客戶編號, 客戶資料表.簡稱 AS 客戶
2196
+                FROM        倉儲明細表 INNER JOIN 客戶資料表 ON 倉儲明細表.客戶編號 = 客戶資料表.編號 LEFT OUTER JOIN
2197
+                            物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號
2198
+                WHERE      (倉儲明細表.狀態 LIKE '銷售出庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND 
2199
+                           (倉儲明細表.採購下單 BETWEEN '" & Format(應收帳款控制表.DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Format(應收帳款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "')
2200
+                GROUP BY    倉儲明細表.客戶編號, 客戶資料表.簡稱
2201
+                ORDER BY    倉儲明細表.客戶編號, 客戶資料表.簡稱"
2202
+        CmdSet_For_DGV()
2203
+    End Sub
2204
+    Friend Sub SQL_應收賬款清單一()
2205
+        ConnOpen()
2206
+        SQL1 = "SELECT      倉儲明細表.單據編號, 倉儲明細表.客戶編號, 客戶資料表.簡稱 AS 客戶, 物料資料庫.料號, 物料資料庫.頁碼, 物料資料庫.品名, 倉儲明細表.售價 AS 單價, 倉儲明細表.匯率, 
2207
+                            倉儲明細表.出庫, 倉儲明細表.售價 * 倉儲明細表.匯率 * 倉儲明細表.出庫 AS 金額, 倉儲明細表.採購下單, 倉儲明細表.出庫日期, 倉儲明細表.備註, 倉儲明細表.應付立帳 AS 選擇, 
2208
+                            倉儲明細表.應收立帳, 倉儲明細表.資料流水號, 倉儲明細表.財務單號, 營運成本控制表.申請日期
2209
+                FROM        倉儲明細表 LEFT OUTER JOIN 營運成本控制表 ON 倉儲明細表.財務單號 = 營運成本控制表.支付單號 LEFT OUTER JOIN 客戶資料表 ON 倉儲明細表.客戶編號 = 客戶資料表.編號 
2210
+                            LEFT OUTER JOIN 物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號
2211
+                WHERE      (倉儲明細表.狀態 LIKE '銷售出庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND (倉儲明細表.客戶編號 LIKE '" & 應收帳款控制表.TextBox1.Text & "') AND 
2212
+                           (倉儲明細表.採購下單 BETWEEN '" & Format(應收帳款控制表.DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Format(應收帳款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "') 
2213
+                ORDER BY    倉儲明細表.單據編號, 倉儲明細表.入庫日期"
2214
+        CmdSet_For_DGV()
2215
+    End Sub
2216
+    Friend Sub SQL_應收賬款清單二()
2217
+        ConnOpen()
2218
+        SQL1 = "SELECT      倉儲明細表.單據編號, 倉儲明細表.客戶編號, 客戶資料表.簡稱 AS 客戶, 物料資料庫.料號, 物料資料庫.頁碼, 物料資料庫.品名, 倉儲明細表.售價 AS 單價, 倉儲明細表.匯率, 
2219
+                            倉儲明細表.出庫, 倉儲明細表.售價 * 倉儲明細表.匯率 * 倉儲明細表.出庫 AS 金額, 倉儲明細表.採購下單, 倉儲明細表.出庫日期, 倉儲明細表.備註, 倉儲明細表.應付立帳 AS 選擇, 
2220
+                            倉儲明細表.應收立帳, 倉儲明細表.資料流水號, 倉儲明細表.財務單號, 營運成本控制表.申請日期
2221
+                FROM        倉儲明細表 LEFT OUTER JOIN 營運成本控制表 ON 倉儲明細表.財務單號 = 營運成本控制表.支付單號 LEFT OUTER JOIN 客戶資料表 ON 倉儲明細表.客戶編號 = 客戶資料表.編號 
2222
+                            LEFT OUTER JOIN 物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號
2223
+                WHERE      (倉儲明細表.狀態 LIKE '銷售出庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND (倉儲明細表.財務單號 LIKE '" & 應收帳款控制表.TextBox6.Text & "')
2224
+                ORDER BY    倉儲明細表.單據編號, 倉儲明細表.入庫日期"
2225
+        CmdSet_For_DGV()
2226
+    End Sub
2227
+    Friend Sub SQL_應收賬款清單三()
2228
+        ConnOpen()
2229
+        SQL1 = "SELECT     營運成本明細表.流水號, 營運成本明細表.項次, QQ.會計科目 AS 開票會科, 營運成本明細表.會計科目, 營運成本明細表.用途, 營運成本明細表.零用金 AS 開票, 
2230
+                           營運成本明細表.支票數 AS 收票, 營運成本明細表.金額 AS 付現, 營運成本明細表.收款 AS 收現, 營運成本明細表.備註, 營運成本明細表.備用金 AS 開票已付, 
2231
+                           營運成本明細表.支票 AS 收票託收, 營運成本明細表.支票號碼, 營運成本明細表.狀態, 營運成本明細表.到期日, 營運成本明細表.預定兌現日, 營運成本明細表.開收票日, 
2232
+                           營運成本明細表.託收已付日, WW.會計科目 AS 兌現會科, 營運成本明細表.兌現科目, 營運成本明細表.付款銀行, 營運成本明細表.開票人, 營運成本明細表.登錄人, 
2233
+                           營運成本明細表.發票人帳號, 營運成本明細表.作帳日期, 營運成本明細表.出納日期, 營運成本明細表.倉儲單號
2234
+                FROM       營運成本明細表 LEFT OUTER JOIN 會計科目 AS QQ ON 營運成本明細表.會計科目 = QQ.編號 LEFT OUTER JOIN 會計科目 AS WW ON 營運成本明細表.兌現科目 = WW.編號
2235
+                WHERE     (營運成本明細表.公司編號 LIKE '%" & 公司編號 & "%') AND  (營運成本明細表.流水號 LIKE '" & 應收帳款控制表.TextBox6.Text & "')
2236
+                ORDER BY   營運成本明細表.項次"
2237
+        CmdSet_For_DGV()
2238
+    End Sub
2197 2239
     '---------------------系統通用變數管理-----------------------------------------------------------------------------------------------------------------
2198 2240
     Friend Sub SQL_通用預設值管理清單一()
2199 2241
         ConnOpen() : SQL1 = "SELECT 流水號, 使用介面, 說明, 預設值 FROM 通用預設值管理表一 ORDER BY 使用介面" : CmdSet_For_DGV()
@@ -2210,26 +2252,6 @@ Module SQL_Module
2210 2252
     Friend Sub SQL_系統通用變數管理刪除()
2211 2253
         SQL1 = "DELETE FROM 通用預設值管理表一 WHERE (流水號 = N'" & PA1 & "')"
2212 2254
     End Sub
2213
-    '---------------------應收帳款控制表-----------------------------------------------------------------------------------------------------------------
2214
-    Friend Sub SQL_應收賬款清單()
2215
-        If 應收帳款控制表.CheckBox3.Checked = False Then
2216
-            KKKJJ = " WHERE (倉儲明細表.狀態 LIKE '銷售出庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND 
2217
-                            (倉儲明細表.採購下單 BETWEEN '" & Format(應收帳款控制表.DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Format(應收帳款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "') "
2218
-        ElseIf 應收帳款控制表.CheckBox3.Checked = True Then
2219
-            KKKJJ = " WHERE (倉儲明細表.狀態 LIKE '銷售出庫') AND (倉儲明細表.公司編號 LIKE '%" & 公司編號 & "%') AND 
2220
-                            (倉儲明細表.採購下單 BETWEEN '" & Format(應收帳款控制表.DateTimePicker1.Value, "yyyy/MM/dd") & "' AND '" & Format(應收帳款控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "') AND 
2221
-                            (倉儲明細表.應收立帳 IS NULL OR 倉儲明細表.應收立帳 = 0)"
2222
-        End If
2223
-        ConnOpen()
2224
-        SQL1 = "SELECT      倉儲明細表.單據編號, 倉儲明細表.客戶編號, 客戶資料表.簡稱 AS 客戶, 物料資料庫.料號, 物料資料庫.頁碼, 
2225
-                            物料資料庫.品名, 倉儲明細表.售價 AS 單價, 倉儲明細表.匯率, 倉儲明細表.出庫, 
2226
-                            倉儲明細表.售價 * 倉儲明細表.匯率 * 倉儲明細表.出庫 AS 金額, 倉儲明細表.採購下單, 倉儲明細表.出庫日期, 
2227
-                            倉儲明細表.備註, 倉儲明細表.應付立帳 AS 選擇, 倉儲明細表.應收立帳, 倉儲明細表.資料流水號, 倉儲明細表.收款狀態 
2228
-                FROM        倉儲明細表 INNER JOIN 客戶資料表 ON 倉儲明細表.客戶編號 = 客戶資料表.編號 LEFT OUTER JOIN
2229
-                            物料資料庫 ON 倉儲明細表.料號 = 物料資料庫.料號 " & KKKJJ & "
2230
-                ORDER BY    倉儲明細表.單據編號, 倉儲明細表.出庫日期"
2231
-        CmdSet_For_DGV()
2232
-    End Sub
2233 2255
     '---------------------支票收支單申請-----------------------------------------------------------------------------------------------------------------
2234 2256
     Friend Sub SQL_支票收支單申請清單()
2235 2257
         ConnOpen()
@@ -2281,11 +2303,11 @@ Module SQL_Module
2281 2303
                            營運成本明細表.兌現科目, 營運成本明細表.付款銀行, 營運成本明細表.開票人, 營運成本明細表.登錄人, 營運成本明細表.發票人帳號, 營運成本明細表.作帳日期, 
2282 2304
                            營運成本明細表.出納日期, 營運成本明細表.倉儲單號
2283 2305
                 FROM       營運成本明細表 LEFT OUTER JOIN 會計科目 AS QQ ON 營運成本明細表.會計科目 = QQ.編號 LEFT OUTER JOIN 會計科目 AS WW ON 營運成本明細表.兌現科目 = WW.編號
2284
-                WHERE     (營運成本明細表.狀態 LIKE '" & 票務控制表.ComboBox2.Text & "') AND (營運成本明細表.公司編號 LIKE '%" & 公司編號 & "%') AND 
2285
-                          (QQ.會計科目 LIKE '" & 票務控制表.ComboBox1.Text & "') AND (WW.會計科目 LIKE '%" & 票務控制表.ComboBox3.Text & "%') AND
2286
-                          (營運成本明細表." & 票務控制表.ComboBox15.Text & " BETWEEN '" & Format(票務控制表.DateTimePicker1.Value, "yyyy/MM/dd") &
2287
-                                                                              "' AND '" & Format(票務控制表.DateTimePicker2.Value, "yyyy/MM/dd") & "')
2288
-                ORDER BY   營運成本明細表." & 票務控制表.ComboBox15.Text & ""
2306
+                WHERE     (營運成本明細表.狀態 LIKE '" & 票務控制表.票況_cb.Text & "') AND (營運成本明細表.公司編號 LIKE '%" & 公司編號 & "%') AND 
2307
+                          (QQ.會計科目 LIKE '" & 票務控制表.區分_cb.Text & "') AND (WW.會計科目 LIKE '%" & 票務控制表.兌現科目_cb.Text & "%') AND
2308
+                          (營運成本明細表." & 票務控制表.日期選項_cb.Text & " BETWEEN '" & Format(票務控制表.開始日期_dtp.Value, "yyyy/MM/dd") &
2309
+                                                                              "' AND '" & Format(票務控制表.結束日期_dtp.Value, "yyyy/MM/dd") & "')
2310
+                ORDER BY   營運成本明細表." & 票務控制表.日期選項_cb.Text & ""
2289 2311
         CmdSet_For_DGV()
2290 2312
     End Sub
2291 2313
     Friend Sub SQL_票務控制表會科區分()
@@ -2316,7 +2338,7 @@ Module SQL_Module
2316 2338
         ConnOpen() : SQL1 = "SELECT 會計科目, 編號 FROM 會計科目 WHERE (編號 LIKE 'D%' OR 編號 LIKE 'G%') AND (統制科目 = 0) AND (停用 = 0) ORDER BY 編號" : CmdSet_For_dr()
2317 2339
     End Sub
2318 2340
     '---------------------財務單具申請-----------------------------------------------------------------------------------------------------------------
2319
-    Friend Sub SQL_會計科目_第一階_應付_不含流動票務()
2341
+    Friend Sub SQL_會計科目_第一階_應付_不含流動票務() '-----------------------應付_不含流動票務---------------------------------------------------
2320 2342
         ConnOpen()
2321 2343
         SQL1 = "SELECT 第一階, LEFT(編號, 4) AS 編號 FROM 會計科目  
2322 2344
                 WHERE (編號 NOT LIKE 'D%') AND (編號 NOT LIKE 'G%') AND (停用 = 0) AND (第一階 NOT LIKE '流動%') GROUP BY 第一階, LEFT(編號, 4) ORDER BY 編號"
@@ -2341,7 +2363,7 @@ Module SQL_Module
2341 2363
                 WHERE (編號 NOT LIKE 'D%') AND (編號 NOT LIKE 'G%') AND (會計科目 LIKE N'%" & PA & "%') AND (停用 = 0) AND (統制科目 = 0) AND (第一階 NOT LIKE '流動%') ORDER BY 編號"
2342 2364
         CmdSet_For_dr()
2343 2365
     End Sub
2344
-    Friend Sub SQL_會計科目_第一階_應付_只含流動票務()
2366
+    Friend Sub SQL_會計科目_第一階_應付_只含流動票務() '-----------------------應付_只含流動票務---------------------------------------------------
2345 2367
         ConnOpen()
2346 2368
         SQL1 = "SELECT 第一階, LEFT(編號, 4) AS 編號 FROM 會計科目  
2347 2369
                 WHERE (編號 NOT LIKE 'A%') AND (停用 = 0) AND (第一階 LIKE '流動%') GROUP BY 第一階, LEFT(編號, 4) ORDER BY 編號"
@@ -2366,6 +2388,56 @@ Module SQL_Module
2366 2388
                 WHERE (編號 NOT LIKE 'A%') AND (會計科目 LIKE N'%" & PA & "%') AND (停用 = 0) AND (統制科目 = 0) AND (第一階 LIKE '流動%') ORDER BY 編號"
2367 2389
         CmdSet_For_dr()
2368 2390
     End Sub
2391
+    Friend Sub SQL_會計科目_第一階_應收_不含流動票務() '-----------------------應收_不含流動票務---------------------------------------------------
2392
+        ConnOpen()
2393
+        SQL1 = "SELECT 第一階, LEFT(編號, 4) AS 編號 FROM 會計科目  
2394
+                WHERE (編號 LIKE 'D%' OR 編號 LIKE 'G%') AND (停用 = 0) AND (第一階 NOT LIKE '流動%') GROUP BY 第一階, LEFT(編號, 4) ORDER BY 編號"
2395
+        CmdSet_For_dr()
2396
+    End Sub
2397
+    Friend Sub SQL_會計科目_第二階_應收_不含流動票務()
2398
+        ConnOpen()
2399
+        SQL1 = "SELECT LEFT(編號, 7) AS 編號, 第二階, 層級 FROM  會計科目 
2400
+                WHERE (編號 LIKE 'D%' OR 編號 LIKE 'G%') AND (LEFT(編號, 4) LIKE N'" & PA & "') AND (層級 NOT LIKE '3') AND (停用 = 0) AND (第一階 NOT LIKE '流動%')
2401
+                GROUP BY   LEFT(編號, 7), 第二階, 層級 ORDER BY   編號"
2402
+        CmdSet_For_dr()
2403
+    End Sub
2404
+    Friend Sub SQL_會計科目_第三階_應收_不含流動票務()
2405
+        ConnOpen()
2406
+        SQL1 = "SELECT 會計科目, 編號 FROM 會計科目 
2407
+                WHERE (編號 LIKE 'D%' OR 編號 LIKE 'G%') AND (LEFT(編號, 7) LIKE N'" & PA & "') AND (停用 = 0) AND (統制科目 = 0) AND (第一階 NOT LIKE '流動%') ORDER BY 編號"
2408
+        CmdSet_For_dr()
2409
+    End Sub
2410
+    Friend Sub SQL_會計科目_關鍵字_應收_不含流動票務()
2411
+        ConnOpen()
2412
+        SQL1 = "SELECT 會計科目, 編號 FROM 會計科目 
2413
+                WHERE (編號 LIKE 'D%' OR 編號 LIKE 'G%') AND (會計科目 LIKE N'%" & PA & "%') AND (停用 = 0) AND (統制科目 = 0) AND (第一階 NOT LIKE '流動%') ORDER BY 編號"
2414
+        CmdSet_For_dr()
2415
+    End Sub
2416
+    Friend Sub SQL_會計科目_第一階_應收_只含流動票務() '-----------------------應收_只含流動票務---------------------------------------------------
2417
+        ConnOpen()
2418
+        SQL1 = "SELECT 第一階, LEFT(編號, 4) AS 編號 FROM 會計科目  
2419
+                WHERE (編號 LIKE 'A%') AND (停用 = 0) AND (第一階 LIKE '流動%') GROUP BY 第一階, LEFT(編號, 4) ORDER BY 編號"
2420
+        CmdSet_For_dr()
2421
+    End Sub
2422
+    Friend Sub SQL_會計科目_第二階_應收_只含流動票務()
2423
+        ConnOpen()
2424
+        SQL1 = "SELECT LEFT(編號, 7) AS 編號, 第二階, 層級 FROM  會計科目 
2425
+                WHERE (編號 LIKE 'A%') AND (LEFT(編號, 4) LIKE N'" & PA & "') AND (層級 NOT LIKE '3') AND (停用 = 0) AND (第一階 LIKE '流動%')
2426
+                GROUP BY   LEFT(編號, 7), 第二階, 層級 ORDER BY   編號"
2427
+        CmdSet_For_dr()
2428
+    End Sub
2429
+    Friend Sub SQL_會計科目_第三階_應收_只含流動票務()
2430
+        ConnOpen()
2431
+        SQL1 = "SELECT 會計科目, 編號 FROM 會計科目 
2432
+                WHERE (編號 LIKE 'A%') AND (LEFT(編號, 7) LIKE N'" & PA & "') AND (停用 = 0) AND (統制科目 = 0) AND (第一階 LIKE '流動%') ORDER BY 編號"
2433
+        CmdSet_For_dr()
2434
+    End Sub
2435
+    Friend Sub SQL_會計科目_關鍵字_應收_只含流動票務()
2436
+        ConnOpen()
2437
+        SQL1 = "SELECT 會計科目, 編號 FROM 會計科目 
2438
+                WHERE (編號 LIKE 'A%') AND (會計科目 LIKE N'%" & PA & "%') AND (停用 = 0) AND (統制科目 = 0) AND (第一階 LIKE '流動%') ORDER BY 編號"
2439
+        CmdSet_For_dr()
2440
+    End Sub
2369 2441
     Friend Sub SQL_應收應付單號連接暫存檔讀取()
2370 2442
         ConnOpen() : SQL1 = "SELECT 流水單號 FROM 應收應付單號連接暫存檔" : CmdSet_For_DGV()
2371 2443
     End Sub
@@ -2379,11 +2451,17 @@ Module SQL_Module
2379 2451
                             營運成本明細表.到期日, 營運成本明細表.預定兌現日, 營運成本明細表.開收票日, 營運成本明細表.託收已付日, 
2380 2452
                             營運成本明細表.兌現科目, 營運成本明細表.付款銀行, 營運成本明細表.開票人, 營運成本明細表.登錄人, 營運成本明細表.發票人帳號
2381 2453
                 FROM        營運成本明細表 INNER JOIN 會計科目 AS QQ ON 營運成本明細表.會計科目 = QQ.編號
2382
-                WHERE      (營運成本明細表.流水號 LIKE '" & 財務單具申請.TextBox1.Text & "')
2454
+                WHERE      (營運成本明細表.流水號 LIKE '" & 財務單具申請.收支單號_tb.Text & "')
2383 2455
                 ORDER BY    營運成本明細表.項次"
2384 2456
         CmdSet_For_DGV()
2385 2457
     End Sub
2386 2458
     Friend Sub SQL_倉儲明細表財務單號連接修改()
2387 2459
         ConnOpen() : SQL1 = "UPDATE 倉儲明細表 SET  財務單號 = N'" & PA & "' WHERE (資料流水號 LIKE '" & PA19 & "')" : CmdSet_For_dr()
2388 2460
     End Sub
2461
+    Friend Sub SQL_應付賬款_倉儲明細應付立帳修改()
2462
+        ConnOpen() : SQL1 = "UPDATE 倉儲明細表 SET 應付立帳 = '" & PA7 & "' WHERE 資料流水號 LIKE '" & PA6 & "'" : CmdSet_For_dr()
2463
+    End Sub
2464
+    Friend Sub SQL_應收賬款_倉儲明細應付立帳修改()
2465
+        ConnOpen() : SQL1 = "UPDATE 倉儲明細表 SET 應收立帳 = '" & PA7 & "' WHERE 資料流水號 LIKE '" & PA6 & "'" : CmdSet_For_dr()
2466
+    End Sub
2389 2467
 End Module

Binārs
MaoOrange-Hongji/bin/Debug/MAOJI-ERP-SYS.exe Parādīt failu


Binārs
MaoOrange-Hongji/bin/Debug/MAOJI-ERP-SYS.pdb Parādīt failu


Binārs
MaoOrange-Hongji/obj/Debug/DesignTimeResolveAssemblyReferences.cache Parādīt failu


Binārs
MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.exe Parādīt failu


Binārs
MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.pdb Parādīt failu


+ 1
- 1
MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbproj.CoreCompileInputs.cache Parādīt failu

@@ -1 +1 @@
1
-b43126533b1c6358aea406aca2337ef3a341cb25
1
+972c7a2902f3255f51d5b4484561f3b77842943e

+ 1
- 1
MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbproj.FileListAbsolute.txt Parādīt failu

@@ -189,7 +189,6 @@ G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.銷售退貨申請.
189 189
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.銷售退貨清單.resources
190 190
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.銷售退貨確認.resources
191 191
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.列印_產品標籤介面.resources
192
-G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.應收帳款控制表.resources
193 192
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.系統通用變數管理.resources
194 193
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.財務收支單_對帳表.resources
195 194
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.財務收支單一覽表.resources
@@ -200,3 +199,4 @@ G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.支票收支單申
200 199
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.票務控制表.resources
201 200
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.財務單具申請.resources
202 201
 G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.應付賬款控制表.resources
202
+G:\MAOJI-ERP-SYS\MaoOrange-Hongji\obj\Debug\MaoOrange_Hongji.應收帳款控制表.resources

Binārs
MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbproj.GenerateResource.cache Parādīt failu


Binārs
MaoOrange-Hongji/obj/Debug/MAOJI-ERP-SYS.vbprojAssemblyReference.cache Parādīt failu


+ 371
- 371
MaoOrange-Hongji/財務系統管理/應付賬款控制表.Designer.vb Parādīt failu

@@ -28,100 +28,100 @@ Partial Class 應付賬款控制表
28 28
         Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29 29
         Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30 30
         Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Me.DateTimePicker4 = New System.Windows.Forms.DateTimePicker()
32
-        Me.Button1 = New System.Windows.Forms.Button()
33
-        Me.一般月 = New System.Windows.Forms.CheckBox()
34
-        Me.會計月 = New System.Windows.Forms.CheckBox()
35
-        Me.Button2 = New System.Windows.Forms.Button()
31
+        Me.中間日期_dtp = New System.Windows.Forms.DateTimePicker()
32
+        Me.上個月_bu = New System.Windows.Forms.Button()
33
+        Me.一般月_ch = New System.Windows.Forms.CheckBox()
34
+        Me.會計月_ch = New System.Windows.Forms.CheckBox()
35
+        Me.下個月_bu = New System.Windows.Forms.Button()
36 36
         Me.Label4 = New System.Windows.Forms.Label()
37
-        Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
38
-        Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
39
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
40
-        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
41
-        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
42
-        Me.TextBox3 = New System.Windows.Forms.TextBox()
37
+        Me.結束日期_dtp = New System.Windows.Forms.DateTimePicker()
38
+        Me.開始日期_dtp = New System.Windows.Forms.DateTimePicker()
39
+        Me.應付供應商_dgv = New System.Windows.Forms.DataGridView()
40
+        Me.採購清單_dgv = New System.Windows.Forms.DataGridView()
41
+        Me.對應收支單_DGV = New System.Windows.Forms.DataGridView()
42
+        Me.供應商名稱_tb = New System.Windows.Forms.TextBox()
43 43
         Me.Label3 = New System.Windows.Forms.Label()
44
-        Me.TextBox1 = New System.Windows.Forms.TextBox()
45
-        Me.Button6 = New System.Windows.Forms.Button()
46
-        Me.Button5 = New System.Windows.Forms.Button()
47
-        Me.Button12 = New System.Windows.Forms.Button()
48
-        Me.Button13 = New System.Windows.Forms.Button()
49
-        Me.CheckBox2 = New System.Windows.Forms.CheckBox()
50
-        Me.CheckBox3 = New System.Windows.Forms.CheckBox()
51
-        Me.TextBox2 = New System.Windows.Forms.TextBox()
44
+        Me.供應商編號_tb = New System.Windows.Forms.TextBox()
45
+        Me.暫時取消立帳選擇_bu = New System.Windows.Forms.Button()
46
+        Me.列印應付帳款清單_bu = New System.Windows.Forms.Button()
47
+        Me.全部取消_bu = New System.Windows.Forms.Button()
48
+        Me.全部選擇_bu = New System.Windows.Forms.Button()
49
+        Me.列印多選_ch = New System.Windows.Forms.CheckBox()
50
+        Me.已立帳隱藏_ch = New System.Windows.Forms.CheckBox()
51
+        Me.單據編號_tb = New System.Windows.Forms.TextBox()
52 52
         Me.Label1 = New System.Windows.Forms.Label()
53 53
         Me.Label7 = New System.Windows.Forms.Label()
54
-        Me.NumericUpDown2 = New System.Windows.Forms.NumericUpDown()
54
+        Me.未付金額_nud = New System.Windows.Forms.NumericUpDown()
55 55
         Me.Label2 = New System.Windows.Forms.Label()
56
-        Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown()
56
+        Me.實付金額_nud = New System.Windows.Forms.NumericUpDown()
57 57
         Me.Label5 = New System.Windows.Forms.Label()
58
-        Me.TextBox4 = New System.Windows.Forms.TextBox()
59
-        Me.TextBox5 = New System.Windows.Forms.TextBox()
60
-        Me.Button3 = New System.Windows.Forms.Button()
61
-        Me.Button4 = New System.Windows.Forms.Button()
62
-        Me.TextBox6 = New System.Windows.Forms.TextBox()
63
-        Me.CheckBox1 = New System.Windows.Forms.CheckBox()
58
+        Me.實付金額_tb = New System.Windows.Forms.TextBox()
59
+        Me.實付金額計算用_tb = New System.Windows.Forms.TextBox()
60
+        Me.間格時間內所有帳款_bu = New System.Windows.Forms.Button()
61
+        Me.開立財務單據_bu = New System.Windows.Forms.Button()
62
+        Me.財務收支單號_tb = New System.Windows.Forms.TextBox()
63
+        Me.非當天日期_ch = New System.Windows.Forms.CheckBox()
64 64
         Me.Label6 = New System.Windows.Forms.Label()
65
-        Me.DateTimePicker3 = New System.Windows.Forms.DateTimePicker()
66
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
67
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
68
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
69
-        CType(Me.NumericUpDown2, System.ComponentModel.ISupportInitialize).BeginInit()
70
-        CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit()
65
+        Me.單據日期_dtp = New System.Windows.Forms.DateTimePicker()
66
+        CType(Me.應付供應商_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
67
+        CType(Me.採購清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
68
+        CType(Me.對應收支單_DGV, System.ComponentModel.ISupportInitialize).BeginInit()
69
+        CType(Me.未付金額_nud, System.ComponentModel.ISupportInitialize).BeginInit()
70
+        CType(Me.實付金額_nud, System.ComponentModel.ISupportInitialize).BeginInit()
71 71
         Me.SuspendLayout()
72 72
         '
73
-        'DateTimePicker4
74
-        '
75
-        Me.DateTimePicker4.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
76
-        Me.DateTimePicker4.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
77
-        Me.DateTimePicker4.Location = New System.Drawing.Point(30, 49)
78
-        Me.DateTimePicker4.Name = "DateTimePicker4"
79
-        Me.DateTimePicker4.Size = New System.Drawing.Size(43, 23)
80
-        Me.DateTimePicker4.TabIndex = 1175
81
-        '
82
-        'Button1
83
-        '
84
-        Me.Button1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
85
-        Me.Button1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
86
-        Me.Button1.Location = New System.Drawing.Point(330, 3)
87
-        Me.Button1.Name = "Button1"
88
-        Me.Button1.Size = New System.Drawing.Size(65, 23)
89
-        Me.Button1.TabIndex = 1171
90
-        Me.Button1.Text = "上個月"
91
-        Me.Button1.UseVisualStyleBackColor = True
92
-        '
93
-        '一般月
94
-        '
95
-        Me.一般月.AutoSize = True
96
-        Me.一般月.Location = New System.Drawing.Point(272, 6)
97
-        Me.一般月.Name = "一般月"
98
-        Me.一般月.Size = New System.Drawing.Size(63, 20)
99
-        Me.一般月.TabIndex = 1174
100
-        Me.一般月.Text = "一般月"
101
-        Me.一般月.UseVisualStyleBackColor = True
102
-        '
103
-        '會計月
104
-        '
105
-        Me.會計月.AutoSize = True
106
-        Me.會計月.Checked = True
107
-        Me.會計月.CheckState = System.Windows.Forms.CheckState.Checked
108
-        Me.會計月.Location = New System.Drawing.Point(207, 6)
109
-        Me.會計月.Name = "會計月"
110
-        Me.會計月.Size = New System.Drawing.Size(63, 20)
111
-        Me.會計月.TabIndex = 1173
112
-        Me.會計月.Text = "會計月"
113
-        Me.會計月.UseVisualStyleBackColor = True
114
-        '
115
-        'Button2
116
-        '
117
-        Me.Button2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
118
-        Me.Button2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
119
-        Me.Button2.Location = New System.Drawing.Point(397, 3)
120
-        Me.Button2.Name = "Button2"
121
-        Me.Button2.Size = New System.Drawing.Size(65, 23)
122
-        Me.Button2.TabIndex = 1172
123
-        Me.Button2.Text = "下個月"
124
-        Me.Button2.UseVisualStyleBackColor = True
73
+        '中間日期_dtp
74
+        '
75
+        Me.中間日期_dtp.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
76
+        Me.中間日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
77
+        Me.中間日期_dtp.Location = New System.Drawing.Point(30, 49)
78
+        Me.中間日期_dtp.Name = "中間日期_dtp"
79
+        Me.中間日期_dtp.Size = New System.Drawing.Size(43, 23)
80
+        Me.中間日期_dtp.TabIndex = 1175
81
+        '
82
+        '上個月_bu
83
+        '
84
+        Me.上個月_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
85
+        Me.上個月_bu.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
86
+        Me.上個月_bu.Location = New System.Drawing.Point(330, 3)
87
+        Me.上個月_bu.Name = "上個月_bu"
88
+        Me.上個月_bu.Size = New System.Drawing.Size(65, 23)
89
+        Me.上個月_bu.TabIndex = 1171
90
+        Me.上個月_bu.Text = "上個月"
91
+        Me.上個月_bu.UseVisualStyleBackColor = True
92
+        '
93
+        '一般月_ch
94
+        '
95
+        Me.一般月_ch.AutoSize = True
96
+        Me.一般月_ch.Location = New System.Drawing.Point(272, 6)
97
+        Me.一般月_ch.Name = "一般月_ch"
98
+        Me.一般月_ch.Size = New System.Drawing.Size(63, 20)
99
+        Me.一般月_ch.TabIndex = 1174
100
+        Me.一般月_ch.Text = "一般月"
101
+        Me.一般月_ch.UseVisualStyleBackColor = True
102
+        '
103
+        '會計月_ch
104
+        '
105
+        Me.會計月_ch.AutoSize = True
106
+        Me.會計月_ch.Checked = True
107
+        Me.會計月_ch.CheckState = System.Windows.Forms.CheckState.Checked
108
+        Me.會計月_ch.Location = New System.Drawing.Point(207, 6)
109
+        Me.會計月_ch.Name = "會計月_ch"
110
+        Me.會計月_ch.Size = New System.Drawing.Size(63, 20)
111
+        Me.會計月_ch.TabIndex = 1173
112
+        Me.會計月_ch.Text = "會計月"
113
+        Me.會計月_ch.UseVisualStyleBackColor = True
114
+        '
115
+        '下個月_bu
116
+        '
117
+        Me.下個月_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
118
+        Me.下個月_bu.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
119
+        Me.下個月_bu.Location = New System.Drawing.Point(397, 3)
120
+        Me.下個月_bu.Name = "下個月_bu"
121
+        Me.下個月_bu.Size = New System.Drawing.Size(65, 23)
122
+        Me.下個月_bu.TabIndex = 1172
123
+        Me.下個月_bu.Text = "下個月"
124
+        Me.下個月_bu.UseVisualStyleBackColor = True
125 125
         '
126 126
         'Label4
127 127
         '
@@ -132,86 +132,86 @@ Partial Class 應付賬款控制表
132 132
         Me.Label4.TabIndex = 1170
133 133
         Me.Label4.Text = "到"
134 134
         '
135
-        'DateTimePicker2
135
+        '結束日期_dtp
136 136
         '
137
-        Me.DateTimePicker2.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
138
-        Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
139
-        Me.DateTimePicker2.Location = New System.Drawing.Point(118, 3)
140
-        Me.DateTimePicker2.Name = "DateTimePicker2"
141
-        Me.DateTimePicker2.Size = New System.Drawing.Size(87, 23)
142
-        Me.DateTimePicker2.TabIndex = 1169
137
+        Me.結束日期_dtp.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
138
+        Me.結束日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
139
+        Me.結束日期_dtp.Location = New System.Drawing.Point(118, 3)
140
+        Me.結束日期_dtp.Name = "結束日期_dtp"
141
+        Me.結束日期_dtp.Size = New System.Drawing.Size(87, 23)
142
+        Me.結束日期_dtp.TabIndex = 1169
143 143
         '
144
-        'DateTimePicker1
144
+        '開始日期_dtp
145 145
         '
146
-        Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
147
-        Me.DateTimePicker1.Location = New System.Drawing.Point(8, 3)
148
-        Me.DateTimePicker1.Name = "DateTimePicker1"
149
-        Me.DateTimePicker1.Size = New System.Drawing.Size(87, 23)
150
-        Me.DateTimePicker1.TabIndex = 1168
146
+        Me.開始日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
147
+        Me.開始日期_dtp.Location = New System.Drawing.Point(8, 3)
148
+        Me.開始日期_dtp.Name = "開始日期_dtp"
149
+        Me.開始日期_dtp.Size = New System.Drawing.Size(87, 23)
150
+        Me.開始日期_dtp.TabIndex = 1168
151 151
         '
152
-        'DataGridView1
152
+        '應付供應商_dgv
153 153
         '
154 154
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
155
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
156
-        Me.DataGridView1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
155
+        Me.應付供應商_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
156
+        Me.應付供應商_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
157 157
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
158
-        Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
159
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
160
-        Me.DataGridView1.Location = New System.Drawing.Point(8, 30)
161
-        Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
162
-        Me.DataGridView1.Name = "DataGridView1"
163
-        Me.DataGridView1.RowHeadersWidth = 5
158
+        Me.應付供應商_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
159
+        Me.應付供應商_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
160
+        Me.應付供應商_dgv.Location = New System.Drawing.Point(8, 30)
161
+        Me.應付供應商_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
162
+        Me.應付供應商_dgv.Name = "應付供應商_dgv"
163
+        Me.應付供應商_dgv.RowHeadersWidth = 5
164 164
         DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
165
-        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle2
166
-        Me.DataGridView1.RowTemplate.Height = 24
167
-        Me.DataGridView1.Size = New System.Drawing.Size(75, 290)
168
-        Me.DataGridView1.TabIndex = 1167
165
+        Me.應付供應商_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
166
+        Me.應付供應商_dgv.RowTemplate.Height = 24
167
+        Me.應付供應商_dgv.Size = New System.Drawing.Size(75, 290)
168
+        Me.應付供應商_dgv.TabIndex = 1167
169 169
         '
170
-        'DataGridView2
170
+        '採購清單_dgv
171 171
         '
172 172
         DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
173
-        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
174
-        Me.DataGridView2.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
173
+        Me.採購清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
174
+        Me.採購清單_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
175 175
             Or System.Windows.Forms.AnchorStyles.Left) _
176 176
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
177
-        Me.DataGridView2.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
178
-        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
179
-        Me.DataGridView2.Location = New System.Drawing.Point(86, 54)
180
-        Me.DataGridView2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
181
-        Me.DataGridView2.Name = "DataGridView2"
182
-        Me.DataGridView2.RowHeadersWidth = 5
177
+        Me.採購清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
178
+        Me.採購清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
179
+        Me.採購清單_dgv.Location = New System.Drawing.Point(86, 54)
180
+        Me.採購清單_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
181
+        Me.採購清單_dgv.Name = "採購清單_dgv"
182
+        Me.採購清單_dgv.RowHeadersWidth = 5
183 183
         DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
184
-        Me.DataGridView2.RowsDefaultCellStyle = DataGridViewCellStyle4
185
-        Me.DataGridView2.RowTemplate.Height = 24
186
-        Me.DataGridView2.Size = New System.Drawing.Size(1155, 266)
187
-        Me.DataGridView2.TabIndex = 1176
184
+        Me.採購清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
185
+        Me.採購清單_dgv.RowTemplate.Height = 24
186
+        Me.採購清單_dgv.Size = New System.Drawing.Size(1155, 266)
187
+        Me.採購清單_dgv.TabIndex = 1176
188 188
         '
189
-        'DataGridView3
189
+        '對應收支單_DGV
190 190
         '
191 191
         DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
192
-        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
193
-        Me.DataGridView3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
192
+        Me.對應收支單_DGV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
193
+        Me.對應收支單_DGV.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
194 194
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
195
-        Me.DataGridView3.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
196
-        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
197
-        Me.DataGridView3.Location = New System.Drawing.Point(8, 322)
198
-        Me.DataGridView3.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
199
-        Me.DataGridView3.Name = "DataGridView3"
200
-        Me.DataGridView3.RowHeadersWidth = 5
195
+        Me.對應收支單_DGV.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
196
+        Me.對應收支單_DGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
197
+        Me.對應收支單_DGV.Location = New System.Drawing.Point(8, 322)
198
+        Me.對應收支單_DGV.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
199
+        Me.對應收支單_DGV.Name = "對應收支單_DGV"
200
+        Me.對應收支單_DGV.RowHeadersWidth = 5
201 201
         DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
202 202
         DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
203
-        Me.DataGridView3.RowsDefaultCellStyle = DataGridViewCellStyle6
204
-        Me.DataGridView3.RowTemplate.Height = 24
205
-        Me.DataGridView3.Size = New System.Drawing.Size(1233, 283)
206
-        Me.DataGridView3.TabIndex = 1177
203
+        Me.對應收支單_DGV.RowsDefaultCellStyle = DataGridViewCellStyle6
204
+        Me.對應收支單_DGV.RowTemplate.Height = 24
205
+        Me.對應收支單_DGV.Size = New System.Drawing.Size(1233, 283)
206
+        Me.對應收支單_DGV.TabIndex = 1177
207 207
         '
208
-        'TextBox3
208
+        '供應商名稱_tb
209 209
         '
210
-        Me.TextBox3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
211
-        Me.TextBox3.Location = New System.Drawing.Point(147, 28)
212
-        Me.TextBox3.Name = "TextBox3"
213
-        Me.TextBox3.Size = New System.Drawing.Size(123, 23)
214
-        Me.TextBox3.TabIndex = 1178
210
+        Me.供應商名稱_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
211
+        Me.供應商名稱_tb.Location = New System.Drawing.Point(147, 28)
212
+        Me.供應商名稱_tb.Name = "供應商名稱_tb"
213
+        Me.供應商名稱_tb.Size = New System.Drawing.Size(123, 23)
214
+        Me.供應商名稱_tb.TabIndex = 1178
215 215
         '
216 216
         'Label3
217 217
         '
@@ -223,91 +223,91 @@ Partial Class 應付賬款控制表
223 223
         Me.Label3.TabIndex = 1179
224 224
         Me.Label3.Text = "供應商"
225 225
         '
226
-        'TextBox1
227
-        '
228
-        Me.TextBox1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
229
-        Me.TextBox1.Location = New System.Drawing.Point(30, 78)
230
-        Me.TextBox1.Name = "TextBox1"
231
-        Me.TextBox1.Size = New System.Drawing.Size(43, 23)
232
-        Me.TextBox1.TabIndex = 1180
233
-        '
234
-        'Button6
235
-        '
236
-        Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
237
-        Me.Button6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
238
-        Me.Button6.ForeColor = System.Drawing.Color.Olive
239
-        Me.Button6.Location = New System.Drawing.Point(1086, 3)
240
-        Me.Button6.Name = "Button6"
241
-        Me.Button6.Size = New System.Drawing.Size(82, 47)
242
-        Me.Button6.TabIndex = 1184
243
-        Me.Button6.Text = "依據單號取消立帳選擇"
244
-        Me.Button6.UseVisualStyleBackColor = True
245
-        '
246
-        'Button5
247
-        '
248
-        Me.Button5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
249
-        Me.Button5.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
250
-        Me.Button5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
251
-        Me.Button5.Location = New System.Drawing.Point(1033, 3)
252
-        Me.Button5.Name = "Button5"
253
-        Me.Button5.Size = New System.Drawing.Size(54, 47)
254
-        Me.Button5.TabIndex = 1183
255
-        Me.Button5.Text = "列印帳款清單"
256
-        Me.Button5.UseVisualStyleBackColor = True
257
-        '
258
-        'Button12
259
-        '
260
-        Me.Button12.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
261
-        Me.Button12.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
262
-        Me.Button12.ForeColor = System.Drawing.Color.Olive
263
-        Me.Button12.Location = New System.Drawing.Point(1167, 27)
264
-        Me.Button12.Name = "Button12"
265
-        Me.Button12.Size = New System.Drawing.Size(74, 23)
266
-        Me.Button12.TabIndex = 1182
267
-        Me.Button12.Text = "全部取消"
268
-        Me.Button12.UseVisualStyleBackColor = True
269
-        '
270
-        'Button13
271
-        '
272
-        Me.Button13.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
273
-        Me.Button13.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
274
-        Me.Button13.ForeColor = System.Drawing.Color.Olive
275
-        Me.Button13.Location = New System.Drawing.Point(1167, 3)
276
-        Me.Button13.Name = "Button13"
277
-        Me.Button13.Size = New System.Drawing.Size(74, 23)
278
-        Me.Button13.TabIndex = 1181
279
-        Me.Button13.Text = "全部選擇"
280
-        Me.Button13.UseVisualStyleBackColor = True
281
-        '
282
-        'CheckBox2
283
-        '
284
-        Me.CheckBox2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
285
-        Me.CheckBox2.AutoSize = True
286
-        Me.CheckBox2.Location = New System.Drawing.Point(927, 4)
287
-        Me.CheckBox2.Name = "CheckBox2"
288
-        Me.CheckBox2.Size = New System.Drawing.Size(99, 20)
289
-        Me.CheckBox2.TabIndex = 1185
290
-        Me.CheckBox2.Text = "列印多單選擇"
291
-        Me.CheckBox2.UseVisualStyleBackColor = True
292
-        '
293
-        'CheckBox3
294
-        '
295
-        Me.CheckBox3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
296
-        Me.CheckBox3.AutoSize = True
297
-        Me.CheckBox3.Location = New System.Drawing.Point(927, 29)
298
-        Me.CheckBox3.Name = "CheckBox3"
299
-        Me.CheckBox3.Size = New System.Drawing.Size(111, 20)
300
-        Me.CheckBox3.TabIndex = 1186
301
-        Me.CheckBox3.Text = "已立帳資料隱藏"
302
-        Me.CheckBox3.UseVisualStyleBackColor = True
303
-        '
304
-        'TextBox2
305
-        '
306
-        Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
307
-        Me.TextBox2.Location = New System.Drawing.Point(329, 28)
308
-        Me.TextBox2.Name = "TextBox2"
309
-        Me.TextBox2.Size = New System.Drawing.Size(133, 23)
310
-        Me.TextBox2.TabIndex = 1187
226
+        '供應商編號_tb
227
+        '
228
+        Me.供應商編號_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
229
+        Me.供應商編號_tb.Location = New System.Drawing.Point(30, 78)
230
+        Me.供應商編號_tb.Name = "供應商編號_tb"
231
+        Me.供應商編號_tb.Size = New System.Drawing.Size(43, 23)
232
+        Me.供應商編號_tb.TabIndex = 1180
233
+        '
234
+        '暫時取消立帳選擇_bu
235
+        '
236
+        Me.暫時取消立帳選擇_bu.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
237
+        Me.暫時取消立帳選擇_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
238
+        Me.暫時取消立帳選擇_bu.ForeColor = System.Drawing.Color.Olive
239
+        Me.暫時取消立帳選擇_bu.Location = New System.Drawing.Point(1086, 3)
240
+        Me.暫時取消立帳選擇_bu.Name = "暫時取消立帳選擇_bu"
241
+        Me.暫時取消立帳選擇_bu.Size = New System.Drawing.Size(82, 47)
242
+        Me.暫時取消立帳選擇_bu.TabIndex = 1184
243
+        Me.暫時取消立帳選擇_bu.Text = "依據單號取消立帳選擇"
244
+        Me.暫時取消立帳選擇_bu.UseVisualStyleBackColor = True
245
+        '
246
+        '列印應付帳款清單_bu
247
+        '
248
+        Me.列印應付帳款清單_bu.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
249
+        Me.列印應付帳款清單_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
250
+        Me.列印應付帳款清單_bu.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
251
+        Me.列印應付帳款清單_bu.Location = New System.Drawing.Point(1033, 3)
252
+        Me.列印應付帳款清單_bu.Name = "列印應付帳款清單_bu"
253
+        Me.列印應付帳款清單_bu.Size = New System.Drawing.Size(54, 47)
254
+        Me.列印應付帳款清單_bu.TabIndex = 1183
255
+        Me.列印應付帳款清單_bu.Text = "列印帳款清單"
256
+        Me.列印應付帳款清單_bu.UseVisualStyleBackColor = True
257
+        '
258
+        '全部取消_bu
259
+        '
260
+        Me.全部取消_bu.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
261
+        Me.全部取消_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
262
+        Me.全部取消_bu.ForeColor = System.Drawing.Color.Olive
263
+        Me.全部取消_bu.Location = New System.Drawing.Point(1167, 27)
264
+        Me.全部取消_bu.Name = "全部取消_bu"
265
+        Me.全部取消_bu.Size = New System.Drawing.Size(74, 23)
266
+        Me.全部取消_bu.TabIndex = 1182
267
+        Me.全部取消_bu.Text = "全部取消"
268
+        Me.全部取消_bu.UseVisualStyleBackColor = True
269
+        '
270
+        '全部選擇_bu
271
+        '
272
+        Me.全部選擇_bu.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
273
+        Me.全部選擇_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
274
+        Me.全部選擇_bu.ForeColor = System.Drawing.Color.Olive
275
+        Me.全部選擇_bu.Location = New System.Drawing.Point(1167, 3)
276
+        Me.全部選擇_bu.Name = "全部選擇_bu"
277
+        Me.全部選擇_bu.Size = New System.Drawing.Size(74, 23)
278
+        Me.全部選擇_bu.TabIndex = 1181
279
+        Me.全部選擇_bu.Text = "全部選擇"
280
+        Me.全部選擇_bu.UseVisualStyleBackColor = True
281
+        '
282
+        '列印多選_ch
283
+        '
284
+        Me.列印多選_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
285
+        Me.列印多選_ch.AutoSize = True
286
+        Me.列印多選_ch.Location = New System.Drawing.Point(927, 4)
287
+        Me.列印多選_ch.Name = "列印多選_ch"
288
+        Me.列印多選_ch.Size = New System.Drawing.Size(99, 20)
289
+        Me.列印多選_ch.TabIndex = 1185
290
+        Me.列印多選_ch.Text = "列印多單選擇"
291
+        Me.列印多選_ch.UseVisualStyleBackColor = True
292
+        '
293
+        '已立帳隱藏_ch
294
+        '
295
+        Me.已立帳隱藏_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
296
+        Me.已立帳隱藏_ch.AutoSize = True
297
+        Me.已立帳隱藏_ch.Location = New System.Drawing.Point(927, 29)
298
+        Me.已立帳隱藏_ch.Name = "已立帳隱藏_ch"
299
+        Me.已立帳隱藏_ch.Size = New System.Drawing.Size(111, 20)
300
+        Me.已立帳隱藏_ch.TabIndex = 1186
301
+        Me.已立帳隱藏_ch.Text = "已立帳資料隱藏"
302
+        Me.已立帳隱藏_ch.UseVisualStyleBackColor = True
303
+        '
304
+        '單據編號_tb
305
+        '
306
+        Me.單據編號_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
307
+        Me.單據編號_tb.Location = New System.Drawing.Point(329, 28)
308
+        Me.單據編號_tb.Name = "單據編號_tb"
309
+        Me.單據編號_tb.Size = New System.Drawing.Size(133, 23)
310
+        Me.單據編號_tb.TabIndex = 1187
311 311
         '
312 312
         'Label1
313 313
         '
@@ -329,15 +329,15 @@ Partial Class 應付賬款控制表
329 329
         Me.Label7.TabIndex = 1194
330 330
         Me.Label7.Text = "未付餘額"
331 331
         '
332
-        'NumericUpDown2
332
+        '未付金額_nud
333 333
         '
334
-        Me.NumericUpDown2.Location = New System.Drawing.Point(648, 28)
335
-        Me.NumericUpDown2.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
336
-        Me.NumericUpDown2.Minimum = New Decimal(New Integer() {1000000, 0, 0, -2147483648})
337
-        Me.NumericUpDown2.Name = "NumericUpDown2"
338
-        Me.NumericUpDown2.Size = New System.Drawing.Size(72, 23)
339
-        Me.NumericUpDown2.TabIndex = 1193
340
-        Me.NumericUpDown2.ThousandsSeparator = True
334
+        Me.未付金額_nud.Location = New System.Drawing.Point(648, 28)
335
+        Me.未付金額_nud.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
336
+        Me.未付金額_nud.Minimum = New Decimal(New Integer() {1000000, 0, 0, -2147483648})
337
+        Me.未付金額_nud.Name = "未付金額_nud"
338
+        Me.未付金額_nud.Size = New System.Drawing.Size(72, 23)
339
+        Me.未付金額_nud.TabIndex = 1193
340
+        Me.未付金額_nud.ThousandsSeparator = True
341 341
         '
342 342
         'Label2
343 343
         '
@@ -349,15 +349,15 @@ Partial Class 應付賬款控制表
349 349
         Me.Label2.TabIndex = 1192
350 350
         Me.Label2.Text = "實付金額"
351 351
         '
352
-        'NumericUpDown1
352
+        '實付金額_nud
353 353
         '
354
-        Me.NumericUpDown1.Location = New System.Drawing.Point(519, 28)
355
-        Me.NumericUpDown1.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
356
-        Me.NumericUpDown1.Minimum = New Decimal(New Integer() {1000000, 0, 0, -2147483648})
357
-        Me.NumericUpDown1.Name = "NumericUpDown1"
358
-        Me.NumericUpDown1.Size = New System.Drawing.Size(72, 23)
359
-        Me.NumericUpDown1.TabIndex = 1191
360
-        Me.NumericUpDown1.ThousandsSeparator = True
354
+        Me.實付金額_nud.Location = New System.Drawing.Point(519, 28)
355
+        Me.實付金額_nud.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
356
+        Me.實付金額_nud.Minimum = New Decimal(New Integer() {1000000, 0, 0, -2147483648})
357
+        Me.實付金額_nud.Name = "實付金額_nud"
358
+        Me.實付金額_nud.Size = New System.Drawing.Size(72, 23)
359
+        Me.實付金額_nud.TabIndex = 1191
360
+        Me.實付金額_nud.ThousandsSeparator = True
361 361
         '
362 362
         'Label5
363 363
         '
@@ -369,64 +369,64 @@ Partial Class 應付賬款控制表
369 369
         Me.Label5.TabIndex = 1190
370 370
         Me.Label5.Text = "應付金額"
371 371
         '
372
-        'TextBox4
373
-        '
374
-        Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
375
-        Me.TextBox4.Location = New System.Drawing.Point(519, 3)
376
-        Me.TextBox4.Name = "TextBox4"
377
-        Me.TextBox4.Size = New System.Drawing.Size(72, 23)
378
-        Me.TextBox4.TabIndex = 1189
379
-        '
380
-        'TextBox5
381
-        '
382
-        Me.TextBox5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
383
-        Me.TextBox5.Location = New System.Drawing.Point(30, 107)
384
-        Me.TextBox5.Name = "TextBox5"
385
-        Me.TextBox5.Size = New System.Drawing.Size(43, 23)
386
-        Me.TextBox5.TabIndex = 1195
387
-        '
388
-        'Button3
389
-        '
390
-        Me.Button3.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
391
-        Me.Button3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
392
-        Me.Button3.Location = New System.Drawing.Point(595, 3)
393
-        Me.Button3.Name = "Button3"
394
-        Me.Button3.Size = New System.Drawing.Size(125, 23)
395
-        Me.Button3.TabIndex = 1196
396
-        Me.Button3.Text = "間格時間內所有帳款"
397
-        Me.Button3.UseVisualStyleBackColor = True
398
-        '
399
-        'Button4
400
-        '
401
-        Me.Button4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
402
-        Me.Button4.ForeColor = System.Drawing.Color.Green
403
-        Me.Button4.Location = New System.Drawing.Point(813, 4)
404
-        Me.Button4.Name = "Button4"
405
-        Me.Button4.Size = New System.Drawing.Size(112, 22)
406
-        Me.Button4.TabIndex = 1197
407
-        Me.Button4.Text = "財務單據開立"
408
-        Me.Button4.UseVisualStyleBackColor = True
409
-        '
410
-        'TextBox6
411
-        '
412
-        Me.TextBox6.ForeColor = System.Drawing.Color.Green
413
-        Me.TextBox6.Location = New System.Drawing.Point(815, 28)
414
-        Me.TextBox6.Name = "TextBox6"
415
-        Me.TextBox6.Size = New System.Drawing.Size(110, 23)
416
-        Me.TextBox6.TabIndex = 1198
417
-        '
418
-        'CheckBox1
419
-        '
420
-        Me.CheckBox1.AutoSize = True
421
-        Me.CheckBox1.Checked = True
422
-        Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
423
-        Me.CheckBox1.ForeColor = System.Drawing.Color.Green
424
-        Me.CheckBox1.Location = New System.Drawing.Point(780, 5)
425
-        Me.CheckBox1.Name = "CheckBox1"
426
-        Me.CheckBox1.Size = New System.Drawing.Size(39, 20)
427
-        Me.CheckBox1.TabIndex = 1201
428
-        Me.CheckBox1.Text = "補"
429
-        Me.CheckBox1.UseVisualStyleBackColor = True
372
+        '實付金額_tb
373
+        '
374
+        Me.實付金額_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
375
+        Me.實付金額_tb.Location = New System.Drawing.Point(519, 3)
376
+        Me.實付金額_tb.Name = "實付金額_tb"
377
+        Me.實付金額_tb.Size = New System.Drawing.Size(72, 23)
378
+        Me.實付金額_tb.TabIndex = 1189
379
+        '
380
+        '實付金額計算用_tb
381
+        '
382
+        Me.實付金額計算用_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
383
+        Me.實付金額計算用_tb.Location = New System.Drawing.Point(30, 107)
384
+        Me.實付金額計算用_tb.Name = "實付金額計算用_tb"
385
+        Me.實付金額計算用_tb.Size = New System.Drawing.Size(43, 23)
386
+        Me.實付金額計算用_tb.TabIndex = 1195
387
+        '
388
+        '間格時間內所有帳款_bu
389
+        '
390
+        Me.間格時間內所有帳款_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
391
+        Me.間格時間內所有帳款_bu.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
392
+        Me.間格時間內所有帳款_bu.Location = New System.Drawing.Point(595, 3)
393
+        Me.間格時間內所有帳款_bu.Name = "間格時間內所有帳款_bu"
394
+        Me.間格時間內所有帳款_bu.Size = New System.Drawing.Size(125, 23)
395
+        Me.間格時間內所有帳款_bu.TabIndex = 1196
396
+        Me.間格時間內所有帳款_bu.Text = "間格時間內所有帳款"
397
+        Me.間格時間內所有帳款_bu.UseVisualStyleBackColor = True
398
+        '
399
+        '開立財務單據_bu
400
+        '
401
+        Me.開立財務單據_bu.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
402
+        Me.開立財務單據_bu.ForeColor = System.Drawing.Color.Green
403
+        Me.開立財務單據_bu.Location = New System.Drawing.Point(813, 4)
404
+        Me.開立財務單據_bu.Name = "開立財務單據_bu"
405
+        Me.開立財務單據_bu.Size = New System.Drawing.Size(112, 22)
406
+        Me.開立財務單據_bu.TabIndex = 1197
407
+        Me.開立財務單據_bu.Text = "財務單據開立"
408
+        Me.開立財務單據_bu.UseVisualStyleBackColor = True
409
+        '
410
+        '財務收支單號_tb
411
+        '
412
+        Me.財務收支單號_tb.ForeColor = System.Drawing.Color.Green
413
+        Me.財務收支單號_tb.Location = New System.Drawing.Point(815, 28)
414
+        Me.財務收支單號_tb.Name = "財務收支單號_tb"
415
+        Me.財務收支單號_tb.Size = New System.Drawing.Size(110, 23)
416
+        Me.財務收支單號_tb.TabIndex = 1198
417
+        '
418
+        '非當天日期_ch
419
+        '
420
+        Me.非當天日期_ch.AutoSize = True
421
+        Me.非當天日期_ch.Checked = True
422
+        Me.非當天日期_ch.CheckState = System.Windows.Forms.CheckState.Checked
423
+        Me.非當天日期_ch.ForeColor = System.Drawing.Color.Green
424
+        Me.非當天日期_ch.Location = New System.Drawing.Point(780, 5)
425
+        Me.非當天日期_ch.Name = "非當天日期_ch"
426
+        Me.非當天日期_ch.Size = New System.Drawing.Size(39, 20)
427
+        Me.非當天日期_ch.TabIndex = 1201
428
+        Me.非當天日期_ch.Text = "補"
429
+        Me.非當天日期_ch.UseVisualStyleBackColor = True
430 430
         '
431 431
         'Label6
432 432
         '
@@ -438,101 +438,101 @@ Partial Class 應付賬款控制表
438 438
         Me.Label6.TabIndex = 1200
439 439
         Me.Label6.Text = "開立日期"
440 440
         '
441
-        'DateTimePicker3
441
+        '單據日期_dtp
442 442
         '
443
-        Me.DateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
444
-        Me.DateTimePicker3.Location = New System.Drawing.Point(723, 27)
445
-        Me.DateTimePicker3.Name = "DateTimePicker3"
446
-        Me.DateTimePicker3.Size = New System.Drawing.Size(90, 23)
447
-        Me.DateTimePicker3.TabIndex = 1199
443
+        Me.單據日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
444
+        Me.單據日期_dtp.Location = New System.Drawing.Point(723, 27)
445
+        Me.單據日期_dtp.Name = "單據日期_dtp"
446
+        Me.單據日期_dtp.Size = New System.Drawing.Size(90, 23)
447
+        Me.單據日期_dtp.TabIndex = 1199
448 448
         '
449
-        '應付賬款控制表1
449
+        '應付賬款控制表
450 450
         '
451 451
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
452 452
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
453 453
         Me.ClientSize = New System.Drawing.Size(1249, 611)
454 454
         Me.Controls.Add(Me.Label6)
455
-        Me.Controls.Add(Me.DateTimePicker3)
456
-        Me.Controls.Add(Me.TextBox6)
457
-        Me.Controls.Add(Me.Button4)
458
-        Me.Controls.Add(Me.Button3)
459
-        Me.Controls.Add(Me.TextBox5)
455
+        Me.Controls.Add(Me.單據日期_dtp)
456
+        Me.Controls.Add(Me.財務收支單號_tb)
457
+        Me.Controls.Add(Me.開立財務單據_bu)
458
+        Me.Controls.Add(Me.間格時間內所有帳款_bu)
459
+        Me.Controls.Add(Me.實付金額計算用_tb)
460 460
         Me.Controls.Add(Me.Label7)
461
-        Me.Controls.Add(Me.NumericUpDown2)
461
+        Me.Controls.Add(Me.未付金額_nud)
462 462
         Me.Controls.Add(Me.Label2)
463
-        Me.Controls.Add(Me.NumericUpDown1)
463
+        Me.Controls.Add(Me.實付金額_nud)
464 464
         Me.Controls.Add(Me.Label5)
465
-        Me.Controls.Add(Me.TextBox4)
465
+        Me.Controls.Add(Me.實付金額_tb)
466 466
         Me.Controls.Add(Me.Label1)
467
-        Me.Controls.Add(Me.TextBox2)
468
-        Me.Controls.Add(Me.Button6)
469
-        Me.Controls.Add(Me.Button5)
470
-        Me.Controls.Add(Me.Button12)
471
-        Me.Controls.Add(Me.Button13)
472
-        Me.Controls.Add(Me.CheckBox2)
473
-        Me.Controls.Add(Me.CheckBox3)
474
-        Me.Controls.Add(Me.TextBox1)
475
-        Me.Controls.Add(Me.TextBox3)
467
+        Me.Controls.Add(Me.單據編號_tb)
468
+        Me.Controls.Add(Me.暫時取消立帳選擇_bu)
469
+        Me.Controls.Add(Me.列印應付帳款清單_bu)
470
+        Me.Controls.Add(Me.全部取消_bu)
471
+        Me.Controls.Add(Me.全部選擇_bu)
472
+        Me.Controls.Add(Me.列印多選_ch)
473
+        Me.Controls.Add(Me.已立帳隱藏_ch)
474
+        Me.Controls.Add(Me.供應商編號_tb)
475
+        Me.Controls.Add(Me.供應商名稱_tb)
476 476
         Me.Controls.Add(Me.Label3)
477
-        Me.Controls.Add(Me.DataGridView3)
478
-        Me.Controls.Add(Me.DataGridView2)
479
-        Me.Controls.Add(Me.DateTimePicker4)
480
-        Me.Controls.Add(Me.Button1)
481
-        Me.Controls.Add(Me.一般月)
482
-        Me.Controls.Add(Me.會計月)
483
-        Me.Controls.Add(Me.Button2)
477
+        Me.Controls.Add(Me.對應收支單_DGV)
478
+        Me.Controls.Add(Me.採購清單_dgv)
479
+        Me.Controls.Add(Me.中間日期_dtp)
480
+        Me.Controls.Add(Me.上個月_bu)
481
+        Me.Controls.Add(Me.一般月_ch)
482
+        Me.Controls.Add(Me.會計月_ch)
483
+        Me.Controls.Add(Me.下個月_bu)
484 484
         Me.Controls.Add(Me.Label4)
485
-        Me.Controls.Add(Me.DateTimePicker2)
486
-        Me.Controls.Add(Me.DateTimePicker1)
487
-        Me.Controls.Add(Me.DataGridView1)
488
-        Me.Controls.Add(Me.CheckBox1)
485
+        Me.Controls.Add(Me.結束日期_dtp)
486
+        Me.Controls.Add(Me.開始日期_dtp)
487
+        Me.Controls.Add(Me.應付供應商_dgv)
488
+        Me.Controls.Add(Me.非當天日期_ch)
489 489
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
490 490
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
491
-        Me.Name = "應付賬款控制表1"
491
+        Me.Name = "應付賬款控制表"
492 492
         Me.Text = "應付賬款控制表1"
493
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
494
-        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
495
-        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
496
-        CType(Me.NumericUpDown2, System.ComponentModel.ISupportInitialize).EndInit()
497
-        CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit()
493
+        CType(Me.應付供應商_dgv, System.ComponentModel.ISupportInitialize).EndInit()
494
+        CType(Me.採購清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
495
+        CType(Me.對應收支單_DGV, System.ComponentModel.ISupportInitialize).EndInit()
496
+        CType(Me.未付金額_nud, System.ComponentModel.ISupportInitialize).EndInit()
497
+        CType(Me.實付金額_nud, System.ComponentModel.ISupportInitialize).EndInit()
498 498
         Me.ResumeLayout(False)
499 499
         Me.PerformLayout()
500 500
 
501 501
     End Sub
502 502
 
503
-    Friend WithEvents DateTimePicker4 As DateTimePicker
504
-    Friend WithEvents Button1 As Button
505
-    Friend WithEvents 一般月 As CheckBox
506
-    Friend WithEvents 會計月 As CheckBox
507
-    Friend WithEvents Button2 As Button
503
+    Friend WithEvents 中間日期_dtp As DateTimePicker
504
+    Friend WithEvents 上個月_bu As Button
505
+    Friend WithEvents 一般月_ch As CheckBox
506
+    Friend WithEvents 會計月_ch As CheckBox
507
+    Friend WithEvents 下個月_bu As Button
508 508
     Friend WithEvents Label4 As Label
509
-    Friend WithEvents DateTimePicker2 As DateTimePicker
510
-    Friend WithEvents DateTimePicker1 As DateTimePicker
511
-    Friend WithEvents DataGridView1 As DataGridView
512
-    Friend WithEvents DataGridView2 As DataGridView
513
-    Friend WithEvents DataGridView3 As DataGridView
514
-    Friend WithEvents TextBox3 As TextBox
509
+    Friend WithEvents 結束日期_dtp As DateTimePicker
510
+    Friend WithEvents 開始日期_dtp As DateTimePicker
511
+    Friend WithEvents 應付供應商_dgv As DataGridView
512
+    Friend WithEvents 採購清單_dgv As DataGridView
513
+    Friend WithEvents 對應收支單_DGV As DataGridView
514
+    Friend WithEvents 供應商名稱_tb As TextBox
515 515
     Friend WithEvents Label3 As Label
516
-    Friend WithEvents TextBox1 As TextBox
517
-    Friend WithEvents Button6 As Button
518
-    Friend WithEvents Button5 As Button
519
-    Friend WithEvents Button12 As Button
520
-    Friend WithEvents Button13 As Button
521
-    Friend WithEvents CheckBox2 As CheckBox
522
-    Friend WithEvents CheckBox3 As CheckBox
523
-    Friend WithEvents TextBox2 As TextBox
516
+    Friend WithEvents 供應商編號_tb As TextBox
517
+    Friend WithEvents 暫時取消立帳選擇_bu As Button
518
+    Friend WithEvents 列印應付帳款清單_bu As Button
519
+    Friend WithEvents 全部取消_bu As Button
520
+    Friend WithEvents 全部選擇_bu As Button
521
+    Friend WithEvents 列印多選_ch As CheckBox
522
+    Friend WithEvents 已立帳隱藏_ch As CheckBox
523
+    Friend WithEvents 單據編號_tb As TextBox
524 524
     Friend WithEvents Label1 As Label
525 525
     Friend WithEvents Label7 As Label
526
-    Friend WithEvents NumericUpDown2 As NumericUpDown
526
+    Friend WithEvents 未付金額_nud As NumericUpDown
527 527
     Friend WithEvents Label2 As Label
528
-    Friend WithEvents NumericUpDown1 As NumericUpDown
528
+    Friend WithEvents 實付金額_nud As NumericUpDown
529 529
     Friend WithEvents Label5 As Label
530
-    Friend WithEvents TextBox4 As TextBox
531
-    Friend WithEvents TextBox5 As TextBox
532
-    Friend WithEvents Button3 As Button
533
-    Friend WithEvents Button4 As Button
534
-    Friend WithEvents TextBox6 As TextBox
535
-    Friend WithEvents CheckBox1 As CheckBox
530
+    Friend WithEvents 實付金額_tb As TextBox
531
+    Friend WithEvents 實付金額計算用_tb As TextBox
532
+    Friend WithEvents 間格時間內所有帳款_bu As Button
533
+    Friend WithEvents 開立財務單據_bu As Button
534
+    Friend WithEvents 財務收支單號_tb As TextBox
535
+    Friend WithEvents 非當天日期_ch As CheckBox
536 536
     Friend WithEvents Label6 As Label
537
-    Friend WithEvents DateTimePicker3 As DateTimePicker
537
+    Friend WithEvents 單據日期_dtp As DateTimePicker
538 538
 End Class

+ 151
- 153
MaoOrange-Hongji/財務系統管理/應付賬款控制表.vb Parādīt failu

@@ -13,250 +13,248 @@ Public Class 應付賬款控制表
13 13
     Dim N1 As Integer
14 14
     Dim xlApp As Application : Dim xlBook As Workbook : Dim xlSheet As Worksheet
15 15
     Private Sub Set_賬款主單()
16
-        DataGridView1.DataSource = Nothing : ds.Clear() : DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView1.ColumnHeadersHeight = 40
17
-        DataGridView1.AllowUserToAddRows = False : DataGridView1.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView1.MultiSelect = True
16
+        應付供應商_dgv.DataSource = Nothing : ds.Clear() : 應付供應商_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : 應付供應商_dgv.ColumnHeadersHeight = 40
17
+        應付供應商_dgv.AllowUserToAddRows = False : 應付供應商_dgv.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : 應付供應商_dgv.MultiSelect = True
18 18
         SQL_應付賬款主單()
19
-        da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
20
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).FillWeight = 100
21
-        DataGridView1.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
22
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
23
-        For I As Integer = 0 To 1 : DataGridView1.Columns(I).ReadOnly = True : Next
19
+        da.Fill(ds) : 應付供應商_dgv.DataSource = ds.Tables(0) : conn.Close()
20
+        應付供應商_dgv.Columns(0).Visible = False : 應付供應商_dgv.Columns(1).FillWeight = 100
21
+        應付供應商_dgv.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 應付供應商_dgv.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
22
+        應付供應商_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 應付供應商_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
23
+        For I As Integer = 0 To 1 : 應付供應商_dgv.Columns(I).ReadOnly = True : Next
24 24
     End Sub
25 25
     Private Sub Set_賬款清單()
26
-        DataGridView2.DataSource = Nothing : ds1.Clear() : DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView2.ColumnHeadersHeight = 40
27
-        DataGridView2.AllowUserToAddRows = False : DataGridView2.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView2.MultiSelect = True
26
+        採購清單_dgv.DataSource = Nothing : ds1.Clear() : 採購清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : 採購清單_dgv.ColumnHeadersHeight = 40
27
+        採購清單_dgv.AllowUserToAddRows = False : 採購清單_dgv.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : 採購清單_dgv.MultiSelect = True
28 28
 
29
-        If TextBox6.Text = "" Then : SQL_應付賬款清單一() : Else : SQL_應付賬款清單二() : End If
29
+        If 財務收支單號_tb.Text = "" Then : SQL_應付賬款清單一() : Else : SQL_應付賬款清單二() : End If
30 30
 
31
-        da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
31
+        da.Fill(ds1) : 採購清單_dgv.DataSource = ds1.Tables(0) : conn.Close()
32 32
 
33
-        DataGridView2.Columns(0).FillWeight = 150 : DataGridView2.Columns(1).Visible = False : DataGridView2.Columns(2).Visible = False : DataGridView2.Columns(3).Visible = False
34
-        DataGridView2.Columns(4).FillWeight = 80 : DataGridView2.Columns(5).FillWeight = 300 : DataGridView2.Columns(6).FillWeight = 80 : DataGridView2.Columns(7).FillWeight = 80
35
-        DataGridView2.Columns(8).FillWeight = 80 : DataGridView2.Columns(9).FillWeight = 80 : DataGridView2.Columns(10).FillWeight = 100 : DataGridView2.Columns(11).FillWeight = 100
36
-        DataGridView2.Columns(12).FillWeight = 150 : DataGridView2.Columns(13).FillWeight = 60 : DataGridView2.Columns(14).FillWeight = 50 : DataGridView2.Columns(15).Visible = False
37
-        DataGridView2.Columns(16).FillWeight = 120 : DataGridView2.Columns(17).Visible = False
33
+        採購清單_dgv.Columns(0).FillWeight = 150 : 採購清單_dgv.Columns(1).Visible = False : 採購清單_dgv.Columns(2).Visible = False : 採購清單_dgv.Columns(3).Visible = False
34
+        採購清單_dgv.Columns(4).FillWeight = 80 : 採購清單_dgv.Columns(5).FillWeight = 300 : 採購清單_dgv.Columns(6).FillWeight = 80 : 採購清單_dgv.Columns(7).FillWeight = 80
35
+        採購清單_dgv.Columns(8).FillWeight = 80 : 採購清單_dgv.Columns(9).FillWeight = 80 : 採購清單_dgv.Columns(10).FillWeight = 100 : 採購清單_dgv.Columns(11).FillWeight = 100
36
+        採購清單_dgv.Columns(12).FillWeight = 150 : 採購清單_dgv.Columns(13).FillWeight = 60 : 採購清單_dgv.Columns(14).FillWeight = 50 : 採購清單_dgv.Columns(15).Visible = False
37
+        採購清單_dgv.Columns(16).FillWeight = 120 : 採購清單_dgv.Columns(17).Visible = False
38 38
 
39
-        DataGridView2.Columns(6).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(7).DefaultCellStyle.Format = "#,##0.000"
40
-        DataGridView2.Columns(8).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(9).DefaultCellStyle.Format = "#,##0"
41
-        DataGridView2.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
42
-        DataGridView2.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
43
-        DataGridView2.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
44
-        DataGridView2.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
45
-        DataGridView2.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
46
-        DataGridView2.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
47
-        DataGridView2.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
48
-        DataGridView2.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
49
-        DataGridView2.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
39
+        採購清單_dgv.Columns(6).DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns(7).DefaultCellStyle.Format = "#,##0.000"
40
+        採購清單_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns(9).DefaultCellStyle.Format = "#,##0"
41
+        採購清單_dgv.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
42
+        採購清單_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
43
+        採購清單_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
44
+        採購清單_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
45
+        採購清單_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
46
+        採購清單_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
47
+        採購清單_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
48
+        採購清單_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
49
+        採購清單_dgv.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 採購清單_dgv.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
50 50
 
51
-        For I As Integer = 0 To 12 : DataGridView2.Columns(I).ReadOnly = True : Next : DataGridView2.Columns(14).ReadOnly = True
52
-        For I As Integer = 0 To DataGridView2.Rows.Count - 1
53
-            If DataGridView2.Rows(I).Cells("應付立帳").Value.ToString = "" Then : DataGridView2.Rows(I).Cells("應付立帳").Value = False : End If
54
-            DataGridView2.Rows(I).Cells("選擇").Value = False
51
+        For I As Integer = 0 To 12 : 採購清單_dgv.Columns(I).ReadOnly = True : Next : 採購清單_dgv.Columns(14).ReadOnly = True
52
+        For I As Integer = 0 To 採購清單_dgv.Rows.Count - 1
53
+            If 採購清單_dgv.Rows(I).Cells("應付立帳").Value.ToString = "" Then : 採購清單_dgv.Rows(I).Cells("應付立帳").Value = False : End If
54
+            採購清單_dgv.Rows(I).Cells("選擇").Value = False
55 55
         Next
56 56
     End Sub
57 57
     Private Sub Set_財務清單()
58
-        DataGridView3.DataSource = Nothing : ds2.Clear() : DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView3.ColumnHeadersHeight = 40
59
-        DataGridView3.AllowUserToAddRows = False : DataGridView3.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView3.MultiSelect = True
60
-        DataGridView3.RowTemplate.Height = 35
58
+        對應收支單_DGV.DataSource = Nothing : ds2.Clear() : 對應收支單_DGV.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : 對應收支單_DGV.ColumnHeadersHeight = 40
59
+        對應收支單_DGV.AllowUserToAddRows = False : 對應收支單_DGV.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : 對應收支單_DGV.MultiSelect = True
60
+        對應收支單_DGV.RowTemplate.Height = 35
61 61
         SQL_應付賬款清單三()
62
-        da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
62
+        da.Fill(ds2) : 對應收支單_DGV.DataSource = ds2.Tables(0) : conn.Close()
63 63
 
64
-        DataGridView3.Columns(0).Visible = False : DataGridView3.Columns(1).Visible = False : DataGridView3.Columns(2).FillWeight = 75 : DataGridView3.Columns(3).Visible = False
65
-        DataGridView3.Columns(4).FillWeight = 150 : DataGridView3.Columns(5).FillWeight = 80 : DataGridView3.Columns(6).Visible = False : DataGridView3.Columns(7).FillWeight = 80
66
-        DataGridView3.Columns(8).Visible = False : DataGridView3.Columns(9).FillWeight = 150 : DataGridView3.Columns(10).FillWeight = 50 : DataGridView3.Columns(11).FillWeight = 50
67
-        DataGridView3.Columns(12).FillWeight = 120 : DataGridView3.Columns(13).FillWeight = 75 : DataGridView3.Columns(14).FillWeight = 95 : DataGridView3.Columns(15).FillWeight = 95
68
-        DataGridView3.Columns(16).FillWeight = 95 : DataGridView3.Columns(17).FillWeight = 95 : DataGridView3.Columns(18).FillWeight = 75 : DataGridView3.Columns(19).Visible = False
69
-        DataGridView3.Columns(20).FillWeight = 150 : DataGridView3.Columns(21).FillWeight = 100 : DataGridView3.Columns(22).FillWeight = 80 : DataGridView3.Columns(23).FillWeight = 150
70
-        DataGridView3.Columns(24).Visible = False : DataGridView3.Columns(25).Visible = False : DataGridView3.Columns(26).Visible = False
64
+        對應收支單_DGV.Columns(0).Visible = False : 對應收支單_DGV.Columns(1).Visible = False : 對應收支單_DGV.Columns(2).FillWeight = 75 : 對應收支單_DGV.Columns(3).Visible = False
65
+        對應收支單_DGV.Columns(4).FillWeight = 150 : 對應收支單_DGV.Columns(5).FillWeight = 80 : 對應收支單_DGV.Columns(6).Visible = False : 對應收支單_DGV.Columns(7).FillWeight = 80
66
+        對應收支單_DGV.Columns(8).Visible = False : 對應收支單_DGV.Columns(9).FillWeight = 150 : 對應收支單_DGV.Columns(10).FillWeight = 50 : 對應收支單_DGV.Columns(11).FillWeight = 50
67
+        對應收支單_DGV.Columns(12).FillWeight = 120 : 對應收支單_DGV.Columns(13).FillWeight = 75 : 對應收支單_DGV.Columns(14).FillWeight = 95 : 對應收支單_DGV.Columns(15).FillWeight = 95
68
+        對應收支單_DGV.Columns(16).FillWeight = 95 : 對應收支單_DGV.Columns(17).FillWeight = 95 : 對應收支單_DGV.Columns(18).FillWeight = 75 : 對應收支單_DGV.Columns(19).Visible = False
69
+        對應收支單_DGV.Columns(20).FillWeight = 150 : 對應收支單_DGV.Columns(21).FillWeight = 100 : 對應收支單_DGV.Columns(22).FillWeight = 80 : 對應收支單_DGV.Columns(23).FillWeight = 150
70
+        對應收支單_DGV.Columns(24).Visible = False : 對應收支單_DGV.Columns(25).Visible = False : 對應收支單_DGV.Columns(26).Visible = False
71 71
 
72
-        DataGridView3.Columns(6).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(7).DefaultCellStyle.Format = "#,##0"
73
-        DataGridView3.Columns(8).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(5).DefaultCellStyle.Format = "#,##0"
74
-        DataGridView3.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
75
-        DataGridView3.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
76
-        DataGridView3.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
77
-        DataGridView3.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
78
-        DataGridView3.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
79
-        DataGridView3.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
80
-        DataGridView3.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
81
-        DataGridView3.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
72
+        對應收支單_DGV.Columns(6).DefaultCellStyle.Format = "#,##0" : 對應收支單_DGV.Columns(7).DefaultCellStyle.Format = "#,##0"
73
+        對應收支單_DGV.Columns(8).DefaultCellStyle.Format = "#,##0" : 對應收支單_DGV.Columns(5).DefaultCellStyle.Format = "#,##0"
74
+        對應收支單_DGV.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
75
+        對應收支單_DGV.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
76
+        對應收支單_DGV.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
77
+        對應收支單_DGV.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
78
+        對應收支單_DGV.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
79
+        對應收支單_DGV.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
80
+        對應收支單_DGV.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
81
+        對應收支單_DGV.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 對應收支單_DGV.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
82 82
     End Sub
83 83
     Private Sub 日期格式()
84
-        If 會計月.Checked = True Then
84
+        If 會計月_ch.Checked = True Then
85 85
             '-------------日期一----------------------------------------------------------------------------------------
86
-            DTP = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 8) & "01" : DateTimePicker1.Value = DTP
87
-            DateTimePicker1.Value = DateTimePicker1.Value.AddMonths(-1)
88
-            DTP = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 8) & "26" : DateTimePicker1.Value = DTP
86
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
87
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(-1)
88
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "26" : 開始日期_dtp.Value = DTP
89 89
             '-------------日期二----------------------------------------------------------------------------------------
90
-            DTP = Strings.Left(Strings.Format(DateTimePicker2.Value, "yyyy/MM/dd"), 8) & "25" : DateTimePicker2.Value = DTP
90
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "25" : 結束日期_dtp.Value = DTP
91 91
         Else
92 92
             '-------------日期一----------------------------------------------------------------------------------------
93
-            DateTimePicker1.Value = DateTimePicker1.Value.AddMonths(1)
94
-            DTP = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 8) & "01" : DateTimePicker1.Value = DTP
93
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(1)
94
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
95 95
             '-------------日期二----------------------------------------------------------------------------------------
96
-            DTP = Strings.Left(Strings.Format(DateTimePicker2.Value, "yyyy/MM/dd"), 8) & "01" : DateTimePicker2.Value = DTP
97
-            DateTimePicker2.Value = DateTimePicker2.Value.AddMonths(1) : DateTimePicker2.Value = DateTimePicker2.Value.AddDays(-1)
96
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 結束日期_dtp.Value = DTP
97
+            結束日期_dtp.Value = 結束日期_dtp.Value.AddMonths(1) : 結束日期_dtp.Value = 結束日期_dtp.Value.AddDays(-1)
98 98
         End If
99 99
     End Sub
100 100
     Private Sub 應付賬款控制表1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
101 101
         Me.MdiParent = MAOJI_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
102
-        DateTimePicker4.Visible = False : TextBox1.Visible = False : TextBox5.Visible = False
102
+        中間日期_dtp.Visible = False : 供應商編號_tb.Visible = False : 實付金額計算用_tb.Visible = False
103 103
         日期格式() : Set_賬款主單()
104 104
     End Sub
105
-    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
106
-        If 會計月.Checked = True Then
107
-            DateTimePicker4.Value = DateTimePicker4.Value.AddMonths(-1)
108
-            DateTimePicker1.Value = DateTimePicker4.Value
109
-            DateTimePicker2.Value = DateTimePicker4.Value
105
+    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 上個月_bu.Click
106
+        If 會計月_ch.Checked = True Then
107
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
108
+            開始日期_dtp.Value = 中間日期_dtp.Value
109
+            結束日期_dtp.Value = 中間日期_dtp.Value
110 110
         Else
111
-            DateTimePicker4.Value = DateTimePicker4.Value.AddMonths(-1)
112
-            DateTimePicker1.Value = DateTimePicker4.Value.AddMonths(-1)
113
-            DateTimePicker2.Value = DateTimePicker4.Value
111
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
112
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
113
+            結束日期_dtp.Value = 中間日期_dtp.Value
114 114
         End If
115
-        TextBox6.Text = "" : 日期格式() : Set_賬款主單()
115
+        財務收支單號_tb.Text = "" : 日期格式() : Set_賬款主單()
116 116
     End Sub
117
-    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
118
-        If 會計月.Checked = True Then
119
-            DateTimePicker4.Value = DateTimePicker4.Value.AddMonths(1)
120
-            DateTimePicker1.Value = DateTimePicker4.Value
121
-            DateTimePicker2.Value = DateTimePicker4.Value
117
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles 下個月_bu.Click
118
+        If 會計月_ch.Checked = True Then
119
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
120
+            開始日期_dtp.Value = 中間日期_dtp.Value
121
+            結束日期_dtp.Value = 中間日期_dtp.Value
122 122
         Else
123
-            DateTimePicker4.Value = DateTimePicker4.Value.AddMonths(1)
124
-            DateTimePicker1.Value = DateTimePicker4.Value.AddMonths(-1)
125
-            DateTimePicker2.Value = DateTimePicker4.Value
123
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
124
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
125
+            結束日期_dtp.Value = 中間日期_dtp.Value
126 126
         End If
127
-        TextBox6.Text = "" : 日期格式() : Set_賬款主單()
127
+        財務收支單號_tb.Text = "" : 日期格式() : Set_賬款主單()
128 128
     End Sub
129
-    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月.Click
130
-        會計月.Checked = True : 一般月.Checked = False : TextBox6.Text = "" : 日期格式() : Set_賬款主單()
129
+    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月_ch.Click
130
+        會計月_ch.Checked = True : 一般月_ch.Checked = False : 財務收支單號_tb.Text = "" : 日期格式() : Set_賬款主單()
131 131
     End Sub
132
-    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月.Click
133
-        會計月.Checked = False : 一般月.Checked = True : TextBox6.Text = "" : 日期格式() : Set_賬款主單()
132
+    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月_ch.Click
133
+        會計月_ch.Checked = False : 一般月_ch.Checked = True : 財務收支單號_tb.Text = "" : 日期格式() : Set_賬款主單()
134 134
     End Sub
135 135
     Private Sub 選中金額計算()
136
-        TextBox4.Text = "0" : TextBox5.Text = "0"
137
-        For I As Integer = 0 To DataGridView2.Rows.Count - 1
138
-            If DataGridView2.Rows(I).Cells("選擇").Value = True Then
139
-                TextBox5.Text = Val(TextBox5.Text) + DataGridView2.Rows(I).Cells("金額").Value
140
-                TextBox4.Text = Val(TextBox4.Text) + DataGridView2.Rows(I).Cells("金額").Value
136
+        實付金額_tb.Text = "0" : 實付金額計算用_tb.Text = "0"
137
+        For I As Integer = 0 To 採購清單_dgv.Rows.Count - 1
138
+            If 採購清單_dgv.Rows(I).Cells("選擇").Value = True Then
139
+                實付金額計算用_tb.Text = Val(實付金額計算用_tb.Text) + 採購清單_dgv.Rows(I).Cells("金額").Value
140
+                實付金額_tb.Text = Val(實付金額_tb.Text) + 採購清單_dgv.Rows(I).Cells("金額").Value
141 141
             End If
142 142
         Next
143
-        NumericUpDown2.Value = Val(TextBox5.Text) - NumericUpDown1.Value
144
-        TextBox4.Text = Strings.Format(Val(TextBox4.Text), "#,##0")
143
+        未付金額_nud.Value = Val(實付金額計算用_tb.Text) - 實付金額_nud.Value
144
+        實付金額_tb.Text = Strings.Format(Val(實付金額_tb.Text), "#,##0")
145 145
     End Sub
146
-    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
146
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 應付供應商_dgv.CellClick
147 147
         If e.RowIndex = -1 Then : Else
148
-            TextBox6.Text = "" : TextBox2.Text = "" : CheckBox2.Checked = False : TextBox4.Text = "0" : NumericUpDown1.Value = 0 : NumericUpDown2.Value = 0
149
-            TextBox1.Text = DataGridView1.Rows(e.RowIndex).Cells("供應商編號").Value
150
-            TextBox3.Text = DataGridView1.Rows(e.RowIndex).Cells("供應商").Value
148
+            財務收支單號_tb.Text = "" : 單據編號_tb.Text = "" : 列印多選_ch.Checked = False : 實付金額_tb.Text = "0" : 實付金額_nud.Value = 0 : 未付金額_nud.Value = 0
149
+            供應商編號_tb.Text = 應付供應商_dgv.Rows(e.RowIndex).Cells("供應商編號").Value
150
+            供應商名稱_tb.Text = 應付供應商_dgv.Rows(e.RowIndex).Cells("供應商").Value
151 151
             Set_賬款清單() : Set_財務清單()
152
-            For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
152
+            For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1 : 採購清單_dgv.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
153 153
         End If
154 154
     End Sub
155
-    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
155
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellClick
156 156
         If e.RowIndex = -1 Then : Else
157
-            If DataGridView2.Rows(e.RowIndex).Cells("申請日期").Value.ToString = "" Then : Else : DateTimePicker3.Value = DataGridView2.Rows(e.RowIndex).Cells("申請日期").Value.ToString : End If
158
-            TextBox2.Text = DataGridView2.Rows(e.RowIndex).Cells("單據編號").Value : TextBox6.Text = DataGridView2.Rows(e.RowIndex).Cells("財務單號").Value.ToString
159
-            For I As Integer = 0 To DataGridView2.Rows.Count - 1
160
-                If CheckBox2.Checked = False Then
161
-                    DataGridView2.Rows(I).Cells("選擇").Value = False
157
+            If 採購清單_dgv.Rows(e.RowIndex).Cells("申請日期").Value.ToString = "" Then : Else : 單據日期_dtp.Value = 採購清單_dgv.Rows(e.RowIndex).Cells("申請日期").Value.ToString : End If
158
+            單據編號_tb.Text = 採購清單_dgv.Rows(e.RowIndex).Cells("單據編號").Value : 財務收支單號_tb.Text = 採購清單_dgv.Rows(e.RowIndex).Cells("財務單號").Value.ToString
159
+            For I As Integer = 0 To 採購清單_dgv.Rows.Count - 1
160
+                If 列印多選_ch.Checked = False Then
161
+                    採購清單_dgv.Rows(I).Cells("選擇").Value = False
162 162
                 End If
163
-                If TextBox2.Text = DataGridView2.Rows(I).Cells("單據編號").Value Then
164
-                    DataGridView2.Rows(I).Cells("選擇").Value = True
163
+                If 單據編號_tb.Text = 採購清單_dgv.Rows(I).Cells("單據編號").Value Then
164
+                    採購清單_dgv.Rows(I).Cells("選擇").Value = True
165 165
                 End If
166 166
             Next
167 167
             選中金額計算() : Set_財務清單()
168
-            NumericUpDown1.Value = 0
169
-            For I As Integer = 0 To DataGridView3.Rows.Count - 1
170
-                If DataGridView3.Rows(I).Cells("開票").Value < 0 Or DataGridView3.Rows(I).Cells("付現").Value < 0 Then : Else
171
-                    NumericUpDown1.Value = NumericUpDown1.Value + DataGridView3.Rows(I).Cells("開票").Value + DataGridView3.Rows(I).Cells("付現").Value
172
-                End If
168
+            實付金額_nud.Value = 0
169
+            For I As Integer = 0 To 對應收支單_DGV.Rows.Count - 1
170
+                實付金額_nud.Value = 實付金額_nud.Value + 對應收支單_DGV.Rows(I).Cells("開票").Value + 對應收支單_DGV.Rows(I).Cells("付現").Value
173 171
             Next
174 172
         End If
175 173
     End Sub
176
-    Private Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView2.RowPostPaint
174
+    Private Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 採購清單_dgv.RowPostPaint
177 175
         Dim linePen As New Pen(Color.Blue, 2)
178
-        If e.RowIndex = DataGridView2.Rows.Count - 1 Then : Exit Sub
176
+        If e.RowIndex = 採購清單_dgv.Rows.Count - 1 Then : Exit Sub
179 177
         Else
180
-            If DataGridView2(0, e.RowIndex).Value.ToString <> DataGridView2(0, e.RowIndex + 1).Value.ToString Then
181
-                Dim startX As Integer = IIf(DataGridView2.RowHeadersVisible, DataGridView2.RowHeadersWidth, 0)
178
+            If 採購清單_dgv(0, e.RowIndex).Value.ToString <> 採購清單_dgv(0, e.RowIndex + 1).Value.ToString Then
179
+                Dim startX As Integer = IIf(採購清單_dgv.RowHeadersVisible, 採購清單_dgv.RowHeadersWidth, 0)
182 180
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
183
-                Dim endX As Integer = startX + DataGridView2.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView2.HorizontalScrollingOffset
181
+                Dim endX As Integer = startX + 採購清單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 採購清單_dgv.HorizontalScrollingOffset
184 182
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
185 183
             End If
186 184
         End If
187 185
     End Sub
188
-    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
189
-        TextBox6.Text = "" : TextBox1.Text = "%%" : Set_賬款清單() : Set_財務清單()
186
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 間格時間內所有帳款_bu.Click
187
+        財務收支單號_tb.Text = "" : 供應商編號_tb.Text = "%%" : Set_賬款清單() : Set_財務清單()
190 188
     End Sub
191
-    Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown1.ValueChanged
192
-        NumericUpDown2.Value = Val(TextBox5.Text) - NumericUpDown1.Value
189
+    Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles 實付金額_nud.ValueChanged
190
+        未付金額_nud.Value = Val(實付金額計算用_tb.Text) - 實付金額_nud.Value
193 191
     End Sub
194
-    Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click
195
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
192
+    Private Sub Button13_Click(sender As Object, e As EventArgs) Handles 全部選擇_bu.Click
193
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1 : 採購清單_dgv.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
196 194
     End Sub
197
-    Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
198
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = False : Next i : 選中金額計算()
195
+    Private Sub Button12_Click(sender As Object, e As EventArgs) Handles 全部取消_bu.Click
196
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1 : 採購清單_dgv.Rows(i).Cells("選擇").Value = False : Next i : 選中金額計算()
199 197
     End Sub
200
-    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
198
+    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles 開立財務單據_bu.Click
201 199
         Dim 選擇判斷 As Boolean = False
202
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1
203
-            If DataGridView2.Rows(i).Cells("選擇").Value = True Then
200
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
201
+            If 採購清單_dgv.Rows(i).Cells("選擇").Value = True Then
204 202
                 選擇判斷 = True : Exit For
205 203
             End If
206 204
         Next i
207 205
         If 選擇判斷 = True Then
208
-            If CheckBox1.Checked = False Then : DTP = Strings.Format(Today(), "yyyy/MM/dd") : DTP1 = Strings.Format(Today(), "yyyyMMdd")
209
-            Else : DTP1 = Strings.Format(DateTimePicker3.Value, "yyyyMMdd") : DTP = Strings.Format(DateTimePicker3.Value, "yyyy/MM/dd") : End If
210
-            收付應沖金額 = Val(TextBox5.Text)
211
-            財務單申請狀態 = "應付" : 收付對應財務單號 = TextBox6.Text
212
-            收付對應客戶供應商編號 = TextBox1.Text
213
-            For I As Integer = 0 To DataGridView2.Rows.Count - 1
214
-                If DataGridView2.Rows(I).Cells("選擇").Value = True Then
215
-                    PA19 = DataGridView2.Rows(I).Cells("資料流水號").Value.ToString
206
+            If 非當天日期_ch.Checked = False Then : DTP = Strings.Format(Today(), "yyyy/MM/dd") : DTP1 = Strings.Format(Today(), "yyyyMMdd")
207
+            Else : DTP1 = Strings.Format(單據日期_dtp.Value, "yyyyMMdd") : DTP = Strings.Format(單據日期_dtp.Value, "yyyy/MM/dd") : End If
208
+            收付應沖金額 = Val(實付金額計算用_tb.Text)
209
+            財務單申請狀態 = "應付" : 收付對應財務單號 = 財務收支單號_tb.Text
210
+            收付對應客戶供應商編號 = 供應商編號_tb.Text
211
+            For I As Integer = 0 To 採購清單_dgv.Rows.Count - 1
212
+                If 採購清單_dgv.Rows(I).Cells("選擇").Value = True Then
213
+                    PA19 = 採購清單_dgv.Rows(I).Cells("資料流水號").Value.ToString
216 214
                     SQL_應收應付單號連接暫存檔新增() : conn.Close()
217 215
                 End If
218 216
             Next
219 217
             財務單具申請.ShowDialog()
220 218
             Set_賬款清單() : Set_財務清單() : 財務單具申請.Close()
221
-            For I As Integer = 0 To DataGridView2.Rows.Count - 1
222
-                DataGridView2.Rows(I).Cells("選擇").Value = True
219
+            For I As Integer = 0 To 採購清單_dgv.Rows.Count - 1
220
+                採購清單_dgv.Rows(I).Cells("選擇").Value = True
223 221
             Next
224 222
         Else
225 223
             MsgBox("最少要選擇一張單據。")
226 224
         End If
227 225
     End Sub
228
-    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
229
-        For i As Integer = 0 To DataGridView2.Rows.Count - 1
230
-            If TextBox2.Text = DataGridView2.Rows(i).Cells("單據編號").Value.ToString Then
231
-                DataGridView2.Rows(i).Cells("應付立帳").Value = False
226
+    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles 暫時取消立帳選擇_bu.Click
227
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
228
+            If 單據編號_tb.Text = 採購清單_dgv.Rows(i).Cells("單據編號").Value.ToString Then
229
+                採購清單_dgv.Rows(i).Cells("應付立帳").Value = False
232 230
             End If
233 231
         Next i
234 232
     End Sub
235
-    Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles TextBox6.TextChanged
236
-        CheckBox2.Checked = True
237
-        Set_賬款清單() : For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
233
+    Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles 財務收支單號_tb.TextChanged
234
+        列印多選_ch.Checked = True
235
+        Set_賬款清單() : For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1 : 採購清單_dgv.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
238 236
     End Sub
239
-    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
237
+    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles 列印應付帳款清單_bu.Click
240 238
         xlApp = CType(CreateObject("Excel.Application"), Application)
241 239
         xlBook = xlApp.Workbooks.Add
242 240
         xlApp.DisplayAlerts = True
243 241
         xlApp.Visible = True
244 242
         xlApp.Application.WindowState = xlMaximized
245 243
         N1 = 0
246
-        If DataGridView2.Rows.Count = 0 Then : Else
244
+        If 採購清單_dgv.Rows.Count = 0 Then : Else
247 245
             xlSheet = NewMethod(xlBook)
248
-            xlSheet.Cells(1, 1) = MAOJI_ERP_SYS.ComboBox2.Text : xlSheet.Cells(2, 1) = DateTimePicker1.Value & " 到 " & DateTimePicker2.Value & " 應付帳款清單"
246
+            xlSheet.Cells(1, 1) = MAOJI_ERP_SYS.ComboBox2.Text : xlSheet.Cells(2, 1) = 開始日期_dtp.Value & " 到 " & 結束日期_dtp.Value & " 應付帳款清單"
249 247
             xlSheet.Cells(3, 1) = "單據編號" : xlSheet.Cells(3, 2) = "供應商" : xlSheet.Cells(3, 3) = "頁碼" : xlSheet.Cells(3, 4) = "品名" : xlSheet.Cells(3, 5) = "單價" : xlSheet.Cells(3, 6) = "匯率"
250 248
             xlSheet.Cells(3, 7) = "入庫" : xlSheet.Cells(3, 8) = "金額" : xlSheet.Cells(3, 9) = "採購下單" : xlSheet.Cells(3, 10) = "入庫日期" : xlSheet.Cells(3, 11) = "是否立帳"
251 249
             xlSheet.Cells(2, 7) = "合計" : xlSheet.Cells(2, 8) = "=SUBTOTAL(9,H4:H9999)"
252
-            For i As Integer = 0 To DataGridView2.Rows.Count - 1
253
-                If DataGridView2.Rows(i).Cells("選擇").Value = True Then
254
-                    xlSheet.Cells(N1 + 4, 1) = DataGridView2.Rows(i).Cells("單據編號").Value : xlSheet.Cells(N1 + 4, 2) = DataGridView2.Rows(i).Cells("供應商").Value
255
-                    xlSheet.Cells(N1 + 4, 3) = DataGridView2.Rows(i).Cells("頁碼").Value : xlSheet.Cells(N1 + 4, 4) = DataGridView2.Rows(i).Cells("品名").Value
256
-                    xlSheet.Cells(N1 + 4, 5) = DataGridView2.Rows(i).Cells("單價").Value : xlSheet.Cells(N1 + 4, 6) = DataGridView2.Rows(i).Cells("匯率").Value
257
-                    xlSheet.Cells(N1 + 4, 7) = DataGridView2.Rows(i).Cells("入庫").Value : xlSheet.Cells(N1 + 4, 8) = DataGridView2.Rows(i).Cells("金額").Value
258
-                    xlSheet.Cells(N1 + 4, 9) = DataGridView2.Rows(i).Cells("採購下單").Value : xlSheet.Cells(N1 + 4, 10) = DataGridView2.Rows(i).Cells("入庫日期").Value
259
-                    If DataGridView2.Rows(i).Cells("應付立帳").Value = True Then : PA1 = "YES" : Else : PA1 = "NO" : End If
250
+            For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
251
+                If 採購清單_dgv.Rows(i).Cells("選擇").Value = True Then
252
+                    xlSheet.Cells(N1 + 4, 1) = 採購清單_dgv.Rows(i).Cells("單據編號").Value : xlSheet.Cells(N1 + 4, 2) = 採購清單_dgv.Rows(i).Cells("供應商").Value
253
+                    xlSheet.Cells(N1 + 4, 3) = 採購清單_dgv.Rows(i).Cells("頁碼").Value : xlSheet.Cells(N1 + 4, 4) = 採購清單_dgv.Rows(i).Cells("品名").Value
254
+                    xlSheet.Cells(N1 + 4, 5) = 採購清單_dgv.Rows(i).Cells("單價").Value : xlSheet.Cells(N1 + 4, 6) = 採購清單_dgv.Rows(i).Cells("匯率").Value
255
+                    xlSheet.Cells(N1 + 4, 7) = 採購清單_dgv.Rows(i).Cells("入庫").Value : xlSheet.Cells(N1 + 4, 8) = 採購清單_dgv.Rows(i).Cells("金額").Value
256
+                    xlSheet.Cells(N1 + 4, 9) = 採購清單_dgv.Rows(i).Cells("採購下單").Value : xlSheet.Cells(N1 + 4, 10) = 採購清單_dgv.Rows(i).Cells("入庫日期").Value
257
+                    If 採購清單_dgv.Rows(i).Cells("應付立帳").Value = True Then : PA1 = "YES" : Else : PA1 = "NO" : End If
260 258
                     xlSheet.Cells(N1 + 4, 11) = PA1
261 259
                     N1 += 1
262 260
                 End If

+ 337
- 372
MaoOrange-Hongji/財務系統管理/應收帳款控制表.Designer.vb Parādīt failu

@@ -22,374 +22,219 @@ Partial Class 應收帳款控制表
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()> _
24 24
     Private Sub InitializeComponent()
25
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25 27
         Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26 28
         Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
28
-        Me.Button1 = New System.Windows.Forms.Button()
29
-        Me.一般月 = New System.Windows.Forms.CheckBox()
30
-        Me.會計月 = New System.Windows.Forms.CheckBox()
31
-        Me.Button2 = New System.Windows.Forms.Button()
32
-        Me.Label4 = New System.Windows.Forms.Label()
33
-        Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
34
-        Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
29
+        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Me.Label6 = New System.Windows.Forms.Label()
32
+        Me.DateTimePicker3 = New System.Windows.Forms.DateTimePicker()
33
+        Me.TextBox6 = New System.Windows.Forms.TextBox()
34
+        Me.Button4 = New System.Windows.Forms.Button()
35
+        Me.Button3 = New System.Windows.Forms.Button()
35 36
         Me.TextBox5 = New System.Windows.Forms.TextBox()
36
-        Me.TextBox4 = New System.Windows.Forms.TextBox()
37
-        Me.Label8 = New System.Windows.Forms.Label()
38
-        Me.TextBox1 = New System.Windows.Forms.TextBox()
39 37
         Me.Label7 = New System.Windows.Forms.Label()
40 38
         Me.NumericUpDown2 = New System.Windows.Forms.NumericUpDown()
41 39
         Me.Label2 = New System.Windows.Forms.Label()
42 40
         Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown()
41
+        Me.Label5 = New System.Windows.Forms.Label()
42
+        Me.TextBox4 = New System.Windows.Forms.TextBox()
43 43
         Me.Label1 = New System.Windows.Forms.Label()
44
-        Me.Button6 = New System.Windows.Forms.Button()
45 44
         Me.TextBox2 = New System.Windows.Forms.TextBox()
46
-        Me.CheckBox1 = New System.Windows.Forms.CheckBox()
47
-        Me.DateTimePicker3 = New System.Windows.Forms.DateTimePicker()
45
+        Me.Button6 = New System.Windows.Forms.Button()
48 46
         Me.Button5 = New System.Windows.Forms.Button()
49
-        Me.Button4 = New System.Windows.Forms.Button()
50
-        Me.ComboBox7 = New System.Windows.Forms.ComboBox()
51
-        Me.TextBox9 = New System.Windows.Forms.TextBox()
52
-        Me.ComboBox4 = New System.Windows.Forms.ComboBox()
53
-        Me.ComboBox3 = New System.Windows.Forms.ComboBox()
54
-        Me.ComboBox1 = New System.Windows.Forms.ComboBox()
55
-        Me.ComboBox5 = New System.Windows.Forms.ComboBox()
56
-        Me.ComboBox6 = New System.Windows.Forms.ComboBox()
57
-        Me.Label5 = New System.Windows.Forms.Label()
58 47
         Me.Button12 = New System.Windows.Forms.Button()
59 48
         Me.Button13 = New System.Windows.Forms.Button()
60
-        Me.TextBox3 = New System.Windows.Forms.TextBox()
61
-        Me.Label3 = New System.Windows.Forms.Label()
62
-        Me.Label6 = New System.Windows.Forms.Label()
63 49
         Me.CheckBox2 = New System.Windows.Forms.CheckBox()
64 50
         Me.CheckBox3 = New System.Windows.Forms.CheckBox()
65
-        Me.ComboBox2 = New System.Windows.Forms.ComboBox()
51
+        Me.TextBox1 = New System.Windows.Forms.TextBox()
52
+        Me.TextBox3 = New System.Windows.Forms.TextBox()
53
+        Me.Label3 = New System.Windows.Forms.Label()
54
+        Me.DataGridView3 = New System.Windows.Forms.DataGridView()
55
+        Me.DataGridView2 = New System.Windows.Forms.DataGridView()
66 56
         Me.DateTimePicker4 = New System.Windows.Forms.DateTimePicker()
67
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
57
+        Me.Button1 = New System.Windows.Forms.Button()
58
+        Me.一般月 = New System.Windows.Forms.CheckBox()
59
+        Me.會計月 = New System.Windows.Forms.CheckBox()
60
+        Me.Button2 = New System.Windows.Forms.Button()
61
+        Me.Label4 = New System.Windows.Forms.Label()
62
+        Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
63
+        Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
64
+        Me.DataGridView1 = New System.Windows.Forms.DataGridView()
65
+        Me.CheckBox1 = New System.Windows.Forms.CheckBox()
68 66
         CType(Me.NumericUpDown2, System.ComponentModel.ISupportInitialize).BeginInit()
69 67
         CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit()
68
+        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).BeginInit()
69
+        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).BeginInit()
70
+        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
70 71
         Me.SuspendLayout()
71 72
         '
72
-        'DataGridView1
73
-        '
74
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
75
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
76
-        Me.DataGridView1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
77
-            Or System.Windows.Forms.AnchorStyles.Left) _
78
-            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
79
-        Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
80
-        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
81
-        Me.DataGridView1.Location = New System.Drawing.Point(7, 82)
82
-        Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
83
-        Me.DataGridView1.Name = "DataGridView1"
84
-        Me.DataGridView1.RowHeadersWidth = 5
85
-        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
86
-        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle4
87
-        Me.DataGridView1.RowTemplate.Height = 24
88
-        Me.DataGridView1.Size = New System.Drawing.Size(1234, 517)
89
-        Me.DataGridView1.TabIndex = 1116
90
-        '
91
-        'Button1
92
-        '
93
-        Me.Button1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
94
-        Me.Button1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
95
-        Me.Button1.Location = New System.Drawing.Point(7, 54)
96
-        Me.Button1.Name = "Button1"
97
-        Me.Button1.Size = New System.Drawing.Size(87, 23)
98
-        Me.Button1.TabIndex = 1120
99
-        Me.Button1.Text = "上個月"
100
-        Me.Button1.UseVisualStyleBackColor = True
101
-        '
102
-        '一般月
103
-        '
104
-        Me.一般月.AutoSize = True
105
-        Me.一般月.Location = New System.Drawing.Point(138, 31)
106
-        Me.一般月.Name = "一般月"
107
-        Me.一般月.Size = New System.Drawing.Size(63, 20)
108
-        Me.一般月.TabIndex = 1123
109
-        Me.一般月.Text = "一般月"
110
-        Me.一般月.UseVisualStyleBackColor = True
111
-        '
112
-        '會計月
73
+        'Label6
113 74
         '
114
-        Me.會計月.AutoSize = True
115
-        Me.會計月.Checked = True
116
-        Me.會計月.CheckState = System.Windows.Forms.CheckState.Checked
117
-        Me.會計月.Location = New System.Drawing.Point(11, 31)
118
-        Me.會計月.Name = "會計月"
119
-        Me.會計月.Size = New System.Drawing.Size(63, 20)
120
-        Me.會計月.TabIndex = 1122
121
-        Me.會計月.Text = "會計月"
122
-        Me.會計月.UseVisualStyleBackColor = True
75
+        Me.Label6.AutoSize = True
76
+        Me.Label6.ForeColor = System.Drawing.Color.Green
77
+        Me.Label6.Location = New System.Drawing.Point(721, 7)
78
+        Me.Label6.Name = "Label6"
79
+        Me.Label6.Size = New System.Drawing.Size(56, 16)
80
+        Me.Label6.TabIndex = 1235
81
+        Me.Label6.Text = "開立日期"
123 82
         '
124
-        'Button2
83
+        'DateTimePicker3
125 84
         '
126
-        Me.Button2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
127
-        Me.Button2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
128
-        Me.Button2.Location = New System.Drawing.Point(117, 55)
129
-        Me.Button2.Name = "Button2"
130
-        Me.Button2.Size = New System.Drawing.Size(87, 23)
131
-        Me.Button2.TabIndex = 1121
132
-        Me.Button2.Text = "下個月"
133
-        Me.Button2.UseVisualStyleBackColor = True
85
+        Me.DateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
86
+        Me.DateTimePicker3.Location = New System.Drawing.Point(723, 28)
87
+        Me.DateTimePicker3.Name = "DateTimePicker3"
88
+        Me.DateTimePicker3.Size = New System.Drawing.Size(90, 23)
89
+        Me.DateTimePicker3.TabIndex = 1234
134 90
         '
135
-        'Label4
91
+        'TextBox6
136 92
         '
137
-        Me.Label4.AutoSize = True
138
-        Me.Label4.Location = New System.Drawing.Point(96, 8)
139
-        Me.Label4.Name = "Label4"
140
-        Me.Label4.Size = New System.Drawing.Size(20, 16)
141
-        Me.Label4.TabIndex = 1119
142
-        Me.Label4.Text = "到"
93
+        Me.TextBox6.ForeColor = System.Drawing.Color.Green
94
+        Me.TextBox6.Location = New System.Drawing.Point(815, 29)
95
+        Me.TextBox6.Name = "TextBox6"
96
+        Me.TextBox6.Size = New System.Drawing.Size(110, 23)
97
+        Me.TextBox6.TabIndex = 1233
143 98
         '
144
-        'DateTimePicker2
99
+        'Button4
145 100
         '
146
-        Me.DateTimePicker2.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
147
-        Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
148
-        Me.DateTimePicker2.Location = New System.Drawing.Point(117, 4)
149
-        Me.DateTimePicker2.Name = "DateTimePicker2"
150
-        Me.DateTimePicker2.Size = New System.Drawing.Size(87, 23)
151
-        Me.DateTimePicker2.TabIndex = 1118
101
+        Me.Button4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
102
+        Me.Button4.ForeColor = System.Drawing.Color.Green
103
+        Me.Button4.Location = New System.Drawing.Point(813, 5)
104
+        Me.Button4.Name = "Button4"
105
+        Me.Button4.Size = New System.Drawing.Size(112, 22)
106
+        Me.Button4.TabIndex = 1232
107
+        Me.Button4.Text = "財務單據開立"
108
+        Me.Button4.UseVisualStyleBackColor = True
152 109
         '
153
-        'DateTimePicker1
110
+        'Button3
154 111
         '
155
-        Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
156
-        Me.DateTimePicker1.Location = New System.Drawing.Point(7, 4)
157
-        Me.DateTimePicker1.Name = "DateTimePicker1"
158
-        Me.DateTimePicker1.Size = New System.Drawing.Size(87, 23)
159
-        Me.DateTimePicker1.TabIndex = 1117
112
+        Me.Button3.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
113
+        Me.Button3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
114
+        Me.Button3.Location = New System.Drawing.Point(595, 4)
115
+        Me.Button3.Name = "Button3"
116
+        Me.Button3.Size = New System.Drawing.Size(125, 23)
117
+        Me.Button3.TabIndex = 1231
118
+        Me.Button3.Text = "間格時間內所有帳款"
119
+        Me.Button3.UseVisualStyleBackColor = True
160 120
         '
161 121
         'TextBox5
162 122
         '
163 123
         Me.TextBox5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
164
-        Me.TextBox5.Location = New System.Drawing.Point(657, 365)
124
+        Me.TextBox5.Location = New System.Drawing.Point(30, 108)
165 125
         Me.TextBox5.Name = "TextBox5"
166
-        Me.TextBox5.Size = New System.Drawing.Size(190, 23)
167
-        Me.TextBox5.TabIndex = 1195
168
-        '
169
-        'TextBox4
170
-        '
171
-        Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
172
-        Me.TextBox4.Location = New System.Drawing.Point(657, 336)
173
-        Me.TextBox4.Name = "TextBox4"
174
-        Me.TextBox4.Size = New System.Drawing.Size(190, 23)
175
-        Me.TextBox4.TabIndex = 1193
176
-        '
177
-        'Label8
178
-        '
179
-        Me.Label8.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
180
-        Me.Label8.AutoSize = True
181
-        Me.Label8.ForeColor = System.Drawing.Color.Red
182
-        Me.Label8.Location = New System.Drawing.Point(852, 48)
183
-        Me.Label8.Name = "Label8"
184
-        Me.Label8.Size = New System.Drawing.Size(385, 32)
185
-        Me.Label8.TabIndex = 1191
186
-        Me.Label8.Text = "選擇銷售單號執行開立傳票時實收金額會自動以會計科目-應收帳款立帳" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "未收餘額如果不為零則需要手動選擇會計科目。推薦使用-應收賬款折讓" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10)
187
-        '
188
-        'TextBox1
189
-        '
190
-        Me.TextBox1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
191
-        Me.TextBox1.Location = New System.Drawing.Point(657, 307)
192
-        Me.TextBox1.Name = "TextBox1"
193
-        Me.TextBox1.Size = New System.Drawing.Size(190, 23)
194
-        Me.TextBox1.TabIndex = 1190
126
+        Me.TextBox5.Size = New System.Drawing.Size(43, 23)
127
+        Me.TextBox5.TabIndex = 1230
195 128
         '
196 129
         'Label7
197 130
         '
198 131
         Me.Label7.AutoSize = True
199 132
         Me.Label7.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
200
-        Me.Label7.Location = New System.Drawing.Point(390, 57)
133
+        Me.Label7.Location = New System.Drawing.Point(592, 31)
201 134
         Me.Label7.Name = "Label7"
202 135
         Me.Label7.Size = New System.Drawing.Size(56, 16)
203
-        Me.Label7.TabIndex = 1189
204
-        Me.Label7.Text = "未餘額"
136
+        Me.Label7.TabIndex = 1229
137
+        Me.Label7.Text = "未付餘額"
205 138
         '
206 139
         'NumericUpDown2
207 140
         '
208
-        Me.NumericUpDown2.Location = New System.Drawing.Point(446, 55)
209
-        Me.NumericUpDown2.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
210
-        Me.NumericUpDown2.Minimum = New Decimal(New Integer() {1000000, 0, 0, -2147483648})
141
+        Me.NumericUpDown2.Location = New System.Drawing.Point(648, 29)
142
+        Me.NumericUpDown2.Maximum = New Decimal(New Integer() {100000000, 0, 0, 0})
143
+        Me.NumericUpDown2.Minimum = New Decimal(New Integer() {100000000, 0, 0, -2147483648})
211 144
         Me.NumericUpDown2.Name = "NumericUpDown2"
212
-        Me.NumericUpDown2.Size = New System.Drawing.Size(100, 23)
213
-        Me.NumericUpDown2.TabIndex = 1188
145
+        Me.NumericUpDown2.Size = New System.Drawing.Size(72, 23)
146
+        Me.NumericUpDown2.TabIndex = 1228
214 147
         Me.NumericUpDown2.ThousandsSeparator = True
215 148
         '
216 149
         'Label2
217 150
         '
218 151
         Me.Label2.AutoSize = True
219 152
         Me.Label2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
220
-        Me.Label2.Location = New System.Drawing.Point(390, 31)
153
+        Me.Label2.Location = New System.Drawing.Point(463, 31)
221 154
         Me.Label2.Name = "Label2"
222 155
         Me.Label2.Size = New System.Drawing.Size(56, 16)
223
-        Me.Label2.TabIndex = 1187
224
-        Me.Label2.Text = "實金額"
156
+        Me.Label2.TabIndex = 1227
157
+        Me.Label2.Text = "實金額"
225 158
         '
226 159
         'NumericUpDown1
227 160
         '
228
-        Me.NumericUpDown1.Location = New System.Drawing.Point(446, 29)
229
-        Me.NumericUpDown1.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
230
-        Me.NumericUpDown1.Minimum = New Decimal(New Integer() {1000000, 0, 0, -2147483648})
161
+        Me.NumericUpDown1.Location = New System.Drawing.Point(519, 29)
162
+        Me.NumericUpDown1.Maximum = New Decimal(New Integer() {100000000, 0, 0, 0})
163
+        Me.NumericUpDown1.Minimum = New Decimal(New Integer() {100000000, 0, 0, -2147483648})
231 164
         Me.NumericUpDown1.Name = "NumericUpDown1"
232
-        Me.NumericUpDown1.Size = New System.Drawing.Size(100, 23)
233
-        Me.NumericUpDown1.TabIndex = 1186
165
+        Me.NumericUpDown1.Size = New System.Drawing.Size(72, 23)
166
+        Me.NumericUpDown1.TabIndex = 1226
234 167
         Me.NumericUpDown1.ThousandsSeparator = True
235 168
         '
169
+        'Label5
170
+        '
171
+        Me.Label5.AutoSize = True
172
+        Me.Label5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
173
+        Me.Label5.Location = New System.Drawing.Point(463, 7)
174
+        Me.Label5.Name = "Label5"
175
+        Me.Label5.Size = New System.Drawing.Size(56, 16)
176
+        Me.Label5.TabIndex = 1225
177
+        Me.Label5.Text = "應付金額"
178
+        '
179
+        'TextBox4
180
+        '
181
+        Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
182
+        Me.TextBox4.Location = New System.Drawing.Point(519, 4)
183
+        Me.TextBox4.Name = "TextBox4"
184
+        Me.TextBox4.Size = New System.Drawing.Size(72, 23)
185
+        Me.TextBox4.TabIndex = 1224
186
+        '
236 187
         'Label1
237 188
         '
238 189
         Me.Label1.AutoSize = True
239 190
         Me.Label1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
240
-        Me.Label1.Location = New System.Drawing.Point(390, 7)
191
+        Me.Label1.Location = New System.Drawing.Point(272, 32)
241 192
         Me.Label1.Name = "Label1"
242 193
         Me.Label1.Size = New System.Drawing.Size(56, 16)
243
-        Me.Label1.TabIndex = 1185
244
-        Me.Label1.Text = "應收金額"
194
+        Me.Label1.TabIndex = 1223
195
+        Me.Label1.Text = "單據編號"
196
+        '
197
+        'TextBox2
198
+        '
199
+        Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
200
+        Me.TextBox2.Location = New System.Drawing.Point(329, 29)
201
+        Me.TextBox2.Name = "TextBox2"
202
+        Me.TextBox2.Size = New System.Drawing.Size(133, 23)
203
+        Me.TextBox2.TabIndex = 1222
245 204
         '
246 205
         'Button6
247 206
         '
248 207
         Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
249 208
         Me.Button6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
250 209
         Me.Button6.ForeColor = System.Drawing.Color.Olive
251
-        Me.Button6.Location = New System.Drawing.Point(1087, 2)
210
+        Me.Button6.Location = New System.Drawing.Point(1086, 4)
252 211
         Me.Button6.Name = "Button6"
253 212
         Me.Button6.Size = New System.Drawing.Size(82, 47)
254
-        Me.Button6.TabIndex = 1184
213
+        Me.Button6.TabIndex = 1219
255 214
         Me.Button6.Text = "依據單號取消立帳選擇"
256 215
         Me.Button6.UseVisualStyleBackColor = True
257 216
         '
258
-        'TextBox2
259
-        '
260
-        Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
261
-        Me.TextBox2.Location = New System.Drawing.Point(446, 4)
262
-        Me.TextBox2.Name = "TextBox2"
263
-        Me.TextBox2.Size = New System.Drawing.Size(100, 23)
264
-        Me.TextBox2.TabIndex = 1183
265
-        '
266
-        'CheckBox1
267
-        '
268
-        Me.CheckBox1.AutoSize = True
269
-        Me.CheckBox1.Checked = True
270
-        Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
271
-        Me.CheckBox1.Location = New System.Drawing.Point(351, 29)
272
-        Me.CheckBox1.Name = "CheckBox1"
273
-        Me.CheckBox1.Size = New System.Drawing.Size(39, 20)
274
-        Me.CheckBox1.TabIndex = 1182
275
-        Me.CheckBox1.Text = "補"
276
-        Me.CheckBox1.UseVisualStyleBackColor = True
277
-        '
278
-        'DateTimePicker3
279
-        '
280
-        Me.DateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
281
-        Me.DateTimePicker3.Location = New System.Drawing.Point(262, 28)
282
-        Me.DateTimePicker3.Name = "DateTimePicker3"
283
-        Me.DateTimePicker3.Size = New System.Drawing.Size(85, 23)
284
-        Me.DateTimePicker3.TabIndex = 1180
285
-        '
286 217
         'Button5
287 218
         '
288 219
         Me.Button5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
289 220
         Me.Button5.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
290 221
         Me.Button5.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
291
-        Me.Button5.Location = New System.Drawing.Point(1004, 2)
222
+        Me.Button5.Location = New System.Drawing.Point(1033, 4)
292 223
         Me.Button5.Name = "Button5"
293
-        Me.Button5.Size = New System.Drawing.Size(82, 47)
294
-        Me.Button5.TabIndex = 1179
224
+        Me.Button5.Size = New System.Drawing.Size(54, 47)
225
+        Me.Button5.TabIndex = 1218
295 226
         Me.Button5.Text = "列印帳款清單"
296 227
         Me.Button5.UseVisualStyleBackColor = True
297 228
         '
298
-        'Button4
299
-        '
300
-        Me.Button4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
301
-        Me.Button4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
302
-        Me.Button4.Location = New System.Drawing.Point(282, 55)
303
-        Me.Button4.Name = "Button4"
304
-        Me.Button4.Size = New System.Drawing.Size(109, 23)
305
-        Me.Button4.TabIndex = 1178
306
-        Me.Button4.Text = "開立收支單(傳票)"
307
-        Me.Button4.UseVisualStyleBackColor = True
308
-        '
309
-        'ComboBox7
310
-        '
311
-        Me.ComboBox7.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
312
-        Me.ComboBox7.FormattingEnabled = True
313
-        Me.ComboBox7.Location = New System.Drawing.Point(657, 55)
314
-        Me.ComboBox7.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
315
-        Me.ComboBox7.Name = "ComboBox7"
316
-        Me.ComboBox7.Size = New System.Drawing.Size(190, 24)
317
-        Me.ComboBox7.TabIndex = 1177
318
-        '
319
-        'TextBox9
320
-        '
321
-        Me.TextBox9.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
322
-        Me.TextBox9.Location = New System.Drawing.Point(549, 55)
323
-        Me.TextBox9.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
324
-        Me.TextBox9.Name = "TextBox9"
325
-        Me.TextBox9.Size = New System.Drawing.Size(105, 23)
326
-        Me.TextBox9.TabIndex = 1176
327
-        Me.TextBox9.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
328
-        '
329
-        'ComboBox4
330
-        '
331
-        Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
332
-        Me.ComboBox4.FormattingEnabled = True
333
-        Me.ComboBox4.Location = New System.Drawing.Point(769, 29)
334
-        Me.ComboBox4.Name = "ComboBox4"
335
-        Me.ComboBox4.Size = New System.Drawing.Size(78, 24)
336
-        Me.ComboBox4.TabIndex = 1175
337
-        '
338
-        'ComboBox3
339
-        '
340
-        Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
341
-        Me.ComboBox3.FormattingEnabled = True
342
-        Me.ComboBox3.Location = New System.Drawing.Point(657, 29)
343
-        Me.ComboBox3.Name = "ComboBox3"
344
-        Me.ComboBox3.Size = New System.Drawing.Size(109, 24)
345
-        Me.ComboBox3.TabIndex = 1174
346
-        '
347
-        'ComboBox1
348
-        '
349
-        Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
350
-        Me.ComboBox1.FormattingEnabled = True
351
-        Me.ComboBox1.Location = New System.Drawing.Point(769, 3)
352
-        Me.ComboBox1.Name = "ComboBox1"
353
-        Me.ComboBox1.Size = New System.Drawing.Size(78, 24)
354
-        Me.ComboBox1.TabIndex = 1173
355
-        '
356
-        'ComboBox5
357
-        '
358
-        Me.ComboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
359
-        Me.ComboBox5.FormattingEnabled = True
360
-        Me.ComboBox5.Location = New System.Drawing.Point(657, 3)
361
-        Me.ComboBox5.Name = "ComboBox5"
362
-        Me.ComboBox5.Size = New System.Drawing.Size(109, 24)
363
-        Me.ComboBox5.TabIndex = 1172
364
-        '
365
-        'ComboBox6
366
-        '
367
-        Me.ComboBox6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
368
-        Me.ComboBox6.FormattingEnabled = True
369
-        Me.ComboBox6.Location = New System.Drawing.Point(657, 276)
370
-        Me.ComboBox6.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
371
-        Me.ComboBox6.Name = "ComboBox6"
372
-        Me.ComboBox6.Size = New System.Drawing.Size(190, 24)
373
-        Me.ComboBox6.TabIndex = 1170
374
-        '
375
-        'Label5
376
-        '
377
-        Me.Label5.AutoSize = True
378
-        Me.Label5.Location = New System.Drawing.Point(550, 7)
379
-        Me.Label5.Name = "Label5"
380
-        Me.Label5.Size = New System.Drawing.Size(104, 48)
381
-        Me.Label5.TabIndex = 1171
382
-        Me.Label5.Text = "未收餘額不為零時" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "需要選擇未收餘額" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "立帳的會計科目"
383
-        '
384 229
         'Button12
385 230
         '
386 231
         Me.Button12.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
387 232
         Me.Button12.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
388 233
         Me.Button12.ForeColor = System.Drawing.Color.Olive
389
-        Me.Button12.Location = New System.Drawing.Point(1170, 26)
234
+        Me.Button12.Location = New System.Drawing.Point(1167, 28)
390 235
         Me.Button12.Name = "Button12"
391 236
         Me.Button12.Size = New System.Drawing.Size(74, 23)
392
-        Me.Button12.TabIndex = 1169
237
+        Me.Button12.TabIndex = 1217
393 238
         Me.Button12.Text = "全部取消"
394 239
         Me.Button12.UseVisualStyleBackColor = True
395 240
         '
@@ -398,49 +243,21 @@ Partial Class 應收帳款控制表
398 243
         Me.Button13.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
399 244
         Me.Button13.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
400 245
         Me.Button13.ForeColor = System.Drawing.Color.Olive
401
-        Me.Button13.Location = New System.Drawing.Point(1170, 2)
246
+        Me.Button13.Location = New System.Drawing.Point(1167, 4)
402 247
         Me.Button13.Name = "Button13"
403 248
         Me.Button13.Size = New System.Drawing.Size(74, 23)
404
-        Me.Button13.TabIndex = 1168
249
+        Me.Button13.TabIndex = 1216
405 250
         Me.Button13.Text = "全部選擇"
406 251
         Me.Button13.UseVisualStyleBackColor = True
407 252
         '
408
-        'TextBox3
409
-        '
410
-        Me.TextBox3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
411
-        Me.TextBox3.Location = New System.Drawing.Point(262, 4)
412
-        Me.TextBox3.Name = "TextBox3"
413
-        Me.TextBox3.Size = New System.Drawing.Size(126, 23)
414
-        Me.TextBox3.TabIndex = 1166
415
-        '
416
-        'Label3
417
-        '
418
-        Me.Label3.AutoSize = True
419
-        Me.Label3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
420
-        Me.Label3.Location = New System.Drawing.Point(206, 7)
421
-        Me.Label3.Name = "Label3"
422
-        Me.Label3.Size = New System.Drawing.Size(56, 16)
423
-        Me.Label3.TabIndex = 1167
424
-        Me.Label3.Text = "單據號碼"
425
-        '
426
-        'Label6
427
-        '
428
-        Me.Label6.AutoSize = True
429
-        Me.Label6.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
430
-        Me.Label6.Location = New System.Drawing.Point(207, 31)
431
-        Me.Label6.Name = "Label6"
432
-        Me.Label6.Size = New System.Drawing.Size(56, 16)
433
-        Me.Label6.TabIndex = 1181
434
-        Me.Label6.Text = "立帳日期"
435
-        '
436 253
         'CheckBox2
437 254
         '
438 255
         Me.CheckBox2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
439 256
         Me.CheckBox2.AutoSize = True
440
-        Me.CheckBox2.Location = New System.Drawing.Point(887, 5)
257
+        Me.CheckBox2.Location = New System.Drawing.Point(927, 5)
441 258
         Me.CheckBox2.Name = "CheckBox2"
442 259
         Me.CheckBox2.Size = New System.Drawing.Size(99, 20)
443
-        Me.CheckBox2.TabIndex = 1192
260
+        Me.CheckBox2.TabIndex = 1220
444 261
         Me.CheckBox2.Text = "列印多單選擇"
445 262
         Me.CheckBox2.UseVisualStyleBackColor = True
446 263
         '
@@ -448,69 +265,217 @@ Partial Class 應收帳款控制表
448 265
         '
449 266
         Me.CheckBox3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
450 267
         Me.CheckBox3.AutoSize = True
451
-        Me.CheckBox3.Location = New System.Drawing.Point(887, 25)
268
+        Me.CheckBox3.Location = New System.Drawing.Point(927, 30)
452 269
         Me.CheckBox3.Name = "CheckBox3"
453 270
         Me.CheckBox3.Size = New System.Drawing.Size(111, 20)
454
-        Me.CheckBox3.TabIndex = 1194
271
+        Me.CheckBox3.TabIndex = 1221
455 272
         Me.CheckBox3.Text = "已立帳資料隱藏"
456 273
         Me.CheckBox3.UseVisualStyleBackColor = True
457 274
         '
458
-        'ComboBox2
275
+        'TextBox1
459 276
         '
460
-        Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
461
-        Me.ComboBox2.FormattingEnabled = True
462
-        Me.ComboBox2.Items.AddRange(New Object() {"", "收現", "收票", "託收"})
463
-        Me.ComboBox2.Location = New System.Drawing.Point(210, 54)
464
-        Me.ComboBox2.Name = "ComboBox2"
465
-        Me.ComboBox2.Size = New System.Drawing.Size(66, 24)
466
-        Me.ComboBox2.TabIndex = 1196
277
+        Me.TextBox1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
278
+        Me.TextBox1.Location = New System.Drawing.Point(30, 79)
279
+        Me.TextBox1.Name = "TextBox1"
280
+        Me.TextBox1.Size = New System.Drawing.Size(43, 23)
281
+        Me.TextBox1.TabIndex = 1215
282
+        '
283
+        'TextBox3
284
+        '
285
+        Me.TextBox3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
286
+        Me.TextBox3.Location = New System.Drawing.Point(147, 29)
287
+        Me.TextBox3.Name = "TextBox3"
288
+        Me.TextBox3.Size = New System.Drawing.Size(123, 23)
289
+        Me.TextBox3.TabIndex = 1213
290
+        '
291
+        'Label3
292
+        '
293
+        Me.Label3.AutoSize = True
294
+        Me.Label3.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
295
+        Me.Label3.Location = New System.Drawing.Point(113, 32)
296
+        Me.Label3.Name = "Label3"
297
+        Me.Label3.Size = New System.Drawing.Size(32, 16)
298
+        Me.Label3.TabIndex = 1214
299
+        Me.Label3.Text = "客戶"
300
+        '
301
+        'DataGridView3
302
+        '
303
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
304
+        Me.DataGridView3.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
305
+        Me.DataGridView3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
306
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
307
+        Me.DataGridView3.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
308
+        Me.DataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
309
+        Me.DataGridView3.Location = New System.Drawing.Point(8, 323)
310
+        Me.DataGridView3.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
311
+        Me.DataGridView3.Name = "DataGridView3"
312
+        Me.DataGridView3.RowHeadersWidth = 5
313
+        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
314
+        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
315
+        Me.DataGridView3.RowsDefaultCellStyle = DataGridViewCellStyle2
316
+        Me.DataGridView3.RowTemplate.Height = 24
317
+        Me.DataGridView3.Size = New System.Drawing.Size(1233, 283)
318
+        Me.DataGridView3.TabIndex = 1212
319
+        '
320
+        'DataGridView2
321
+        '
322
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
323
+        Me.DataGridView2.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
324
+        Me.DataGridView2.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
325
+            Or System.Windows.Forms.AnchorStyles.Left) _
326
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
327
+        Me.DataGridView2.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
328
+        Me.DataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
329
+        Me.DataGridView2.Location = New System.Drawing.Point(111, 55)
330
+        Me.DataGridView2.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
331
+        Me.DataGridView2.Name = "DataGridView2"
332
+        Me.DataGridView2.RowHeadersWidth = 5
333
+        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
334
+        Me.DataGridView2.RowsDefaultCellStyle = DataGridViewCellStyle4
335
+        Me.DataGridView2.RowTemplate.Height = 24
336
+        Me.DataGridView2.Size = New System.Drawing.Size(1130, 266)
337
+        Me.DataGridView2.TabIndex = 1211
467 338
         '
468 339
         'DateTimePicker4
469 340
         '
470 341
         Me.DateTimePicker4.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
471 342
         Me.DateTimePicker4.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
472
-        Me.DateTimePicker4.Location = New System.Drawing.Point(80, 29)
343
+        Me.DateTimePicker4.Location = New System.Drawing.Point(30, 50)
473 344
         Me.DateTimePicker4.Name = "DateTimePicker4"
474 345
         Me.DateTimePicker4.Size = New System.Drawing.Size(43, 23)
475
-        Me.DateTimePicker4.TabIndex = 1197
346
+        Me.DateTimePicker4.TabIndex = 1210
476 347
         '
477
-        '應收帳款控制表
348
+        'Button1
349
+        '
350
+        Me.Button1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
351
+        Me.Button1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
352
+        Me.Button1.Location = New System.Drawing.Point(330, 4)
353
+        Me.Button1.Name = "Button1"
354
+        Me.Button1.Size = New System.Drawing.Size(65, 23)
355
+        Me.Button1.TabIndex = 1206
356
+        Me.Button1.Text = "上個月"
357
+        Me.Button1.UseVisualStyleBackColor = True
358
+        '
359
+        '一般月
360
+        '
361
+        Me.一般月.AutoSize = True
362
+        Me.一般月.Location = New System.Drawing.Point(272, 7)
363
+        Me.一般月.Name = "一般月"
364
+        Me.一般月.Size = New System.Drawing.Size(63, 20)
365
+        Me.一般月.TabIndex = 1209
366
+        Me.一般月.Text = "一般月"
367
+        Me.一般月.UseVisualStyleBackColor = True
368
+        '
369
+        '會計月
370
+        '
371
+        Me.會計月.AutoSize = True
372
+        Me.會計月.Checked = True
373
+        Me.會計月.CheckState = System.Windows.Forms.CheckState.Checked
374
+        Me.會計月.Location = New System.Drawing.Point(207, 7)
375
+        Me.會計月.Name = "會計月"
376
+        Me.會計月.Size = New System.Drawing.Size(63, 20)
377
+        Me.會計月.TabIndex = 1208
378
+        Me.會計月.Text = "會計月"
379
+        Me.會計月.UseVisualStyleBackColor = True
380
+        '
381
+        'Button2
382
+        '
383
+        Me.Button2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
384
+        Me.Button2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
385
+        Me.Button2.Location = New System.Drawing.Point(397, 4)
386
+        Me.Button2.Name = "Button2"
387
+        Me.Button2.Size = New System.Drawing.Size(65, 23)
388
+        Me.Button2.TabIndex = 1207
389
+        Me.Button2.Text = "下個月"
390
+        Me.Button2.UseVisualStyleBackColor = True
391
+        '
392
+        'Label4
393
+        '
394
+        Me.Label4.AutoSize = True
395
+        Me.Label4.Location = New System.Drawing.Point(97, 8)
396
+        Me.Label4.Name = "Label4"
397
+        Me.Label4.Size = New System.Drawing.Size(20, 16)
398
+        Me.Label4.TabIndex = 1205
399
+        Me.Label4.Text = "到"
400
+        '
401
+        'DateTimePicker2
402
+        '
403
+        Me.DateTimePicker2.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
404
+        Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
405
+        Me.DateTimePicker2.Location = New System.Drawing.Point(118, 4)
406
+        Me.DateTimePicker2.Name = "DateTimePicker2"
407
+        Me.DateTimePicker2.Size = New System.Drawing.Size(87, 23)
408
+        Me.DateTimePicker2.TabIndex = 1204
409
+        '
410
+        'DateTimePicker1
411
+        '
412
+        Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
413
+        Me.DateTimePicker1.Location = New System.Drawing.Point(8, 4)
414
+        Me.DateTimePicker1.Name = "DateTimePicker1"
415
+        Me.DateTimePicker1.Size = New System.Drawing.Size(87, 23)
416
+        Me.DateTimePicker1.TabIndex = 1203
417
+        '
418
+        'DataGridView1
419
+        '
420
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
421
+        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
422
+        Me.DataGridView1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
423
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
424
+        Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
425
+        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
426
+        Me.DataGridView1.Location = New System.Drawing.Point(8, 31)
427
+        Me.DataGridView1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
428
+        Me.DataGridView1.Name = "DataGridView1"
429
+        Me.DataGridView1.RowHeadersWidth = 5
430
+        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
431
+        Me.DataGridView1.RowsDefaultCellStyle = DataGridViewCellStyle6
432
+        Me.DataGridView1.RowTemplate.Height = 24
433
+        Me.DataGridView1.Size = New System.Drawing.Size(100, 290)
434
+        Me.DataGridView1.TabIndex = 1202
435
+        '
436
+        'CheckBox1
437
+        '
438
+        Me.CheckBox1.AutoSize = True
439
+        Me.CheckBox1.Checked = True
440
+        Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
441
+        Me.CheckBox1.ForeColor = System.Drawing.Color.Green
442
+        Me.CheckBox1.Location = New System.Drawing.Point(780, 6)
443
+        Me.CheckBox1.Name = "CheckBox1"
444
+        Me.CheckBox1.Size = New System.Drawing.Size(39, 20)
445
+        Me.CheckBox1.TabIndex = 1236
446
+        Me.CheckBox1.Text = "補"
447
+        Me.CheckBox1.UseVisualStyleBackColor = True
448
+        '
449
+        '應收帳款控制表1
478 450
         '
479 451
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
480 452
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
481 453
         Me.ClientSize = New System.Drawing.Size(1249, 611)
482
-        Me.Controls.Add(Me.DateTimePicker4)
483
-        Me.Controls.Add(Me.ComboBox2)
454
+        Me.Controls.Add(Me.Label6)
455
+        Me.Controls.Add(Me.DateTimePicker3)
456
+        Me.Controls.Add(Me.TextBox6)
457
+        Me.Controls.Add(Me.Button4)
458
+        Me.Controls.Add(Me.Button3)
484 459
         Me.Controls.Add(Me.TextBox5)
485
-        Me.Controls.Add(Me.TextBox4)
486
-        Me.Controls.Add(Me.Label8)
487
-        Me.Controls.Add(Me.TextBox1)
488 460
         Me.Controls.Add(Me.Label7)
489 461
         Me.Controls.Add(Me.NumericUpDown2)
490 462
         Me.Controls.Add(Me.Label2)
491 463
         Me.Controls.Add(Me.NumericUpDown1)
464
+        Me.Controls.Add(Me.Label5)
465
+        Me.Controls.Add(Me.TextBox4)
492 466
         Me.Controls.Add(Me.Label1)
493
-        Me.Controls.Add(Me.Button6)
494 467
         Me.Controls.Add(Me.TextBox2)
495
-        Me.Controls.Add(Me.CheckBox1)
496
-        Me.Controls.Add(Me.DateTimePicker3)
468
+        Me.Controls.Add(Me.Button6)
497 469
         Me.Controls.Add(Me.Button5)
498
-        Me.Controls.Add(Me.Button4)
499
-        Me.Controls.Add(Me.ComboBox7)
500
-        Me.Controls.Add(Me.TextBox9)
501
-        Me.Controls.Add(Me.ComboBox4)
502
-        Me.Controls.Add(Me.ComboBox3)
503
-        Me.Controls.Add(Me.ComboBox1)
504
-        Me.Controls.Add(Me.ComboBox5)
505
-        Me.Controls.Add(Me.ComboBox6)
506
-        Me.Controls.Add(Me.Label5)
507 470
         Me.Controls.Add(Me.Button12)
508 471
         Me.Controls.Add(Me.Button13)
509
-        Me.Controls.Add(Me.TextBox3)
510
-        Me.Controls.Add(Me.Label3)
511
-        Me.Controls.Add(Me.Label6)
512 472
         Me.Controls.Add(Me.CheckBox2)
513 473
         Me.Controls.Add(Me.CheckBox3)
474
+        Me.Controls.Add(Me.TextBox1)
475
+        Me.Controls.Add(Me.TextBox3)
476
+        Me.Controls.Add(Me.DataGridView3)
477
+        Me.Controls.Add(Me.DataGridView2)
478
+        Me.Controls.Add(Me.DateTimePicker4)
514 479
         Me.Controls.Add(Me.Button1)
515 480
         Me.Controls.Add(Me.一般月)
516 481
         Me.Controls.Add(Me.會計月)
@@ -519,55 +484,55 @@ Partial Class 應收帳款控制表
519 484
         Me.Controls.Add(Me.DateTimePicker2)
520 485
         Me.Controls.Add(Me.DateTimePicker1)
521 486
         Me.Controls.Add(Me.DataGridView1)
487
+        Me.Controls.Add(Me.CheckBox1)
488
+        Me.Controls.Add(Me.Label3)
522 489
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
523 490
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
524
-        Me.Name = "應收帳款控制表"
525
-        Me.Text = "應收帳款控制表"
526
-        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
491
+        Me.Name = "應收帳款控制表1"
492
+        Me.Text = "應收帳款控制表1"
527 493
         CType(Me.NumericUpDown2, System.ComponentModel.ISupportInitialize).EndInit()
528 494
         CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit()
495
+        CType(Me.DataGridView3, System.ComponentModel.ISupportInitialize).EndInit()
496
+        CType(Me.DataGridView2, System.ComponentModel.ISupportInitialize).EndInit()
497
+        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
529 498
         Me.ResumeLayout(False)
530 499
         Me.PerformLayout()
531 500
 
532 501
     End Sub
533
-    Friend WithEvents DataGridView1 As DataGridView
534
-    Friend WithEvents Button1 As Button
535
-    Friend WithEvents 一般月 As CheckBox
536
-    Friend WithEvents 會計月 As CheckBox
537
-    Friend WithEvents Button2 As Button
538
-    Friend WithEvents Label4 As Label
539
-    Friend WithEvents DateTimePicker2 As DateTimePicker
540
-    Friend WithEvents DateTimePicker1 As DateTimePicker
502
+
503
+    Friend WithEvents Label6 As Label
504
+    Friend WithEvents DateTimePicker3 As DateTimePicker
505
+    Friend WithEvents TextBox6 As TextBox
506
+    Friend WithEvents Button4 As Button
507
+    Friend WithEvents Button3 As Button
541 508
     Friend WithEvents TextBox5 As TextBox
542
-    Friend WithEvents TextBox4 As TextBox
543
-    Friend WithEvents Label8 As Label
544
-    Friend WithEvents TextBox1 As TextBox
545 509
     Friend WithEvents Label7 As Label
546 510
     Friend WithEvents NumericUpDown2 As NumericUpDown
547 511
     Friend WithEvents Label2 As Label
548 512
     Friend WithEvents NumericUpDown1 As NumericUpDown
513
+    Friend WithEvents Label5 As Label
514
+    Friend WithEvents TextBox4 As TextBox
549 515
     Friend WithEvents Label1 As Label
550
-    Friend WithEvents Button6 As Button
551 516
     Friend WithEvents TextBox2 As TextBox
552
-    Friend WithEvents CheckBox1 As CheckBox
553
-    Friend WithEvents DateTimePicker3 As DateTimePicker
517
+    Friend WithEvents Button6 As Button
554 518
     Friend WithEvents Button5 As Button
555
-    Friend WithEvents Button4 As Button
556
-    Friend WithEvents ComboBox7 As ComboBox
557
-    Friend WithEvents TextBox9 As TextBox
558
-    Friend WithEvents ComboBox4 As ComboBox
559
-    Friend WithEvents ComboBox3 As ComboBox
560
-    Friend WithEvents ComboBox1 As ComboBox
561
-    Friend WithEvents ComboBox5 As ComboBox
562
-    Friend WithEvents ComboBox6 As ComboBox
563
-    Friend WithEvents Label5 As Label
564 519
     Friend WithEvents Button12 As Button
565 520
     Friend WithEvents Button13 As Button
566
-    Friend WithEvents TextBox3 As TextBox
567
-    Friend WithEvents Label3 As Label
568
-    Friend WithEvents Label6 As Label
569 521
     Friend WithEvents CheckBox2 As CheckBox
570 522
     Friend WithEvents CheckBox3 As CheckBox
571
-    Friend WithEvents ComboBox2 As ComboBox
523
+    Friend WithEvents TextBox1 As TextBox
524
+    Friend WithEvents TextBox3 As TextBox
525
+    Friend WithEvents Label3 As Label
526
+    Friend WithEvents DataGridView3 As DataGridView
527
+    Friend WithEvents DataGridView2 As DataGridView
572 528
     Friend WithEvents DateTimePicker4 As DateTimePicker
529
+    Friend WithEvents Button1 As Button
530
+    Friend WithEvents 一般月 As CheckBox
531
+    Friend WithEvents 會計月 As CheckBox
532
+    Friend WithEvents Button2 As Button
533
+    Friend WithEvents Label4 As Label
534
+    Friend WithEvents DateTimePicker2 As DateTimePicker
535
+    Friend WithEvents DateTimePicker1 As DateTimePicker
536
+    Friend WithEvents DataGridView1 As DataGridView
537
+    Friend WithEvents CheckBox1 As CheckBox
573 538
 End Class

+ 156
- 194
MaoOrange-Hongji/財務系統管理/應收帳款控制表.vb Parādīt failu

@@ -9,52 +9,76 @@ Imports Microsoft.Office.Interop.Excel.XlThemeColor
9 9
 Imports Microsoft.Office.Interop.Excel.XlWindowState
10 10
 Imports Microsoft.Office.Interop.Excel
11 11
 Public Class 應收帳款控制表
12
-    ReadOnly ds As New DataSet
13
-    Dim N1 As Integer : Dim 新項次 As String
12
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet
13
+    Dim N1 As Integer
14 14
     Dim xlApp As Application : Dim xlBook As Workbook : Dim xlSheet As Worksheet
15
-    Private Sub Set_賬款單()
15
+    Private Sub Set_賬款單()
16 16
         DataGridView1.DataSource = Nothing : ds.Clear() : DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView1.ColumnHeadersHeight = 40
17 17
         DataGridView1.AllowUserToAddRows = False : DataGridView1.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView1.MultiSelect = True
18
-        SQL_應收賬款單()
18
+        SQL_應收賬款單()
19 19
         da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
20
+        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).FillWeight = 100
21
+        DataGridView1.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
22
+        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
23
+        For I As Integer = 0 To 1 : DataGridView1.Columns(I).ReadOnly = True : Next
24
+    End Sub
25
+    Private Sub Set_賬款清單()
26
+        DataGridView2.DataSource = Nothing : ds1.Clear() : DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView2.ColumnHeadersHeight = 40
27
+        DataGridView2.AllowUserToAddRows = False : DataGridView2.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView2.MultiSelect = True
20 28
 
21
-        DataGridView1.Columns(0).FillWeight = 150 : DataGridView1.Columns(1).Visible = False : DataGridView1.Columns(2).FillWeight = 100 : DataGridView1.Columns(3).Visible = False
22
-        DataGridView1.Columns(4).FillWeight = 80 : DataGridView1.Columns(5).FillWeight = 300 : DataGridView1.Columns(6).FillWeight = 80 : DataGridView1.Columns(7).FillWeight = 80
23
-        DataGridView1.Columns(8).FillWeight = 80 : DataGridView1.Columns(9).FillWeight = 80 : DataGridView1.Columns(10).FillWeight = 100 : DataGridView1.Columns(11).FillWeight = 100
24
-        DataGridView1.Columns(12).FillWeight = 150 : DataGridView1.Columns(13).FillWeight = 60 : DataGridView1.Columns(14).FillWeight = 50 : DataGridView1.Columns(15).Visible = False
25
-        DataGridView1.Columns(16).FillWeight = 50
29
+        If TextBox6.Text = "" Then : SQL_應收賬款清單一() : Else : SQL_應收賬款清單二() : End If
26 30
 
27
-        DataGridView1.Columns(6).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(7).DefaultCellStyle.Format = "#,##0.000"
28
-        DataGridView1.Columns(8).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(9).DefaultCellStyle.Format = "#,##0"
29
-        DataGridView1.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
30
-        DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
31
-        DataGridView1.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
32
-        DataGridView1.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
33
-        DataGridView1.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
34
-        DataGridView1.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
35
-        DataGridView1.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
36
-        DataGridView1.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
37
-        DataGridView1.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
38
-        DataGridView1.Columns(16).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(16).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
31
+        da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
32
+
33
+        DataGridView2.Columns(0).FillWeight = 150 : DataGridView2.Columns(1).Visible = False : DataGridView2.Columns(2).Visible = False : DataGridView2.Columns(3).Visible = False
34
+        DataGridView2.Columns(4).FillWeight = 80 : DataGridView2.Columns(5).FillWeight = 300 : DataGridView2.Columns(6).FillWeight = 80 : DataGridView2.Columns(7).FillWeight = 80
35
+        DataGridView2.Columns(8).FillWeight = 80 : DataGridView2.Columns(9).FillWeight = 80 : DataGridView2.Columns(10).FillWeight = 100 : DataGridView2.Columns(11).FillWeight = 100
36
+        DataGridView2.Columns(12).FillWeight = 150 : DataGridView2.Columns(13).FillWeight = 60 : DataGridView2.Columns(14).FillWeight = 50 : DataGridView2.Columns(15).Visible = False
37
+        DataGridView2.Columns(16).FillWeight = 120 : DataGridView2.Columns(17).Visible = False
38
+
39
+        DataGridView2.Columns(6).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(7).DefaultCellStyle.Format = "#,##0.000"
40
+        DataGridView2.Columns(8).DefaultCellStyle.Format = "#,##0" : DataGridView2.Columns(9).DefaultCellStyle.Format = "#,##0"
41
+        DataGridView2.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
42
+        DataGridView2.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
43
+        DataGridView2.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
44
+        DataGridView2.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
45
+        DataGridView2.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
46
+        DataGridView2.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
47
+        DataGridView2.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
48
+        DataGridView2.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
49
+        DataGridView2.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView2.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
39 50
 
40
-        For I As Integer = 0 To 12 : DataGridView1.Columns(I).ReadOnly = True : Next : DataGridView1.Columns(14).ReadOnly = True
41
-        For I As Integer = 0 To DataGridView1.Rows.Count - 1
42
-            If DataGridView1.Rows(I).Cells("應收立帳").Value.ToString = "" Then : DataGridView1.Rows(I).Cells("應收立帳").Value = False : End If
43
-            DataGridView1.Rows(I).Cells("選擇").Value = False
51
+        For I As Integer = 0 To 12 : DataGridView2.Columns(I).ReadOnly = True : Next : DataGridView2.Columns(14).ReadOnly = True
52
+        For I As Integer = 0 To DataGridView2.Rows.Count - 1
53
+            If DataGridView2.Rows(I).Cells("應收立帳").Value.ToString = "" Then : DataGridView2.Rows(I).Cells("應收立帳").Value = False : End If
54
+            DataGridView2.Rows(I).Cells("選擇").Value = False
44 55
         Next
45 56
     End Sub
46
-    Private Sub ComboBox1下拉表單資料載入()
47
-        SQL_會計科目_第一階_只含流動票務()
48
-        ComboBox5.Items.Clear() : ComboBox1.Items.Clear() : While (dr.Read()) : ComboBox5.Items.Add(dr("第一階")) : ComboBox1.Items.Add(dr("編號")) : End While : conn.Close()
49
-    End Sub
50
-    Private Sub ComboBox3下拉表單資料載入()
51
-        PA = ComboBox1.Text : SQL_會計科目_第二階_只含流動票務()
52
-        ComboBox3.Items.Clear() : ComboBox4.Items.Clear() : While (dr.Read()) : ComboBox3.Items.Add(dr("第二階")) : ComboBox4.Items.Add(dr("編號")) : End While : conn.Close() : PA = ""
53
-    End Sub
54
-    Private Sub ComboBox6下拉表單資料載入()
55
-        PA = ComboBox4.Text : SQL_會計科目_第三階_只含流動票務()
56
-        ComboBox7.Items.Clear() : ComboBox6.Items.Clear() : While (dr.Read()) : ComboBox7.Items.Add(dr("會計科目")) : ComboBox6.Items.Add(dr("編號")) : End While : conn.Close()
57
-        If ComboBox7.Items.Count <> 0 Then : ComboBox7.SelectedIndex = 0 : End If
57
+    Private Sub Set_財務清單()
58
+        DataGridView3.DataSource = Nothing : ds2.Clear() : DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView3.ColumnHeadersHeight = 40
59
+        DataGridView3.AllowUserToAddRows = False : DataGridView3.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView3.MultiSelect = True
60
+        DataGridView3.RowTemplate.Height = 35
61
+        SQL_應收賬款清單三()
62
+        da.Fill(ds2) : DataGridView3.DataSource = ds2.Tables(0) : conn.Close()
63
+
64
+        DataGridView3.Columns(0).Visible = False : DataGridView3.Columns(1).Visible = False : DataGridView3.Columns(2).FillWeight = 75 : DataGridView3.Columns(3).Visible = False
65
+        DataGridView3.Columns(4).FillWeight = 150 : DataGridView3.Columns(5).Visible = False : DataGridView3.Columns(6).FillWeight = 80 : DataGridView3.Columns(7).Visible = False
66
+        DataGridView3.Columns(8).FillWeight = 80 : DataGridView3.Columns(9).FillWeight = 150 : DataGridView3.Columns(10).FillWeight = 50 : DataGridView3.Columns(11).FillWeight = 50
67
+        DataGridView3.Columns(12).FillWeight = 120 : DataGridView3.Columns(13).FillWeight = 75 : DataGridView3.Columns(14).FillWeight = 95 : DataGridView3.Columns(15).FillWeight = 95
68
+        DataGridView3.Columns(16).FillWeight = 95 : DataGridView3.Columns(17).FillWeight = 95 : DataGridView3.Columns(18).FillWeight = 75 : DataGridView3.Columns(19).Visible = False
69
+        DataGridView3.Columns(20).FillWeight = 150 : DataGridView3.Columns(21).FillWeight = 100 : DataGridView3.Columns(22).FillWeight = 80 : DataGridView3.Columns(23).FillWeight = 150
70
+        DataGridView3.Columns(24).Visible = False : DataGridView3.Columns(25).Visible = False : DataGridView3.Columns(26).Visible = False
71
+
72
+        DataGridView3.Columns(6).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(7).DefaultCellStyle.Format = "#,##0"
73
+        DataGridView3.Columns(8).DefaultCellStyle.Format = "#,##0" : DataGridView3.Columns(5).DefaultCellStyle.Format = "#,##0"
74
+        DataGridView3.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
75
+        DataGridView3.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
76
+        DataGridView3.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
77
+        DataGridView3.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
78
+        DataGridView3.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
79
+        DataGridView3.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
80
+        DataGridView3.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
81
+        DataGridView3.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView3.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
58 82
     End Sub
59 83
     Private Sub 日期格式()
60 84
         If 會計月.Checked = True Then
@@ -73,15 +97,10 @@ Public Class 應收帳款控制表
73 97
             DateTimePicker2.Value = DateTimePicker2.Value.AddMonths(1) : DateTimePicker2.Value = DateTimePicker2.Value.AddDays(-1)
74 98
         End If
75 99
     End Sub
76
-    Private Sub 預設關鍵字()
77
-        關鍵字編號 = "DV003" : SQL_通用預設值管理查詢() : If dr.Read() Then : TextBox9.Text = dr("預設值") : End If
78
-    End Sub
79
-    Private Sub 應收帳款_Load(sender As Object, e As EventArgs) Handles MyBase.Load
100
+    Private Sub 應收帳款控制表1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
80 101
         Me.MdiParent = MAOJI_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
81
-        ComboBox6.Visible = False : TextBox1.Visible = False : TextBox4.Visible = False : TextBox5.Visible = False : DateTimePicker4.Visible = False
82
-        TextBox1.Text = "0" : TextBox2.Text = "0"
83
-        ComboBox1下拉表單資料載入() : ComboBox3下拉表單資料載入() : ComboBox6下拉表單資料載入() : 日期格式() : Set_賬款清單()
84
-        預設關鍵字()
102
+        DateTimePicker4.Visible = False : TextBox1.Visible = False : TextBox5.Visible = False
103
+        日期格式() : Set_賬款主單()
85 104
     End Sub
86 105
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
87 106
         If 會計月.Checked = True Then
@@ -93,7 +112,7 @@ Public Class 應收帳款控制表
93 112
             DateTimePicker1.Value = DateTimePicker4.Value.AddMonths(-1)
94 113
             DateTimePicker2.Value = DateTimePicker4.Value
95 114
         End If
96
-        日期格式() : Set_賬款清單()
115
+        TextBox6.Text = "" : 日期格式() : Set_賬款主單()
97 116
     End Sub
98 117
     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
99 118
         If 會計月.Checked = True Then
@@ -105,173 +124,116 @@ Public Class 應收帳款控制表
105 124
             DateTimePicker1.Value = DateTimePicker4.Value.AddMonths(-1)
106 125
             DateTimePicker2.Value = DateTimePicker4.Value
107 126
         End If
108
-        日期格式() : Set_賬款清單()
127
+        TextBox6.Text = "" : 日期格式() : Set_賬款主單()
109 128
     End Sub
110 129
     Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月.Click
111
-        會計月.Checked = True : 一般月.Checked = False : 日期格式() : Set_賬款清單()
130
+        會計月.Checked = True : 一般月.Checked = False : TextBox6.Text = "" : 日期格式() : Set_賬款主單()
112 131
     End Sub
113 132
     Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月.Click
114
-        會計月.Checked = False : 一般月.Checked = True : 日期格式() : Set_賬款清單()
115
-    End Sub
116
-    Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox5.TextChanged
117
-        ComboBox1.SelectedIndex = ComboBox5.SelectedIndex : TextBox9.Text = "" : ComboBox3下拉表單資料載入() : ComboBox6下拉表單資料載入()
133
+        會計月.Checked = False : 一般月.Checked = True : TextBox6.Text = "" : 日期格式() : Set_賬款主單()
118 134
     End Sub
119
-    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.TextChanged
120
-        ComboBox5.SelectedIndex = ComboBox1.SelectedIndex : ComboBox3下拉表單資料載入() : ComboBox6下拉表單資料載入()
121
-    End Sub
122
-    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.TextChanged
123
-        ComboBox4.SelectedIndex = ComboBox3.SelectedIndex : ComboBox6下拉表單資料載入()
124
-    End Sub
125
-    Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.TextChanged
126
-        ComboBox3.SelectedIndex = ComboBox4.SelectedIndex : ComboBox6下拉表單資料載入()
127
-    End Sub
128
-    Private Sub ComboBox7_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox7.SelectedIndexChanged
129
-        ComboBox6.SelectedIndex = ComboBox7.SelectedIndex
130
-    End Sub
131
-    Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged
132
-        ComboBox7.SelectedIndex = ComboBox6.SelectedIndex
133
-    End Sub
134
-    Private Sub TextBox9_TextChanged(sender As Object, e As EventArgs) Handles TextBox9.TextChanged
135
-        PA = TextBox9.Text : SQL_會計科目_關鍵字_只含流動票務()
136
-        ComboBox7.Items.Clear() : ComboBox6.Items.Clear() : While (dr.Read()) : ComboBox7.Items.Add(dr("會計科目")) : ComboBox6.Items.Add(dr("編號")) : End While : conn.Close()
137
-        If ComboBox7.Items.Count <> 0 Then : ComboBox7.SelectedIndex = 0 : End If : PA = ""
135
+    Private Sub 選中金額計算()
136
+        TextBox4.Text = "0" : TextBox5.Text = "0"
137
+        For I As Integer = 0 To DataGridView2.Rows.Count - 1
138
+            If DataGridView2.Rows(I).Cells("選擇").Value = True Then
139
+                TextBox5.Text = Val(TextBox5.Text) + DataGridView2.Rows(I).Cells("金額").Value
140
+                TextBox4.Text = Val(TextBox4.Text) + DataGridView2.Rows(I).Cells("金額").Value
141
+            End If
142
+        Next
143
+        NumericUpDown2.Value = Val(TextBox5.Text) - NumericUpDown1.Value
144
+        TextBox4.Text = Strings.Format(Val(TextBox4.Text), "#,##0")
138 145
     End Sub
139 146
     Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
140 147
         If e.RowIndex = -1 Then : Else
141
-            TextBox3.Text = DataGridView1.Rows(e.RowIndex).Cells("單據編號").Value : TextBox5.Text = DataGridView1.Rows(e.RowIndex).Cells("客戶").Value
142
-            ComboBox2.Text = DataGridView1.Rows(e.RowIndex).Cells("收款狀態").Value.ToString
143
-            TextBox2.Text = "0" : TextBox1.Text = "0"
144
-            For I As Integer = 0 To DataGridView1.Rows.Count - 1
148
+            TextBox6.Text = "" : TextBox2.Text = "" : CheckBox2.Checked = False : TextBox4.Text = "0" : NumericUpDown1.Value = 0 : NumericUpDown2.Value = 0
149
+            TextBox1.Text = DataGridView1.Rows(e.RowIndex).Cells("客戶編號").Value
150
+            TextBox3.Text = DataGridView1.Rows(e.RowIndex).Cells("客戶").Value
151
+            Set_賬款清單() : Set_財務清單()
152
+            For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
153
+        End If
154
+    End Sub
155
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView2.CellClick
156
+        If e.RowIndex = -1 Then : Else
157
+            If DataGridView2.Rows(e.RowIndex).Cells("申請日期").Value.ToString = "" Then : Else : DateTimePicker3.Value = DataGridView2.Rows(e.RowIndex).Cells("申請日期").Value.ToString : End If
158
+            TextBox2.Text = DataGridView2.Rows(e.RowIndex).Cells("單據編號").Value : TextBox6.Text = DataGridView2.Rows(e.RowIndex).Cells("財務單號").Value.ToString
159
+            For I As Integer = 0 To DataGridView2.Rows.Count - 1
145 160
                 If CheckBox2.Checked = False Then
146
-                    DataGridView1.Rows(I).Cells("選擇").Value = False
161
+                    DataGridView2.Rows(I).Cells("選擇").Value = False
147 162
                 End If
148
-
149
-                If TextBox3.Text = DataGridView1.Rows(I).Cells("單據編號").Value Then
150
-                    DataGridView1.Rows(I).Cells("選擇").Value = True
151
-                    TextBox1.Text = Val(TextBox1.Text) + DataGridView1.Rows(I).Cells("金額").Value
152
-                    TextBox2.Text = Val(TextBox2.Text) + DataGridView1.Rows(I).Cells("金額").Value
163
+                If TextBox2.Text = DataGridView2.Rows(I).Cells("單據編號").Value Then
164
+                    DataGridView2.Rows(I).Cells("選擇").Value = True
153 165
                 End If
154 166
             Next
155
-            TextBox2.Text = Strings.Format(Val(TextBox2.Text), "#,##0")
167
+            選中金額計算() : Set_財務清單()
168
+            NumericUpDown1.Value = 0
169
+            For I As Integer = 0 To DataGridView3.Rows.Count - 1
170
+                NumericUpDown1.Value = NumericUpDown1.Value + DataGridView3.Rows(I).Cells("收票").Value + DataGridView3.Rows(I).Cells("收現").Value
171
+            Next
156 172
         End If
157 173
     End Sub
158
-    Private Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView1.RowPostPaint
174
+    Private Sub DataGridView2_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles DataGridView2.RowPostPaint
159 175
         Dim linePen As New Pen(Color.Blue, 2)
160
-        If e.RowIndex = DataGridView1.Rows.Count - 1 Then : Exit Sub
176
+        If e.RowIndex = DataGridView2.Rows.Count - 1 Then : Exit Sub
161 177
         Else
162
-            If DataGridView1(0, e.RowIndex).Value.ToString <> DataGridView1(0, e.RowIndex + 1).Value.ToString Then
163
-                Dim startX As Integer = IIf(DataGridView1.RowHeadersVisible, DataGridView1.RowHeadersWidth, 0)
178
+            If DataGridView2(0, e.RowIndex).Value.ToString <> DataGridView2(0, e.RowIndex + 1).Value.ToString Then
179
+                Dim startX As Integer = IIf(DataGridView2.RowHeadersVisible, DataGridView2.RowHeadersWidth, 0)
164 180
                 Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
165
-                Dim endX As Integer = startX + DataGridView1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView1.HorizontalScrollingOffset
181
+                Dim endX As Integer = startX + DataGridView2.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - DataGridView2.HorizontalScrollingOffset
166 182
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
167 183
             End If
168 184
         End If
169 185
     End Sub
186
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
187
+        TextBox6.Text = "" : TextBox1.Text = "%%" : Set_賬款清單() : Set_財務清單()
188
+    End Sub
189
+    Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown1.ValueChanged
190
+        NumericUpDown2.Value = Val(TextBox5.Text) - NumericUpDown1.Value
191
+    End Sub
170 192
     Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click
171
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1 : DataGridView1.Rows(i).Cells("選擇").Value = True : Next i
193
+        For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
172 194
     End Sub
173 195
     Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
174
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1 : DataGridView1.Rows(i).Cells("選擇").Value = False : Next i
196
+        For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = False : Next i : 選中金額計算()
175 197
     End Sub
176
-    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
177
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
178
-            If TextBox3.Text = DataGridView1.Rows(i).Cells("單據編號").Value.ToString Then
179
-                DataGridView1.Rows(i).Cells("應收立帳").Value = False
198
+    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
199
+        SQL_應收應付單號連接暫存檔刪除() : conn.Close()
200
+        Dim 選擇判斷 As Boolean = False
201
+        For i As Integer = 0 To DataGridView2.Rows.Count - 1
202
+            If DataGridView2.Rows(i).Cells("選擇").Value = True Then
203
+                選擇判斷 = True : Exit For
180 204
             End If
181 205
         Next i
182
-    End Sub
183
-    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
184
-        NumericUpDown2.Value = Val(TextBox1.Text) - NumericUpDown1.Value
185
-    End Sub
186
-    Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown1.ValueChanged
187
-        NumericUpDown2.Value = Val(TextBox1.Text) - NumericUpDown1.Value
188
-    End Sub
189
-    Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged
190
-        Set_賬款清單()
191
-    End Sub
192
-    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
193
-        If ComboBox2.Text = "收現" Then
194
-            關鍵字編號 = "DV003" : SQL_通用預設值管理查詢() : If dr.Read() Then : TextBox9.Text = dr("預設值") : End If
195
-        ElseIf ComboBox2.Text = "收票" Then
196
-            關鍵字編號 = "DV004" : SQL_通用預設值管理查詢() : If dr.Read() Then : TextBox9.Text = dr("預設值") : End If
197
-        ElseIf ComboBox2.Text = "" Or ComboBox2.Text = "託收" Then
198
-            TextBox9.Text = ""
206
+        If 選擇判斷 = True Then
207
+            If CheckBox1.Checked = False Then : DTP = Strings.Format(Today(), "yyyy/MM/dd") : DTP1 = Strings.Format(Today(), "yyyyMMdd")
208
+            Else : DTP1 = Strings.Format(DateTimePicker3.Value, "yyyyMMdd") : DTP = Strings.Format(DateTimePicker3.Value, "yyyy/MM/dd") : End If
209
+            收付應沖金額 = Val(TextBox5.Text)
210
+            財務單申請狀態 = "應收" : 收付對應財務單號 = TextBox6.Text
211
+            收付對應客戶供應商編號 = TextBox1.Text
212
+            For I As Integer = 0 To DataGridView2.Rows.Count - 1
213
+                If DataGridView2.Rows(I).Cells("選擇").Value = True Then
214
+                    PA19 = DataGridView2.Rows(I).Cells("資料流水號").Value.ToString
215
+                    SQL_應收應付單號連接暫存檔新增() : conn.Close()
216
+                End If
217
+            Next
218
+            財務單具申請.ShowDialog()
219
+            Set_賬款清單() : Set_財務清單() : 財務單具申請.Close()
220
+            For I As Integer = 0 To DataGridView2.Rows.Count - 1
221
+                DataGridView2.Rows(I).Cells("選擇").Value = True
222
+            Next
223
+        Else
224
+            MsgBox("最少要選擇一張單據。")
199 225
         End If
200 226
     End Sub
201
-    Private Sub Set_日期格式轉換()
202
-        If CheckBox1.Checked = False Then : DTP = Strings.Format(Today(), "yyyy/MM/dd") : DTP1 = Strings.Format(Today(), "yyyyMMdd")
203
-        Else : DTP1 = Strings.Format(DateTimePicker3.Value, "yyyyMMdd") : DTP = Strings.Format(DateTimePicker3.Value, "yyyy/MM/dd") : End If
204
-    End Sub
205
-    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
206
-        If ComboBox2.Text = "" Or ComboBox2.Text = "託收" Then
207
-            MsgBox("需要選擇收現或是收票才能運行。")
208
-        Else
209
-            If CheckBox2.Checked = True Then
210
-                MsgBox("開立支付單(傳票)需要一張一張來,請重新選擇。")
211
-                CheckBox2.Checked = False
212
-                For I As Integer = 0 To DataGridView1.Rows.Count - 1
213
-                    DataGridView1.Rows(I).Cells("選擇").Value = False
214
-                Next
215
-            Else
216
-                If NumericUpDown1.Value = 0 Then
217
-                    MsgBox("實收金額不可為零。") : Exit Sub
218
-                Else
219
-                    If NumericUpDown2.Value = 0 Then : Else
220
-                        If ComboBox6.Text = "" Then
221
-                            MsgBox("未收款金額擇讓需要會計科目。") : Exit Sub
222
-                        Else
223
-                        End If
224
-                    End If
225
-                    Dim 確認 As Boolean = False
226
-                    For i As Integer = 0 To DataGridView1.Rows.Count - 1
227
-                        If DataGridView1.Rows(i).Cells("選擇").Value = True Then
228
-                            MsgBox("該採銷售已經開立過傳票,如是之前開立有誤需要從新開立,請先點擊--依據單號取消立帳選擇--按鈕。如是因銷售退貨需要開立收支單(傳票)請先勾選--已立帳資料隱藏--再行操作。")
229
-                            Exit Sub
230
-                        End If
231
-                    Next
232
-                    If 確認 = False Then : MsgBox("沒有選擇任何一筆要轉收支帳(傳票)的銷售單號。")
233
-                    Else
234
-                        Dim NUM1 As Integer : Set_日期格式轉換()
235
-                        For ii As Integer = 1 To 999
236
-                            NUM1 = 0 + ii
237
-                            If NUM1 < 10 Then : TextBox4.Text = "OE-" & DTP1 & "-00" & NUM1
238
-                            ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox4.Text = "OE-" & DTP1 & "-0" & NUM1
239
-                            ElseIf NUM1 > 99 Then : TextBox4.Text = "OE-" & DTP1 & "-" & NUM1 : End If : PA = TextBox4.Text
240
-                            SQL_營運成本收支單申請_支付單號流水號()
241
-                            If dr.Read() Then : Else : ii = 999 : End If
242
-                        Next
243
-                        SQL_營運成本控制表新增()
244
-
245
-                        SQL_營運成本明細表項次新增查詢()
246
-                        If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close() : NUM1 = Double.Parse(新項次) + 1
247
-                        If NUM1 < 10 Then : 新項次 = "0" & NUM1
248
-                        ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
249
-                        關鍵字編號 = "DV001" : SQL_通用預設值管理查詢() : If dr.Read() Then : PA3 = dr("預設值") : End If
250
-                        PA1 = TextBox4.Text : PA2 = 新項次 : PA4 = TextBox5.Text & " - " & DateTimePicker1.Value & " 到 " & DateTimePicker2.Value & " 應收帳款"
251
-                        NU1 = NumericUpDown1.Value : PA5 = "" : NU2 = 0 : NU3 = 0 : NU4 = 0 : PA6 = "收現" : PA7 = gUserName
252
-                        SQL_營運成本明細表新增()
253
-
254
-                        If NumericUpDown2.Value = 0 Then : Else
255
-                            SQL_營運成本明細表項次新增查詢()
256
-                            If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close() : NUM1 = Double.Parse(新項次) + 1
257
-                            If NUM1 < 10 Then : 新項次 = "0" & NUM1
258
-                            ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
259
-
260
-                            PA1 = TextBox4.Text : PA2 = 新項次 : PA3 = ComboBox6.Text : PA4 = TextBox5.Text & " - " & DateTimePicker1.Value & " 到 " & DateTimePicker2.Value & " 貨款折讓"
261
-                            NU1 = NumericUpDown2.Value * -1 : PA5 = "" : NU2 = 0 : NU3 = 0 : NU4 = 0 : PA6 = "收現" : PA7 = gUserName
262
-                            SQL_營運成本明細表新增()
263
-                        End If
264
-                        For i As Integer = 0 To DataGridView1.Rows.Count - 1
265
-                            資料數 = DataGridView1.Rows.Count : MyModule1.進度條()
266
-                            If DataGridView1.Rows(i).Cells("選擇").Value = True Then
267
-                                PA6 = DataGridView1.Rows(i).Cells("資料流水號").Value
268
-                                SQL_應付賬款_倉儲明細應付立帳修改()
269
-                            End If
270
-                        Next i : MAOJI_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0 : MsgBox("財務收支單(傳票)申請完成,請通知主管審核。") : Set_賬款清單()
271
-                    End If
272
-                End If
227
+    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
228
+        For i As Integer = 0 To DataGridView2.Rows.Count - 1
229
+            If TextBox2.Text = DataGridView2.Rows(i).Cells("單據編號").Value.ToString Then
230
+                DataGridView2.Rows(i).Cells("應收立帳").Value = False
273 231
             End If
274
-        End If
232
+        Next i
233
+    End Sub
234
+    Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles TextBox6.TextChanged
235
+        CheckBox2.Checked = True
236
+        Set_賬款清單() : For i As Integer = 0 To DataGridView2.Rows.Count - 1 : DataGridView2.Rows(i).Cells("選擇").Value = True : Next i : 選中金額計算()
275 237
     End Sub
276 238
     Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
277 239
         xlApp = CType(CreateObject("Excel.Application"), Application)
@@ -280,20 +242,20 @@ Public Class 應收帳款控制表
280 242
         xlApp.Visible = True
281 243
         xlApp.Application.WindowState = xlMaximized
282 244
         N1 = 0
283
-        If DataGridView1.Rows.Count = 0 Then : Else
245
+        If DataGridView2.Rows.Count = 0 Then : Else
284 246
             xlSheet = NewMethod(xlBook)
285 247
             xlSheet.Cells(1, 1) = MAOJI_ERP_SYS.ComboBox2.Text : xlSheet.Cells(2, 1) = DateTimePicker1.Value & " 到 " & DateTimePicker2.Value & " 應收帳款清單"
286
-            xlSheet.Cells(3, 1) = "單據編號" : xlSheet.Cells(3, 2) = "客戶" : xlSheet.Cells(3, 3) = "頁碼" : xlSheet.Cells(3, 4) = "品名" : xlSheet.Cells(3, 5) = "價" : xlSheet.Cells(3, 6) = "匯率"
287
-            xlSheet.Cells(3, 7) = "出庫" : xlSheet.Cells(3, 8) = "金額" : xlSheet.Cells(3, 9) = "銷售單" : xlSheet.Cells(3, 10) = "出庫日期" : xlSheet.Cells(3, 11) = "是否立帳"
248
+            xlSheet.Cells(3, 1) = "單據編號" : xlSheet.Cells(3, 2) = "客戶" : xlSheet.Cells(3, 3) = "頁碼" : xlSheet.Cells(3, 4) = "品名" : xlSheet.Cells(3, 5) = "價" : xlSheet.Cells(3, 6) = "匯率"
249
+            xlSheet.Cells(3, 7) = "出庫" : xlSheet.Cells(3, 8) = "金額" : xlSheet.Cells(3, 9) = "銷售單" : xlSheet.Cells(3, 10) = "出庫日期" : xlSheet.Cells(3, 11) = "是否立帳"
288 250
             xlSheet.Cells(2, 7) = "合計" : xlSheet.Cells(2, 8) = "=SUBTOTAL(9,H4:H9999)"
289
-            For i As Integer = 0 To DataGridView1.Rows.Count - 1
290
-                If DataGridView1.Rows(i).Cells("選擇").Value = True Then
291
-                    xlSheet.Cells(N1 + 4, 1) = DataGridView1.Rows(i).Cells("單據編號").Value : xlSheet.Cells(N1 + 4, 2) = DataGridView1.Rows(i).Cells("客戶").Value
292
-                    xlSheet.Cells(N1 + 4, 3) = DataGridView1.Rows(i).Cells("頁碼").Value : xlSheet.Cells(N1 + 4, 4) = DataGridView1.Rows(i).Cells("品名").Value
293
-                    xlSheet.Cells(N1 + 4, 5) = DataGridView1.Rows(i).Cells("單價").Value : xlSheet.Cells(N1 + 4, 6) = DataGridView1.Rows(i).Cells("匯率").Value
294
-                    xlSheet.Cells(N1 + 4, 7) = DataGridView1.Rows(i).Cells("出庫").Value : xlSheet.Cells(N1 + 4, 8) = DataGridView1.Rows(i).Cells("金額").Value
295
-                    xlSheet.Cells(N1 + 4, 9) = DataGridView1.Rows(i).Cells("採購下單").Value : xlSheet.Cells(N1 + 4, 10) = DataGridView1.Rows(i).Cells("出庫日期").Value
296
-                    If DataGridView1.Rows(i).Cells("應收立帳").Value = True Then : PA1 = "YES" : Else : PA1 = "NO" : End If
251
+            For i As Integer = 0 To DataGridView2.Rows.Count - 1
252
+                If DataGridView2.Rows(i).Cells("選擇").Value = True Then
253
+                    xlSheet.Cells(N1 + 4, 1) = DataGridView2.Rows(i).Cells("單據編號").Value : xlSheet.Cells(N1 + 4, 2) = DataGridView2.Rows(i).Cells("客戶").Value
254
+                    xlSheet.Cells(N1 + 4, 3) = DataGridView2.Rows(i).Cells("頁碼").Value : xlSheet.Cells(N1 + 4, 4) = DataGridView2.Rows(i).Cells("品名").Value
255
+                    xlSheet.Cells(N1 + 4, 5) = DataGridView2.Rows(i).Cells("單價").Value : xlSheet.Cells(N1 + 4, 6) = DataGridView2.Rows(i).Cells("匯率").Value
256
+                    xlSheet.Cells(N1 + 4, 7) = DataGridView2.Rows(i).Cells("出庫").Value : xlSheet.Cells(N1 + 4, 8) = DataGridView2.Rows(i).Cells("金額").Value
257
+                    xlSheet.Cells(N1 + 4, 9) = DataGridView2.Rows(i).Cells("採購下單").Value : xlSheet.Cells(N1 + 4, 10) = DataGridView2.Rows(i).Cells("出庫日期").Value
258
+                    If DataGridView2.Rows(i).Cells("應收立帳").Value = True Then : PA1 = "YES" : Else : PA1 = "NO" : End If
297 259
                     xlSheet.Cells(N1 + 4, 11) = PA1
298 260
                     N1 += 1
299 261
                 End If

+ 72
- 12
MaoOrange-Hongji/財務系統管理/營運成本收支_決算表.vb Parādīt failu

@@ -89,7 +89,12 @@ Public Class 營運成本收支_決算表
89 89
             If ComboBox8.Text = "" Then : Else
90 90
                 If DataGridView1.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox30.Text = Val(TextBox30.Text) + DataGridView1.Rows(i).Cells("主項金額").Value : End If : End If
91 91
         Next
92
-        TextBox4.Text = Val(TextBox30.Text) + Val(TextBox1.Text) + Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox76.Text) + Val(TextBox90.Text) + Val(TextBox103.Text)
92
+        Dim ONU(6) As Double
93
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox30.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox1.Text) : End If
94
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox2.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox3.Text) : End If
95
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox76.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox90.Text) : End If
96
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox103.Text) : End If
97
+        TextBox4.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
93 98
     End Sub
94 99
     Private Sub Set_清單2()
95 100
         DataGridView3.DataSource = Nothing : ds1.Clear() : DataGridView3.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -127,7 +132,12 @@ Public Class 營運成本收支_決算表
127 132
             If ComboBox8.Text = "" Then : Else
128 133
                 If DataGridView3.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox29.Text = Val(TextBox29.Text) + DataGridView3.Rows(i).Cells("主項金額").Value : End If : End If
129 134
         Next
130
-        TextBox8.Text = Val(TextBox29.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox75.Text) + Val(TextBox89.Text) + Val(TextBox102.Text)
135
+        Dim ONU(6) As Double
136
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox29.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox5.Text) : End If
137
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox6.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox7.Text) : End If
138
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox75.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox89.Text) : End If
139
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox102.Text) : End If
140
+        TextBox8.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
131 141
     End Sub
132 142
     Private Sub Set_清單3()
133 143
         DataGridView4.DataSource = Nothing : ds3.Clear() : DataGridView4.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -165,7 +175,12 @@ Public Class 營運成本收支_決算表
165 175
             If ComboBox8.Text = "" Then : Else
166 176
                 If DataGridView4.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox28.Text = Val(TextBox28.Text) + DataGridView4.Rows(i).Cells("主項金額").Value : End If : End If
167 177
         Next
168
-        TextBox12.Text = Val(TextBox28.Text) + Val(TextBox9.Text) + Val(TextBox10.Text) + Val(TextBox11.Text) + Val(TextBox74.Text) + Val(TextBox88.Text) + Val(TextBox101.Text)
178
+        Dim ONU(6) As Double
179
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox28.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox9.Text) : End If
180
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox10.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox11.Text) : End If
181
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox74.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox88.Text) : End If
182
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox101.Text) : End If
183
+        TextBox12.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
169 184
     End Sub
170 185
     Private Sub Set_清單4()
171 186
         DataGridView5.DataSource = Nothing : ds4.Clear() : DataGridView5.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -203,7 +218,12 @@ Public Class 營運成本收支_決算表
203 218
             If ComboBox8.Text = "" Then : Else
204 219
                 If DataGridView5.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox27.Text = Val(TextBox27.Text) + DataGridView5.Rows(i).Cells("主項金額").Value : End If : End If
205 220
         Next
206
-        TextBox16.Text = Val(TextBox27.Text) + Val(TextBox13.Text) + Val(TextBox14.Text) + Val(TextBox15.Text) + Val(TextBox73.Text) + Val(TextBox87.Text) + Val(TextBox100.Text)
221
+        Dim ONU(6) As Double
222
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox27.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox13.Text) : End If
223
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox14.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox15.Text) : End If
224
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox73.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox87.Text) : End If
225
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox100.Text) : End If
226
+        TextBox16.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
207 227
     End Sub
208 228
     Private Sub Set_清單5()
209 229
         DataGridView6.DataSource = Nothing : ds5.Clear() : DataGridView6.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -241,7 +261,12 @@ Public Class 營運成本收支_決算表
241 261
             If ComboBox8.Text = "" Then : Else
242 262
                 If DataGridView6.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox26.Text = Val(TextBox26.Text) + DataGridView6.Rows(i).Cells("主項金額").Value : End If : End If
243 263
         Next
244
-        TextBox20.Text = Val(TextBox17.Text) + Val(TextBox18.Text) + Val(TextBox19.Text) + Val(TextBox26.Text) + Val(TextBox72.Text) + Val(TextBox86.Text) + Val(TextBox99.Text)
264
+        Dim ONU(6) As Double
265
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox26.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox17.Text) : End If
266
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox18.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox19.Text) : End If
267
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox72.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox86.Text) : End If
268
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox99.Text) : End If
269
+        TextBox20.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
245 270
     End Sub
246 271
     Private Sub Set_清單6()
247 272
         DataGridView7.DataSource = Nothing : ds6.Clear() : DataGridView7.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -279,7 +304,12 @@ Public Class 營運成本收支_決算表
279 304
             If ComboBox8.Text = "" Then : Else
280 305
                 If DataGridView7.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox25.Text = Val(TextBox25.Text) + DataGridView7.Rows(i).Cells("主項金額").Value : End If : End If
281 306
         Next
282
-        TextBox24.Text = Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) + Val(TextBox25.Text) + Val(TextBox71.Text) + Val(TextBox85.Text) + Val(TextBox98.Text)
307
+        Dim ONU(6) As Double
308
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox25.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox21.Text) : End If
309
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox22.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox23.Text) : End If
310
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox71.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox85.Text) : End If
311
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox98.Text) : End If
312
+        TextBox24.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
283 313
     End Sub
284 314
     Private Sub Set_清單7()
285 315
         DataGridView8.DataSource = Nothing : ds7.Clear() : DataGridView8.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -317,7 +347,12 @@ Public Class 營運成本收支_決算表
317 347
             If ComboBox8.Text = "" Then : Else
318 348
                 If DataGridView8.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox31.Text = Val(TextBox31.Text) + DataGridView8.Rows(i).Cells("主項金額").Value : End If : End If
319 349
         Next
320
-        TextBox32.Text = Val(TextBox35.Text) + Val(TextBox34.Text) + Val(TextBox33.Text) + Val(TextBox31.Text) + Val(TextBox70.Text) + Val(TextBox84.Text) + Val(TextBox97.Text)
350
+        Dim ONU(6) As Double
351
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox31.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox35.Text) : End If
352
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox34.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox33.Text) : End If
353
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox70.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox84.Text) : End If
354
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox97.Text) : End If
355
+        TextBox32.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
321 356
     End Sub
322 357
     Private Sub Set_清單8()
323 358
         DataGridView9.DataSource = Nothing : ds8.Clear() : DataGridView9.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -355,7 +390,12 @@ Public Class 營運成本收支_決算表
355 390
             If ComboBox8.Text = "" Then : Else
356 391
                 If DataGridView9.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox36.Text = Val(TextBox36.Text) + DataGridView9.Rows(i).Cells("主項金額").Value : End If : End If
357 392
         Next
358
-        TextBox37.Text = Val(TextBox40.Text) + Val(TextBox39.Text) + Val(TextBox38.Text) + Val(TextBox36.Text) + Val(TextBox69.Text) + Val(TextBox83.Text) + Val(TextBox96.Text)
393
+        Dim ONU(6) As Double
394
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox36.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox40.Text) : End If
395
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox39.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox38.Text) : End If
396
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox69.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox83.Text) : End If
397
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox96.Text) : End If
398
+        TextBox37.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
359 399
     End Sub
360 400
     Private Sub Set_清單9()
361 401
         DataGridView10.DataSource = Nothing : ds9.Clear() : DataGridView10.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -393,7 +433,12 @@ Public Class 營運成本收支_決算表
393 433
             If ComboBox8.Text = "" Then : Else
394 434
                 If DataGridView10.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox41.Text = Val(TextBox41.Text) + DataGridView10.Rows(i).Cells("主項金額").Value : End If : End If
395 435
         Next
396
-        TextBox42.Text = Val(TextBox45.Text) + Val(TextBox44.Text) + Val(TextBox43.Text) + Val(TextBox41.Text) + Val(TextBox68.Text) + Val(TextBox82.Text) + Val(TextBox95.Text)
436
+        Dim ONU(6) As Double
437
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox41.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox45.Text) : End If
438
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox44.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox43.Text) : End If
439
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox68.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox82.Text) : End If
440
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox95.Text) : End If
441
+        TextBox42.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
397 442
     End Sub
398 443
     Private Sub Set_清單10()
399 444
         DataGridView11.DataSource = Nothing : ds10.Clear() : DataGridView11.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -431,7 +476,12 @@ Public Class 營運成本收支_決算表
431 476
             If ComboBox8.Text = "" Then : Else
432 477
                 If DataGridView11.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox46.Text = Val(TextBox46.Text) + DataGridView11.Rows(i).Cells("主項金額").Value : End If : End If
433 478
         Next
434
-        TextBox47.Text = Val(TextBox50.Text) + Val(TextBox49.Text) + Val(TextBox48.Text) + Val(TextBox46.Text) + Val(TextBox67.Text) + Val(TextBox81.Text) + Val(TextBox94.Text)
479
+        Dim ONU(6) As Double
480
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox46.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox50.Text) : End If
481
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox49.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox48.Text) : End If
482
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox67.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox81.Text) : End If
483
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox94.Text) : End If
484
+        TextBox47.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
435 485
     End Sub
436 486
     Private Sub Set_清單11()
437 487
         DataGridView12.DataSource = Nothing : ds11.Clear() : DataGridView12.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -469,7 +519,12 @@ Public Class 營運成本收支_決算表
469 519
             If ComboBox8.Text = "" Then : Else
470 520
                 If DataGridView12.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox51.Text = Val(TextBox51.Text) + DataGridView12.Rows(i).Cells("主項金額").Value : End If : End If
471 521
         Next
472
-        TextBox52.Text = Val(TextBox55.Text) + Val(TextBox54.Text) + Val(TextBox53.Text) + Val(TextBox51.Text) + Val(TextBox66.Text) + Val(TextBox80.Text) + Val(TextBox93.Text)
522
+        Dim ONU(6) As Double
523
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox51.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox55.Text) : End If
524
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox54.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox53.Text) : End If
525
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox66.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox80.Text) : End If
526
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox93.Text) : End If
527
+        TextBox52.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
473 528
     End Sub
474 529
     Private Sub Set_清單12()
475 530
         DataGridView13.DataSource = Nothing : ds12.Clear() : DataGridView13.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -507,7 +562,12 @@ Public Class 營運成本收支_決算表
507 562
             If ComboBox8.Text = "" Then : Else
508 563
                 If DataGridView13.Rows(i).Cells("第一階").Value.ToString = ComboBox8.Text Then : TextBox56.Text = Val(TextBox56.Text) + DataGridView13.Rows(i).Cells("主項金額").Value : End If : End If
509 564
         Next
510
-        TextBox57.Text = Val(TextBox60.Text) + Val(TextBox59.Text) + Val(TextBox58.Text) + Val(TextBox56.Text) + Val(TextBox65.Text) + Val(TextBox79.Text) + Val(TextBox92.Text)
565
+        Dim ONU(6) As Double
566
+        If CheckBox7.Checked = False Then : ONU(6) = 0 : Else : ONU(6) = Val(TextBox56.Text) : End If : If CheckBox1.Checked = False Then : ONU(0) = 0 : Else : ONU(0) = Val(TextBox60.Text) : End If
567
+        If CheckBox2.Checked = False Then : ONU(1) = 0 : Else : ONU(1) = Val(TextBox59.Text) : End If : If CheckBox3.Checked = False Then : ONU(2) = 0 : Else : ONU(2) = Val(TextBox58.Text) : End If
568
+        If CheckBox4.Checked = False Then : ONU(3) = 0 : Else : ONU(3) = Val(TextBox65.Text) : End If : If CheckBox5.Checked = False Then : ONU(4) = 0 : Else : ONU(4) = Val(TextBox79.Text) : End If
569
+        If CheckBox6.Checked = False Then : ONU(5) = 0 : Else : ONU(5) = Val(TextBox92.Text) : End If
570
+        TextBox57.Text = ONU(0) + ONU(1) + ONU(2) + ONU(3) + ONU(4) + ONU(5) + ONU(6)
511 571
     End Sub
512 572
     Private Sub Set_清單13()
513 573
         DataGridView14.DataSource = Nothing : ds13.Clear() : DataGridView14.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing

+ 505
- 491
MaoOrange-Hongji/財務系統管理/票務控制表.Designer.vb
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 109
- 93
MaoOrange-Hongji/財務系統管理/票務控制表.vb Parādīt failu

@@ -2,169 +2,185 @@
2 2
 Public Class 票務控制表
3 3
     ReadOnly ds As New DataSet
4 4
     Private Sub Set_票務清單()
5
-        DataGridView1.DataSource = Nothing : ds.Clear() : DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : DataGridView1.ColumnHeadersHeight = 40
6
-        DataGridView1.AllowUserToAddRows = False : DataGridView1.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : DataGridView1.MultiSelect = True
7
-        DataGridView1.RowTemplate.Height = 35
5
+        票務清單_dgv.DataSource = Nothing : ds.Clear() : 票務清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing : 票務清單_dgv.ColumnHeadersHeight = 40
6
+        票務清單_dgv.AllowUserToAddRows = False : 票務清單_dgv.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText : 票務清單_dgv.MultiSelect = True
7
+        票務清單_dgv.RowTemplate.Height = 35
8 8
         SQL_票務控制表清單()
9
-        da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
9
+        da.Fill(ds) : 票務清單_dgv.DataSource = ds.Tables(0) : conn.Close()
10 10
 
11
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).Visible = False : DataGridView1.Columns(2).FillWeight = 80 : DataGridView1.Columns(3).Visible = False
12
-        DataGridView1.Columns(4).FillWeight = 130 : DataGridView1.Columns(5).FillWeight = 60 : DataGridView1.Columns(6).FillWeight = 60 : DataGridView1.Columns(7).Visible = False
13
-        DataGridView1.Columns(8).Visible = False : DataGridView1.Columns(9).Visible = False : DataGridView1.Columns(10).FillWeight = 100 : DataGridView1.Columns(11).FillWeight = 50
14
-        DataGridView1.Columns(12).FillWeight = 85 : DataGridView1.Columns(13).FillWeight = 85 : DataGridView1.Columns(14).FillWeight = 85 : DataGridView1.Columns(15).FillWeight = 85
15
-        DataGridView1.Columns(16).FillWeight = 130 : DataGridView1.Columns(17).Visible = False : DataGridView1.Columns(18).FillWeight = 130 : DataGridView1.Columns(19).FillWeight = 80
16
-        DataGridView1.Columns(20).FillWeight = 80 : DataGridView1.Columns(21).FillWeight = 120 : DataGridView1.Columns(22).Visible = False : DataGridView1.Columns(23).Visible = False
17
-        DataGridView1.Columns(24).Visible = False
11
+        票務清單_dgv.Columns(0).Visible = False : 票務清單_dgv.Columns(1).Visible = False : 票務清單_dgv.Columns(2).FillWeight = 80 : 票務清單_dgv.Columns(3).Visible = False
12
+        票務清單_dgv.Columns(4).FillWeight = 130 : 票務清單_dgv.Columns(5).FillWeight = 60 : 票務清單_dgv.Columns(6).FillWeight = 60 : 票務清單_dgv.Columns(7).Visible = False
13
+        票務清單_dgv.Columns(8).Visible = False : 票務清單_dgv.Columns(9).Visible = False : 票務清單_dgv.Columns(10).FillWeight = 100 : 票務清單_dgv.Columns(11).FillWeight = 50
14
+        票務清單_dgv.Columns(12).FillWeight = 85 : 票務清單_dgv.Columns(13).FillWeight = 85 : 票務清單_dgv.Columns(14).FillWeight = 85 : 票務清單_dgv.Columns(15).FillWeight = 85
15
+        票務清單_dgv.Columns(16).FillWeight = 130 : 票務清單_dgv.Columns(17).Visible = False : 票務清單_dgv.Columns(18).FillWeight = 130 : 票務清單_dgv.Columns(19).FillWeight = 80
16
+        票務清單_dgv.Columns(20).FillWeight = 80 : 票務清單_dgv.Columns(21).FillWeight = 120 : 票務清單_dgv.Columns(22).Visible = False : 票務清單_dgv.Columns(23).Visible = False
17
+        票務清單_dgv.Columns(24).Visible = False
18 18
 
19
-        DataGridView1.Columns(5).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(6).DefaultCellStyle.Format = "#,##0"
20
-        DataGridView1.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
21
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
22
-        DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
23
-        DataGridView1.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
24
-        DataGridView1.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
19
+        票務清單_dgv.Columns(5).DefaultCellStyle.Format = "#,##0" : 票務清單_dgv.Columns(6).DefaultCellStyle.Format = "#,##0"
20
+        票務清單_dgv.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 票務清單_dgv.Columns(0).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
21
+        票務清單_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 票務清單_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
22
+        票務清單_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 票務清單_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
23
+        票務清單_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 票務清單_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
24
+        票務清單_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 票務清單_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
25 25
 
26
-        TextBox1.Text = DataGridView1.Rows.Count : TextBox6.Text = "0" : TextBox7.Text = "0" : TextBox8.Text = "0"
27
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
28
-            TextBox7.Text = Val(TextBox7.Text) + DataGridView1.Rows(i).Cells("開票").Value : TextBox8.Text = Val(TextBox8.Text) + DataGridView1.Rows(i).Cells("收票").Value
26
+        資料筆數_tb.Text = 票務清單_dgv.Rows.Count : 單據總和_tb.Text = "0" : 開票總和_tb.Text = "0" : 收票總和_tb.Text = "0"
27
+        For i As Integer = 0 To 票務清單_dgv.Rows.Count - 1
28
+            開票總和_tb.Text = Val(開票總和_tb.Text) + 票務清單_dgv.Rows(i).Cells("開票").Value : 收票總和_tb.Text = Val(收票總和_tb.Text) + 票務清單_dgv.Rows(i).Cells("收票").Value
29 29
         Next i
30
-        TextBox6.Text = Val(TextBox8.Text) - Val(TextBox7.Text)
31
-        If Val(TextBox6.Text) > 0 Then : TextBox6.ForeColor = Color.Blue : Else : TextBox6.ForeColor = Color.Red : End If
32
-        TextBox6.Text = Format(Val(TextBox6.Text), "#,##0") : TextBox7.Text = Format(Val(TextBox7.Text), "#,##0") : TextBox8.Text = Format(Val(TextBox8.Text), "#,##0")
30
+        單據總和_tb.Text = Val(收票總和_tb.Text) - Val(開票總和_tb.Text)
31
+        If Val(單據總和_tb.Text) > 0 Then : 單據總和_tb.ForeColor = Color.Blue : Else : 單據總和_tb.ForeColor = Color.Red : End If
32
+        單據總和_tb.Text = Format(Val(單據總和_tb.Text), "#,##0") : 開票總和_tb.Text = Format(Val(開票總和_tb.Text), "#,##0") : 收票總和_tb.Text = Format(Val(收票總和_tb.Text), "#,##0")
33 33
     End Sub
34 34
     Private Sub ComboBox1下拉表單資料載入()
35 35
         SQL_票務控制表會科區分()
36
-        ComboBox1.Items.Clear() : While (dr.Read()) : ComboBox1.Items.Add(dr("開票會科")) : End While : conn.Close() : If ComboBox1.Items.Count <> 0 Then : ComboBox1.SelectedIndex = 0 : End If
36
+        區分_cb.Items.Clear() : While (dr.Read()) : 區分_cb.Items.Add(dr("開票會科")) : End While : conn.Close() : If 區分_cb.Items.Count <> 0 Then : 區分_cb.SelectedIndex = 0 : End If
37 37
     End Sub
38 38
     Private Sub ComboBox2下拉表單資料載入()
39 39
         SQL_票務控制表票況區分()
40
-        ComboBox2.Items.Clear() : While (dr.Read()) : ComboBox2.Items.Add(dr("狀態")) : End While : conn.Close() : If ComboBox2.Items.Count <> 0 Then : ComboBox2.SelectedIndex = 0 : End If
40
+        票況_cb.Items.Clear() : While (dr.Read()) : 票況_cb.Items.Add(dr("狀態")) : End While : conn.Close() : If 票況_cb.Items.Count <> 0 Then : 票況_cb.SelectedIndex = 0 : End If
41 41
     End Sub
42 42
     Private Sub ComboBox3下拉表單資料載入()
43 43
         SQL_票務控制表兌現科目()
44
-        ComboBox3.Items.Clear() : While (dr.Read()) : ComboBox3.Items.Add(dr("兌現會科")) : End While : conn.Close()
44
+        兌現科目_cb.Items.Clear() : While (dr.Read()) : 兌現科目_cb.Items.Add(dr("兌現會科")) : End While : conn.Close()
45 45
     End Sub
46 46
     Private Sub ComboBox8下拉表單資料載入_收票()
47 47
         SQL_支票收支單_兌現科目_下拉清單三()
48
-        ComboBox8.Items.Clear() : ComboBox10.Items.Clear() : While (dr.Read()) : ComboBox8.Items.Add(dr("會計科目")) : ComboBox10.Items.Add(dr("編號")) : End While : conn.Close()
48
+        轉換科目_cb.Items.Clear() : 轉換科目編號_cb.Items.Clear() : While (dr.Read()) : 轉換科目_cb.Items.Add(dr("會計科目")) : 轉換科目編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
49 49
     End Sub
50 50
     Private Sub ComboBox8下拉表單資料載入_開票()
51 51
         SQL_支票收支單申請_兌現科目_下拉清單二()
52
-        ComboBox8.Items.Clear() : ComboBox10.Items.Clear() : While (dr.Read()) : ComboBox8.Items.Add(dr("會計科目")) : ComboBox10.Items.Add(dr("編號")) : End While : conn.Close()
52
+        轉換科目_cb.Items.Clear() : 轉換科目編號_cb.Items.Clear() : While (dr.Read()) : 轉換科目_cb.Items.Add(dr("會計科目")) : 轉換科目編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
53 53
     End Sub
54 54
     Private Sub 日期格式()
55
-        If 會計月.Checked = True Then
55
+        If 會計月_ch.Checked = True Then
56 56
             '-------------日期一----------------------------------------------------------------------------------------
57
-            DTP = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 8) & "01" : DateTimePicker1.Value = DTP
58
-            DateTimePicker1.Value = DateTimePicker1.Value.AddMonths(-1)
59
-            DTP = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 8) & "26" : DateTimePicker1.Value = DTP
57
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
58
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(-1)
59
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "26" : 開始日期_dtp.Value = DTP
60 60
             '-------------日期二----------------------------------------------------------------------------------------
61
-            DTP = Strings.Left(Strings.Format(DateTimePicker2.Value, "yyyy/MM/dd"), 8) & "25" : DateTimePicker2.Value = DTP
61
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "25" : 結束日期_dtp.Value = DTP
62 62
         Else
63 63
             '-------------日期一----------------------------------------------------------------------------------------
64
-            DateTimePicker1.Value = DateTimePicker1.Value.AddMonths(1)
65
-            DTP = Strings.Left(Strings.Format(DateTimePicker1.Value, "yyyy/MM/dd"), 8) & "01" : DateTimePicker1.Value = DTP
64
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(1)
65
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
66 66
             '-------------日期二----------------------------------------------------------------------------------------
67
-            DTP = Strings.Left(Strings.Format(DateTimePicker2.Value, "yyyy/MM/dd"), 8) & "01" : DateTimePicker2.Value = DTP
68
-            DateTimePicker2.Value = DateTimePicker2.Value.AddMonths(1) : DateTimePicker2.Value = DateTimePicker2.Value.AddDays(-1)
67
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 結束日期_dtp.Value = DTP
68
+            結束日期_dtp.Value = 結束日期_dtp.Value.AddMonths(1) : 結束日期_dtp.Value = 結束日期_dtp.Value.AddDays(-1)
69 69
         End If
70 70
     End Sub
71 71
     Private Sub 票務控制表_Load(sender As Object, e As EventArgs) Handles MyBase.Load
72 72
         Me.MdiParent = MAOJI_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
73
-        ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : DateTimePicker3.Visible = False
74
-        日期格式() : ComboBox15.SelectedIndex = 0 : Set_票務清單()
73
+        ComboBox1下拉表單資料載入() : ComboBox2下拉表單資料載入() : ComboBox3下拉表單資料載入() : 中間日期_dtp.Visible = False
74
+        日期格式() : 日期選項_cb.SelectedIndex = 0 : Set_票務清單()
75 75
     End Sub
76
-    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
76
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles 票務清單_dgv.CellClick
77 77
         If e.RowIndex = -1 Then : Else
78
-            TextBox20.Text = DataGridView1("流水號", e.RowIndex).Value.ToString : NumericUpDown1.Text = DataGridView1("收票", e.RowIndex).Value.ToString
79
-            NumericUpDown2.Text = DataGridView1("開票", e.RowIndex).Value.ToString : TextBox15.Text = DataGridView1("發票人帳號", e.RowIndex).Value.ToString
80
-            TextBox14.Text = DataGridView1("用途", e.RowIndex).Value.ToString : TextBox18.Text = DataGridView1("項次", e.RowIndex).Value.ToString
81
-            TextBox9.Text = DataGridView1("會計科目", e.RowIndex).Value.ToString : ComboBox9.Text = DataGridView1("付款銀行", e.RowIndex).Value.ToString
82
-            TextBox10.Text = DataGridView1("倉儲單號", e.RowIndex).Value.ToString : TextBox12.Text = DataGridView1("支票號碼", e.RowIndex).Value.ToString
83
-            TextBox13.Text = DataGridView1("開票人", e.RowIndex).Value.ToString : TextBox16.Text = DataGridView1("備註", e.RowIndex).Value.ToString
84
-            ComboBox8.Text = DataGridView1("兌現會科", e.RowIndex).Value.ToString
85
-            If DataGridView1("到期日", e.RowIndex).Value.ToString = "" Then : Else : DateTimePicker7.Value = DataGridView1("到期日", e.RowIndex).Value.ToString : End If
86
-            If DataGridView1("預定兌現日", e.RowIndex).Value.ToString = "" Then : Else : DateTimePicker4.Value = DataGridView1("預定兌現日", e.RowIndex).Value.ToString : End If
87
-            If DataGridView1("開收票日", e.RowIndex).Value.ToString = "" Then : Else : DateTimePicker5.Value = DataGridView1("開收票日", e.RowIndex).Value.ToString : End If
88
-            If DataGridView1("託收已付日", e.RowIndex).Value.ToString = "" Then : Else : DateTimePicker8.Value = DataGridView1("託收已付日", e.RowIndex).Value.ToString : End If
78
+            收支單號_tb.Text = 票務清單_dgv("流水號", e.RowIndex).Value.ToString : 收票金額_nud.Text = 票務清單_dgv("收票", e.RowIndex).Value.ToString
79
+            開票金額_nud.Text = 票務清單_dgv("開票", e.RowIndex).Value.ToString : 發票人帳號_tb.Text = 票務清單_dgv("發票人帳號", e.RowIndex).Value.ToString
80
+            用途_tb.Text = 票務清單_dgv("用途", e.RowIndex).Value.ToString : 項次_tb.Text = 票務清單_dgv("項次", e.RowIndex).Value.ToString
81
+            會計科目_tb.Text = 票務清單_dgv("會計科目", e.RowIndex).Value.ToString : 付款銀行_cb.Text = 票務清單_dgv("付款銀行", e.RowIndex).Value.ToString
82
+            客供編號_tb.Text = 票務清單_dgv("倉儲單號", e.RowIndex).Value.ToString : 支票號碼_tb.Text = 票務清單_dgv("支票號碼", e.RowIndex).Value.ToString
83
+            開票人_tb.Text = 票務清單_dgv("開票人", e.RowIndex).Value.ToString : 備註_tb.Text = 票務清單_dgv("備註", e.RowIndex).Value.ToString
84
+            轉換科目_cb.Text = 票務清單_dgv("兌現會科", e.RowIndex).Value.ToString
85
+            If 票務清單_dgv("到期日", e.RowIndex).Value.ToString = "" Then : Else : 到期日_dtp.Value = 票務清單_dgv("到期日", e.RowIndex).Value.ToString : End If
86
+            If 票務清單_dgv("預定兌現日", e.RowIndex).Value.ToString = "" Then : Else : 預訂兌現日_dtp.Value = 票務清單_dgv("預定兌現日", e.RowIndex).Value.ToString : End If
87
+            If 票務清單_dgv("開收票日", e.RowIndex).Value.ToString = "" Then : Else : 開收票日_dtp.Value = 票務清單_dgv("開收票日", e.RowIndex).Value.ToString : End If
88
+            If 票務清單_dgv("託收已付日", e.RowIndex).Value.ToString = "" Then : Else : 託收已付日_dtp.Value = 票務清單_dgv("託收已付日", e.RowIndex).Value.ToString : End If
89 89
             客戶供應商資料()
90 90
         End If
91 91
     End Sub
92 92
     Private Sub 客戶供應商資料()
93
-        PA = TextBox10.Text : SQL_支票收支單客戶供應商查詢()
93
+        PA = 客供編號_tb.Text : SQL_支票收支單客戶供應商查詢()
94 94
         If (dr.Read()) Then
95
-            If ComboBox2.Text = "開票" Then
96
-                TextBox11.Text = dr("供應商") : conn.Close()
95
+            If 票況_cb.Text = "開票" Then
96
+                客供名稱_tb.Text = dr("供應商") : conn.Close()
97 97
             Else
98
-                TextBox11.Text = dr("客戶編號")
99
-                If TextBox11.Text = "CI00000000" Then
98
+                客供名稱_tb.Text = dr("客戶編號")
99
+                If 客供名稱_tb.Text = "CI00000000" Then
100 100
                     conn.Close()
101 101
                     SQL_支票收支單申請_客戶資料_零售()
102 102
                     If (dr.Read()) Then
103
-                        TextBox11.Text = dr("客戶名稱") : conn.Close()
103
+                        客供名稱_tb.Text = dr("客戶名稱") : conn.Close()
104 104
                     End If
105 105
                 Else
106
-                    TextBox11.Text = dr("客戶") : conn.Close()
106
+                    客供名稱_tb.Text = dr("客戶") : conn.Close()
107 107
                 End If
108 108
             End If
109 109
         Else
110
-            TextBox11.Text = ""
110
+            客供名稱_tb.Text = ""
111 111
         End If
112 112
     End Sub
113
-    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
114
-        If 會計月.Checked = True Then
115
-            DateTimePicker3.Value = DateTimePicker3.Value.AddMonths(-1)
116
-            DateTimePicker1.Value = DateTimePicker3.Value
117
-            DateTimePicker2.Value = DateTimePicker3.Value
113
+    Private Sub 上個月_Click(sender As Object, e As EventArgs) Handles 上個月_bu.Click
114
+        If 會計月_ch.Checked = True Then
115
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
116
+            開始日期_dtp.Value = 中間日期_dtp.Value
117
+            結束日期_dtp.Value = 中間日期_dtp.Value
118 118
         Else
119
-            DateTimePicker3.Value = DateTimePicker3.Value.AddMonths(-1)
120
-            DateTimePicker1.Value = DateTimePicker3.Value.AddMonths(-1)
121
-            DateTimePicker2.Value = DateTimePicker3.Value
119
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
120
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
121
+            結束日期_dtp.Value = 中間日期_dtp.Value
122 122
         End If
123 123
         日期格式() : Set_票務清單()
124 124
     End Sub
125
-    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
126
-        If 會計月.Checked = True Then
127
-            DateTimePicker3.Value = DateTimePicker3.Value.AddMonths(1)
128
-            DateTimePicker1.Value = DateTimePicker3.Value
129
-            DateTimePicker2.Value = DateTimePicker3.Value
125
+    Private Sub 下個月_Click(sender As Object, e As EventArgs) Handles 下個月_bu.Click
126
+        If 會計月_ch.Checked = True Then
127
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
128
+            開始日期_dtp.Value = 中間日期_dtp.Value
129
+            結束日期_dtp.Value = 中間日期_dtp.Value
130 130
         Else
131
-            DateTimePicker3.Value = DateTimePicker3.Value.AddMonths(1)
132
-            DateTimePicker1.Value = DateTimePicker3.Value.AddMonths(-1)
133
-            DateTimePicker2.Value = DateTimePicker3.Value
131
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
132
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
133
+            結束日期_dtp.Value = 中間日期_dtp.Value
134 134
         End If
135 135
         日期格式() : Set_票務清單()
136 136
     End Sub
137
-    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月.Click
138
-        會計月.Checked = True : 一般月.Checked = False : 日期格式() : Set_票務清單()
137
+    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月_ch.Click
138
+        會計月_ch.Checked = True : 一般月_ch.Checked = False : 日期格式() : Set_票務清單()
139 139
     End Sub
140
-    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月.Click
141
-        會計月.Checked = False : 一般月.Checked = True : 日期格式() : Set_票務清單()
140
+    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月_ch.Click
141
+        會計月_ch.Checked = False : 一般月_ch.Checked = True : 日期格式() : Set_票務清單()
142 142
     End Sub
143
-    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
144
-        If ComboBox2.Text = "開票" Then
145
-            Button5.Enabled = True : Button4.Enabled = False : Button6.Enabled = True : ComboBox8下拉表單資料載入_開票()
146
-        ElseIf ComboBox2.Text = "收票" Then
147
-            Button5.Enabled = False : Button4.Enabled = True : Button6.Enabled = True : ComboBox8下拉表單資料載入_收票()
143
+    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 票況_cb.SelectedIndexChanged
144
+        If 票況_cb.Text = "開票" Then
145
+            已付_bu.Enabled = True : 託收_bu.Enabled = False : 退票_撤票_bu.Enabled = True : ComboBox8下拉表單資料載入_開票()
146
+        ElseIf 票況_cb.Text = "收票" Then
147
+            已付_bu.Enabled = False : 託收_bu.Enabled = True : 退票_撤票_bu.Enabled = True : ComboBox8下拉表單資料載入_收票()
148 148
         Else
149
-            Button5.Enabled = False : Button4.Enabled = False : Button6.Enabled = False : ComboBox8.Items.Clear() : ComboBox10.Items.Clear()
149
+            已付_bu.Enabled = False : 託收_bu.Enabled = False : 退票_撤票_bu.Enabled = False : 轉換科目_cb.Items.Clear() : 轉換科目編號_cb.Items.Clear()
150 150
         End If
151 151
     End Sub
152
-    Private Sub ComboBox15_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox15.SelectedIndexChanged
152
+    Private Sub ComboBox15_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 日期選項_cb.SelectedIndexChanged
153 153
         Set_票務清單()
154 154
     End Sub
155
-    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
155
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 讀取_bu.Click
156 156
         Set_票務清單()
157 157
     End Sub
158
-    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
158
+    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles 清除_bu.Click
159 159
         ComboBox3下拉表單資料載入() : Set_票務清單()
160 160
     End Sub
161
-    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.SelectedIndexChanged
161
+    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 兌現科目_cb.SelectedIndexChanged
162 162
         Set_票務清單()
163 163
     End Sub
164
-    Private Sub ComboBox8_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox8.SelectedIndexChanged
165
-        ComboBox10.SelectedIndex = ComboBox8.SelectedIndex
164
+    Private Sub ComboBox8_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 轉換科目_cb.SelectedIndexChanged
165
+        轉換科目編號_cb.SelectedIndex = 轉換科目_cb.SelectedIndex
166 166
     End Sub
167
-    Private Sub ComboBox10_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox10.SelectedIndexChanged
168
-        ComboBox8.SelectedIndex = ComboBox10.SelectedIndex
167
+    Private Sub ComboBox10_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 轉換科目編號_cb.SelectedIndexChanged
168
+        轉換科目_cb.SelectedIndex = 轉換科目編號_cb.SelectedIndex
169
+    End Sub
170
+
171
+    Private Sub 託收_Click(sender As Object, e As EventArgs) Handles 託收_bu.Click
172
+
173
+    End Sub
174
+
175
+    Private Sub 已付_Click(sender As Object, e As EventArgs) Handles 已付_bu.Click
176
+
177
+    End Sub
178
+
179
+    Private Sub 退票_撤票_Click(sender As Object, e As EventArgs) Handles 退票_撤票_bu.Click
180
+
181
+    End Sub
182
+
183
+    Private Sub 退票_撤票取消_Click(sender As Object, e As EventArgs) Handles 退票_撤票取消_bu.Click
184
+
169 185
     End Sub
170 186
 End Class

+ 442
- 442
MaoOrange-Hongji/財務系統管理/財務單具申請.Designer.vb
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 206
- 178
MaoOrange-Hongji/財務系統管理/財務單具申請.vb Parādīt failu

@@ -3,277 +3,305 @@ Public Class 財務單具申請
3 3
     ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet
4 4
     Dim 新項次 As String : Dim NUM1 As Integer
5 5
     Private Sub Set_清單1()
6
-        DataGridView2.DataSource = Nothing : ds1.Clear()
7
-        DataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
-        DataGridView2.ColumnHeadersHeight = 25
9
-        DataGridView2.AllowUserToAddRows = False
6
+        倉儲明細表資料流水號_dgv.DataSource = Nothing : ds1.Clear()
7
+        倉儲明細表資料流水號_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
+        倉儲明細表資料流水號_dgv.ColumnHeadersHeight = 25
9
+        倉儲明細表資料流水號_dgv.AllowUserToAddRows = False
10 10
         SQL_應收應付單號連接暫存檔讀取()
11
-        da.Fill(ds1) : DataGridView2.DataSource = ds1.Tables(0) : conn.Close()
12
-
13
-        DataGridView2.Columns(0).FillWeight = 145
11
+        da.Fill(ds1) : 倉儲明細表資料流水號_dgv.DataSource = ds1.Tables(0) : conn.Close()
12
+        倉儲明細表資料流水號_dgv.Columns(0).FillWeight = 145
14 13
     End Sub
15 14
     Private Sub Set_費用清單()
16
-        DataGridView1.DataSource = Nothing : ds.Clear()
17
-        DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
18
-        DataGridView1.ColumnHeadersHeight = 40
19
-        DataGridView1.AllowUserToAddRows = False
20
-        DataGridView1.RowTemplate.Height = 35
15
+        單據清單_dgv.DataSource = Nothing : ds.Clear()
16
+        單據清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
17
+        單據清單_dgv.ColumnHeadersHeight = 40
18
+        單據清單_dgv.AllowUserToAddRows = False
19
+        單據清單_dgv.RowTemplate.Height = 35
21 20
         SQL_財務單具申請費用清單()
22
-        da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
21
+        da.Fill(ds) : 單據清單_dgv.DataSource = ds.Tables(0) : conn.Close()
23 22
 
24
-        DataGridView1.Columns(0).Visible = False : DataGridView1.Columns(1).FillWeight = 80 : DataGridView1.Columns(2).FillWeight = 140 : DataGridView1.Columns(3).FillWeight = 300
25
-        DataGridView1.Columns(4).FillWeight = 120 : DataGridView1.Columns(5).FillWeight = 120 : DataGridView1.Columns(6).FillWeight = 120 : DataGridView1.Columns(7).FillWeight = 120
26
-        DataGridView1.Columns(8).FillWeight = 200 : DataGridView1.Columns(9).Visible = False : DataGridView1.Columns(10).FillWeight = 110 : DataGridView1.Columns(11).Visible = False
27
-        DataGridView1.Columns(12).FillWeight = 200 : DataGridView1.Columns(13).FillWeight = 150 : DataGridView1.Columns(14).FillWeight = 150 : DataGridView1.Columns(15).FillWeight = 150
28
-        DataGridView1.Columns(16).Visible = False : DataGridView1.Columns(17).Visible = False : DataGridView1.Columns(18).Visible = False : DataGridView1.Columns(19).Visible = False
29
-        DataGridView1.Columns(20).FillWeight = 100 : DataGridView1.Columns(21).Visible = False
23
+        單據清單_dgv.Columns(0).Visible = False : 單據清單_dgv.Columns(1).FillWeight = 80 : 單據清單_dgv.Columns(2).FillWeight = 140 : 單據清單_dgv.Columns(3).FillWeight = 300
24
+        單據清單_dgv.Columns(4).FillWeight = 120 : 單據清單_dgv.Columns(5).FillWeight = 120 : 單據清單_dgv.Columns(6).FillWeight = 120 : 單據清單_dgv.Columns(7).FillWeight = 120
25
+        單據清單_dgv.Columns(8).FillWeight = 200 : 單據清單_dgv.Columns(9).Visible = False : 單據清單_dgv.Columns(10).FillWeight = 110 : 單據清單_dgv.Columns(11).Visible = False
26
+        單據清單_dgv.Columns(12).FillWeight = 200 : 單據清單_dgv.Columns(13).FillWeight = 150 : 單據清單_dgv.Columns(14).FillWeight = 150 : 單據清單_dgv.Columns(15).FillWeight = 150
27
+        單據清單_dgv.Columns(16).Visible = False : 單據清單_dgv.Columns(17).Visible = False : 單據清單_dgv.Columns(18).Visible = False : 單據清單_dgv.Columns(19).Visible = False
28
+        單據清單_dgv.Columns(20).FillWeight = 100 : 單據清單_dgv.Columns(21).Visible = False
30 29
 
31
-        DataGridView1.Columns(1).ReadOnly = True : DataGridView1.Columns(2).ReadOnly = True : DataGridView1.Columns(10).ReadOnly = True : DataGridView1.Columns(20).ReadOnly = True
30
+        單據清單_dgv.Columns(1).ReadOnly = True : 單據清單_dgv.Columns(2).ReadOnly = True : 單據清單_dgv.Columns(10).ReadOnly = True : 單據清單_dgv.Columns(20).ReadOnly = True
32 31
 
33
-        DataGridView1.Columns(4).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(5).DefaultCellStyle.Format = "#,##0" : DataGridView1.Columns(6).DefaultCellStyle.Format = "#,##0"
34
-        DataGridView1.Columns(7).DefaultCellStyle.Format = "#,##0"
35
-        DataGridView1.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
36
-        DataGridView1.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
37
-        DataGridView1.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
38
-        DataGridView1.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
39
-        DataGridView1.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
40
-        DataGridView1.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : DataGridView1.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
41
-        DataGridView1.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
42
-        DataGridView1.Columns(12).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(12).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
43
-        DataGridView1.Columns(13).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(13).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
44
-        DataGridView1.Columns(14).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(14).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
45
-        DataGridView1.Columns(15).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(15).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
46
-        DataGridView1.Columns(20).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : DataGridView1.Columns(20).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
32
+        單據清單_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 單據清單_dgv.Columns(5).DefaultCellStyle.Format = "#,##0" : 單據清單_dgv.Columns(6).DefaultCellStyle.Format = "#,##0"
33
+        單據清單_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
34
+        單據清單_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
35
+        單據清單_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
36
+        單據清單_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 單據清單_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
37
+        單據清單_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 單據清單_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
38
+        單據清單_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 單據清單_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
39
+        單據清單_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 單據清單_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
40
+        單據清單_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
41
+        單據清單_dgv.Columns(12).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(12).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
42
+        單據清單_dgv.Columns(13).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(13).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
43
+        單據清單_dgv.Columns(14).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(14).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
44
+        單據清單_dgv.Columns(15).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(15).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
45
+        單據清單_dgv.Columns(20).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 單據清單_dgv.Columns(20).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
47 46
 
48
-        DataGridView1.EditMode = DataGridViewEditMode.EditOnEnter
47
+        單據清單_dgv.EditMode = DataGridViewEditMode.EditOnEnter
49 48
 
50
-        NumericUpDown1.Value = 0 : NumericUpDown2.Value = 0
51
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
49
+        支票加總_nud.Value = 0 : 現金加總_nud.Value = 0
50
+        For i As Integer = 0 To 單據清單_dgv.Rows.Count - 1
52 51
             If 財務單申請狀態 = "應付" Then
53
-                DataGridView1.Columns(5).ReadOnly = True : DataGridView1.Columns(7).ReadOnly = True
54
-                If DataGridView1.Rows(i).Cells("開票").Value < 0 Then : Else : NumericUpDown1.Value = NumericUpDown1.Value + DataGridView1.Rows(i).Cells("開票").Value : End If
55
-                If DataGridView1.Rows(i).Cells("支出").Value < 0 Then : Else : NumericUpDown2.Value = NumericUpDown2.Value + DataGridView1.Rows(i).Cells("支出").Value : End If
52
+                單據清單_dgv.Columns(5).ReadOnly = True : 單據清單_dgv.Columns(7).ReadOnly = True
53
+                單據清單_dgv.Columns(4).ReadOnly = False : 單據清單_dgv.Columns(6).ReadOnly = False
54
+                If 單據清單_dgv.Rows(i).Cells("開票").Value < 0 Then : Else : 支票加總_nud.Value = 支票加總_nud.Value + 單據清單_dgv.Rows(i).Cells("開票").Value : End If
55
+                If 單據清單_dgv.Rows(i).Cells("支出").Value < 0 Then : Else : 現金加總_nud.Value = 現金加總_nud.Value + 單據清單_dgv.Rows(i).Cells("支出").Value : End If
56 56
             ElseIf 財務單申請狀態 = "應收" Then
57
-                DataGridView1.Columns(4).ReadOnly = True : DataGridView1.Columns(6).ReadOnly = True
58
-                If DataGridView1.Rows(i).Cells("收票").Value < 0 Then : Else : NumericUpDown1.Value = NumericUpDown1.Value + DataGridView1.Rows(i).Cells("收票").Value : End If
59
-                If DataGridView1.Rows(i).Cells("現金").Value < 0 Then : Else : NumericUpDown2.Value = NumericUpDown2.Value + DataGridView1.Rows(i).Cells("現金").Value : End If
57
+                單據清單_dgv.Columns(4).ReadOnly = True : 單據清單_dgv.Columns(6).ReadOnly = True
58
+                單據清單_dgv.Columns(5).ReadOnly = False : 單據清單_dgv.Columns(7).ReadOnly = False
59
+                If 單據清單_dgv.Rows(i).Cells("收票").Value < 0 Then : Else : 支票加總_nud.Value = 支票加總_nud.Value + 單據清單_dgv.Rows(i).Cells("收票").Value : End If
60
+                If 單據清單_dgv.Rows(i).Cells("現金").Value < 0 Then : Else : 現金加總_nud.Value = 現金加總_nud.Value + 單據清單_dgv.Rows(i).Cells("現金").Value : End If
60 61
             End If
61 62
         Next i
62
-        NumericUpDown4.Value = NumericUpDown3.Value - NumericUpDown2.Value - NumericUpDown1.Value
63
+        未沖金額_nud.Value = 應沖金額_nud.Value - 現金加總_nud.Value - 支票加總_nud.Value
63 64
     End Sub
64
-
65 65
     Private Sub ComboBox1下拉表單資料載入()
66
-        PA = ComboBox4.Text
67
-        If ComboBox7.Text = "付現" Then : SQL_會計科目_第三階_應付_不含流動票務()
68
-        ElseIf ComboBox7.Text = "開票" Then : SQL_會計科目_第三階_應付_只含流動票務() : End If
69
-        ComboBox1.Items.Clear() : ComboBox6.Items.Clear() : While (dr.Read()) : ComboBox1.Items.Add(dr("會計科目")) : ComboBox6.Items.Add(dr("編號")) : End While : conn.Close()
70
-        If ComboBox1.Items.Count <> 0 Then : ComboBox1.SelectedIndex = 0 : End If
66
+        PA = 會科第二層編號_cb.Text
67
+        If 狀態_cb.Text = "付現" Then : SQL_會計科目_第三階_應付_不含流動票務()
68
+        ElseIf 狀態_cb.Text = "開票" Then : SQL_會計科目_第三階_應付_只含流動票務()
69
+        ElseIf 狀態_cb.Text = "收現" Then : SQL_會計科目_第三階_應收_不含流動票務()
70
+        ElseIf 狀態_cb.Text = "收票" Then : SQL_會計科目_第三階_應收_只含流動票務() : End If
71
+        會計科目_cb.Items.Clear() : 會計科目編號_cb.Items.Clear()
72
+        While (dr.Read()) : 會計科目_cb.Items.Add(dr("會計科目")) : 會計科目編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
73
+        If 會計科目_cb.Items.Count <> 0 Then : 會計科目_cb.SelectedIndex = 0 : End If
71 74
     End Sub
72 75
     Private Sub ComboBox2下拉表單資料載入()
73
-        If ComboBox7.Text = "付現" Then : SQL_會計科目_第一階_應付_不含流動票務()
74
-        ElseIf ComboBox7.Text = "開票" Then : SQL_會計科目_第一階_應付_只含流動票務() : End If
75
-        ComboBox5.Items.Clear() : ComboBox2.Items.Clear() : While (dr.Read()) : ComboBox5.Items.Add(dr("第一階")) : ComboBox2.Items.Add(dr("編號")) : End While : conn.Close()
76
+        If 狀態_cb.Text = "付現" Then : SQL_會計科目_第一階_應付_不含流動票務()
77
+        ElseIf 狀態_cb.Text = "開票" Then : SQL_會計科目_第一階_應付_只含流動票務()
78
+        ElseIf 狀態_cb.Text = "收現" Then : SQL_會計科目_第一階_應收_不含流動票務()
79
+        ElseIf 狀態_cb.Text = "收票" Then : SQL_會計科目_第一階_應收_只含流動票務() : End If
80
+        會科第一層_cb.Items.Clear() : 會科第一層編號_cb.Items.Clear()
81
+        While (dr.Read()) : 會科第一層_cb.Items.Add(dr("第一階")) : 會科第一層編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
76 82
     End Sub
77 83
     Private Sub ComboBox3下拉表單資料載入()
78
-        PA = ComboBox2.Text
79
-        If ComboBox7.Text = "付現" Then : SQL_會計科目_第二階_應付_不含流動票務()
80
-        ElseIf ComboBox7.Text = "開票" Then : SQL_會計科目_第二階_應付_只含流動票務() : End If
81
-        ComboBox3.Items.Clear() : ComboBox4.Items.Clear() : While (dr.Read()) : ComboBox3.Items.Add(dr("第二階")) : ComboBox4.Items.Add(dr("編號")) : End While : conn.Close() : PA = ""
84
+        PA = 會科第一層編號_cb.Text
85
+        If 狀態_cb.Text = "付現" Then : SQL_會計科目_第二階_應付_不含流動票務()
86
+        ElseIf 狀態_cb.Text = "開票" Then : SQL_會計科目_第二階_應付_只含流動票務()
87
+        ElseIf 狀態_cb.Text = "收現" Then : SQL_會計科目_第二階_應收_不含流動票務()
88
+        ElseIf 狀態_cb.Text = "收票" Then : SQL_會計科目_第二階_應收_只含流動票務() : End If
89
+        會科第二層_cb.Items.Clear() : 會科第二層編號_cb.Items.Clear()
90
+        While (dr.Read()) : 會科第二層_cb.Items.Add(dr("第二階")) : 會科第二層編號_cb.Items.Add(dr("編號")) : End While : conn.Close() : PA = ""
82 91
     End Sub
83 92
     Private Sub ComboBox8下拉表單資料載入()
84 93
         SQL_支票收支單申請_兌現科目_下拉清單二()
85
-        ComboBox8.Items.Clear() : ComboBox10.Items.Clear() : While (dr.Read()) : ComboBox8.Items.Add(dr("會計科目")) : ComboBox10.Items.Add(dr("編號")) : End While : conn.Close()
94
+        兌現科目_cb.Items.Clear() : 兌現科目編號_cb.Items.Clear()
95
+        While (dr.Read()) : 兌現科目_cb.Items.Add(dr("會計科目")) : 兌現科目編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
86 96
     End Sub
87 97
     Private Sub ComboBox9下拉表單資料載入_開票()
88 98
         SQL_支票收支單申請_兌現科目_下拉清單一()
89
-        ComboBox9.Items.Clear() : While (dr.Read()) : ComboBox9.Items.Add(dr("會計科目")) : End While : conn.Close()
99
+        付款銀行_cb.Items.Clear() : While (dr.Read()) : 付款銀行_cb.Items.Add(dr("會計科目")) : End While : conn.Close()
90 100
     End Sub
91 101
     Private Sub 開立營運成本收支單_單號生成()
92 102
         Dim NUM1 As Integer
93 103
         For i As Integer = 1 To 999
94 104
             NUM1 = 0 + i
95
-            If NUM1 < 10 Then : TextBox1.Text = "OE-" & DTP1 & "-00" & NUM1
96
-            ElseIf NUM1 > 9 And NUM1 < 100 Then : TextBox1.Text = "OE-" & DTP1 & "-0" & NUM1
97
-            ElseIf NUM1 > 99 Then : TextBox1.Text = "OE-" & DTP1 & "-" & NUM1 : End If : PA = TextBox1.Text
105
+            If NUM1 < 10 Then : 收支單號_tb.Text = "OE-" & DTP1 & "-00" & NUM1
106
+            ElseIf NUM1 > 9 And NUM1 < 100 Then : 收支單號_tb.Text = "OE-" & DTP1 & "-0" & NUM1
107
+            ElseIf NUM1 > 99 Then : 收支單號_tb.Text = "OE-" & DTP1 & "-" & NUM1 : End If : PA = 收支單號_tb.Text
98 108
             SQL_營運成本收支單申請_支付單號流水號()
99 109
             If dr.Read() Then : Else : i = 999 : conn.Close() : End If : conn.Close()
100 110
         Next
101 111
     End Sub
102 112
     Private Sub 財務單具申請_Load(sender As Object, e As EventArgs) Handles MyBase.Load
103 113
         conn.Close() : Set_清單1()
104
-        TextBox1.Enabled = False : DateTimePicker1.Enabled = False : TextBox3.Enabled = False : NumericUpDown3.Enabled = False : NumericUpDown4.Enabled = False
105
-        NumericUpDown1.Enabled = False : NumericUpDown2.Enabled = False
106
-        ComboBox6.Visible = False : ComboBox10.Visible = False : DataGridView2.Visible = False : DateTimePicker2.Visible = False
107
-        NumericUpDown3.Value = 收付應沖金額 : TextBox3.Text = gUserName : DateTimePicker1.Value = DTP
108
-        If 財務單申請狀態 = "應付" Then : ComboBox7.Items.Clear() : ComboBox7.Items.Add("付現") : ComboBox7.Items.Add("開票") : ComboBox7.SelectedIndex = 0
109
-        ElseIf 財務單申請狀態 = "應收" Then : ComboBox7.Items.Clear() : ComboBox7.Items.Add("收現") : ComboBox7.Items.Add("收票") : ComboBox7.SelectedIndex = 0 : End If
114
+        收支單號_tb.Enabled = False : 單據日期_dtp.Enabled = False : 登錄人_tb.Enabled = False : 應沖金額_nud.Enabled = False : 未沖金額_nud.Enabled = False
115
+        支票加總_nud.Enabled = False : 現金加總_nud.Enabled = False
116
+        會計科目編號_cb.Visible = False : 兌現科目編號_cb.Visible = False : 倉儲明細表資料流水號_dgv.Visible = False : DateTimePicker2.Visible = False
117
+        應沖金額_nud.Value = 收付應沖金額 : 登錄人_tb.Text = gUserName : 單據日期_dtp.Value = DTP
118
+        If 財務單申請狀態 = "應付" Then : 狀態_cb.Items.Clear() : 狀態_cb.Items.Add("付現") : 狀態_cb.Items.Add("開票") : 狀態_cb.SelectedIndex = 0
119
+        ElseIf 財務單申請狀態 = "應收" Then : 狀態_cb.Items.Clear() : 狀態_cb.Items.Add("收現") : 狀態_cb.Items.Add("收票") : 狀態_cb.SelectedIndex = 0 : End If
110 120
 
111 121
         ComboBox2下拉表單資料載入() : ComboBox8下拉表單資料載入() : ComboBox9下拉表單資料載入_開票()
112 122
 
113 123
         If 收付對應財務單號 = "" Then : 開立營運成本收支單_單號生成()
114
-        ElseIf 收付對應財務單號 <> "" Then : TextBox1.Text = 收付對應財務單號 : End If
124
+        ElseIf 收付對應財務單號 <> "" Then : 收支單號_tb.Text = 收付對應財務單號 : End If
115 125
         Set_費用清單()
116 126
         PA = 收付對應客戶供應商編號
117 127
         SQL_支票收支單客戶供應商查詢()
118 128
         If dr.Read() Then
119
-            TextBox11.Text = dr("供應商")
120
-        End If
129
+            If Strings.Left(PA, 1) = "F" Then
130
+                客供名稱_tb.Text = dr("供應商")
131
+            Else
132
+                客供名稱_tb.Text = dr("客戶")
133
+            End If
134
+        End If : conn.Close()
121 135
     End Sub
122 136
     Private Sub 財務單具申請_Closed(sender As Object, e As EventArgs) Handles MyBase.Closed
123
-        SQL_應收應付單號連接暫存檔刪除()
137
+        SQL_應收應付單號連接暫存檔刪除() : conn.Close()
124 138
     End Sub
125
-    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
139
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 單據清單_dgv.CellClick
126 140
         If e.RowIndex = -1 Then : Else
127 141
             ComboBox8下拉表單資料載入()
128
-            TextBox15.Text = DataGridView1.Rows(e.RowIndex).Cells("發票人帳號").Value.ToString : TextBox13.Text = DataGridView1.Rows(e.RowIndex).Cells("開票人").Value.ToString
129
-            TextBox12.Text = DataGridView1.Rows(e.RowIndex).Cells("支票號碼").Value.ToString : ComboBox9.Text = DataGridView1.Rows(e.RowIndex).Cells("付款銀行").Value.ToString
130
-            ComboBox10.Text = DataGridView1.Rows(e.RowIndex).Cells("兌現科目").Value.ToString : ComboBox7.Text = DataGridView1.Rows(e.RowIndex).Cells("狀態").Value.ToString
131
-            TextBox16.Text = DataGridView1.Rows(e.RowIndex).Cells("備註").Value.ToString : TextBox3.Text = DataGridView1.Rows(e.RowIndex).Cells("登錄人").Value.ToString
132
-            TextBox14.Text = DataGridView1.Rows(e.RowIndex).Cells("用途").Value.ToString : TextBox4.Text = DataGridView1.Rows(e.RowIndex).Cells("項次").Value.ToString
133
-            TextBox9.Text = DataGridView1.Rows(e.RowIndex).Cells("會計科目").Value.ToString : ComboBox1.Text = DataGridView1.Rows(e.RowIndex).Cells("會計科目").Value.ToString
142
+            發票人帳號_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("發票人帳號").Value.ToString : 開票人_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("開票人").Value.ToString
143
+            支票號碼_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("支票號碼").Value.ToString : 付款銀行_cb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("付款銀行").Value.ToString
144
+            兌現科目編號_cb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("兌現科目").Value.ToString : 狀態_cb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("狀態").Value.ToString
145
+            備註_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("備註").Value.ToString : 登錄人_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("登錄人").Value.ToString
146
+            用途_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("用途").Value.ToString : 項次_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("項次").Value.ToString
147
+            會科關鍵字_tb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("會計科目").Value.ToString : 會計科目_cb.Text = 單據清單_dgv.Rows(e.RowIndex).Cells("會計科目").Value.ToString
134 148
 
135
-            If DataGridView1("到期日", 0).Value.ToString = "" Then : Else : DateTimePicker3.Value = DataGridView1("到期日", 0).Value.ToString : End If
136
-            If DataGridView1("預定兌現日", 0).Value.ToString = "" Then : Else : DateTimePicker4.Value = DataGridView1("預定兌現日", 0).Value.ToString : End If
137
-            If DataGridView1("開收票日", 0).Value.ToString = "" Then : Else : DateTimePicker5.Value = DataGridView1("開收票日", 0).Value.ToString : End If
149
+            If 單據清單_dgv("到期日", 0).Value.ToString = "" Then : Else : 到期日_dtp.Value = 單據清單_dgv("到期日", 0).Value.ToString : End If
150
+            If 單據清單_dgv("預定兌現日", 0).Value.ToString = "" Then : Else : 預定兌現日_dtp.Value = 單據清單_dgv("預定兌現日", 0).Value.ToString : End If
151
+            If 單據清單_dgv("開收票日", 0).Value.ToString = "" Then : Else : 開收票日_dtp.Value = 單據清單_dgv("開收票日", 0).Value.ToString : End If
138 152
 
139 153
             If 財務單申請狀態 = "應付" Then
140
-                NumericUpDown5.Value = DataGridView1.Rows(e.RowIndex).Cells("支出").Value
141
-                NumericUpDown6.Value = DataGridView1.Rows(e.RowIndex).Cells("開票").Value
154
+                現金_nud.Value = 單據清單_dgv.Rows(e.RowIndex).Cells("支出").Value : 支票_nud.Value = 單據清單_dgv.Rows(e.RowIndex).Cells("開票").Value
142 155
             ElseIf 財務單申請狀態 = "應收" Then
143
-                NumericUpDown5.Value = DataGridView1.Rows(e.RowIndex).Cells("現金").Value
144
-                NumericUpDown6.Value = DataGridView1.Rows(e.RowIndex).Cells("收票").Value
156
+                現金_nud.Value = 單據清單_dgv.Rows(e.RowIndex).Cells("現金").Value : 支票_nud.Value = 單據清單_dgv.Rows(e.RowIndex).Cells("收票").Value
145 157
             End If
146 158
         End If
147 159
     End Sub
148
-    Private Sub DataGridView1_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
160
+    Private Sub DataGridView1_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 單據清單_dgv.CellEndEdit
149 161
         Dim EU1 As String : Dim EU2 As String : Dim EU3 As String
150
-        EU1 = DataGridView1("到期日", e.RowIndex).Value.ToString : EU2 = DataGridView1("預定兌現日", e.RowIndex).Value.ToString : EU3 = DataGridView1("開收票日", e.RowIndex).Value.ToString
151
-        If EU1 = "" Then : Else : DateTimePicker3.Value = EU1 : DataGridView1.Rows(e.RowIndex).Cells("到期日").Value = Format(DateTimePicker3.Value, "yyyy/MM/dd") : End If
152
-        If EU2 = "" Then : Else : DateTimePicker4.Value = EU2 : DataGridView1.Rows(e.RowIndex).Cells("預定兌現日").Value = Format(DateTimePicker4.Value, "yyyy/MM/dd") : End If
153
-        If EU3 = "" Then : Else : DateTimePicker5.Value = EU3 : DataGridView1.Rows(e.RowIndex).Cells("開收票日").Value = Format(DateTimePicker5.Value, "yyyy/MM/dd") : End If
162
+        EU1 = 單據清單_dgv("到期日", e.RowIndex).Value.ToString : EU2 = 單據清單_dgv("預定兌現日", e.RowIndex).Value.ToString : EU3 = 單據清單_dgv("開收票日", e.RowIndex).Value.ToString
163
+        If EU1 = "" Then : Else : 到期日_dtp.Value = EU1 : 單據清單_dgv.Rows(e.RowIndex).Cells("到期日").Value = Format(到期日_dtp.Value, "yyyy/MM/dd") : End If
164
+        If EU2 = "" Then : Else : 預定兌現日_dtp.Value = EU2 : 單據清單_dgv.Rows(e.RowIndex).Cells("預定兌現日").Value = Format(預定兌現日_dtp.Value, "yyyy/MM/dd") : End If
165
+        If EU3 = "" Then : Else : 開收票日_dtp.Value = EU3 : 單據清單_dgv.Rows(e.RowIndex).Cells("開收票日").Value = Format(開收票日_dtp.Value, "yyyy/MM/dd") : End If
154 166
     End Sub
155
-    Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox5.TextChanged
156
-        ComboBox2.SelectedIndex = ComboBox5.SelectedIndex : TextBox9.Text = "" : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
167
+    Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 會科第一層_cb.TextChanged
168
+        會科第一層編號_cb.SelectedIndex = 會科第一層_cb.SelectedIndex : 會科關鍵字_tb.Text = "" : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
157 169
     End Sub
158
-    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.TextChanged
159
-        ComboBox5.SelectedIndex = ComboBox2.SelectedIndex : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
170
+    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 會科第一層編號_cb.TextChanged
171
+        會科第一層_cb.SelectedIndex = 會科第一層編號_cb.SelectedIndex : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
160 172
     End Sub
161
-    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.TextChanged
162
-        ComboBox4.SelectedIndex = ComboBox3.SelectedIndex : ComboBox1下拉表單資料載入()
173
+    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 會科第二層_cb.TextChanged
174
+        會科第二層編號_cb.SelectedIndex = 會科第二層_cb.SelectedIndex : ComboBox1下拉表單資料載入()
163 175
     End Sub
164
-    Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.TextChanged
165
-        ComboBox3.SelectedIndex = ComboBox4.SelectedIndex : ComboBox1下拉表單資料載入()
176
+    Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 會科第二層編號_cb.TextChanged
177
+        會科第二層_cb.SelectedIndex = 會科第二層編號_cb.SelectedIndex : ComboBox1下拉表單資料載入()
166 178
     End Sub
167
-    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
168
-        ComboBox6.SelectedIndex = ComboBox1.SelectedIndex
179
+    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 會計科目_cb.SelectedIndexChanged
180
+        會計科目編號_cb.SelectedIndex = 會計科目_cb.SelectedIndex
169 181
     End Sub
170
-    Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged
171
-        ComboBox1.SelectedIndex = ComboBox6.SelectedIndex
182
+    Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 會計科目編號_cb.SelectedIndexChanged
183
+        會計科目_cb.SelectedIndex = 會計科目編號_cb.SelectedIndex
172 184
     End Sub
173
-    Private Sub ComboBox8_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox8.SelectedIndexChanged
174
-        ComboBox10.SelectedIndex = ComboBox8.SelectedIndex
185
+    Private Sub ComboBox8_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 兌現科目_cb.SelectedIndexChanged
186
+        兌現科目編號_cb.SelectedIndex = 兌現科目_cb.SelectedIndex
175 187
     End Sub
176
-    Private Sub ComboBox10_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox10.SelectedIndexChanged
177
-        ComboBox8.SelectedIndex = ComboBox10.SelectedIndex
188
+    Private Sub ComboBox10_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 兌現科目編號_cb.SelectedIndexChanged
189
+        兌現科目_cb.SelectedIndex = 兌現科目編號_cb.SelectedIndex
178 190
     End Sub
179
-    Private Sub ComboBox7_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox7.SelectedIndexChanged
191
+    Private Sub ComboBox7_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 狀態_cb.SelectedIndexChanged
180 192
         ComboBox2下拉表單資料載入()
181
-        If ComboBox7.Text = "付現" Then
182
-            TextBox12.Enabled = False : TextBox11.Enabled = False : ComboBox8.Enabled = False : ComboBox9.Enabled = False : DateTimePicker3.Enabled = False
183
-            DateTimePicker5.Enabled = False : DateTimePicker4.Enabled = False : TextBox13.Enabled = False : TextBox15.Enabled = False
184
-            NumericUpDown5.Enabled = True : NumericUpDown6.Enabled = False : NumericUpDown6.Value = 0
185
-        ElseIf ComboBox7.Text = "開票" Then
186
-            TextBox12.Enabled = True : TextBox11.Enabled = True : ComboBox8.Enabled = True : ComboBox9.Enabled = True : DateTimePicker3.Enabled = True
187
-            DateTimePicker5.Enabled = True : DateTimePicker4.Enabled = True : TextBox13.Enabled = True : TextBox15.Enabled = True
188
-            NumericUpDown5.Enabled = False : NumericUpDown6.Enabled = True : NumericUpDown5.Value = 0
193
+        If 狀態_cb.Text = "付現" Or 狀態_cb.Text = "收現" Then
194
+            支票號碼_tb.Enabled = False : 客供名稱_tb.Enabled = False : 兌現科目_cb.Enabled = False : 付款銀行_cb.Enabled = False : 到期日_dtp.Enabled = False
195
+            開收票日_dtp.Enabled = False : 預定兌現日_dtp.Enabled = False : 開票人_tb.Enabled = False : 發票人帳號_tb.Enabled = False
196
+            現金_nud.Enabled = True : 支票_nud.Enabled = False : 支票_nud.Value = 0
197
+        ElseIf 狀態_cb.Text = "開票" Or 狀態_cb.Text = "收票" Then
198
+            支票號碼_tb.Enabled = True : 客供名稱_tb.Enabled = True : 兌現科目_cb.Enabled = True : 付款銀行_cb.Enabled = True : 到期日_dtp.Enabled = True
199
+            開收票日_dtp.Enabled = True : 預定兌現日_dtp.Enabled = True : 開票人_tb.Enabled = True : 發票人帳號_tb.Enabled = True
200
+            現金_nud.Enabled = False : 支票_nud.Enabled = True : 現金_nud.Value = 0
189 201
         End If
190 202
     End Sub
191
-    Private Sub TextBox9_TextChanged(sender As Object, e As EventArgs) Handles TextBox9.TextChanged
192
-        PA = TextBox9.Text
193
-        If ComboBox7.Text = "付現" Then : SQL_會計科目_關鍵字_應付_不含流動票務()
194
-        ElseIf ComboBox7.Text = "開票" Then : SQL_會計科目_關鍵字_應付_只含流動票務() : End If
195
-        ComboBox1.Items.Clear() : ComboBox6.Items.Clear() : While (dr.Read()) : ComboBox1.Items.Add(dr("會計科目")) : ComboBox6.Items.Add(dr("編號")) : End While : conn.Close()
196
-        If ComboBox1.Items.Count <> 0 Then : ComboBox1.SelectedIndex = 0 : End If : PA = ""
203
+    Private Sub TextBox9_TextChanged(sender As Object, e As EventArgs) Handles 會科關鍵字_tb.TextChanged
204
+        PA = 會科關鍵字_tb.Text
205
+        If 狀態_cb.Text = "付現" Then : SQL_會計科目_關鍵字_應付_不含流動票務()
206
+        ElseIf 狀態_cb.Text = "開票" Then : SQL_會計科目_關鍵字_應付_只含流動票務()
207
+        ElseIf 狀態_cb.Text = "收現" Then : SQL_會計科目_關鍵字_應收_不含流動票務()
208
+        ElseIf 狀態_cb.Text = "收票" Then : SQL_會計科目_關鍵字_應收_只含流動票務() : End If
209
+        會計科目_cb.Items.Clear() : 會計科目編號_cb.Items.Clear()
210
+        While (dr.Read()) : 會計科目_cb.Items.Add(dr("會計科目")) : 會計科目編號_cb.Items.Add(dr("編號")) : End While : conn.Close()
211
+        If 會計科目_cb.Items.Count <> 0 Then : 會計科目_cb.SelectedIndex = 0 : End If : PA = ""
197 212
     End Sub
198
-    Private Sub NumericUpDown2_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown2.ValueChanged
199
-        NumericUpDown4.Value = NumericUpDown3.Value - NumericUpDown2.Value - NumericUpDown1.Value
213
+    Private Sub NumericUpDown2_ValueChanged(sender As Object, e As EventArgs) Handles 現金加總_nud.ValueChanged
214
+        未沖金額_nud.Value = 應沖金額_nud.Value - 現金加總_nud.Value - 支票加總_nud.Value
200 215
     End Sub
201
-    Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDown1.ValueChanged
202
-        NumericUpDown4.Value = NumericUpDown3.Value - NumericUpDown2.Value - NumericUpDown1.Value
216
+    Private Sub NumericUpDown1_ValueChanged(sender As Object, e As EventArgs) Handles 支票加總_nud.ValueChanged
217
+        未沖金額_nud.Value = 應沖金額_nud.Value - 現金加總_nud.Value - 支票加總_nud.Value
203 218
     End Sub
204 219
     Private Sub 存檔()
205
-        PA4 = TextBox1.Text
206
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
207
-            資料數 = DataGridView1.Rows.Count : MyModule1.進度條()
208
-            PA1 = DataGridView1.Rows(i).Cells("用途").Value : NU1 = DataGridView1.Rows(i).Cells("支出").Value : PA2 = DataGridView1.Rows(i).Cells("備註").Value
209
-            PA3 = DataGridView1.Rows(i).Cells("科目編號").Value : NU2 = DataGridView1.Rows(i).Cells("現金").Value : NU3 = DataGridView1.Rows(i).Cells("開票").Value
210
-            NU4 = DataGridView1.Rows(i).Cells("收票").Value : PA5 = DataGridView1.Rows(i).Cells("項次").Value : PA6 = DataGridView1.Rows(i).Cells("狀態").Value : PA7 = gUserName
211
-            PA8 = DataGridView1.Rows(i).Cells("發票人帳號").Value.ToString : PA9 = DataGridView1.Rows(i).Cells("兌現科目").Value.ToString : PA10 = DataGridView1.Rows(i).Cells("付款銀行").Value.ToString
212
-            PA11 = DataGridView1.Rows(i).Cells("倉儲單號").Value.ToString : PA12 = DataGridView1.Rows(i).Cells("支票號碼").Value.ToString : PA13 = DataGridView1.Rows(i).Cells("開票人").Value.ToString
213
-            PA14 = DataGridView1.Rows(i).Cells("到期日").Value.ToString : PA15 = DataGridView1.Rows(i).Cells("預定兌現日").Value.ToString : PA16 = DataGridView1.Rows(i).Cells("開收票日").Value.ToString
220
+        PA4 = 收支單號_tb.Text
221
+        For i As Integer = 0 To 單據清單_dgv.Rows.Count - 1
222
+            資料數 = 單據清單_dgv.Rows.Count : MyModule1.進度條()
223
+            PA1 = 單據清單_dgv.Rows(i).Cells("用途").Value : NU1 = 單據清單_dgv.Rows(i).Cells("支出").Value : PA2 = 單據清單_dgv.Rows(i).Cells("備註").Value
224
+            PA3 = 單據清單_dgv.Rows(i).Cells("科目編號").Value : NU2 = 單據清單_dgv.Rows(i).Cells("現金").Value : NU3 = 單據清單_dgv.Rows(i).Cells("開票").Value
225
+            NU4 = 單據清單_dgv.Rows(i).Cells("收票").Value : PA5 = 單據清單_dgv.Rows(i).Cells("項次").Value : PA6 = 單據清單_dgv.Rows(i).Cells("狀態").Value : PA7 = gUserName
226
+            PA8 = 單據清單_dgv.Rows(i).Cells("發票人帳號").Value.ToString : PA9 = 單據清單_dgv.Rows(i).Cells("兌現科目").Value.ToString : PA10 = 單據清單_dgv.Rows(i).Cells("付款銀行").Value.ToString
227
+            PA11 = 單據清單_dgv.Rows(i).Cells("倉儲單號").Value.ToString : PA12 = 單據清單_dgv.Rows(i).Cells("支票號碼").Value.ToString : PA13 = 單據清單_dgv.Rows(i).Cells("開票人").Value.ToString
228
+            PA14 = 單據清單_dgv.Rows(i).Cells("到期日").Value.ToString : PA15 = 單據清單_dgv.Rows(i).Cells("預定兌現日").Value.ToString : PA16 = 單據清單_dgv.Rows(i).Cells("開收票日").Value.ToString
214 229
             SQL_支票收支單申請修改() : conn.Close()
215 230
         Next : MAOJI_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
216 231
     End Sub
217
-    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
218
-        If ComboBox6.Text = "" Then : MsgBox("沒有選擇會計科目。")
232
+    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 新增一筆資料_bu.Click
233
+        If 會計科目編號_cb.Text = "" Then : MsgBox("沒有選擇會計科目。")
219 234
         Else
220
-            If NumericUpDown4.Value <= 0 Then : MsgBox("請注意可沖金額不可小於零。")
221
-            Else
222
-                PA = TextBox1.Text : TextBox3.Text = gUserName
223
-                If DataGridView1.Rows.Count = 0 Then
224
-                    SQL_營運成本控制表新增()
225
-                    For i As Integer = 0 To DataGridView2.Rows.Count - 1
226
-                        PA19 = DataGridView2.Rows(i).Cells("流水單號").Value.ToString
227
-                        SQL_倉儲明細表財務單號連接修改()
228
-                        PA6 = DataGridView2.Rows(i).Cells("流水單號").Value : PA7 = "1"
229
-                        SQL_應付賬款_倉儲明細應付立帳修改()
230
-                    Next
231
-                End If
232
-                存檔()
233
-                SQL_營運成本明細表項次新增查詢()
234
-                If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close() : NUM1 = Double.Parse(新項次) + 1
235
-                If NUM1 < 10 Then : 新項次 = "0" & NUM1
236
-                ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
237
-                PA1 = TextBox1.Text : PA2 = 新項次 : PA3 = ComboBox6.Text : PA4 = "" : NU1 = 0 : PA5 = "" : NU2 = 0 : NU3 = 0 : NU4 = 0 : PA6 = ComboBox7.Text : PA7 = gUserName
238
-                SQL_營運成本明細表新增() : Set_費用清單()
235
+            If 未沖金額_nud.Value <= 0 Then
236
+                MsgBox("請注意可沖金額不可小於零。")
239 237
             End If
238
+            PA = 收支單號_tb.Text : 登錄人_tb.Text = gUserName
239
+            If 單據清單_dgv.Rows.Count = 0 Then
240
+                SQL_營運成本控制表新增() : conn.Close()
241
+                For i As Integer = 0 To 倉儲明細表資料流水號_dgv.Rows.Count - 1
242
+                    PA19 = 倉儲明細表資料流水號_dgv.Rows(i).Cells("流水單號").Value.ToString
243
+                    SQL_倉儲明細表財務單號連接修改() : conn.Close()
244
+
245
+                    If 財務單申請狀態 = "應付" Then
246
+                        PA6 = 倉儲明細表資料流水號_dgv.Rows(i).Cells("流水單號").Value : PA7 = "1"
247
+                        SQL_應付賬款_倉儲明細應付立帳修改() : conn.Close()
248
+                    ElseIf 財務單申請狀態 = "應收" Then
249
+                        PA6 = 倉儲明細表資料流水號_dgv.Rows(i).Cells("流水單號").Value : PA7 = "1"
250
+                        SQL_應收賬款_倉儲明細應付立帳修改() : conn.Close()
251
+                    End If
252
+                Next
253
+            End If
254
+            存檔()
255
+            SQL_營運成本明細表項次新增查詢()
256
+            If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close() : NUM1 = Double.Parse(新項次) + 1
257
+            If NUM1 < 10 Then : 新項次 = "0" & NUM1
258
+            ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
259
+            PA1 = 收支單號_tb.Text : PA2 = 新項次 : PA3 = 會計科目編號_cb.Text : PA4 = "" : NU1 = 0 : PA5 = "" : NU2 = 0 : NU3 = 0 : NU4 = 0 : PA6 = 狀態_cb.Text : PA7 = gUserName
260
+            SQL_營運成本明細表新增() : conn.Close() : Set_費用清單()
240 261
         End If
241 262
     End Sub
242
-    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
243
-        If TextBox4.Text = "" Then : MsgBox("未選擇需要刪除的資料。")
263
+    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles 刪除選中的資料_bu.Click
264
+        If 項次_tb.Text = "" Then : MsgBox("未選擇需要刪除的資料。")
244 265
         Else
245
-            存檔() : PA1 = TextBox1.Text : PA2 = TextBox4.Text : SQL_營運成本明細表刪除單筆() : conn.Close() : Set_費用清單() : Dim NUM1 As Integer = 0
246
-            For i As Integer = 0 To DataGridView1.Rows.Count - 1
266
+            存檔() : PA1 = 收支單號_tb.Text : PA2 = 項次_tb.Text : SQL_營運成本明細表刪除單筆() : conn.Close() : Set_費用清單() : Dim NUM1 As Integer = 0
267
+            For i As Integer = 0 To 單據清單_dgv.Rows.Count - 1
247 268
                 NUM1 += 1 : If NUM1 < 10 Then : 新項次 = "0" & NUM1 : ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
248
-                PA1 = 新項次 : PA2 = TextBox1.Text : PA3 = DataGridView1.Rows(i).Cells("項次").Value
269
+                PA1 = 新項次 : PA2 = 收支單號_tb.Text : PA3 = 單據清單_dgv.Rows(i).Cells("項次").Value
249 270
                 SQL_營運成本明細表項次修改() : conn.Close()
250 271
             Next : Set_費用清單()
251
-            If DataGridView1.Rows.Count = 0 Then
252
-                PA1 = TextBox1.Text : SQL_營運成本控制表刪除() : PA = ""
253
-                For i As Integer = 0 To DataGridView2.Rows.Count - 1
254
-                    PA19 = DataGridView2.Rows(i).Cells("流水單號").Value.ToString
255
-                    SQL_倉儲明細表財務單號連接修改()
256
-                    PA6 = DataGridView2.Rows(i).Cells("流水單號").Value : PA7 = "0"
257
-                    SQL_應付賬款_倉儲明細應付立帳修改()
272
+            If 單據清單_dgv.Rows.Count = 0 Then
273
+                PA1 = 收支單號_tb.Text : SQL_營運成本控制表刪除() : PA = ""
274
+                For i As Integer = 0 To 倉儲明細表資料流水號_dgv.Rows.Count - 1
275
+                    PA19 = 倉儲明細表資料流水號_dgv.Rows(i).Cells("流水單號").Value.ToString
276
+                    SQL_倉儲明細表財務單號連接修改() : conn.Close()
277
+
278
+                    If 財務單申請狀態 = "應付" Then
279
+                        PA6 = 倉儲明細表資料流水號_dgv.Rows(i).Cells("流水單號").Value : PA7 = "0"
280
+                        SQL_應付賬款_倉儲明細應付立帳修改() : conn.Close()
281
+                    ElseIf 財務單申請狀態 = "應收" Then
282
+                        PA6 = 倉儲明細表資料流水號_dgv.Rows(i).Cells("流水單號").Value : PA7 = "0"
283
+                        SQL_應收賬款_倉儲明細應付立帳修改() : conn.Close()
284
+                    End If
258 285
                 Next
259 286
             End If
260 287
         End If
261 288
     End Sub
262
-    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
263
-        PA4 = TextBox1.Text : PA1 = TextBox14.Text : NU1 = NumericUpDown5.Value : PA2 = TextBox16.Text : PA3 = ComboBox6.Text : NU2 = 0 : NU3 = NumericUpDown6.Value : NU4 = 0 : PA5 = TextBox4.Text
264
-        PA6 = ComboBox7.Text : PA7 = TextBox3.Text : PA8 = TextBox15.Text : PA9 = ComboBox10.Text : PA10 = ComboBox9.Text : PA11 = 收付對應客戶供應商編號 : PA12 = TextBox12.Text : PA13 = TextBox13.Text
289
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles 單筆資料存檔_bu.Click
265 290
         If 財務單申請狀態 = "應付" Then
266
-            If ComboBox7.Text = "付現" Then
267
-                PA14 = "" : PA15 = "" : PA16 = ""
268
-            ElseIf ComboBox7.Text = "開票" Then
269
-                PA14 = Format(DateTimePicker3.Value, "yyyy/MM/dd") : PA15 = Format(DateTimePicker4.Value, "yyyy/MM/dd") : PA16 = Format(DateTimePicker5.Value, "yyyy/MM/dd")
270
-            End If
291
+            NU1 = 現金_nud.Value : NU2 = 0 : NU3 = 支票_nud.Value : NU4 = 0
271 292
         ElseIf 財務單申請狀態 = "應收" Then
272
-
293
+            NU1 = 0 : NU2 = 現金_nud.Value : NU3 = 0 : NU4 = 支票_nud.Value
294
+        End If
295
+        PA4 = 收支單號_tb.Text : PA1 = 用途_tb.Text : PA2 = 備註_tb.Text : PA3 = 會計科目編號_cb.Text : PA5 = 項次_tb.Text : PA6 = 狀態_cb.Text : PA7 = 登錄人_tb.Text
296
+        PA8 = 發票人帳號_tb.Text : PA9 = 兌現科目編號_cb.Text : PA10 = 付款銀行_cb.Text : PA11 = 收付對應客戶供應商編號 : PA12 = 支票號碼_tb.Text : PA13 = 開票人_tb.Text
297
+        If 狀態_cb.Text = "付現" Or 狀態_cb.Text = "收現" Then
298
+            PA14 = "" : PA15 = "" : PA16 = ""
299
+        ElseIf 狀態_cb.Text = "開票" Or 狀態_cb.Text = "收票" Then
300
+            PA14 = Format(到期日_dtp.Value, "yyyy/MM/dd") : PA15 = Format(預定兌現日_dtp.Value, "yyyy/MM/dd") : PA16 = Format(開收票日_dtp.Value, "yyyy/MM/dd")
273 301
         End If
274 302
         SQL_支票收支單申請修改() : conn.Close() : Set_費用清單() : MsgBox("存檔完畢")
275 303
     End Sub
276
-    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
304
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 清單資料存檔_bu.Click
277 305
         存檔() : Set_費用清單() : MsgBox("存檔完畢")
278 306
     End Sub
279 307
 End Class

Notiek ielāde…
Atcelt
Saglabāt