Merge branch 'newMaster2024' of https://dev.azure.com/VeragAG/_git/SDL into newMaster2024

This commit is contained in:
2025-04-04 14:03:23 +02:00
6 changed files with 211 additions and 97 deletions

View File

@@ -27,6 +27,7 @@ Partial Class frmMDM_USTVAntrag
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag))
Me.pnlBottom = New System.Windows.Forms.Panel()
Me.picExcel = New System.Windows.Forms.PictureBox()
Me.Button4 = New System.Windows.Forms.Button()
Me.picPDF = New System.Windows.Forms.PictureBox()
Me.btnMail = New System.Windows.Forms.Button()
@@ -113,8 +114,10 @@ Partial Class frmMDM_USTVAntrag
Me.Button3 = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.picExcel = New System.Windows.Forms.PictureBox()
Me.txtSumme = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label27 = New System.Windows.Forms.Label()
Me.pnlBottom.SuspendLayout()
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlHeader.SuspendLayout()
Me.Panel9.SuspendLayout()
@@ -134,13 +137,14 @@ Partial Class frmMDM_USTVAntrag
CType(Me.dgvErstattungspositionen, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlErstattungsdetails.SuspendLayout()
Me.Panel1.SuspendLayout()
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'pnlBottom
'
Me.pnlBottom.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.pnlBottom.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnlBottom.Controls.Add(Me.txtSumme)
Me.pnlBottom.Controls.Add(Me.Label27)
Me.pnlBottom.Controls.Add(Me.picExcel)
Me.pnlBottom.Controls.Add(Me.Button4)
Me.pnlBottom.Controls.Add(Me.picPDF)
@@ -155,6 +159,16 @@ Partial Class frmMDM_USTVAntrag
Me.pnlBottom.Size = New System.Drawing.Size(1454, 100)
Me.pnlBottom.TabIndex = 3
'
'picExcel
'
Me.picExcel.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.picExcel.Location = New System.Drawing.Point(1026, 13)
Me.picExcel.Name = "picExcel"
Me.picExcel.Size = New System.Drawing.Size(35, 35)
Me.picExcel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.picExcel.TabIndex = 29
Me.picExcel.TabStop = False
'
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
@@ -170,7 +184,7 @@ Partial Class frmMDM_USTVAntrag
'picPDF
'
Me.picPDF.Image = Global.SDL.My.Resources.Resources.pdf
Me.picPDF.Location = New System.Drawing.Point(1067, 39)
Me.picPDF.Location = New System.Drawing.Point(1079, 13)
Me.picPDF.Name = "picPDF"
Me.picPDF.Size = New System.Drawing.Size(35, 35)
Me.picPDF.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
@@ -1416,15 +1430,40 @@ Partial Class frmMDM_USTVAntrag
Me.ContextMenuStrip2.Name = "ContextMenuStrip1"
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
'
'picExcel
'txtSumme
'
Me.picExcel.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.picExcel.Location = New System.Drawing.Point(1014, 39)
Me.picExcel.Name = "picExcel"
Me.picExcel.Size = New System.Drawing.Size(35, 35)
Me.picExcel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.picExcel.TabIndex = 29
Me.picExcel.TabStop = False
Me.txtSumme._DateTimeOnly = False
Me.txtSumme._numbersOnly = False
Me.txtSumme._numbersOnlyKommastellen = ""
Me.txtSumme._numbersOnlyTrennzeichen = False
Me.txtSumme._Prozent = False
Me.txtSumme._ShortDateNew = False
Me.txtSumme._ShortDateOnly = False
Me.txtSumme._TimeOnly = False
Me.txtSumme._TimeOnly_Seconds = False
Me.txtSumme._value = ""
Me.txtSumme._Waehrung = True
Me.txtSumme._WaehrungZeichen = True
Me.txtSumme.ForeColor = System.Drawing.Color.Black
Me.txtSumme.Location = New System.Drawing.Point(1026, 63)
Me.txtSumme.MaxLineLength = -1
Me.txtSumme.MaxLines_Warning = ""
Me.txtSumme.MaxLines_Warning_Label = Nothing
Me.txtSumme.Name = "txtSumme"
Me.txtSumme.ReadOnly = True
Me.txtSumme.Size = New System.Drawing.Size(88, 20)
Me.txtSumme.TabIndex = 49
Me.txtSumme.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
'
'Label27
'
Me.Label27.AutoSize = True
Me.Label27.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label27.Location = New System.Drawing.Point(975, 66)
Me.Label27.Name = "Label27"
Me.Label27.Size = New System.Drawing.Size(45, 13)
Me.Label27.TabIndex = 48
Me.Label27.Text = "Summe:"
'
'frmMDM_USTVAntrag
'
@@ -1441,6 +1480,7 @@ Partial Class frmMDM_USTVAntrag
Me.Text = "USTV Antrag"
Me.pnlBottom.ResumeLayout(False)
Me.pnlBottom.PerformLayout()
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.picPDF, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlHeader.ResumeLayout(False)
Me.pnlHeader.PerformLayout()
@@ -1465,7 +1505,6 @@ Partial Class frmMDM_USTVAntrag
CType(Me.dgvErstattungspositionen, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlErstattungsdetails.ResumeLayout(False)
Me.Panel1.ResumeLayout(False)
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
@@ -1558,4 +1597,6 @@ Partial Class frmMDM_USTVAntrag
Friend WithEvents Label14 As Label
Friend WithEvents txtEingereichtAm As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents picExcel As PictureBox
Friend WithEvents txtSumme As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label27 As Label
End Class

View File

@@ -1,4 +1,5 @@

Imports System.ComponentModel
Imports System.IO
Imports System.Reflection
Imports System.Windows.Documents
@@ -1282,8 +1283,11 @@ Public Class frmMDM_USTVAntrag
If dgvUSTVPositionen.SelectedRows.Count > 0 Then
initPosition(dgvUSTVPositionen.SelectedRows(0).Cells("UStVPo_ID").Value)
calcSumme()
End If
End Sub
Private Sub dgvErstattungspositionen_SelectionChanged(sender As Object, e As EventArgs) Handles dgvErstattungspositionen.SelectionChanged
@@ -2140,6 +2144,7 @@ Public Class frmMDM_USTVAntrag
ElseIf TabControl1.SelectedTab Is TabPage2 Then
initdgvErstattungen()
posTabisSelected = False
txtSumme._value = 0
End If
@@ -2310,7 +2315,7 @@ Public Class frmMDM_USTVAntrag
Next
cProgramFunctions.genExcelFromDT_NEW(dtNew, {"K1:K" & (dtNew.Rows.Count + 1)},, "Statement itemising VAT amounts relating to the period covered by this application", "VAT NO.: " & USTV_ANTRAG.UStVAn_Steuernummer & " " & "Name/Company: " & USTV_ANTRAG.UStVAn_Name & " " & "VAT in " & Antrag_LandKz & ": " & txtStNr.Text, IIf(USTV_ANTRAG.UStVAn_Währungscode = "EUR", "", ""), True, "E")
cProgramFunctions.genExcelFromDT_NEW(dtNew, {"K1:K" & (dtNew.Rows.Count + 1)},, "Statement itemising VAT amounts relating to the period covered by this application", "VAT NO.: " & USTV_ANTRAG.UStVAn_Steuernummer & " " & "Name/Company: " & USTV_ANTRAG.UStVAn_Name & " " & "VAT in " & Antrag_LandKz & ": " & txtStNr.Text, IIf(USTV_ANTRAG.UStVAn_Währungscode = "EUR", "", ""), True, "E", True, True)
End If
@@ -2387,6 +2392,23 @@ Public Class frmMDM_USTVAntrag
End Sub
Private Sub calcSumme()
Dim countSumme As Double = 0
If posTabisSelected Then
For i As Integer = 0 To dgvUSTVPositionen.SelectedRows.Count - 1
countSumme += CDbl(dgvUSTVPositionen.SelectedRows(i).Cells("UStVPo_USteuerbetragEUR").Value)
Next
End If
txtSumme._value = countSumme.ToString
End Sub
End Class

View File

@@ -44,6 +44,15 @@ Public Class ustCntlUSTV_AntragPosition
txtLand.Text = ""
txtUIDNr.Text = ""
gridAktiv = True
Dim filter As String = "UstV_aktiv = 1"
If Antrag_LandKz <> "" AndAlso cbxAntragsfilter.Checked Then
filter &= " and left(UstV_Leistender_UstNr,2)='" & Antrag_LandKz & "'"
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] + ' ' + isnull([UstV_Leistender_UstNr],'')) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
Else
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] + ' ' + isnull([UstV_Leistender_UstNr],'')) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
End If
End Sub
@@ -425,18 +434,27 @@ Public Class ustCntlUSTV_AntragPosition
If sender Is txtUSTBetrag Then
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs.Text) Then
If CDbl(UStV_POS.UStVPo_USteuerbetrag) <> CDbl(txtUSTBetrag.Text) Then
If CDbl(UStV_POS.UStVPo_USteuerbetrag) <> CDbl(txtUSTBetrag.Text) OrElse UStV_POS.UStVPo_USteuerbetrag Is Nothing Then
'Umrechnung bei Währung <> EUR im Antrag!
Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID)
If antr.UStVAn_Währungscode <> "EUR" AndAlso IsDate(UStV_POS.UStVPo_ReDat) Then
If antr.UStVAn_Währungscode <> "EUR" AndAlso (IsDate(UStV_POS.UStVPo_ReDat) OrElse (txtRgDatum.Text <> "" AndAlso IsDate(txtRgDatum.Text))) Then
If txtUmrechnungskurs.Text = 1 Or txtUmrechnungskurs.Text = "" Then
Dim kurs As New cEZB_Waehrungskurse(antr.UStVAn_Währungscode)
If IsDate(UStV_POS.UStVPo_ReDat) Then
txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(UStV_POS.UStVPo_ReDat))
ElseIf IsDate(txtRgDatum.Text) Then
txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(txtRgDatum.Text))
Else
txtUmrechnungskurs.Text = kurs.ezb_kurs
End If
End If
End If
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
txtChanged = True
@@ -457,11 +475,11 @@ Public Class ustCntlUSTV_AntragPosition
If IsNumeric(txtUSTBetragEUR.Text) AndAlso IsNumeric(txtUSTBetrag.Text) Then
If CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) Then
If CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) OrElse UStV_POS.UStVPo_USteuerbetragEUR Is Nothing Then
Dim zahl1 = txtUSTBetragEUR.Text / txtUSTBetrag.Text
Dim zahl1 = CDbl(txtUSTBetrag.Text) / CDbl(txtUSTBetragEUR.Text)
txtUmrechnungskurs.Text = zahl1
txtUmrechnungskurs.Text = Math.Round(zahl1, 2)
txtChanged = True
End If
End If
@@ -471,7 +489,7 @@ Public Class ustCntlUSTV_AntragPosition
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs._value) Then
If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") Then
If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") OrElse UStV_POS.UStVPo_Umrechnungskurs Is Nothing Then
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
txtChanged = True

View File

@@ -25,6 +25,7 @@ Partial Class frmBU_Mahnlauf
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmBU_Mahnlauf))
Me.Panel1 = New System.Windows.Forms.Panel()
Me.cbxZahlungseingaenge = New System.Windows.Forms.CheckBox()
Me.cbxNurFaellig = New System.Windows.Forms.CheckBox()
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Label7 = New System.Windows.Forms.Label()
@@ -55,7 +56,6 @@ Partial Class frmBU_Mahnlauf
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.cbxZahlungseingaenge = New System.Windows.Forms.CheckBox()
Me.Panel1.SuspendLayout()
Me.pnlTop.SuspendLayout()
Me.Panel2.SuspendLayout()
@@ -83,6 +83,17 @@ Partial Class frmBU_Mahnlauf
Me.Panel1.Size = New System.Drawing.Size(1287, 127)
Me.Panel1.TabIndex = 0
'
'cbxZahlungseingaenge
'
Me.cbxZahlungseingaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxZahlungseingaenge.AutoSize = True
Me.cbxZahlungseingaenge.Location = New System.Drawing.Point(568, 87)
Me.cbxZahlungseingaenge.Name = "cbxZahlungseingaenge"
Me.cbxZahlungseingaenge.Size = New System.Drawing.Size(114, 17)
Me.cbxZahlungseingaenge.TabIndex = 39
Me.cbxZahlungseingaenge.Text = "Zahlungseingänge"
Me.cbxZahlungseingaenge.UseVisualStyleBackColor = True
'
'cbxNurFaellig
'
Me.cbxNurFaellig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -490,17 +501,6 @@ Partial Class frmBU_Mahnlauf
Me.MyTextBox2.TabIndex = 39
Me.MyTextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
'
'cbxZahlungseingaenge
'
Me.cbxZahlungseingaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cbxZahlungseingaenge.AutoSize = True
Me.cbxZahlungseingaenge.Location = New System.Drawing.Point(568, 87)
Me.cbxZahlungseingaenge.Name = "cbxZahlungseingaenge"
Me.cbxZahlungseingaenge.Size = New System.Drawing.Size(114, 17)
Me.cbxZahlungseingaenge.TabIndex = 39
Me.cbxZahlungseingaenge.Text = "Zahlungseingänge"
Me.cbxZahlungseingaenge.UseVisualStyleBackColor = True
'
'frmBU_Mahnlauf
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -71,29 +71,13 @@ Public Class frmBU_Mahnlauf
Dim sqlStringVerag360Zahlungseingaenge = "SELECT i_personenkonto Konto,KTO.c_name, KTO.c_landid Land,/*KTO.c_plz + ' ' + KTO.c_ort Ort,isnull(KTO.c_email,'') Email, */ " &
"isnull(( SELECT TOP 1 [Zahlungsinformationen] FROM [FMZOLL\SQLFMZOLL].[VERAG].[dbo].Kunden where KundenNr=i_personenkonto ) ,'') Zahlungsinfo, cast(min (OWNFIELD_Belegdatum)as date) as 'ältesteRg'," &
"count(*) Anzahl, sum(eur_bruttobetrag+eur_zahlung) Ausstand ,min(op.d_netto) Faelligkeit,max(si_mahnstufe) Mahnstufe, cast(MAX(d_mahnung)as date) Mahndatum, max(replace(KTO.c_zahlziel,'0/0/','')) ZZ,
Dim sqlStringVerag360Zahlungseingaenge = " SELECT cast(d_beleg as Date) as d_beleg ,c_urbelegid, c_buchtext, case when c_sollhabenkz = 'H' then eur_betrag else eur_betrag * -1 end as eur_betrag , BU.i_konto,KTO.c_landid
FROM [FIBU2].[dbo].[fibu_belegzeile] as BU
RIGHT join fibu_konto KTO on KTO.i_konto=BU.i_konto AND BU.i_firm_refid=KTO.i_firm_refid
where cast(d_beleg as date) = '03.04.2025' and BU.i_firm_refid=" & Firma_ID & " and (c_kennung = 'KE' or BU.i_konto in (5827, 5829) or LEFT(BU.i_konto,1) = 0 or c_kennung = 'DE')
case
when max(si_mahnstufe) = 1 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 20 Then 'telefonisch'
when max(si_mahnstufe) = 1 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 30 Then 'ZZ 30 Tage'
when max(si_mahnstufe) = 1 and cast(MAX(d_mahnung)as date) < (GETDATE()- 60) Then 'Sperre Donnerstag'
when max(si_mahnstufe) = 2 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 20 Then 'Sperre Freitag'
when max(si_mahnstufe) = 2 and max((replace(KTO.c_zahlziel,'0/0/',''))) = 30 Then 'ZZ 30 Tage'
when max(si_mahnstufe) >= 3 Then 'Sperre Donnerstag'
else '-'
End as sperre" & If(cbxNurFaellig.Checked, "", ",SUM(CASE WHEN op.d_netto<getDATE() THEN (eur_bruttobetrag+eur_zahlung) ELSE 0 END) Summe_Faellig") & "
FROM op_debitor OP
RIGHT join fibu_konto KTO on i_personenkonto=i_konto AND KTO.i_firm_refid=OP.i_firm_refid
WHERE (OP.i_firm_refid = '" & Firma_ID & "') AND (dt_geloescht IS NULL)
" & If(cbxNurFaellig.Checked, " and op.d_netto<=getdate() and isnull(si_mahnflags,0) <>(1) ", "") & "
" & If(KdNr > 0, " AND i_personenkonto ='" & KdNr & "'", "") & "
" & If(KdTxt <> "", " AND KTO.c_name LIKE '" & KdTxt.Replace("*", "%") & "'", "") & "
group by i_personenkonto ,KTO.c_name,KTO.c_landid,KTO.c_ort,KTO.c_plz,KTO.c_email
HAVING sum(eur_bruttobetrag+eur_zahlung)>'" & MyTextBox1._value & "'
" & If(MyComboBox1._value > 0, " and max(si_mahnstufe)>='" & MyComboBox1._value & "'", "") & "
ORDER BY KTO.c_name"
and (BU.i_konto in (2800, 2801, 2802, 2803, 2811, 2812, 2813, 2814, 2817, 2818, 2822 ,2826, 2827, 2828, 2831, 2832, 2833, 2837, 2845) or i_gegenkonto in (2800, 2801, 2802, 2803, 2811, 2812, 2813, 2814, 2817, 2818, 2822 ,2826, 2827, 2828, 2831, 2832, 2833, 2837, 2845))
order by i_beleg_refid, i_zeilen_refid"
'MsgBox(sqlStr)
@@ -102,6 +86,32 @@ Public Class frmBU_Mahnlauf
.DataSource = dt_OP
If .Columns.Count = 0 Then Exit Sub
If zahlungseingaenge And Firma_ID = 19 Then
.Columns("c_buchtext").HeaderText = "Buchungstext"
.Columns("c_buchtext").AutoSizeMode = DataGridViewAutoSizeColumnsMode.Fill
.Columns("d_beleg").Width = 75
.Columns("d_beleg").HeaderText = "Belegdatum"
.Columns("c_urbelegid").Width = 90
.Columns("c_urbelegid").HeaderText = "BelegNr."
.Columns("i_konto").Width = 75
.Columns("i_konto").HeaderText = "KdNr/Konto"
.Columns("eur_betrag").Width = 75
.Columns("eur_betrag").HeaderText = "Betrag"
.Columns("c_landid").Width = 75
.Columns("c_landid").HeaderText = "Land"
Else
.Columns("c_name").HeaderText = "Firma"
.Columns("c_name").AutoSizeMode = DataGridViewAutoSizeColumnsMode.Fill
@@ -135,6 +145,7 @@ Public Class frmBU_Mahnlauf
End If
.Columns("Mahnstufe").Width = 50
End If
End With
End Sub
@@ -1278,4 +1289,13 @@ Public Class frmBU_Mahnlauf
Private Sub cbxZahlungseingaenge_CheckedChanged(sender As Object, e As EventArgs) Handles cbxZahlungseingaenge.CheckedChanged
'initDGV(cbxZahlungseingaenge.Checked)
End Sub
Private Sub cboFirma_SelectedValueChanged(sender As Object, e As EventArgs) Handles cboFirma.SelectedValueChanged
If cboFirma._value <> "" AndAlso cboFirma._value = 19 Then
cbxZahlungseingaenge.Visible = True
Else
cbxZahlungseingaenge.Visible = False
cbxZahlungseingaenge.Checked = False
End If
End Sub
End Class

View File

@@ -1124,7 +1124,7 @@ Public Class cProgramFunctions
Return ""
End Function
Public Shared Function genExcelFromDT_NEW(dt As DataTable, Optional rangeAsWaehrung() As String = Nothing, Optional ShowAutoFilter As Boolean = True, Optional HeaderTxt As String = "", Optional HeaderTxt2 As String = "", Optional waehrungsZeichen As String = "", Optional fitCellsToContent As Boolean = False, Optional mergeHeadersToCell As Char = "") As String
Public Shared Function genExcelFromDT_NEW(dt As DataTable, Optional rangeAsWaehrung() As String = Nothing, Optional ShowAutoFilter As Boolean = True, Optional HeaderTxt As String = "", Optional HeaderTxt2 As String = "", Optional waehrungsZeichen As String = "", Optional fitCellsToContent As Boolean = False, Optional mergeHeadersToCell As Char = "", Optional Landscape As Boolean = False, Optional fitToOnePage As Boolean = False) As String
Try
Dim sPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\VERAG\SDL\tmp\" ' My.Computer.FileSystem.GetTempFileName
@@ -1181,6 +1181,19 @@ Public Class cProgramFunctions
wb.Worksheets(0).Rows().AdjustToContents()
End If
If Landscape Then
wb.Worksheets(0).PageSetup.PageOrientation = XLPageOrientation.Landscape
Else
wb.Worksheets(0).PageSetup.PageOrientation = XLPageOrientation.Default
End If
If fitToOnePage Then
wb.Worksheets(0).PageSetup.PagesWide = 1 ' In die Breite auf eine Seite anpassen
wb.Worksheets(0).PageSetup.PagesTall = 1 ' In die Höhe auf eine Seite anpassen
End If
Dim filename As String = sPath & "tmp_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
@@ -1355,7 +1368,7 @@ Public Class cProgramFunctions
For i As Integer = 0 To dgv.SelectedRows.Count - 1
row = dt.Rows.Add
For Each column As DataGridViewColumn In dgv.Columns
Dim valueTmp As Object = dgv.SelectedRows.Item(i).Cells(column.Index).Value
Dim valueTmp As Object = dgv.SelectedRows.Item((dgv.SelectedRows.Count - 1) - i).Cells(column.Index).Value
If valueTmp Is DBNull.Value Then
row.Item(column.Index) = ""
Else