diff --git a/SDL/Fakturierung/frmFaktEmail.vb b/SDL/Fakturierung/frmFaktEmail.vb index b33066b3..a7041885 100644 --- a/SDL/Fakturierung/frmFaktEmail.vb +++ b/SDL/Fakturierung/frmFaktEmail.vb @@ -38,7 +38,7 @@ Public Class frmFaktEmail InitializeComponent() Me.RECHNUNG = RECHNUNG - Me.Firma_ID = RECHNUNG.Firma_ID + Me.Firma_ID = Firma_ID Me.SPEDBUCH = SPEDBUCH Me.printOriginalRg = printOriginalRg Me.KdNr = RECHNUNG.RechnungsKundenNr diff --git a/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.Designer.vb b/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.Designer.vb index f25a1b53..48140146 100644 --- a/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.Designer.vb +++ b/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.Designer.vb @@ -22,11 +22,15 @@ Partial Class usrCntlQualitaetskontrolle 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. Private Sub InitializeComponent() - Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.Label46 = New System.Windows.Forms.Label() Me.Button2 = New System.Windows.Forms.Button() Me.Label40 = New System.Windows.Forms.Label() @@ -63,6 +67,7 @@ Partial Class usrCntlQualitaetskontrolle Me.art_pkgstk = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.erzeugnis = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.gewicht = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.KNCode = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.txtPackAdresse2 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtPackAdresse1 = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtPackFirma = New VERAG_PROG_ALLGEMEIN.MyTextBox() @@ -94,11 +99,19 @@ Partial Class usrCntlQualitaetskontrolle Me.cboZollstelle = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label15 = New System.Windows.Forms.Label() Me.Label17 = New System.Windows.Forms.Label() - Me.DataGridView1 = New System.Windows.Forms.DataGridView() + Me.dgvGebuehren = New System.Windows.Forms.DataGridView() Me.Button5 = New System.Windows.Forms.Button() + Me.cbxVerzicht = New System.Windows.Forms.CheckBox() + Me.txtSumme = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Label18 = New System.Windows.Forms.Label() + Me.Art = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.gew = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Preis = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Faktor = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Betrag = New System.Windows.Forms.DataGridViewTextBoxColumn() CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvPositionen, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.dgvGebuehren, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Label46 @@ -542,7 +555,7 @@ Partial Class usrCntlQualitaetskontrolle Me.dgvPositionen.BackgroundColor = System.Drawing.Color.White Me.dgvPositionen.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable Me.dgvPositionen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.dgvPositionen.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.pos, Me.anZ_pkgstk, Me.art_pkgstk, Me.erzeugnis, Me.gewicht}) + Me.dgvPositionen.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.pos, Me.anZ_pkgstk, Me.art_pkgstk, Me.erzeugnis, Me.gewicht, Me.KNCode}) Me.dgvPositionen.Location = New System.Drawing.Point(180, 291) Me.dgvPositionen.Name = "dgvPositionen" Me.dgvPositionen.Size = New System.Drawing.Size(791, 345) @@ -550,10 +563,10 @@ Partial Class usrCntlQualitaetskontrolle ' 'pos ' - DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - DataGridViewCellStyle1.Format = "N0" - DataGridViewCellStyle1.NullValue = Nothing - Me.pos.DefaultCellStyle = DataGridViewCellStyle1 + DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle10.Format = "N0" + DataGridViewCellStyle10.NullValue = Nothing + Me.pos.DefaultCellStyle = DataGridViewCellStyle10 Me.pos.Frozen = True Me.pos.HeaderText = "Position" Me.pos.MaxInputLength = 3 @@ -579,14 +592,20 @@ Partial Class usrCntlQualitaetskontrolle ' 'gewicht ' - DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - DataGridViewCellStyle2.Format = "N2" - DataGridViewCellStyle2.NullValue = Nothing - Me.gewicht.DefaultCellStyle = DataGridViewCellStyle2 + DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle11.Format = "N2" + DataGridViewCellStyle11.NullValue = Nothing + Me.gewicht.DefaultCellStyle = DataGridViewCellStyle11 Me.gewicht.HeaderText = "Gewicht" Me.gewicht.MaxInputLength = 100 Me.gewicht.Name = "gewicht" ' + 'KNCode + ' + Me.KNCode.HeaderText = "KNCode" + Me.KNCode.Name = "KNCode" + Me.KNCode.ReadOnly = True + ' 'txtPackAdresse2 ' Me.txtPackAdresse2._DateTimeOnly = False @@ -828,10 +847,10 @@ Partial Class usrCntlQualitaetskontrolle ' 'DataGridViewTextBoxColumn1 ' - DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - DataGridViewCellStyle3.Format = "N0" - DataGridViewCellStyle3.NullValue = Nothing - Me.DataGridViewTextBoxColumn1.DefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle12.Format = "N0" + DataGridViewCellStyle12.NullValue = Nothing + Me.DataGridViewTextBoxColumn1.DefaultCellStyle = DataGridViewCellStyle12 Me.DataGridViewTextBoxColumn1.Frozen = True Me.DataGridViewTextBoxColumn1.HeaderText = "Position" Me.DataGridViewTextBoxColumn1.MaxInputLength = 3 @@ -853,20 +872,20 @@ Partial Class usrCntlQualitaetskontrolle 'DataGridViewTextBoxColumn4 ' Me.DataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill - DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - DataGridViewCellStyle4.Format = "N2" - DataGridViewCellStyle4.NullValue = Nothing - Me.DataGridViewTextBoxColumn4.DefaultCellStyle = DataGridViewCellStyle4 + DataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle13.Format = "N2" + DataGridViewCellStyle13.NullValue = Nothing + Me.DataGridViewTextBoxColumn4.DefaultCellStyle = DataGridViewCellStyle13 Me.DataGridViewTextBoxColumn4.HeaderText = "Gewicht" Me.DataGridViewTextBoxColumn4.MaxInputLength = 100 Me.DataGridViewTextBoxColumn4.Name = "DataGridViewTextBoxColumn4" ' 'DataGridViewTextBoxColumn5 ' - DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - DataGridViewCellStyle5.Format = "N2" - DataGridViewCellStyle5.NullValue = Nothing - Me.DataGridViewTextBoxColumn5.DefaultCellStyle = DataGridViewCellStyle5 + DataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle14.Format = "N2" + DataGridViewCellStyle14.NullValue = Nothing + Me.DataGridViewTextBoxColumn5.DefaultCellStyle = DataGridViewCellStyle14 Me.DataGridViewTextBoxColumn5.HeaderText = "Gewicht" Me.DataGridViewTextBoxColumn5.MaxInputLength = 100 Me.DataGridViewTextBoxColumn5.Name = "DataGridViewTextBoxColumn5" @@ -965,22 +984,24 @@ Partial Class usrCntlQualitaetskontrolle Me.Label17.TabIndex = 188 Me.Label17.Text = "Qualitätskontrolle Gebühren" ' - 'DataGridView1 + 'dgvGebuehren ' - Me.DataGridView1.BackgroundColor = System.Drawing.Color.White - Me.DataGridView1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable - Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.DataGridView1.Location = New System.Drawing.Point(179, 690) - Me.DataGridView1.Name = "DataGridView1" - Me.DataGridView1.Size = New System.Drawing.Size(506, 119) - Me.DataGridView1.TabIndex = 189 + Me.dgvGebuehren.BackgroundColor = System.Drawing.Color.White + Me.dgvGebuehren.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable + Me.dgvGebuehren.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.dgvGebuehren.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.Art, Me.gew, Me.Preis, Me.Faktor, Me.Betrag}) + Me.dgvGebuehren.Location = New System.Drawing.Point(179, 690) + Me.dgvGebuehren.Name = "dgvGebuehren" + Me.dgvGebuehren.ReadOnly = True + Me.dgvGebuehren.Size = New System.Drawing.Size(545, 158) + Me.dgvGebuehren.TabIndex = 189 ' 'Button5 ' Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button5.Image = Global.SDL.My.Resources.Resources.belegEUR1 Me.Button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button5.Location = New System.Drawing.Point(695, 690) + Me.Button5.Location = New System.Drawing.Point(744, 690) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(111, 51) Me.Button5.TabIndex = 190 @@ -988,14 +1009,104 @@ Partial Class usrCntlQualitaetskontrolle Me.Button5.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.Button5.UseVisualStyleBackColor = True ' + 'cbxVerzicht + ' + Me.cbxVerzicht.AutoSize = True + Me.cbxVerzicht.Location = New System.Drawing.Point(24, 699) + Me.cbxVerzicht.Name = "cbxVerzicht" + Me.cbxVerzicht.Size = New System.Drawing.Size(149, 17) + Me.cbxVerzicht.TabIndex = 191 + Me.cbxVerzicht.Text = "Verzicht Qualitätsbeschau" + Me.cbxVerzicht.UseVisualStyleBackColor = True + ' + 'txtSumme + ' + Me.txtSumme._DateTimeOnly = False + Me.txtSumme._numbersOnly = True + Me.txtSumme._numbersOnlyKommastellen = "" + Me.txtSumme._numbersOnlyTrennzeichen = True + Me.txtSumme._Prozent = False + Me.txtSumme._ShortDateNew = False + Me.txtSumme._ShortDateOnly = False + Me.txtSumme._TimeOnly = False + Me.txtSumme._TimeOnly_Seconds = False + Me.txtSumme._value = Nothing + Me.txtSumme._Waehrung = True + Me.txtSumme._WaehrungZeichen = True + Me.txtSumme.ForeColor = System.Drawing.Color.Black + Me.txtSumme.Location = New System.Drawing.Point(646, 854) + Me.txtSumme.MaxLineLength = -1 + Me.txtSumme.MaxLines_Warning = "" + Me.txtSumme.MaxLines_Warning_Label = Nothing + Me.txtSumme.Name = "txtSumme" + Me.txtSumme.Size = New System.Drawing.Size(78, 20) + Me.txtSumme.TabIndex = 193 + Me.txtSumme.Text = "0" + Me.txtSumme.TextAlign = System.Windows.Forms.HorizontalAlignment.Right + ' + 'Label18 + ' + Me.Label18.AutoSize = True + Me.Label18.Location = New System.Drawing.Point(599, 861) + Me.Label18.Name = "Label18" + Me.Label18.Size = New System.Drawing.Size(41, 13) + Me.Label18.TabIndex = 192 + Me.Label18.Text = "Betrag:" + ' + 'Art + ' + Me.Art.HeaderText = "Art" + Me.Art.Name = "Art" + Me.Art.ReadOnly = True + ' + 'gew + ' + DataGridViewCellStyle15.Format = "N2" + DataGridViewCellStyle15.NullValue = Nothing + Me.gew.DefaultCellStyle = DataGridViewCellStyle15 + Me.gew.HeaderText = "Gewicht" + Me.gew.Name = "gew" + Me.gew.ReadOnly = True + ' + 'Preis + ' + DataGridViewCellStyle16.Format = "C2" + DataGridViewCellStyle16.NullValue = Nothing + Me.Preis.DefaultCellStyle = DataGridViewCellStyle16 + Me.Preis.HeaderText = "Preis" + Me.Preis.Name = "Preis" + Me.Preis.ReadOnly = True + ' + 'Faktor + ' + DataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter + DataGridViewCellStyle17.Format = "N0" + DataGridViewCellStyle17.NullValue = Nothing + Me.Faktor.DefaultCellStyle = DataGridViewCellStyle17 + Me.Faktor.HeaderText = "Faktor" + Me.Faktor.Name = "Faktor" + Me.Faktor.ReadOnly = True + ' + 'Betrag + ' + DataGridViewCellStyle18.Format = "C2" + DataGridViewCellStyle18.NullValue = Nothing + Me.Betrag.DefaultCellStyle = DataGridViewCellStyle18 + Me.Betrag.HeaderText = "Betrag" + Me.Betrag.Name = "Betrag" + Me.Betrag.ReadOnly = True + ' 'usrCntlQualitaetskontrolle ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.WhiteSmoke Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.Controls.Add(Me.txtSumme) + Me.Controls.Add(Me.Label18) + Me.Controls.Add(Me.cbxVerzicht) Me.Controls.Add(Me.Button5) - Me.Controls.Add(Me.DataGridView1) + Me.Controls.Add(Me.dgvGebuehren) Me.Controls.Add(Me.Label17) Me.Controls.Add(Me.cboZollstelle) Me.Controls.Add(Me.Label15) @@ -1057,7 +1168,7 @@ Partial Class usrCntlQualitaetskontrolle Me.Size = New System.Drawing.Size(1018, 896) CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvPositionen, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.dgvGebuehren, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -1111,11 +1222,6 @@ Partial Class usrCntlQualitaetskontrolle Friend WithEvents cbxEinf As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents cbxTyp As ComboBox Friend WithEvents Label12 As Label - Friend WithEvents pos As DataGridViewTextBoxColumn - Friend WithEvents anZ_pkgstk As DataGridViewTextBoxColumn - Friend WithEvents art_pkgstk As DataGridViewTextBoxColumn - Friend WithEvents erzeugnis As DataGridViewTextBoxColumn - Friend WithEvents gewicht As DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn1 As DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn2 As DataGridViewTextBoxColumn Friend WithEvents DataGridViewTextBoxColumn3 As DataGridViewTextBoxColumn @@ -1129,6 +1235,20 @@ Partial Class usrCntlQualitaetskontrolle Friend WithEvents cboZollstelle As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents Label15 As Label Friend WithEvents Label17 As Label - Friend WithEvents DataGridView1 As DataGridView + Friend WithEvents dgvGebuehren As DataGridView Friend WithEvents Button5 As Button + Friend WithEvents cbxVerzicht As CheckBox + Friend WithEvents pos As DataGridViewTextBoxColumn + Friend WithEvents anZ_pkgstk As DataGridViewTextBoxColumn + Friend WithEvents art_pkgstk As DataGridViewTextBoxColumn + Friend WithEvents erzeugnis As DataGridViewTextBoxColumn + Friend WithEvents gewicht As DataGridViewTextBoxColumn + Friend WithEvents KNCode As DataGridViewTextBoxColumn + Friend WithEvents txtSumme As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents Label18 As Label + Friend WithEvents Art As DataGridViewTextBoxColumn + Friend WithEvents gew As DataGridViewTextBoxColumn + Friend WithEvents Preis As DataGridViewTextBoxColumn + Friend WithEvents Faktor As DataGridViewTextBoxColumn + Friend WithEvents Betrag As DataGridViewTextBoxColumn End Class diff --git a/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.resx b/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.resx index 82b0df3d..f5f4cc74 100644 --- a/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.resx +++ b/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.resx @@ -132,4 +132,55 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.vb b/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.vb index f92c018e..5808585c 100644 --- a/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.vb +++ b/SDL/Formulare/KDFormulare/FormulareBaukasten/usrCntlQualitaetskontrolle.vb @@ -18,6 +18,9 @@ Public Class usrCntlQualitaetskontrolle Public EZA_Nr As String Public CRN As String Dim packstueckeZOLL_TMP As String = "" + Dim Normen, normenSpeziell, normenAllg As New DataTable + Dim NormenpreisAllg As Double + Dim NormenpreisSpez As Double Dim EZOLL_SQL = "EZOLL" Sub New() @@ -174,6 +177,22 @@ Public Class usrCntlQualitaetskontrolle initKdNR(KdNR) initSND() + + Dim sql As New VERAG_PROG_ALLGEMEIN.SQL + + Normen = sql.loadDgvBySql("select * from tblVermarktungsnormen", "FMZOLL") + + Dim dvAllgNormen = New DataView(Normen) + Dim dvSpezNormen = New DataView(Normen) + dvSpezNormen.RowFilter = "speziell = true" + dvAllgNormen.RowFilter = "speziell = false" + + normenSpeziell = dvSpezNormen.ToTable + normenAllg = dvAllgNormen.ToTable + + NormenpreisAllg = CDbl(sql.getValueTxtBySql("select top(1) betrag FROM tblVermarktungsnormenGebuehren where gueltigAb <= GETDATE() and [speziell] = 0 order by gueltigAb desc", "FMZOLL")) + NormenpreisSpez = CDbl(sql.getValueTxtBySql("select top(1) betrag FROM tblVermarktungsnormenGebuehren where gueltigAb <= GETDATE() and [speziell] = 1 order by gueltigAb desc", "FMZOLL")) + End Sub Private Sub pic_Click(sender As Object, e As EventArgs) Handles pic.Click @@ -200,7 +219,7 @@ Public Class usrCntlQualitaetskontrolle Dim couter As Integer = 1 For Each row As DataRow In dt.Rows - dgvPositionen.Rows.Add(row("ItNr"), row("Nr"), row("Kind"), row("GdsDes"), row("Net")) + dgvPositionen.Rows.Add(row("ItNr"), row("Nr"), row("Kind"), row("GdsDes"), row("Net"), row("ComCd")) couter = +1 Next @@ -304,7 +323,7 @@ Public Class usrCntlQualitaetskontrolle berechneDGVSum() ' Tabelle zsAnmGdsitem lesen. - Dim DTzsAnmGdsitem As DataTable = KDSQL.loadDgvBySql("SELECT item.ItNr ,item.GdsDes , item.Net, pack.Kind, pack.Nr, item.Orig" & + Dim DTzsAnmGdsitem As DataTable = KDSQL.loadDgvBySql("SELECT item.ItNr ,item.GdsDes , item.Net, pack.Kind, pack.Nr, item.Orig, item.ComCd" & " FROM zsAnmGdsitem as item" & " INNER JOIN zsAnmGdsItemPack as pack ON item.LizenzNr = pack.LizenzNr And item.OperatorID = pack.OperatorID and item.VorgangID = pack.VorgangID and pack.AnmID = item.AnmID" & " WHERE (item.LizenzNr = '" & DR_zsAnmRefs.Item("LizenzNr") & "') And (item.OperatorID = " & DR_zsAnmRefs.Item("OperatorID") & ") And (item.VorgangID = '" & DR_zsAnmRefs.Item("VorgangID") & "') And (item.AnmID = " & DR_zsAnmRefs.Item("AnmID") & " and item.GdsItemID = pack.GdsItemID)" & @@ -314,6 +333,7 @@ Public Class usrCntlQualitaetskontrolle If DTzsAnmGdsitem IsNot Nothing AndAlso DTzsAnmGdsitem.Rows().Count > 0 Then loadDGV(DTzsAnmGdsitem) + End If Catch ex As Exception VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("Fehler EZOLL Personal: " & vbNewLine & ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) @@ -379,9 +399,132 @@ Public Class usrCntlQualitaetskontrolle Private Sub dgvPositionen_RowsAdded(sender As Object, e As DataGridViewRowsAddedEventArgs) Handles dgvPositionen.RowsAdded berechneDGVSum() + initdgvGebuehren() End Sub Private Sub dgvPositionen_RowsRemoved(sender As Object, e As DataGridViewRowsRemovedEventArgs) Handles dgvPositionen.RowsRemoved berechneDGVSum() + initdgvGebuehren() + End Sub + + Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click + + If dgvGebuehren.Rows.Count = 0 Then Exit Sub + + + + Dim PERSONAL As SDL.cPersonal = Nothing + Dim frmSecureLoginKassenbuch As New SDL.frmSecureLoginKassenbuch + ' frmSecureLoginKassenbuch.KassenbuchNr_tmp = PERSONAL.KassenbuchNr + If frmSecureLoginKassenbuch.ShowDialog(Me) = DialogResult.OK Then + PERSONAL = frmSecureLoginKassenbuch.PERSONAL + Dim f As New frmBelegNeu(PERSONAL, Nothing, "E") + + AddHandler f.LOADED, Sub() + f.AddPositions(dgvGebuehren, False) + End Sub + + f.ShowDialog(Me) + + + End If + + + End Sub + + Private Sub initdgvGebuehren() + + If dgvGebuehren.Rows.Count > 0 Then dgvGebuehren.Rows.Clear() + Dim posVorhanden As Boolean = False + + If dgvPositionen.Rows.Count < 1 Then Exit Sub + + + Dim sumNormenAllg As Double = 0 + Dim sumNormenSpez As Double = 0 + + + For Each r As DataGridViewRow In dgvPositionen.Rows + + Dim found As Boolean = False + + If r IsNot Nothing And IsNumeric(r.Cells(4).Value) AndAlso r.Cells(4).Value >= 1000 Then + posVorhanden = True + + If r.Cells(5).Value <> "" Then + For Each row As DataRow In normenSpeziell.Rows + Dim code = row("kncode") + Dim seachedCode = r.Cells(5).Value + seachedCode = seachedCode.ToString.Substring(0, code.Length) + If row("kncode") = seachedCode Then + sumNormenSpez += r.Cells(4).Value + found = True + Exit For + End If + + Next + If Not found Then + + For Each row As DataRow In normenAllg.Rows + Dim code = row("kncode") + Dim seachedCode = r.Cells(5).Value + If seachedCode = seachedCode.ToString.Substring(0, code.Length) Then + sumNormenAllg += r.Cells(4).Value + found = True + Exit For + End If + + Next + + End If + End If + + End If + + Next + + If Not posVorhanden Then Exit Sub + + If sumNormenAllg > 0 Then + Dim anzAllg As Integer + anzAllg = sumNormenAllg / 1000 + dgvGebuehren.Rows.Add("Allgemein", sumNormenAllg, NormenpreisAllg, anzAllg, anzAllg * NormenpreisAllg) + End If + If sumNormenSpez > 0 Then + Dim anzSpez As Integer + anzSpez = sumNormenSpez / 1000 + dgvGebuehren.Rows.Add("Speziell", sumNormenSpez, NormenpreisSpez, anzSpez, anzSpez * NormenpreisSpez) + End If + + Dim antrag, verzicht, idk As Double + antrag = 40.7 + verzicht = 9.3 + idk = 39.4 + + + If cbxVerzicht.Checked Then + dgvGebuehren.Rows.Clear() + dgvGebuehren.Rows.Add("Antrag", "", antrag, "", antrag) + dgvGebuehren.Rows.Add("Verzicht", "", verzicht, "", verzicht) + Else + dgvGebuehren.Rows.Add("Antrag", "", antrag, "", antrag) + dgvGebuehren.Rows.Add("Identitätskontrolle", "", idk, "", idk) + End If + + + + Dim sumBetrag As Double = 0 + For Each r As DataGridViewRow In dgvGebuehren.Rows + If IsNumeric(r.Cells(4).Value) Then sumBetrag += r.Cells(4).Value + Next + + txtSumme.Text = CDbl(sumBetrag) + + End Sub + + Private Sub cbxVerzicht_CheckedChanged(sender As Object, e As EventArgs) Handles cbxVerzicht.CheckedChanged + + initdgvGebuehren() + End Sub End Class diff --git a/SDL/Formulare/KDFormulare/frmFormulare.vb b/SDL/Formulare/KDFormulare/frmFormulare.vb index 6fdad7e4..ad0a4ab6 100644 --- a/SDL/Formulare/KDFormulare/frmFormulare.vb +++ b/SDL/Formulare/KDFormulare/frmFormulare.vb @@ -261,7 +261,7 @@ Public Class frmFormulare cboVorlage.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Neukunde DE", FormularVorlagenGruppe.NeukundeDE)) Case Else - If VERAG_PROG_ALLGEMEIN.cAllgemein.PROGID = "16" Then 'SDL + If VERAG_PROG_ALLGEMEIN.cAllgemein.PROGID = "7" Then 'SDL MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Vollmacht", FormularManagerArten.MDM_Vollmacht_PDF)) MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Vollmacht EU", FormularManagerArten.MDM_Vollmacht_Word)) 'MyListBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("EU Vollmacht", FormularManagerArten.MDM_Vollmacht)) diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index 085e1a7d..417d0e84 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/kassenbuch/frmBelegNeu.vb b/SDL/kassenbuch/frmBelegNeu.vb index d7b3e550..0f6b39f6 100644 --- a/SDL/kassenbuch/frmBelegNeu.vb +++ b/SDL/kassenbuch/frmBelegNeu.vb @@ -96,6 +96,43 @@ Public Class frmBelegNeu If print Then allowPrint = True : btnPrint.PerformClick() End Sub + Public Sub AddPositions(dgv As DataGridView, print As Boolean) + + ' Dim anz = IIf(IsNumeric(txtAnzahl.Text), txtAnzahl.Text, 1) + Dim p As EABelegPositionen + + cboSteuerschlüssel.changeItem(2512) + + For Each r As DataGridViewRow In dgv.Rows + If r.Cells("Betrag").Value <> 0 Then + + p = New EABelegPositionen + p.Mandant = PERSONAL.Mandant + p.Niederlassung = PERSONAL.Niederlassung + p.Benutzer = PERSONAL.ID + 'p.Benutzer = BenutzerNr + p.BelegDat = Now + p.BelegNr = BELEG.BelegNr + p.PreislistenNr = 4 + p.PreislistenPos = 19 + p.LeistungsNr = 800 + + p.LeistungsBez = "QK-Gebühren " & r.Cells("Art").Value + p.Leistungsbeschreibung = "QK-Gebühren " & r.Cells("Art").Value + + p.Preis = r.Cells("Betrag").Value + p.Abfertigungsart = 0 + p.Anzahl = IIf(IsNumeric(txtAnzahl.Text), txtAnzahl.Text, 1) + p.Betrag = p.Anzahl * p.Preis + BELEG.POS.Add(p) + End If + + Next + + initDGVBelegPos() + If print Then allowPrint = True : btnPrint.PerformClick() + End Sub + Public Function AddLeihgeld(print As Boolean, BELEG_TMP As EABeleg, POS_ADD As List(Of EABelegPositionen)) As Boolean BELEG = BELEG_TMP diff --git a/VERAG_PROG_ALLGEMEIN/DATENSERVER/cDATENSERVER.vb b/VERAG_PROG_ALLGEMEIN/DATENSERVER/cDATENSERVER.vb index 38516312..ba3a0e08 100644 --- a/VERAG_PROG_ALLGEMEIN/DATENSERVER/cDATENSERVER.vb +++ b/VERAG_PROG_ALLGEMEIN/DATENSERVER/cDATENSERVER.vb @@ -280,6 +280,7 @@ Public Class cDATENSERVER s = s.Replace("І", "I") 'cyrillic I s = s.Replace("Ј", "J") 'cyrillic J s = s.Replace("Е", "E") 'cyrillic E + s = s.Replace("?", "") Dim temp = s s = Regex.Replace(s, "[бБвгГдДёЁжЖзЗиИйЙкКлЛмнпПртфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяЯ]", "").Replace("""", "") 'REMOVE cyrillic letters @@ -287,6 +288,7 @@ Public Class cDATENSERVER Dim tempBytes = System.Text.Encoding.GetEncoding("ISO-8859-8").GetBytes(s) s = System.Text.Encoding.UTF8.GetString(tempBytes) + s = s.Replace("�", "") Return s End Function diff --git a/VERAG_PROG_ALLGEMEIN/cAllgemein.vb b/VERAG_PROG_ALLGEMEIN/cAllgemein.vb index 6d0ab43d..553a7689 100644 --- a/VERAG_PROG_ALLGEMEIN/cAllgemein.vb +++ b/VERAG_PROG_ALLGEMEIN/cAllgemein.vb @@ -127,7 +127,7 @@ Public Class cAllgemein End If - + LOAD_PROGRAMM() LOAD_PARAM() LOAD_TRANSLATE() LOAD_TRANSLATE_AUTO() @@ -154,6 +154,21 @@ Public Class cAllgemein End Sub + Public Shared Sub LOAD_PROGRAMM() + Dim prog_Name = My.Application.Info.ProductName + + + Select Case prog_Name.ToUpper + Case "AVISO" + PROGID = 16 + Case "SDL" + PROGID = 7 + Case Else + PROGID = SQL.getValueTxtBySql("SELECT isnull([prog_id],0) FROM [tblProgramme] WHERe [prog_codename]='" & prog_Name & "'", "ADMIN") + End Select + PROGNAME = SQL.getValueTxtBySql("SELECT prog_name FROM [tblProgramme] WHERe [prog_id]='" & PROGID & "'", "ADMIN") + End Sub + Public Shared Sub LOAD_PARAM() PARAMS = New cParameterList(PROGID, FIRMA) End Sub