プロジェクト

全般

プロフィール

リビジョン 415

山内6年以上前に追加

入金入力終了時にページを読み込むのではなく、該当箇所を反映させるだけの処理に修正

差分を表示:

trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPayment.Designer.cs
44 44
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
45 45
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
46 46
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
47
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
47 48
            this.lblTitle = new System.Windows.Forms.Label();
48 49
            this.panel1 = new System.Windows.Forms.Panel();
49 50
            this.lblRequestAmount = new System.Windows.Forms.Label();
......
73 74
            this.ConstructionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
74 75
            this.BillPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
75 76
            this.TaxPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
77
            this.BillingAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
76 78
            this.DepositAmountCash = new System.Windows.Forms.DataGridViewTextBoxColumn();
77 79
            this.DepositAmountBill = new System.Windows.Forms.DataGridViewTextBoxColumn();
78 80
            this.OrderNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
......
212 214
            this.cbTargetMonth.FormattingEnabled = true;
213 215
            this.cbTargetMonth.IntegralHeight = false;
214 216
            this.cbTargetMonth.Location = new System.Drawing.Point(164, 8);
215
            this.cbTargetMonth.MaxDropDownItems = 12;
216 217
            this.cbTargetMonth.Name = "cbTargetMonth";
217 218
            this.cbTargetMonth.Size = new System.Drawing.Size(100, 24);
218 219
            this.cbTargetMonth.TabIndex = 1;
......
228 229
            this.label2.Name = "label2";
229 230
            this.label2.Size = new System.Drawing.Size(140, 25);
230 231
            this.label2.TabIndex = 0;
231
            this.label2.Text = "請求対象月";
232
            this.label2.Text = "対 象 月";
232 233
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
233 234
            // 
234 235
            // btnShow
......
254 255
            this.button1.TabIndex = 3;
255 256
            this.button1.Text = "・・・";
256 257
            this.button1.UseVisualStyleBackColor = true;
257
            this.button1.Visible = false;
258 258
            this.button1.Click += new System.EventHandler(this.button1_Click);
259 259
            // 
260 260
            // Registration
......
341 341
            this.ConstructionName,
342 342
            this.BillPrice,
343 343
            this.TaxPrice,
344
            this.BillingAmount,
344 345
            this.DepositAmountCash,
345 346
            this.DepositAmountBill,
346 347
            this.OrderNo,
......
483 484
            this.TaxPrice.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
484 485
            this.TaxPrice.Width = 140;
485 486
            // 
487
            // BillingAmount
488
            // 
489
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
490
            this.BillingAmount.DefaultCellStyle = dataGridViewCellStyle6;
491
            this.BillingAmount.HeaderText = "請求金額\r\n(税込)";
492
            this.BillingAmount.Name = "BillingAmount";
493
            this.BillingAmount.ReadOnly = true;
494
            this.BillingAmount.Resizable = System.Windows.Forms.DataGridViewTriState.False;
495
            this.BillingAmount.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
496
            this.BillingAmount.Width = 140;
497
            // 
486 498
            // DepositAmountCash
487 499
            // 
488
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
489
            this.DepositAmountCash.DefaultCellStyle = dataGridViewCellStyle6;
500
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
501
            this.DepositAmountCash.DefaultCellStyle = dataGridViewCellStyle7;
490 502
            this.DepositAmountCash.HeaderText = "入金金額\r\n(振込)";
491 503
            this.DepositAmountCash.Name = "DepositAmountCash";
492 504
            this.DepositAmountCash.ReadOnly = true;
......
496 508
            // 
497 509
            // DepositAmountBill
498 510
            // 
499
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
500
            this.DepositAmountBill.DefaultCellStyle = dataGridViewCellStyle7;
511
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
512
            this.DepositAmountBill.DefaultCellStyle = dataGridViewCellStyle8;
501 513
            this.DepositAmountBill.HeaderText = "入金金額\r\n(手形)";
502 514
            this.DepositAmountBill.Name = "DepositAmountBill";
503 515
            this.DepositAmountBill.ReadOnly = true;
......
516 528
            // 
517 529
            // DepositAmount
518 530
            // 
519
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
520
            this.DepositAmount.DefaultCellStyle = dataGridViewCellStyle8;
531
            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
532
            this.DepositAmount.DefaultCellStyle = dataGridViewCellStyle9;
521 533
            this.DepositAmount.HeaderText = "入金金額\r\n(税抜)";
522 534
            this.DepositAmount.Name = "DepositAmount";
523 535
            this.DepositAmount.ReadOnly = true;
......
527 539
            // 
528 540
            // TaxAmount
529 541
            // 
530
            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
531
            this.TaxAmount.DefaultCellStyle = dataGridViewCellStyle9;
542
            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
543
            this.TaxAmount.DefaultCellStyle = dataGridViewCellStyle10;
532 544
            this.TaxAmount.HeaderText = "入金金額\r\n(消費税)";
533 545
            this.TaxAmount.Name = "TaxAmount";
534 546
            this.TaxAmount.ReadOnly = true;
......
538 550
            // 
539 551
            // DiscountAmount
540 552
            // 
541
            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
542
            this.DiscountAmount.DefaultCellStyle = dataGridViewCellStyle10;
553
            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
554
            this.DiscountAmount.DefaultCellStyle = dataGridViewCellStyle11;
543 555
            this.DiscountAmount.HeaderText = "値引金額";
544 556
            this.DiscountAmount.Name = "DiscountAmount";
545 557
            this.DiscountAmount.ReadOnly = true;
......
549 561
            // 
550 562
            // CnstrPrice
551 563
            // 
552
            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
553
            this.CnstrPrice.DefaultCellStyle = dataGridViewCellStyle11;
564
            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
565
            this.CnstrPrice.DefaultCellStyle = dataGridViewCellStyle12;
554 566
            this.CnstrPrice.HeaderText = "協力金";
555 567
            this.CnstrPrice.Name = "CnstrPrice";
556 568
            this.CnstrPrice.ReadOnly = true;
......
560 572
            // 
561 573
            // Fees
562 574
            // 
563
            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
564
            this.Fees.DefaultCellStyle = dataGridViewCellStyle12;
575
            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
576
            this.Fees.DefaultCellStyle = dataGridViewCellStyle13;
565 577
            this.Fees.HeaderText = "手数料";
566 578
            this.Fees.Name = "Fees";
567 579
            this.Fees.ReadOnly = true;
......
571 583
            // 
572 584
            // OtherAdjustments
573 585
            // 
574
            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
575
            this.OtherAdjustments.DefaultCellStyle = dataGridViewCellStyle13;
586
            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
587
            this.OtherAdjustments.DefaultCellStyle = dataGridViewCellStyle14;
576 588
            this.OtherAdjustments.HeaderText = "送料";
577 589
            this.OtherAdjustments.Name = "OtherAdjustments";
578 590
            this.OtherAdjustments.ReadOnly = true;
......
582 594
            // 
583 595
            // CarryAmount
584 596
            // 
585
            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
586
            this.CarryAmount.DefaultCellStyle = dataGridViewCellStyle14;
597
            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
598
            this.CarryAmount.DefaultCellStyle = dataGridViewCellStyle15;
587 599
            this.CarryAmount.HeaderText = "差分";
588 600
            this.CarryAmount.Name = "CarryAmount";
589 601
            this.CarryAmount.ReadOnly = true;
......
649 661
            // 
650 662
            // PersonName
651 663
            // 
652
            dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
653
            this.PersonName.DefaultCellStyle = dataGridViewCellStyle15;
664
            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
665
            this.PersonName.DefaultCellStyle = dataGridViewCellStyle16;
654 666
            this.PersonName.HeaderText = "確認";
655 667
            this.PersonName.Name = "PersonName";
656 668
            this.PersonName.ReadOnly = true;
......
660 672
            // 
661 673
            // NoteDD
662 674
            // 
663
            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
664
            this.NoteDD.DefaultCellStyle = dataGridViewCellStyle16;
675
            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
676
            this.NoteDD.DefaultCellStyle = dataGridViewCellStyle17;
665 677
            this.NoteDD.HeaderText = "備考";
666 678
            this.NoteDD.Name = "NoteDD";
667 679
            this.NoteDD.ReadOnly = true;
......
729 741
        private System.Windows.Forms.DataGridViewTextBoxColumn ConstructionName;
730 742
        private System.Windows.Forms.DataGridViewTextBoxColumn BillPrice;
731 743
        private System.Windows.Forms.DataGridViewTextBoxColumn TaxPrice;
744
        private System.Windows.Forms.DataGridViewTextBoxColumn BillingAmount;
732 745
        private System.Windows.Forms.DataGridViewTextBoxColumn DepositAmountCash;
733 746
        private System.Windows.Forms.DataGridViewTextBoxColumn DepositAmountBill;
734 747
        private System.Windows.Forms.DataGridViewTextBoxColumn OrderNo;
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPayment.cs
61 61
            ConstructionName,                                                   // 現場名
62 62
            BillPrice,                                                          // 請求金額 (税抜)
63 63
            TaxPrice,                                                           // 請求金額 (消費税)
64
            BillingAmount,                                                      // 請求金額(税込)
64 65
            
65 66
            // 入金データ(総務入力欄)
66 67
            DepositAmountCash,                                                  // 入金金額 (振込み)
......
643 644
            try
644 645
            {
645 646
                var cells = dgvMaster.Rows[dgvMaster.CurrentCell.RowIndex].Cells;
647
                var currentCellRowIndex = dgvMaster.CurrentCell.RowIndex;
646 648
                var checkTargetMonth = CommonMotions.cnvInt(cells[(int)DispColumn.RequestMonth].Value);
647 649
                // 行インデックスが不正な場合はスルー
648 650
                if (dgvMaster.CurrentCell.RowIndex == -1 || checkTargetMonth == 0)
......
662 664
                    var orderersCode = CommonMotions.cnvInt(cells[(int)DispColumn.OrderersCode].Value);
663 665
                    string reqDate = CommonMotions.cnvInt(cells[(int)DispColumn.RequestMonth].Value).ToString();
664 666

  
665
                    EntryDeposit(orderersDiv, orderersCode, reqDate);
667
                    EntryDeposit(orderersDiv, orderersCode, reqDate, currentCellRowIndex);
666 668
                    return;
667 669
                }
668 670
            }
......
851 853
            try
852 854
            {
853 855
                var cells = dgvMaster.Rows[e.RowIndex].Cells;
856
                int rowIndex = e.RowIndex;
854 857
                var checkTargetMonth = CommonMotions.cnvInt(cells[(int)DispColumn.RequestMonth].Value);
855 858
                // 行インデックスが不正な場合はスルー
856 859
                if (e.RowIndex == -1 || checkTargetMonth ==0)
......
873 876
                        var orderersCode = CommonMotions.cnvInt(cells[(int)DispColumn.OrderersCode].Value);
874 877
                        string reqDate = CommonMotions.cnvInt(cells[(int)DispColumn.RequestMonth].Value).ToString();
875 878

  
876
                        EntryDeposit(orderersDiv, orderersCode, reqDate);
879
                        EntryDeposit(orderersDiv, orderersCode, reqDate, rowIndex);
877 880
                        return;
878 881
                    }
879 882
                }
......
953 956
        /// 入金入力画面表示
954 957
        /// </summary>
955 958
        /// <returns></returns>
956
        private void EntryDeposit(int OrderesDivision, int OrderesCode, string TargetMonth)
959
        private void EntryDeposit(int OrderesDivision, int OrderesCode, string TargetMonth, int rowIndex)
957 960
        {
958 961
            DepositData DepositData = new DepositData();
959 962
            FrmEntryDeposit frmEntryDeposit = new FrmEntryDeposit();
......
963 966
            frmEntryDeposit.depositdata = DepositData;
964 967

  
965 968
            frmEntryDeposit.ShowDialog();
966
            DisplayData();
969
            var sumRowIndex = DetectSumIndex(rowIndex);
970
            var depositOrdererSum = new DepositOrderer();
971
            depositOrdererSum.KB = 3;
972
            depositOrdererSum.OrderersCode = OrderesCode;
973
            depositOrdererSum.OrderersDivision = OrderesDivision;
974
            depositOrdererSum.RequestMonth = CommonMotions.cnvInt(TargetMonth);
975
            UpdateDepositOrdererRows(depositOrdererSum, sumRowIndex);
967 976
        }
968 977
        #endregion
969 978

  
......
1150 1159
                {
1151 1160
                    long amount = CommonMotions.cnvLong(cellValue);
1152 1161
                    var depositDetail = depositOrderer.FindDepositDetailByRequestNo(CommonMotions.cnvInt(cells[(int)DispColumn.RequestNo].Value));
1162
                    long DPAmount = depositDetail.DepositAmount;
1153 1163
                    bool bUpdateCarryAmount = false;
1154 1164
                    switch (e.ColumnIndex)
1155 1165
                    {
......
1167 1177
                            break;
1168 1178
                        case (int)DispColumn.DiscountAmount:
1169 1179
                            depositDetail.DiscountAmount = amount;
1180
                            // 消費税額計算
1181
                            DPAmount = DPAmount + amount + depositDetail.CnstrPrice + depositDetail.Fees+ depositDetail.OtherAdjustments;
1182
                            depositDetail.TaxAmount = CommonMotions.cnvRound(DPAmount * (CommonMotions.SystemMasterData.ConsumptionTax / 100.0));
1170 1183
                            bUpdateCarryAmount = true;
1171 1184
                            sumDataCheck = true;
1172 1185
                            break;
1173 1186
                        case (int)DispColumn.CnstrPrice:
1174 1187
                            depositDetail.CnstrPrice = amount;
1188
                            // 消費税額計算
1189
                            DPAmount = DPAmount + amount + depositDetail.DiscountAmount + depositDetail.Fees + depositDetail.OtherAdjustments;
1190
                            depositDetail.TaxAmount = CommonMotions.cnvRound(DPAmount * (CommonMotions.SystemMasterData.ConsumptionTax / 100.0));
1175 1191
                            bUpdateCarryAmount = true;
1176 1192
                            sumDataCheck = true;
1177 1193
                            break;
1178 1194
                        case (int)DispColumn.Fees:
1179 1195
                            depositDetail.Fees = amount;
1196
                            // 消費税額計算
1197
                            DPAmount = DPAmount + amount + depositDetail.DiscountAmount + depositDetail.CnstrPrice + depositDetail.OtherAdjustments;
1198
                            depositDetail.TaxAmount = CommonMotions.cnvRound(DPAmount * (CommonMotions.SystemMasterData.ConsumptionTax / 100.0));
1180 1199
                            bUpdateCarryAmount = true;
1181 1200
                            sumDataCheck = true;
1182 1201
                            break;
1183 1202
                        case (int)DispColumn.OtherAdjustments:
1184 1203
                            depositDetail.OtherAdjustments = amount;
1204
                            // 消費税額計算
1205
                            DPAmount = DPAmount + amount + depositDetail.DiscountAmount + depositDetail.CnstrPrice + depositDetail.Fees;
1206
                            depositDetail.TaxAmount = CommonMotions.cnvRound(DPAmount * (CommonMotions.SystemMasterData.ConsumptionTax / 100.0));
1185 1207
                            bUpdateCarryAmount = true;
1186 1208
                            sumDataCheck = true;
1187 1209
                            break;
......
1795 1817

  
1796 1818
                        row.Cells[(int)DispColumn.TaxPrice].Style.BackColor = Color.Gainsboro;
1797 1819
                        row.Cells[(int)DispColumn.BillPrice].Style.BackColor = Color.Gainsboro;
1820
                        row.Cells[(int)DispColumn.BillingAmount].Style.BackColor = Color.Gainsboro;
1798 1821

  
1799 1822
                        row.Cells[(int)DispColumn.DepositAmount].Style.BackColor = Color.Gainsboro;
1800 1823
                        row.Cells[(int)DispColumn.TaxAmount].Style.BackColor = Color.Gainsboro;
......
1919 1942

  
1920 1943
                    ordererRow.Cells[(int)DispColumn.TaxPrice].Style.BackColor = Color.LightGoldenrodYellow;
1921 1944
                    ordererRow.Cells[(int)DispColumn.BillPrice].Style.BackColor = Color.LightGoldenrodYellow;
1945
                    ordererRow.Cells[(int)DispColumn.BillingAmount].Style.BackColor = Color.LightGoldenrodYellow;
1946

  
1922 1947
                    SetPrice(ordererRow.Cells, (int)DispColumn.BillPrice, SumRequestBill);
1923 1948
                    SetPrice(ordererRow.Cells, (int)DispColumn.TaxPrice, SumRequestTax);
1949
                    SetPrice(ordererRow.Cells, (int)DispColumn.BillingAmount, SumRequestBill + SumRequestTax);
1924 1950

  
1925 1951
                    ordererRow.Cells[(int)DispColumn.DepositAmount].Style.BackColor = Color.LightGoldenrodYellow;
1926 1952
                    ordererRow.Cells[(int)DispColumn.TaxAmount].Style.BackColor = Color.LightGoldenrodYellow;
......
1989 2015
                    ordererRow.Cells[(int)DispColumn.ConstructionName].Style.BackColor = Color.White;
1990 2016
                    ordererRow.Cells[(int)DispColumn.OrderNo].Style.BackColor = Color.White;
1991 2017
                    ordererRow.Cells[(int)DispColumn.TaxPrice].Style.BackColor = Color.White;
2018
                    ordererRow.Cells[(int)DispColumn.BillingAmount].Style.BackColor = Color.White;
1992 2019
                    ordererRow.Cells[(int)DispColumn.BillPrice].Style.BackColor = Color.White;
1993 2020
                    ordererRow.Cells[(int)DispColumn.DepositAmount].Style.BackColor = Color.White;
1994 2021
                    ordererRow.Cells[(int)DispColumn.TaxAmount].Style.BackColor = Color.White;
......
2060 2087
                        row.Cells[(int)DispColumn.OrderersName].Style.BackColor = Color.FromArgb(192, 255, 192);
2061 2088
                        row.Cells[(int)DispColumn.BillPrice].Style.BackColor = Color.FromArgb(192, 255, 192);
2062 2089
                        row.Cells[(int)DispColumn.TaxPrice].Style.BackColor = Color.FromArgb(192, 255, 192);
2090
                        row.Cells[(int)DispColumn.BillingAmount].Style.BackColor = Color.FromArgb(192, 255, 192);
2063 2091
                        row.Cells[(int)DispColumn.ConstructionName].Style.BackColor = Color.FromArgb(192, 255, 192);
2064 2092

  
2065 2093
                        SetPrice(row.Cells, (int)DispColumn.BillPrice, depositDetail.BillPrice);
2066 2094
                        SetPrice(row.Cells, (int)DispColumn.TaxPrice, depositDetail.TaxPrice);
2095
                        SetPrice(row.Cells, (int)DispColumn.BillingAmount, depositDetail.BillPrice + depositDetail.TaxPrice);
2067 2096
                        SetPrice(row.Cells, (int)DispColumn.DepositAmount, depositDetail.DepositAmount);
2068 2097
                        SetPrice(row.Cells, (int)DispColumn.TaxAmount, depositDetail.TaxAmount);
2069 2098
                        SetPrice(row.Cells, (int)DispColumn.DiscountAmount, depositDetail.DiscountAmount);
......
2353 2382
                0,                      // 現場名
2354 2383
                0,                      // 請求金額 (税抜)
2355 2384
                0,                      // 請求金額 (消費税)
2385
                0,                      // 請求金額(税込)
2356 2386

  
2357 2387
                1,                      // 入金金額 (振込み)
2358 2388
                1,                      // 入金金額 (手形)
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/SelectPayment/FrmSelectPayment.resx
153 153
  <metadata name="TaxPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
154 154
    <value>True</value>
155 155
  </metadata>
156
  <metadata name="BillingAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
157
    <value>True</value>
158
  </metadata>
156 159
  <metadata name="DepositAmountCash.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
157 160
    <value>True</value>
158 161
  </metadata>

他の形式にエクスポート: Unified diff