SDL USTV Positionen laden (PLOSE), Beglegart Sammelrechnung (GS/RG)

This commit is contained in:
2023-01-13 23:51:27 +01:00
parent f73b7f3e93
commit 4d53a99b15
4 changed files with 41 additions and 22 deletions

View File

@@ -2409,11 +2409,15 @@ Public Class cFakturierung
'End Select
'If RECHNUNG.DruckDatumZeit IsNot Nothing Then rpt.lblUeberschriftRG_GS.Text &= " - KOPIE"
'Dim Gesamt_RG_Betrag As Double = CDbl(dt.Compute("SUM(SteuerFreierBetrag)", "")) + CDbl(dt.Compute("SUM(SteuerpflichtigerBetrag)", ""))
' If ROW("SteuerFreierBetrag") IsNot DBNull.Value AndAlso IsNumeric(ROW("SteuerFreierBetrag")) Then Gesamt_RG_Betrag += ROW("SteuerFreierBetrag")
' If ROW("SteuerpflichtigerBetrag") IsNot DBNull.Value AndAlso IsNumeric(ROW("SteuerpflichtigerBetrag")) Then Gesamt_RG_Betrag += ROW("SteuerpflichtigerBetrag")
Dim BelegartenKz = "AR" 'If(Gesamt_RG_Betrag < 0, "AG", "AR")
Select Case ROW("RechnungSprache")
Case "EN"
Select Case ROW("BelegartenKz")
Select Case BelegartenKz
Case "AR"
rpt.lblUeberschriftRG_GS.Text = "Attatchment to INVOICE"
rpt.lblSummeUeberschrift.Text = "Invoice Amount:"
@@ -2426,7 +2430,7 @@ Public Class cFakturierung
rpt.lblRgDatumUeberschrift.Text = "Credit Note Date:"
End Select
Case Else
Select Case ROW("BelegartenKz")
Select Case BelegartenKz
Case "AR"
rpt.lblUeberschriftRG_GS.Text = "Anlage zur Sammelrechnung"
Case "AG"
@@ -2801,9 +2805,11 @@ Public Class cFakturierung
'If RECHNUNG.DruckDatumZeit IsNot Nothing Then rpt.lblUeberschriftRG_GS.Text &= " - KOPIE"
Dim Gesamt_RG_Betrag As Double = 0
If ROW("SteuerFreierBetrag") IsNot DBNull.Value AndAlso IsNumeric(ROW("SteuerFreierBetrag")) Then Gesamt_RG_Betrag += ROW("SteuerFreierBetrag")
If ROW("SteuerpflichtigerBetrag") IsNot DBNull.Value AndAlso IsNumeric(ROW("SteuerpflichtigerBetrag")) Then Gesamt_RG_Betrag += ROW("SteuerpflichtigerBetrag")
' Dim Gesamt_RG_Betrag As Double = 0
Dim Gesamt_RG_Betrag As Double = CDbl(dt.Compute("SUM(SteuerFreierBetrag)", "")) + CDbl(dt.Compute("SUM(SteuerpflichtigerBetrag)", ""))
' If ROW("SteuerFreierBetrag") IsNot DBNull.Value AndAlso IsNumeric(ROW("SteuerFreierBetrag")) Then Gesamt_RG_Betrag += ROW("SteuerFreierBetrag")
'If ROW("SteuerpflichtigerBetrag") IsNot DBNull.Value AndAlso IsNumeric(ROW("SteuerpflichtigerBetrag")) Then Gesamt_RG_Betrag += ROW("SteuerpflichtigerBetrag")
Dim BelegartenKz = If(Gesamt_RG_Betrag < 0, "AG", "AR")
Select Case ROW("RechnungSprache")

View File

@@ -191,8 +191,13 @@ Public Class frmMDM_USTVAntrag
init()
End Sub
Function alreadyExists(USTVAn_KuNr As Integer, UStVAn_LandNr As String, USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
Dim cnt = SQL.getValueTxtBySql(" SELECT count(*) FROM [tblUStVAntrag] inner join [tblUStVPositionen] on tblUStVAntrag.UStVAn_ID= [tblUStVPositionen].UStVAn_ID
WHERE USTVAn_KuNr='" & USTVAn_KuNr & "' AND UStVPo_SchnittstellenNr='" & USTV_POS.UStVPo_SchnittstellenNr & "' AND UStVPo_ReNr = '" & USTV_POS.UStVPo_ReNr & "' AND UStVPo_ReDat='" & USTV_POS.UStVPo_ReDat & "' AND UStVAn_LandNr='" & UStVAn_LandNr & "' ", "FMZOLL")
Return (cnt > 0)
End Function
Function alreadyExists(USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
Function alreadyExists_InAntrag(USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
For Each row As DataGridViewRow In dgvUSTVPositionen.Rows
If row.Cells("UStVPo_SchnittstellenNr").Value = USTV_POS.UStVPo_SchnittstellenNr Then
If row.Cells("UStVPo_ReNr").Value = USTV_POS.UStVPo_ReNr.ToString And row.Cells("UStVPo_ReDat").Value = USTV_POS.UStVPo_ReDat Then
@@ -221,7 +226,7 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = ANTRAG.plose_RechnungsNr.ToString
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
If Not alreadyExists(USTV_POS) Then
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
USTV_POS.UStVPo_Schnittstelle = True
USTV_POS.UStVPo_Leistungsbezeichnung = "Maut"

View File

@@ -109,6 +109,11 @@ Public Class cSendungen
Property tblSnd_AbfertigungTR_MA As Object = Nothing
Property tblSnd_AbfertigungTRAnzahl As Object = Nothing
Property tblSnd_AbfertigungTRAnzahlPos As Object = Nothing
Public saveSachbearbeiter As Boolean = False
Property ABRECHNUNG As New List(Of cSendungAbrechnung)
@@ -418,6 +423,8 @@ Public Class cSendungen
Me.tblSnd_FrachtkostenGesamt = SQL.checkNullReturnValue(dr.Item("tblSnd_FrachtkostenGesamt"), Nothing)
Me.tblSnd_AbfertigungTR = SQL.checkNullReturnValue(dr.Item("tblSnd_AbfertigungTR"), Nothing)
Me.tblSnd_AbfertigungTR_MA = SQL.checkNullReturnValue(dr.Item("tblSnd_AbfertigungTR_MA"), Nothing)
Me.tblSnd_AbfertigungTRAnzahl = SQL.checkNullReturnValue(dr.Item("tblSnd_AbfertigungTRAnzahl"), Nothing)
Me.tblSnd_AbfertigungTRAnzahlPos = SQL.checkNullReturnValue(dr.Item("tblSnd_AbfertigungTRAnzahlPos"), Nothing)
End If
@@ -641,6 +648,8 @@ Public Class cSendungen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbklaerungTR_MA", tblSnd_AbklaerungTR_MA))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTR", tblSnd_AbfertigungTR))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTR_MA", tblSnd_AbfertigungTR_MA))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTRAnzahl", tblSnd_AbfertigungTRAnzahl))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTRAnzahlPos", tblSnd_AbfertigungTRAnzahlPos))
'End If
Return list
End Function

View File

@@ -24,7 +24,6 @@ Partial Class frmMessenger
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
@@ -39,11 +38,11 @@ Partial Class frmMessenger
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMessenger))
Me.SplitContainer = New System.Windows.Forms.SplitContainer()
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
Me.dgvChats = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.dgvChats = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.Panel6 = New System.Windows.Forms.Panel()
Me.lblLKWChat_MsgCntInaktiv = New System.Windows.Forms.Label()
Me.cbxInaktiveChats = New System.Windows.Forms.CheckBox()
Me.DGVSonstige = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.DGVSonstige = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.Panel5 = New System.Windows.Forms.Panel()
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
@@ -64,7 +63,7 @@ Partial Class frmMessenger
Me.btnNeu = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel(Me.components)
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel()
Me.UsrCntlMessenger_ChatElement1 = New VERAG_PROG_ALLGEMEIN.usrCntlMessenger_ChatElement()
Me.Panel3 = New System.Windows.Forms.Panel()
Me.btnTeilnehmer = New System.Windows.Forms.Button()
@@ -91,9 +90,9 @@ Partial Class frmMessenger
Me.btnSendAtt = New System.Windows.Forms.Button()
Me.btnSenden = New System.Windows.Forms.Button()
Me.rtbChatMessage = New System.Windows.Forms.RichTextBox()
Me.TimerNEW_MESSAGE = New System.Windows.Forms.Timer(Me.components)
Me.Timer_REFRESH = New System.Windows.Forms.Timer(Me.components)
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.TimerNEW_MESSAGE = New System.Windows.Forms.Timer()
Me.Timer_REFRESH = New System.Windows.Forms.Timer()
Me.cntxt = New System.Windows.Forms.ContextMenuStrip()
Me.ChatDeaktivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.toolChatReminder = New System.Windows.Forms.ToolStripMenuItem()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()