diff --git a/SDL/Fakturierung/frmAbrechnungsMaske.Designer.vb b/SDL/Fakturierung/frmAbrechnungsMaske.Designer.vb index b1624614..f80c0054 100644 --- a/SDL/Fakturierung/frmAbrechnungsMaske.Designer.vb +++ b/SDL/Fakturierung/frmAbrechnungsMaske.Designer.vb @@ -30,12 +30,9 @@ Partial Class frmAbrechnungsMaske Me.TabPage1 = New System.Windows.Forms.TabPage() Me.Button4 = New System.Windows.Forms.Button() Me.Label12 = New System.Windows.Forms.Label() - Me.dgvRechnungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.Panel2 = New System.Windows.Forms.Panel() Me.Button11 = New System.Windows.Forms.Button() Me.cbxOriginalDrucken = New System.Windows.Forms.CheckBox() - Me.cboSort = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.cboPrinter = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Button9 = New System.Windows.Forms.Button() Me.Button8 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() @@ -51,14 +48,19 @@ Partial Class frmAbrechnungsMaske Me.Label2 = New System.Windows.Forms.Label() Me.Label10 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() - Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label14 = New System.Windows.Forms.Label() Me.cbx = New System.Windows.Forms.CheckBox() - Me.MyComboBox3 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label5 = New System.Windows.Forms.Label() - Me.MyComboBox2 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label1 = New System.Windows.Forms.Label() Me.lblSachbearbeiter = New System.Windows.Forms.Label() + Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.cbxGutschriftenAnVerag = New System.Windows.Forms.CheckBox() + Me.dgvRechnungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) + Me.cboSort = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.cboPrinter = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.MyComboBox3 = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.MyComboBox2 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components) Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox() @@ -83,7 +85,6 @@ Partial Class frmAbrechnungsMaske Me.btnBisJahr = New System.Windows.Forms.Button() Me.btnVonJahr = New System.Windows.Forms.Button() Me.UsrCntlFaktAbrechnung1 = New SDL.usrCntlFaktAbrechnung() - Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.pnl.SuspendLayout() CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer.Panel1.SuspendLayout() @@ -91,9 +92,9 @@ Partial Class frmAbrechnungsMaske Me.SplitContainer.SuspendLayout() Me.tbcntr.SuspendLayout() Me.TabPage1.SuspendLayout() - CType(Me.dgvRechnungen, System.ComponentModel.ISupportInitialize).BeginInit() Me.Panel2.SuspendLayout() Me.Panel1.SuspendLayout() + CType(Me.dgvRechnungen, System.ComponentModel.ISupportInitialize).BeginInit() Me.MyPanel1.SuspendLayout() Me.SuspendLayout() ' @@ -173,25 +174,6 @@ Partial Class frmAbrechnungsMaske Me.Label12.TextAlign = System.Drawing.ContentAlignment.TopCenter Me.Label12.Visible = False ' - 'dgvRechnungen - ' - Me.dgvRechnungen.AKTUALISIERUNGS_INTERVALL = -1 - Me.dgvRechnungen.AllowUserToAddRows = False - Me.dgvRechnungen.AllowUserToDeleteRows = False - Me.dgvRechnungen.AllowUserToResizeColumns = False - Me.dgvRechnungen.AllowUserToResizeRows = False - Me.dgvRechnungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.dgvRechnungen.Dock = System.Windows.Forms.DockStyle.Fill - Me.dgvRechnungen.Location = New System.Drawing.Point(3, 3) - Me.dgvRechnungen.Margin = New System.Windows.Forms.Padding(2) - Me.dgvRechnungen.Name = "dgvRechnungen" - Me.dgvRechnungen.ReadOnly = True - Me.dgvRechnungen.RowHeadersVisible = False - Me.dgvRechnungen.RowTemplate.Height = 28 - Me.dgvRechnungen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect - Me.dgvRechnungen.Size = New System.Drawing.Size(561, 316) - Me.dgvRechnungen.TabIndex = 1 - ' 'Panel2 ' Me.Panel2.BackColor = System.Drawing.Color.White @@ -245,30 +227,6 @@ Partial Class frmAbrechnungsMaske Me.cbxOriginalDrucken.Text = "Original (ohne ""Kopie"")" Me.cbxOriginalDrucken.UseVisualStyleBackColor = True ' - 'cboSort - ' - Me.cboSort._allowedValuesFreiText = Nothing - Me.cboSort._allowFreiText = False - Me.cboSort._value = "" - Me.cboSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.cboSort.FormattingEnabled = True - Me.cboSort.Location = New System.Drawing.Point(8, 73) - Me.cboSort.Name = "cboSort" - Me.cboSort.Size = New System.Drawing.Size(53, 21) - Me.cboSort.TabIndex = 26 - ' - 'cboPrinter - ' - Me.cboPrinter._allowedValuesFreiText = Nothing - Me.cboPrinter._allowFreiText = False - Me.cboPrinter._value = "" - Me.cboPrinter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.cboPrinter.FormattingEnabled = True - Me.cboPrinter.Location = New System.Drawing.Point(142, 52) - Me.cboPrinter.Name = "cboPrinter" - Me.cboPrinter.Size = New System.Drawing.Size(157, 21) - Me.cboPrinter.TabIndex = 25 - ' 'Button9 ' Me.Button9.BackgroundImage = Global.SDL.My.Resources.Resources.pdf @@ -437,6 +395,7 @@ Partial Class frmAbrechnungsMaske 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.White + Me.Panel1.Controls.Add(Me.cbxGutschriftenAnVerag) Me.Panel1.Controls.Add(Me.MyComboBox1) Me.Panel1.Controls.Add(Me.Label14) Me.Panel1.Controls.Add(Me.cbx) @@ -454,18 +413,6 @@ Partial Class frmAbrechnungsMaske Me.Panel1.Size = New System.Drawing.Size(575, 170) Me.Panel1.TabIndex = 0 ' - 'MyComboBox1 - ' - Me.MyComboBox1._allowedValuesFreiText = Nothing - Me.MyComboBox1._allowFreiText = False - Me.MyComboBox1._value = "" - Me.MyComboBox1.FormattingEnabled = True - Me.MyComboBox1.Location = New System.Drawing.Point(453, 28) - Me.MyComboBox1.Margin = New System.Windows.Forms.Padding(2) - Me.MyComboBox1.Name = "MyComboBox1" - Me.MyComboBox1.Size = New System.Drawing.Size(83, 21) - Me.MyComboBox1.TabIndex = 53 - ' 'Label14 ' Me.Label14.AutoSize = True @@ -487,18 +434,6 @@ Partial Class frmAbrechnungsMaske Me.cbx.Text = "Gedruckte Rechnugen anzeigen" Me.cbx.UseVisualStyleBackColor = True ' - 'MyComboBox3 - ' - Me.MyComboBox3._allowedValuesFreiText = Nothing - Me.MyComboBox3._allowFreiText = False - Me.MyComboBox3._value = "" - Me.MyComboBox3.FormattingEnabled = True - Me.MyComboBox3.Location = New System.Drawing.Point(453, 8) - Me.MyComboBox3.Margin = New System.Windows.Forms.Padding(2) - Me.MyComboBox3.Name = "MyComboBox3" - Me.MyComboBox3.Size = New System.Drawing.Size(83, 21) - Me.MyComboBox3.TabIndex = 33 - ' 'Label5 ' Me.Label5.AutoSize = True @@ -508,18 +443,6 @@ Partial Class frmAbrechnungsMaske Me.Label5.TabIndex = 32 Me.Label5.Text = "Sammel-/Einzel-Rg.:" ' - 'MyComboBox2 - ' - Me.MyComboBox2._allowedValuesFreiText = Nothing - Me.MyComboBox2._allowFreiText = False - Me.MyComboBox2._value = "" - Me.MyComboBox2.FormattingEnabled = True - Me.MyComboBox2.Location = New System.Drawing.Point(99, 33) - Me.MyComboBox2.Margin = New System.Windows.Forms.Padding(2) - Me.MyComboBox2.Name = "MyComboBox2" - Me.MyComboBox2.Size = New System.Drawing.Size(154, 21) - Me.MyComboBox2.TabIndex = 31 - ' 'Label1 ' Me.Label1.AutoSize = True @@ -538,6 +461,100 @@ Partial Class frmAbrechnungsMaske Me.lblSachbearbeiter.TabIndex = 30 Me.lblSachbearbeiter.Text = "Sachbearbeiter:" ' + 'ContextMenuStrip1 + ' + Me.ContextMenuStrip1.Name = "ContextMenuStrip1" + Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4) + ' + 'cbxGutschriftenAnVerag + ' + Me.cbxGutschriftenAnVerag.AutoSize = True + Me.cbxGutschriftenAnVerag.Location = New System.Drawing.Point(15, 59) + Me.cbxGutschriftenAnVerag.Name = "cbxGutschriftenAnVerag" + Me.cbxGutschriftenAnVerag.Size = New System.Drawing.Size(128, 17) + Me.cbxGutschriftenAnVerag.TabIndex = 54 + Me.cbxGutschriftenAnVerag.Text = "nicht an Verag abger." + Me.cbxGutschriftenAnVerag.UseVisualStyleBackColor = True + ' + 'dgvRechnungen + ' + Me.dgvRechnungen.AKTUALISIERUNGS_INTERVALL = -1 + Me.dgvRechnungen.AllowUserToAddRows = False + Me.dgvRechnungen.AllowUserToDeleteRows = False + Me.dgvRechnungen.AllowUserToResizeColumns = False + Me.dgvRechnungen.AllowUserToResizeRows = False + Me.dgvRechnungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.dgvRechnungen.Dock = System.Windows.Forms.DockStyle.Fill + Me.dgvRechnungen.Location = New System.Drawing.Point(3, 3) + Me.dgvRechnungen.Margin = New System.Windows.Forms.Padding(2) + Me.dgvRechnungen.Name = "dgvRechnungen" + Me.dgvRechnungen.ReadOnly = True + Me.dgvRechnungen.RowHeadersVisible = False + Me.dgvRechnungen.RowTemplate.Height = 28 + Me.dgvRechnungen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect + Me.dgvRechnungen.Size = New System.Drawing.Size(561, 316) + Me.dgvRechnungen.TabIndex = 1 + ' + 'cboSort + ' + Me.cboSort._allowedValuesFreiText = Nothing + Me.cboSort._allowFreiText = False + Me.cboSort._value = "" + Me.cboSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.cboSort.FormattingEnabled = True + Me.cboSort.Location = New System.Drawing.Point(8, 73) + Me.cboSort.Name = "cboSort" + Me.cboSort.Size = New System.Drawing.Size(53, 21) + Me.cboSort.TabIndex = 26 + ' + 'cboPrinter + ' + Me.cboPrinter._allowedValuesFreiText = Nothing + Me.cboPrinter._allowFreiText = False + Me.cboPrinter._value = "" + Me.cboPrinter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.cboPrinter.FormattingEnabled = True + Me.cboPrinter.Location = New System.Drawing.Point(142, 52) + Me.cboPrinter.Name = "cboPrinter" + Me.cboPrinter.Size = New System.Drawing.Size(157, 21) + Me.cboPrinter.TabIndex = 25 + ' + 'MyComboBox1 + ' + Me.MyComboBox1._allowedValuesFreiText = Nothing + Me.MyComboBox1._allowFreiText = False + Me.MyComboBox1._value = "" + Me.MyComboBox1.FormattingEnabled = True + Me.MyComboBox1.Location = New System.Drawing.Point(453, 28) + Me.MyComboBox1.Margin = New System.Windows.Forms.Padding(2) + Me.MyComboBox1.Name = "MyComboBox1" + Me.MyComboBox1.Size = New System.Drawing.Size(83, 21) + Me.MyComboBox1.TabIndex = 53 + ' + 'MyComboBox3 + ' + Me.MyComboBox3._allowedValuesFreiText = Nothing + Me.MyComboBox3._allowFreiText = False + Me.MyComboBox3._value = "" + Me.MyComboBox3.FormattingEnabled = True + Me.MyComboBox3.Location = New System.Drawing.Point(453, 8) + Me.MyComboBox3.Margin = New System.Windows.Forms.Padding(2) + Me.MyComboBox3.Name = "MyComboBox3" + Me.MyComboBox3.Size = New System.Drawing.Size(83, 21) + Me.MyComboBox3.TabIndex = 33 + ' + 'MyComboBox2 + ' + Me.MyComboBox2._allowedValuesFreiText = Nothing + Me.MyComboBox2._allowFreiText = False + Me.MyComboBox2._value = "" + Me.MyComboBox2.FormattingEnabled = True + Me.MyComboBox2.Location = New System.Drawing.Point(99, 33) + Me.MyComboBox2.Margin = New System.Windows.Forms.Padding(2) + Me.MyComboBox2.Name = "MyComboBox2" + Me.MyComboBox2.Size = New System.Drawing.Size(154, 21) + Me.MyComboBox2.TabIndex = 31 + ' 'cboFirma ' Me.cboFirma._allowedValuesFreiText = Nothing @@ -903,11 +920,6 @@ Partial Class frmAbrechnungsMaske Me.UsrCntlFaktAbrechnung1.Size = New System.Drawing.Size(863, 615) Me.UsrCntlFaktAbrechnung1.TabIndex = 0 ' - 'ContextMenuStrip1 - ' - Me.ContextMenuStrip1.Name = "ContextMenuStrip1" - Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4) - ' 'frmAbrechnungsMaske ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -926,11 +938,11 @@ Partial Class frmAbrechnungsMaske Me.SplitContainer.ResumeLayout(False) Me.tbcntr.ResumeLayout(False) Me.TabPage1.ResumeLayout(False) - CType(Me.dgvRechnungen, System.ComponentModel.ISupportInitialize).EndInit() Me.Panel2.ResumeLayout(False) Me.Panel2.PerformLayout() Me.Panel1.ResumeLayout(False) Me.Panel1.PerformLayout() + CType(Me.dgvRechnungen, System.ComponentModel.ISupportInitialize).EndInit() Me.MyPanel1.ResumeLayout(False) Me.MyPanel1.PerformLayout() Me.ResumeLayout(False) @@ -996,4 +1008,5 @@ Partial Class frmAbrechnungsMaske Friend WithEvents cbxOriginalDrucken As CheckBox Friend WithEvents Button11 As Button Friend WithEvents ContextMenuStrip1 As ContextMenuStrip + Friend WithEvents cbxGutschriftenAnVerag As CheckBox End Class diff --git a/SDL/Fakturierung/frmAbrechnungsMaske.vb b/SDL/Fakturierung/frmAbrechnungsMaske.vb index a63b1a68..c6057299 100644 --- a/SDL/Fakturierung/frmAbrechnungsMaske.vb +++ b/SDL/Fakturierung/frmAbrechnungsMaske.vb @@ -1,4 +1,5 @@ -Imports Microsoft.Office.Interop +Imports DocumentFormat.OpenXml.Drawing.Diagrams +Imports Microsoft.Office.Interop Public Class frmAbrechnungsMaske Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL @@ -50,6 +51,8 @@ Public Class frmAbrechnungsMaske MyComboBox2.Items.Clear() + FirmaTmp = "AMBAR" + Select Case FirmaTmp Case "VERAG" If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "MDM" Then @@ -84,7 +87,8 @@ Public Class frmAbrechnungsMaske Case "AMBAR" cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE FIRMENGRUPPE IN ('AMBAR') ", False, "FMZOLL") cboFirma.changeItem("24") - MyComboBox2.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True) + MyComboBox2.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) Or mit_id = '678' order by mit_username", False, "ADMIN", True) + MyComboBox2.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AUTO", "AUTO")) 'für automaitsch generierte GU Case "VERAGIMEX" Dim whereFirma = " AND FIRMENGRUPPE IN ('VERAG','IMEX','ATILLA','VERAGUNISPED','FRONTOFFICE') " If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGAG_DE", "SDL") Then @@ -139,6 +143,8 @@ Public Class frmAbrechnungsMaske Sub initDGV() + + If Not loaded Then Exit Sub Dim dgv As VERAG_PROG_ALLGEMEIN.MyDatagridview = getDGV() @@ -193,30 +199,47 @@ Public Class frmAbrechnungsMaske Case Else : sqlstr &= " And Rechnungsausgang.Sammelrechnung NOT IN (6) " End Select - If cbx.Checked Then - 'sqlstr &= " AND Status = 0 " - sqlstr &= " AND DruckDatumZeit BETWEEN '" & txtAbfertDat._value & " 00:00:00' AND '" & txtAbfertDatBis._value & " 23:59:59'" - - If MyTextBox2.Text <> "" Then - If MyTextBox3.Text <> "" Then - sqlstr &= " AND RechnungsNr BETWEEN '" & MyTextBox2.Text.Replace("*", "%") & "' AND '" & MyTextBox3.Text.Replace("*", "%") & "'" - Else - sqlstr &= " AND RechnungsNr LIKE '" & MyTextBox2.Text.Replace("*", "%") & "'" - End If - End If + If cbxGutschriftenAnVerag.Checked AndAlso cboFirma._value <> "" Then + sqlstr &= " AND (SELECT count(*) FROM Speditionsbuch WHERE Speditionsbuch.FilialenNr = Rechnungsausgang.FilialenNr AND Speditionsbuch.AbfertigungsNr = Rechnungsausgang.AbfertigungsNr AND Speditionsbuch.Abfertigungsart = 23 AND Rechnungsausgang.RechnungsKundenNr = '3013401') = 0 AND Rechnungsausgang.Firma_ID=" & cboFirma._value Else - sqlstr &= " And (Status = 0 or DruckDatumZeit is null) " + + + If cbx.Checked Then + 'sqlstr &= " AND Status = 0 " + sqlstr &= " AND DruckDatumZeit BETWEEN '" & txtAbfertDat._value & " 00:00:00' AND '" & txtAbfertDatBis._value & " 23:59:59'" + + If MyTextBox2.Text <> "" Then + If MyTextBox3.Text <> "" Then + sqlstr &= " AND RechnungsNr BETWEEN '" & MyTextBox2.Text.Replace("*", "%") & "' AND '" & MyTextBox3.Text.Replace("*", "%") & "'" + Else + sqlstr &= " AND RechnungsNr LIKE '" & MyTextBox2.Text.Replace("*", "%") & "'" + End If + End If + Else + sqlstr &= " And (Status = 0 or DruckDatumZeit is null) " + End If + + If MyComboBox1._value <> "" Then + sqlstr &= " And Rechnungsdruck='" & MyComboBox1._value & "' " + End If + If srchSB <> "" Then sqlstr &= " And Rechnungsausgang.Sachbearbeiter='" & srchSB & "' " + If cboFirma._value <> "" Then sqlstr &= " AND Rechnungsausgang.Firma_ID=" & cboFirma._value & " " End If - If MyComboBox1._value <> "" Then - sqlstr &= " And Rechnungsdruck='" & MyComboBox1._value & "' " - End If - If srchSB <> "" Then sqlstr &= " And Rechnungsausgang.Sachbearbeiter='" & srchSB & "' " - If cboFirma._value <> "" Then sqlstr &= " AND Rechnungsausgang.Firma_ID=" & cboFirma._value & " " + ' sqlstr &= " AND (SteuerpflichtigerGesamtbetrag<>0 OR SteuerfreierGesamtbetrag<>0)" Return sqlstr End Function Private Sub MyComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboFirma.SelectedIndexChanged, MyComboBox2.SelectedIndexChanged, MyComboBox3.SelectedIndexChanged, MyComboBox1.SelectedIndexChanged + + If cboFirma._value = "24" Then + + cbxGutschriftenAnVerag.Visible = True + Else + cbxGutschriftenAnVerag.Visible = False + cbxGutschriftenAnVerag.Checked = False + End If + initDGV() End Sub Function checkSrchValues() As Boolean @@ -744,4 +767,11 @@ Public Class frmAbrechnungsMaske initBtns("Tag") End Sub + Private Sub cbxGutschriftenAnVerag_CheckedChanged(sender As Object, e As EventArgs) Handles cbxGutschriftenAnVerag.CheckedChanged + + Panel1.Height = 80 + cbxOriginalDrucken.Visible = False + MyPanel1.Visible = False + initDGV() + End Sub End Class \ No newline at end of file diff --git a/SDL/Fakturierung/usrCntlFaktAbrechnung.Designer.vb b/SDL/Fakturierung/usrCntlFaktAbrechnung.Designer.vb index 71f40f02..5e10ffaa 100644 --- a/SDL/Fakturierung/usrCntlFaktAbrechnung.Designer.vb +++ b/SDL/Fakturierung/usrCntlFaktAbrechnung.Designer.vb @@ -45,6 +45,11 @@ Partial Class usrCntlFaktAbrechnung Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlFaktAbrechnung)) + Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle25 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle26 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.Label9 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.pnlTop = New System.Windows.Forms.Panel() @@ -84,11 +89,11 @@ Partial Class usrCntlFaktAbrechnung Me.Panel1 = New System.Windows.Forms.Panel() Me.txtTextZZ = New VERAG_PROG_ALLGEMEIN.MyRichTextBox() Me.dgvAnhaenge = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) - Me.optAnhSel = New System.Windows.Forms.DataGridViewCheckBoxColumn() + Me.DataGridViewCheckBoxColumn1 = New System.Windows.Forms.DataGridViewCheckBoxColumn() + Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.clmnBezeichnung = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.clmnDsId = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.clmnAnhId = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn3 = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn4 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.Label36 = New System.Windows.Forms.Label() Me.Label54 = New System.Windows.Forms.Label() Me.cboRechnungSprache = New VERAG_PROG_ALLGEMEIN.MyComboBox() @@ -206,12 +211,12 @@ Partial Class usrCntlFaktAbrechnung Me.Label29 = New System.Windows.Forms.Label() Me.Label30 = New System.Windows.Forms.Label() Me.dgvRechnungenPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) - Me.Leistung = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.Anzahl = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.Preis = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.SteuerpflichtigerBetrag = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.SteuerfreierBetrag = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.Aufschubkonto = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn5 = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn6 = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn7 = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn8 = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn9 = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.DataGridViewTextBoxColumn10 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.dgvOffertenSperrliste = New System.Windows.Forms.DataGridView() Me.dgvOfferteDetailsUebersicht = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.txtRohmasse = New VERAG_PROG_ALLGEMEIN.MyTextBox() @@ -236,7 +241,6 @@ Partial Class usrCntlFaktAbrechnung Me.lblEUR_4 = New System.Windows.Forms.Label() Me.Label55 = New System.Windows.Forms.Label() Me.cboSteuerschlüssel = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.rtbAbf_Besonderheiten = New SDL.usrCntlKundenBesonderheiten() Me.cbxOriginalPrint = New System.Windows.Forms.CheckBox() Me.Label46 = New System.Windows.Forms.Label() Me.Button9 = New System.Windows.Forms.Button() @@ -276,6 +280,18 @@ Partial Class usrCntlFaktAbrechnung Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.GutschriftAusRechnungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.SeperateRechnungFürEUSTToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.EUStGutschriftAnVeragToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.optAnhSel = New System.Windows.Forms.DataGridViewCheckBoxColumn() + Me.clmnBezeichnung = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.clmnDsId = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.clmnAnhId = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Leistung = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Anzahl = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Preis = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.SteuerpflichtigerBetrag = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.SteuerfreierBetrag = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.Aufschubkonto = New System.Windows.Forms.DataGridViewTextBoxColumn() + Me.rtbAbf_Besonderheiten = New SDL.usrCntlKundenBesonderheiten() Me.pnlTop.SuspendLayout() Me.Panel3.SuspendLayout() Me.Panel1.SuspendLayout() @@ -874,7 +890,7 @@ Partial Class usrCntlFaktAbrechnung DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] Me.dgvAnhaenge.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 Me.dgvAnhaenge.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.dgvAnhaenge.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.optAnhSel, Me.DataGridViewTextBoxColumn2, Me.clmnBezeichnung, Me.clmnDsId, Me.clmnAnhId}) + Me.dgvAnhaenge.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.DataGridViewCheckBoxColumn1, Me.DataGridViewTextBoxColumn1, Me.DataGridViewTextBoxColumn2, Me.DataGridViewTextBoxColumn3, Me.DataGridViewTextBoxColumn4}) DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) @@ -902,59 +918,60 @@ Partial Class usrCntlFaktAbrechnung Me.dgvAnhaenge.TabIndex = 90 Me.dgvAnhaenge.TabStop = False ' - 'optAnhSel + 'DataGridViewCheckBoxColumn1 ' - Me.optAnhSel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None - Me.optAnhSel.FillWeight = 78.74017! - Me.optAnhSel.HeaderText = "" - Me.optAnhSel.MinimumWidth = 8 - Me.optAnhSel.Name = "optAnhSel" - Me.optAnhSel.ReadOnly = True - Me.optAnhSel.Resizable = System.Windows.Forms.DataGridViewTriState.[True] - Me.optAnhSel.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic - Me.optAnhSel.Width = 35 + Me.DataGridViewCheckBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None + Me.DataGridViewCheckBoxColumn1.FillWeight = 78.74017! + Me.DataGridViewCheckBoxColumn1.HeaderText = "" + Me.DataGridViewCheckBoxColumn1.MinimumWidth = 8 + Me.DataGridViewCheckBoxColumn1.Name = "DataGridViewCheckBoxColumn1" + Me.DataGridViewCheckBoxColumn1.ReadOnly = True + Me.DataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.[True] + Me.DataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic + Me.DataGridViewCheckBoxColumn1.Width = 35 ' - 'DataGridViewTextBoxColumn2 + 'DataGridViewTextBoxColumn1 ' DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight DataGridViewCellStyle2.Format = "N0" DataGridViewCellStyle2.NullValue = Nothing - Me.DataGridViewTextBoxColumn2.DefaultCellStyle = DataGridViewCellStyle2 + Me.DataGridViewTextBoxColumn1.DefaultCellStyle = DataGridViewCellStyle2 + Me.DataGridViewTextBoxColumn1.HeaderText = "Art" + Me.DataGridViewTextBoxColumn1.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1" + Me.DataGridViewTextBoxColumn1.ReadOnly = True + Me.DataGridViewTextBoxColumn1.Width = 70 + ' + 'DataGridViewTextBoxColumn2 + ' + Me.DataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill + DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle3.Format = "N0" + DataGridViewCellStyle3.NullValue = Nothing + Me.DataGridViewTextBoxColumn2.DefaultCellStyle = DataGridViewCellStyle3 + Me.DataGridViewTextBoxColumn2.FillWeight = 121.2598! Me.DataGridViewTextBoxColumn2.HeaderText = "Art" Me.DataGridViewTextBoxColumn2.MinimumWidth = 8 Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2" Me.DataGridViewTextBoxColumn2.ReadOnly = True - Me.DataGridViewTextBoxColumn2.Width = 70 ' - 'clmnBezeichnung + 'DataGridViewTextBoxColumn3 ' - Me.clmnBezeichnung.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill - DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle3.Format = "c2" - Me.clmnBezeichnung.DefaultCellStyle = DataGridViewCellStyle3 - Me.clmnBezeichnung.FillWeight = 121.2598! - Me.clmnBezeichnung.HeaderText = "Bezeichnung" - Me.clmnBezeichnung.MinimumWidth = 8 - Me.clmnBezeichnung.Name = "clmnBezeichnung" - Me.clmnBezeichnung.ReadOnly = True + Me.DataGridViewTextBoxColumn3.HeaderText = "clmnDsId" + Me.DataGridViewTextBoxColumn3.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn3.Name = "DataGridViewTextBoxColumn3" + Me.DataGridViewTextBoxColumn3.ReadOnly = True + Me.DataGridViewTextBoxColumn3.Visible = False + Me.DataGridViewTextBoxColumn3.Width = 150 ' - 'clmnDsId + 'DataGridViewTextBoxColumn4 ' - Me.clmnDsId.HeaderText = "clmnDsId" - Me.clmnDsId.MinimumWidth = 8 - Me.clmnDsId.Name = "clmnDsId" - Me.clmnDsId.ReadOnly = True - Me.clmnDsId.Visible = False - Me.clmnDsId.Width = 150 - ' - 'clmnAnhId - ' - Me.clmnAnhId.HeaderText = "clmnAnhId" - Me.clmnAnhId.MinimumWidth = 8 - Me.clmnAnhId.Name = "clmnAnhId" - Me.clmnAnhId.ReadOnly = True - Me.clmnAnhId.Visible = False - Me.clmnAnhId.Width = 150 + Me.DataGridViewTextBoxColumn4.HeaderText = "clmnAnhId" + Me.DataGridViewTextBoxColumn4.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn4.Name = "DataGridViewTextBoxColumn4" + Me.DataGridViewTextBoxColumn4.ReadOnly = True + Me.DataGridViewTextBoxColumn4.Visible = False + Me.DataGridViewTextBoxColumn4.Width = 150 ' 'Label36 ' @@ -2908,7 +2925,7 @@ Partial Class usrCntlFaktAbrechnung DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] Me.dgvRechnungenPositionen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle6 Me.dgvRechnungenPositionen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.dgvRechnungenPositionen.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.Leistung, Me.Anzahl, Me.Preis, Me.SteuerpflichtigerBetrag, Me.SteuerfreierBetrag, Me.Aufschubkonto}) + Me.dgvRechnungenPositionen.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.DataGridViewTextBoxColumn5, Me.DataGridViewTextBoxColumn6, Me.DataGridViewTextBoxColumn7, Me.DataGridViewTextBoxColumn8, Me.DataGridViewTextBoxColumn9, Me.DataGridViewTextBoxColumn10}) DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window DataGridViewCellStyle11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) @@ -2935,67 +2952,67 @@ Partial Class usrCntlFaktAbrechnung Me.dgvRechnungenPositionen.TabIndex = 5 Me.dgvRechnungenPositionen.TabStop = False ' - 'Leistung + 'DataGridViewTextBoxColumn5 ' - Me.Leistung.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill - Me.Leistung.HeaderText = "Leistung" - Me.Leistung.MinimumWidth = 8 - Me.Leistung.Name = "Leistung" - Me.Leistung.ReadOnly = True + Me.DataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill + Me.DataGridViewTextBoxColumn5.HeaderText = "Leistung" + Me.DataGridViewTextBoxColumn5.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn5.Name = "DataGridViewTextBoxColumn5" + Me.DataGridViewTextBoxColumn5.ReadOnly = True ' - 'Anzahl + 'DataGridViewTextBoxColumn6 ' DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight DataGridViewCellStyle7.Format = "N0" DataGridViewCellStyle7.NullValue = Nothing - Me.Anzahl.DefaultCellStyle = DataGridViewCellStyle7 - Me.Anzahl.HeaderText = "Anzahl" - Me.Anzahl.MinimumWidth = 8 - Me.Anzahl.Name = "Anzahl" - Me.Anzahl.ReadOnly = True - Me.Anzahl.Width = 50 + Me.DataGridViewTextBoxColumn6.DefaultCellStyle = DataGridViewCellStyle7 + Me.DataGridViewTextBoxColumn6.HeaderText = "Anzahl" + Me.DataGridViewTextBoxColumn6.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn6.Name = "DataGridViewTextBoxColumn6" + Me.DataGridViewTextBoxColumn6.ReadOnly = True + Me.DataGridViewTextBoxColumn6.Width = 50 ' - 'Preis + 'DataGridViewTextBoxColumn7 ' DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight DataGridViewCellStyle8.Format = "c2" - Me.Preis.DefaultCellStyle = DataGridViewCellStyle8 - Me.Preis.HeaderText = "Preis" - Me.Preis.MinimumWidth = 8 - Me.Preis.Name = "Preis" - Me.Preis.ReadOnly = True - Me.Preis.Width = 80 + Me.DataGridViewTextBoxColumn7.DefaultCellStyle = DataGridViewCellStyle8 + Me.DataGridViewTextBoxColumn7.HeaderText = "Preis" + Me.DataGridViewTextBoxColumn7.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn7.Name = "DataGridViewTextBoxColumn7" + Me.DataGridViewTextBoxColumn7.ReadOnly = True + Me.DataGridViewTextBoxColumn7.Width = 80 ' - 'SteuerpflichtigerBetrag + 'DataGridViewTextBoxColumn8 ' DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight DataGridViewCellStyle9.Format = "c2" - Me.SteuerpflichtigerBetrag.DefaultCellStyle = DataGridViewCellStyle9 - Me.SteuerpflichtigerBetrag.HeaderText = "Steuerpfl." - Me.SteuerpflichtigerBetrag.MinimumWidth = 8 - Me.SteuerpflichtigerBetrag.Name = "SteuerpflichtigerBetrag" - Me.SteuerpflichtigerBetrag.ReadOnly = True - Me.SteuerpflichtigerBetrag.Width = 120 + Me.DataGridViewTextBoxColumn8.DefaultCellStyle = DataGridViewCellStyle9 + Me.DataGridViewTextBoxColumn8.HeaderText = "Steuerpfl." + Me.DataGridViewTextBoxColumn8.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn8.Name = "DataGridViewTextBoxColumn8" + Me.DataGridViewTextBoxColumn8.ReadOnly = True + Me.DataGridViewTextBoxColumn8.Width = 120 ' - 'SteuerfreierBetrag + 'DataGridViewTextBoxColumn9 ' DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight DataGridViewCellStyle10.Format = "C2" DataGridViewCellStyle10.NullValue = Nothing - Me.SteuerfreierBetrag.DefaultCellStyle = DataGridViewCellStyle10 - Me.SteuerfreierBetrag.HeaderText = "Steuerfrei" - Me.SteuerfreierBetrag.MinimumWidth = 8 - Me.SteuerfreierBetrag.Name = "SteuerfreierBetrag" - Me.SteuerfreierBetrag.ReadOnly = True - Me.SteuerfreierBetrag.Width = 120 + Me.DataGridViewTextBoxColumn9.DefaultCellStyle = DataGridViewCellStyle10 + Me.DataGridViewTextBoxColumn9.HeaderText = "Steuerfrei" + Me.DataGridViewTextBoxColumn9.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn9.Name = "DataGridViewTextBoxColumn9" + Me.DataGridViewTextBoxColumn9.ReadOnly = True + Me.DataGridViewTextBoxColumn9.Width = 120 ' - 'Aufschubkonto + 'DataGridViewTextBoxColumn10 ' - Me.Aufschubkonto.HeaderText = "Aufschubkonto" - Me.Aufschubkonto.MinimumWidth = 8 - Me.Aufschubkonto.Name = "Aufschubkonto" - Me.Aufschubkonto.ReadOnly = True - Me.Aufschubkonto.Width = 120 + Me.DataGridViewTextBoxColumn10.HeaderText = "Aufschubkonto" + Me.DataGridViewTextBoxColumn10.MinimumWidth = 8 + Me.DataGridViewTextBoxColumn10.Name = "DataGridViewTextBoxColumn10" + Me.DataGridViewTextBoxColumn10.ReadOnly = True + Me.DataGridViewTextBoxColumn10.Width = 120 ' 'dgvOffertenSperrliste ' @@ -3476,17 +3493,6 @@ Partial Class usrCntlFaktAbrechnung Me.cboSteuerschlüssel.Size = New System.Drawing.Size(145, 21) Me.cboSteuerschlüssel.TabIndex = 3 ' - 'rtbAbf_Besonderheiten - ' - Me.rtbAbf_Besonderheiten.BackColor = System.Drawing.Color.White - Me.rtbAbf_Besonderheiten.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.rtbAbf_Besonderheiten.Location = New System.Drawing.Point(10, 19) - Me.rtbAbf_Besonderheiten.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.rtbAbf_Besonderheiten.Name = "rtbAbf_Besonderheiten" - Me.rtbAbf_Besonderheiten.Size = New System.Drawing.Size(107, 133) - Me.rtbAbf_Besonderheiten.TabIndex = 235 - Me.rtbAbf_Besonderheiten.Visible = False - ' 'cbxOriginalPrint ' Me.cbxOriginalPrint.AutoSize = True @@ -3926,9 +3932,9 @@ Partial Class usrCntlFaktAbrechnung ' 'ContextMenuStrip2 ' - Me.ContextMenuStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GutschriftAusRechnungToolStripMenuItem, Me.SeperateRechnungFürEUSTToolStripMenuItem}) + Me.ContextMenuStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.GutschriftAusRechnungToolStripMenuItem, Me.SeperateRechnungFürEUSTToolStripMenuItem, Me.EUStGutschriftAnVeragToolStripMenuItem}) Me.ContextMenuStrip2.Name = "ContextMenuStrip2" - Me.ContextMenuStrip2.Size = New System.Drawing.Size(224, 48) + Me.ContextMenuStrip2.Size = New System.Drawing.Size(224, 92) ' 'GutschriftAusRechnungToolStripMenuItem ' @@ -3942,6 +3948,128 @@ Partial Class usrCntlFaktAbrechnung Me.SeperateRechnungFürEUSTToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.SeperateRechnungFürEUSTToolStripMenuItem.Text = "Seperate Rechnung für EUST" ' + 'EUStGutschriftAnVeragToolStripMenuItem + ' + Me.EUStGutschriftAnVeragToolStripMenuItem.Name = "EUStGutschriftAnVeragToolStripMenuItem" + Me.EUStGutschriftAnVeragToolStripMenuItem.Size = New System.Drawing.Size(223, 22) + Me.EUStGutschriftAnVeragToolStripMenuItem.Text = "EUSt Gutschrift an Verag" + Me.EUStGutschriftAnVeragToolStripMenuItem.Visible = False + ' + 'optAnhSel + ' + Me.optAnhSel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None + Me.optAnhSel.FillWeight = 78.74017! + Me.optAnhSel.HeaderText = "" + Me.optAnhSel.MinimumWidth = 8 + Me.optAnhSel.Name = "optAnhSel" + Me.optAnhSel.ReadOnly = True + Me.optAnhSel.Resizable = System.Windows.Forms.DataGridViewTriState.[True] + Me.optAnhSel.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic + Me.optAnhSel.Width = 35 + ' + 'clmnBezeichnung + ' + Me.clmnBezeichnung.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill + DataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle22.Format = "c2" + Me.clmnBezeichnung.DefaultCellStyle = DataGridViewCellStyle22 + Me.clmnBezeichnung.FillWeight = 121.2598! + Me.clmnBezeichnung.HeaderText = "Bezeichnung" + Me.clmnBezeichnung.MinimumWidth = 8 + Me.clmnBezeichnung.Name = "clmnBezeichnung" + Me.clmnBezeichnung.ReadOnly = True + ' + 'clmnDsId + ' + Me.clmnDsId.HeaderText = "clmnDsId" + Me.clmnDsId.MinimumWidth = 8 + Me.clmnDsId.Name = "clmnDsId" + Me.clmnDsId.ReadOnly = True + Me.clmnDsId.Visible = False + Me.clmnDsId.Width = 150 + ' + 'clmnAnhId + ' + Me.clmnAnhId.HeaderText = "clmnAnhId" + Me.clmnAnhId.MinimumWidth = 8 + Me.clmnAnhId.Name = "clmnAnhId" + Me.clmnAnhId.ReadOnly = True + Me.clmnAnhId.Visible = False + Me.clmnAnhId.Width = 150 + ' + 'Leistung + ' + Me.Leistung.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill + Me.Leistung.HeaderText = "Leistung" + Me.Leistung.MinimumWidth = 8 + Me.Leistung.Name = "Leistung" + Me.Leistung.ReadOnly = True + ' + 'Anzahl + ' + DataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle23.Format = "N0" + DataGridViewCellStyle23.NullValue = Nothing + Me.Anzahl.DefaultCellStyle = DataGridViewCellStyle23 + Me.Anzahl.HeaderText = "Anzahl" + Me.Anzahl.MinimumWidth = 8 + Me.Anzahl.Name = "Anzahl" + Me.Anzahl.ReadOnly = True + Me.Anzahl.Width = 50 + ' + 'Preis + ' + DataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle24.Format = "c2" + Me.Preis.DefaultCellStyle = DataGridViewCellStyle24 + Me.Preis.HeaderText = "Preis" + Me.Preis.MinimumWidth = 8 + Me.Preis.Name = "Preis" + Me.Preis.ReadOnly = True + Me.Preis.Width = 80 + ' + 'SteuerpflichtigerBetrag + ' + DataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle25.Format = "c2" + Me.SteuerpflichtigerBetrag.DefaultCellStyle = DataGridViewCellStyle25 + Me.SteuerpflichtigerBetrag.HeaderText = "Steuerpfl." + Me.SteuerpflichtigerBetrag.MinimumWidth = 8 + Me.SteuerpflichtigerBetrag.Name = "SteuerpflichtigerBetrag" + Me.SteuerpflichtigerBetrag.ReadOnly = True + Me.SteuerpflichtigerBetrag.Width = 120 + ' + 'SteuerfreierBetrag + ' + DataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + DataGridViewCellStyle26.Format = "C2" + DataGridViewCellStyle26.NullValue = Nothing + Me.SteuerfreierBetrag.DefaultCellStyle = DataGridViewCellStyle26 + Me.SteuerfreierBetrag.HeaderText = "Steuerfrei" + Me.SteuerfreierBetrag.MinimumWidth = 8 + Me.SteuerfreierBetrag.Name = "SteuerfreierBetrag" + Me.SteuerfreierBetrag.ReadOnly = True + Me.SteuerfreierBetrag.Width = 120 + ' + 'Aufschubkonto + ' + Me.Aufschubkonto.HeaderText = "Aufschubkonto" + Me.Aufschubkonto.MinimumWidth = 8 + Me.Aufschubkonto.Name = "Aufschubkonto" + Me.Aufschubkonto.ReadOnly = True + Me.Aufschubkonto.Width = 120 + ' + 'rtbAbf_Besonderheiten + ' + Me.rtbAbf_Besonderheiten.BackColor = System.Drawing.Color.White + Me.rtbAbf_Besonderheiten.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.rtbAbf_Besonderheiten.Location = New System.Drawing.Point(10, 19) + Me.rtbAbf_Besonderheiten.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.rtbAbf_Besonderheiten.Name = "rtbAbf_Besonderheiten" + Me.rtbAbf_Besonderheiten.Size = New System.Drawing.Size(107, 133) + Me.rtbAbf_Besonderheiten.TabIndex = 235 + Me.rtbAbf_Besonderheiten.Visible = False + ' 'usrCntlFaktAbrechnung ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -4223,4 +4351,15 @@ Partial Class usrCntlFaktAbrechnung Friend WithEvents SeperateRechnungFürEUSTToolStripMenuItem As ToolStripMenuItem Friend WithEvents Label56 As Label Friend WithEvents txtRechnungAnZusatz As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents EUStGutschriftAnVeragToolStripMenuItem As ToolStripMenuItem + Friend WithEvents DataGridViewCheckBoxColumn1 As DataGridViewCheckBoxColumn + Friend WithEvents DataGridViewTextBoxColumn1 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn3 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn4 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn5 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn6 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn7 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn8 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn9 As DataGridViewTextBoxColumn + Friend WithEvents DataGridViewTextBoxColumn10 As DataGridViewTextBoxColumn End Class diff --git a/SDL/Fakturierung/usrCntlFaktAbrechnung.resx b/SDL/Fakturierung/usrCntlFaktAbrechnung.resx index e32eb792..94449424 100644 --- a/SDL/Fakturierung/usrCntlFaktAbrechnung.resx +++ b/SDL/Fakturierung/usrCntlFaktAbrechnung.resx @@ -117,39 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - @@ -190,6 +160,36 @@ 500, 15 + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + 45 diff --git a/SDL/Fakturierung/usrCntlFaktAbrechnung.vb b/SDL/Fakturierung/usrCntlFaktAbrechnung.vb index a90c254e..0da99112 100644 --- a/SDL/Fakturierung/usrCntlFaktAbrechnung.vb +++ b/SDL/Fakturierung/usrCntlFaktAbrechnung.vb @@ -1,4 +1,5 @@ Imports System.IO +Imports VERAG_PROG_ALLGEMEIN Public Class usrCntlFaktAbrechnung @@ -20,6 +21,7 @@ Public Class usrCntlFaktAbrechnung Dim vorherige_RK_ID = 0 Dim nachstehende_RK_ID = 0 + Dim veragKunde As Integer = -1 ' Public VALUE_CHANGED = True ' Eigenschaft, ob das Formular gespeichert ist oder verändert wurde @@ -58,6 +60,7 @@ Public Class usrCntlFaktAbrechnung Case "AMBAR" Firma = 24 cboFiliale.changeItem(5701) + Case "FRONT-OFFICE" Firma = 17 cboFiliale.changeItem(5801) @@ -239,6 +242,8 @@ Public Class usrCntlFaktAbrechnung 'txtEmpfaengerPLZ.Text = If(RECHNUNG., "") ' sbEmpfaengerLand.Text = If(RECHNUNG.EmpfängerLandKz, "") + + If RECHNUNG.VermittlerKundenNr IsNot Nothing AndAlso RECHNUNG.VermittlerKundenNr > 0 Then kdFirmaAuftraggeber.KdNr = RECHNUNG.VermittlerKundenNr kdFirmaAuftraggeber.Text = If(RECHNUNG.VermittlerName_1, "") @@ -248,6 +253,8 @@ Public Class usrCntlFaktAbrechnung kdFirmaAuftraggeber.Text = If(RECHNUNG.VermittlerName_1, "") txtAuftraggeberName2.Text = If(RECHNUNG.VermittlerName_2, "") End If + + txtAuftragggeberStrasse.Text = If(RECHNUNG.VermittlerStraße, "") txtAuftragggeberOrt.Text = If(RECHNUNG.VermittlerOrt, "") 'txtAuftragggeberPLZ.Text = If(RECHNUNG., "") @@ -298,7 +305,7 @@ Public Class usrCntlFaktAbrechnung End If txtText.Text = If(RECHNUNG.Text, "") - txtTextZZ.Text = If(RECHNUNG.Textzz, "") + txtTextZZ.Text = If(RECHNUNG.TextZZ, "") If RECHNUNG IsNot Nothing AndAlso RECHNUNG.ForceSteuerschlüssel IsNot Nothing Then cboSteuerschlüssel.changeItem(RECHNUNG.ForceSteuerschlüssel) @@ -349,6 +356,12 @@ Public Class usrCntlFaktAbrechnung setControlsEnabled(pnlAuftraggeber, pnlEnabled) setControlsEnabled(pnlAvisierer, pnlEnabled) + If RECHNUNG.Sachbearbeiter = "AUTO" AndAlso RECHNUNG.VermittlerKundenNr = "3013401" Then 'sperren, damit autom. generierte Email neu mit Offerte initialisiwert werden kann! + dgvOffertenSperrliste.Enabled = False + Else + dgvOffertenSperrliste.Enabled = True + End If + SAVED = True loaded = True @@ -493,6 +506,9 @@ Public Class usrCntlFaktAbrechnung tGespeichert.Interval = 2000 cboRgGS.SelectedIndex = 0 + + EUStGutschriftAnVeragToolStripMenuItem.Visible = False + cboFiliale.fillWithSQL("SELECT FilialenNr, Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", True, "FMZOLL", True) @@ -522,7 +538,6 @@ Public Class usrCntlFaktAbrechnung If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGIMEX", "SDL") Then FirmaTmp = "VERAGIMEX" End If - Select Case FirmaTmp Case "VERAG" If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGAG_DE", "SDL") Then @@ -538,7 +553,7 @@ Public Class usrCntlFaktAbrechnung Case "ATILLA" : whereFirma = " AND Firma_ID=7 " : pnlDocs.Visible = True Case "UNISPED" : whereFirma = " AND FIRMENGRUPPE IN ('UNISPED') " : firstEmpty = True : pnlDocs.Visible = True - Case "AMBAR" : whereFirma = " AND Firma_ID=24 " : pnlDocs.Visible = True + Case "AMBAR" : whereFirma = " AND Firma_ID=24 " : pnlDocs.Visible = True : EUStGutschriftAnVeragToolStripMenuItem.Visible = True Case "FRONT-OFFICE" : whereFirma = " AND Firma_ID=17 " : pnlDocs.Visible = True Case "VERAGIMEX" whereFirma = " AND FIRMENGRUPPE IN ('VERAG','IMEX','ATILLA','VERAGUNISPED','FRONTOFFICE') " @@ -590,7 +605,7 @@ Public Class usrCntlFaktAbrechnung FlatButton3.Image = IIf(kdFirmaRechnungAn.KdNr_value > 0, My.Resources.person1, My.Resources.personInaktiv) ' setOffertFromAbfArt() 'setzt dir OffertenNr in RECHNUNG, für die Auswahl wichtig! - initDGVOffertenSperrliste(kdFirmaRechnungAn.KdNr_value) + initDGVOffertenSperrliste(kdFirmaRechnungAn.KdNr_value, IIf(veragKunde = -1, False, True)) initWarnKd(kdFirmaRechnungAn, picWarnRgAn) cboRechnungSprache.changeItem("DE") @@ -1016,15 +1031,16 @@ Public Class usrCntlFaktAbrechnung - Sub initDGVOffertenSperrliste(kdNr As Integer) + Sub initDGVOffertenSperrliste(kdNr As Integer, Optional VeragGU As Boolean = False) With dgvOffertenSperrliste If Not IsNumeric(kdNr) OrElse kdNr < 0 Then .Columns.Clear() Exit Sub End If + Dim top = IIf(VeragGU, "top(1)", "") - .DataSource = SQL.loadDgvBySql("SELECT Offerten.OffertenNr, cast(Offerten.OffertenNr as varchar(3)) + ' - ' + Offertenstamm.OffertenBez as OffertenBez ,Offerten.Besonderheiten, Gesperrt, Gesperrt_Datum, Gesperrt_Grund FROM Offerten inner join Offertenstamm on [Offerten].OffertenNr=Offertenstamm.OffertenNr WHERE Offerten.KundenNr='" & kdNr & "' ORDER BY Offerten.OffertenNr ", "FMZOLL") + .DataSource = SQL.loadDgvBySql("SELECT " & top & "Offerten.OffertenNr, cast(Offerten.OffertenNr as varchar(3)) + ' - ' + Offertenstamm.OffertenBez as OffertenBez ,Offerten.Besonderheiten, Gesperrt, Gesperrt_Datum, Gesperrt_Grund FROM Offerten inner join Offertenstamm on [Offerten].OffertenNr=Offertenstamm.OffertenNr WHERE Offerten.KundenNr='" & kdNr & "' ORDER BY Offerten.OffertenNr ", "FMZOLL") If .ColumnCount = 0 Then Exit Sub .Columns("OffertenNr").Visible = False .Columns("Besonderheiten").Visible = False @@ -1904,6 +1920,7 @@ Public Class usrCntlFaktAbrechnung If kdFirmaAuftraggeber.KdData_ADRESSEN IsNot Nothing Then RECHNUNG.VermittlerLandKz = kdFirmaAuftraggeber.KdData_ADRESSEN.LandKz 'RECHNUNG.VermittlerOffertenNr = cProgramFunctions.isLeerNothing(absen.text) + End If RECHNUNG.Rechnung_an = cProgramFunctions.isLeerNothing(cboRechnungAn._value) '!!!! @@ -1987,7 +2004,7 @@ Public Class usrCntlFaktAbrechnung RECHNUNG.Erlös = RECHNUNG.Abfertigungskosten - RECHNUNG.Vorkosten ' RECHNUNG.Währungscode = cProgramFunctions.isLeerNothing(cboWaehrung._value) '???????? If Not cbxAdmin.Checked Then - RECHNUNG.Sachbearbeiter = cProgramFunctions.isLeerNothing(VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME) + RECHNUNG.Sachbearbeiter = IIf(veragKunde = "3013401", "AUTO", cProgramFunctions.isLeerNothing(VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME)) RECHNUNG.FakturierungsGruppe = VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_fakturierungsgruppe End If @@ -2019,17 +2036,25 @@ Public Class usrCntlFaktAbrechnung getValues_ANHAENGE() End Sub Sub getValues_ANHAENGE() - RECHNUNG.ANHAENGE.Clear() - For Each r As DataGridViewRow In dgvAnhaenge.Rows - If r.Cells("optAnhSel").Value Then - Dim ANH As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangAnhaenge - ANH.dsId = r.Cells("clmnDsId").Value - ANH.anhId = r.Cells("clmnAnhId").Value - ANH.Bezeichnung = r.Cells("clmnBezeichnung").Value - RECHNUNG.ANHAENGE.Add(ANH) - End If - Next + Try + If RECHNUNG.ANHAENGE.Count = 0 Then Exit Sub + RECHNUNG.ANHAENGE.Clear() + + For Each r As DataGridViewRow In dgvAnhaenge.Rows + + If r.Cells("optAnhSel") IsNot Nothing AndAlso r.Cells("optAnhSel").Value Then + Dim ANH As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangAnhaenge + ANH.dsId = r.Cells("clmnDsId").Value + ANH.anhId = r.Cells("clmnAnhId").Value + ANH.Bezeichnung = r.Cells("clmnBezeichnung").Value + RECHNUNG.ANHAENGE.Add(ANH) + End If + Next + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try End Sub Function Abfertigungskosten_Berechnen() As Double @@ -3390,7 +3415,7 @@ Nächste_Textzeile_lesen: f.selectedTAB = "Offerte" f.ShowDialog(Me) If vbYes = MsgBox("Sollen die Offerte/Preise neu geladen werden (Rg.-Positionen werden zurückgesetzt)?", vbYesNoCancel) Then - initDGVOffertenSperrliste(kdFirmaRechnungAn.KdNr_value) + initDGVOffertenSperrliste(kdFirmaRechnungAn.KdNr_value, IIf(veragKunde = -1, False, True)) End If End If End Sub @@ -3913,5 +3938,122 @@ Nächste_Textzeile_lesen: End If End Sub + Private Sub EUStGutschriftAnVeragToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EUStGutschriftAnVeragToolStripMenuItem.Click + + Dim abfrage = "Soll eine neue Gutschrift an die Verag AG für die Verzollung/EUST erstellt werden?" + Dim PosWithWEustOrVerz As Boolean = False + Dim selectedPOS As New List(Of VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen) + For Each POS In RECHNUNG.POSITIONEN.Where(Function(x) x.Anzahl > 0).ToList + Select Case POS.LeistungsNr + Case "20" : abfrage &= vbNewLine & POS.Anzahl & "x EUSt: " & CDbl(POS.Preis) : PosWithWEustOrVerz = True : selectedPOS.Add(POS) + Case "340" : abfrage &= vbNewLine & POS.Anzahl & "x Verzollung: " : PosWithWEustOrVerz = True : selectedPOS.Add(POS) + End Select + Next + + If Not PosWithWEustOrVerz Then Exit Sub + + If vbYes = MsgBox(abfrage, vbYesNoCancel) Then + veragKunde = 3013401 + saveMe() + Dim RECHNUNGOldID = RECHNUNG.RK_ID + + 'ALTE RECHNUNG-------------------------------------------------------------------------------------------- + 'If Not saveMe() Then Exit Sub 'alte Rechnung kopieren (in neuen DS speichern) + 'Dim REM_POS_TMP As New List(Of VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen) + Dim RECHNUNG_TMP = New VERAG_PROG_ALLGEMEIN.cRechnungsausgang(RECHNUNGOldID) + 'RECHNUNG_TMP.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME + 'For Each POS In RECHNUNG_TMP.POSITIONEN + ' REM_POS_TMP.Add(POS) + 'Next + + 'initDGVRechnungenPositionen() + 'RECHNUNG_TMP.SAVE_POSITIONEN(RECHNUNG_TMP.RK_ID) + 'saveMe() + '-------------------------------------------------------------------------------------------- + 'Gutschrift + + RECHNUNG.RK_ID = -1 + RECHNUNG.RechnungsNr = -1 + RECHNUNG.UnterNr = RECHNUNG.getMaxRGUnterNr() + RECHNUNG.RechnungsDatum = Nothing + RECHNUNG.DruckDatumZeit = Nothing + RECHNUNG.Status = 0 + RECHNUNG.Trdin = 0 + RECHNUNG.[BelegartenKz] = "AG" : RECHNUNG.[BelegartenNr] = 71 : RECHNUNG.Vorzeichen = "-" + RECHNUNG.OffertenNr = 1 + + cboRgGS.SelectedIndex = 1 + + dgvOfferteDetailsUebersicht.Columns.Clear() + + przBerechneRAPos("") + loadFormRGPosInOfferte() + initDGVRechnungenPositionen() + cboFiliale.Focus() + 'setze VERG ALS Vermittler/Kunde + Dim kundeVerag As New cKunde(veragKunde) + Dim kundeVeragAdr As New cAdressen(veragKunde) + Dim kundeVeragErw As New cKundenErweitert(veragKunde) + RECHNUNG.VermittlerKundenNr = veragKunde + kdFirmaAuftraggeber.KdNr_value = veragKunde + kdFirmaAuftraggeber.KdNr = veragKunde + kdFirmaAuftraggeber.KdData_KUNDE = kundeVerag + kdFirmaAuftraggeber.KdData_ADRESSEN = kundeVeragAdr + kdFirmaAuftraggeber.KdData_KUNDE_ERW = kundeVeragErw + + cboRechnungAn.changeItem("3") + RECHNUNG.Rechnung_an = cboRechnungAn._value + + cboFiliale.Focus() + saveMe() + + RECHNUNG.OffertenNr = 1 + + Dim REM_POS_GU As New List(Of VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen) + + For Each POS In RECHNUNG_TMP.POSITIONEN + POS.RK_ID = RECHNUNG.RK_ID + Select Case POS.LeistungsNr + Case "20" '->org. EUST direkt in POS + ''POS.Preis = POS.Preis * -1 + 'REM_POS_GU.Add(POS) + For Each r As DataGridViewRow In dgvOfferteDetailsUebersicht.Rows + If r.Cells("LeistungsNr").Value = POS.LeistungsNr And r.Cells("LeistungsBez").Value = POS.LeistungsBez Then + r.Cells("Anzahl").Value = If(POS.Anzahl, 0) + r.Cells("Preis").Value = If(POS.Preis, 0) + End If + Next + + + Case "340" 'Verzollung in dgvPOS + For Each r As DataGridViewRow In dgvOfferteDetailsUebersicht.Rows + If r.Cells("LeistungsNr").Value = POS.LeistungsNr And r.Cells("LeistungsBez").Value = POS.LeistungsBez Then + r.Cells("Anzahl").Value = If(POS.Anzahl, 0) + End If + Next + End Select + Next + + RECHNUNG.POSITIONEN.Clear() + przRefreshDGV_Positionen() + + + 'For Each POS_NEW In REM_POS_GU + ' RECHNUNG.POSITIONEN.Add(POS_NEW) + 'Next + + RECHNUNG.SAVE_POSITIONEN(RECHNUNG.RK_ID) + saveMe() + If Not loaded Then Exit Sub + + initRECHNUNG() + + RaiseEvent SOMETHING_CHANGED(RECHNUNG.RK_ID) + + End If + + veragKunde = -1 + + End Sub End Class \ No newline at end of file diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb b/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb index 203fa290..5746e60a 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb @@ -778,6 +778,10 @@ Public Class cRechnungsausgangPositionen Sub New() End Sub + Sub New(_RK_ID) + RK_ID = _RK_ID + End Sub + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb index 85de37c3..a7cd4d9a 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb @@ -433,7 +433,7 @@ Public Class frmMitarbeitersuche Dim dtZeiten As New DataTable If timas IsNot Nothing Then Dim isServiceRunning As Boolean = True - timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning) + timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning, "time") If Not isServiceRunning Then 'Abfrage konnte nicht durchgeführt werden. MsgBox("Abfragefehler am Timas-Server!") diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb index 017366a9..e578655b 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb @@ -347,6 +347,7 @@ Partial Class frmUeberstundenauszahlen 'Panel1 ' Me.Panel1.Controls.Add(Me.Label12) + Me.Panel1.Controls.Add(Me.LinkLabel1) Me.Panel1.Controls.Add(Me.txtBruttoSum) Me.Panel1.Controls.Add(Me.txtNettoSum) Me.Panel1.Controls.Add(Me.Label11) @@ -390,7 +391,7 @@ Partial Class frmUeberstundenauszahlen Me.Panel1.Controls.Add(Me.txtAusz50) Me.Panel1.Location = New System.Drawing.Point(6, 68) Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(619, 258) + Me.Panel1.Size = New System.Drawing.Size(619, 281) Me.Panel1.TabIndex = 30 ' 'Label12 @@ -652,7 +653,7 @@ Partial Class frmUeberstundenauszahlen 'LinkLabel1 ' Me.LinkLabel1.AutoSize = True - Me.LinkLabel1.Location = New System.Drawing.Point(464, 48) + Me.LinkLabel1.Location = New System.Drawing.Point(447, 258) Me.LinkLabel1.Name = "LinkLabel1" Me.LinkLabel1.Size = New System.Drawing.Size(161, 13) Me.LinkLabel1.TabIndex = 131 @@ -674,7 +675,6 @@ Partial Class frmUeberstundenauszahlen 'TabPage1 ' Me.TabPage1.Controls.Add(Me.cbxabwDatum) - Me.TabPage1.Controls.Add(Me.LinkLabel1) Me.TabPage1.Controls.Add(Me.dtpMonat) Me.TabPage1.Controls.Add(Me.PictureBox5) Me.TabPage1.Controls.Add(Me.lblMonat) diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb index 3bc5ae37..40f443ab 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb @@ -10,7 +10,7 @@ Public Class frmUeberstundenauszahlen Dim refresh As Boolean = False Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim MA As cMitarbeiter = Nothing - Dim timas As cTimasAPI = New cTimasAPI("timas") + Dim timas = New cTimasAPI("timas") Dim dt As New DataTable Dim customFields As New DataTable Dim timeaccountdt As New DataTable diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/TIMAS/cTimasAPI.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/TIMAS/cTimasAPI.vb index 0fc6baf4..2ea119b5 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/TIMAS/cTimasAPI.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/TIMAS/cTimasAPI.vb @@ -63,11 +63,11 @@ Public Class cTimasAPI End Function - Public Function getTimeSaldo(maid As Integer, ByRef info As String, kindofbalance As String, ByRef Optional isEndpointRunning As Boolean = True, Optional datetimeformat As String = "seconds") As Double + Public Function getTimeSaldo(maid As Integer, ByRef info As String, kindofbalance As String, ByRef Optional isEndpointRunning As Boolean = True, Optional datetimeformat As String = "seconds") As String Try Dim returnText As String = "" Dim failureText As String = "" - Dim timesaldo As Double = -1 + Dim timesaldo = "-1" If maid < 1 Then @@ -114,27 +114,29 @@ Public Class cTimasAPI Else Dim saldo = json.StringOf(kindofbalance) 'Tagessaldo (gestern) in Sekunden If saldo IsNot Nothing Then - Dim saldoAsDouble = CDbl(saldo) + Dim saldoAsDouble As Double Dim infoBuilder As New StringBuilder Select Case datetimeformat Case "seconds" + saldoAsDouble = CDbl(saldo) saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2) infoBuilder.Append(saldoAsDouble) infoBuilder.Append(" h") info = infoBuilder.ToString() - timesaldo = saldoAsDouble + timesaldo = saldoAsDouble.ToString Case "minutes" - saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2) + saldoAsDouble = CDbl(saldo) + saldoAsDouble = Math.Round(saldoAsDouble / 60, 2) infoBuilder.Append(saldoAsDouble) infoBuilder.Append(" min") info = infoBuilder.ToString() - timesaldo = saldoAsDouble + timesaldo = saldoAsDouble.ToString Case "time" - infoBuilder.Append(saldoAsDouble) - infoBuilder.Append(" Zeit") + infoBuilder.Append(saldo) + infoBuilder.Append(" h") info = infoBuilder.ToString() - timesaldo = saldoAsDouble + timesaldo = saldo End Select