USTVA-Antrag, etc.
This commit is contained in:
@@ -3177,14 +3177,32 @@ Public Class frmMDM_USTVAntrag
|
|||||||
|
|
||||||
Private Sub pb_Beleg_Click(sender As Object, e As EventArgs) Handles pb_Beleg.Click
|
Private Sub pb_Beleg_Click(sender As Object, e As EventArgs) Handles pb_Beleg.Click
|
||||||
|
|
||||||
Dim RK_ID As Integer = CInt(SQL.getValueTxtBySql("select top(1) RK_ID from Rechnungsausgang where FilialenNr = " & USTV_ANTRAG.FilialenNr & " and AbfertigungsNr = " & USTV_ANTRAG.AbfertigungsNr & " and DruckDatumZeit is not null and Firma_ID = 19", "FMZOLL", ,, "0"))
|
|
||||||
|
|
||||||
If RK_ID > 0 Then
|
Dim dtRE As DataTable = (New SQL).loadDgvBySql("select RK_ID, RechnungsNr, FilialenNr from Rechnungsausgang where FilialenNr = " & USTV_ANTRAG.FilialenNr & " and AbfertigungsNr = " & USTV_ANTRAG.AbfertigungsNr & " and Firma_ID = 19", "FMZOLL")
|
||||||
Dim RG_PATH = ""
|
|
||||||
cFakturierung.doRechnungsDruck_SRorER(RK_ID,, False, 4, RG_PATH,,, True)
|
ncs_Belege.Items.Clear()
|
||||||
Process.Start(RG_PATH)
|
|
||||||
|
|
||||||
|
If dtRE.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
Dim RK_ID As String = ""
|
||||||
|
|
||||||
|
For Each r As DataRow In dtRE.Rows
|
||||||
|
|
||||||
|
Dim re = New ToolStripMenuItem() With {.Text = r.Item("FilialenNr") & " - " & r.Item("RechnungsNr"), .Name = r.Item("RK_ID"), .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||||
|
ncs_Belege.Items.Add(re)
|
||||||
|
AddHandler re.Click, AddressOf mnuItemBelegeOpenPDF_Clicked
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ncs_Belege.Show(Cursor.Position)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub cbxRGretour_CheckedChanged(sender As Object, e As EventArgs) Handles cbxRGretour.CheckedChanged
|
Private Sub cbxRGretour_CheckedChanged(sender As Object, e As EventArgs) Handles cbxRGretour.CheckedChanged
|
||||||
@@ -3320,8 +3338,30 @@ Public Class frmMDM_USTVAntrag
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub mnuItemBelegeOpenPDF_Clicked(sender As Object, e As EventArgs)
|
||||||
|
ncs_Belege.Hide()
|
||||||
|
Dim item As ToolStripMenuItem = TryCast(sender, ToolStripMenuItem)
|
||||||
|
|
||||||
|
If item IsNot Nothing Then
|
||||||
|
|
||||||
|
If item.Name <> "" Then
|
||||||
|
|
||||||
|
If IsNumeric(item.Name) Then
|
||||||
|
|
||||||
|
Dim RG_PATH = ""
|
||||||
|
cFakturierung.doRechnungsDruck_SRorER(item.Name,, False, 4, RG_PATH,,, True)
|
||||||
|
Process.Start(RG_PATH)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1100,7 +1100,10 @@ Public Class cMDMFunctionsAllgemein
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
For Each row In dtNew.Rows
|
For Each row In dtNew.Rows
|
||||||
row("Name of supplier") = row("Name of supplier").ToString.Replace(" " & row("VAT").ToString.Substring(0, 2), "")
|
If Not IsDBNull(row("VAT")) AndAlso row("VAT") <> "" AndAlso Not IsDBNull(row("Name of supplier")) AndAlso row("Name of supplier") <> "" Then
|
||||||
|
row("Name of supplier") = row("Name of supplier").ToString.Replace(" " & row("VAT").ToString.Substring(0, 2), "")
|
||||||
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If dtNew.Columns.Contains("Number") Then
|
If dtNew.Columns.Contains("Number") Then
|
||||||
|
|||||||
Reference in New Issue
Block a user