B70340 2 年之前
父節點
當前提交
c5388cc713

二進制
.vs/YD-ERP-SYS/FileContentIndex/7ea98856-9885-47e1-b8e9-cad9f82386e3.vsidx 查看文件


二進制
.vs/YD-ERP-SYS/FileContentIndex/afa50fad-5a3f-4b08-bc51-f818a3a4b6e0.vsidx 查看文件


二進制
.vs/YD-ERP-SYS/v17/.suo 查看文件


+ 4
- 4
YD-ERP-SYS/Module/SQL_業績計算系統.vb 查看文件

@@ -2,7 +2,7 @@
2 2
     Friend Sub SQL_業績主表3()
3 3
         ConnOpen()
4 4
         SQL1 = "SELECT     LEFT(銷售控制表.單號, 2) AS 編號, QQ.姓名, SUM(銷售控制表.銷貨總額) AS 銷貨總額, SUM(銷售控制表.運費) 
5
-                           AS 成本, SUM(銷售控制表.管銷費用) AS 管銷, SUM(銷售控制表.運費) AS 運費, SUM(銷售控制表.運費) AS [稅額(發票)],
5
+                           AS 成本, SUM(銷售控制表.管銷費用) AS 管銷, SUM(銷售控制表.運費) AS 運費, SUM(銷售控制表.運費) AS [稅額(2.5%)], SUM(銷售控制表.運費) AS [稅額(發票)],
6 6
                            SUM(銷售控制表.運費) AS [其他(傭金)], SUM(銷售控制表.運費) AS [手續費(刷卡)], SUM(銷售控制表.運費) AS 毛利, 
7 7
                            SUM(銷售控制表.運費) AS 獎金, 銷售控制表.獎金基礎, 業績機算基礎.階級1, 業績機算基礎.比例1, 
8 8
                            業績機算基礎.階級2, 業績機算基礎.比例2, 業績機算基礎.階級3, 業績機算基礎.比例3, 業績機算基礎.階級4, 
@@ -30,7 +30,7 @@
30 30
     Friend Sub SQL_業績主表2()
31 31
         ConnOpen()
32 32
         SQL1 = "SELECT     銷售控制表.單號 AS 編號, QQ.姓名, SUM(銷售控制表.運費) AS 銷貨總額, SUM(銷售控制表.運費) AS 成本, 銷售控制表.管銷費用, 
33
-                           SUM(銷售控制表.運費) AS 運費, SUM(銷售控制表.運費) AS [稅額(發票)], SUM(銷售控制表.運費) AS [其他(傭金)], 
33
+                           SUM(銷售控制表.運費) AS 運費, SUM(銷售控制表.運費) AS [稅額(2.5%)], SUM(銷售控制表.運費) AS [稅額(發票)], SUM(銷售控制表.運費) AS [其他(傭金)], 
34 34
                            SUM(銷售控制表.運費) AS [手續費(刷卡)], SUM(銷售控制表.運費) AS 毛利, SUM(銷售控制表.運費) AS 獎金, 
35 35
                            銷售控制表.獎金基礎, 客戶資料表.名稱, 客戶資料表.地址
36 36
                 FROM       銷售控制表 INNER JOIN
@@ -51,7 +51,7 @@
51 51
     Friend Sub SQL_業績主表1()
52 52
         ConnOpen()
53 53
         SQL1 = "SELECT     LEFT(銷售控制表.單號, 2) AS 編號, QQ.姓名, SUM(銷售控制表.運費) AS 銷貨總額, SUM(銷售控制表.運費) AS 成本, SUM(銷售控制表.運費) AS 管銷, 
54
-                           SUM(銷售控制表.運費) AS 運費, SUM(銷售控制表.運費) AS [稅額(發票)], SUM(銷售控制表.運費) AS [其他(傭金)], 
54
+                           SUM(銷售控制表.運費) AS 運費, SUM(銷售控制表.運費) AS [稅額(2.5%)], SUM(銷售控制表.運費) AS [稅額(發票)], SUM(銷售控制表.運費) AS [其他(傭金)], 
55 55
                            SUM(銷售控制表.運費) AS [手續費(刷卡)], SUM(銷售控制表.運費) AS 毛利, SUM(銷售控制表.運費) AS 獎金
56 56
                 FROM       銷售控制表 LEFT OUTER JOIN
57 57
                                 (SELECT   舊編, 姓名
@@ -70,7 +70,7 @@
70 70
     Friend Sub SQL_業績彙總1()
71 71
         ConnOpen()
72 72
         SQL1 = "SELECT     銷售控制表.單號, 銷貨總額, SUM(銷售明細表.成本 * 銷售明細表.數量) 
73
-                           AS 成本, 銷售控制表.運費, 銷售控制表.稅金, 銷售控制表.刷卡費用, 管銷費用
73
+                           AS 成本, 銷售控制表.運費, 銷售控制表.稅金 / 2 AS [稅金2.5%], 銷售控制表.稅金, 銷售控制表.刷卡費用, 管銷費用
74 74
                 FROM       銷售控制表 LEFT OUTER JOIN
75 75
                            銷售明細表 ON 銷售控制表.單號 = 銷售明細表.單號 LEFT OUTER JOIN
76 76
                            銷售收款事項 ON 銷售控制表.單號 = 銷售收款事項.單號

+ 1
- 1
YD-ERP-SYS/Module/全域變數.vb 查看文件

@@ -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 = "2023071801"
6
+    Public 版本 As String = "2023072101"
7 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 8
     Public 列印用SQL, 列印用SQL2, 公司編號, 公司電話, 公司統編, 公司地址, 關鍵字編號, 進度條後墜 As String
9 9
     '----系統閒置-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

二進制
YD-ERP-SYS/bin/Debug/YD-ERP-SYS.exe 查看文件


二進制
YD-ERP-SYS/bin/Debug/YD-ERP-SYS.pdb 查看文件


二進制
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.exe 查看文件


二進制
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.pdb 查看文件


二進制
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.GenerateResource.cache 查看文件


+ 112
- 79
YD-ERP-SYS/業務系統管理/訂單控制表.Designer.vb 查看文件

@@ -23,18 +23,18 @@ Partial Class 訂單控制表
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25 25
         Me.components = New System.ComponentModel.Container()
26
-        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
-        Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
-        Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
-        Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38 38
         Me.業務_cb = New System.Windows.Forms.ComboBox()
39 39
         Me.銷售單據_dgv = New System.Windows.Forms.DataGridView()
40 40
         Me.未審核_lb = New System.Windows.Forms.Label()
@@ -138,6 +138,9 @@ Partial Class 訂單控制表
138 138
         Me.重新整理_tsm = New System.Windows.Forms.ToolStripMenuItem()
139 139
         Me.Label13 = New System.Windows.Forms.Label()
140 140
         Me.Panel2 = New System.Windows.Forms.Panel()
141
+        Me.查詢1_bt = New System.Windows.Forms.Button()
142
+        Me.帳務關鍵字_tb = New System.Windows.Forms.TextBox()
143
+        Me.Label16 = New System.Windows.Forms.Label()
141 144
         Me.批量刷銷售_bt = New System.Windows.Forms.Button()
142 145
         Me.查詢_bt = New System.Windows.Forms.Button()
143 146
         Me.物料關鍵字_tb = New System.Windows.Forms.TextBox()
@@ -147,9 +150,8 @@ Partial Class 訂單控制表
147 150
         Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
148 151
         Me.顯示_bt = New System.Windows.Forms.Button()
149 152
         Me.隱藏_bt = New System.Windows.Forms.Button()
150
-        Me.查詢1_bt = New System.Windows.Forms.Button()
151
-        Me.帳務關鍵字_tb = New System.Windows.Forms.TextBox()
152
-        Me.Label16 = New System.Windows.Forms.Label()
153
+        Me.稅金25_tb = New System.Windows.Forms.TextBox()
154
+        Me.Label51 = New System.Windows.Forms.Label()
153 155
         CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
154 156
         Me.Panel1.SuspendLayout()
155 157
         CType(Me.銷售衍生運費_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -176,18 +178,19 @@ Partial Class 訂單控制表
176 178
         '
177 179
         '銷售單據_dgv
178 180
         '
179
-        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
180
-        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
181
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
182
+        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
181 183
         Me.銷售單據_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
182 184
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
183 185
         Me.銷售單據_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
186
+        Me.銷售單據_dgv.BackgroundColor = System.Drawing.Color.White
184 187
         Me.銷售單據_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
185 188
         Me.銷售單據_dgv.Location = New System.Drawing.Point(3, 77)
186 189
         Me.銷售單據_dgv.Name = "銷售單據_dgv"
187 190
         Me.銷售單據_dgv.RowHeadersWidth = 5
188
-        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
189
-        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
190
-        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
191
+        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
192
+        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
193
+        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
191 194
         Me.銷售單據_dgv.RowTemplate.Height = 24
192 195
         Me.銷售單據_dgv.Size = New System.Drawing.Size(548, 636)
193 196
         Me.銷售單據_dgv.TabIndex = 1256
@@ -381,6 +384,8 @@ Partial Class 訂單控制表
381 384
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
382 385
         Me.Panel1.AutoScroll = True
383 386
         Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
387
+        Me.Panel1.Controls.Add(Me.稅金25_tb)
388
+        Me.Panel1.Controls.Add(Me.Label51)
384 389
         Me.Panel1.Controls.Add(Me.項次4_tb)
385 390
         Me.Panel1.Controls.Add(Me.Label49)
386 391
         Me.Panel1.Controls.Add(Me.銷售衍生運費_dgv)
@@ -465,18 +470,19 @@ Partial Class 訂單控制表
465 470
         '
466 471
         '銷售衍生運費_dgv
467 472
         '
468
-        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
469
-        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
473
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
474
+        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
470 475
         Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
471 476
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
472 477
         Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
478
+        Me.銷售衍生運費_dgv.BackgroundColor = System.Drawing.Color.White
473 479
         Me.銷售衍生運費_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
474 480
         Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(3, 540)
475 481
         Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
476 482
         Me.銷售衍生運費_dgv.RowHeadersWidth = 5
477
-        DataGridViewCellStyle16.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
478
-        DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
479
-        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle16
483
+        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
484
+        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
485
+        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
480 486
         Me.銷售衍生運費_dgv.RowTemplate.Height = 24
481 487
         Me.銷售衍生運費_dgv.Size = New System.Drawing.Size(574, 102)
482 488
         Me.銷售衍生運費_dgv.TabIndex = 1350
@@ -562,7 +568,7 @@ Partial Class 訂單控制表
562 568
         '
563 569
         Me.其他成本_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
564 570
         Me.其他成本_tb.ForeColor = System.Drawing.Color.Green
565
-        Me.其他成本_tb.Location = New System.Drawing.Point(666, 698)
571
+        Me.其他成本_tb.Location = New System.Drawing.Point(666, 727)
566 572
         Me.其他成本_tb.Name = "其他成本_tb"
567 573
         Me.其他成本_tb.Size = New System.Drawing.Size(81, 23)
568 574
         Me.其他成本_tb.TabIndex = 1337
@@ -574,7 +580,7 @@ Partial Class 訂單控制表
574 580
         Me.Label45.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
575 581
         Me.Label45.AutoSize = True
576 582
         Me.Label45.ForeColor = System.Drawing.Color.Green
577
-        Me.Label45.Location = New System.Drawing.Point(583, 701)
583
+        Me.Label45.Location = New System.Drawing.Point(583, 730)
578 584
         Me.Label45.Name = "Label45"
579 585
         Me.Label45.Size = New System.Drawing.Size(82, 16)
580 586
         Me.Label45.TabIndex = 1336
@@ -584,7 +590,7 @@ Partial Class 訂單控制表
584 590
         '
585 591
         Me.物料成本_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
586 592
         Me.物料成本_tb.ForeColor = System.Drawing.Color.Green
587
-        Me.物料成本_tb.Location = New System.Drawing.Point(666, 673)
593
+        Me.物料成本_tb.Location = New System.Drawing.Point(666, 702)
588 594
         Me.物料成本_tb.Name = "物料成本_tb"
589 595
         Me.物料成本_tb.Size = New System.Drawing.Size(81, 23)
590 596
         Me.物料成本_tb.TabIndex = 1318
@@ -596,7 +602,7 @@ Partial Class 訂單控制表
596 602
         Me.Label43.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
597 603
         Me.Label43.AutoSize = True
598 604
         Me.Label43.ForeColor = System.Drawing.Color.Green
599
-        Me.Label43.Location = New System.Drawing.Point(583, 676)
605
+        Me.Label43.Location = New System.Drawing.Point(583, 705)
600 606
         Me.Label43.Name = "Label43"
601 607
         Me.Label43.Size = New System.Drawing.Size(82, 16)
602 608
         Me.Label43.TabIndex = 1317
@@ -606,7 +612,7 @@ Partial Class 訂單控制表
606 612
         '
607 613
         Me.預估利潤_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
608 614
         Me.預估利潤_tb.ForeColor = System.Drawing.Color.Green
609
-        Me.預估利潤_tb.Location = New System.Drawing.Point(666, 748)
615
+        Me.預估利潤_tb.Location = New System.Drawing.Point(666, 777)
610 616
         Me.預估利潤_tb.Name = "預估利潤_tb"
611 617
         Me.預估利潤_tb.Size = New System.Drawing.Size(81, 23)
612 618
         Me.預估利潤_tb.TabIndex = 1316
@@ -618,7 +624,7 @@ Partial Class 訂單控制表
618 624
         Me.Label42.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
619 625
         Me.Label42.AutoSize = True
620 626
         Me.Label42.ForeColor = System.Drawing.Color.Green
621
-        Me.Label42.Location = New System.Drawing.Point(584, 751)
627
+        Me.Label42.Location = New System.Drawing.Point(584, 780)
622 628
         Me.Label42.Name = "Label42"
623 629
         Me.Label42.Size = New System.Drawing.Size(82, 16)
624 630
         Me.Label42.TabIndex = 1315
@@ -628,7 +634,7 @@ Partial Class 訂單控制表
628 634
         '
629 635
         Me.管銷費用_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
630 636
         Me.管銷費用_tb.ForeColor = System.Drawing.Color.Green
631
-        Me.管銷費用_tb.Location = New System.Drawing.Point(666, 723)
637
+        Me.管銷費用_tb.Location = New System.Drawing.Point(666, 752)
632 638
         Me.管銷費用_tb.Name = "管銷費用_tb"
633 639
         Me.管銷費用_tb.Size = New System.Drawing.Size(81, 23)
634 640
         Me.管銷費用_tb.TabIndex = 1314
@@ -640,7 +646,7 @@ Partial Class 訂單控制表
640 646
         Me.Label41.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
641 647
         Me.Label41.AutoSize = True
642 648
         Me.Label41.ForeColor = System.Drawing.Color.Green
643
-        Me.Label41.Location = New System.Drawing.Point(584, 726)
649
+        Me.Label41.Location = New System.Drawing.Point(584, 755)
644 650
         Me.Label41.Name = "Label41"
645 651
         Me.Label41.Size = New System.Drawing.Size(82, 16)
646 652
         Me.Label41.TabIndex = 1313
@@ -912,17 +918,17 @@ Partial Class 訂單控制表
912 918
         '
913 919
         '客戶資料_dgv
914 920
         '
915
-        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
916
-        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
921
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
922
+        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
917 923
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
918 924
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
919 925
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
920
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 12531)
926
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 12793)
921 927
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
922 928
         Me.客戶資料_dgv.RowHeadersWidth = 5
923
-        DataGridViewCellStyle18.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
924
-        DataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
925
-        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle18
929
+        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
930
+        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
931
+        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
926 932
         Me.客戶資料_dgv.RowTemplate.Height = 24
927 933
         Me.客戶資料_dgv.Size = New System.Drawing.Size(191, 92)
928 934
         Me.客戶資料_dgv.TabIndex = 1254
@@ -1012,38 +1018,40 @@ Partial Class 訂單控制表
1012 1018
         '
1013 1019
         '銷售備註_dgv
1014 1020
         '
1015
-        DataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1016
-        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle19
1021
+        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1022
+        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
1017 1023
         Me.銷售備註_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1018 1024
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1019 1025
         Me.銷售備註_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1026
+        Me.銷售備註_dgv.BackgroundColor = System.Drawing.Color.White
1020 1027
         Me.銷售備註_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1021 1028
         Me.銷售備註_dgv.Location = New System.Drawing.Point(3, 411)
1022 1029
         Me.銷售備註_dgv.Name = "銷售備註_dgv"
1023 1030
         Me.銷售備註_dgv.RowHeadersWidth = 5
1024
-        DataGridViewCellStyle20.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1025
-        DataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1026
-        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle20
1031
+        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1032
+        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1033
+        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
1027 1034
         Me.銷售備註_dgv.RowTemplate.Height = 24
1028 1035
         Me.銷售備註_dgv.Size = New System.Drawing.Size(571, 102)
1029 1036
         Me.銷售備註_dgv.TabIndex = 1250
1030 1037
         '
1031 1038
         '收款事項_dgv
1032 1039
         '
1033
-        DataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1034
-        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle21
1040
+        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1041
+        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
1035 1042
         Me.收款事項_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1036 1043
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1037 1044
         Me.收款事項_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1045
+        Me.收款事項_dgv.BackgroundColor = System.Drawing.Color.White
1038 1046
         Me.收款事項_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1039 1047
         Me.收款事項_dgv.Location = New System.Drawing.Point(3, 668)
1040 1048
         Me.收款事項_dgv.Name = "收款事項_dgv"
1041 1049
         Me.收款事項_dgv.RowHeadersWidth = 5
1042
-        DataGridViewCellStyle22.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1043
-        DataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1044
-        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle22
1050
+        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1051
+        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1052
+        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
1045 1053
         Me.收款事項_dgv.RowTemplate.Height = 24
1046
-        Me.收款事項_dgv.Size = New System.Drawing.Size(574, 102)
1054
+        Me.收款事項_dgv.Size = New System.Drawing.Size(574, 131)
1047 1055
         Me.收款事項_dgv.TabIndex = 1282
1048 1056
         '
1049 1057
         'Label28
@@ -1078,18 +1086,19 @@ Partial Class 訂單控制表
1078 1086
         '
1079 1087
         '銷售明細_dgv
1080 1088
         '
1081
-        DataGridViewCellStyle23.BackColor = System.Drawing.Color.White
1082
-        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23
1089
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.White
1090
+        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
1083 1091
         Me.銷售明細_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1084 1092
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1085 1093
         Me.銷售明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1094
+        Me.銷售明細_dgv.BackgroundColor = System.Drawing.Color.White
1086 1095
         Me.銷售明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1087 1096
         Me.銷售明細_dgv.Location = New System.Drawing.Point(3, 29)
1088 1097
         Me.銷售明細_dgv.Name = "銷售明細_dgv"
1089 1098
         Me.銷售明細_dgv.RowHeadersWidth = 5
1090
-        DataGridViewCellStyle24.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1091
-        DataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1092
-        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle24
1099
+        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1100
+        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1101
+        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
1093 1102
         Me.銷售明細_dgv.RowTemplate.Height = 24
1094 1103
         Me.銷售明細_dgv.Size = New System.Drawing.Size(760, 355)
1095 1104
         Me.銷售明細_dgv.TabIndex = 1199
@@ -1328,6 +1337,34 @@ Partial Class 訂單控制表
1328 1337
         Me.Panel2.Size = New System.Drawing.Size(556, 719)
1329 1338
         Me.Panel2.TabIndex = 1339
1330 1339
         '
1340
+        '查詢1_bt
1341
+        '
1342
+        Me.查詢1_bt.Location = New System.Drawing.Point(365, 51)
1343
+        Me.查詢1_bt.Name = "查詢1_bt"
1344
+        Me.查詢1_bt.Size = New System.Drawing.Size(81, 25)
1345
+        Me.查詢1_bt.TabIndex = 1345
1346
+        Me.查詢1_bt.Text = "查詢"
1347
+        Me.查詢1_bt.UseVisualStyleBackColor = True
1348
+        '
1349
+        '帳務關鍵字_tb
1350
+        '
1351
+        Me.帳務關鍵字_tb.ForeColor = System.Drawing.Color.Black
1352
+        Me.帳務關鍵字_tb.Location = New System.Drawing.Point(70, 52)
1353
+        Me.帳務關鍵字_tb.Name = "帳務關鍵字_tb"
1354
+        Me.帳務關鍵字_tb.Size = New System.Drawing.Size(292, 23)
1355
+        Me.帳務關鍵字_tb.TabIndex = 1344
1356
+        '
1357
+        'Label16
1358
+        '
1359
+        Me.Label16.AutoSize = True
1360
+        Me.Label16.ForeColor = System.Drawing.Color.Black
1361
+        Me.Label16.ImeMode = System.Windows.Forms.ImeMode.NoControl
1362
+        Me.Label16.Location = New System.Drawing.Point(0, 56)
1363
+        Me.Label16.Name = "Label16"
1364
+        Me.Label16.Size = New System.Drawing.Size(67, 16)
1365
+        Me.Label16.TabIndex = 1343
1366
+        Me.Label16.Text = "帳務關鍵字"
1367
+        '
1331 1368
         '批量刷銷售_bt
1332 1369
         '
1333 1370
         Me.批量刷銷售_bt.Location = New System.Drawing.Point(473, 26)
@@ -1446,33 +1483,27 @@ Partial Class 訂單控制表
1446 1483
         Me.隱藏_bt.Text = "隱藏" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "控件"
1447 1484
         Me.隱藏_bt.UseVisualStyleBackColor = True
1448 1485
         '
1449
-        '查詢1_bt
1486
+        '稅金25_tb
1450 1487
         '
1451
-        Me.查詢1_bt.Location = New System.Drawing.Point(365, 51)
1452
-        Me.查詢1_bt.Name = "查詢1_bt"
1453
-        Me.查詢1_bt.Size = New System.Drawing.Size(81, 25)
1454
-        Me.查詢1_bt.TabIndex = 1345
1455
-        Me.查詢1_bt.Text = "查詢"
1456
-        Me.查詢1_bt.UseVisualStyleBackColor = True
1488
+        Me.稅金25_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1489
+        Me.稅金25_tb.ForeColor = System.Drawing.Color.Green
1490
+        Me.稅金25_tb.Location = New System.Drawing.Point(666, 676)
1491
+        Me.稅金25_tb.Name = "稅金25_tb"
1492
+        Me.稅金25_tb.Size = New System.Drawing.Size(81, 23)
1493
+        Me.稅金25_tb.TabIndex = 1565
1494
+        Me.稅金25_tb.Text = "0"
1495
+        Me.稅金25_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
1457 1496
         '
1458
-        '帳務關鍵字_tb
1497
+        'Label51
1459 1498
         '
1460
-        Me.帳務關鍵字_tb.ForeColor = System.Drawing.Color.Black
1461
-        Me.帳務關鍵字_tb.Location = New System.Drawing.Point(70, 52)
1462
-        Me.帳務關鍵字_tb.Name = "帳務關鍵字_tb"
1463
-        Me.帳務關鍵字_tb.Size = New System.Drawing.Size(292, 23)
1464
-        Me.帳務關鍵字_tb.TabIndex = 1344
1465
-        '
1466
-        'Label16
1467
-        '
1468
-        Me.Label16.AutoSize = True
1469
-        Me.Label16.ForeColor = System.Drawing.Color.Black
1470
-        Me.Label16.ImeMode = System.Windows.Forms.ImeMode.NoControl
1471
-        Me.Label16.Location = New System.Drawing.Point(0, 56)
1472
-        Me.Label16.Name = "Label16"
1473
-        Me.Label16.Size = New System.Drawing.Size(67, 16)
1474
-        Me.Label16.TabIndex = 1343
1475
-        Me.Label16.Text = "帳務關鍵字"
1499
+        Me.Label51.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1500
+        Me.Label51.AutoSize = True
1501
+        Me.Label51.ForeColor = System.Drawing.Color.Green
1502
+        Me.Label51.Location = New System.Drawing.Point(583, 679)
1503
+        Me.Label51.Name = "Label51"
1504
+        Me.Label51.Size = New System.Drawing.Size(77, 16)
1505
+        Me.Label51.TabIndex = 1564
1506
+        Me.Label51.Text = "稅   金   2.5%"
1476 1507
         '
1477 1508
         '訂單控制表
1478 1509
         '
@@ -1619,4 +1650,6 @@ Partial Class 訂單控制表
1619 1650
     Friend WithEvents 查詢1_bt As Button
1620 1651
     Friend WithEvents 帳務關鍵字_tb As TextBox
1621 1652
     Friend WithEvents Label16 As Label
1653
+    Friend WithEvents 稅金25_tb As TextBox
1654
+    Friend WithEvents Label51 As Label
1622 1655
 End Class

+ 73
- 72
YD-ERP-SYS/業務系統管理/訂單控制表.vb 查看文件

@@ -188,63 +188,63 @@ 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"
191
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
192 192
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
193 193
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
194 194
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
195
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
195
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
196 196
             End If
197 197
         Next
198
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.02))
198
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.02))
199 199
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
200 200
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
201
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
202
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
201
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
202
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
203 203
             If 銷售明細_dgv("無管銷", i).Value = False Then
204 204
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
205 205
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
206 206
                 End If
207 207
             End If
208 208
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
209
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
209
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
210 210
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
211 211
             End If
212 212
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
213
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
213
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
214 214
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
215 215
             End If
216 216
 
217 217
             If 銷售明細_dgv("含稅", i).Value = True Then
218
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
218
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
219 219
             End If
220 220
         Next
221 221
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
222 222
 
223
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
223
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
224 224
             通知_lb.Text = "無稅金"
225
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
226
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
227
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
225
+        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
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
228 228
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
229
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
229
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
230 230
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
231 231
         End If
232 232
 
233
-        If 稅金存檔 <> Val(稅金_tb.Text) Then
233
+        If 稅金存檔 <> CLng(稅金_tb.Text) Then
234 234
             稅金_tb.Text = 稅金存檔
235
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
236
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
237
-        ElseIf 稅金存檔 = Val(稅金_tb.Text) Then
235
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
236
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
237
+        ElseIf 稅金存檔 = CLng(稅金_tb.Text) Then
238 238
             稅金_tb.Text = 稅金存檔
239
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
240
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
241
-        End If
239
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
240
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
241
+        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
242 242
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
243 243
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
244
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
245
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
244
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
245
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
246 246
         Next
247
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
247
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
248 248
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
249 249
         Dim 金額 As Integer = 0
250 250
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -253,7 +253,7 @@ Public Class 訂單控制表
253 253
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
254 254
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
255 255
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
256
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
256
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
257 257
             End If
258 258
         Next
259 259
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -261,28 +261,29 @@ Public Class 訂單控制表
261 261
             司機運費_tb.Text = "0"
262 262
         Else
263 263
             If 運費 = 0 Then
264
-                If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
264
+                If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
265 265
                     司機運費_tb.Text = 最低運費_cb.Text
266
-                ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
267
-                    司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
266
+                ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
267
+                    司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
268 268
                 End If
269 269
             Else
270 270
                 司機運費_tb.Text = 運費
271 271
             End If
272 272
         End If
273 273
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
274
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
274
+        預估利潤_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)
275 276
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
276 277
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
277
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
278
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
278 279
             Next
279 280
         End If
280 281
         '-------007-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
281
-        售價小計_tb.Text = Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(Val(銷售合計_tb.Text), "#,##0")
282
-        收入小計_tb.Text = Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(Val(額外收支_tb.Text), "#,##0")
283
-        司機運費_tb.Text = Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(Val(預估利潤_tb.Text), "#,##0")
284
-        物料成本_tb.Text = Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(Val(刷卡總和_tb.Text), "#,##0")
285
-        刷卡稅金_tb.Text = Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(Val(刷卡傭金_tb.Text), "#,##0")
282
+        售價小計_tb.Text = Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(CLng(銷售合計_tb.Text), "#,##0")
283
+        收入小計_tb.Text = Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(CLng(額外收支_tb.Text), "#,##0")
284
+        司機運費_tb.Text = Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(CLng(預估利潤_tb.Text), "#,##0")
285
+        物料成本_tb.Text = Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(CLng(刷卡總和_tb.Text), "#,##0")
286
+        刷卡稅金_tb.Text = Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0.0")
286 287
     End Sub
287 288
     Private Sub 業務_cb_下拉表單資料載入()
288 289
         SQL_業務編號_下拉清單()
@@ -317,61 +318,61 @@ Public Class 訂單控制表
317 318
     Private Sub 銷售單據_dgv_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 銷售單據_dgv.MouseUp
318 319
         If 銷售單據_dgv.SelectedCells.Count = 1 Then : 已超出 = False : End If
319 320
         If 銷售單據_dgv.SelectedCells.Count > 0 Then
320
-                If 銷售單據_dgv.SelectedCells(0).ColumnIndex = 9 Or 銷售單據_dgv.SelectedCells(0).ColumnIndex = 22 Then
321
-                    If 已超出 = False Then
322
-                        Dim x As Double = 0
323
-                        For i As Integer = 0 To 銷售單據_dgv.SelectedCells.Count - 1
324
-                            x += Val(銷售單據_dgv.Rows(銷售單據_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售單據_dgv.SelectedCells.Item(i).ColumnIndex).Value)
325
-                        Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
326
-                    Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
327
-                Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
328
-                End If
321
+            If 銷售單據_dgv.SelectedCells(0).ColumnIndex = 9 Or 銷售單據_dgv.SelectedCells(0).ColumnIndex = 22 Then
322
+                If 已超出 = False Then
323
+                    Dim x As Double = 0
324
+                    For i As Integer = 0 To 銷售單據_dgv.SelectedCells.Count - 1
325
+                        x += CLng(銷售單據_dgv.Rows(銷售單據_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售單據_dgv.SelectedCells.Item(i).ColumnIndex).Value)
326
+                    Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
327
+                Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
328
+            Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
329 329
             End If
330
+        End If
330 331
         'If 銷售單據_dgv.SelectedCells.Count = 1 Then : MsgBox(銷售單據_dgv.SelectedCells(0).ColumnIndex & "  " & 銷售單據_dgv.SelectedCells(0).RowIndex) : End If
331 332
     End Sub
332 333
     Private Sub 銷售明細_dgv_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 銷售明細_dgv.MouseUp
333 334
         If 銷售明細_dgv.SelectedCells.Count = 1 Then : 已超出 = False : End If
334 335
         If 銷售明細_dgv.SelectedCells.Count > 0 Then
335
-                If 銷售明細_dgv.SelectedCells(0).ColumnIndex = 12 Then
336
-                    If 已超出 = False Then
337
-                        Dim x As Double = 0
338
-                        For i As Integer = 0 To 銷售明細_dgv.SelectedCells.Count - 1
339
-                            x += Val(銷售明細_dgv.Rows(銷售明細_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售明細_dgv.SelectedCells.Item(i).ColumnIndex).Value)
340
-                        Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
341
-                    Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
342
-                Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
343
-                End If
336
+            If 銷售明細_dgv.SelectedCells(0).ColumnIndex = 12 Then
337
+                If 已超出 = False Then
338
+                    Dim x As Double = 0
339
+                    For i As Integer = 0 To 銷售明細_dgv.SelectedCells.Count - 1
340
+                        x += CLng(銷售明細_dgv.Rows(銷售明細_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售明細_dgv.SelectedCells.Item(i).ColumnIndex).Value)
341
+                    Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
342
+                Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
343
+            Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
344 344
             End If
345
+        End If
345 346
         'If 銷售明細_dgv.SelectedCells.Count = 1 Then : MsgBox(銷售明細_dgv.SelectedCells(0).ColumnIndex & "  " & 銷售明細_dgv.SelectedCells(0).RowIndex) : End If
346 347
     End Sub
347 348
     Private Sub 銷售備註_dgv_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 銷售備註_dgv.MouseUp
348 349
         If 銷售備註_dgv.SelectedCells.Count = 1 Then : 已超出 = False : End If
349 350
         If 銷售備註_dgv.SelectedCells.Count > 0 Then
350
-                If 銷售備註_dgv.SelectedCells(0).ColumnIndex >= 3 And 銷售備註_dgv.SelectedCells(0).ColumnIndex <= 4 Then
351
-                    If 已超出 = False Then
352
-                        Dim x As Double = 0
353
-                        For i As Integer = 0 To 銷售備註_dgv.SelectedCells.Count - 1
354
-                            x += Val(銷售備註_dgv.Rows(銷售備註_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售備註_dgv.SelectedCells.Item(i).ColumnIndex).Value)
355
-                        Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
356
-                    Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
357
-                Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
358
-                End If
351
+            If 銷售備註_dgv.SelectedCells(0).ColumnIndex >= 3 And 銷售備註_dgv.SelectedCells(0).ColumnIndex <= 4 Then
352
+                If 已超出 = False Then
353
+                    Dim x As Double = 0
354
+                    For i As Integer = 0 To 銷售備註_dgv.SelectedCells.Count - 1
355
+                        x += CLng(銷售備註_dgv.Rows(銷售備註_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售備註_dgv.SelectedCells.Item(i).ColumnIndex).Value)
356
+                    Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
357
+                Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
358
+            Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
359 359
             End If
360
+        End If
360 361
         'If 銷售備註_dgv.SelectedCells.Count = 1 Then : MsgBox(銷售備註_dgv.SelectedCells(0).ColumnIndex & "  " & 銷售備註_dgv.SelectedCells(0).RowIndex) : End If
361 362
     End Sub
362 363
     Private Sub 銷售衍生運費_dgv_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 銷售衍生運費_dgv.MouseUp
363 364
         If 銷售衍生運費_dgv.SelectedCells.Count = 1 Then : 已超出 = False : End If
364 365
         If 銷售衍生運費_dgv.SelectedCells.Count > 0 Then
365
-                If 銷售衍生運費_dgv.SelectedCells(0).ColumnIndex = 4 Then
366
-                    If 已超出 = False Then
367
-                        Dim x As Double = 0
368
-                        For i As Integer = 0 To 銷售衍生運費_dgv.SelectedCells.Count - 1
369
-                            x += Val(銷售衍生運費_dgv.Rows(銷售衍生運費_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售衍生運費_dgv.SelectedCells.Item(i).ColumnIndex).Value)
370
-                        Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
371
-                    Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
372
-                Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
373
-                End If
366
+            If 銷售衍生運費_dgv.SelectedCells(0).ColumnIndex = 4 Then
367
+                If 已超出 = False Then
368
+                    Dim x As Double = 0
369
+                    For i As Integer = 0 To 銷售衍生運費_dgv.SelectedCells.Count - 1
370
+                        x += CLng(銷售衍生運費_dgv.Rows(銷售衍生運費_dgv.SelectedCells.Item(i).RowIndex).Cells(銷售衍生運費_dgv.SelectedCells.Item(i).ColumnIndex).Value)
371
+                    Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
372
+                Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
373
+            Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
374 374
             End If
375
+        End If
375 376
         'If 銷售衍生運費_dgv.SelectedCells.Count = 1 Then : MsgBox(銷售衍生運費_dgv.SelectedCells(0).ColumnIndex & "  " & 銷售衍生運費_dgv.SelectedCells(0).RowIndex) : End If
376 377
     End Sub
377 378
     Private Sub 收款事項_dgv_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 收款事項_dgv.MouseUp
@@ -382,7 +383,7 @@ Public Class 訂單控制表
382 383
                 If 已超出 = False Then
383 384
                     Dim x As Double = 0
384 385
                     For i As Integer = 0 To 收款事項_dgv.SelectedCells.Count - 1
385
-                        x += Val(收款事項_dgv.Rows(收款事項_dgv.SelectedCells.Item(i).RowIndex).Cells(收款事項_dgv.SelectedCells.Item(i).ColumnIndex).Value)
386
+                        x += CLng(收款事項_dgv.Rows(收款事項_dgv.SelectedCells.Item(i).RowIndex).Cells(收款事項_dgv.SelectedCells.Item(i).ColumnIndex).Value)
386 387
                     Next i : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(x, "#,##0")
387 388
                 Else : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0") : End If
388 389
             Else : 已超出 = True : YD_ERP_SYS.合計_TSSL.Text = "合計 : " & Strings.Format(0, "#,##0")
@@ -399,7 +400,7 @@ Public Class 訂單控制表
399 400
         End If
400 401
     End Sub
401 402
     Private Sub 銷售備註_dgvCellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 銷售備註_dgv.CellEndEdit
402
-        If (Val(銷售備註_dgv.Rows(e.RowIndex).Cells("收入").Value) <> 0 And Val(銷售備註_dgv.Rows(e.RowIndex).Cells("支出").Value) <> 0) Then
403
+        If (CLng(銷售備註_dgv.Rows(e.RowIndex).Cells("收入").Value) <> 0 And CLng(銷售備註_dgv.Rows(e.RowIndex).Cells("支出").Value) <> 0) Then
403 404
             MsgBox("支出與收入不能同時有金額")
404 405
             Set_清單5()
405 406
             Exit Sub

+ 109
- 76
YD-ERP-SYS/業務系統管理/銷售單審核.Designer.vb 查看文件

@@ -202,6 +202,8 @@ Partial Class 銷售單審核
202 202
         Me.運費資料流水號_tb = New System.Windows.Forms.TextBox()
203 203
         Me.Panel3 = New System.Windows.Forms.Panel()
204 204
         Me.顯示_bt = New System.Windows.Forms.Button()
205
+        Me.稅金25_tb = New System.Windows.Forms.TextBox()
206
+        Me.Label51 = New System.Windows.Forms.Label()
205 207
         CType(Me.售價_nud, System.ComponentModel.ISupportInitialize).BeginInit()
206 208
         CType(Me.區域庫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
207 209
         CType(Me.成本_nud, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -260,7 +262,7 @@ Partial Class 銷售單審核
260 262
         Me.Label22.ForeColor = System.Drawing.Color.Green
261 263
         Me.Label22.Location = New System.Drawing.Point(322, 623)
262 264
         Me.Label22.Name = "Label22"
263
-        Me.Label22.Size = New System.Drawing.Size(68, 16)
265
+        Me.Label22.Size = New System.Drawing.Size(67, 16)
264 266
         Me.Label22.TabIndex = 1324
265 267
         Me.Label22.Text = "售            價"
266 268
         '
@@ -300,7 +302,7 @@ Partial Class 銷售單審核
300 302
         Me.盤損數_lb.ForeColor = System.Drawing.Color.Green
301 303
         Me.盤損數_lb.Location = New System.Drawing.Point(323, 575)
302 304
         Me.盤損數_lb.Name = "盤損數_lb"
303
-        Me.盤損數_lb.Size = New System.Drawing.Size(68, 16)
305
+        Me.盤損數_lb.Size = New System.Drawing.Size(67, 16)
304 306
         Me.盤損數_lb.TabIndex = 1320
305 307
         Me.盤損數_lb.Text = "訂  購 數 量"
306 308
         '
@@ -358,7 +360,7 @@ Partial Class 銷售單審核
358 360
         Me.盤盈數_lb.ForeColor = System.Drawing.Color.Green
359 361
         Me.盤盈數_lb.Location = New System.Drawing.Point(323, 599)
360 362
         Me.盤盈數_lb.Name = "盤盈數_lb"
361
-        Me.盤盈數_lb.Size = New System.Drawing.Size(68, 16)
363
+        Me.盤盈數_lb.Size = New System.Drawing.Size(67, 16)
362 364
         Me.盤盈數_lb.TabIndex = 1312
363 365
         Me.盤盈數_lb.Text = "成            本"
364 366
         '
@@ -369,7 +371,7 @@ Partial Class 銷售單審核
369 371
         Me.庫存量_lb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
370 372
         Me.庫存量_lb.Location = New System.Drawing.Point(323, 504)
371 373
         Me.庫存量_lb.Name = "庫存量_lb"
372
-        Me.庫存量_lb.Size = New System.Drawing.Size(68, 16)
374
+        Me.庫存量_lb.Size = New System.Drawing.Size(67, 16)
373 375
         Me.庫存量_lb.TabIndex = 1315
374 376
         Me.庫存量_lb.Text = "庫    存    量"
375 377
         '
@@ -380,7 +382,7 @@ Partial Class 銷售單審核
380 382
         Me.最大庫存量_lb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
381 383
         Me.最大庫存量_lb.Location = New System.Drawing.Point(323, 528)
382 384
         Me.最大庫存量_lb.Name = "最大庫存量_lb"
383
-        Me.最大庫存量_lb.Size = New System.Drawing.Size(68, 16)
385
+        Me.最大庫存量_lb.Size = New System.Drawing.Size(67, 16)
384 386
         Me.最大庫存量_lb.TabIndex = 1317
385 387
         Me.最大庫存量_lb.Text = "最大庫存量"
386 388
         '
@@ -391,7 +393,7 @@ Partial Class 銷售單審核
391 393
         Me.可盤損數_lb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
392 394
         Me.可盤損數_lb.Location = New System.Drawing.Point(323, 552)
393 395
         Me.可盤損數_lb.Name = "可盤損數_lb"
394
-        Me.可盤損數_lb.Size = New System.Drawing.Size(71, 16)
396
+        Me.可盤損數_lb.Size = New System.Drawing.Size(70, 16)
395 397
         Me.可盤損數_lb.TabIndex = 1318
396 398
         Me.可盤損數_lb.Text = "可  出  庫 數"
397 399
         '
@@ -412,7 +414,7 @@ Partial Class 銷售單審核
412 414
         Me.Label12.AutoSize = True
413 415
         Me.Label12.Location = New System.Drawing.Point(322, 453)
414 416
         Me.Label12.Name = "Label12"
415
-        Me.Label12.Size = New System.Drawing.Size(56, 16)
417
+        Me.Label12.Size = New System.Drawing.Size(55, 16)
416 418
         Me.Label12.TabIndex = 1311
417 419
         Me.Label12.Text = "倉儲狀態"
418 420
         '
@@ -433,7 +435,7 @@ Partial Class 銷售單審核
433 435
         Me.Label13.AutoSize = True
434 436
         Me.Label13.Location = New System.Drawing.Point(322, 479)
435 437
         Me.Label13.Name = "Label13"
436
-        Me.Label13.Size = New System.Drawing.Size(56, 16)
438
+        Me.Label13.Size = New System.Drawing.Size(55, 16)
437 439
         Me.Label13.TabIndex = 1309
438 440
         Me.Label13.Text = "訂製狀態"
439 441
         '
@@ -443,7 +445,7 @@ Partial Class 銷售單審核
443 445
         Me.Label14.ImeMode = System.Windows.Forms.ImeMode.NoControl
444 446
         Me.Label14.Location = New System.Drawing.Point(473, 56)
445 447
         Me.Label14.Name = "Label14"
446
-        Me.Label14.Size = New System.Drawing.Size(44, 16)
448
+        Me.Label14.Size = New System.Drawing.Size(43, 16)
447 449
         Me.Label14.TabIndex = 1307
448 450
         Me.Label14.Text = "筆資料"
449 451
         '
@@ -461,7 +463,7 @@ Partial Class 銷售單審核
461 463
         Me.Label15.ImeMode = System.Windows.Forms.ImeMode.NoControl
462 464
         Me.Label15.Location = New System.Drawing.Point(416, 56)
463 465
         Me.Label15.Name = "Label15"
464
-        Me.Label15.Size = New System.Drawing.Size(20, 16)
466
+        Me.Label15.Size = New System.Drawing.Size(19, 16)
465 467
         Me.Label15.TabIndex = 1305
466 468
         Me.Label15.Text = "共"
467 469
         '
@@ -494,7 +496,7 @@ Partial Class 銷售單審核
494 496
         Me.指定倉庫_lb.AutoSize = True
495 497
         Me.指定倉庫_lb.Location = New System.Drawing.Point(322, 412)
496 498
         Me.指定倉庫_lb.Name = "指定倉庫_lb"
497
-        Me.指定倉庫_lb.Size = New System.Drawing.Size(56, 16)
499
+        Me.指定倉庫_lb.Size = New System.Drawing.Size(55, 16)
498 500
         Me.指定倉庫_lb.TabIndex = 1303
499 501
         Me.指定倉庫_lb.Text = "庫存區域"
500 502
         '
@@ -518,7 +520,7 @@ Partial Class 銷售單審核
518 520
         Me.Label16.ImeMode = System.Windows.Forms.ImeMode.NoControl
519 521
         Me.Label16.Location = New System.Drawing.Point(116, 56)
520 522
         Me.Label16.Name = "Label16"
521
-        Me.Label16.Size = New System.Drawing.Size(32, 16)
523
+        Me.Label16.Size = New System.Drawing.Size(31, 16)
522 524
         Me.Label16.TabIndex = 1297
523 525
         Me.Label16.Text = "品名"
524 526
         '
@@ -535,7 +537,7 @@ Partial Class 銷售單審核
535 537
         Me.Label17.ImeMode = System.Windows.Forms.ImeMode.NoControl
536 538
         Me.Label17.Location = New System.Drawing.Point(-1, 57)
537 539
         Me.Label17.Name = "Label17"
538
-        Me.Label17.Size = New System.Drawing.Size(32, 16)
540
+        Me.Label17.Size = New System.Drawing.Size(31, 16)
539 541
         Me.Label17.TabIndex = 1295
540 542
         Me.Label17.Text = "料號"
541 543
         '
@@ -545,7 +547,7 @@ Partial Class 銷售單審核
545 547
         Me.Label29.ImeMode = System.Windows.Forms.ImeMode.NoControl
546 548
         Me.Label29.Location = New System.Drawing.Point(252, 5)
547 549
         Me.Label29.Name = "Label29"
548
-        Me.Label29.Size = New System.Drawing.Size(68, 16)
550
+        Me.Label29.Size = New System.Drawing.Size(67, 16)
549 551
         Me.Label29.TabIndex = 1294
550 552
         Me.Label29.Text = "關鍵字查詢"
551 553
         '
@@ -571,7 +573,7 @@ Partial Class 銷售單審核
571 573
         Me.Label18.ForeColor = System.Drawing.Color.Red
572 574
         Me.Label18.Location = New System.Drawing.Point(117, 6)
573 575
         Me.Label18.Name = "Label18"
574
-        Me.Label18.Size = New System.Drawing.Size(56, 16)
576
+        Me.Label18.Size = New System.Drawing.Size(55, 16)
575 577
         Me.Label18.TabIndex = 1291
576 578
         Me.Label18.Text = "廠商編碼"
577 579
         '
@@ -590,7 +592,7 @@ Partial Class 銷售單審核
590 592
         Me.Label19.ForeColor = System.Drawing.Color.Red
591 593
         Me.Label19.Location = New System.Drawing.Point(-1, 31)
592 594
         Me.Label19.Name = "Label19"
593
-        Me.Label19.Size = New System.Drawing.Size(44, 16)
595
+        Me.Label19.Size = New System.Drawing.Size(43, 16)
594 596
         Me.Label19.TabIndex = 1289
595 597
         Me.Label19.Text = "供應商"
596 598
         '
@@ -621,7 +623,7 @@ Partial Class 銷售單審核
621 623
         Me.Label21.ForeColor = System.Drawing.Color.Red
622 624
         Me.Label21.Location = New System.Drawing.Point(0, 6)
623 625
         Me.Label21.Name = "Label21"
624
-        Me.Label21.Size = New System.Drawing.Size(32, 16)
626
+        Me.Label21.Size = New System.Drawing.Size(31, 16)
625 627
         Me.Label21.TabIndex = 1284
626 628
         Me.Label21.Text = "地區"
627 629
         '
@@ -632,6 +634,7 @@ Partial Class 銷售單審核
632 634
         Me.物料清單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
633 635
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
634 636
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
637
+        Me.物料清單_dgv.BackgroundColor = System.Drawing.Color.White
635 638
         Me.物料清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
636 639
         Me.物料清單_dgv.Location = New System.Drawing.Point(2, 77)
637 640
         Me.物料清單_dgv.Name = "物料清單_dgv"
@@ -649,7 +652,7 @@ Partial Class 銷售單審核
649 652
         Me.需要全部庫存區域清單_ch.AutoSize = True
650 653
         Me.需要全部庫存區域清單_ch.Location = New System.Drawing.Point(348, 432)
651 654
         Me.需要全部庫存區域清單_ch.Name = "需要全部庫存區域清單_ch"
652
-        Me.需要全部庫存區域清單_ch.Size = New System.Drawing.Size(147, 20)
655
+        Me.需要全部庫存區域清單_ch.Size = New System.Drawing.Size(146, 20)
653 656
         Me.需要全部庫存區域清單_ch.TabIndex = 1322
654 657
         Me.需要全部庫存區域清單_ch.Text = "需要全部庫存區域清單"
655 658
         Me.需要全部庫存區域清單_ch.UseVisualStyleBackColor = True
@@ -692,7 +695,7 @@ Partial Class 銷售單審核
692 695
         Me.含稅_ch.AutoSize = True
693 696
         Me.含稅_ch.Location = New System.Drawing.Point(190, 103)
694 697
         Me.含稅_ch.Name = "含稅_ch"
695
-        Me.含稅_ch.Size = New System.Drawing.Size(51, 20)
698
+        Me.含稅_ch.Size = New System.Drawing.Size(50, 20)
696 699
         Me.含稅_ch.TabIndex = 1278
697 700
         Me.含稅_ch.Text = "含稅"
698 701
         Me.含稅_ch.UseVisualStyleBackColor = True
@@ -712,7 +715,7 @@ Partial Class 銷售單審核
712 715
         Me.Label9.ImeMode = System.Windows.Forms.ImeMode.NoControl
713 716
         Me.Label9.Location = New System.Drawing.Point(314, 29)
714 717
         Me.Label9.Name = "Label9"
715
-        Me.Label9.Size = New System.Drawing.Size(56, 16)
718
+        Me.Label9.Size = New System.Drawing.Size(55, 16)
716 719
         Me.Label9.TabIndex = 1276
717 720
         Me.Label9.Text = "交貨日期"
718 721
         '
@@ -731,7 +734,7 @@ Partial Class 銷售單審核
731 734
         Me.Label4.ImeMode = System.Windows.Forms.ImeMode.NoControl
732 735
         Me.Label4.Location = New System.Drawing.Point(314, 4)
733 736
         Me.Label4.Name = "Label4"
734
-        Me.Label4.Size = New System.Drawing.Size(56, 16)
737
+        Me.Label4.Size = New System.Drawing.Size(55, 16)
735 738
         Me.Label4.TabIndex = 1274
736 739
         Me.Label4.Text = "開單日期"
737 740
         '
@@ -753,7 +756,7 @@ Partial Class 銷售單審核
753 756
         Me.Label11.ImeMode = System.Windows.Forms.ImeMode.NoControl
754 757
         Me.Label11.Location = New System.Drawing.Point(319, 104)
755 758
         Me.Label11.Name = "Label11"
756
-        Me.Label11.Size = New System.Drawing.Size(56, 16)
759
+        Me.Label11.Size = New System.Drawing.Size(55, 16)
757 760
         Me.Label11.TabIndex = 1272
758 761
         Me.Label11.Text = "統一編號"
759 762
         '
@@ -778,7 +781,7 @@ Partial Class 銷售單審核
778 781
         Me.Label10.ImeMode = System.Windows.Forms.ImeMode.NoControl
779 782
         Me.Label10.Location = New System.Drawing.Point(150, 54)
780 783
         Me.Label10.Name = "Label10"
781
-        Me.Label10.Size = New System.Drawing.Size(32, 16)
784
+        Me.Label10.Size = New System.Drawing.Size(31, 16)
782 785
         Me.Label10.TabIndex = 1269
783 786
         Me.Label10.Text = "公司"
784 787
         '
@@ -816,7 +819,7 @@ Partial Class 銷售單審核
816 819
         Me.Label8.ImeMode = System.Windows.Forms.ImeMode.NoControl
817 820
         Me.Label8.Location = New System.Drawing.Point(338, 79)
818 821
         Me.Label8.Name = "Label8"
819
-        Me.Label8.Size = New System.Drawing.Size(39, 16)
822
+        Me.Label8.Size = New System.Drawing.Size(38, 16)
820 823
         Me.Label8.TabIndex = 1264
821 824
         Me.Label8.Text = "電話2"
822 825
         '
@@ -827,7 +830,7 @@ Partial Class 銷售單審核
827 830
         Me.Label7.ImeMode = System.Windows.Forms.ImeMode.NoControl
828 831
         Me.Label7.Location = New System.Drawing.Point(150, 79)
829 832
         Me.Label7.Name = "Label7"
830
-        Me.Label7.Size = New System.Drawing.Size(39, 16)
833
+        Me.Label7.Size = New System.Drawing.Size(38, 16)
831 834
         Me.Label7.TabIndex = 1263
832 835
         Me.Label7.Text = "電話1"
833 836
         '
@@ -838,7 +841,7 @@ Partial Class 銷售單審核
838 841
         Me.Label6.ImeMode = System.Windows.Forms.ImeMode.NoControl
839 842
         Me.Label6.Location = New System.Drawing.Point(150, 129)
840 843
         Me.Label6.Name = "Label6"
841
-        Me.Label6.Size = New System.Drawing.Size(32, 16)
844
+        Me.Label6.Size = New System.Drawing.Size(31, 16)
842 845
         Me.Label6.TabIndex = 1262
843 846
         Me.Label6.Text = "住址"
844 847
         '
@@ -849,7 +852,7 @@ Partial Class 銷售單審核
849 852
         Me.Label3.ImeMode = System.Windows.Forms.ImeMode.NoControl
850 853
         Me.Label3.Location = New System.Drawing.Point(150, 31)
851 854
         Me.Label3.Name = "Label3"
852
-        Me.Label3.Size = New System.Drawing.Size(32, 16)
855
+        Me.Label3.Size = New System.Drawing.Size(31, 16)
853 856
         Me.Label3.TabIndex = 1261
854 857
         Me.Label3.Text = "客戶"
855 858
         '
@@ -859,7 +862,7 @@ Partial Class 銷售單審核
859 862
         Me.Label2.ForeColor = System.Drawing.Color.Red
860 863
         Me.Label2.Location = New System.Drawing.Point(150, 4)
861 864
         Me.Label2.Name = "Label2"
862
-        Me.Label2.Size = New System.Drawing.Size(32, 16)
865
+        Me.Label2.Size = New System.Drawing.Size(31, 16)
863 866
         Me.Label2.TabIndex = 1260
864 867
         Me.Label2.Text = "單號"
865 868
         '
@@ -892,7 +895,7 @@ Partial Class 銷售單審核
892 895
         Me.未審核_lb.AutoSize = True
893 896
         Me.未審核_lb.Location = New System.Drawing.Point(5, 7)
894 897
         Me.未審核_lb.Name = "未審核_lb"
895
-        Me.未審核_lb.Size = New System.Drawing.Size(68, 16)
898
+        Me.未審核_lb.Size = New System.Drawing.Size(67, 16)
896 899
         Me.未審核_lb.TabIndex = 1257
897 900
         Me.未審核_lb.Text = "業務銷售單"
898 901
         '
@@ -925,6 +928,8 @@ Partial Class 銷售單審核
925 928
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
926 929
         Me.Panel1.AutoScroll = True
927 930
         Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
931
+        Me.Panel1.Controls.Add(Me.稅金25_tb)
932
+        Me.Panel1.Controls.Add(Me.Label51)
928 933
         Me.Panel1.Controls.Add(Me.刷卡可刪除_ch)
929 934
         Me.Panel1.Controls.Add(Me.Reset1_bt)
930 935
         Me.Panel1.Controls.Add(Me.刪除衍生運費_bt)
@@ -1006,9 +1011,9 @@ Partial Class 銷售單審核
1006 1011
         '
1007 1012
         Me.刷卡可刪除_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1008 1013
         Me.刷卡可刪除_ch.AutoSize = True
1009
-        Me.刷卡可刪除_ch.Location = New System.Drawing.Point(531, 652)
1014
+        Me.刷卡可刪除_ch.Location = New System.Drawing.Point(532, 652)
1010 1015
         Me.刷卡可刪除_ch.Name = "刷卡可刪除_ch"
1011
-        Me.刷卡可刪除_ch.Size = New System.Drawing.Size(87, 20)
1016
+        Me.刷卡可刪除_ch.Size = New System.Drawing.Size(86, 20)
1012 1017
         Me.刷卡可刪除_ch.TabIndex = 1368
1013 1018
         Me.刷卡可刪除_ch.Text = "刷卡可刪除"
1014 1019
         Me.刷卡可刪除_ch.TextAlign = System.Drawing.ContentAlignment.BottomRight
@@ -1062,7 +1067,7 @@ Partial Class 銷售單審核
1062 1067
         Me.Label49.AutoSize = True
1063 1068
         Me.Label49.Location = New System.Drawing.Point(-3, 526)
1064 1069
         Me.Label49.Name = "Label49"
1065
-        Me.Label49.Size = New System.Drawing.Size(32, 16)
1070
+        Me.Label49.Size = New System.Drawing.Size(31, 16)
1066 1071
         Me.Label49.TabIndex = 1346
1067 1072
         Me.Label49.Text = "項次"
1068 1073
         '
@@ -1073,6 +1078,7 @@ Partial Class 銷售單審核
1073 1078
         Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1074 1079
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1075 1080
         Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1081
+        Me.銷售衍生運費_dgv.BackgroundColor = System.Drawing.Color.White
1076 1082
         Me.銷售衍生運費_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1077 1083
         Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(3, 547)
1078 1084
         Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
@@ -1124,7 +1130,7 @@ Partial Class 銷售單審核
1124 1130
         Me.Label46.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1125 1131
         Me.Label46.Location = New System.Drawing.Point(730, 423)
1126 1132
         Me.Label46.Name = "Label46"
1127
-        Me.Label46.Size = New System.Drawing.Size(83, 16)
1133
+        Me.Label46.Size = New System.Drawing.Size(82, 16)
1128 1134
         Me.Label46.TabIndex = 1341
1129 1135
         Me.Label46.Text = "刷   卡   稅   金"
1130 1136
         '
@@ -1135,7 +1141,7 @@ Partial Class 銷售單審核
1135 1141
         Me.Label47.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1136 1142
         Me.Label47.Location = New System.Drawing.Point(730, 399)
1137 1143
         Me.Label47.Name = "Label47"
1138
-        Me.Label47.Size = New System.Drawing.Size(83, 16)
1144
+        Me.Label47.Size = New System.Drawing.Size(82, 16)
1139 1145
         Me.Label47.TabIndex = 1339
1140 1146
         Me.Label47.Text = "刷   卡   總   和"
1141 1147
         '
@@ -1157,7 +1163,7 @@ Partial Class 銷售單審核
1157 1163
         Me.Label48.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1158 1164
         Me.Label48.Location = New System.Drawing.Point(730, 447)
1159 1165
         Me.Label48.Name = "Label48"
1160
-        Me.Label48.Size = New System.Drawing.Size(83, 16)
1166
+        Me.Label48.Size = New System.Drawing.Size(82, 16)
1161 1167
         Me.Label48.TabIndex = 1337
1162 1168
         Me.Label48.Text = "刷   卡   傭   金"
1163 1169
         '
@@ -1176,7 +1182,7 @@ Partial Class 銷售單審核
1176 1182
         '
1177 1183
         Me.其他成本_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1178 1184
         Me.其他成本_tb.ForeColor = System.Drawing.Color.Green
1179
-        Me.其他成本_tb.Location = New System.Drawing.Point(814, 704)
1185
+        Me.其他成本_tb.Location = New System.Drawing.Point(814, 732)
1180 1186
         Me.其他成本_tb.Name = "其他成本_tb"
1181 1187
         Me.其他成本_tb.Size = New System.Drawing.Size(81, 23)
1182 1188
         Me.其他成本_tb.TabIndex = 1335
@@ -1188,9 +1194,9 @@ Partial Class 銷售單審核
1188 1194
         Me.Label45.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1189 1195
         Me.Label45.AutoSize = True
1190 1196
         Me.Label45.ForeColor = System.Drawing.Color.Green
1191
-        Me.Label45.Location = New System.Drawing.Point(731, 707)
1197
+        Me.Label45.Location = New System.Drawing.Point(731, 735)
1192 1198
         Me.Label45.Name = "Label45"
1193
-        Me.Label45.Size = New System.Drawing.Size(83, 16)
1199
+        Me.Label45.Size = New System.Drawing.Size(82, 16)
1194 1200
         Me.Label45.TabIndex = 1334
1195 1201
         Me.Label45.Text = "其   他   成   本"
1196 1202
         '
@@ -1221,7 +1227,7 @@ Partial Class 銷售單審核
1221 1227
         '
1222 1228
         Me.物料成本_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1223 1229
         Me.物料成本_tb.ForeColor = System.Drawing.Color.Green
1224
-        Me.物料成本_tb.Location = New System.Drawing.Point(814, 680)
1230
+        Me.物料成本_tb.Location = New System.Drawing.Point(814, 708)
1225 1231
         Me.物料成本_tb.Name = "物料成本_tb"
1226 1232
         Me.物料成本_tb.Size = New System.Drawing.Size(81, 23)
1227 1233
         Me.物料成本_tb.TabIndex = 1311
@@ -1233,9 +1239,9 @@ Partial Class 銷售單審核
1233 1239
         Me.Label43.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1234 1240
         Me.Label43.AutoSize = True
1235 1241
         Me.Label43.ForeColor = System.Drawing.Color.Green
1236
-        Me.Label43.Location = New System.Drawing.Point(731, 683)
1242
+        Me.Label43.Location = New System.Drawing.Point(731, 711)
1237 1243
         Me.Label43.Name = "Label43"
1238
-        Me.Label43.Size = New System.Drawing.Size(83, 16)
1244
+        Me.Label43.Size = New System.Drawing.Size(82, 16)
1239 1245
         Me.Label43.TabIndex = 1310
1240 1246
         Me.Label43.Text = "物   料   成   本"
1241 1247
         '
@@ -1243,7 +1249,7 @@ Partial Class 銷售單審核
1243 1249
         '
1244 1250
         Me.預估利潤_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1245 1251
         Me.預估利潤_tb.ForeColor = System.Drawing.Color.Green
1246
-        Me.預估利潤_tb.Location = New System.Drawing.Point(814, 752)
1252
+        Me.預估利潤_tb.Location = New System.Drawing.Point(814, 780)
1247 1253
         Me.預估利潤_tb.Name = "預估利潤_tb"
1248 1254
         Me.預估利潤_tb.Size = New System.Drawing.Size(81, 23)
1249 1255
         Me.預估利潤_tb.TabIndex = 1309
@@ -1255,9 +1261,9 @@ Partial Class 銷售單審核
1255 1261
         Me.Label42.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1256 1262
         Me.Label42.AutoSize = True
1257 1263
         Me.Label42.ForeColor = System.Drawing.Color.Green
1258
-        Me.Label42.Location = New System.Drawing.Point(732, 755)
1264
+        Me.Label42.Location = New System.Drawing.Point(732, 783)
1259 1265
         Me.Label42.Name = "Label42"
1260
-        Me.Label42.Size = New System.Drawing.Size(83, 16)
1266
+        Me.Label42.Size = New System.Drawing.Size(82, 16)
1261 1267
         Me.Label42.TabIndex = 1308
1262 1268
         Me.Label42.Text = "預   估   利   潤"
1263 1269
         '
@@ -1265,7 +1271,7 @@ Partial Class 銷售單審核
1265 1271
         '
1266 1272
         Me.管銷費用_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1267 1273
         Me.管銷費用_tb.ForeColor = System.Drawing.Color.Green
1268
-        Me.管銷費用_tb.Location = New System.Drawing.Point(814, 728)
1274
+        Me.管銷費用_tb.Location = New System.Drawing.Point(814, 756)
1269 1275
         Me.管銷費用_tb.Name = "管銷費用_tb"
1270 1276
         Me.管銷費用_tb.Size = New System.Drawing.Size(81, 23)
1271 1277
         Me.管銷費用_tb.TabIndex = 1307
@@ -1277,9 +1283,9 @@ Partial Class 銷售單審核
1277 1283
         Me.Label41.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1278 1284
         Me.Label41.AutoSize = True
1279 1285
         Me.Label41.ForeColor = System.Drawing.Color.Green
1280
-        Me.Label41.Location = New System.Drawing.Point(732, 731)
1286
+        Me.Label41.Location = New System.Drawing.Point(732, 759)
1281 1287
         Me.Label41.Name = "Label41"
1282
-        Me.Label41.Size = New System.Drawing.Size(83, 16)
1288
+        Me.Label41.Size = New System.Drawing.Size(82, 16)
1283 1289
         Me.Label41.TabIndex = 1306
1284 1290
         Me.Label41.Text = "管   銷   費   用"
1285 1291
         '
@@ -1301,7 +1307,7 @@ Partial Class 銷售單審核
1301 1307
         Me.Label38.ForeColor = System.Drawing.Color.Black
1302 1308
         Me.Label38.Location = New System.Drawing.Point(730, 580)
1303 1309
         Me.Label38.Name = "Label38"
1304
-        Me.Label38.Size = New System.Drawing.Size(83, 16)
1310
+        Me.Label38.Size = New System.Drawing.Size(82, 16)
1305 1311
         Me.Label38.TabIndex = 1300
1306 1312
         Me.Label38.Text = "司   機   運   費"
1307 1313
         '
@@ -1322,7 +1328,7 @@ Partial Class 銷售單審核
1322 1328
         Me.Label39.AutoSize = True
1323 1329
         Me.Label39.Location = New System.Drawing.Point(727, 554)
1324 1330
         Me.Label39.Name = "Label39"
1325
-        Me.Label39.Size = New System.Drawing.Size(56, 16)
1331
+        Me.Label39.Size = New System.Drawing.Size(55, 16)
1326 1332
         Me.Label39.TabIndex = 1299
1327 1333
         Me.Label39.Text = "送貨地點"
1328 1334
         '
@@ -1371,7 +1377,7 @@ Partial Class 銷售單審核
1371 1377
         Me.Label36.AutoSize = True
1372 1378
         Me.Label36.Location = New System.Drawing.Point(2, 653)
1373 1379
         Me.Label36.Name = "Label36"
1374
-        Me.Label36.Size = New System.Drawing.Size(32, 16)
1380
+        Me.Label36.Size = New System.Drawing.Size(31, 16)
1375 1381
         Me.Label36.TabIndex = 1285
1376 1382
         Me.Label36.Text = "項次"
1377 1383
         '
@@ -1393,7 +1399,7 @@ Partial Class 銷售單審核
1393 1399
         Me.Label35.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1394 1400
         Me.Label35.Location = New System.Drawing.Point(729, 655)
1395 1401
         Me.Label35.Name = "Label35"
1396
-        Me.Label35.Size = New System.Drawing.Size(86, 16)
1402
+        Me.Label35.Size = New System.Drawing.Size(85, 16)
1397 1403
         Me.Label35.TabIndex = 1280
1398 1404
         Me.Label35.Text = "額    外   收   支"
1399 1405
         '
@@ -1415,7 +1421,7 @@ Partial Class 銷售單審核
1415 1421
         Me.Label34.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1416 1422
         Me.Label34.Location = New System.Drawing.Point(729, 524)
1417 1423
         Me.Label34.Name = "Label34"
1418
-        Me.Label34.Size = New System.Drawing.Size(86, 16)
1424
+        Me.Label34.Size = New System.Drawing.Size(85, 16)
1419 1425
         Me.Label34.TabIndex = 1278
1420 1426
         Me.Label34.Text = "銷    售   合   計"
1421 1427
         '
@@ -1437,7 +1443,7 @@ Partial Class 銷售單審核
1437 1443
         Me.Label33.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1438 1444
         Me.Label33.Location = New System.Drawing.Point(729, 500)
1439 1445
         Me.Label33.Name = "Label33"
1440
-        Me.Label33.Size = New System.Drawing.Size(61, 16)
1446
+        Me.Label33.Size = New System.Drawing.Size(60, 16)
1441 1447
         Me.Label33.TabIndex = 1276
1442 1448
         Me.Label33.Text = "明細-稅金"
1443 1449
         '
@@ -1459,7 +1465,7 @@ Partial Class 銷售單審核
1459 1465
         Me.Label32.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1460 1466
         Me.Label32.Location = New System.Drawing.Point(730, 631)
1461 1467
         Me.Label32.Name = "Label32"
1462
-        Me.Label32.Size = New System.Drawing.Size(85, 16)
1468
+        Me.Label32.Size = New System.Drawing.Size(84, 16)
1463 1469
         Me.Label32.TabIndex = 1274
1464 1470
         Me.Label32.Text = "備註-支出小計"
1465 1471
         '
@@ -1481,7 +1487,7 @@ Partial Class 銷售單審核
1481 1487
         Me.Label31.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1482 1488
         Me.Label31.Location = New System.Drawing.Point(728, 607)
1483 1489
         Me.Label31.Name = "Label31"
1484
-        Me.Label31.Size = New System.Drawing.Size(85, 16)
1490
+        Me.Label31.Size = New System.Drawing.Size(84, 16)
1485 1491
         Me.Label31.TabIndex = 1272
1486 1492
         Me.Label31.Text = "備註-收入小計"
1487 1493
         '
@@ -1503,7 +1509,7 @@ Partial Class 銷售單審核
1503 1509
         Me.Label30.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1504 1510
         Me.Label30.Location = New System.Drawing.Point(729, 477)
1505 1511
         Me.Label30.Name = "Label30"
1506
-        Me.Label30.Size = New System.Drawing.Size(85, 16)
1512
+        Me.Label30.Size = New System.Drawing.Size(84, 16)
1507 1513
         Me.Label30.TabIndex = 1270
1508 1514
         Me.Label30.Text = "明細-售價小計"
1509 1515
         '
@@ -1542,7 +1548,7 @@ Partial Class 銷售單審核
1542 1548
         Me.Label26.AutoSize = True
1543 1549
         Me.Label26.Location = New System.Drawing.Point(2, 398)
1544 1550
         Me.Label26.Name = "Label26"
1545
-        Me.Label26.Size = New System.Drawing.Size(32, 16)
1551
+        Me.Label26.Size = New System.Drawing.Size(31, 16)
1546 1552
         Me.Label26.TabIndex = 1265
1547 1553
         Me.Label26.Text = "項次"
1548 1554
         '
@@ -1559,7 +1565,7 @@ Partial Class 銷售單審核
1559 1565
         Me.Label25.AutoSize = True
1560 1566
         Me.Label25.Location = New System.Drawing.Point(3, 6)
1561 1567
         Me.Label25.Name = "Label25"
1562
-        Me.Label25.Size = New System.Drawing.Size(32, 16)
1568
+        Me.Label25.Size = New System.Drawing.Size(31, 16)
1563 1569
         Me.Label25.TabIndex = 1263
1564 1570
         Me.Label25.Text = "項次"
1565 1571
         '
@@ -1577,7 +1583,7 @@ Partial Class 銷售單審核
1577 1583
         Me.倉儲單號_lb.AutoSize = True
1578 1584
         Me.倉儲單號_lb.Location = New System.Drawing.Point(564, 335)
1579 1585
         Me.倉儲單號_lb.Name = "倉儲單號_lb"
1580
-        Me.倉儲單號_lb.Size = New System.Drawing.Size(56, 16)
1586
+        Me.倉儲單號_lb.Size = New System.Drawing.Size(55, 16)
1581 1587
         Me.倉儲單號_lb.TabIndex = 1256
1582 1588
         Me.倉儲單號_lb.Text = "倉儲單號"
1583 1589
         Me.倉儲單號_lb.Visible = False
@@ -1597,7 +1603,7 @@ Partial Class 銷售單審核
1597 1603
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1598 1604
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1599 1605
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1600
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 11966)
1606
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 12278)
1601 1607
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1602 1608
         Me.客戶資料_dgv.RowHeadersWidth = 5
1603 1609
         DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -1673,7 +1679,7 @@ Partial Class 銷售單審核
1673 1679
         Me.Label1.AutoSize = True
1674 1680
         Me.Label1.Location = New System.Drawing.Point(39, 334)
1675 1681
         Me.Label1.Name = "Label1"
1676
-        Me.Label1.Size = New System.Drawing.Size(44, 16)
1682
+        Me.Label1.Size = New System.Drawing.Size(43, 16)
1677 1683
         Me.Label1.TabIndex = 1173
1678 1684
         Me.Label1.Text = "流水號"
1679 1685
         Me.Label1.Visible = False
@@ -1685,7 +1691,7 @@ Partial Class 銷售單審核
1685 1691
         Me.Label5.ImeMode = System.Windows.Forms.ImeMode.NoControl
1686 1692
         Me.Label5.Location = New System.Drawing.Point(35, 359)
1687 1693
         Me.Label5.Name = "Label5"
1688
-        Me.Label5.Size = New System.Drawing.Size(56, 16)
1694
+        Me.Label5.Size = New System.Drawing.Size(55, 16)
1689 1695
         Me.Label5.TabIndex = 1178
1690 1696
         Me.Label5.Text = "編號客戶"
1691 1697
         Me.Label5.Visible = False
@@ -1697,6 +1703,7 @@ Partial Class 銷售單審核
1697 1703
         Me.銷售明細_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1698 1704
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1699 1705
         Me.銷售明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1706
+        Me.銷售明細_dgv.BackgroundColor = System.Drawing.Color.White
1700 1707
         Me.銷售明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1701 1708
         Me.銷售明細_dgv.Location = New System.Drawing.Point(3, 29)
1702 1709
         Me.銷售明細_dgv.Name = "銷售明細_dgv"
@@ -1715,6 +1722,7 @@ Partial Class 銷售單審核
1715 1722
         Me.銷售備註_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1716 1723
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1717 1724
         Me.銷售備註_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1725
+        Me.銷售備註_dgv.BackgroundColor = System.Drawing.Color.White
1718 1726
         Me.銷售備註_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1719 1727
         Me.銷售備註_dgv.Location = New System.Drawing.Point(3, 419)
1720 1728
         Me.銷售備註_dgv.Name = "銷售備註_dgv"
@@ -1733,6 +1741,7 @@ Partial Class 銷售單審核
1733 1741
         Me.收款事項_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1734 1742
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1735 1743
         Me.收款事項_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1744
+        Me.收款事項_dgv.BackgroundColor = System.Drawing.Color.White
1736 1745
         Me.收款事項_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1737 1746
         Me.收款事項_dgv.Location = New System.Drawing.Point(3, 674)
1738 1747
         Me.收款事項_dgv.Name = "收款事項_dgv"
@@ -1741,7 +1750,7 @@ Partial Class 銷售單審核
1741 1750
         DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1742 1751
         Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle16
1743 1752
         Me.收款事項_dgv.RowTemplate.Height = 24
1744
-        Me.收款事項_dgv.Size = New System.Drawing.Size(725, 102)
1753
+        Me.收款事項_dgv.Size = New System.Drawing.Size(725, 129)
1745 1754
         Me.收款事項_dgv.TabIndex = 1282
1746 1755
         '
1747 1756
         'Label28
@@ -1750,7 +1759,7 @@ Partial Class 銷售單審核
1750 1759
         Me.Label28.AutoSize = True
1751 1760
         Me.Label28.Location = New System.Drawing.Point(728, 539)
1752 1761
         Me.Label28.Name = "Label28"
1753
-        Me.Label28.Size = New System.Drawing.Size(168, 16)
1762
+        Me.Label28.Size = New System.Drawing.Size(167, 16)
1754 1763
         Me.Label28.TabIndex = 1283
1755 1764
         Me.Label28.Text = "--------------------------------"
1756 1765
         '
@@ -1760,7 +1769,7 @@ Partial Class 銷售單審核
1760 1769
         Me.Label40.AutoSize = True
1761 1770
         Me.Label40.Location = New System.Drawing.Point(730, 670)
1762 1771
         Me.Label40.Name = "Label40"
1763
-        Me.Label40.Size = New System.Drawing.Size(168, 16)
1772
+        Me.Label40.Size = New System.Drawing.Size(167, 16)
1764 1773
         Me.Label40.TabIndex = 1305
1765 1774
         Me.Label40.Text = "--------------------------------"
1766 1775
         '
@@ -1770,7 +1779,7 @@ Partial Class 銷售單審核
1770 1779
         Me.Label20.AutoSize = True
1771 1780
         Me.Label20.Location = New System.Drawing.Point(728, 594)
1772 1781
         Me.Label20.Name = "Label20"
1773
-        Me.Label20.Size = New System.Drawing.Size(168, 16)
1782
+        Me.Label20.Size = New System.Drawing.Size(167, 16)
1774 1783
         Me.Label20.TabIndex = 1297
1775 1784
         Me.Label20.Text = "--------------------------------"
1776 1785
         '
@@ -1780,7 +1789,7 @@ Partial Class 銷售單審核
1780 1789
         Me.Label44.AutoSize = True
1781 1790
         Me.Label44.Location = New System.Drawing.Point(728, 462)
1782 1791
         Me.Label44.Name = "Label44"
1783
-        Me.Label44.Size = New System.Drawing.Size(168, 16)
1792
+        Me.Label44.Size = New System.Drawing.Size(167, 16)
1784 1793
         Me.Label44.TabIndex = 1367
1785 1794
         Me.Label44.Text = "--------------------------------"
1786 1795
         '
@@ -1823,7 +1832,7 @@ Partial Class 銷售單審核
1823 1832
         Me.Label37.AutoSize = True
1824 1833
         Me.Label37.Location = New System.Drawing.Point(46, 529)
1825 1834
         Me.Label37.Name = "Label37"
1826
-        Me.Label37.Size = New System.Drawing.Size(92, 16)
1835
+        Me.Label37.Size = New System.Drawing.Size(91, 16)
1827 1836
         Me.Label37.TabIndex = 1289
1828 1837
         Me.Label37.Text = "銷售收款流水號"
1829 1838
         Me.Label37.Visible = False
@@ -1853,7 +1862,7 @@ Partial Class 銷售單審核
1853 1862
         Me.Label24.AutoSize = True
1854 1863
         Me.Label24.Location = New System.Drawing.Point(46, 451)
1855 1864
         Me.Label24.Name = "Label24"
1856
-        Me.Label24.Size = New System.Drawing.Size(92, 16)
1865
+        Me.Label24.Size = New System.Drawing.Size(91, 16)
1857 1866
         Me.Label24.TabIndex = 1260
1858 1867
         Me.Label24.Text = "倉儲資料流水號"
1859 1868
         Me.Label24.Visible = False
@@ -1873,7 +1882,7 @@ Partial Class 銷售單審核
1873 1882
         Me.Label27.AutoSize = True
1874 1883
         Me.Label27.Location = New System.Drawing.Point(46, 491)
1875 1884
         Me.Label27.Name = "Label27"
1876
-        Me.Label27.Size = New System.Drawing.Size(92, 16)
1885
+        Me.Label27.Size = New System.Drawing.Size(91, 16)
1877 1886
         Me.Label27.TabIndex = 1267
1878 1887
         Me.Label27.Text = "銷售備註流水號"
1879 1888
         Me.Label27.Visible = False
@@ -1883,7 +1892,7 @@ Partial Class 銷售單審核
1883 1892
         Me.Label23.AutoSize = True
1884 1893
         Me.Label23.Location = New System.Drawing.Point(46, 413)
1885 1894
         Me.Label23.Name = "Label23"
1886
-        Me.Label23.Size = New System.Drawing.Size(92, 16)
1895
+        Me.Label23.Size = New System.Drawing.Size(91, 16)
1887 1896
         Me.Label23.TabIndex = 1258
1888 1897
         Me.Label23.Text = "銷售資料流水號"
1889 1898
         Me.Label23.Visible = False
@@ -1942,7 +1951,7 @@ Partial Class 銷售單審核
1942 1951
         Me.大間距_ch.AutoSize = True
1943 1952
         Me.大間距_ch.Location = New System.Drawing.Point(435, 151)
1944 1953
         Me.大間距_ch.Name = "大間距_ch"
1945
-        Me.大間距_ch.Size = New System.Drawing.Size(63, 20)
1954
+        Me.大間距_ch.Size = New System.Drawing.Size(62, 20)
1946 1955
         Me.大間距_ch.TabIndex = 1334
1947 1956
         Me.大間距_ch.Text = "大間距"
1948 1957
         Me.大間距_ch.UseVisualStyleBackColor = True
@@ -1952,7 +1961,7 @@ Partial Class 銷售單審核
1952 1961
         Me.中間距_ch.AutoSize = True
1953 1962
         Me.中間距_ch.Location = New System.Drawing.Point(366, 151)
1954 1963
         Me.中間距_ch.Name = "中間距_ch"
1955
-        Me.中間距_ch.Size = New System.Drawing.Size(63, 20)
1964
+        Me.中間距_ch.Size = New System.Drawing.Size(62, 20)
1956 1965
         Me.中間距_ch.TabIndex = 1333
1957 1966
         Me.中間距_ch.Text = "中間距"
1958 1967
         Me.中間距_ch.UseVisualStyleBackColor = True
@@ -1962,7 +1971,7 @@ Partial Class 銷售單審核
1962 1971
         Me.小間距_ch.AutoSize = True
1963 1972
         Me.小間距_ch.Location = New System.Drawing.Point(297, 151)
1964 1973
         Me.小間距_ch.Name = "小間距_ch"
1965
-        Me.小間距_ch.Size = New System.Drawing.Size(63, 20)
1974
+        Me.小間距_ch.Size = New System.Drawing.Size(62, 20)
1966 1975
         Me.小間距_ch.TabIndex = 1332
1967 1976
         Me.小間距_ch.Text = "小間距"
1968 1977
         Me.小間距_ch.UseVisualStyleBackColor = True
@@ -1972,7 +1981,7 @@ Partial Class 銷售單審核
1972 1981
         Me.已審核資料_ch.AutoSize = True
1973 1982
         Me.已審核資料_ch.Location = New System.Drawing.Point(154, 151)
1974 1983
         Me.已審核資料_ch.Name = "已審核資料_ch"
1975
-        Me.已審核資料_ch.Size = New System.Drawing.Size(111, 20)
1984
+        Me.已審核資料_ch.Size = New System.Drawing.Size(110, 20)
1976 1985
         Me.已審核資料_ch.TabIndex = 1335
1977 1986
         Me.已審核資料_ch.Text = "已審核資料顯示"
1978 1987
         Me.已審核資料_ch.TextAlign = System.Drawing.ContentAlignment.BottomRight
@@ -2059,7 +2068,7 @@ Partial Class 銷售單審核
2059 2068
         Me.Label50.AutoSize = True
2060 2069
         Me.Label50.Location = New System.Drawing.Point(46, 631)
2061 2070
         Me.Label50.Name = "Label50"
2062
-        Me.Label50.Size = New System.Drawing.Size(92, 16)
2071
+        Me.Label50.Size = New System.Drawing.Size(91, 16)
2063 2072
         Me.Label50.TabIndex = 1338
2064 2073
         Me.Label50.Text = "運費資料流水號"
2065 2074
         Me.Label50.Visible = False
@@ -2133,6 +2142,28 @@ Partial Class 銷售單審核
2133 2142
         Me.顯示_bt.Text = "顯示物料控件"
2134 2143
         Me.顯示_bt.UseVisualStyleBackColor = True
2135 2144
         '
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
+        '
2136 2167
         '銷售單審核
2137 2168
         '
2138 2169
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
@@ -2332,4 +2363,6 @@ Partial Class 銷售單審核
2332 2363
     Friend WithEvents Reset1_bt As Button
2333 2364
     Friend WithEvents Label44 As Label
2334 2365
     Friend WithEvents 刷卡可刪除_ch As CheckBox
2366
+    Friend WithEvents 稅金25_tb As TextBox
2367
+    Friend WithEvents Label51 As Label
2335 2368
 End Class

+ 105
- 102
YD-ERP-SYS/業務系統管理/銷售單審核.vb 查看文件

@@ -251,18 +251,18 @@ Public Class 銷售單審核
251 251
     Private Sub Set_合記計算()
252 252
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
253 253
         售價小計_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"
254
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 刷卡總和_tb.Text = "0" : 刷卡稅金_tb.Text = "0" : 刷卡傭金_tb.Text = "0" : 稅金25_tb.Text = "0"
255 255
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
256 256
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
257 257
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
258
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
258
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
259 259
             End If
260 260
         Next
261
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.02))
261
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.02))
262 262
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
263 263
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
264
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
265
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
264
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
265
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
266 266
             If 銷售明細_dgv("無管銷", i).Value = False Then
267 267
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
268 268
                     If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
@@ -273,45 +273,45 @@ Public Class 銷售單審核
273 273
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
274 274
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
275 275
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
276
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
276
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
277 277
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
278 278
             End If
279 279
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
280
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
280
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
281 281
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
282 282
             End If
283 283
 
284 284
             If 銷售明細_dgv("含稅", i).Value = True Then
285
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
285
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
286 286
             End If
287 287
         Next
288 288
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
289 289
 
290
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
290
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
291 291
             通知_lb.Text = "無稅金"
292
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
293
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
294
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
292
+        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)
294
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
295 295
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
296
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
296
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
297 297
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
298 298
         End If
299 299
 
300
-        If 稅金存檔 <> Val(稅金_tb.Text) Then
300
+        If 稅金存檔 <> CLng(稅金_tb.Text) Then
301 301
             稅金_tb.Text = 稅金存檔
302
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
303
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
304
-        ElseIf 稅金存檔 = Val(稅金_tb.Text) Then
302
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
303
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
304
+        ElseIf 稅金存檔 = CLng(稅金_tb.Text) Then
305 305
             稅金_tb.Text = 稅金存檔
306
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
307
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
308
-        End If
306
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
307
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
308
+        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
309 309
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
310 310
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
311
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
312
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
311
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
312
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
313 313
         Next
314
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
314
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
315 315
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
316 316
         Dim 金額 As Integer = 0
317 317
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -320,7 +320,7 @@ Public Class 銷售單審核
320 320
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
321 321
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
322 322
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
323
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
323
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
324 324
             End If
325 325
         Next
326 326
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -328,28 +328,29 @@ Public Class 銷售單審核
328 328
             司機運費_tb.Text = "0"
329 329
         Else
330 330
             If 運費 = 0 Then
331
-                If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
331
+                If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
332 332
                     司機運費_tb.Text = 最低運費_cb.Text
333
-                ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
334
-                    司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
333
+                ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
334
+                    司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
335 335
                 End If
336 336
             Else
337 337
                 司機運費_tb.Text = 運費
338 338
             End If
339 339
         End If
340 340
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
341
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
341
+        預估利潤_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)
342 343
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
343 344
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
344
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
345
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
345 346
             Next
346 347
         End If
347 348
         '-------007-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
348
-        售價小計_tb.Text = Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(Val(銷售合計_tb.Text), "#,##0")
349
-        收入小計_tb.Text = Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(Val(額外收支_tb.Text), "#,##0")
350
-        司機運費_tb.Text = Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(Val(預估利潤_tb.Text), "#,##0")
351
-        物料成本_tb.Text = Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(Val(刷卡總和_tb.Text), "#,##0")
352
-        刷卡稅金_tb.Text = Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(Val(刷卡傭金_tb.Text), "#,##0")
349
+        售價小計_tb.Text = Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(CLng(銷售合計_tb.Text), "#,##0")
350
+        收入小計_tb.Text = Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(CLng(額外收支_tb.Text), "#,##0")
351
+        司機運費_tb.Text = Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(CLng(預估利潤_tb.Text), "#,##0")
352
+        物料成本_tb.Text = Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(CLng(刷卡總和_tb.Text), "#,##0")
353
+        刷卡稅金_tb.Text = Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0.0")
353 354
     End Sub
354 355
     Private Sub 指定倉庫_cb_下拉表單資料載入()
355 356
         If 需要全部庫存區域清單_ch.Checked = True Then
@@ -381,7 +382,7 @@ Public Class 銷售單審核
381 382
         料號_tb.Enabled = False : 供應商編碼_tb.Visible = False : 中間距_ch.Checked = True '--------------------控件隱藏、操作許可設定與其他基本顯示設定
382 383
 
383 384
         指定倉庫_cb_下拉表單資料載入() : 訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入() : 送貨地點_cb_下拉表單資料載入()
384
-        首次開啟 = False : Set_清單() : Set_清單1() :: 首次開啟 = True '--------------------資料讀取
385
+        首次開啟 = False : Set_清單() : Set_清單1() : 首次開啟 = True '--------------------資料讀取
385 386
 
386 387
         If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
387 388
             字體_NUD.Value = 9
@@ -415,7 +416,7 @@ Public Class 銷售單審核
415 416
         End If
416 417
     End Sub
417 418
     Private Sub 銷售備註_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 銷售備註_dgv.CellEndEdit
418
-        If (Val(銷售備註_dgv.Rows(e.RowIndex).Cells("收入").Value) <> 0 And Val(銷售備註_dgv.Rows(e.RowIndex).Cells("支出").Value) <> 0) Then
419
+        If (CLng(銷售備註_dgv.Rows(e.RowIndex).Cells("收入").Value) <> 0 And CLng(銷售備註_dgv.Rows(e.RowIndex).Cells("支出").Value) <> 0) Then
419 420
             MsgBox("支出與收入不能同時有金額")
420 421
             Set_清單5()
421 422
             Exit Sub
@@ -509,8 +510,8 @@ Public Class 銷售單審核
509 510
             If e.RowIndex = -1 Then : Else
510 511
                 料號_tb.Text = 物料清單_dgv("料號", e.RowIndex).Value.ToString : 供應商編碼_tb.Text = 物料清單_dgv("供應商", e.RowIndex).Value.ToString
511 512
                 品名_tb.Text = 物料清單_dgv("品名", e.RowIndex).Value.ToString : 最大庫存量_tb.Text = 物料清單_dgv("最低庫存量", e.RowIndex).Value.ToString
512
-                庫存量_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
513
-                可申請_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - Val(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
513
+                庫存量_tb.Text = CLng(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
514
+                可申請_tb.Text = CLng(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - CLng(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
514 515
 
515 516
                 物料圖_pb.Image = Nothing : PA1 = 料號_tb.Text : SQL_物料檔案_是否有圖()
516 517
                 If dr.Read() Then
@@ -962,7 +963,7 @@ Public Class 銷售單審核
962 963
 
963 964
                                 Dim 排序 As Integer
964 965
                                 SQL_銷售明細表_排序()
965
-                                If dr.Read() Then : 排序 = Val(dr("排序")) + 1 : Else : 排序 = 1 : End If : PA11 = 排序
966
+                                If dr.Read() Then : 排序 = CLng(dr("排序")) + 1 : Else : 排序 = 1 : End If : PA11 = 排序
966 967
 
967 968
                                 SQL_銷售單申請_銷售明細表_新增() : conn.Close()
968 969
                                 Set_清單4() : Set_清單()
@@ -1171,18 +1172,18 @@ Public Class 銷售單審核
1171 1172
     Private Sub Reset_bt_Click(sender As Object, e As EventArgs) Handles Reset_bt.Click
1172 1173
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1173 1174
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1174
-        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0"
1175
+        司機運費_tb.Text = "0" : 管銷費用_tb.Text = "0" : 其他成本_tb.Text = "0" : 稅金25_tb.Text = "0"
1175 1176
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1176 1177
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1177 1178
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1178
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1179
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1179 1180
             End If
1180 1181
         Next
1181
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.02))
1182
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.02))
1182 1183
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1183 1184
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
1184
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1185
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1185
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1186
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1186 1187
             If 銷售明細_dgv("無管銷", i).Value = False Then
1187 1188
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1188 1189
                     If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
@@ -1193,47 +1194,47 @@ Public Class 銷售單審核
1193 1194
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1194 1195
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1195 1196
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1196
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1197
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1197 1198
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1198 1199
             End If
1199 1200
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1200 1201
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1201 1202
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1202
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1203
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1203 1204
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1204 1205
             End If
1205 1206
 
1206 1207
             If 銷售明細_dgv("含稅", i).Value = True Then
1207
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1208
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1208 1209
             End If
1209 1210
         Next
1210 1211
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
1211 1212
 
1212
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
1213
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1213 1214
             通知_lb.Text = "無稅金"
1214
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
1215
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1216
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
1215
+        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)
1217
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1217 1218
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1218
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
1219
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
1219 1220
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
1220 1221
         End If
1221 1222
 
1222
-        If 稅金存檔 <> Val(稅金_tb.Text) Then
1223
+        If 稅金存檔 <> CLng(稅金_tb.Text) Then
1223 1224
             稅金_tb.Text = 稅金存檔
1224
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1225
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
1226
-        ElseIf 稅金存檔 = Val(稅金_tb.Text) Then
1225
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1226
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1227
+        ElseIf 稅金存檔 = CLng(稅金_tb.Text) Then
1227 1228
             稅金_tb.Text = 稅金存檔
1228
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
1229
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1230
-        End If
1229
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1230
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1231
+        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1231 1232
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1232 1233
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1233
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1234
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1234
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1235
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1235 1236
         Next
1236
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
1237
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
1237 1238
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1238 1239
         Dim 金額 As Integer = 0
1239 1240
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -1242,33 +1243,34 @@ Public Class 銷售單審核
1242 1243
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1243 1244
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
1244 1245
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
1245
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
1246
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
1246 1247
             End If
1247 1248
         Next
1248 1249
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1249 1250
         If 送貨地點_cb.Text = "" Or 送貨地點_cb.Text = "自取" Or 最低運費_cb.Text = "" Or 最低售價_cb.Text = "" Then
1250 1251
             司機運費_tb.Text = "0"
1251 1252
         Else
1252
-            If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
1253
+            If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
1253 1254
                 司機運費_tb.Text = 最低運費_cb.Text
1254
-            ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
1255
-                司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
1255
+            ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
1256
+                司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
1256 1257
             End If
1257 1258
         End If
1258 1259
         存檔1()
1259 1260
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1260
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
1261
+        預估利潤_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 1263
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1262 1264
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1263
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1265
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1264 1266
             Next
1265 1267
         End If
1266 1268
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1267
-        售價小計_tb.Text = Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(Val(銷售合計_tb.Text), "#,##0")
1268
-        收入小計_tb.Text = Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(Val(額外收支_tb.Text), "#,##0")
1269
-        司機運費_tb.Text = Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(Val(預估利潤_tb.Text), "#,##0")
1270
-        物料成本_tb.Text = Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(Val(刷卡總和_tb.Text), "#,##0")
1271
-        刷卡稅金_tb.Text = Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(Val(刷卡傭金_tb.Text), "#,##0")
1269
+        售價小計_tb.Text = Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(CLng(銷售合計_tb.Text), "#,##0")
1270
+        收入小計_tb.Text = Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(CLng(額外收支_tb.Text), "#,##0")
1271
+        司機運費_tb.Text = Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(CLng(預估利潤_tb.Text), "#,##0")
1272
+        物料成本_tb.Text = Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(CLng(刷卡總和_tb.Text), "#,##0")
1273
+        刷卡稅金_tb.Text = Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0.0")
1272 1274
     End Sub
1273 1275
     Private Sub 司機運費_tb_TextChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles 司機運費_tb.KeyPress
1274 1276
         If e.KeyChar = Chr(13) Then
@@ -1287,18 +1289,18 @@ Public Class 銷售單審核
1287 1289
     Private Sub Reset1_bt_Click(sender As Object, e As EventArgs) Handles Reset1_bt.Click
1288 1290
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1289 1291
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1290
-        司機運費_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 1293
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1292 1294
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1293 1295
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1294
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1296
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1295 1297
             End If
1296 1298
         Next
1297
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(刷卡總和_tb.Text) * 0.02)
1299
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(刷卡總和_tb.Text) * 0.02)
1298 1300
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1299 1301
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
1300
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1301
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1302
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1303
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1302 1304
             If 銷售明細_dgv("無管銷", i).Value = False Then
1303 1305
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1304 1306
                     If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
@@ -1309,40 +1311,40 @@ Public Class 銷售單審核
1309 1311
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1310 1312
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1311 1313
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1312
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1314
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1313 1315
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1314 1316
             End If
1315 1317
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1316 1318
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1317 1319
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1318
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1320
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1319 1321
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1320 1322
             End If
1321 1323
 
1322 1324
             If 銷售明細_dgv("含稅", i).Value = True Then
1323
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1325
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1324 1326
             End If
1325 1327
         Next
1326 1328
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
1327
-        銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
1329
+        銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1328 1330
 
1329
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
1331
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1330 1332
             通知_lb.Text = "無稅金"
1331
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
1332
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1333
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
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)
1335
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1334 1336
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1335
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
1337
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
1336 1338
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
1337 1339
         End If
1338 1340
 
1339
-        稅金存檔 = Val(稅金_tb.Text)
1341
+        稅金存檔 = CLng(稅金_tb.Text) : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1340 1342
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1341 1343
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1342
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1343
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1344
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1345
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1344 1346
         Next
1345
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
1347
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
1346 1348
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1347 1349
         Dim 金額 As Integer = 0
1348 1350
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -1351,7 +1353,7 @@ Public Class 銷售單審核
1351 1353
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1352 1354
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
1353 1355
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
1354
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
1356
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
1355 1357
             End If
1356 1358
         Next
1357 1359
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1359,28 +1361,29 @@ Public Class 銷售單審核
1359 1361
             司機運費_tb.Text = "0"
1360 1362
         Else
1361 1363
             If 運費 = 0 Then
1362
-                If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
1364
+                If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
1363 1365
                     司機運費_tb.Text = 最低運費_cb.Text
1364
-                ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
1365
-                    司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
1366
+                ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
1367
+                    司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
1366 1368
                 End If
1367 1369
             Else
1368 1370
                 司機運費_tb.Text = 運費
1369 1371
             End If
1370 1372
         End If
1371 1373
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1372
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
1374
+        預估利潤_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)
1373 1376
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1374 1377
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1375
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1378
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1376 1379
             Next
1377 1380
         End If
1378 1381
         '-------007-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1379
-        售價小計_tb.Text = Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(Val(銷售合計_tb.Text), "#,##0")
1380
-        收入小計_tb.Text = Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(Val(額外收支_tb.Text), "#,##0")
1381
-        司機運費_tb.Text = Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(Val(預估利潤_tb.Text), "#,##0")
1382
-        物料成本_tb.Text = Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(Val(刷卡總和_tb.Text), "#,##0")
1383
-        刷卡稅金_tb.Text = Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(Val(刷卡傭金_tb.Text), "#,##0")
1382
+        售價小計_tb.Text = Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Format(CLng(銷售合計_tb.Text), "#,##0")
1383
+        收入小計_tb.Text = Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Format(CLng(額外收支_tb.Text), "#,##0")
1384
+        司機運費_tb.Text = Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Format(CLng(預估利潤_tb.Text), "#,##0")
1385
+        物料成本_tb.Text = Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Format(CLng(刷卡總和_tb.Text), "#,##0")
1386
+        刷卡稅金_tb.Text = Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0.0")
1384 1387
     End Sub
1385 1388
     Private Sub 刷卡收款_bt_Click(sender As Object, e As EventArgs) Handles 刷卡收款_bt.Click
1386 1389
         If 流水號_tb.Text = "" Then

+ 156
- 125
YD-ERP-SYS/業務系統管理/銷售單申請.Designer.vb 查看文件

@@ -22,22 +22,22 @@ 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()
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()
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()
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()
@@ -224,10 +224,12 @@ Partial Class 銷售單申請
224 224
         Me.ComboBox6 = New System.Windows.Forms.ComboBox()
225 225
         Me.幣別_cb = New System.Windows.Forms.ComboBox()
226 226
         Me.Panel3 = New System.Windows.Forms.Panel()
227
+        Me.轉高層_cb = New System.Windows.Forms.CheckBox()
227 228
         Me.查_bt = New System.Windows.Forms.Button()
228 229
         Me.列印_bt = New System.Windows.Forms.Button()
229 230
         Me.顯示_bt = New System.Windows.Forms.Button()
230
-        Me.轉高層_cb = New System.Windows.Forms.CheckBox()
231
+        Me.稅金25_tb = New System.Windows.Forms.TextBox()
232
+        Me.Label1 = New System.Windows.Forms.Label()
231 233
         CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
232 234
         CType(Me.銷售明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
233 235
         CType(Me.區域庫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -250,17 +252,17 @@ Partial Class 銷售單申請
250 252
         '
251 253
         '銷售單據_dgv
252 254
         '
253
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
254
-        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
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 257
         Me.銷售單據_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
256 258
         Me.銷售單據_dgv.BackgroundColor = System.Drawing.Color.White
257 259
         Me.銷售單據_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
258 260
         Me.銷售單據_dgv.Location = New System.Drawing.Point(1, 27)
259 261
         Me.銷售單據_dgv.Name = "銷售單據_dgv"
260 262
         Me.銷售單據_dgv.RowHeadersWidth = 5
261
-        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
262
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
263
-        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
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
264 266
         Me.銷售單據_dgv.RowTemplate.Height = 24
265 267
         Me.銷售單據_dgv.Size = New System.Drawing.Size(192, 141)
266 268
         Me.銷售單據_dgv.TabIndex = 1154
@@ -488,8 +490,8 @@ Partial Class 銷售單申請
488 490
         '
489 491
         '銷售明細_dgv
490 492
         '
491
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.White
492
-        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
493
+        DataGridViewCellStyle35.BackColor = System.Drawing.Color.White
494
+        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle35
493 495
         Me.銷售明細_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
494 496
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
495 497
         Me.銷售明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -498,9 +500,9 @@ Partial Class 銷售單申請
498 500
         Me.銷售明細_dgv.Location = New System.Drawing.Point(2, 29)
499 501
         Me.銷售明細_dgv.Name = "銷售明細_dgv"
500 502
         Me.銷售明細_dgv.RowHeadersWidth = 5
501
-        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
502
-        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
503
-        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
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
504 506
         Me.銷售明細_dgv.RowTemplate.Height = 24
505 507
         Me.銷售明細_dgv.Size = New System.Drawing.Size(910, 360)
506 508
         Me.銷售明細_dgv.TabIndex = 1199
@@ -550,16 +552,16 @@ Partial Class 銷售單申請
550 552
         '
551 553
         '區域庫存_dgv
552 554
         '
553
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
554
-        Me.區域庫存_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
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 557
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
556 558
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
557 559
         Me.區域庫存_dgv.Location = New System.Drawing.Point(3, 3)
558 560
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
559 561
         Me.區域庫存_dgv.RowHeadersWidth = 5
560
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
561
-        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
562
-        Me.區域庫存_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
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
563 565
         Me.區域庫存_dgv.RowTemplate.Height = 24
564 566
         Me.區域庫存_dgv.Size = New System.Drawing.Size(81, 70)
565 567
         Me.區域庫存_dgv.TabIndex = 1245
@@ -914,8 +916,8 @@ Partial Class 銷售單申請
914 916
         '
915 917
         '物料清單_dgv
916 918
         '
917
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
918
-        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
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 921
         Me.物料清單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
920 922
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
921 923
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -924,9 +926,9 @@ Partial Class 銷售單申請
924 926
         Me.物料清單_dgv.Location = New System.Drawing.Point(2, 79)
925 927
         Me.物料清單_dgv.Name = "物料清單_dgv"
926 928
         Me.物料清單_dgv.RowHeadersWidth = 5
927
-        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
928
-        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
929
-        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
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
930 932
         Me.物料清單_dgv.RowTemplate.Height = 24
931 933
         Me.物料清單_dgv.Size = New System.Drawing.Size(518, 326)
932 934
         Me.物料清單_dgv.TabIndex = 1205
@@ -1014,19 +1016,17 @@ Partial Class 銷售單申請
1014 1016
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1015 1017
         Me.Panel1.AutoScroll = True
1016 1018
         Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
1019
+        Me.Panel1.Controls.Add(Me.稅金25_tb)
1020
+        Me.Panel1.Controls.Add(Me.Label1)
1017 1021
         Me.Panel1.Controls.Add(Me.流水號2_bt)
1018 1022
         Me.Panel1.Controls.Add(Me.轉財務系統_bt)
1019 1023
         Me.Panel1.Controls.Add(Me.財務單據退回_bt)
1020 1024
         Me.Panel1.Controls.Add(Me.今天_bt)
1021
-        Me.Panel1.Controls.Add(Me.Label55)
1022
-        Me.Panel1.Controls.Add(Me.申請人_tb)
1023 1025
         Me.Panel1.Controls.Add(Me.營運成本收支單號_tb)
1024 1026
         Me.Panel1.Controls.Add(Me.Label56)
1025 1027
         Me.Panel1.Controls.Add(Me.Label57)
1026 1028
         Me.Panel1.Controls.Add(Me.申請日期_dtp)
1027
-        Me.Panel1.Controls.Add(Me.ComboBox4)
1028 1029
         Me.Panel1.Controls.Add(Me.ComboBox3)
1029
-        Me.Panel1.Controls.Add(Me.會科碼1_ch)
1030 1030
         Me.Panel1.Controls.Add(Me.會科1_ch)
1031 1031
         Me.Panel1.Controls.Add(Me.ComboBox1)
1032 1032
         Me.Panel1.Controls.Add(Me.Label52)
@@ -1103,7 +1103,7 @@ Partial Class 銷售單申請
1103 1103
         '
1104 1104
         Me.流水號2_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1105 1105
         Me.流水號2_bt.Enabled = False
1106
-        Me.流水號2_bt.Location = New System.Drawing.Point(586, 1463)
1106
+        Me.流水號2_bt.Location = New System.Drawing.Point(586, 1793)
1107 1107
         Me.流水號2_bt.Name = "流水號2_bt"
1108 1108
         Me.流水號2_bt.Size = New System.Drawing.Size(75, 23)
1109 1109
         Me.流水號2_bt.TabIndex = 1557
@@ -1113,7 +1113,7 @@ Partial Class 銷售單申請
1113 1113
         Me.轉財務系統_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1114 1114
         Me.轉財務系統_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
1115 1115
         Me.轉財務系統_bt.ImeMode = System.Windows.Forms.ImeMode.NoControl
1116
-        Me.轉財務系統_bt.Location = New System.Drawing.Point(660, 777)
1116
+        Me.轉財務系統_bt.Location = New System.Drawing.Point(447, 777)
1117 1117
         Me.轉財務系統_bt.Name = "轉財務系統_bt"
1118 1118
         Me.轉財務系統_bt.Size = New System.Drawing.Size(115, 25)
1119 1119
         Me.轉財務系統_bt.TabIndex = 1558
@@ -1125,7 +1125,7 @@ Partial Class 銷售單申請
1125 1125
         Me.財務單據退回_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1126 1126
         Me.財務單據退回_bt.ForeColor = System.Drawing.Color.Red
1127 1127
         Me.財務單據退回_bt.ImeMode = System.Windows.Forms.ImeMode.NoControl
1128
-        Me.財務單據退回_bt.Location = New System.Drawing.Point(660, 802)
1128
+        Me.財務單據退回_bt.Location = New System.Drawing.Point(447, 802)
1129 1129
         Me.財務單據退回_bt.Name = "財務單據退回_bt"
1130 1130
         Me.財務單據退回_bt.Size = New System.Drawing.Size(115, 25)
1131 1131
         Me.財務單據退回_bt.TabIndex = 1557
@@ -1149,24 +1149,26 @@ Partial Class 銷售單申請
1149 1149
         '
1150 1150
         Me.Label55.AutoSize = True
1151 1151
         Me.Label55.ImeMode = System.Windows.Forms.ImeMode.NoControl
1152
-        Me.Label55.Location = New System.Drawing.Point(227, 808)
1152
+        Me.Label55.Location = New System.Drawing.Point(243, 433)
1153 1153
         Me.Label55.Name = "Label55"
1154 1154
         Me.Label55.Size = New System.Drawing.Size(43, 16)
1155 1155
         Me.Label55.TabIndex = 1546
1156 1156
         Me.Label55.Text = "申請人"
1157
+        Me.Label55.Visible = False
1157 1158
         '
1158 1159
         '申請人_tb
1159 1160
         '
1160
-        Me.申請人_tb.Location = New System.Drawing.Point(273, 804)
1161
+        Me.申請人_tb.Location = New System.Drawing.Point(199, 544)
1161 1162
         Me.申請人_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1162 1163
         Me.申請人_tb.Name = "申請人_tb"
1163
-        Me.申請人_tb.Size = New System.Drawing.Size(118, 23)
1164
+        Me.申請人_tb.Size = New System.Drawing.Size(81, 23)
1164 1165
         Me.申請人_tb.TabIndex = 1545
1165 1166
         Me.申請人_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
1167
+        Me.申請人_tb.WordWrap = False
1166 1168
         '
1167 1169
         '營運成本收支單號_tb
1168 1170
         '
1169
-        Me.營運成本收支單號_tb.Location = New System.Drawing.Point(451, 804)
1171
+        Me.營運成本收支單號_tb.Location = New System.Drawing.Point(312, 804)
1170 1172
         Me.營運成本收支單號_tb.Name = "營運成本收支單號_tb"
1171 1173
         Me.營運成本收支單號_tb.Size = New System.Drawing.Size(134, 23)
1172 1174
         Me.營運成本收支單號_tb.TabIndex = 1544
@@ -1175,7 +1177,7 @@ Partial Class 銷售單申請
1175 1177
         '
1176 1178
         Me.Label56.AutoSize = True
1177 1179
         Me.Label56.ImeMode = System.Windows.Forms.ImeMode.NoControl
1178
-        Me.Label56.Location = New System.Drawing.Point(394, 808)
1180
+        Me.Label56.Location = New System.Drawing.Point(255, 808)
1179 1181
         Me.Label56.Name = "Label56"
1180 1182
         Me.Label56.Size = New System.Drawing.Size(55, 16)
1181 1183
         Me.Label56.TabIndex = 1543
@@ -1205,16 +1207,17 @@ Partial Class 銷售單申請
1205 1207
         '
1206 1208
         Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1207 1209
         Me.ComboBox4.FormattingEnabled = True
1208
-        Me.ComboBox4.Location = New System.Drawing.Point(367, 778)
1210
+        Me.ComboBox4.Location = New System.Drawing.Point(202, 504)
1209 1211
         Me.ComboBox4.Name = "ComboBox4"
1210 1212
         Me.ComboBox4.Size = New System.Drawing.Size(78, 24)
1211 1213
         Me.ComboBox4.TabIndex = 1537
1214
+        Me.ComboBox4.Visible = False
1212 1215
         '
1213 1216
         'ComboBox3
1214 1217
         '
1215 1218
         Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1216 1219
         Me.ComboBox3.FormattingEnabled = True
1217
-        Me.ComboBox3.Location = New System.Drawing.Point(245, 778)
1220
+        Me.ComboBox3.Location = New System.Drawing.Point(184, 778)
1218 1221
         Me.ComboBox3.Name = "ComboBox3"
1219 1222
         Me.ComboBox3.Size = New System.Drawing.Size(121, 24)
1220 1223
         Me.ComboBox3.TabIndex = 1536
@@ -1223,10 +1226,11 @@ Partial Class 銷售單申請
1223 1226
         '
1224 1227
         Me.會科碼1_ch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1225 1228
         Me.會科碼1_ch.FormattingEnabled = True
1226
-        Me.會科碼1_ch.Location = New System.Drawing.Point(183, 778)
1229
+        Me.會科碼1_ch.Location = New System.Drawing.Point(202, 465)
1227 1230
         Me.會科碼1_ch.Name = "會科碼1_ch"
1228 1231
         Me.會科碼1_ch.Size = New System.Drawing.Size(61, 24)
1229 1232
         Me.會科碼1_ch.TabIndex = 1535
1233
+        Me.會科碼1_ch.Visible = False
1230 1234
         '
1231 1235
         '會科1_ch
1232 1236
         '
@@ -1241,7 +1245,7 @@ Partial Class 銷售單申請
1241 1245
         '
1242 1246
         Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1243 1247
         Me.ComboBox1.FormattingEnabled = True
1244
-        Me.ComboBox1.Location = New System.Drawing.Point(446, 778)
1248
+        Me.ComboBox1.Location = New System.Drawing.Point(307, 778)
1245 1249
         Me.ComboBox1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1246 1250
         Me.ComboBox1.Name = "ComboBox1"
1247 1251
         Me.ComboBox1.Size = New System.Drawing.Size(139, 24)
@@ -1335,7 +1339,7 @@ Partial Class 銷售單申請
1335 1339
         '
1336 1340
         Me.刷卡總和_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1337 1341
         Me.刷卡總和_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1338
-        Me.刷卡總和_tb.Location = New System.Drawing.Point(836, 391)
1342
+        Me.刷卡總和_tb.Location = New System.Drawing.Point(836, 393)
1339 1343
         Me.刷卡總和_tb.Name = "刷卡總和_tb"
1340 1344
         Me.刷卡總和_tb.Size = New System.Drawing.Size(81, 23)
1341 1345
         Me.刷卡總和_tb.TabIndex = 1314
@@ -1346,7 +1350,7 @@ Partial Class 銷售單申請
1346 1350
         '
1347 1351
         Me.刷卡稅金_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1348 1352
         Me.刷卡稅金_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1349
-        Me.刷卡稅金_tb.Location = New System.Drawing.Point(836, 415)
1353
+        Me.刷卡稅金_tb.Location = New System.Drawing.Point(836, 419)
1350 1354
         Me.刷卡稅金_tb.Name = "刷卡稅金_tb"
1351 1355
         Me.刷卡稅金_tb.Size = New System.Drawing.Size(81, 23)
1352 1356
         Me.刷卡稅金_tb.TabIndex = 1316
@@ -1357,7 +1361,7 @@ Partial Class 銷售單申請
1357 1361
         '
1358 1362
         Me.刷卡傭金_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1359 1363
         Me.刷卡傭金_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1360
-        Me.刷卡傭金_tb.Location = New System.Drawing.Point(836, 439)
1364
+        Me.刷卡傭金_tb.Location = New System.Drawing.Point(836, 445)
1361 1365
         Me.刷卡傭金_tb.Name = "刷卡傭金_tb"
1362 1366
         Me.刷卡傭金_tb.Size = New System.Drawing.Size(81, 23)
1363 1367
         Me.刷卡傭金_tb.TabIndex = 1312
@@ -1379,7 +1383,7 @@ Partial Class 銷售單申請
1379 1383
         '
1380 1384
         Me.其他成本_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1381 1385
         Me.其他成本_tb.ForeColor = System.Drawing.Color.Green
1382
-        Me.其他成本_tb.Location = New System.Drawing.Point(836, 701)
1386
+        Me.其他成本_tb.Location = New System.Drawing.Point(836, 751)
1383 1387
         Me.其他成本_tb.Name = "其他成本_tb"
1384 1388
         Me.其他成本_tb.Size = New System.Drawing.Size(81, 23)
1385 1389
         Me.其他成本_tb.TabIndex = 1309
@@ -1391,7 +1395,7 @@ Partial Class 銷售單申請
1391 1395
         Me.Reset_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1392 1396
         Me.Reset_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1393 1397
         Me.Reset_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1394
-        Me.Reset_bt.Location = New System.Drawing.Point(889, 545)
1398
+        Me.Reset_bt.Location = New System.Drawing.Point(889, 558)
1395 1399
         Me.Reset_bt.Name = "Reset_bt"
1396 1400
         Me.Reset_bt.Size = New System.Drawing.Size(30, 24)
1397 1401
         Me.Reset_bt.TabIndex = 1306
@@ -1413,7 +1417,7 @@ Partial Class 銷售單申請
1413 1417
         '
1414 1418
         Me.物料成本_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1415 1419
         Me.物料成本_tb.ForeColor = System.Drawing.Color.Green
1416
-        Me.物料成本_tb.Location = New System.Drawing.Point(836, 677)
1420
+        Me.物料成本_tb.Location = New System.Drawing.Point(836, 726)
1417 1421
         Me.物料成本_tb.Name = "物料成本_tb"
1418 1422
         Me.物料成本_tb.Size = New System.Drawing.Size(81, 23)
1419 1423
         Me.物料成本_tb.TabIndex = 1304
@@ -1424,7 +1428,7 @@ Partial Class 銷售單申請
1424 1428
         '
1425 1429
         Me.預估利潤_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1426 1430
         Me.預估利潤_tb.ForeColor = System.Drawing.Color.Green
1427
-        Me.預估利潤_tb.Location = New System.Drawing.Point(836, 749)
1431
+        Me.預估利潤_tb.Location = New System.Drawing.Point(836, 801)
1428 1432
         Me.預估利潤_tb.Name = "預估利潤_tb"
1429 1433
         Me.預估利潤_tb.Size = New System.Drawing.Size(81, 23)
1430 1434
         Me.預估利潤_tb.TabIndex = 1302
@@ -1435,7 +1439,7 @@ Partial Class 銷售單申請
1435 1439
         '
1436 1440
         Me.管銷費用_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1437 1441
         Me.管銷費用_tb.ForeColor = System.Drawing.Color.Green
1438
-        Me.管銷費用_tb.Location = New System.Drawing.Point(836, 725)
1442
+        Me.管銷費用_tb.Location = New System.Drawing.Point(836, 776)
1439 1443
         Me.管銷費用_tb.Name = "管銷費用_tb"
1440 1444
         Me.管銷費用_tb.Size = New System.Drawing.Size(81, 23)
1441 1445
         Me.管銷費用_tb.TabIndex = 1300
@@ -1446,7 +1450,7 @@ Partial Class 銷售單申請
1446 1450
         '
1447 1451
         Me.司機運費_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1448 1452
         Me.司機運費_tb.ForeColor = System.Drawing.Color.Black
1449
-        Me.司機運費_tb.Location = New System.Drawing.Point(836, 571)
1453
+        Me.司機運費_tb.Location = New System.Drawing.Point(836, 587)
1450 1454
         Me.司機運費_tb.Name = "司機運費_tb"
1451 1455
         Me.司機運費_tb.Size = New System.Drawing.Size(81, 23)
1452 1456
         Me.司機運費_tb.TabIndex = 1296
@@ -1506,7 +1510,7 @@ Partial Class 銷售單申請
1506 1510
         '
1507 1511
         Me.額外收支_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1508 1512
         Me.額外收支_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1509
-        Me.額外收支_tb.Location = New System.Drawing.Point(836, 648)
1513
+        Me.額外收支_tb.Location = New System.Drawing.Point(836, 669)
1510 1514
         Me.額外收支_tb.Name = "額外收支_tb"
1511 1515
         Me.額外收支_tb.Size = New System.Drawing.Size(81, 23)
1512 1516
         Me.額外收支_tb.TabIndex = 1281
@@ -1517,7 +1521,7 @@ Partial Class 銷售單申請
1517 1521
         '
1518 1522
         Me.銷售合計_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1519 1523
         Me.銷售合計_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1520
-        Me.銷售合計_tb.Location = New System.Drawing.Point(836, 516)
1524
+        Me.銷售合計_tb.Location = New System.Drawing.Point(836, 528)
1521 1525
         Me.銷售合計_tb.Name = "銷售合計_tb"
1522 1526
         Me.銷售合計_tb.Size = New System.Drawing.Size(81, 23)
1523 1527
         Me.銷售合計_tb.TabIndex = 1279
@@ -1528,7 +1532,7 @@ Partial Class 銷售單申請
1528 1532
         '
1529 1533
         Me.稅金_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1530 1534
         Me.稅金_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1531
-        Me.稅金_tb.Location = New System.Drawing.Point(836, 492)
1535
+        Me.稅金_tb.Location = New System.Drawing.Point(836, 503)
1532 1536
         Me.稅金_tb.Name = "稅金_tb"
1533 1537
         Me.稅金_tb.Size = New System.Drawing.Size(81, 23)
1534 1538
         Me.稅金_tb.TabIndex = 1277
@@ -1539,7 +1543,7 @@ Partial Class 銷售單申請
1539 1543
         '
1540 1544
         Me.支出小計_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1541 1545
         Me.支出小計_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1542
-        Me.支出小計_tb.Location = New System.Drawing.Point(836, 624)
1546
+        Me.支出小計_tb.Location = New System.Drawing.Point(836, 644)
1543 1547
         Me.支出小計_tb.Name = "支出小計_tb"
1544 1548
         Me.支出小計_tb.Size = New System.Drawing.Size(81, 23)
1545 1549
         Me.支出小計_tb.TabIndex = 1275
@@ -1550,7 +1554,7 @@ Partial Class 銷售單申請
1550 1554
         '
1551 1555
         Me.收入小計_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1552 1556
         Me.收入小計_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1553
-        Me.收入小計_tb.Location = New System.Drawing.Point(836, 600)
1557
+        Me.收入小計_tb.Location = New System.Drawing.Point(836, 619)
1554 1558
         Me.收入小計_tb.Name = "收入小計_tb"
1555 1559
         Me.收入小計_tb.Size = New System.Drawing.Size(81, 23)
1556 1560
         Me.收入小計_tb.TabIndex = 1273
@@ -1561,7 +1565,7 @@ Partial Class 銷售單申請
1561 1565
         '
1562 1566
         Me.售價小計_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1563 1567
         Me.售價小計_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1564
-        Me.售價小計_tb.Location = New System.Drawing.Point(836, 468)
1568
+        Me.售價小計_tb.Location = New System.Drawing.Point(836, 477)
1565 1569
         Me.售價小計_tb.Name = "售價小計_tb"
1566 1570
         Me.售價小計_tb.Size = New System.Drawing.Size(81, 23)
1567 1571
         Me.售價小計_tb.TabIndex = 1271
@@ -1626,17 +1630,17 @@ Partial Class 銷售單申請
1626 1630
         '
1627 1631
         '客戶資料_dgv
1628 1632
         '
1629
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1630
-        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
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
1631 1635
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1632 1636
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1633 1637
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1634
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 18444)
1638
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 18774)
1635 1639
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1636 1640
         Me.客戶資料_dgv.RowHeadersWidth = 5
1637
-        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1638
-        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1639
-        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
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
1640 1644
         Me.客戶資料_dgv.RowTemplate.Height = 24
1641 1645
         Me.客戶資料_dgv.Size = New System.Drawing.Size(191, 92)
1642 1646
         Me.客戶資料_dgv.TabIndex = 1254
@@ -1644,8 +1648,8 @@ Partial Class 銷售單申請
1644 1648
         '
1645 1649
         '收款事項_dgv
1646 1650
         '
1647
-        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1648
-        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
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
1649 1653
         Me.收款事項_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1650 1654
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1651 1655
         Me.收款事項_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1654,17 +1658,17 @@ Partial Class 銷售單申請
1654 1658
         Me.收款事項_dgv.Location = New System.Drawing.Point(2, 669)
1655 1659
         Me.收款事項_dgv.Name = "收款事項_dgv"
1656 1660
         Me.收款事項_dgv.RowHeadersWidth = 5
1657
-        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1658
-        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1659
-        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
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
1660 1664
         Me.收款事項_dgv.RowTemplate.Height = 24
1661 1665
         Me.收款事項_dgv.Size = New System.Drawing.Size(750, 102)
1662 1666
         Me.收款事項_dgv.TabIndex = 1282
1663 1667
         '
1664 1668
         '銷售衍生運費_dgv
1665 1669
         '
1666
-        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1667
-        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
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
1668 1672
         Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1669 1673
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1670 1674
         Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1673,17 +1677,17 @@ Partial Class 銷售單申請
1673 1677
         Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(2, 542)
1674 1678
         Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
1675 1679
         Me.銷售衍生運費_dgv.RowHeadersWidth = 5
1676
-        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1677
-        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1678
-        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
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
1679 1683
         Me.銷售衍生運費_dgv.RowTemplate.Height = 24
1680 1684
         Me.銷售衍生運費_dgv.Size = New System.Drawing.Size(750, 102)
1681 1685
         Me.銷售衍生運費_dgv.TabIndex = 1334
1682 1686
         '
1683 1687
         '銷售備註_dgv
1684 1688
         '
1685
-        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1686
-        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
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
1687 1691
         Me.銷售備註_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1688 1692
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1689 1693
         Me.銷售備註_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1692,9 +1696,9 @@ Partial Class 銷售單申請
1692 1696
         Me.銷售備註_dgv.Location = New System.Drawing.Point(2, 414)
1693 1697
         Me.銷售備註_dgv.Name = "銷售備註_dgv"
1694 1698
         Me.銷售備註_dgv.RowHeadersWidth = 5
1695
-        DataGridViewCellStyle16.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1696
-        DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1697
-        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle16
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
1698 1702
         Me.銷售備註_dgv.RowTemplate.Height = 24
1699 1703
         Me.銷售備註_dgv.Size = New System.Drawing.Size(750, 102)
1700 1704
         Me.銷售備註_dgv.TabIndex = 1250
@@ -1704,17 +1708,17 @@ Partial Class 銷售單申請
1704 1708
         Me.Label53.AutoSize = True
1705 1709
         Me.Label53.Location = New System.Drawing.Point(1, 761)
1706 1710
         Me.Label53.Name = "Label53"
1707
-        Me.Label53.Size = New System.Drawing.Size(712, 16)
1711
+        Me.Label53.Size = New System.Drawing.Size(487, 16)
1708 1712
         Me.Label53.TabIndex = 1539
1709 1713
         Me.Label53.Text = "_________________________________________________________________________________" &
1710
-    "____________________________________________________________"
1714
+    "_______________"
1711 1715
         '
1712 1716
         'Reset1_bt
1713 1717
         '
1714 1718
         Me.Reset1_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1715 1719
         Me.Reset1_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1716 1720
         Me.Reset1_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1717
-        Me.Reset1_bt.Location = New System.Drawing.Point(810, 491)
1721
+        Me.Reset1_bt.Location = New System.Drawing.Point(810, 502)
1718 1722
         Me.Reset1_bt.Name = "Reset1_bt"
1719 1723
         Me.Reset1_bt.Size = New System.Drawing.Size(25, 24)
1720 1724
         Me.Reset1_bt.TabIndex = 1364
@@ -1726,7 +1730,7 @@ Partial Class 銷售單申請
1726 1730
         Me.Label46.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1727 1731
         Me.Label46.AutoSize = True
1728 1732
         Me.Label46.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1729
-        Me.Label46.Location = New System.Drawing.Point(751, 418)
1733
+        Me.Label46.Location = New System.Drawing.Point(751, 422)
1730 1734
         Me.Label46.Name = "Label46"
1731 1735
         Me.Label46.Size = New System.Drawing.Size(82, 16)
1732 1736
         Me.Label46.TabIndex = 1315
@@ -1737,7 +1741,7 @@ Partial Class 銷售單申請
1737 1741
         Me.Label47.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1738 1742
         Me.Label47.AutoSize = True
1739 1743
         Me.Label47.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1740
-        Me.Label47.Location = New System.Drawing.Point(751, 394)
1744
+        Me.Label47.Location = New System.Drawing.Point(751, 396)
1741 1745
         Me.Label47.Name = "Label47"
1742 1746
         Me.Label47.Size = New System.Drawing.Size(82, 16)
1743 1747
         Me.Label47.TabIndex = 1313
@@ -1748,7 +1752,7 @@ Partial Class 銷售單申請
1748 1752
         Me.Label48.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1749 1753
         Me.Label48.AutoSize = True
1750 1754
         Me.Label48.ForeColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
1751
-        Me.Label48.Location = New System.Drawing.Point(751, 442)
1755
+        Me.Label48.Location = New System.Drawing.Point(751, 448)
1752 1756
         Me.Label48.Name = "Label48"
1753 1757
         Me.Label48.Size = New System.Drawing.Size(82, 16)
1754 1758
         Me.Label48.TabIndex = 1311
@@ -1759,7 +1763,7 @@ Partial Class 銷售單申請
1759 1763
         Me.Label45.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1760 1764
         Me.Label45.AutoSize = True
1761 1765
         Me.Label45.ForeColor = System.Drawing.Color.Green
1762
-        Me.Label45.Location = New System.Drawing.Point(753, 704)
1766
+        Me.Label45.Location = New System.Drawing.Point(753, 754)
1763 1767
         Me.Label45.Name = "Label45"
1764 1768
         Me.Label45.Size = New System.Drawing.Size(82, 16)
1765 1769
         Me.Label45.TabIndex = 1308
@@ -1770,7 +1774,7 @@ Partial Class 銷售單申請
1770 1774
         Me.Label43.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1771 1775
         Me.Label43.AutoSize = True
1772 1776
         Me.Label43.ForeColor = System.Drawing.Color.Green
1773
-        Me.Label43.Location = New System.Drawing.Point(753, 680)
1777
+        Me.Label43.Location = New System.Drawing.Point(753, 729)
1774 1778
         Me.Label43.Name = "Label43"
1775 1779
         Me.Label43.Size = New System.Drawing.Size(82, 16)
1776 1780
         Me.Label43.TabIndex = 1303
@@ -1781,7 +1785,7 @@ Partial Class 銷售單申請
1781 1785
         Me.Label42.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1782 1786
         Me.Label42.AutoSize = True
1783 1787
         Me.Label42.ForeColor = System.Drawing.Color.Green
1784
-        Me.Label42.Location = New System.Drawing.Point(754, 752)
1788
+        Me.Label42.Location = New System.Drawing.Point(754, 804)
1785 1789
         Me.Label42.Name = "Label42"
1786 1790
         Me.Label42.Size = New System.Drawing.Size(82, 16)
1787 1791
         Me.Label42.TabIndex = 1301
@@ -1792,7 +1796,7 @@ Partial Class 銷售單申請
1792 1796
         Me.Label41.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1793 1797
         Me.Label41.AutoSize = True
1794 1798
         Me.Label41.ForeColor = System.Drawing.Color.Green
1795
-        Me.Label41.Location = New System.Drawing.Point(754, 728)
1799
+        Me.Label41.Location = New System.Drawing.Point(754, 779)
1796 1800
         Me.Label41.Name = "Label41"
1797 1801
         Me.Label41.Size = New System.Drawing.Size(82, 16)
1798 1802
         Me.Label41.TabIndex = 1299
@@ -1803,7 +1807,7 @@ Partial Class 銷售單申請
1803 1807
         Me.Label38.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1804 1808
         Me.Label38.AutoSize = True
1805 1809
         Me.Label38.ForeColor = System.Drawing.Color.Black
1806
-        Me.Label38.Location = New System.Drawing.Point(753, 575)
1810
+        Me.Label38.Location = New System.Drawing.Point(753, 591)
1807 1811
         Me.Label38.Name = "Label38"
1808 1812
         Me.Label38.Size = New System.Drawing.Size(82, 16)
1809 1813
         Me.Label38.TabIndex = 1295
@@ -1815,7 +1819,7 @@ Partial Class 銷售單申請
1815 1819
         Me.送貨地點_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1816 1820
         Me.送貨地點_cb.FormattingEnabled = True
1817 1821
         Me.送貨地點_cb.Items.AddRange(New Object() {"1", "2", "3", "4", "5", "6", "7", "8", "9", "Y"})
1818
-        Me.送貨地點_cb.Location = New System.Drawing.Point(809, 545)
1822
+        Me.送貨地點_cb.Location = New System.Drawing.Point(809, 560)
1819 1823
         Me.送貨地點_cb.Name = "送貨地點_cb"
1820 1824
         Me.送貨地點_cb.Size = New System.Drawing.Size(78, 24)
1821 1825
         Me.送貨地點_cb.TabIndex = 1291
@@ -1825,7 +1829,7 @@ Partial Class 銷售單申請
1825 1829
         Me.Label35.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1826 1830
         Me.Label35.AutoSize = True
1827 1831
         Me.Label35.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1828
-        Me.Label35.Location = New System.Drawing.Point(751, 651)
1832
+        Me.Label35.Location = New System.Drawing.Point(751, 672)
1829 1833
         Me.Label35.Name = "Label35"
1830 1834
         Me.Label35.Size = New System.Drawing.Size(85, 16)
1831 1835
         Me.Label35.TabIndex = 1280
@@ -1836,7 +1840,7 @@ Partial Class 銷售單申請
1836 1840
         Me.Label34.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1837 1841
         Me.Label34.AutoSize = True
1838 1842
         Me.Label34.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1839
-        Me.Label34.Location = New System.Drawing.Point(751, 519)
1843
+        Me.Label34.Location = New System.Drawing.Point(751, 531)
1840 1844
         Me.Label34.Name = "Label34"
1841 1845
         Me.Label34.Size = New System.Drawing.Size(85, 16)
1842 1846
         Me.Label34.TabIndex = 1278
@@ -1847,7 +1851,7 @@ Partial Class 銷售單申請
1847 1851
         Me.Label33.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1848 1852
         Me.Label33.AutoSize = True
1849 1853
         Me.Label33.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1850
-        Me.Label33.Location = New System.Drawing.Point(754, 495)
1854
+        Me.Label33.Location = New System.Drawing.Point(754, 506)
1851 1855
         Me.Label33.Name = "Label33"
1852 1856
         Me.Label33.Size = New System.Drawing.Size(60, 16)
1853 1857
         Me.Label33.TabIndex = 1276
@@ -1858,7 +1862,7 @@ Partial Class 銷售單申請
1858 1862
         Me.Label30.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1859 1863
         Me.Label30.AutoSize = True
1860 1864
         Me.Label30.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1861
-        Me.Label30.Location = New System.Drawing.Point(751, 472)
1865
+        Me.Label30.Location = New System.Drawing.Point(751, 481)
1862 1866
         Me.Label30.Name = "Label30"
1863 1867
         Me.Label30.Size = New System.Drawing.Size(84, 16)
1864 1868
         Me.Label30.TabIndex = 1270
@@ -1868,7 +1872,7 @@ Partial Class 銷售單申請
1868 1872
         '
1869 1873
         Me.Label28.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1870 1874
         Me.Label28.AutoSize = True
1871
-        Me.Label28.Location = New System.Drawing.Point(751, 589)
1875
+        Me.Label28.Location = New System.Drawing.Point(751, 606)
1872 1876
         Me.Label28.Name = "Label28"
1873 1877
         Me.Label28.Size = New System.Drawing.Size(167, 16)
1874 1878
         Me.Label28.TabIndex = 1283
@@ -1878,7 +1882,7 @@ Partial Class 銷售單申請
1878 1882
         '
1879 1883
         Me.Label20.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1880 1884
         Me.Label20.AutoSize = True
1881
-        Me.Label20.Location = New System.Drawing.Point(753, 549)
1885
+        Me.Label20.Location = New System.Drawing.Point(753, 564)
1882 1886
         Me.Label20.Name = "Label20"
1883 1887
         Me.Label20.Size = New System.Drawing.Size(55, 16)
1884 1888
         Me.Label20.TabIndex = 1292
@@ -1888,7 +1892,7 @@ Partial Class 銷售單申請
1888 1892
         '
1889 1893
         Me.Label39.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1890 1894
         Me.Label39.AutoSize = True
1891
-        Me.Label39.Location = New System.Drawing.Point(753, 534)
1895
+        Me.Label39.Location = New System.Drawing.Point(753, 547)
1892 1896
         Me.Label39.Name = "Label39"
1893 1897
         Me.Label39.Size = New System.Drawing.Size(167, 16)
1894 1898
         Me.Label39.TabIndex = 1297
@@ -1898,7 +1902,7 @@ Partial Class 銷售單申請
1898 1902
         '
1899 1903
         Me.Label40.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1900 1904
         Me.Label40.AutoSize = True
1901
-        Me.Label40.Location = New System.Drawing.Point(752, 666)
1905
+        Me.Label40.Location = New System.Drawing.Point(752, 688)
1902 1906
         Me.Label40.Name = "Label40"
1903 1907
         Me.Label40.Size = New System.Drawing.Size(167, 16)
1904 1908
         Me.Label40.TabIndex = 1298
@@ -1908,7 +1912,7 @@ Partial Class 銷售單申請
1908 1912
         '
1909 1913
         Me.Label51.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1910 1914
         Me.Label51.AutoSize = True
1911
-        Me.Label51.Location = New System.Drawing.Point(752, 457)
1915
+        Me.Label51.Location = New System.Drawing.Point(752, 463)
1912 1916
         Me.Label51.Name = "Label51"
1913 1917
         Me.Label51.Size = New System.Drawing.Size(167, 16)
1914 1918
         Me.Label51.TabIndex = 1365
@@ -1918,19 +1922,18 @@ Partial Class 銷售單申請
1918 1922
         '
1919 1923
         Me.Label54.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1920 1924
         Me.Label54.AutoSize = True
1921
-        Me.Label54.Location = New System.Drawing.Point(207, 761)
1925
+        Me.Label54.Location = New System.Drawing.Point(366, 761)
1922 1926
         Me.Label54.Name = "Label54"
1923
-        Me.Label54.Size = New System.Drawing.Size(712, 16)
1927
+        Me.Label54.Size = New System.Drawing.Size(387, 16)
1924 1928
         Me.Label54.TabIndex = 1540
1925
-        Me.Label54.Text = "_________________________________________________________________________________" &
1926
-    "____________________________________________________________"
1929
+        Me.Label54.Text = "____________________________________________________________________________"
1927 1930
         '
1928 1931
         'Label32
1929 1932
         '
1930 1933
         Me.Label32.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1931 1934
         Me.Label32.AutoSize = True
1932 1935
         Me.Label32.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1933
-        Me.Label32.Location = New System.Drawing.Point(752, 627)
1936
+        Me.Label32.Location = New System.Drawing.Point(752, 647)
1934 1937
         Me.Label32.Name = "Label32"
1935 1938
         Me.Label32.Size = New System.Drawing.Size(84, 16)
1936 1939
         Me.Label32.TabIndex = 1274
@@ -1941,7 +1944,7 @@ Partial Class 銷售單申請
1941 1944
         Me.Label31.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1942 1945
         Me.Label31.AutoSize = True
1943 1946
         Me.Label31.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
1944
-        Me.Label31.Location = New System.Drawing.Point(751, 603)
1947
+        Me.Label31.Location = New System.Drawing.Point(751, 622)
1945 1948
         Me.Label31.Name = "Label31"
1946 1949
         Me.Label31.Size = New System.Drawing.Size(84, 16)
1947 1950
         Me.Label31.TabIndex = 1272
@@ -2201,14 +2204,18 @@ Partial Class 銷售單申請
2201 2204
         Me.Panel2.Controls.Add(Me.Label27)
2202 2205
         Me.Panel2.Controls.Add(Me.銷售收款流水號_tb)
2203 2206
         Me.Panel2.Controls.Add(Me.最低售價_cb)
2207
+        Me.Panel2.Controls.Add(Me.申請人_tb)
2208
+        Me.Panel2.Controls.Add(Me.Label55)
2204 2209
         Me.Panel2.Controls.Add(Me.地區_cb)
2205 2210
         Me.Panel2.Controls.Add(Me.最低運費_cb)
2206 2211
         Me.Panel2.Controls.Add(Me.清空_bt)
2207 2212
         Me.Panel2.Controls.Add(Me.Label37)
2208 2213
         Me.Panel2.Controls.Add(Me.供應商_cb)
2209 2214
         Me.Panel2.Controls.Add(Me.售價_nud)
2215
+        Me.Panel2.Controls.Add(Me.ComboBox4)
2210 2216
         Me.Panel2.Controls.Add(Me.Label22)
2211 2217
         Me.Panel2.Controls.Add(Me.供應商編碼_cb)
2218
+        Me.Panel2.Controls.Add(Me.會科碼1_ch)
2212 2219
         Me.Panel2.Controls.Add(Me.查詢_tb)
2213 2220
         Me.Panel2.Controls.Add(Me.成本_nud)
2214 2221
         Me.Panel2.Controls.Add(Me.Label17)
@@ -2407,6 +2414,17 @@ Partial Class 銷售單申請
2407 2414
         Me.Panel3.Size = New System.Drawing.Size(934, 685)
2408 2415
         Me.Panel3.TabIndex = 1339
2409 2416
         '
2417
+        '轉高層_cb
2418
+        '
2419
+        Me.轉高層_cb.AutoSize = True
2420
+        Me.轉高層_cb.ForeColor = System.Drawing.Color.Green
2421
+        Me.轉高層_cb.Location = New System.Drawing.Point(544, 28)
2422
+        Me.轉高層_cb.Name = "轉高層_cb"
2423
+        Me.轉高層_cb.Size = New System.Drawing.Size(62, 20)
2424
+        Me.轉高層_cb.TabIndex = 1366
2425
+        Me.轉高層_cb.Text = "轉高層"
2426
+        Me.轉高層_cb.UseVisualStyleBackColor = True
2427
+        '
2410 2428
         '查_bt
2411 2429
         '
2412 2430
         Me.查_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
@@ -2440,16 +2458,27 @@ Partial Class 銷售單申請
2440 2458
         Me.顯示_bt.Text = "顯示物料控件"
2441 2459
         Me.顯示_bt.UseVisualStyleBackColor = True
2442 2460
         '
2443
-        '轉高層_cb
2461
+        '稅金25_tb
2444 2462
         '
2445
-        Me.轉高層_cb.AutoSize = True
2446
-        Me.轉高層_cb.ForeColor = System.Drawing.Color.Green
2447
-        Me.轉高層_cb.Location = New System.Drawing.Point(544, 28)
2448
-        Me.轉高層_cb.Name = "轉高層_cb"
2449
-        Me.轉高層_cb.Size = New System.Drawing.Size(62, 20)
2450
-        Me.轉高層_cb.TabIndex = 1366
2451
-        Me.轉高層_cb.Text = "轉高層"
2452
-        Me.轉高層_cb.UseVisualStyleBackColor = True
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%"
2453 2482
         '
2454 2483
         '銷售單申請
2455 2484
         '
@@ -2679,4 +2708,6 @@ Partial Class 銷售單申請
2679 2708
     Friend WithEvents 關鍵字查詢會計科目_tb As TextBox
2680 2709
     Friend WithEvents 流水號2_bt As TextBox
2681 2710
     Friend WithEvents 轉高層_cb As CheckBox
2711
+    Friend WithEvents 稅金25_tb As TextBox
2712
+    Friend WithEvents Label1 As Label
2682 2713
 End Class

+ 120
- 154
YD-ERP-SYS/業務系統管理/銷售單申請.vb 查看文件

@@ -19,12 +19,8 @@ Public Class 銷售單申請
19 19
     Private Sub Set_清單()
20 20
         物料清單_dgv.DataSource = Nothing : ds.Clear()
21 21
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
22
-        物料清單_dgv.ColumnHeadersHeight = 40
23
-        物料清單_dgv.AllowUserToAddRows = False
24
-        物料清單_dgv.RowTemplate.Height = 25
25
-
26
-        PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
27
-        SQL_盤盈盤損申請_物料清單()
22
+        物料清單_dgv.ColumnHeadersHeight = 40 : 物料清單_dgv.AllowUserToAddRows = False : 物料清單_dgv.RowTemplate.Height = 25
23
+        PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text : SQL_盤盈盤損申請_物料清單()
28 24
         da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
29 25
         物料清單_dgv.Columns(0).FillWeight = 90 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 250
30 26
         物料清單_dgv.Columns(3).FillWeight = 60 : 物料清單_dgv.Columns(4).Visible = False
@@ -44,12 +40,8 @@ Public Class 銷售單申請
44 40
     Private Sub Set_清單1()
45 41
         銷售單據_dgv.DataSource = Nothing : ds1.Clear()
46 42
         銷售單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
47
-        銷售單據_dgv.ColumnHeadersHeight = 25
48
-        銷售單據_dgv.AllowUserToAddRows = False
49
-        銷售單據_dgv.RowTemplate.Height = 25
50
-
51
-        PA19 = 業務_cb.Text
52
-        SQL_銷售控制表()
43
+        銷售單據_dgv.ColumnHeadersHeight = 25 : 銷售單據_dgv.AllowUserToAddRows = False : 銷售單據_dgv.RowTemplate.Height = 25
44
+        PA19 = 業務_cb.Text : SQL_銷售控制表()
53 45
         da.Fill(ds1) : 銷售單據_dgv.DataSource = ds1.Tables(0) : conn.Close()
54 46
         銷售單據_dgv.Columns(0).Visible = False : 銷售單據_dgv.Columns(1).FillWeight = 100 : 銷售單據_dgv.Columns(2).Visible = False : 銷售單據_dgv.Columns(3).Visible = False
55 47
         銷售單據_dgv.Columns(4).Visible = False : 銷售單據_dgv.Columns(5).Visible = False : 銷售單據_dgv.Columns(6).Visible = False : 銷售單據_dgv.Columns(7).Visible = False
@@ -62,21 +54,14 @@ Public Class 銷售單申請
62 54
     Private Sub Set_清單2()
63 55
         客戶資料_dgv.DataSource = Nothing : ds2.Clear()
64 56
         客戶資料_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
65
-        客戶資料_dgv.ColumnHeadersHeight = 25
66
-        客戶資料_dgv.AllowUserToAddRows = False
67
-        客戶資料_dgv.RowTemplate.Height = 25
68
-
69
-        PA16 = 客戶_tb.Text
70
-        SQL_銷售單申請_客戶資料驗證()
57
+        客戶資料_dgv.ColumnHeadersHeight = 25 : 客戶資料_dgv.AllowUserToAddRows = False : 客戶資料_dgv.RowTemplate.Height = 25
58
+        PA16 = 客戶_tb.Text : SQL_銷售單申請_客戶資料驗證()
71 59
         da.Fill(ds2) : 客戶資料_dgv.DataSource = ds2.Tables(0) : conn.Close()
72 60
     End Sub
73 61
     Private Sub Set_清單3()
74 62
         區域庫存_dgv.DataSource = Nothing : ds3.Clear()
75 63
         區域庫存_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
76
-        區域庫存_dgv.ColumnHeadersHeight = 25
77
-        區域庫存_dgv.AllowUserToAddRows = False
78
-        區域庫存_dgv.RowTemplate.Height = 25
79
-
64
+        區域庫存_dgv.ColumnHeadersHeight = 25 : 區域庫存_dgv.AllowUserToAddRows = False : 區域庫存_dgv.RowTemplate.Height = 25
80 65
         PA20 = 料號_tb.Text : SQL_倉名_物料分配查詢()
81 66
         da.Fill(ds3) : 區域庫存_dgv.DataSource = ds3.Tables(0) : conn.Close()
82 67
         區域庫存_dgv.Columns(0).FillWeight = 200 : 區域庫存_dgv.Columns(1).FillWeight = 80
@@ -88,19 +73,11 @@ Public Class 銷售單申請
88 73
     Private Sub Set_清單4()
89 74
         銷售明細_dgv.DataSource = Nothing : ds4.Clear()
90 75
         銷售明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
91
-        銷售明細_dgv.ColumnHeadersHeight = 40
92
-        銷售明細_dgv.AllowUserToAddRows = False
93
-
94
-        If 小間距_ch.Checked = False And 中間距_ch.Checked = False And 大間距_ch.Checked = True Then
95
-            銷售明細_dgv.RowTemplate.Height = 95
96
-        ElseIf 小間距_ch.Checked = False And 中間距_ch.Checked = True And 大間距_ch.Checked = False Then
97
-            銷售明細_dgv.RowTemplate.Height = 60
98
-        ElseIf 小間距_ch.Checked = True And 中間距_ch.Checked = False And 大間距_ch.Checked = False Then
99
-            銷售明細_dgv.RowTemplate.Height = 25
100
-        End If
101
-
102
-        PA2 = "" : PA2 = 單號_tb.Text
103
-        SQL_銷售明細表()
76
+        銷售明細_dgv.ColumnHeadersHeight = 40 : 銷售明細_dgv.AllowUserToAddRows = False
77
+        If 小間距_ch.Checked = False And 中間距_ch.Checked = False And 大間距_ch.Checked = True Then : 銷售明細_dgv.RowTemplate.Height = 95
78
+        ElseIf 小間距_ch.Checked = False And 中間距_ch.Checked = True And 大間距_ch.Checked = False Then : 銷售明細_dgv.RowTemplate.Height = 60
79
+        ElseIf 小間距_ch.Checked = True And 中間距_ch.Checked = False And 大間距_ch.Checked = False Then : 銷售明細_dgv.RowTemplate.Height = 25 : End If
80
+        PA2 = "" : PA2 = 單號_tb.Text : SQL_銷售明細表()
104 81
         da.Fill(ds4) : 銷售明細_dgv.DataSource = ds4.Tables(0) : conn.Close()
105 82
         Set_銷售明細_dgv_下拉式清單1() : Set_銷售明細_dgv_下拉式清單2() : Set_銷售明細_dgv_下拉式清單3()
106 83
         銷售明細_dgv.Columns(0).Visible = False : 銷售明細_dgv.Columns(1).FillWeight = 40 : 銷售明細_dgv.Columns(2).FillWeight = 110 : 銷售明細_dgv.Columns(3).FillWeight = 200
@@ -275,18 +252,18 @@ Public Class 銷售單申請
275 252
     Private Sub Set_合記計算()
276 253
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
277 254
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
278
-        司機運費_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"
279 256
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
280 257
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
281 258
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
282
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
259
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
283 260
             End If
284 261
         Next
285
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(刷卡總和_tb.Text) * 0.02)
262
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(刷卡總和_tb.Text) * 0.02)
286 263
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
287 264
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
288
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
289
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
265
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
266
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
290 267
             If 銷售明細_dgv("無管銷", i).Value = False Then
291 268
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
292 269
                     If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
@@ -297,47 +274,47 @@ Public Class 銷售單申請
297 274
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
298 275
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
299 276
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
300
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
277
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
301 278
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
302 279
             End If
303 280
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
304 281
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
305 282
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
306
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
283
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
307 284
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
308 285
             End If
309 286
 
310 287
             If 銷售明細_dgv("含稅", i).Value = True Then
311
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
288
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
312 289
             End If
313 290
         Next
314 291
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
315 292
 
316
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
293
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
317 294
             通知_lb.Text = "無稅金"
318
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
319
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
320
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
295
+        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
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
321 298
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
322
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
299
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
323 300
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
324 301
         End If
325 302
 
326
-        If 稅金存檔 <> Val(稅金_tb.Text) Then
303
+        If 稅金存檔 <> CLng(稅金_tb.Text) Then
327 304
             稅金_tb.Text = 稅金存檔
328
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
329
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
330
-        ElseIf 稅金存檔 = Val(稅金_tb.Text) Then
305
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
306
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
307
+        ElseIf 稅金存檔 = CLng(稅金_tb.Text) Then
331 308
             稅金_tb.Text = 稅金存檔
332
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
333
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
334
-        End If
309
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
310
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
311
+        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
335 312
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
336 313
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
337
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
338
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
314
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
315
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
339 316
         Next
340
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
317
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
341 318
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
342 319
         Dim 金額 As Integer = 0
343 320
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -346,7 +323,7 @@ Public Class 銷售單申請
346 323
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
347 324
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
348 325
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
349
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
326
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
350 327
             End If
351 328
         Next
352 329
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -354,28 +331,29 @@ Public Class 銷售單申請
354 331
             司機運費_tb.Text = "0"
355 332
         Else
356 333
             If 運費 = 0 Then
357
-                If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
334
+                If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
358 335
                     司機運費_tb.Text = 最低運費_cb.Text
359
-                ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
360
-                    司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
336
+                ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
337
+                    司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
361 338
                 End If
362 339
             Else
363 340
                 司機運費_tb.Text = 運費
364 341
             End If
365 342
         End If
366 343
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
367
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
344
+        預估利潤_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)
368 346
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
369 347
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
370
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
348
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
371 349
             Next
372 350
         End If
373 351
         '-------007-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
374
-        售價小計_tb.Text = Strings.Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Strings.Format(Val(銷售合計_tb.Text), "#,##0")
375
-        收入小計_tb.Text = Strings.Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Strings.Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Strings.Format(Val(額外收支_tb.Text), "#,##0")
376
-        司機運費_tb.Text = Strings.Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Strings.Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Strings.Format(Val(預估利潤_tb.Text), "#,##0")
377
-        物料成本_tb.Text = Strings.Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Strings.Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Strings.Format(Val(刷卡總和_tb.Text), "#,##0")
378
-        刷卡稅金_tb.Text = Strings.Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Strings.Format(Val(刷卡傭金_tb.Text), "#,##0")
352
+        售價小計_tb.Text = Strings.Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Strings.Format(CLng(銷售合計_tb.Text), "#,##0")
353
+        收入小計_tb.Text = Strings.Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Strings.Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Strings.Format(CLng(額外收支_tb.Text), "#,##0")
354
+        司機運費_tb.Text = Strings.Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Strings.Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Strings.Format(CLng(預估利潤_tb.Text), "#,##0")
355
+        物料成本_tb.Text = Strings.Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Strings.Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Strings.Format(CLng(刷卡總和_tb.Text), "#,##0")
356
+        刷卡稅金_tb.Text = Strings.Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Strings.Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0")
379 357
     End Sub
380 358
     Private Sub 指定倉庫_cb_下拉表單資料載入()
381 359
         If 需要全部庫存區域清單_ch.Checked = True Then
@@ -483,7 +461,7 @@ Public Class 銷售單申請
483 461
         End If
484 462
     End Sub
485 463
     Private Sub 銷售備註_dgvCellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 銷售備註_dgv.CellEndEdit
486
-        If (Val(銷售備註_dgv.Rows(e.RowIndex).Cells("收入").Value) <> 0 And Val(銷售備註_dgv.Rows(e.RowIndex).Cells("支出").Value) <> 0) Then
464
+        If (CLng(銷售備註_dgv.Rows(e.RowIndex).Cells("收入").Value) <> 0 And CLng(銷售備註_dgv.Rows(e.RowIndex).Cells("支出").Value) <> 0) Then
487 465
             MsgBox("支出與收入不能同時有金額")
488 466
             Set_清單5()
489 467
             Exit Sub
@@ -591,8 +569,8 @@ Public Class 銷售單申請
591 569
             If e.RowIndex = -1 Then : Else
592 570
                 料號_tb.Text = 物料清單_dgv("料號", e.RowIndex).Value.ToString : 供應商編碼_tb.Text = 物料清單_dgv("供應商", e.RowIndex).Value.ToString
593 571
                 品名_tb.Text = 物料清單_dgv("品名", e.RowIndex).Value.ToString : 最大庫存量_tb.Text = 物料清單_dgv("最低庫存量", e.RowIndex).Value.ToString
594
-                庫存量_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
595
-                可申請_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - Val(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
572
+                庫存量_tb.Text = CLng(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
573
+                可申請_tb.Text = CLng(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - CLng(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
596 574
 
597 575
                 物料圖_pb.Image = Nothing : PA1 = 料號_tb.Text : SQL_物料檔案_是否有圖()
598 576
                 If dr.Read() Then
@@ -1128,7 +1106,7 @@ Public Class 銷售單申請
1128 1106
 
1129 1107
                             Dim 排序 As Integer
1130 1108
                             SQL_銷售明細表_排序()
1131
-                            If dr.Read() Then : 排序 = Val(dr("排序")) + 1 : Else : 排序 = 1 : End If : PA11 = 排序
1109
+                            If dr.Read() Then : 排序 = CLng(dr("排序")) + 1 : Else : 排序 = 1 : End If : PA11 = 排序
1132 1110
 
1133 1111
                             SQL_銷售單申請_銷售明細表_新增() : conn.Close()
1134 1112
                             Set_清單4() : Set_清單()
@@ -1159,7 +1137,7 @@ Public Class 銷售單申請
1159 1137
         If 流水號_tb.Text = "" Then
1160 1138
             MsgBox("沒有銷售單號,無法作業。")
1161 1139
         Else
1162
-            If Val(Strings.Left(單號_tb.Text, 1)) = Val(業務號碼) Or Val(登入人級別) <= 1 Then
1140
+            If CLng(Strings.Left(單號_tb.Text, 1)) = CLng(業務號碼) Or CLng(登入人級別) <= 1 Then
1163 1141
                 Dim aa1 As MsgBoxResult = MsgBox("刪除銷售單會連同該單據串連的採購,倉儲等聯繫單據都依同刪除,請再次確定是否刪除該單據?", MsgBoxStyle.OkCancel)
1164 1142
                 If aa1 = MsgBoxResult.Ok Then
1165 1143
                     Dim SSA As String
@@ -1243,8 +1221,8 @@ Public Class 銷售單申請
1243 1221
             If Month(申請日期_dtp.Value) < 10 Then : d = "0" & CStr(Month(申請日期_dtp.Value))
1244 1222
             Else : d = CStr(Month(申請日期_dtp.Value))
1245 1223
             End If
1246
-            If Val(Strings.Right(申請日期_dtp.Value, 2)) < 10 Then : f = "0" & Val(Strings.Right(申請日期_dtp.Value, 2))
1247
-            Else : f = Val(Strings.Right(申請日期_dtp.Value, 2))
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))
1248 1226
             End If
1249 1227
             If NUM1 < 10 Then : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(申請日期_dtp.Value)), 2) & d & f & "0" & NUM1
1250 1228
             Else : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(申請日期_dtp.Value)), 2) & d & f & NUM1
@@ -1465,18 +1443,18 @@ Public Class 銷售單申請
1465 1443
     Private Sub Reset_bt_Click(sender As Object, e As EventArgs) Handles Reset_bt.Click
1466 1444
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1467 1445
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1468
-        司機運費_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"
1469 1447
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1470 1448
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1471 1449
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1472
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1450
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1473 1451
             End If
1474 1452
         Next
1475
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.02))
1453
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.02))
1476 1454
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1477 1455
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
1478
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1479
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1456
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1457
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1480 1458
             If 銷售明細_dgv("無管銷", i).Value = False Then
1481 1459
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1482 1460
                     If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
@@ -1487,47 +1465,47 @@ Public Class 銷售單申請
1487 1465
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1488 1466
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1489 1467
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1490
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1468
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1491 1469
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1492 1470
             End If
1493 1471
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1494 1472
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1495 1473
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1496
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1474
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1497 1475
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1498 1476
             End If
1499 1477
 
1500 1478
             If 銷售明細_dgv("含稅", i).Value = True Then
1501
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1479
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1502 1480
             End If
1503 1481
         Next
1504 1482
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
1505 1483
 
1506
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
1484
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1507 1485
             通知_lb.Text = "無稅金"
1508
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
1509
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1510
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
1486
+        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)
1488
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1511 1489
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1512
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
1490
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
1513 1491
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
1514 1492
         End If
1515 1493
 
1516
-        If 稅金存檔 <> Val(稅金_tb.Text) Then
1494
+        If 稅金存檔 <> CLng(稅金_tb.Text) Then
1517 1495
             稅金_tb.Text = 稅金存檔
1518
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1519
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
1520
-        ElseIf 稅金存檔 = Val(稅金_tb.Text) Then
1496
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1497
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1498
+        ElseIf 稅金存檔 = CLng(稅金_tb.Text) Then
1521 1499
             稅金_tb.Text = 稅金存檔
1522
-            銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
1523
-            售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1524
-        End If
1500
+            銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1501
+            售價小計_tb.Text = CLng(銷售合計_tb.Text) - CLng(稅金_tb.Text)
1502
+        End If : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1525 1503
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1526 1504
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1527
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1528
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1505
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1506
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1529 1507
         Next
1530
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
1508
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
1531 1509
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1532 1510
         Dim 金額 As Integer = 0
1533 1511
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -1536,33 +1514,34 @@ Public Class 銷售單申請
1536 1514
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1537 1515
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
1538 1516
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
1539
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
1517
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
1540 1518
             End If
1541 1519
         Next
1542 1520
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1543 1521
         If 送貨地點_cb.Text = "" Or 送貨地點_cb.Text = "自取" Or 最低運費_cb.Text = "" Or 最低售價_cb.Text = "" Then
1544 1522
             司機運費_tb.Text = "0"
1545 1523
         Else
1546
-            If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
1524
+            If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
1547 1525
                 司機運費_tb.Text = 最低運費_cb.Text
1548
-            ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
1549
-                司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
1526
+            ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
1527
+                司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
1550 1528
             End If
1551 1529
         End If
1552 1530
         存檔1()
1553 1531
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1554
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
1532
+        預估利潤_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)
1555 1534
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1556 1535
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1557
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1536
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1558 1537
             Next
1559 1538
         End If
1560 1539
         '-------007-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1561
-        售價小計_tb.Text = Strings.Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Strings.Format(Val(銷售合計_tb.Text), "#,##0")
1562
-        收入小計_tb.Text = Strings.Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Strings.Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Strings.Format(Val(額外收支_tb.Text), "#,##0")
1563
-        司機運費_tb.Text = Strings.Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Strings.Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Strings.Format(Val(預估利潤_tb.Text), "#,##0")
1564
-        物料成本_tb.Text = Strings.Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Strings.Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Strings.Format(Val(刷卡總和_tb.Text), "#,##0")
1565
-        刷卡稅金_tb.Text = Strings.Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Strings.Format(Val(刷卡傭金_tb.Text), "#,##0")
1540
+        售價小計_tb.Text = Strings.Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Strings.Format(CLng(銷售合計_tb.Text), "#,##0")
1541
+        收入小計_tb.Text = Strings.Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Strings.Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Strings.Format(CLng(額外收支_tb.Text), "#,##0")
1542
+        司機運費_tb.Text = Strings.Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Strings.Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Strings.Format(CLng(預估利潤_tb.Text), "#,##0")
1543
+        物料成本_tb.Text = Strings.Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Strings.Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Strings.Format(CLng(刷卡總和_tb.Text), "#,##0")
1544
+        刷卡稅金_tb.Text = Strings.Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Strings.Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0")
1566 1545
     End Sub
1567 1546
     Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
1568 1547
         銷售單據_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
@@ -1576,18 +1555,18 @@ Public Class 銷售單申請
1576 1555
     Private Sub Reset1_bt_Click(sender As Object, e As EventArgs) Handles Reset1_bt.Click
1577 1556
         Dim 不含1類銷售小記 As Integer : Dim 金額1 As Integer = 0 : Dim 無管物料 As Integer
1578 1557
         售價小計_tb.Text = "0" : 稅金_tb.Text = "0" : 銷售合計_tb.Text = "0" : 收入小計_tb.Text = "0" : 支出小計_tb.Text = "0" : 額外收支_tb.Text = "0" : 物料成本_tb.Text = "0"
1579
-        司機運費_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 1559
         '-------001-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1581 1560
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
1582 1561
             If 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1583
-                刷卡總和_tb.Text = Val(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1562
+                刷卡總和_tb.Text = CLng(刷卡總和_tb.Text) + 收款事項_dgv("金額", i).Value
1584 1563
             End If
1585 1564
         Next
1586
-        刷卡稅金_tb.Text = CInt(Val(Val(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(Val(刷卡總和_tb.Text) * 0.02)
1565
+        刷卡稅金_tb.Text = CInt(CLng(CLng(刷卡總和_tb.Text) * 0.05)) : 刷卡傭金_tb.Text = CInt(CLng(刷卡總和_tb.Text) * 0.02)
1587 1566
         '-------002-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1588 1567
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
1589
-            銷售合計_tb.Text = Val(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1590
-            售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1568
+            銷售合計_tb.Text = CLng(銷售合計_tb.Text) + 銷售明細_dgv("售價", i).Value
1569
+            售價小計_tb.Text = CLng(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1591 1570
             If 銷售明細_dgv("無管銷", i).Value = False Then
1592 1571
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1593 1572
                     If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
@@ -1598,40 +1577,40 @@ Public Class 銷售單申請
1598 1577
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1599 1578
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1600 1579
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1601
-                物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1580
+                物料成本_tb.Text = CLng(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1602 1581
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1603 1582
             End If
1604 1583
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1605 1584
                 If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1606 1585
                 If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1607
-                其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1586
+                其他成本_tb.Text = CLng(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1608 1587
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1609 1588
             End If
1610 1589
 
1611 1590
             If 銷售明細_dgv("含稅", i).Value = True Then
1612
-                稅金_tb.Text = Val(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1591
+                稅金_tb.Text = CLng(稅金_tb.Text) + ((銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05) - (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value))
1613 1592
             End If
1614 1593
         Next
1615 1594
         管銷費用_tb.Text = 無管物料 * 1.06 - 無管物料
1616
-        銷售合計_tb.Text = Val(售價小計_tb.Text) + Val(稅金_tb.Text)
1595
+        銷售合計_tb.Text = CLng(售價小計_tb.Text) + CLng(稅金_tb.Text)
1617 1596
 
1618
-        If Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) = 0 Then
1597
+        If CLng(稅金_tb.Text) = 0 And CLng(刷卡稅金_tb.Text) = 0 Then
1619 1598
             通知_lb.Text = "無稅金"
1620
-        ElseIf Val(稅金_tb.Text) = 0 And Val(刷卡稅金_tb.Text) <> 0 Then
1621
-            通知_lb.Text = "因清單中沒有打勾含稅,但有刷卡帶入的稅金,所以稅金以刷卡稅金為主" : 稅金_tb.Text = 刷卡稅金_tb.Text : 售價小計_tb.Text = Val(銷售合計_tb.Text) - Val(稅金_tb.Text)
1622
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) > Val(刷卡稅金_tb.Text) Then
1599
+        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)
1601
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) > CLng(刷卡稅金_tb.Text) Then
1623 1602
             通知_lb.Text = "因售價稅金大於刷卡稅金,計算正常,利潤中扣除刷卡傭金"
1624
-        ElseIf (Val(稅金_tb.Text) <> 0 Or Val(刷卡稅金_tb.Text) <> 0) And Val(稅金_tb.Text) < Val(刷卡稅金_tb.Text) Then
1603
+        ElseIf (CLng(稅金_tb.Text) <> 0 Or CLng(刷卡稅金_tb.Text) <> 0) And CLng(稅金_tb.Text) < CLng(刷卡稅金_tb.Text) Then
1625 1604
             通知_lb.Text = "刷卡稅金大於自動計算後的稅金,邏輯有誤,請從新拆售價。"
1626 1605
         End If
1627 1606
 
1628
-        稅金存檔 = Val(稅金_tb.Text)
1607
+        稅金存檔 = CLng(稅金_tb.Text) : 稅金25_tb.Text = CLng(稅金_tb.Text) / 2
1629 1608
         '-------003-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1630 1609
         For i As Integer = 0 To 銷售備註_dgv.Rows.Count - 1
1631
-            收入小計_tb.Text = Val(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1632
-            支出小計_tb.Text = Val(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1610
+            收入小計_tb.Text = CLng(收入小計_tb.Text) + 銷售備註_dgv("收入", i).Value
1611
+            支出小計_tb.Text = CLng(支出小計_tb.Text) + 銷售備註_dgv("支出", i).Value
1633 1612
         Next
1634
-        額外收支_tb.Text = Val(收入小計_tb.Text) - Val(支出小計_tb.Text)
1613
+        額外收支_tb.Text = CLng(收入小計_tb.Text) - CLng(支出小計_tb.Text)
1635 1614
         '-------004-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1636 1615
         Dim 金額 As Integer = 0
1637 1616
         For i As Integer = 0 To 收款事項_dgv.Rows.Count - 1
@@ -1640,7 +1619,7 @@ Public Class 銷售單申請
1640 1619
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString <> "未收餘額" Then
1641 1620
                 金額 = 金額 + 收款事項_dgv("金額", i).Value
1642 1621
             ElseIf 收款事項_dgv("真項次", i).Value.ToString = "0" And 收款事項_dgv("內容", i).Value.ToString = "未收餘額" Then
1643
-                收款事項_dgv("金額", i).Value = CInt(Val(銷售合計_tb.Text)) - 金額
1622
+                收款事項_dgv("金額", i).Value = CInt(CLng(銷售合計_tb.Text)) - 金額
1644 1623
             End If
1645 1624
         Next
1646 1625
         '-------005-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1648,28 +1627,29 @@ Public Class 銷售單申請
1648 1627
             司機運費_tb.Text = "0"
1649 1628
         Else
1650 1629
             If 運費 = 0 Then
1651
-                If (不含1類銷售小記 - Val(其他成本_tb.Text)) <= Val(最低售價_cb.Text) Then
1630
+                If (不含1類銷售小記 - CLng(其他成本_tb.Text)) <= CLng(最低售價_cb.Text) Then
1652 1631
                     司機運費_tb.Text = 最低運費_cb.Text
1653
-                ElseIf (不含1類銷售小記 - Val(其他成本_tb.Text)) > Val(最低售價_cb.Text) Then
1654
-                    司機運費_tb.Text = (不含1類銷售小記 - Val(稅金_tb.Text) - Val(刷卡傭金_tb.Text) - Val(其他成本_tb.Text)) / 100 * 3
1632
+                ElseIf (不含1類銷售小記 - CLng(其他成本_tb.Text)) > CLng(最低售價_cb.Text) Then
1633
+                    司機運費_tb.Text = (不含1類銷售小記 - CLng(稅金_tb.Text) - CLng(刷卡傭金_tb.Text) - CLng(其他成本_tb.Text)) / 100 * 3
1655 1634
                 End If
1656 1635
             Else
1657 1636
                 司機運費_tb.Text = 運費
1658 1637
             End If
1659 1638
         End If
1660 1639
         '-------006-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1661
-        預估利潤_tb.Text = Val(售價小計_tb.Text) + Val(額外收支_tb.Text) - Val(其他成本_tb.Text) - Val(物料成本_tb.Text) - Val(司機運費_tb.Text) - Val(管銷費用_tb.Text) - Val(刷卡傭金_tb.Text)
1640
+        預估利潤_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)
1662 1642
         If 銷售衍生運費_dgv.Rows.Count > 0 Then
1663 1643
             For i As Integer = 0 To 銷售衍生運費_dgv.Rows.Count - 1
1664
-                預估利潤_tb.Text = Val(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1644
+                預估利潤_tb.Text = CLng(預估利潤_tb.Text) - 銷售衍生運費_dgv.Rows(i).Cells("支出").Value
1665 1645
             Next
1666 1646
         End If
1667 1647
         '-------007-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1668
-        售價小計_tb.Text = Strings.Format(Val(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(Val(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Strings.Format(Val(銷售合計_tb.Text), "#,##0")
1669
-        收入小計_tb.Text = Strings.Format(Val(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Strings.Format(Val(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Strings.Format(Val(額外收支_tb.Text), "#,##0")
1670
-        司機運費_tb.Text = Strings.Format(Val(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Strings.Format(Val(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Strings.Format(Val(預估利潤_tb.Text), "#,##0")
1671
-        物料成本_tb.Text = Strings.Format(Val(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Strings.Format(Val(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Strings.Format(Val(刷卡總和_tb.Text), "#,##0")
1672
-        刷卡稅金_tb.Text = Strings.Format(Val(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Strings.Format(Val(刷卡傭金_tb.Text), "#,##0")
1648
+        售價小計_tb.Text = Strings.Format(CLng(售價小計_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(CLng(稅金_tb.Text), "#,##0") : 銷售合計_tb.Text = Strings.Format(CLng(銷售合計_tb.Text), "#,##0")
1649
+        收入小計_tb.Text = Strings.Format(CLng(收入小計_tb.Text), "#,##0") : 支出小計_tb.Text = Strings.Format(CLng(支出小計_tb.Text), "#,##0") : 額外收支_tb.Text = Strings.Format(CLng(額外收支_tb.Text), "#,##0")
1650
+        司機運費_tb.Text = Strings.Format(CLng(司機運費_tb.Text), "#,##0") : 管銷費用_tb.Text = Strings.Format(CLng(管銷費用_tb.Text), "#,##0") : 預估利潤_tb.Text = Strings.Format(CLng(預估利潤_tb.Text), "#,##0")
1651
+        物料成本_tb.Text = Strings.Format(CLng(物料成本_tb.Text), "#,##0") : 其他成本_tb.Text = Strings.Format(CLng(其他成本_tb.Text), "#,##0") : 刷卡總和_tb.Text = Strings.Format(CLng(刷卡總和_tb.Text), "#,##0")
1652
+        刷卡稅金_tb.Text = Strings.Format(CLng(刷卡稅金_tb.Text), "#,##0") : 刷卡傭金_tb.Text = Strings.Format(CLng(刷卡傭金_tb.Text), "#,##0") : 稅金25_tb.Text = Strings.Format(CLng(稅金25_tb.Text), "#,##0.0")
1673 1653
     End Sub
1674 1654
     Private Sub 司機運費_tb_TextChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles 司機運費_tb.KeyPress
1675 1655
         If e.KeyChar = Chr(13) Then
@@ -1806,7 +1786,7 @@ Public Class 銷售單申請
1806 1786
         xlSheet.Cells(6, 5) = CInt(稅金_tb.Text) : xlSheet.Cells(6, 6) = "手續:" : xlSheet.Cells(6, 7) = 刷卡傭金_tb.Text : xlSheet.Cells(6, 8) = "總額:"
1807 1787
         xlSheet.Cells(6, 9) = 銷售合計_tb.Text : xlSheet.Cells(6, 10) = "餘額:" : xlSheet.Cells(6, 11) = N2 : xlSheet.Cells(8, 2) = "品號"
1808 1788
         xlSheet.Cells(8, 5) = "品名規格" : xlSheet.Cells(8, 8) = "數量" : xlSheet.Cells(8, 9) = "單價" : xlSheet.Cells(8, 11) = "金額" : xlSheet.Cells(8, 12) = "含管銷"
1809
-        xlSheet.Cells(8, 13) = "成本價" : xlSheet.Cells(8, 14) = "廠商名稱"
1789
+        xlSheet.Cells(8, 13) = "成本價" : xlSheet.Cells(8, 14) = "廠商名稱" : xlSheet.Cells(7, 4) = "稅金2.5%:" : xlSheet.Cells(7, 5) = CInt(稅金_tb.Text) / 2
1810 1790
         For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
1811 1791
             xlSheet.Cells(i + 9, 1) = 銷售明細_dgv.Rows(i).Cells("料號").Value
1812 1792
             xlSheet.Cells(i + 9, 3) = 銷售明細_dgv.Rows(i).Cells("品名").Value & " " & 銷售明細_dgv.Rows(i).Cells("備註").Value
@@ -2063,19 +2043,6 @@ Public Class 銷售單申請
2063 2043
         xlSheet.Columns("A:N").Select
2064 2044
         myExcel.Application.PrintCommunication = False : With myExcel.ActiveSheet.PageSetup : .PrintTitleRows = "" : .PrintTitleColumns = "" : End With
2065 2045
         myExcel.Application.PrintCommunication = True : myExcel.ActiveSheet.PageSetup.PrintArea = "" : myExcel.Application.PrintCommunication = False
2066
-        With myExcel.ActiveSheet.PageSetup : .LeftHeader = "" : .CenterHeader = "" : .RightHeader = "" : .LeftFooter = "" : .CenterFooter = "" : .RightFooter = ""
2067
-            .LeftMargin = myExcel.Application.InchesToPoints(0.7) : .RightMargin = myExcel.Application.InchesToPoints(0.7) : .TopMargin = myExcel.Application.InchesToPoints(0.75)
2068
-            .BottomMargin = myExcel.Application.InchesToPoints(0.75) : .HeaderMargin = myExcel.Application.InchesToPoints(0.3) : .FooterMargin = myExcel.Application.InchesToPoints(0.3)
2069
-            .PrintHeadings = False : .PrintGridlines = False : .PrintQuality = 1200 : .CenterHorizontally = False : .CenterVertically = False : .Draft = False
2070
-            .FirstPageNumber = xlAutomatic : .BlackAndWhite = False : .Zoom = False : .FitToPagesWide = 1 : .FitToPagesTall = 0
2071
-            .OddAndEvenPagesHeaderFooter = False : .DifferentFirstPageHeaderFooter = False : .ScaleWithDocHeaderFooter = True : .AlignMarginsHeaderFooter = True
2072
-            .EvenPage.LeftHeader.Text = "" : .EvenPage.CenterHeader.Text = "" : .EvenPage.RightHeader.Text = "" : .EvenPage.LeftFooter.Text = "" : .EvenPage.CenterFooter.Text = ""
2073
-            .EvenPage.RightFooter.Text = "" : .FirstPage.LeftHeader.Text = "" : .FirstPage.CenterHeader.Text = "" : .FirstPage.RightHeader.Text = "" : .FirstPage.LeftFooter.Text = ""
2074
-            .FirstPage.CenterFooter.Text = "" : .FirstPage.RightFooter.Text = ""
2075
-        End With
2076
-        myExcel.Application.PrintCommunication = True : myExcel.Application.PrintCommunication = False
2077
-        With myExcel.ActiveSheet.PageSetup : .PrintTitleRows = "" : .PrintTitleColumns = "" : End With
2078
-        myExcel.Application.PrintCommunication = True : myExcel.ActiveSheet.PageSetup.PrintArea = "" : myExcel.Application.PrintCommunication = False
2079 2046
         With myExcel.ActiveSheet.PageSetup : .LeftHeader = "" : .CenterHeader = "" : .RightHeader = "" : .LeftFooter = "" : .CenterFooter = "" : .RightFooter = ""
2080 2047
             .LeftMargin = myExcel.Application.InchesToPoints(0.25) : .RightMargin = myExcel.Application.InchesToPoints(0.25) : .TopMargin = myExcel.Application.InchesToPoints(0.75)
2081 2048
             .BottomMargin = myExcel.Application.InchesToPoints(0.75) : .HeaderMargin = myExcel.Application.InchesToPoints(0.3) : .FooterMargin = myExcel.Application.InchesToPoints(0.3)
@@ -2086,6 +2053,5 @@ Public Class 銷售單申請
2086 2053
             .EvenPage.RightFooter.Text = "" : .FirstPage.LeftHeader.Text = "" : .FirstPage.CenterHeader.Text = "" : .FirstPage.RightHeader.Text = "" : .FirstPage.LeftFooter.Text = ""
2087 2054
             .FirstPage.CenterFooter.Text = "" : .FirstPage.RightFooter.Text = ""
2088 2055
         End With
2089
-        myExcel.Application.PrintCommunication = True
2090 2056
     End Sub
2091 2057
 End Class

+ 3
- 1
YD-ERP-SYS/財務系統管理/業績獎金彙總表.Designer.vb 查看文件

@@ -266,6 +266,7 @@ Partial Class 業績獎金彙總表
266 266
             Or System.Windows.Forms.AnchorStyles.Left) _
267 267
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
268 268
         Me.獎金彙總_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
269
+        Me.獎金彙總_dgv.BackgroundColor = System.Drawing.Color.White
269 270
         Me.獎金彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
270 271
         Me.獎金彙總_dgv.Location = New System.Drawing.Point(4, 30)
271 272
         Me.獎金彙總_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
@@ -305,6 +306,7 @@ Partial Class 業績獎金彙總表
305 306
             Or System.Windows.Forms.AnchorStyles.Left) _
306 307
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
307 308
         Me.獎金明細表_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
309
+        Me.獎金明細表_dgv.BackgroundColor = System.Drawing.Color.White
308 310
         Me.獎金明細表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
309 311
         Me.獎金明細表_dgv.Location = New System.Drawing.Point(4, 30)
310 312
         Me.獎金明細表_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
@@ -522,8 +524,8 @@ Partial Class 業績獎金彙總表
522 524
         Me.Controls.Add(Me.獎金明細表_dgv)
523 525
         Me.Controls.Add(Me.過度表_dgv)
524 526
         Me.Controls.Add(Me.彙總1_dgv)
525
-        Me.Controls.Add(Me.中間日期_dtp)
526 527
         Me.Controls.Add(Me.衍生運費_dgv)
528
+        Me.Controls.Add(Me.中間日期_dtp)
527 529
         Me.Controls.Add(Me.外車車資_dgv)
528 530
         Me.Controls.Add(Me.備註運費_dgv)
529 531
         Me.Controls.Add(Me.料號一_dgv)

+ 38
- 30
YD-ERP-SYS/財務系統管理/業績獎金彙總表.vb 查看文件

@@ -29,6 +29,7 @@ Public Class 業績獎金彙總表
29 29
             If 彙總1_dgv.Rows(I).Cells(3).Value.ToString = "" Then : 彙總1_dgv.Rows(I).Cells(3).Value = 0 : End If
30 30
             If 彙總1_dgv.Rows(I).Cells(4).Value.ToString = "" Then : 彙總1_dgv.Rows(I).Cells(4).Value = 0 : End If
31 31
             If 彙總1_dgv.Rows(I).Cells(5).Value.ToString = "" Then : 彙總1_dgv.Rows(I).Cells(5).Value = 0 : End If
32
+            If 彙總1_dgv.Rows(I).Cells(6).Value.ToString = "" Then : 彙總1_dgv.Rows(I).Cells(6).Value = 0 : End If
32 33
         Next
33 34
     End Sub
34 35
     Private Sub Set_清單2()
@@ -107,7 +108,7 @@ Public Class 業績獎金彙總表
107 108
         獎金明細表_dgv.Columns(4).DefaultCellStyle.Format = "#,##0" : 獎金明細表_dgv.Columns(5).DefaultCellStyle.Format = "#,##0"
108 109
         獎金明細表_dgv.Columns(6).DefaultCellStyle.Format = "#,##0" : 獎金明細表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
109 110
         獎金明細表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 獎金明細表_dgv.Columns(9).DefaultCellStyle.Format = "#,##0"
110
-
111
+        獎金明細表_dgv.Columns(10).DefaultCellStyle.Format = "#,##0"
111 112
         獎金明細表_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
112 113
         獎金明細表_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
113 114
         獎金明細表_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
@@ -116,7 +117,7 @@ Public Class 業績獎金彙總表
116 117
         獎金明細表_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
117 118
         獎金明細表_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
118 119
         獎金明細表_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
119
-
120
+        獎金明細表_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
120 121
         獎金明細表_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
121 122
         獎金明細表_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
122 123
         獎金明細表_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
@@ -125,10 +126,11 @@ Public Class 業績獎金彙總表
125 126
         獎金明細表_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
126 127
         獎金明細表_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
127 128
         獎金明細表_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
128
-
129
+        獎金明細表_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
129 130
         For I As Integer = 0 To 獎金明細表_dgv.Rows.Count - 1
130 131
             獎金明細表_dgv.Rows(I).Cells("銷貨總額").Value = "0" : 獎金明細表_dgv.Rows(I).Cells("成本").Value = "0" : 獎金明細表_dgv.Rows(I).Cells("運費").Value = "0"
131 132
             獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value = "0" : 獎金明細表_dgv.Rows(I).Cells("其他(傭金)").Value = "0" : 獎金明細表_dgv.Rows(I).Cells("手續費(刷卡)").Value = "0"
133
+            獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value = "0"
132 134
             '--------------銷貨總額---------------------------------------------------------------------------------------------------------------------------------------------
133 135
             For II As Integer = 0 To 彙總1_dgv.Rows.Count - 1
134 136
                 If 彙總1_dgv.Rows(II).Cells("單號").Value.ToString = 獎金明細表_dgv.Rows(I).Cells("編號").Value.ToString Then
@@ -171,6 +173,7 @@ Public Class 業績獎金彙總表
171 173
             For II As Integer = 0 To 彙總1_dgv.Rows.Count - 1
172 174
                 If 彙總1_dgv.Rows(II).Cells("單號").Value.ToString = 獎金明細表_dgv.Rows(I).Cells("編號").Value.ToString Then
173 175
                     獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value = 獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value + 彙總1_dgv.Rows(II).Cells("稅金").Value
176
+                    獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value = 獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value + 彙總1_dgv.Rows(II).Cells("稅金2.5%").Value
174 177
                 End If
175 178
             Next
176 179
             '--------------其他(傭金)---------------------------------------------------------------------------------------------------------------------------------------------
@@ -194,7 +197,7 @@ Public Class 業績獎金彙總表
194 197
         For I As Integer = 0 To 獎金明細表_dgv.Rows.Count - 1
195 198
             獎金明細表_dgv.Rows(I).Cells("毛利").Value = "0" : 獎金明細表_dgv.Rows(I).Cells("獎金").Value = "0"
196 199
             獎金明細表_dgv.Rows(I).Cells("毛利").Value = 獎金明細表_dgv.Rows(I).Cells("銷貨總額").Value - 獎金明細表_dgv.Rows(I).Cells("成本").Value -
197
-                                                             獎金明細表_dgv.Rows(I).Cells("運費").Value - 獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value -
200
+                                                             獎金明細表_dgv.Rows(I).Cells("運費").Value - 獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value -
198 201
                                                              獎金明細表_dgv.Rows(I).Cells("其他(傭金)").Value - 獎金明細表_dgv.Rows(I).Cells("手續費(刷卡)").Value -
199 202
                                                              獎金明細表_dgv.Rows(I).Cells("管銷費用").Value
200 203
         Next
@@ -202,9 +205,7 @@ Public Class 業績獎金彙總表
202 205
     Private Sub Set_彙總過度表()
203 206
         過度表_dgv.DataSource = Nothing : ds8.Clear()
204 207
         過度表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
205
-        過度表_dgv.ColumnHeadersHeight = 25
206
-        過度表_dgv.AllowUserToAddRows = False
207
-        過度表_dgv.RowTemplate.Height = 25
208
+        過度表_dgv.ColumnHeadersHeight = 25 : 過度表_dgv.AllowUserToAddRows = False : 過度表_dgv.RowTemplate.Height = 25
208 209
 
209 210
         SQL_業績主表3()
210 211
         da.Fill(ds8) : 過度表_dgv.DataSource = ds8.Tables(0) : conn.Close()
@@ -214,19 +215,21 @@ Public Class 業績獎金彙總表
214 215
         過度表_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 過度表_dgv.Columns(3).DefaultCellStyle.Format = "#,##0" : 過度表_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
215 216
         過度表_dgv.Columns(5).DefaultCellStyle.Format = "#,##0" : 過度表_dgv.Columns(6).DefaultCellStyle.Format = "#,##0" : 過度表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
216 217
         過度表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 過度表_dgv.Columns(9).DefaultCellStyle.Format = "#,##0" : 過度表_dgv.Columns(10).DefaultCellStyle.Format = "#,##0"
218
+        過度表_dgv.Columns(11).DefaultCellStyle.Format = "#,##0"
217 219
         過度表_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
218 220
         過度表_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
219 221
         過度表_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
220 222
         過度表_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
221
-        過度表_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
223
+        過度表_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
222 224
         過度表_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
223 225
         過度表_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
224 226
         過度表_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
225 227
         過度表_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
226
-        過度表_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
228
+        過度表_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 過度表_dgv.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
227 229
         For I As Integer = 0 To 過度表_dgv.Rows.Count - 1
228 230
             過度表_dgv.Rows(I).Cells("銷貨總額").Value = "0" : 過度表_dgv.Rows(I).Cells("成本").Value = "0" : 過度表_dgv.Rows(I).Cells("運費").Value = "0"
229 231
             過度表_dgv.Rows(I).Cells("稅額(發票)").Value = "0" : 過度表_dgv.Rows(I).Cells("其他(傭金)").Value = "0" : 過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value = "0"
232
+            過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value = "0"
230 233
             For II As Integer = 0 To 獎金明細表_dgv.Rows.Count - 1
231 234
                 If Strings.Left(獎金明細表_dgv.Rows(II).Cells("編號").Value.ToString, 2) = 過度表_dgv.Rows(I).Cells("編號").Value.ToString And
232 235
                        獎金明細表_dgv.Rows(II).Cells("獎金基礎").Value.ToString = 過度表_dgv.Rows(I).Cells("獎金基礎").Value.ToString Then
@@ -238,11 +241,12 @@ Public Class 業績獎金彙總表
238 241
                     過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value = 過度表_dgv.Rows(I).Cells("手續費(刷卡)").Value + 獎金明細表_dgv.Rows(II).Cells("手續費(刷卡)").Value
239 242
                 End If
240 243
             Next
244
+            過度表_dgv.Rows(I).Cells("稅額(2.5%)").Value = 過度表_dgv.Rows(I).Cells("稅額(發票)").Value / 2
241 245
         Next
242 246
         For I As Integer = 0 To 過度表_dgv.Rows.Count - 1
243 247
             過度表_dgv.Rows(I).Cells("毛利").Value = "0" : 過度表_dgv.Rows(I).Cells("獎金").Value = "0"
244 248
             過度表_dgv.Rows(I).Cells("毛利").Value = 過度表_dgv.Rows(I).Cells("銷貨總額").Value - 過度表_dgv.Rows(I).Cells("成本").Value - 過度表_dgv.Rows(I).Cells("運費").Value -
245
-                                                         過度表_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 -
246 250
                                                          過度表_dgv.Rows(I).Cells("管銷").Value
247 251
 
248 252
             Dim 毛利遞減 As Integer = 過度表_dgv.Rows(I).Cells("毛利").Value
@@ -331,20 +335,23 @@ Public Class 業績獎金彙總表
331 335
         獎金彙總_dgv.Columns(2).DefaultCellStyle.Format = "#,##0" : 獎金彙總_dgv.Columns(3).DefaultCellStyle.Format = "#,##0" : 獎金彙總_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
332 336
         獎金彙總_dgv.Columns(5).DefaultCellStyle.Format = "#,##0" : 獎金彙總_dgv.Columns(6).DefaultCellStyle.Format = "#,##0" : 獎金彙總_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
333 337
         獎金彙總_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 獎金彙總_dgv.Columns(9).DefaultCellStyle.Format = "#,##0" : 獎金彙總_dgv.Columns(10).DefaultCellStyle.Format = "#,##0"
338
+        獎金彙總_dgv.Columns(11).DefaultCellStyle.Format = "#,##0"
334 339
         獎金彙總_dgv.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
335 340
         獎金彙總_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
336 341
         獎金彙總_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
337 342
         獎金彙總_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
338
-        獎金彙總_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
343
+        獎金彙總_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
339 344
         獎金彙總_dgv.Columns(2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
340 345
         獎金彙總_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
341 346
         獎金彙總_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
342 347
         獎金彙總_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
348
+        獎金彙總_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight : 獎金彙總_dgv.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
343 349
         NUD1.Value = 0 : NUD2.Value = 0 : NUD3.Value = 0 : NUD4.Value = 0 : NUD5.Value = 0
344 350
         For I As Integer = 0 To 獎金彙總_dgv.Rows.Count - 1
345 351
             獎金彙總_dgv.Rows(I).Cells("銷貨總額").Value = "0" : 獎金彙總_dgv.Rows(I).Cells("成本").Value = "0" : 獎金彙總_dgv.Rows(I).Cells("運費").Value = "0"
346 352
             獎金彙總_dgv.Rows(I).Cells("稅額(發票)").Value = "0" : 獎金彙總_dgv.Rows(I).Cells("其他(傭金)").Value = "0" : 獎金彙總_dgv.Rows(I).Cells("手續費(刷卡)").Value = "0"
347 353
             獎金彙總_dgv.Rows(I).Cells("毛利").Value = "0" : 獎金彙總_dgv.Rows(I).Cells("獎金").Value = "0" : 獎金彙總_dgv.Rows(I).Cells("管銷").Value = "0"
354
+            獎金彙總_dgv.Rows(I).Cells("稅額(2.5%)").Value = "0"
348 355
             For II As Integer = 0 To 過度表_dgv.Rows.Count - 1
349 356
                 If 過度表_dgv.Rows(II).Cells("姓名").Value.ToString = 獎金彙總_dgv.Rows(I).Cells("姓名").Value.ToString Then
350 357
                     獎金彙總_dgv.Rows(I).Cells("銷貨總額").Value = 獎金彙總_dgv.Rows(I).Cells("銷貨總額").Value + 過度表_dgv.Rows(II).Cells("銷貨總額").Value
@@ -356,6 +363,7 @@ Public Class 業績獎金彙總表
356 363
                     獎金彙總_dgv.Rows(I).Cells("毛利").Value = 獎金彙總_dgv.Rows(I).Cells("毛利").Value + 過度表_dgv.Rows(II).Cells("毛利").Value
357 364
                     獎金彙總_dgv.Rows(I).Cells("獎金").Value = 獎金彙總_dgv.Rows(I).Cells("獎金").Value + 過度表_dgv.Rows(II).Cells("獎金").Value
358 365
                     獎金彙總_dgv.Rows(I).Cells("管銷").Value = 獎金彙總_dgv.Rows(I).Cells("管銷").Value + 過度表_dgv.Rows(II).Cells("管銷").Value
366
+                    獎金彙總_dgv.Rows(I).Cells("稅額(2.5%)").Value = 獎金彙總_dgv.Rows(I).Cells("稅額(2.5%)").Value + 過度表_dgv.Rows(II).Cells("稅額(2.5%)").Value
359 367
                 End If
360 368
             Next
361 369
             NUD1.Value = NUD1.Value + 獎金彙總_dgv.Rows(I).Cells("運費").Value
@@ -510,29 +518,29 @@ Public Class 業績獎金彙總表
510 518
         If 獎金彙總_dgv.Visible = True Then
511 519
             xlSheet.Cells(1, 1) = "雅邸家居" : xlSheet.Cells(2, 1) = "業績獎金彙總表" : xlSheet.Cells(3, 1) = "日期區間:" & 開始日期_dtp.Value & " ~ " & 結束日期_dtp.Value
512 520
             xlSheet.Cells(4, 1) = "編號" : xlSheet.Cells(4, 2) = "業務姓名" : xlSheet.Cells(4, 3) = "銷貨總額" : xlSheet.Cells(4, 4) = "成本" : xlSheet.Cells(4, 6) = "運費"
513
-            xlSheet.Cells(4, 7) = "稅額(發票)" : xlSheet.Cells(4, 8) = "其他(傭金)" : xlSheet.Cells(4, 9) = "手續費(刷卡)" : xlSheet.Cells(4, 10) = "業績毛利"
514
-            xlSheet.Cells(4, 11) = "獎金" : xlSheet.Cells(4, 5) = "管銷"
521
+            xlSheet.Cells(4, 7) = "稅額(2.5%)" : xlSheet.Cells(4, 8) = "稅額(發票)" : xlSheet.Cells(4, 9) = "其他(傭金)" : xlSheet.Cells(4, 10) = "手續費(刷卡)" : xlSheet.Cells(4, 11) = "業績毛利"
522
+            xlSheet.Cells(4, 12) = "獎金" : xlSheet.Cells(4, 5) = "管銷"
515 523
             For I As Integer = 0 To 獎金彙總_dgv.Rows.Count - 1
516 524
                 xlSheet.Cells(I + 5, 1) = 獎金彙總_dgv.Rows(I).Cells("編號").Value : xlSheet.Cells(I + 5, 2) = 獎金彙總_dgv.Rows(I).Cells("姓名").Value
517 525
                 xlSheet.Cells(I + 5, 3) = 獎金彙總_dgv.Rows(I).Cells("銷貨總額").Value : xlSheet.Cells(I + 5, 4) = 獎金彙總_dgv.Rows(I).Cells("成本").Value
518
-                xlSheet.Cells(I + 5, 6) = 獎金彙總_dgv.Rows(I).Cells("運費").Value : xlSheet.Cells(I + 5, 7) = 獎金彙總_dgv.Rows(I).Cells("稅額(發票)").Value
519
-                xlSheet.Cells(I + 5, 8) = 獎金彙總_dgv.Rows(I).Cells("其他(傭金)").Value : xlSheet.Cells(I + 5, 9) = 獎金彙總_dgv.Rows(I).Cells("手續費(刷卡)").Value
520
-                xlSheet.Cells(I + 5, 10) = 獎金彙總_dgv.Rows(I).Cells("毛利").Value : xlSheet.Cells(I + 5, 11) = 獎金彙總_dgv.Rows(I).Cells("獎金").Value
521
-                xlSheet.Cells(I + 5, 5) = 獎金彙總_dgv.Rows(I).Cells("管銷").Value
526
+                xlSheet.Cells(I + 5, 6) = 獎金彙總_dgv.Rows(I).Cells("運費").Value : xlSheet.Cells(I + 5, 7) = 獎金彙總_dgv.Rows(I).Cells("稅額(2.5%)").Value
527
+                xlSheet.Cells(I + 5, 9) = 獎金彙總_dgv.Rows(I).Cells("其他(傭金)").Value : xlSheet.Cells(I + 5, 10) = 獎金彙總_dgv.Rows(I).Cells("手續費(刷卡)").Value
528
+                xlSheet.Cells(I + 5, 11) = 獎金彙總_dgv.Rows(I).Cells("毛利").Value : xlSheet.Cells(I + 5, 12) = 獎金彙總_dgv.Rows(I).Cells("獎金").Value
529
+                xlSheet.Cells(I + 5, 5) = 獎金彙總_dgv.Rows(I).Cells("管銷").Value : xlSheet.Cells(I + 5, 8) = 獎金彙總_dgv.Rows(I).Cells("稅額(發票)").Value
522 530
                 N1 = I
523 531
             Next
524 532
         Else
525 533
             xlSheet.Cells(1, 1) = "雅邸家居" : xlSheet.Cells(2, 1) = "業績明細表" : xlSheet.Cells(3, 1) = "日期區間:" & 開始日期_dtp.Value & " ~ " & 結束日期_dtp.Value
526 534
             xlSheet.Cells(4, 1) = "編號" : xlSheet.Cells(4, 2) = "客戶姓名" : xlSheet.Cells(4, 3) = "銷貨總額" : xlSheet.Cells(4, 4) = "成本" : xlSheet.Cells(4, 6) = "運費"
527
-            xlSheet.Cells(4, 7) = "稅額(發票)" : xlSheet.Cells(4, 8) = "其他(傭金)" : xlSheet.Cells(4, 9) = "手續費(刷卡)" : xlSheet.Cells(4, 10) = "業績毛利"
528
-            xlSheet.Cells(4, 11) = "獎金" : xlSheet.Cells(4, 5) = "管銷"
535
+            xlSheet.Cells(4, 7) = "稅額(2.5%)" : xlSheet.Cells(4, 8) = "稅額(發票)" : xlSheet.Cells(4, 9) = "其他(傭金)" : xlSheet.Cells(4, 10) = "手續費(刷卡)" : xlSheet.Cells(4, 11) = "業績毛利"
536
+            xlSheet.Cells(4, 12) = "獎金" : xlSheet.Cells(4, 5) = "管銷"
529 537
             For I As Integer = 0 To 獎金明細表_dgv.Rows.Count - 1
530 538
                 xlSheet.Cells(I + 5, 1) = 獎金明細表_dgv.Rows(I).Cells("編號").Value : xlSheet.Cells(I + 5, 2) = 獎金明細表_dgv.Rows(I).Cells("名稱").Value
531 539
                 xlSheet.Cells(I + 5, 3) = 獎金明細表_dgv.Rows(I).Cells("銷貨總額").Value : xlSheet.Cells(I + 5, 4) = 獎金明細表_dgv.Rows(I).Cells("成本").Value
532
-                xlSheet.Cells(I + 5, 6) = 獎金明細表_dgv.Rows(I).Cells("運費").Value : xlSheet.Cells(I + 5, 7) = 獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value
533
-                xlSheet.Cells(I + 5, 8) = 獎金明細表_dgv.Rows(I).Cells("其他(傭金)").Value : xlSheet.Cells(I + 5, 9) = 獎金明細表_dgv.Rows(I).Cells("手續費(刷卡)").Value
534
-                xlSheet.Cells(I + 5, 10) = 獎金明細表_dgv.Rows(I).Cells("毛利").Value : xlSheet.Cells(I + 5, 11) = 獎金明細表_dgv.Rows(I).Cells("獎金基礎").Value
535
-                xlSheet.Cells(I + 5, 5) = 獎金明細表_dgv.Rows(I).Cells("管銷費用").Value
540
+                xlSheet.Cells(I + 5, 6) = 獎金明細表_dgv.Rows(I).Cells("運費").Value : xlSheet.Cells(I + 5, 7) = 獎金明細表_dgv.Rows(I).Cells("稅額(2.5%)").Value
541
+                xlSheet.Cells(I + 5, 9) = 獎金明細表_dgv.Rows(I).Cells("其他(傭金)").Value : xlSheet.Cells(I + 5, 10) = 獎金明細表_dgv.Rows(I).Cells("手續費(刷卡)").Value
542
+                xlSheet.Cells(I + 5, 11) = 獎金明細表_dgv.Rows(I).Cells("毛利").Value : xlSheet.Cells(I + 5, 12) = 獎金明細表_dgv.Rows(I).Cells("獎金基礎").Value
543
+                xlSheet.Cells(I + 5, 5) = 獎金明細表_dgv.Rows(I).Cells("管銷費用").Value : xlSheet.Cells(I + 5, 8) = 獎金明細表_dgv.Rows(I).Cells("稅額(發票)").Value
536 544
                 N1 = I
537 545
             Next
538 546
         End If
@@ -572,7 +580,7 @@ Public Class 業績獎金彙總表
572 580
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With
573 581
 
574 582
         xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 5
575
-        xlSheet.Range("C5:K" & N1 + 6 & "").Select() : myExcel.Selection.Style = "Comma" : myExcel.Selection.NumberFormatLocal = "_-* #,##0_-;-* #,##0_-;_-* ""-""??_-;_-@_-"
583
+        xlSheet.Range("C5:L" & N1 + 6 & "").Select() : myExcel.Selection.Style = "Comma" : myExcel.Selection.NumberFormatLocal = "_-* #,##0_-;-* #,##0_-;_-* ""-""??_-;_-@_-"
576 584
         xlSheet.Range("F" & N1 + 7 & ":F" & N1 + 10 & "").Select() : myExcel.Selection.Style = "Comma" : myExcel.Selection.NumberFormatLocal = "_-* #,##0_-;-* #,##0_-;_-* ""-""??_-;_-@_-"
577 585
         xlSheet.Columns("C:K").EntireColumn.AutoFit
578 586
 
@@ -592,20 +600,20 @@ Public Class 業績獎金彙總表
592 600
         xlSheet.Range("B" & N1 + 7 & ":E" & N1 + 10 & "").Select()
593 601
         With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
594 602
             .ShrinkToFit = False : .ReadingOrder = xlContext : End With
595
-        xlSheet.Range("A1:K1").Select()
603
+        xlSheet.Range("A1:L1").Select()
596 604
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
597 605
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
598 606
         xlSheet.Range("A2:K2").Select()
599 607
         With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
600 608
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
601
-        xlSheet.Range("A3:K3").Select()
609
+        xlSheet.Range("A3:L3").Select()
602 610
         With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
603 611
             .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False : End With : myExcel.Selection.Merge
604
-        xlSheet.Range("A1:K1").Select()
612
+        xlSheet.Range("A1:L1").Select()
605 613
         With myExcel.Selection.Font : .Name = "新細明體" : .Size = 24 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
606 614
             .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontMinor : End With
607 615
 
608
-        xlSheet.Range("A4:K4").Select()
616
+        xlSheet.Range("A4:L4").Select()
609 617
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
610 618
         myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone
611 619
         With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
@@ -613,14 +621,14 @@ Public Class 業績獎金彙總表
613 621
         myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
614 622
         myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
615 623
 
616
-        xlSheet.Range("A3:K3").Select()
624
+        xlSheet.Range("A3:L3").Select()
617 625
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
618 626
         myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
619 627
         With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With
620 628
         myExcel.Selection.Borders(xlEdgeRight).LineStyle = xlNone : myExcel.Selection.Borders(xlInsideVertical).LineStyle = xlNone
621 629
         myExcel.Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
622 630
 
623
-        xlSheet.Range("A" & N1 + 5 & ":K" & N1 + 5 & "").Select()
631
+        xlSheet.Range("A" & N1 + 5 & ":L" & N1 + 5 & "").Select()
624 632
         myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
625 633
         myExcel.Selection.Borders(xlEdgeLeft).LineStyle = xlNone : myExcel.Selection.Borders(xlEdgeTop).LineStyle = xlNone
626 634
         With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium : End With

Loading…
取消
儲存