This commit is contained in:
2024-05-14 10:53:28 +02:00
6 changed files with 231 additions and 97 deletions

View File

@@ -78,6 +78,11 @@ Partial Class frmBerechtigungsObjekte
Me.Button5 = New System.Windows.Forms.Button()
Me.txtSuche = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.Label21 = New System.Windows.Forms.Label()
Me.MyTextBox7 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label22 = New System.Windows.Forms.Label()
Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button7 = New System.Windows.Forms.Button()
Me.pnl.SuspendLayout()
CType(Me.gdvGruppen, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvGruppenBenutzer, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -158,7 +163,7 @@ Partial Class frmBerechtigungsObjekte
'Button2
'
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Location = New System.Drawing.Point(770, 415)
Me.Button2.Location = New System.Drawing.Point(770, 453)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(34, 23)
Me.Button2.TabIndex = 11
@@ -169,7 +174,7 @@ Partial Class frmBerechtigungsObjekte
'
Me.Label5.AutoSize = True
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(560, 401)
Me.Label5.Location = New System.Drawing.Point(560, 439)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(123, 13)
Me.Label5.TabIndex = 13
@@ -187,7 +192,7 @@ Partial Class frmBerechtigungsObjekte
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(725, 401)
Me.Label7.Location = New System.Drawing.Point(725, 439)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(35, 13)
Me.Label7.TabIndex = 18
@@ -449,7 +454,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyTextBox3._Waehrung = False
Me.MyTextBox3._WaehrungZeichen = True
Me.MyTextBox3.ForeColor = System.Drawing.Color.Black
Me.MyTextBox3.Location = New System.Drawing.Point(728, 417)
Me.MyTextBox3.Location = New System.Drawing.Point(728, 455)
Me.MyTextBox3.MaxLineLength = -1
Me.MyTextBox3.MaxLines_Warning = ""
Me.MyTextBox3.MaxLines_Warning_Label = Nothing
@@ -555,7 +560,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyComboBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.MyComboBox3.FormattingEnabled = True
Me.MyComboBox3.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.MyComboBox3.Location = New System.Drawing.Point(563, 417)
Me.MyComboBox3.Location = New System.Drawing.Point(563, 455)
Me.MyComboBox3.Name = "MyComboBox3"
Me.MyComboBox3.Size = New System.Drawing.Size(159, 21)
Me.MyComboBox3.TabIndex = 12
@@ -593,7 +598,7 @@ Partial Class frmBerechtigungsObjekte
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.Location = New System.Drawing.Point(725, 321)
Me.Label17.Location = New System.Drawing.Point(725, 359)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(35, 13)
Me.Label17.TabIndex = 36
@@ -614,7 +619,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyTextBox5._Waehrung = False
Me.MyTextBox5._WaehrungZeichen = True
Me.MyTextBox5.ForeColor = System.Drawing.Color.Black
Me.MyTextBox5.Location = New System.Drawing.Point(728, 337)
Me.MyTextBox5.Location = New System.Drawing.Point(728, 375)
Me.MyTextBox5.MaxLineLength = -1
Me.MyTextBox5.MaxLines_Warning = ""
Me.MyTextBox5.MaxLines_Warning_Label = Nothing
@@ -627,7 +632,7 @@ Partial Class frmBerechtigungsObjekte
'
Me.Label18.AutoSize = True
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label18.Location = New System.Drawing.Point(560, 321)
Me.Label18.Location = New System.Drawing.Point(560, 359)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(153, 13)
Me.Label18.TabIndex = 34
@@ -643,7 +648,7 @@ Partial Class frmBerechtigungsObjekte
Me.cboNiederlassung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboNiederlassung.FormattingEnabled = True
Me.cboNiederlassung.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.cboNiederlassung.Location = New System.Drawing.Point(563, 337)
Me.cboNiederlassung.Location = New System.Drawing.Point(563, 375)
Me.cboNiederlassung.Name = "cboNiederlassung"
Me.cboNiederlassung.Size = New System.Drawing.Size(159, 21)
Me.cboNiederlassung.TabIndex = 33
@@ -651,7 +656,7 @@ Partial Class frmBerechtigungsObjekte
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button4.Location = New System.Drawing.Point(770, 335)
Me.Button4.Location = New System.Drawing.Point(770, 373)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(34, 23)
Me.Button4.TabIndex = 32
@@ -661,7 +666,7 @@ Partial Class frmBerechtigungsObjekte
'Label19
'
Me.Label19.AutoSize = True
Me.Label19.Location = New System.Drawing.Point(725, 361)
Me.Label19.Location = New System.Drawing.Point(725, 399)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(35, 13)
Me.Label19.TabIndex = 41
@@ -682,7 +687,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyTextBox6._Waehrung = False
Me.MyTextBox6._WaehrungZeichen = True
Me.MyTextBox6.ForeColor = System.Drawing.Color.Black
Me.MyTextBox6.Location = New System.Drawing.Point(728, 377)
Me.MyTextBox6.Location = New System.Drawing.Point(728, 415)
Me.MyTextBox6.MaxLineLength = -1
Me.MyTextBox6.MaxLines_Warning = ""
Me.MyTextBox6.MaxLines_Warning_Label = Nothing
@@ -695,7 +700,7 @@ Partial Class frmBerechtigungsObjekte
'
Me.Label20.AutoSize = True
Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label20.Location = New System.Drawing.Point(560, 361)
Me.Label20.Location = New System.Drawing.Point(560, 399)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(126, 13)
Me.Label20.TabIndex = 39
@@ -711,7 +716,7 @@ Partial Class frmBerechtigungsObjekte
Me.cboAbteilung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboAbteilung.FormattingEnabled = True
Me.cboAbteilung.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.cboAbteilung.Location = New System.Drawing.Point(563, 377)
Me.cboAbteilung.Location = New System.Drawing.Point(563, 415)
Me.cboAbteilung.Name = "cboAbteilung"
Me.cboAbteilung.Size = New System.Drawing.Size(159, 21)
Me.cboAbteilung.TabIndex = 38
@@ -719,7 +724,7 @@ Partial Class frmBerechtigungsObjekte
'Button5
'
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Location = New System.Drawing.Point(770, 375)
Me.Button5.Location = New System.Drawing.Point(770, 413)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(34, 23)
Me.Button5.TabIndex = 37
@@ -759,12 +764,85 @@ Partial Class frmBerechtigungsObjekte
Me.PictureBox1.TabIndex = 43
Me.PictureBox1.TabStop = False
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.Location = New System.Drawing.Point(725, 317)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(35, 13)
Me.Label21.TabIndex = 48
Me.Label21.Text = "Stufe:"
'
'MyTextBox7
'
Me.MyTextBox7._DateTimeOnly = False
Me.MyTextBox7._numbersOnly = False
Me.MyTextBox7._numbersOnlyKommastellen = ""
Me.MyTextBox7._numbersOnlyTrennzeichen = True
Me.MyTextBox7._Prozent = False
Me.MyTextBox7._ShortDateNew = False
Me.MyTextBox7._ShortDateOnly = False
Me.MyTextBox7._TimeOnly = False
Me.MyTextBox7._TimeOnly_Seconds = False
Me.MyTextBox7._value = "0"
Me.MyTextBox7._Waehrung = False
Me.MyTextBox7._WaehrungZeichen = True
Me.MyTextBox7.ForeColor = System.Drawing.Color.Black
Me.MyTextBox7.Location = New System.Drawing.Point(728, 333)
Me.MyTextBox7.MaxLineLength = -1
Me.MyTextBox7.MaxLines_Warning = ""
Me.MyTextBox7.MaxLines_Warning_Label = Nothing
Me.MyTextBox7.Name = "MyTextBox7"
Me.MyTextBox7.Size = New System.Drawing.Size(36, 20)
Me.MyTextBox7.TabIndex = 47
Me.MyTextBox7.Text = "0"
'
'Label22
'
Me.Label22.AutoSize = True
Me.Label22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label22.Location = New System.Drawing.Point(560, 317)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(103, 13)
Me.Label22.TabIndex = 46
Me.Label22.Text = "Firma hinzufügen"
'
'cboFirma
'
Me.cboFirma._allowedValuesFreiText = Nothing
Me.cboFirma._allowFreiText = False
Me.cboFirma._value = ""
Me.cboFirma.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cboFirma.DropDownWidth = 300
Me.cboFirma.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboFirma.FormattingEnabled = True
Me.cboFirma.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.cboFirma.Location = New System.Drawing.Point(563, 333)
Me.cboFirma.Name = "cboFirma"
Me.cboFirma.Size = New System.Drawing.Size(159, 21)
Me.cboFirma.TabIndex = 45
'
'Button7
'
Me.Button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button7.Location = New System.Drawing.Point(770, 331)
Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(34, 23)
Me.Button7.TabIndex = 44
Me.Button7.Text = "OK"
Me.Button7.UseVisualStyleBackColor = True
'
'frmBerechtigungsObjekte
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(836, 658)
Me.Controls.Add(Me.Label21)
Me.Controls.Add(Me.MyTextBox7)
Me.Controls.Add(Me.Label22)
Me.Controls.Add(Me.cboFirma)
Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.txtSuche)
Me.Controls.Add(Me.Label19)
@@ -872,4 +950,9 @@ Partial Class frmBerechtigungsObjekte
Friend WithEvents Button6 As Button
Friend WithEvents txtSuche As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents Label21 As Label
Friend WithEvents MyTextBox7 As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label22 As Label
Friend WithEvents cboFirma As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents Button7 As Button
End Class

View File

@@ -60,6 +60,16 @@
cboFirma.Items.Clear()
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ATILLA", "ATILLA"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED", "UNISPED"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AMBAR", "AMBAR"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FRONTOFFICE", "FRONTOFFICE"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERIMEX", "VERIMEX"))
cboAbteilung.Items.Clear()
cboAbteilung.fillWithSQL("SELECT [abt_id],[abt_bezeichnung] FROM tblAbteilungen", False, "ADMIN", True)
cboNiederlassung.Items.Clear()
@@ -285,5 +295,21 @@
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
If dgvObjekte.SelectedRows.Count = 0 Then Exit Sub
'Gruppe zuordnen
If cboFirma._value = String.Empty Then Exit Sub
If Not IsNumeric(MyTextBox6.Text) Then Exit Sub
Dim BOZ As New VERAG_PROG_ALLGEMEIN.cBerechtigungsObjekteZuordnung
BOZ.beroz_beroId = dgvObjekte.SelectedRows(0).Cells("id").Value
BOZ.beroz_bergrId = cboFirma._value
BOZ.beroz_art = "F"
BOZ.beroz_berechtigungsstufe = MyTextBox6.Text
BOZ.INSERT()
BerechtigungsObjekte.LOAD_LIST()
loadGruppen()
cboFirma.SelectedIndex = 0
MyTextBox6.Text = "0"
End Sub
End Class

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.4.8")>
<Assembly: AssemblyFileVersion("1.0.4.8")>
<Assembly: AssemblyVersion("1.0.4.9")>
<Assembly: AssemblyFileVersion("1.0.4.9")>

View File

@@ -215,7 +215,7 @@ Public Class cBrgDb
Dim sql As String = "SELECT [brgak_id] as Id,[brgak_datum] as Datum,[brgak_betrag] as Betrag,[brgak_filename] as Dateiname,[brgak_atc] as ATC " &
" FROM tblBrgAufschub WHERE brgak_brgaktoId = '" & brgKto & "' " & faelligkeitWHERE & where
' MsgBox(sql)
While True 'Endlosschleife; wird verlassen durch Return oder Application.Exit()
Try
Dim myTable = New DataTable()

View File

@@ -795,9 +795,10 @@ Public Class frmMain
Dim von As Date = DateSerial(Now.Year, Now.Month, 1)
Dim vonbrg As Date = von
Dim vonFaell As Date = von
Dim vonFaell_1 As Date = von
If Now.Day <= 15 Then vonbrg = von.AddMonths(-1)
If Now.Day > 16 Then vonFaell = von.AddMonths(1)
If Now.Day <= 15 Then vonFaell_1 = von '.AddMonths(-1) ': vonFaell_1 = von
If Now.Day > 16 Then vonFaell_1 = von ': vonFaell_1 = von.AddMonths(-1)
lblAufschub.ForeColor = Color.Gray
lblBRG.ForeColor = Color.Gray
@@ -817,18 +818,20 @@ Public Class frmMain
If ART = "ZOLL" Or ART = "EUST" Then
Dim betragBrg_16 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
Dim betragBrg_16_1 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.AddMonths(1).ToString(".MM.yyyy")))
Dim betragBrg_26 As Double = 0
If Now.Day <= 26 Then betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.ToString(".MM.yyyy"))) '9
betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy"))) '9
betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy"))) '10
betrag = CDbl(betragBrg_16) + CDbl(betragBrg_26)
If Now.Day <= 26 Then betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & vonFaell_1.ToString(".MM.yyyy"))) '9
betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & vonFaell_1.AddMonths(1).ToString(".MM.yyyy"))) '9
betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & vonFaell_1.AddMonths(2).ToString(".MM.yyyy"))) '10
betrag = CDbl(betragBrg_16) + CDbl(betragBrg_16_1) + CDbl(betragBrg_26)
Dim betragBrg_oE_16 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
Dim betragBrg_oE_16_1 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("16" & vonFaell.AddMonths(1).ToString(".MM.yyyy")))
Dim betragBrg_oE_26 As Double = 0
If Now.Day <= 26 Then betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.ToString(".MM.yyyy"))) '9
betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy"))) '9
betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy"))) '10
betrag_oE = CDbl(betragBrg_oE_16) + CDbl(betragBrg_oE_26)
If Now.Day <= 26 Then betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & vonFaell_1.ToString(".MM.yyyy"))) '9
betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & vonFaell_1.AddMonths(1).ToString(".MM.yyyy"))) '9
betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & vonFaell_1.AddMonths(2).ToString(".MM.yyyy"))) '10
betrag_oE = CDbl(betragBrg_oE_16) + CDbl(betragBrg_oE_16_1) + CDbl(betragBrg_oE_26)
'ElseIf ART = "EUST" Then
' Dim betragBrg_16 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
@@ -879,24 +882,34 @@ Public Class frmMain
Dim von As Date = DateSerial(Now.Year, Now.Month, 1)
Dim vonbrg As Date = von
' Dim vonFaell As Date = von
'If Now.Day <= 15 Then vonbrg = von.AddMonths(-1)
'If Now.Day > 16 Then vonFaell = von.AddMonths(1)
Dim vonFaell As Date = von
Dim vonFaell_1 As Date = von
If Now.Day <= 15 Then vonFaell_1 = von '.AddMonths(-1) ': vonFaell_1 = von
If Now.Day > 16 Then vonFaell_1 = von ': vonFaell_1 = von.AddMonths(-1)
If Now.Day <= 15 Then vonbrg = von.AddMonths(-1)
If Now.Day > 16 Then vonFaell = von.AddMonths(1)
Dim cAufschubKonten As New VERAG_PROG_ALLGEMEIN.cAufschubKonten(BRG_ID)
Try
Dim dt As DataTable
If ART = "ZOLL" Or ART = "EUST" Then
Dim dt_betragBrg_16 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
Dim dt_betragBrg_16_1 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.AddMonths(1).ToString(".MM.yyyy")))
Dim dt_betragBrg_26 As New DataTable
If Now.Day <= 26 Then dt_betragBrg_26 = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.ToString(".MM.yyyy"))) '9
Dim dt_betragBrg_26_2 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy"))) '9
Dim dt_betragBrg_26_3 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy"))) '10
If Now.Day <= 26 Then dt_betragBrg_26 = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & vonFaell_1.ToString(".MM.yyyy"))) '9
Dim dt_betragBrg_26_2 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & vonFaell_1.AddMonths(1).ToString(".MM.yyyy"))) '9
Dim dt_betragBrg_26_3 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & vonFaell_1.AddMonths(2).ToString(".MM.yyyy"))) '10
dt = dt_betragBrg_16
If dt_betragBrg_16_1 IsNot Nothing Then dt.Merge(dt_betragBrg_16_1)
If dt_betragBrg_26 IsNot Nothing Then dt.Merge(dt_betragBrg_26)
If dt_betragBrg_26_2 IsNot Nothing Then dt.Merge(dt_betragBrg_26_2)
If dt_betragBrg_26_3 IsNot Nothing Then dt.Merge(dt_betragBrg_26_3)
@@ -1133,7 +1146,7 @@ Public Class frmMain
' lblBrg_de_VeragAG.Text &= " (" & String.Format("{0:C}", cMonitoringBrg.brgusrset_gvvDe_summe) & ")"
If cbxBrg_de2_VeragAG.Checked Then lblBrg_de2_VeragAG.Text &= " (" & String.Format("{0:C}", cMonitoringBrg.brgusrset_gvvDe2_summe) & ")"
lblBrg_at_Imex.Text &= " (" & String.Format("{0:C}", cMonitoringBrg.brgusrset_gvvAt_imex_de_summe) & ")"
lblBrg_at_atilla.Text &= " (" & String.Format("{0:C}", cMonitoringBrg.brgusrset_gvvAt_ATILLA_de_summe) & ")"
lblBrg_at_Atilla.Text &= " (" & String.Format("{0:C}", cMonitoringBrg.brgusrset_gvvAt_ATILLA_de_summe) & ")"
lblAufschub_de_VeragAG.Text &= " (" & String.Format("{0:C}", cMonitoringBrg.brgusrset_aufschub_AG_de_summe) & ")"
@@ -1221,7 +1234,7 @@ Public Class frmMain
End Sub
Private Sub EinstellungenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EinstellungenToolStripMenuItem.Click
hideMe()
hideme()
frmSettings.Show()
frmSettings.BringToFront()
@@ -1313,22 +1326,25 @@ Public Class frmMain
If cbxAufschub_de_VeragAG.Checked Then
Dim brg_DE_VeragAG As String = "1"
Dim von As Date = DateSerial(Now.Year, Now.Month, 1)
Dim vonbrg As Date = von
Dim vonFaell As Date = von
If Now.Day <= 15 Then vonbrg = von.AddMonths(-1)
If Now.Day > 16 Then vonFaell = von.AddMonths(1)
frmShowData.Show()
Dim von As Date = DateSerial(Now.Year, Now.Month, 1)
Dim vonbrg As Date = von
Dim vonFaell As Date = von
Dim vonFaell_1 As Date = von
Dim faelligkeitWhere = " AND brgak_faelligkeitsdatum IN ("
faelligkeitWhere &= "'" & CDate("16" & vonFaell.ToString(".MM.yyyy")).ToShortDateString & "'"
If Now.Day <= 15 Then vonFaell_1 = von '.AddMonths(-1) ': vonFaell_1 = von
If Now.Day > 16 Then vonFaell_1 = von ': vonFaell_1 = von.AddMonths(-1)
frmShowData.Show()
If Now.Day <= 26 Then faelligkeitWhere &= ",'" & CDate("26" & Now.ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ") "
Dim faelligkeitWhere = " AND brgak_faelligkeitsdatum IN ("
faelligkeitWhere &= "'" & CDate("16" & vonFaell.ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("16" & vonFaell.AddMonths(1).ToString(".MM.yyyy")).ToShortDateString & "'"
frmShowData.dgv.DataSource = BRG.loadDgvBySqlFromAufschubKto_Faelligkeit(faelligkeitWhere, brg_DE_VeragAG)
If Now.Day <= 26 Then faelligkeitWhere &= ",'" & CDate("26" & vonFaell_1.ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & vonFaell_1.AddMonths(1).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & vonFaell_1.AddMonths(2).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ") "
frmShowData.dgv.DataSource = BRG.loadDgvBySqlFromAufschubKto_Faelligkeit(faelligkeitWhere, brg_DE_VeragAG)
' frmShowData.dgv.DataSource = BRG.loadDgvBySqlFromAufschubKto(vonbrg.ToShortDateString, Now.ToShortDateString, brg_DE_VeragAG)
frmShowData.Label2.Text = "Anzahl: " & frmShowData.dgv.RowCount
@@ -1352,7 +1368,7 @@ Public Class frmMain
If cbxBrg_at_VeragAG.Checked Then
Dim brg_AT As String = "05AT510000G000FP7"
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddMonths(-3), Now)
frmShowData.Show()
frmShowData.Show()
End If
' frmShowDataDouble.dgv1.DataSource = BRG.loadDgvBySqlFromBrgKtoAtlas(Now.AddMonths(-3).ToShortDateString, Now.ToShortDateString, "50", "50", brg_AT)
@@ -1364,8 +1380,8 @@ Public Class frmMain
If cbxBrg_at_Imex.Checked Then
Dim brg_AT As String = "16AT520000G000VA6"
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddMonths(-3), Now)
frmShowData.Show()
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddMonths(-3), Now)
frmShowData.Show()
End If
' frmShowDataDouble.dgv1.DataSource = BRG.loadDgvBySqlFromBrgKtoAtlas(Now.AddMonths(-3).ToShortDateString, Now.ToShortDateString, "50", "50", brg_AT)
@@ -1377,8 +1393,8 @@ Public Class frmMain
If cbxBrg_at_VeragAG.Checked Then
Dim brg_AT As String = "05AT510000G000FP7"
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddDays(-6), Now)
frmShowData.Show()
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddDays(-6), Now)
frmShowData.Show()
End If
' frmShowDataDouble.Show()
@@ -1390,8 +1406,8 @@ Public Class frmMain
If cbxBrg_at_Imex.Checked Then
Dim brg_AT As String = "16AT520000G000VA6"
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddDays(-6), Now)
frmShowData.Show()
Dim frmShowData = New frmShowData("BRG", brg_AT, Now.AddDays(-6), Now)
frmShowData.Show()
End If
@@ -1497,23 +1513,25 @@ Public Class frmMain
If cbxAufschub_de_Imex.Checked Then
Dim brg_DE_Imex As String = "8"
Dim von As Date = DateSerial(Now.Year, Now.Month, 1)
Dim vonbrg As Date = von
Dim vonFaell As Date = von
If Now.Day <= 15 Then vonbrg = von.AddMonths(-1)
If Now.Day > 16 Then vonFaell = von.AddMonths(1)
frmShowData.Show()
' frmShowData.dgv.DataSource = BRG.loadDgvBySqlFromAufschubKto(vonbrg.ToShortDateString, Now.ToShortDateString, brg_DE_Imex)
Dim von As Date = DateSerial(Now.Year, Now.Month, 1)
Dim vonbrg As Date = von
Dim vonFaell As Date = von
Dim vonFaell_1 As Date = von
Dim faelligkeitWhere = " AND brgak_faelligkeitsdatum IN ("
faelligkeitWhere &= "'" & CDate("16" & vonFaell.ToString(".MM.yyyy")).ToShortDateString & "'"
If Now.Day <= 15 Then vonFaell_1 = von '.AddMonths(-1) ': vonFaell_1 = von
If Now.Day > 16 Then vonFaell_1 = von ': vonFaell_1 = von.AddMonths(-1)
frmShowData.Show()
If Now.Day <= 26 Then faelligkeitWhere &= ",'" & CDate("26" & Now.ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ") "
Dim faelligkeitWhere = " AND brgak_faelligkeitsdatum IN ("
faelligkeitWhere &= "'" & CDate("16" & vonFaell.ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("16" & vonFaell.AddMonths(1).ToString(".MM.yyyy")).ToShortDateString & "'"
frmShowData.dgv.DataSource = BRG.loadDgvBySqlFromAufschubKto_Faelligkeit(faelligkeitWhere, brg_DE_Imex)
If Now.Day <= 26 Then faelligkeitWhere &= ",'" & CDate("26" & vonFaell_1.ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & vonFaell_1.AddMonths(1).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ",'" & CDate("26" & vonFaell_1.AddMonths(2).ToString(".MM.yyyy")).ToShortDateString & "'"
faelligkeitWhere &= ") "
frmShowData.dgv.DataSource = BRG.loadDgvBySqlFromAufschubKto_Faelligkeit(faelligkeitWhere, brg_DE_Imex)
frmShowData.Label2.Text = "Anzahl: " & frmShowData.dgv.RowCount
End If

View File

@@ -705,11 +705,11 @@ Public Class frmStartOptions
Dim SND As New VERAG_PROG_ALLGEMEIN.cSendungen(dy_SendungsId)
Dim list As New List(Of Integer)
sendMailZollbeleg(pfad, SND.tblSnd_EmpfaengerKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("EMPFAENGER"))
sendMailZollbeleg(pfad, SND.tblSnd_AbsenderKdNr, art, list, BezugsNr, SND, "")
sendMailZollbeleg(pfad, SND.tblSnd_FrachtfuehrerKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("FRAECHTER"))
sendMailZollbeleg(pfad, SND.tblSnd_AvisiererKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("AVISIERER"))
sendMailZollbeleg(pfad, SND.tblSnd_AuftraggeberKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("AUFTRAGGEBER"))
sendMailZollbeleg(pfad, SND.tblSnd_EmpfaengerKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("EMPFAENGER"), "EMPFAENGER")
sendMailZollbeleg(pfad, SND.tblSnd_AbsenderKdNr, art, list, BezugsNr, SND, "", "ABSENDER")
sendMailZollbeleg(pfad, SND.tblSnd_FrachtfuehrerKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("FRAECHTER"), "FRAECHTER")
sendMailZollbeleg(pfad, SND.tblSnd_AvisiererKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("AVISIERER"), "AVISIERER")
sendMailZollbeleg(pfad, SND.tblSnd_AuftraggeberKdNr, art, list, BezugsNr, SND, SND.getKdAtrNr("AUFTRAGGEBER"), "AUFTRAGGEBER")
sendMailZollbelegGESTELLUNGSADRESSE(pfad, SND.NCTS_ngaId, art, list, BezugsNr, SND)
End If
@@ -758,7 +758,7 @@ Public Class frmStartOptions
End If
Return ""
End Function
Sub sendMailZollbeleg(pfad As String, KundenNr As Integer, art As String, ByRef list As List(Of Integer), BezugsNr As String, SND As VERAG_PROG_ALLGEMEIN.cSendungen, KdAtrNr As Object)
Sub sendMailZollbeleg(pfad As String, KundenNr As Integer, art As String, ByRef list As List(Of Integer), BezugsNr As String, SND As VERAG_PROG_ALLGEMEIN.cSendungen, KdAtrNr As Object, artKunde As String)
Try
If KundenNr > 0 Then
If Not list.Exists(Function(x) x = KundenNr) Then 'nicht bereits verarbeitet
@@ -911,18 +911,25 @@ Public Class frmStartOptions
betreff = betreff.Replace(vbNewLine, "").Replace(vbCr, "").Replace(vbLf, "").Replace(vbCrLf, "").Replace(System.Environment.NewLine, " ")
Select Case art
Case "STB"
If KD_ERW.EmailFreigabe_SteuerbescheidPDF Then
Select Case artKunde
Case "FRÄCHTER", "AVISIERER" 'Die bekommen keine Steuerbescheide..
Case Else
betreff = betreff.Replace("%Zollbeleg%", "Abgabenbescheid " & BezugsNr)
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(EMails, betreff, body, getAbsenderEmail(FirmaTmp), False, False, EMails_CC, EMails_BCC, pfadList) Then
API.UPDTAE_OK()
insertSendungsVermerk(SND.tblSnd_SendungID, SND.tblSnd_AvisoID, "Zollbeleg '" & art & "' gesendet an: " & EMails, 46)
Else
API.UPDTAE_ERR()
End If
End If
If KD_ERW.EmailFreigabe_SteuerbescheidPDF Then
betreff = betreff.Replace("%Zollbeleg%", "Abgabenbescheid " & BezugsNr)
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(EMails, betreff, body, getAbsenderEmail(FirmaTmp), False, False, EMails_CC, EMails_BCC, pfadList) Then
API.UPDTAE_OK()
insertSendungsVermerk(SND.tblSnd_SendungID, SND.tblSnd_AvisoID, "Zollbeleg '" & art & "' gesendet an: " & EMails, 46)
Else
API.UPDTAE_ERR()
End If
End If
End Select
Case "VBD"
If (KD_ERW.EmailFreigabe_Export And KD_ERW.EmailFreigabe_Export_Art = "BLG") Or KD_ERW.EmailFreigabe_VBDPDF Then
betreff = betreff.Replace("%Zollbeleg%", "Versandbegleitdokument " & BezugsNr)
@@ -952,18 +959,18 @@ Public Class frmStartOptions
Else
API.UPDTAE_ERR()
End If
End If
Case "AVM"
If KD_ERW.EmailFreigabe_Export Or KD_ERW.Email_AVM Then
betreff = betreff.Replace("%Zollbeleg%", "Ausgangsvermerk " & BezugsNr)
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(EMails, betreff, body, getAbsenderEmail(FirmaTmp), False, False, EMails_CC, EMails_BCC, pfadList) Then
API.UPDTAE_OK()
insertSendungsVermerk(SND.tblSnd_SendungID, SND.tblSnd_AvisoID, "Zollbeleg '" & art & "' gesendet an: " & EMails, 46)
Else
API.UPDTAE_ERR()
End If
End If
End Select
Case "AVM"
If KD_ERW.EmailFreigabe_Export Or KD_ERW.Email_AVM Then
betreff = betreff.Replace("%Zollbeleg%", "Ausgangsvermerk " & BezugsNr)
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(EMails, betreff, body, getAbsenderEmail(FirmaTmp), False, False, EMails_CC, EMails_BCC, pfadList) Then
API.UPDTAE_OK()
insertSendungsVermerk(SND.tblSnd_SendungID, SND.tblSnd_AvisoID, "Zollbeleg '" & art & "' gesendet an: " & EMails, 46)
Else
API.UPDTAE_ERR()
End If
End If
End Select
End If
End If