B70340 2 jaren geleden
bovenliggende
commit
3f130c0860

BIN
.vs/YD-ERP-SYS/FileContentIndex/39c2c5ac-ebb9-43c0-aefd-83ba6be500e4.vsidx Bestand weergeven


BIN
.vs/YD-ERP-SYS/FileContentIndex/7ea98856-9885-47e1-b8e9-cad9f82386e3.vsidx Bestand weergeven


BIN
.vs/YD-ERP-SYS/v17/.suo Bestand weergeven


+ 4
- 4
YD-ERP-SYS/Module/SQL_業務系統管理.vb Bestand weergeven

@@ -54,7 +54,7 @@
54 54
             SQL2 = " WHERE 單號 LIKE '" & PA19 & "%' AND 單位主管 LIKE '' "
55 55
         End If
56 56
         ConnOpen()
57
-        SQL1 = "SELECT 流水號, 單號, 開單日期, 客戶編號, 交貨日期, 含稅, 單位主管, 審核日期, 業務人員, 送貨地點, 運費, 稅金, 已出貨 AS 出貨, 轉高層
57
+        SQL1 = "SELECT 流水號, 單號, 開單日期, 客戶編號, 交貨日期, 含稅, 單位主管, 審核日期, 業務人員, 送貨地點, 運費, 稅金, 已出貨 AS 出貨, 轉高層, 稅金另扣
58 58
                 FROM   銷售控制表 " & SQL2 & " ORDER BY   CHARINDEX(LEFT(單號, 1), '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 單號 DESC"
59 59
         CmdSet_For_DGV()
60 60
     End Sub
@@ -91,7 +91,7 @@
91 91
         End If
92 92
 
93 93
         ConnOpen()
94
-        SQL1 = "SELECT 流水號, 單號, 開單日期, 客戶編號, 交貨日期, 含稅, 單位主管, 審核日期, 業務人員, 送貨地點, 運費, 稅金
94
+        SQL1 = "SELECT 流水號, 單號, 開單日期, 客戶編號, 交貨日期, 含稅, 單位主管, 審核日期, 業務人員, 送貨地點, 運費, 稅金, 稅金另扣
95 95
                 FROM   銷售控制表 " & SQL2 & " ORDER BY   CHARINDEX(LEFT(單號, 1), '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 單號 DESC"
96 96
         CmdSet_For_DGV()
97 97
     End Sub
@@ -112,7 +112,7 @@
112 112
                             銷售控制表.含稅, 銷售控制表.單位主管, 銷售控制表.審核日期, 銷售收款事項.內容, 銷售收款事項.金額 AS 未收額額, 
113 113
                             銷售控制表.送貨地點, 銷售控制表.運費, 銷售控制表.客戶編號, 客戶資料表.電話1, 客戶資料表.電話2, 
114 114
                             客戶資料表.地址, 客戶資料表.公司名稱, 客戶資料表.統編, 銷售控制表.稅金, 銷售控制表.已出貨 AS 出貨, 
115
-                            銷售控制表.轉業績日期, 銷售控制表.已出貨 AS 已結單, 銷售控制表.銷貨總額
115
+                            銷售控制表.轉業績日期, 銷售控制表.已出貨 AS 已結單, 銷售控制表.銷貨總額, 銷售控制表.稅金另扣
116 116
                 FROM        銷售控制表 INNER JOIN
117 117
                             客戶資料表 ON 銷售控制表.客戶編號 = 客戶資料表.舊編 INNER JOIN
118 118
                                 (SELECT          銷售明細表.單號
@@ -138,7 +138,7 @@
138 138
                             銷售控制表.含稅, 銷售控制表.單位主管, 銷售控制表.審核日期, 銷售收款事項.內容, 銷售收款事項.金額 AS 未收額額, 
139 139
                             銷售控制表.送貨地點, 銷售控制表.運費, 銷售控制表.客戶編號, 客戶資料表.電話1, 客戶資料表.電話2, 
140 140
                             客戶資料表.地址, 客戶資料表.公司名稱, 客戶資料表.統編, 銷售控制表.稅金, 銷售控制表.已出貨 AS 出貨, 
141
-                            銷售控制表.轉業績日期, 銷售控制表.已出貨 AS 已結單, 銷售控制表.銷貨總額
141
+                            銷售控制表.轉業績日期, 銷售控制表.已出貨 AS 已結單, 銷售控制表.銷貨總額, 銷售控制表.稅金另扣
142 142
                 FROM        銷售控制表 INNER JOIN
143 143
                             客戶資料表 ON 銷售控制表.客戶編號 = 客戶資料表.舊編 INNER JOIN
144 144
                                 (SELECT          銷售明細表.單號

+ 2
- 2
YD-ERP-SYS/Module/SQL_業績計算系統.vb Bestand weergeven

@@ -70,7 +70,7 @@
70 70
     Friend Sub SQL_業績彙總1()
71 71
         ConnOpen()
72 72
         SQL1 = "SELECT     銷售控制表.單號, 銷貨總額, SUM(銷售明細表.成本 * 銷售明細表.數量) 
73
-                           AS 成本, 銷售控制表.運費, 銷售控制表.稅金 / 2 AS [稅金2.5%], 銷售控制表.稅金, 銷售控制表.刷卡費用, 管銷費用
73
+                           AS 成本, 銷售控制表.運費, 銷售控制表.稅金另扣 AS [稅金2.5%], 銷售控制表.稅金, 銷售控制表.刷卡費用, 管銷費用
74 74
                 FROM       銷售控制表 LEFT OUTER JOIN
75 75
                            銷售明細表 ON 銷售控制表.單號 = 銷售明細表.單號 LEFT OUTER JOIN
76 76
                            銷售收款事項 ON 銷售控制表.單號 = 銷售收款事項.單號
@@ -79,7 +79,7 @@
79 79
                           (銷售控制表.轉業績日期 BETWEEN '" & Strings.Format(業績獎金彙總表.開始日期_dtp.Value, "yyyy/MM/dd") & "' AND 
80 80
                                                        '" & Strings.Format(業績獎金彙總表.結束日期_dtp.Value, "yyyy/MM/dd") & "') AND 
81 81
                            銷售控制表.單號 LIKE N'" & 業績獎金彙總表.業務_cb.Text & "%'
82
-                GROUP BY   銷售控制表.單號, 銷售控制表.運費, 銷售控制表.稅金, 銷售控制表.刷卡費用, 銷貨總額, 管銷費用
82
+                GROUP BY   銷售控制表.單號, 銷售控制表.運費, 銷售控制表.稅金, 銷售控制表.刷卡費用, 銷貨總額, 管銷費用, 銷售控制表.稅金另扣
83 83
                 ORDER BY   銷售控制表.單號"
84 84
         CmdSet_For_DGV()
85 85
     End Sub

+ 1
- 1
YD-ERP-SYS/Module/全域變數.vb Bestand weergeven

@@ -3,7 +3,7 @@
3 3
     Public g_conn_type, gUserName, 登入人職稱, 登入人級別, 登入人組別, 登入人IP, 版本號, Target, Target1, Target2, FTP帳號, FTP密碼, FTP物理位置, 業務號碼, AA(99), 類別 As String
4 4
     Public BB(99), CC(99), 登入判斷 As Boolean
5 5
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6
-    Public 版本 As String = "2023072101"
6
+    Public 版本 As String = "2023080301"
7 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 8
     Public 列印用SQL, 列印用SQL2, 公司編號, 公司電話, 公司統編, 公司地址, 關鍵字編號, 進度條後墜 As String
9 9
     '----系統閒置-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

BIN
YD-ERP-SYS/bin/Debug/YD-ERP-SYS.exe Bestand weergeven


BIN
YD-ERP-SYS/bin/Debug/YD-ERP-SYS.pdb Bestand weergeven


BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.exe Bestand weergeven


BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.pdb Bestand weergeven


BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.GenerateResource.cache Bestand weergeven


+ 20
- 6
YD-ERP-SYS/業務系統管理/訂單控制表.vb Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 Option Strict Off
2 2
 Public Class 訂單控制表
3
-    ReadOnly ds1, ds2, ds4, ds5, ds6, ds7 As New DataSet
3
+    ReadOnly ds1, ds2, ds4, ds5, ds6, ds7 As New DataSet : Dim 稅金另算有資料 As Boolean
4 4
     Dim 首次開啟 As Boolean = False : Dim 運費 As Integer : Dim 稅金存檔 As Integer
5 5
     Private Sub Set_清單1()
6 6
         銷售單據_dgv.DataSource = Nothing : ds1.Clear()
@@ -19,7 +19,7 @@ Public Class 訂單控制表
19 19
         銷售單據_dgv.Columns(8).Visible = False : 銷售單據_dgv.Columns(9).FillWeight = 100 : 銷售單據_dgv.Columns(10).Visible = False : 銷售單據_dgv.Columns(11).Visible = False
20 20
         銷售單據_dgv.Columns(12).Visible = False : 銷售單據_dgv.Columns(13).Visible = False : 銷售單據_dgv.Columns(14).Visible = False : 銷售單據_dgv.Columns(15).Visible = False
21 21
         銷售單據_dgv.Columns(16).Visible = False : 銷售單據_dgv.Columns(17).Visible = False : 銷售單據_dgv.Columns(18).Visible = False : 銷售單據_dgv.Columns(19).FillWeight = 65
22
-        銷售單據_dgv.Columns(20).Visible = False : 銷售單據_dgv.Columns(21).FillWeight = 65 : 銷售單據_dgv.Columns("銷貨總額").FillWeight = 80
22
+        銷售單據_dgv.Columns(20).Visible = False : 銷售單據_dgv.Columns(21).FillWeight = 65 : 銷售單據_dgv.Columns("銷貨總額").FillWeight = 80 : 銷售單據_dgv.Columns("稅金另扣").Visible = False
23 23
         銷售單據_dgv.Columns("未收額額").DefaultCellStyle.Format = "#,##0"
24 24
         銷售單據_dgv.Columns("未收額額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
25 25
         銷售單據_dgv.Columns("未收額額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
@@ -188,7 +188,8 @@ Public Class 訂單控制表
188 188
     Private Sub Set_合記計算()
189 189
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
190 190
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
191
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
191
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0"
192
+        If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
192 193
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
193 194
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
194 195
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -223,7 +224,8 @@ Public Class 訂單控制表
223 224
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
224 225
             通知_lb.Text = "無稅金"
225 226
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
226
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
227
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
228
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
227 229
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
228 230
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
229 231
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
@@ -238,7 +240,7 @@ Public Class 訂單控制表
238 240
             稅金_tb.Text = 稅金存檔
239 241
             銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
240 242
             售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
241
-        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
243
+        End If : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
242 244
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
243 245
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
244 246
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -272,7 +274,7 @@ Public Class 訂單控制表
272 274
         End If
273 275
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
274 276
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
275
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
277
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
276 278
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
277 279
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
278 280
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
@@ -461,6 +463,12 @@ Public Class 訂單控制表
461 463
             交貨日期_dtp.Value = 銷售單據_dgv.Rows(e.RowIndex).Cells("交貨日期").Value : 含稅_ch.Checked = 銷售單據_dgv.Rows(e.RowIndex).Cells("含稅").Value
462 464
             送貨地點_cb_下拉表單資料載入() : 送貨地點_cb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("送貨地點").Value.ToString
463 465
             運費 = 銷售單據_dgv.Rows(e.RowIndex).Cells("運費").Value
466
+
467
+            If 銷售單據_dgv.Rows(e.RowIndex).Cells("稅金另扣").Value.ToString <> "" Then
468
+                稅金另算有資料 = True : 稅金25_tb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("稅金另扣").Value.ToString
469
+                稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0")
470
+            Else : 稅金另算有資料 = False : 稅金25_tb.Text = "" : End If
471
+
464 472
             Set_清單4() : Set_清單5() : Set_清單6() : Set_清單7() : PA = 單號_tb.Text : SQL_銷售單號串聯倉儲表取得倉儲單號()
465 473
             If dr.Read() Then : 調庫單號_tb.Text = dr("執行單號") : Else : 調庫單號_tb.Text = "" : End If
466 474
             PA1 = 流水號_tb.Text : NU5 = 銷售合計_tb.Text
@@ -476,6 +484,12 @@ Public Class 訂單控制表
476 484
             交貨日期_dtp.Value = 銷售單據_dgv.Rows(I).Cells("交貨日期").Value : 含稅_ch.Checked = 銷售單據_dgv.Rows(I).Cells("含稅").Value
477 485
             送貨地點_cb_下拉表單資料載入() : 送貨地點_cb.Text = 銷售單據_dgv.Rows(I).Cells("送貨地點").Value.ToString
478 486
             運費 = 銷售單據_dgv.Rows(I).Cells("運費").Value
487
+
488
+            If 銷售單據_dgv.Rows(I).Cells("稅金另扣").Value.ToString <> "" Then
489
+                稅金另算有資料 = True : 稅金25_tb.Text = 銷售單據_dgv.Rows(I).Cells("稅金另扣").Value.ToString
490
+                稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0")
491
+            Else : 稅金另算有資料 = False : 稅金25_tb.Text = "" : End If
492
+
479 493
             Set_清單4() : Set_清單5() : Set_清單6() : Set_清單7() : PA = 單號_tb.Text : SQL_銷售單號串聯倉儲表取得倉儲單號()
480 494
             If dr.Read() Then : 調庫單號_tb.Text = dr("執行單號") : Else : 調庫單號_tb.Text = "" : End If
481 495
             PA1 = 流水號_tb.Text : NU5 = 銷售合計_tb.Text

+ 25
- 25
YD-ERP-SYS/業務系統管理/銷售單審核.Designer.vb Bestand weergeven

@@ -107,6 +107,8 @@ Partial Class 銷售單審核
107 107
         Me.單據核准_bt = New System.Windows.Forms.Button()
108 108
         Me.單據作廢_bt = New System.Windows.Forms.Button()
109 109
         Me.Panel1 = New System.Windows.Forms.Panel()
110
+        Me.稅金25_tb = New System.Windows.Forms.TextBox()
111
+        Me.Label51 = New System.Windows.Forms.Label()
110 112
         Me.刷卡可刪除_ch = New System.Windows.Forms.CheckBox()
111 113
         Me.Reset1_bt = New System.Windows.Forms.Button()
112 114
         Me.刪除衍生運費_bt = New System.Windows.Forms.Button()
@@ -202,8 +204,6 @@ Partial Class 銷售單審核
202 204
         Me.運費資料流水號_tb = New System.Windows.Forms.TextBox()
203 205
         Me.Panel3 = New System.Windows.Forms.Panel()
204 206
         Me.顯示_bt = New System.Windows.Forms.Button()
205
-        Me.稅金25_tb = New System.Windows.Forms.TextBox()
206
-        Me.Label51 = New System.Windows.Forms.Label()
207 207
         CType(Me.售價_nud, System.ComponentModel.ISupportInitialize).BeginInit()
208 208
         CType(Me.區域庫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
209 209
         CType(Me.成本_nud, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -1007,6 +1007,28 @@ Partial Class 銷售單審核
1007 1007
         Me.Panel1.Size = New System.Drawing.Size(922, 495)
1008 1008
         Me.Panel1.TabIndex = 1331
1009 1009
         '
1010
+        '稅金25_tb
1011
+        '
1012
+        Me.稅金25_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1013
+        Me.稅金25_tb.ForeColor = System.Drawing.Color.Green
1014
+        Me.稅金25_tb.Location = New System.Drawing.Point(814, 683)
1015
+        Me.稅金25_tb.Name = "稅金25_tb"
1016
+        Me.稅金25_tb.Size = New System.Drawing.Size(81, 23)
1017
+        Me.稅金25_tb.TabIndex = 1563
1018
+        Me.稅金25_tb.Text = "0"
1019
+        Me.稅金25_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
1020
+        '
1021
+        'Label51
1022
+        '
1023
+        Me.Label51.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1024
+        Me.Label51.AutoSize = True
1025
+        Me.Label51.ForeColor = System.Drawing.Color.Green
1026
+        Me.Label51.Location = New System.Drawing.Point(731, 686)
1027
+        Me.Label51.Name = "Label51"
1028
+        Me.Label51.Size = New System.Drawing.Size(77, 16)
1029
+        Me.Label51.TabIndex = 1562
1030
+        Me.Label51.Text = "稅   金   2.5%"
1031
+        '
1010 1032
         '刷卡可刪除_ch
1011 1033
         '
1012 1034
         Me.刷卡可刪除_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1603,7 +1625,7 @@ Partial Class 銷售單審核
1603 1625
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1604 1626
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1605 1627
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1606
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 12278)
1628
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 12590)
1607 1629
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1608 1630
         Me.客戶資料_dgv.RowHeadersWidth = 5
1609 1631
         DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -2142,28 +2164,6 @@ Partial Class 銷售單審核
2142 2164
         Me.顯示_bt.Text = "顯示物料控件"
2143 2165
         Me.顯示_bt.UseVisualStyleBackColor = True
2144 2166
         '
2145
-        '稅金25_tb
2146
-        '
2147
-        Me.稅金25_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2148
-        Me.稅金25_tb.ForeColor = System.Drawing.Color.Green
2149
-        Me.稅金25_tb.Location = New System.Drawing.Point(814, 683)
2150
-        Me.稅金25_tb.Name = "稅金25_tb"
2151
-        Me.稅金25_tb.Size = New System.Drawing.Size(81, 23)
2152
-        Me.稅金25_tb.TabIndex = 1563
2153
-        Me.稅金25_tb.Text = "0"
2154
-        Me.稅金25_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
2155
-        '
2156
-        'Label51
2157
-        '
2158
-        Me.Label51.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2159
-        Me.Label51.AutoSize = True
2160
-        Me.Label51.ForeColor = System.Drawing.Color.Green
2161
-        Me.Label51.Location = New System.Drawing.Point(731, 686)
2162
-        Me.Label51.Name = "Label51"
2163
-        Me.Label51.Size = New System.Drawing.Size(77, 16)
2164
-        Me.Label51.TabIndex = 1562
2165
-        Me.Label51.Text = "稅   金   2.5%"
2166
-        '
2167 2167
         '銷售單審核
2168 2168
         '
2169 2169
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)

+ 32
- 31
YD-ERP-SYS/業務系統管理/銷售單審核.vb Bestand weergeven

@@ -2,13 +2,11 @@
2 2
 Public Class 銷售單審核
3 3
     ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7 As New DataSet
4 4
     Dim 首次開啟 As Boolean = False : Dim EDR As Integer = 0 : Dim ESTR As String : Dim EDR1 As Integer = 0 : Dim ESTR1 As String : Dim NUM1 As Integer
5
-    Dim 運費 As Integer : Dim 刷卡控制 As Boolean = False : Dim 稅金存檔 As Integer
5
+    Dim 運費 As Integer : Dim 刷卡控制 As Boolean = False : Dim 稅金存檔 As Integer : Dim 稅金另算有資料 As Boolean
6 6
     Private Sub Set_清單()
7 7
         物料清單_dgv.DataSource = Nothing : ds.Clear()
8 8
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
9
-        物料清單_dgv.ColumnHeadersHeight = 40
10
-        物料清單_dgv.AllowUserToAddRows = False
11
-        物料清單_dgv.RowTemplate.Height = 25
9
+        物料清單_dgv.ColumnHeadersHeight = 40 : 物料清單_dgv.AllowUserToAddRows = False : 物料清單_dgv.RowTemplate.Height = 25
12 10
 
13 11
         PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
14 12
         SQL_盤盈盤損申請_物料清單()
@@ -31,34 +29,27 @@ Public Class 銷售單審核
31 29
     Private Sub Set_清單1()
32 30
         銷售單據_dgv.DataSource = Nothing : ds1.Clear()
33 31
         銷售單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
34
-        銷售單據_dgv.ColumnHeadersHeight = 25
35
-        銷售單據_dgv.AllowUserToAddRows = False
36
-        銷售單據_dgv.RowTemplate.Height = 25
32
+        銷售單據_dgv.ColumnHeadersHeight = 25 : 銷售單據_dgv.AllowUserToAddRows = False : 銷售單據_dgv.RowTemplate.Height = 25
37 33
 
38
-        PA19 = 業務_cb.Text
39
-        SQL_銷售控制表_審核()
34
+        PA19 = 業務_cb.Text : SQL_銷售控制表_審核()
40 35
         da.Fill(ds1) : 銷售單據_dgv.DataSource = ds1.Tables(0) : conn.Close()
41 36
         銷售單據_dgv.Columns(0).Visible = False : 銷售單據_dgv.Columns(1).FillWeight = 100 : 銷售單據_dgv.Columns(2).Visible = False : 銷售單據_dgv.Columns(3).Visible = False
42 37
         銷售單據_dgv.Columns(4).Visible = False : 銷售單據_dgv.Columns(5).Visible = False : 銷售單據_dgv.Columns(6).Visible = False : 銷售單據_dgv.Columns(7).Visible = False
43 38
         銷售單據_dgv.Columns(8).Visible = False : 銷售單據_dgv.Columns(9).Visible = False : 銷售單據_dgv.Columns(10).Visible = False : 銷售單據_dgv.Columns(11).Visible = False
39
+        銷售單據_dgv.Columns(12).Visible = False
44 40
     End Sub
45 41
     Private Sub Set_清單2()
46 42
         客戶資料_dgv.DataSource = Nothing : ds2.Clear()
47 43
         客戶資料_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
48
-        客戶資料_dgv.ColumnHeadersHeight = 25
49
-        客戶資料_dgv.AllowUserToAddRows = False
50
-        客戶資料_dgv.RowTemplate.Height = 25
44
+        客戶資料_dgv.ColumnHeadersHeight = 25 : 客戶資料_dgv.AllowUserToAddRows = False : 客戶資料_dgv.RowTemplate.Height = 25
51 45
 
52
-        PA16 = 客戶_tb.Text
53
-        SQL_銷售單申請_客戶資料驗證()
46
+        PA16 = 客戶_tb.Text : SQL_銷售單申請_客戶資料驗證()
54 47
         da.Fill(ds2) : 客戶資料_dgv.DataSource = ds2.Tables(0) : conn.Close()
55 48
     End Sub
56 49
     Private Sub Set_清單3()
57 50
         區域庫存_dgv.DataSource = Nothing : ds3.Clear()
58 51
         區域庫存_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
59
-        區域庫存_dgv.ColumnHeadersHeight = 25
60
-        區域庫存_dgv.AllowUserToAddRows = False
61
-        區域庫存_dgv.RowTemplate.Height = 25
52
+        區域庫存_dgv.ColumnHeadersHeight = 25 : 區域庫存_dgv.AllowUserToAddRows = False : 區域庫存_dgv.RowTemplate.Height = 25
62 53
 
63 54
         PA20 = 料號_tb.Text : SQL_倉名_物料分配查詢()
64 55
         da.Fill(ds3) : 區域庫存_dgv.DataSource = ds3.Tables(0) : conn.Close()
@@ -251,7 +242,8 @@ Public Class 銷售單審核
251 242
     Private Sub Set_合記計算()
252 243
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
253 244
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
254
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
245
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0"
246
+        If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
255 247
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
256 248
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
257 249
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -290,7 +282,8 @@ Public Class 銷售單審核
290 282
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
291 283
             通知_lb.Text = "無稅金"
292 284
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
293
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
285
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
286
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
294 287
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
295 288
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
296 289
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
@@ -305,7 +298,7 @@ Public Class 銷售單審核
305 298
             稅金_tb.Text = 稅金存檔
306 299
             銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
307 300
             售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
308
-        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
301
+        End If : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
309 302
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
310 303
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
311 304
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -339,7 +332,7 @@ Public Class 銷售單審核
339 332
         End If
340 333
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
341 334
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
342
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
335
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
343 336
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
344 337
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
345 338
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
@@ -494,8 +487,13 @@ Public Class 銷售單審核
494 487
             送貨地點_cb_下拉表單資料載入() : 送貨地點_cb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("送貨地點").Value.ToString
495 488
             運費 = 銷售單據_dgv.Rows(e.RowIndex).Cells("運費").Value : 客戶流水_tb.Text = ""
496 489
             業務_cb.Text = Strings.Left(銷售單據_dgv.Rows(e.RowIndex).Cells("單號").Value, 1)
497
-            Set_清單4() : Set_清單5()
498
-            Set_清單6() : Set_清單7()
490
+
491
+            If 銷售單據_dgv.Rows(e.RowIndex).Cells("稅金另扣").Value.ToString <> "" Then
492
+                稅金另算有資料 = True : 稅金25_tb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("稅金另扣").Value.ToString
493
+                稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0")
494
+            Else : 稅金另算有資料 = False : 稅金25_tb.Text = "" : End If
495
+
496
+            Set_清單4() : Set_清單5() : Set_清單6() : Set_清單7()
499 497
             PA = 單號_tb.Text : SQL_銷售單號串聯倉儲表取得倉儲單號()
500 498
             If dr.Read() Then : 調庫單號_tb.Text = dr("執行單號") : Else : 調庫單號_tb.Text = "" : End If
501 499
         End If
@@ -1172,7 +1170,7 @@ Public Class 銷售單審核
1172 1170
     Private Sub Reset_bt_Click(sender As Object, e As EventArgs) Handles Reset_bt.Click
1173 1171
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1174 1172
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1175
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 稅金25_tb.Text = "0"
1173
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
1176 1174
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1177 1175
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1178 1176
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -1213,7 +1211,8 @@ Public Class 銷售單審核
1213 1211
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1214 1212
             通知_lb.Text = "無稅金"
1215 1213
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
1216
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1214
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
1215
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1217 1216
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1218 1217
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1219 1218
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
@@ -1228,7 +1227,7 @@ Public Class 銷售單審核
1228 1227
             稅金_tb.Text = 稅金存檔
1229 1228
             銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1230 1229
             售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1231
-        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1230
+        End If : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
1232 1231
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1233 1232
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1234 1233
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -1259,7 +1258,7 @@ Public Class 銷售單審核
1259 1258
         存檔1()
1260 1259
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1261 1260
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
1262
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
1261
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
1263 1262
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1264 1263
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1265 1264
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
@@ -1289,7 +1288,8 @@ Public Class 銷售單審核
1289 1288
     Private Sub Reset1_bt_Click(sender As Object, e As EventArgs) Handles Reset1_bt.Click
1290 1289
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1291 1290
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1292
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
1291
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0"
1292
+        If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
1293 1293
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1294 1294
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1295 1295
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -1331,14 +1331,15 @@ Public Class 銷售單審核
1331 1331
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1332 1332
             通知_lb.Text = "無稅金"
1333 1333
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
1334
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1334
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
1335
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1335 1336
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1336 1337
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1337 1338
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
1338 1339
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
1339 1340
         End If
1340 1341
 
1341
-        稅金存檔 = CLng(稅金_tb.Text) : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1342
+        稅金存檔 = CLng(稅金_tb.Text) : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
1342 1343
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1343 1344
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1344 1345
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -1372,7 +1373,7 @@ Public Class 銷售單審核
1372 1373
         End If
1373 1374
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1374 1375
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
1375
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
1376
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
1376 1377
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1377 1378
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1378 1379
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value

+ 128
- 127
YD-ERP-SYS/業務系統管理/銷售單申請.Designer.vb Bestand weergeven

@@ -22,22 +22,22 @@ Partial Class 銷售單申請
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25
-        Dim DataGridViewCellStyle33 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Dim DataGridViewCellStyle34 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle35 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle36 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle37 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle38 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle39 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle40 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle41 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle42 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
-        Dim DataGridViewCellStyle43 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
-        Dim DataGridViewCellStyle44 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
-        Dim DataGridViewCellStyle45 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38
-        Dim DataGridViewCellStyle46 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
39
-        Dim DataGridViewCellStyle47 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
40
-        Dim DataGridViewCellStyle48 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
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()
27
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
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
+        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
39
+        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
40
+        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
41 41
         Me.銷售單據_dgv = New System.Windows.Forms.DataGridView()
42 42
         Me.未審核_lb = New System.Windows.Forms.Label()
43 43
         Me.開立庫存調整單_bt = New System.Windows.Forms.Button()
@@ -112,19 +112,17 @@ Partial Class 銷售單申請
112 112
         Me.售價_nud = New System.Windows.Forms.NumericUpDown()
113 113
         Me.Label22 = New System.Windows.Forms.Label()
114 114
         Me.Panel1 = New System.Windows.Forms.Panel()
115
+        Me.稅金25_tb = New System.Windows.Forms.TextBox()
116
+        Me.Label1 = New System.Windows.Forms.Label()
115 117
         Me.流水號2_bt = New System.Windows.Forms.TextBox()
116 118
         Me.轉財務系統_bt = New System.Windows.Forms.Button()
117 119
         Me.財務單據退回_bt = New System.Windows.Forms.Button()
118 120
         Me.今天_bt = New System.Windows.Forms.Button()
119
-        Me.Label55 = New System.Windows.Forms.Label()
120
-        Me.申請人_tb = New System.Windows.Forms.TextBox()
121 121
         Me.營運成本收支單號_tb = New System.Windows.Forms.TextBox()
122 122
         Me.Label56 = New System.Windows.Forms.Label()
123 123
         Me.Label57 = New System.Windows.Forms.Label()
124 124
         Me.申請日期_dtp = New System.Windows.Forms.DateTimePicker()
125
-        Me.ComboBox4 = New System.Windows.Forms.ComboBox()
126 125
         Me.ComboBox3 = New System.Windows.Forms.ComboBox()
127
-        Me.會科碼1_ch = New System.Windows.Forms.ComboBox()
128 126
         Me.會科1_ch = New System.Windows.Forms.ComboBox()
129 127
         Me.ComboBox1 = New System.Windows.Forms.ComboBox()
130 128
         Me.Label52 = New System.Windows.Forms.Label()
@@ -190,6 +188,10 @@ Partial Class 銷售單申請
190 188
         Me.Label54 = New System.Windows.Forms.Label()
191 189
         Me.Label32 = New System.Windows.Forms.Label()
192 190
         Me.Label31 = New System.Windows.Forms.Label()
191
+        Me.Label55 = New System.Windows.Forms.Label()
192
+        Me.申請人_tb = New System.Windows.Forms.TextBox()
193
+        Me.ComboBox4 = New System.Windows.Forms.ComboBox()
194
+        Me.會科碼1_ch = New System.Windows.Forms.ComboBox()
193 195
         Me.轉換_tb = New System.Windows.Forms.TextBox()
194 196
         Me.調庫單號_tb = New System.Windows.Forms.TextBox()
195 197
         Me.客戶流水_tb = New System.Windows.Forms.TextBox()
@@ -228,8 +230,6 @@ Partial Class 銷售單申請
228 230
         Me.查_bt = New System.Windows.Forms.Button()
229 231
         Me.列印_bt = New System.Windows.Forms.Button()
230 232
         Me.顯示_bt = New System.Windows.Forms.Button()
231
-        Me.稅金25_tb = New System.Windows.Forms.TextBox()
232
-        Me.Label1 = New System.Windows.Forms.Label()
233 233
         CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
234 234
         CType(Me.銷售明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
235 235
         CType(Me.區域庫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -252,17 +252,17 @@ Partial Class 銷售單申請
252 252
         '
253 253
         '銷售單據_dgv
254 254
         '
255
-        DataGridViewCellStyle33.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
256
-        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle33
255
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
256
+        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
257 257
         Me.銷售單據_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
258 258
         Me.銷售單據_dgv.BackgroundColor = System.Drawing.Color.White
259 259
         Me.銷售單據_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
260 260
         Me.銷售單據_dgv.Location = New System.Drawing.Point(1, 27)
261 261
         Me.銷售單據_dgv.Name = "銷售單據_dgv"
262 262
         Me.銷售單據_dgv.RowHeadersWidth = 5
263
-        DataGridViewCellStyle34.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
264
-        DataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
265
-        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle34
263
+        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
264
+        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
265
+        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
266 266
         Me.銷售單據_dgv.RowTemplate.Height = 24
267 267
         Me.銷售單據_dgv.Size = New System.Drawing.Size(192, 141)
268 268
         Me.銷售單據_dgv.TabIndex = 1154
@@ -490,8 +490,8 @@ Partial Class 銷售單申請
490 490
         '
491 491
         '銷售明細_dgv
492 492
         '
493
-        DataGridViewCellStyle35.BackColor = System.Drawing.Color.White
494
-        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle35
493
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.White
494
+        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
495 495
         Me.銷售明細_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
496 496
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
497 497
         Me.銷售明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -500,9 +500,9 @@ Partial Class 銷售單申請
500 500
         Me.銷售明細_dgv.Location = New System.Drawing.Point(2, 29)
501 501
         Me.銷售明細_dgv.Name = "銷售明細_dgv"
502 502
         Me.銷售明細_dgv.RowHeadersWidth = 5
503
-        DataGridViewCellStyle36.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
504
-        DataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
505
-        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle36
503
+        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
504
+        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
505
+        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
506 506
         Me.銷售明細_dgv.RowTemplate.Height = 24
507 507
         Me.銷售明細_dgv.Size = New System.Drawing.Size(910, 360)
508 508
         Me.銷售明細_dgv.TabIndex = 1199
@@ -552,16 +552,16 @@ Partial Class 銷售單申請
552 552
         '
553 553
         '區域庫存_dgv
554 554
         '
555
-        DataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
556
-        Me.區域庫存_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle37
555
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
556
+        Me.區域庫存_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
557 557
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
558 558
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
559 559
         Me.區域庫存_dgv.Location = New System.Drawing.Point(3, 3)
560 560
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
561 561
         Me.區域庫存_dgv.RowHeadersWidth = 5
562
-        DataGridViewCellStyle38.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
563
-        DataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
564
-        Me.區域庫存_dgv.RowsDefaultCellStyle = DataGridViewCellStyle38
562
+        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
563
+        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
564
+        Me.區域庫存_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
565 565
         Me.區域庫存_dgv.RowTemplate.Height = 24
566 566
         Me.區域庫存_dgv.Size = New System.Drawing.Size(81, 70)
567 567
         Me.區域庫存_dgv.TabIndex = 1245
@@ -916,8 +916,8 @@ Partial Class 銷售單申請
916 916
         '
917 917
         '物料清單_dgv
918 918
         '
919
-        DataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
920
-        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle39
919
+        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
920
+        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
921 921
         Me.物料清單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
922 922
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
923 923
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -926,9 +926,9 @@ Partial Class 銷售單申請
926 926
         Me.物料清單_dgv.Location = New System.Drawing.Point(2, 79)
927 927
         Me.物料清單_dgv.Name = "物料清單_dgv"
928 928
         Me.物料清單_dgv.RowHeadersWidth = 5
929
-        DataGridViewCellStyle40.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
930
-        DataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
931
-        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle40
929
+        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
930
+        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
931
+        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
932 932
         Me.物料清單_dgv.RowTemplate.Height = 24
933 933
         Me.物料清單_dgv.Size = New System.Drawing.Size(518, 326)
934 934
         Me.物料清單_dgv.TabIndex = 1205
@@ -1099,11 +1099,33 @@ Partial Class 銷售單申請
1099 1099
         Me.Panel1.Size = New System.Drawing.Size(924, 502)
1100 1100
         Me.Panel1.TabIndex = 1252
1101 1101
         '
1102
+        '稅金25_tb
1103
+        '
1104
+        Me.稅金25_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1105
+        Me.稅金25_tb.ForeColor = System.Drawing.Color.Green
1106
+        Me.稅金25_tb.Location = New System.Drawing.Point(836, 699)
1107
+        Me.稅金25_tb.Name = "稅金25_tb"
1108
+        Me.稅金25_tb.Size = New System.Drawing.Size(81, 23)
1109
+        Me.稅金25_tb.TabIndex = 1561
1110
+        Me.稅金25_tb.Text = "0"
1111
+        Me.稅金25_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
1112
+        '
1113
+        'Label1
1114
+        '
1115
+        Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1116
+        Me.Label1.AutoSize = True
1117
+        Me.Label1.ForeColor = System.Drawing.Color.Green
1118
+        Me.Label1.Location = New System.Drawing.Point(753, 702)
1119
+        Me.Label1.Name = "Label1"
1120
+        Me.Label1.Size = New System.Drawing.Size(77, 16)
1121
+        Me.Label1.TabIndex = 1560
1122
+        Me.Label1.Text = "稅   金   2.5%"
1123
+        '
1102 1124
         '流水號2_bt
1103 1125
         '
1104 1126
         Me.流水號2_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1105 1127
         Me.流水號2_bt.Enabled = False
1106
-        Me.流水號2_bt.Location = New System.Drawing.Point(586, 1793)
1128
+        Me.流水號2_bt.Location = New System.Drawing.Point(586, 2453)
1107 1129
         Me.流水號2_bt.Name = "流水號2_bt"
1108 1130
         Me.流水號2_bt.Size = New System.Drawing.Size(75, 23)
1109 1131
         Me.流水號2_bt.TabIndex = 1557
@@ -1145,27 +1167,6 @@ Partial Class 銷售單申請
1145 1167
         Me.今天_bt.Text = "今天"
1146 1168
         Me.今天_bt.UseVisualStyleBackColor = True
1147 1169
         '
1148
-        'Label55
1149
-        '
1150
-        Me.Label55.AutoSize = True
1151
-        Me.Label55.ImeMode = System.Windows.Forms.ImeMode.NoControl
1152
-        Me.Label55.Location = New System.Drawing.Point(243, 433)
1153
-        Me.Label55.Name = "Label55"
1154
-        Me.Label55.Size = New System.Drawing.Size(43, 16)
1155
-        Me.Label55.TabIndex = 1546
1156
-        Me.Label55.Text = "申請人"
1157
-        Me.Label55.Visible = False
1158
-        '
1159
-        '申請人_tb
1160
-        '
1161
-        Me.申請人_tb.Location = New System.Drawing.Point(199, 544)
1162
-        Me.申請人_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1163
-        Me.申請人_tb.Name = "申請人_tb"
1164
-        Me.申請人_tb.Size = New System.Drawing.Size(81, 23)
1165
-        Me.申請人_tb.TabIndex = 1545
1166
-        Me.申請人_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
1167
-        Me.申請人_tb.WordWrap = False
1168
-        '
1169 1170
         '營運成本收支單號_tb
1170 1171
         '
1171 1172
         Me.營運成本收支單號_tb.Location = New System.Drawing.Point(312, 804)
@@ -1203,16 +1204,6 @@ Partial Class 銷售單申請
1203 1204
         Me.申請日期_dtp.Size = New System.Drawing.Size(90, 23)
1204 1205
         Me.申請日期_dtp.TabIndex = 1541
1205 1206
         '
1206
-        'ComboBox4
1207
-        '
1208
-        Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1209
-        Me.ComboBox4.FormattingEnabled = True
1210
-        Me.ComboBox4.Location = New System.Drawing.Point(202, 504)
1211
-        Me.ComboBox4.Name = "ComboBox4"
1212
-        Me.ComboBox4.Size = New System.Drawing.Size(78, 24)
1213
-        Me.ComboBox4.TabIndex = 1537
1214
-        Me.ComboBox4.Visible = False
1215
-        '
1216 1207
         'ComboBox3
1217 1208
         '
1218 1209
         Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
@@ -1222,16 +1213,6 @@ Partial Class 銷售單申請
1222 1213
         Me.ComboBox3.Size = New System.Drawing.Size(121, 24)
1223 1214
         Me.ComboBox3.TabIndex = 1536
1224 1215
         '
1225
-        '會科碼1_ch
1226
-        '
1227
-        Me.會科碼1_ch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1228
-        Me.會科碼1_ch.FormattingEnabled = True
1229
-        Me.會科碼1_ch.Location = New System.Drawing.Point(202, 465)
1230
-        Me.會科碼1_ch.Name = "會科碼1_ch"
1231
-        Me.會科碼1_ch.Size = New System.Drawing.Size(61, 24)
1232
-        Me.會科碼1_ch.TabIndex = 1535
1233
-        Me.會科碼1_ch.Visible = False
1234
-        '
1235 1216
         '會科1_ch
1236 1217
         '
1237 1218
         Me.會科1_ch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
@@ -1630,17 +1611,17 @@ Partial Class 銷售單申請
1630 1611
         '
1631 1612
         '客戶資料_dgv
1632 1613
         '
1633
-        DataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1634
-        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle41
1614
+        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1615
+        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
1635 1616
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1636 1617
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1637 1618
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1638
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 18774)
1619
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 19434)
1639 1620
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1640 1621
         Me.客戶資料_dgv.RowHeadersWidth = 5
1641
-        DataGridViewCellStyle42.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1642
-        DataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1643
-        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle42
1622
+        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1623
+        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1624
+        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
1644 1625
         Me.客戶資料_dgv.RowTemplate.Height = 24
1645 1626
         Me.客戶資料_dgv.Size = New System.Drawing.Size(191, 92)
1646 1627
         Me.客戶資料_dgv.TabIndex = 1254
@@ -1648,8 +1629,8 @@ Partial Class 銷售單申請
1648 1629
         '
1649 1630
         '收款事項_dgv
1650 1631
         '
1651
-        DataGridViewCellStyle43.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1652
-        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle43
1632
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1633
+        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
1653 1634
         Me.收款事項_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1654 1635
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1655 1636
         Me.收款事項_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1658,17 +1639,17 @@ Partial Class 銷售單申請
1658 1639
         Me.收款事項_dgv.Location = New System.Drawing.Point(2, 669)
1659 1640
         Me.收款事項_dgv.Name = "收款事項_dgv"
1660 1641
         Me.收款事項_dgv.RowHeadersWidth = 5
1661
-        DataGridViewCellStyle44.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1662
-        DataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1663
-        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle44
1642
+        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1643
+        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1644
+        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
1664 1645
         Me.收款事項_dgv.RowTemplate.Height = 24
1665 1646
         Me.收款事項_dgv.Size = New System.Drawing.Size(750, 102)
1666 1647
         Me.收款事項_dgv.TabIndex = 1282
1667 1648
         '
1668 1649
         '銷售衍生運費_dgv
1669 1650
         '
1670
-        DataGridViewCellStyle45.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1671
-        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle45
1651
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1652
+        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
1672 1653
         Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1673 1654
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1674 1655
         Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1677,17 +1658,17 @@ Partial Class 銷售單申請
1677 1658
         Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(2, 542)
1678 1659
         Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
1679 1660
         Me.銷售衍生運費_dgv.RowHeadersWidth = 5
1680
-        DataGridViewCellStyle46.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1681
-        DataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1682
-        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle46
1661
+        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1662
+        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1663
+        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
1683 1664
         Me.銷售衍生運費_dgv.RowTemplate.Height = 24
1684 1665
         Me.銷售衍生運費_dgv.Size = New System.Drawing.Size(750, 102)
1685 1666
         Me.銷售衍生運費_dgv.TabIndex = 1334
1686 1667
         '
1687 1668
         '銷售備註_dgv
1688 1669
         '
1689
-        DataGridViewCellStyle47.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1690
-        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle47
1670
+        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1671
+        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
1691 1672
         Me.銷售備註_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1692 1673
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1693 1674
         Me.銷售備註_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1696,9 +1677,9 @@ Partial Class 銷售單申請
1696 1677
         Me.銷售備註_dgv.Location = New System.Drawing.Point(2, 414)
1697 1678
         Me.銷售備註_dgv.Name = "銷售備註_dgv"
1698 1679
         Me.銷售備註_dgv.RowHeadersWidth = 5
1699
-        DataGridViewCellStyle48.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1700
-        DataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1701
-        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle48
1680
+        DataGridViewCellStyle16.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1681
+        DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1682
+        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle16
1702 1683
         Me.銷售備註_dgv.RowTemplate.Height = 24
1703 1684
         Me.銷售備註_dgv.Size = New System.Drawing.Size(750, 102)
1704 1685
         Me.銷售備註_dgv.TabIndex = 1250
@@ -1950,6 +1931,48 @@ Partial Class 銷售單申請
1950 1931
         Me.Label31.TabIndex = 1272
1951 1932
         Me.Label31.Text = "備註-收入小計"
1952 1933
         '
1934
+        'Label55
1935
+        '
1936
+        Me.Label55.AutoSize = True
1937
+        Me.Label55.ImeMode = System.Windows.Forms.ImeMode.NoControl
1938
+        Me.Label55.Location = New System.Drawing.Point(243, 433)
1939
+        Me.Label55.Name = "Label55"
1940
+        Me.Label55.Size = New System.Drawing.Size(43, 16)
1941
+        Me.Label55.TabIndex = 1546
1942
+        Me.Label55.Text = "申請人"
1943
+        Me.Label55.Visible = False
1944
+        '
1945
+        '申請人_tb
1946
+        '
1947
+        Me.申請人_tb.Location = New System.Drawing.Point(199, 544)
1948
+        Me.申請人_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1949
+        Me.申請人_tb.Name = "申請人_tb"
1950
+        Me.申請人_tb.Size = New System.Drawing.Size(81, 23)
1951
+        Me.申請人_tb.TabIndex = 1545
1952
+        Me.申請人_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
1953
+        Me.申請人_tb.Visible = False
1954
+        Me.申請人_tb.WordWrap = False
1955
+        '
1956
+        'ComboBox4
1957
+        '
1958
+        Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1959
+        Me.ComboBox4.FormattingEnabled = True
1960
+        Me.ComboBox4.Location = New System.Drawing.Point(202, 504)
1961
+        Me.ComboBox4.Name = "ComboBox4"
1962
+        Me.ComboBox4.Size = New System.Drawing.Size(78, 24)
1963
+        Me.ComboBox4.TabIndex = 1537
1964
+        Me.ComboBox4.Visible = False
1965
+        '
1966
+        '會科碼1_ch
1967
+        '
1968
+        Me.會科碼1_ch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1969
+        Me.會科碼1_ch.FormattingEnabled = True
1970
+        Me.會科碼1_ch.Location = New System.Drawing.Point(202, 465)
1971
+        Me.會科碼1_ch.Name = "會科碼1_ch"
1972
+        Me.會科碼1_ch.Size = New System.Drawing.Size(61, 24)
1973
+        Me.會科碼1_ch.TabIndex = 1535
1974
+        Me.會科碼1_ch.Visible = False
1975
+        '
1953 1976
         '轉換_tb
1954 1977
         '
1955 1978
         Me.轉換_tb.Location = New System.Drawing.Point(89, 53)
@@ -2458,28 +2481,6 @@ Partial Class 銷售單申請
2458 2481
         Me.顯示_bt.Text = "顯示物料控件"
2459 2482
         Me.顯示_bt.UseVisualStyleBackColor = True
2460 2483
         '
2461
-        '稅金25_tb
2462
-        '
2463
-        Me.稅金25_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2464
-        Me.稅金25_tb.ForeColor = System.Drawing.Color.Green
2465
-        Me.稅金25_tb.Location = New System.Drawing.Point(836, 699)
2466
-        Me.稅金25_tb.Name = "稅金25_tb"
2467
-        Me.稅金25_tb.Size = New System.Drawing.Size(81, 23)
2468
-        Me.稅金25_tb.TabIndex = 1561
2469
-        Me.稅金25_tb.Text = "0"
2470
-        Me.稅金25_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
2471
-        '
2472
-        'Label1
2473
-        '
2474
-        Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2475
-        Me.Label1.AutoSize = True
2476
-        Me.Label1.ForeColor = System.Drawing.Color.Green
2477
-        Me.Label1.Location = New System.Drawing.Point(753, 702)
2478
-        Me.Label1.Name = "Label1"
2479
-        Me.Label1.Size = New System.Drawing.Size(77, 16)
2480
-        Me.Label1.TabIndex = 1560
2481
-        Me.Label1.Text = "稅   金   2.5%"
2482
-        '
2483 2484
         '銷售單申請
2484 2485
         '
2485 2486
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)

+ 44
- 20
YD-ERP-SYS/業務系統管理/銷售單申請.vb Bestand weergeven

@@ -12,7 +12,7 @@ Public Class 銷售單申請
12 12
     Dim 匯率1 As Double
13 13
     Dim 新項次, ESTR, ESTR1, 變數, 新流水1 As String
14 14
     Dim 運費, 稅金存檔, 選取位置, NUM1, EDR, EDR1, N1, N2, N3, N4 As Integer
15
-    Dim 刷卡控制, 首次開啟 As Boolean
15
+    Dim 刷卡控制, 首次開啟, 稅金另算有資料 As Boolean
16 16
     Dim xlApp As Microsoft.Office.Interop.Excel.Application
17 17
     Dim xlBook As Microsoft.Office.Interop.Excel.Workbook
18 18
     Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
@@ -46,7 +46,7 @@ Public Class 銷售單申請
46 46
         銷售單據_dgv.Columns(0).Visible = False : 銷售單據_dgv.Columns(1).FillWeight = 100 : 銷售單據_dgv.Columns(2).Visible = False : 銷售單據_dgv.Columns(3).Visible = False
47 47
         銷售單據_dgv.Columns(4).Visible = False : 銷售單據_dgv.Columns(5).Visible = False : 銷售單據_dgv.Columns(6).Visible = False : 銷售單據_dgv.Columns(7).Visible = False
48 48
         銷售單據_dgv.Columns(8).Visible = False : 銷售單據_dgv.Columns(9).Visible = False : 銷售單據_dgv.Columns(10).Visible = False : 銷售單據_dgv.Columns(11).Visible = False
49
-        銷售單據_dgv.Columns(12).FillWeight = 45 : 銷售單據_dgv.Columns(13).FillWeight = 45
49
+        銷售單據_dgv.Columns(12).FillWeight = 45 : 銷售單據_dgv.Columns(13).FillWeight = 45 : 銷售單據_dgv.Columns(14).Visible = False
50 50
         For I As Integer = 0 To 銷售單據_dgv.Rows.Count - 1
51 51
             If IsDBNull(銷售單據_dgv("轉高層", I).Value) = True Then : 銷售單據_dgv("轉高層", I).Value = False : End If
52 52
         Next
@@ -252,7 +252,8 @@ Public Class 銷售單申請
252 252
     Private Sub Set_合記計算()
253 253
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
254 254
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
255
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
255
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0"
256
+        If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
256 257
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
257 258
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
258 259
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -293,7 +294,8 @@ Public Class 銷售單申請
293 294
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
294 295
             通知_lb.Text = "無稅金"
295 296
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
296
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
297
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
298
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
297 299
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
298 300
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
299 301
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
@@ -308,7 +310,7 @@ Public Class 銷售單申請
308 310
             稅金_tb.Text = 稅金存檔
309 311
             銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
310 312
             售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
311
-        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
313
+        End If : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
312 314
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
313 315
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
314 316
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -342,7 +344,7 @@ Public Class 銷售單申請
342 344
         End If
343 345
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
344 346
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
345
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
347
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
346 348
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
347 349
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
348 350
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
@@ -549,8 +551,12 @@ Public Class 銷售單申請
549 551
             運費 = 銷售單據_dgv.Rows(選取位置).Cells("運費").Value.ToString : 客戶流水_tb.Text = ""
550 552
             業務_cb.Text = Strings.Left(銷售單據_dgv.Rows(選取位置).Cells("單號").Value, 1)
551 553
 
552
-            Set_清單4() : Set_清單5()
553
-            Set_清單6() : Set_清單7()
554
+            If 銷售單據_dgv.Rows(選取位置).Cells("稅金另扣").Value.ToString <> "" Then
555
+                稅金另算有資料 = True : 稅金25_tb.Text = 銷售單據_dgv.Rows(選取位置).Cells("稅金另扣").Value.ToString
556
+                稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0")
557
+            Else : 稅金另算有資料 = False : 稅金25_tb.Text = "" : End If
558
+
559
+            Set_清單4() : Set_清單5() : Set_清單6() : Set_清單7()
554 560
             PA = 單號_tb.Text : SQL_銷售單號串聯倉儲表取得倉儲單號()
555 561
             If dr.Read() Then : 調庫單號_tb.Text = dr("執行單號") : Else : 調庫單號_tb.Text = "" : End If
556 562
         End If
@@ -975,7 +981,7 @@ Public Class 銷售單申請
975 981
 
976 982
                 DTP = Strings.Format(開單日期_dtp.Value, "yyyy/MM/dd") : DTP1 = Strings.Format(交貨日期_dtp.Value, "yyyy/MM/dd") : BL1 = 含稅_ch.Checked : 運費 = 司機運費_tb.Text
977 983
                 PA1 = 流水號_tb.Text : PA2 = 單號_tb.Text : PA3 = 客戶編號_tb.Text : PA4 = 流水號_tb.Text : PA5 = 送貨地點_cb.Text : NU1 = 司機運費_tb.Text : NU2 = 管銷費用_tb.Text
978
-                NU3 = 稅金_tb.Text : NU4 = 刷卡傭金_tb.Text : NU5 = 銷售合計_tb.Text : BL7 = 轉高層_cb.Checked : SQL5 = ", 轉高層 = N'" & BL7 & "'"
984
+                NU3 = 稅金_tb.Text : NU4 = 刷卡傭金_tb.Text : NU5 = 銷售合計_tb.Text : BL7 = 轉高層_cb.Checked : SQL5 = ", 轉高層 = N'" & BL7 & "', 稅金另扣 = N'" & 稅金25_tb.Text & "'"
979 985
                 SQL_銷售控制表_修改() '--------------------資料修改
980 986
 
981 987
                 For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
@@ -1204,6 +1210,19 @@ Public Class 銷售單申請
1204 1210
             End If
1205 1211
         End If
1206 1212
     End Sub
1213
+    Private Sub 稅金25_tb_TextChanged(sender As Object, e As EventArgs) Handles 稅金25_tb.TextChanged
1214
+        If 售價小計_tb.Text <> "" And 額外收支_tb.Text <> "" And 其他成本_tb.Text <> "" And 物料成本_tb.Text <> "" And
1215
+           司機運費_tb.Text <> "" And 管銷費用_tb.Text <> "" And 刷卡傭金_tb.Text <> "" And 稅金25_tb.Text <> "" Then
1216
+            預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
1217
+                   CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
1218
+            If 銷售衍生運費_dgv.Rows.Count > 0 Then
1219
+                For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1220
+                    預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1221
+                Next
1222
+            End If
1223
+            預估利潤_tb.Text = Strings.Format(CLng(預估利潤_tb.Text), "#,##0")
1224
+        End If
1225
+    End Sub
1207 1226
     Private Sub 財務單據退回_bt_Click(sender As Object, e As EventArgs) Handles 財務單據退回_bt.Click
1208 1227
         If 營運成本收支單號_tb.Text = "" Then
1209 1228
             MsgBox("沒有選擇要退回的資料,無法操作")
@@ -1221,8 +1240,8 @@ Public Class 銷售單申請
1221 1240
             If Month(申請日期_dtp.Value) < 10 Then : d = "0" & CStr(Month(申請日期_dtp.Value))
1222 1241
             Else : d = CStr(Month(申請日期_dtp.Value))
1223 1242
             End If
1224
-            If CLng(Strings.Right(申請日期_dtp.Value, 2)) < 10 Then : f = "0" & CLng(Strings.Right(申請日期_dtp.Value, 2))
1225
-            Else : f = CLng(Strings.Right(申請日期_dtp.Value, 2))
1243
+            If CLng(Strings.Right(Strings.Format(申請日期_dtp.Value, "yyyy/MM/dd"), 2)) < 10 Then : f = "0" & CLng(Strings.Right(Strings.Format(申請日期_dtp.Value, "yyyy/MM/dd"), 2))
1244
+            Else : f = CLng(Strings.Right(Strings.Format(申請日期_dtp.Value, "yyyy/MM/dd"), 2))
1226 1245
             End If
1227 1246
             If NUM1 < 10 Then : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(申請日期_dtp.Value)), 2) & d & f & "0" & NUM1
1228 1247
             Else : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(申請日期_dtp.Value)), 2) & d & f & NUM1
@@ -1443,7 +1462,8 @@ Public Class 銷售單申請
1443 1462
     Private Sub Reset_bt_Click(sender As Object, e As EventArgs) Handles Reset_bt.Click
1444 1463
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1445 1464
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1446
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
1465
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0"
1466
+        If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
1447 1467
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1448 1468
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1449 1469
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -1484,7 +1504,8 @@ Public Class 銷售單申請
1484 1504
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1485 1505
             通知_lb.Text = "無稅金"
1486 1506
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
1487
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1507
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
1508
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text) : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1488 1509
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1489 1510
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1490 1511
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
@@ -1499,7 +1520,7 @@ Public Class 銷售單申請
1499 1520
             稅金_tb.Text = 稅金存檔
1500 1521
             銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1501 1522
             售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1502
-        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1523
+        End If : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
1503 1524
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1504 1525
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1505 1526
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -1530,7 +1551,7 @@ Public Class 銷售單申請
1530 1551
         存檔1()
1531 1552
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1532 1553
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
1533
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
1554
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
1534 1555
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1535 1556
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1536 1557
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
@@ -1554,8 +1575,10 @@ Public Class 銷售單申請
1554 1575
     End Sub
1555 1576
     Private Sub Reset1_bt_Click(sender As Object, e As EventArgs) Handles Reset1_bt.Click
1556 1577
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1578
+        稅金另算有資料 = False
1557 1579
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1558
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
1580
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0"
1581
+        If 稅金另算有資料 = False Then : 稅金25_tb.Text = "0" : End If
1559 1582
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1560 1583
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1561 1584
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
@@ -1597,14 +1620,15 @@ Public Class 銷售單申請
1597 1620
         If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1598 1621
             通知_lb.Text = "無稅金"
1599 1622
         ElseIf CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) <> 0 Then
1600
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1623
+            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主"
1624
+            稅金_tb.Text = CLng(刷卡總和_tb.Text) / 21 : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text) : 售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1601 1625
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1602 1626
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1603 1627
         ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
1604 1628
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
1605 1629
         End If
1606 1630
 
1607
-        稅金存檔 = CLng(稅金_tb.Text) : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1631
+        稅金存檔 = CLng(稅金_tb.Text) : If 稅金另算有資料 = False Then : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2 : End If
1608 1632
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1609 1633
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1610 1634
             收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
@@ -1638,7 +1662,7 @@ Public Class 銷售單申請
1638 1662
         End If
1639 1663
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1640 1664
         預估利潤_tb.Text = CLng(售價小計_tb.Text) + CLng(額外收支_tb.Text) - CLng(其他成本_tb.Text) - CLng(物料成本_tb.Text) -
1641
-                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + (CLng(稅金_tb.Text) / 2)
1665
+                           CLng(司機運費_tb.Text) - CLng(管銷費用_tb.Text) - CLng(刷卡傭金_tb.Text) + CLng(稅金25_tb.Text)
1642 1666
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1643 1667
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1644 1668
                 預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
@@ -1786,7 +1810,7 @@ Public Class 銷售單申請
1786 1810
         xlSheet.Cells(6, 5) = CInt(稅金_tb.Text) : xlSheet.Cells(6, 6) = "手續:" : xlSheet.Cells(6, 7) = 刷卡傭金_tb.Text : xlSheet.Cells(6, 8) = "總額:"
1787 1811
         xlSheet.Cells(6, 9) = 銷售合計_tb.Text : xlSheet.Cells(6, 10) = "餘額:" : xlSheet.Cells(6, 11) = N2 : xlSheet.Cells(8, 2) = "品號"
1788 1812
         xlSheet.Cells(8, 5) = "品名規格" : xlSheet.Cells(8, 8) = "數量" : xlSheet.Cells(8, 9) = "單價" : xlSheet.Cells(8, 11) = "金額" : xlSheet.Cells(8, 12) = "含管銷"
1789
-        xlSheet.Cells(8, 13) = "成本價" : xlSheet.Cells(8, 14) = "廠商名稱" : xlSheet.Cells(7, 4) = "稅金2.5%:" : xlSheet.Cells(7, 5) = CInt(稅金_tb.Text) / 2
1813
+        xlSheet.Cells(8, 13) = "成本價" : xlSheet.Cells(8, 14) = "廠商名稱" : xlSheet.Cells(7, 4) = "稅金2.5%:" : xlSheet.Cells(7, 5) = CInt(稅金25_tb.Text)
1790 1814
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
1791 1815
             xlSheet.Cells(i + 9, 1) = 銷售明細_dgv.Rows(i).Cells("料號").Value
1792 1816
             xlSheet.Cells(i + 9, 3) = 銷售明細_dgv.Rows(i).Cells("品名").Value & " " & 銷售明細_dgv.Rows(i).Cells("備註").Value

+ 28
- 28
YD-ERP-SYS/財務系統管理/業績獎金彙總表.Designer.vb Bestand weergeven

@@ -22,15 +22,15 @@ 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()
27
-        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
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
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34 34
         Me.彙總1_dgv = New System.Windows.Forms.DataGridView()
35 35
         Me.字體大小調整_lb = New System.Windows.Forms.Label()
36 36
         Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
@@ -84,8 +84,8 @@ Partial Class 業績獎金彙總表
84 84
         '
85 85
         '彙總1_dgv
86 86
         '
87
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
88
-        Me.彙總1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
87
+        DataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
88
+        Me.彙總1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle10
89 89
         Me.彙總1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
90 90
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
91 91
         Me.彙總1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -126,8 +126,8 @@ Partial Class 業績獎金彙總表
126 126
         '
127 127
         '衍生運費_dgv
128 128
         '
129
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
130
-        Me.衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
129
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
130
+        Me.衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
131 131
         Me.衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
132 132
         Me.衍生運費_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
133 133
         Me.衍生運費_dgv.Location = New System.Drawing.Point(470, 33)
@@ -141,8 +141,8 @@ Partial Class 業績獎金彙總表
141 141
         '
142 142
         '其他_dgv
143 143
         '
144
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
145
-        Me.其他_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
144
+        DataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
145
+        Me.其他_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle12
146 146
         Me.其他_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
147 147
         Me.其他_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
148 148
         Me.其他_dgv.Location = New System.Drawing.Point(1177, 33)
@@ -156,8 +156,8 @@ Partial Class 業績獎金彙總表
156 156
         '
157 157
         '外車車資_dgv
158 158
         '
159
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
160
-        Me.外車車資_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
159
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
160
+        Me.外車車資_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
161 161
         Me.外車車資_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
162 162
         Me.外車車資_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
163 163
         Me.外車車資_dgv.Location = New System.Drawing.Point(627, 33)
@@ -171,8 +171,8 @@ Partial Class 業績獎金彙總表
171 171
         '
172 172
         '料號一_dgv
173 173
         '
174
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
175
-        Me.料號一_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
174
+        DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
175
+        Me.料號一_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
176 176
         Me.料號一_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
177 177
         Me.料號一_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
178 178
         Me.料號一_dgv.Location = New System.Drawing.Point(992, 33)
@@ -186,8 +186,8 @@ Partial Class 業績獎金彙總表
186 186
         '
187 187
         '備註運費_dgv
188 188
         '
189
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
190
-        Me.備註運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
189
+        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
190
+        Me.備註運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
191 191
         Me.備註運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
192 192
         Me.備註運費_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
193 193
         Me.備註運費_dgv.Location = New System.Drawing.Point(835, 33)
@@ -260,8 +260,8 @@ Partial Class 業績獎金彙總表
260 260
         '
261 261
         '獎金彙總_dgv
262 262
         '
263
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.Lavender
264
-        Me.獎金彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
263
+        DataGridViewCellStyle16.BackColor = System.Drawing.Color.Lavender
264
+        Me.獎金彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle16
265 265
         Me.獎金彙總_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
266 266
             Or System.Windows.Forms.AnchorStyles.Left) _
267 267
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -300,8 +300,8 @@ Partial Class 業績獎金彙總表
300 300
         '
301 301
         '獎金明細表_dgv
302 302
         '
303
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.LavenderBlush
304
-        Me.獎金明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
303
+        DataGridViewCellStyle17.BackColor = System.Drawing.Color.LavenderBlush
304
+        Me.獎金明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
305 305
         Me.獎金明細表_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
306 306
             Or System.Windows.Forms.AnchorStyles.Left) _
307 307
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -318,8 +318,8 @@ Partial Class 業績獎金彙總表
318 318
         '
319 319
         '過度表_dgv
320 320
         '
321
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
322
-        Me.過度表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
321
+        DataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
322
+        Me.過度表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle18
323 323
         Me.過度表_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
324 324
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
325 325
         Me.過度表_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -525,11 +525,11 @@ Partial Class 業績獎金彙總表
525 525
         Me.Controls.Add(Me.過度表_dgv)
526 526
         Me.Controls.Add(Me.彙總1_dgv)
527 527
         Me.Controls.Add(Me.衍生運費_dgv)
528
-        Me.Controls.Add(Me.中間日期_dtp)
529 528
         Me.Controls.Add(Me.外車車資_dgv)
530 529
         Me.Controls.Add(Me.備註運費_dgv)
531 530
         Me.Controls.Add(Me.料號一_dgv)
532 531
         Me.Controls.Add(Me.其他_dgv)
532
+        Me.Controls.Add(Me.中間日期_dtp)
533 533
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
534 534
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
535 535
         Me.Name = "業績獎金彙總表"

+ 7
- 6
YD-ERP-SYS/財務系統管理/業績獎金彙總表.vb Bestand weergeven

@@ -102,7 +102,7 @@ Public Class 業績獎金彙總表
102 102
 
103 103
         SQL_業績主表2()
104 104
         da.Fill(ds7) : 獎金明細表_dgv.DataSource = ds7.Tables(0) : conn.Close()
105
-        獎金明細表_dgv.Columns(10).Visible = False : 獎金明細表_dgv.Columns(13).FillWeight = 300
105
+        獎金明細表_dgv.Columns(11).Visible = False : 獎金明細表_dgv.Columns(14).FillWeight = 300
106 106
 
107 107
         獎金明細表_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 獎金明細表_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
108 108
         獎金明細表_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 獎金明細表_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
@@ -197,9 +197,9 @@ Public Class 業績獎金彙總表
197 197
         For I As Integer = 0 To 獎金明細表_dgv.Rows.Count - 1
198 198
             獎金明細表_dgv.Rows(I).Cells("毛利").Value = "0" : 獎金明細表_dgv.Rows(I).Cells("獎金").Value = "0"
199 199
             獎金明細表_dgv.Rows(I).Cells("毛利").Value = 獎金明細表_dgv.Rows(I).Cells("銷貨總額").Value - 獎金明細表_dgv.Rows(I).Cells("成本").Value -
200
-                                                             獎金明細表_dgv.Rows(I).Cells("運費").Value - 獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value -
200
+                                                             獎金明細表_dgv.Rows(I).Cells("運費").Value - 獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value -
201 201
                                                              獎金明細表_dgv.Rows(I).Cells("其他(傭金)").Value - 獎金明細表_dgv.Rows(I).Cells("手續費(刷卡)").Value -
202
-                                                             獎金明細表_dgv.Rows(I).Cells("管銷費用").Value
202
+                                                             獎金明細表_dgv.Rows(I).Cells("管銷費用").Value + 獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value
203 203
         Next
204 204
     End Sub
205 205
     Private Sub Set_彙總過度表()
@@ -237,17 +237,18 @@ Public Class 業績獎金彙總表
237 237
                     過度表_dgv.Rows(I).Cells("成本").Value = 過度表_dgv.Rows(I).Cells("成本").Value + 獎金明細表_dgv.Rows(II).Cells("成本").Value
238 238
                     過度表_dgv.Rows(I).Cells("運費").Value = 過度表_dgv.Rows(I).Cells("運費").Value + 獎金明細表_dgv.Rows(II).Cells("運費").Value
239 239
                     過度表_dgv.Rows(I).Cells("稅額(發票)").Value = 過度表_dgv.Rows(I).Cells("稅額(發票)").Value + 獎金明細表_dgv.Rows(II).Cells("稅額(發票)").Value
240
+                    過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value = 過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value + 獎金明細表_dgv.Rows(II).Cells("稅額(2.5%)").Value
240 241
                     過度表_dgv.Rows(I).Cells("其他(傭金)").Value = 過度表_dgv.Rows(I).Cells("其他(傭金)").Value + 獎金明細表_dgv.Rows(II).Cells("其他(傭金)").Value
241 242
                     過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value = 過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value + 獎金明細表_dgv.Rows(II).Cells("手續費(刷卡)").Value
242 243
                 End If
243 244
             Next
244
-            過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value = 過度表_dgv.Rows(I).Cells("稅額(發票)").Value / 2
245
+
245 246
         Next
246 247
         For I As Integer = 0 To 過度表_dgv.Rows.Count - 1
247 248
             過度表_dgv.Rows(I).Cells("毛利").Value = "0" : 過度表_dgv.Rows(I).Cells("獎金").Value = "0"
248 249
             過度表_dgv.Rows(I).Cells("毛利").Value = 過度表_dgv.Rows(I).Cells("銷貨總額").Value - 過度表_dgv.Rows(I).Cells("成本").Value - 過度表_dgv.Rows(I).Cells("運費").Value -
249
-                                                         過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value - 過度表_dgv.Rows(I).Cells("其他(傭金)").Value - 過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value -
250
-                                                         過度表_dgv.Rows(I).Cells("管銷").Value
250
+                                                         過度表_dgv.Rows(I).Cells("稅額(發票)").Value - 過度表_dgv.Rows(I).Cells("其他(傭金)").Value - 過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value -
251
+                                                         過度表_dgv.Rows(I).Cells("管銷").Value + 過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value
251 252
 
252 253
             Dim 毛利遞減 As Integer = 過度表_dgv.Rows(I).Cells("毛利").Value
253 254
             If 過度表_dgv.Rows(I).Cells("階級1").Value = 0 Or 過度表_dgv.Rows(I).Cells("階級1").Value >= 過度表_dgv.Rows(I).Cells("毛利").Value Then

Laden…
Annuleren
Opslaan