Fakt USTVA
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports System.Windows.Documents
|
||||
Imports com.sun.org.apache.xpath.internal.objects
|
||||
Imports itextsharp.text.pdf
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
@@ -268,6 +269,14 @@ Public Class frmMDM_USTVAntrag
|
||||
If USTV_ANTRAG.FilialenNr IsNot Nothing AndAlso USTV_ANTRAG.FilialenNr > 0 AndAlso USTV_ANTRAG.AbfertigungsNr IsNot Nothing AndAlso USTV_ANTRAG.AbfertigungsNr > 0 Then
|
||||
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0)
|
||||
If spedBuch.hasEntry Then
|
||||
|
||||
If CInt(SQL.getValueTxtBySql("select COUNT(*) from Rechnungsausgang where FilialenNr = " & USTV_ANTRAG.FilialenNr & " and AbfertigungsNr = " & USTV_ANTRAG.AbfertigungsNr & " and Firma_ID = 19 and DruckDatumZeit is not null", "FMZOLL",,, "0")) > 0 Then
|
||||
pb_Beleg.Visible = True
|
||||
Else
|
||||
pb_Beleg.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
Button4.Text = "Sped.-Buch anzeigen"
|
||||
Button5.Visible = True
|
||||
Else
|
||||
@@ -2935,8 +2944,19 @@ Public Class frmMDM_USTVAntrag
|
||||
If IsDBNull(USTV_ANTRAG.FilialenNr) OrElse USTV_ANTRAG.FilialenNr Is Nothing OrElse USTV_ANTRAG.FilialenNr = 0 Then MsgBox("Für das Speditionsbuch muss die Filiale eingegeben werden.") : Exit Sub
|
||||
If IsDBNull(USTV_ANTRAG.AbfertigungsNr) OrElse USTV_ANTRAG.AbfertigungsNr Is Nothing OrElse USTV_ANTRAG.AbfertigungsNr <= 0 Then MsgBox("Für das Speditionsbuch muss die Abfertigungs-Nr eingegeben werden.") : Exit Sub
|
||||
|
||||
Dim f As New SDL.frmAbrechnungsMaskeEinzeln(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, IIf(USTV_ANTRAG.UStVAn_ErstattungsbetragEUR >= 0, "AG", "AR"))
|
||||
f.Show(Me)
|
||||
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 Firma_ID = 19", "FMZOLL", ,, "0"))
|
||||
|
||||
If RK_ID > 0 Then
|
||||
Dim f As New SDL.frmAbrechnungsMaskeEinzeln(RK_ID)
|
||||
f.Show(Me)
|
||||
|
||||
Else
|
||||
|
||||
Dim f As New SDL.frmAbrechnungsMaskeEinzeln(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, IIf(USTV_ANTRAG.UStVAn_ErstattungsbetragEUR >= 0, "AG", "AR"))
|
||||
f.Show(Me)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -3057,7 +3077,17 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End Sub
|
||||
|
||||
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 RG_PATH = ""
|
||||
cFakturierung.doRechnungsDruck_SRorER(RK_ID,, False, 4, RG_PATH,,, True)
|
||||
Process.Start(RG_PATH)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub initScanUSTVA()
|
||||
If USTV_ANTRAG IsNot Nothing Then
|
||||
|
||||
Reference in New Issue
Block a user