usvat, anhänge markieren verbessert
This commit is contained in:
@@ -1916,18 +1916,27 @@ Public Class usrCntlFaktAbrechnung
|
|||||||
For Each RG_AH In RECHNUNG.ANHAENGE
|
For Each RG_AH In RECHNUNG.ANHAENGE
|
||||||
For Each r As DataGridViewRow In .Rows
|
For Each r As DataGridViewRow In .Rows
|
||||||
If r.Cells("clmnDsId").Value = RG_AH.dsId Or r.Cells("clmnAnhId").Value = 0 Then 'anh_id = 0 --> Anhang ohne AVISO-Bezug
|
If r.Cells("clmnDsId").Value = RG_AH.dsId Or r.Cells("clmnAnhId").Value = 0 Then 'anh_id = 0 --> Anhang ohne AVISO-Bezug
|
||||||
DirectCast(r.Cells("optAnhSel"), DataGridViewCheckBoxCell).Value = -1
|
DirectCast(r.Cells("optAnhSel"), DataGridViewCheckBoxCell).Value = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If r.Cells("clmnBezeichnung").Value.ToString.ToLower.Contains("handelsrechnung") AndAlso kdFirmaRechnungAn.KdData_KUNDE_ERW IsNot Nothing AndAlso kdFirmaRechnungAn.KdData_KUNDE_ERW.kde_autoselect_handelsrechnung Then 'anh_id = 0 --> Anhang ohne AVISO-Bezug
|
If r.Cells("clmnBezeichnung").Value.ToString.ToLower.Contains("handelsrechnung") AndAlso kdFirmaRechnungAn.KdData_KUNDE_ERW IsNot Nothing AndAlso kdFirmaRechnungAn.KdData_KUNDE_ERW.kde_autoselect_handelsrechnung Then
|
||||||
DirectCast(r.Cells("optAnhSel"), DataGridViewCheckBoxCell).Value = 1
|
DirectCast(r.Cells("optAnhSel"), DataGridViewCheckBoxCell).Value = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
'-----------------------------
|
'-----------------------------
|
||||||
|
If RECHNUNG.ANHAENGE.Count = 0 Then
|
||||||
|
For Each rowTemp In .Rows
|
||||||
|
If rowTemp.Cells("clmnBezeichnung").Value.ToString.ToLower.Contains("handelsrechnung") AndAlso kdFirmaRechnungAn.KdData_KUNDE_ERW IsNot Nothing AndAlso kdFirmaRechnungAn.KdData_KUNDE_ERW.kde_autoselect_handelsrechnung Then
|
||||||
|
DirectCast(rowTemp.Cells("optAnhSel"), DataGridViewCheckBoxCell).Value = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Anhänge aus USTVA -> SPED-BUCH + Excel Pos-Liste
|
'Anhänge aus USTVA -> SPED-BUCH + Excel Pos-Liste
|
||||||
If SPEDBUCH IsNot Nothing Then
|
If SPEDBUCH IsNot Nothing Then
|
||||||
If FIRMA IsNot Nothing Then
|
If FIRMA IsNot Nothing Then
|
||||||
@@ -4600,12 +4609,33 @@ Nächste_Textzeile_lesen:
|
|||||||
|
|
||||||
Private Sub dbgAnhaenge_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAnhaenge.CellClick 'dbgAnhaenge.CellContentClick,
|
Private Sub dbgAnhaenge_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAnhaenge.CellClick 'dbgAnhaenge.CellContentClick,
|
||||||
Try
|
Try
|
||||||
' DirectCast(r.Cells("optAnhSel"), DataGridViewCheckBoxCell).Value = 1
|
|
||||||
|
'If dgvAnhaenge.Columns(e.ColumnIndex).Name = "optAnhSel" Then
|
||||||
|
' Select Case dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex).Value
|
||||||
|
' Case 1, -1
|
||||||
|
' dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = Not DirectCast(dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex), DataGridViewCheckBoxCell).Value
|
||||||
|
' Case Else
|
||||||
|
' dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = -1
|
||||||
|
' End Select
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If e.RowIndex < 0 OrElse e.ColumnIndex < 0 Then Exit Sub
|
||||||
|
|
||||||
If dgvAnhaenge.Columns(e.ColumnIndex).Name = "optAnhSel" Then
|
If dgvAnhaenge.Columns(e.ColumnIndex).Name = "optAnhSel" Then
|
||||||
' MsgBox(DirectCast(dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex), DataGridViewCheckBoxCell).Value)
|
|
||||||
dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = Not DirectCast(dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex), DataGridViewCheckBoxCell).Value
|
Dim cell = dgvAnhaenge.Rows(e.RowIndex).Cells(e.ColumnIndex)
|
||||||
|
|
||||||
|
If CInt(If(cell.Value, 0)) = -1 Then
|
||||||
|
cell.Value = 0
|
||||||
|
Else
|
||||||
|
cell.Value = -1
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
dgvAnhaenge.ClearSelection()
|
dgvAnhaenge.ClearSelection()
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message & ex.StackTrace)
|
MsgBox(ex.Message & ex.StackTrace)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -4317,7 +4317,9 @@ Public Class frmMDM_USTVAntrag
|
|||||||
|
|
||||||
Dim code As Integer = 0
|
Dim code As Integer = 0
|
||||||
Dim Subcode = ""
|
Dim Subcode = ""
|
||||||
getCode(Antrag_LandKz, listOfLeistungstyp(0), code, Subcode, "RO")
|
If listOfLeistungstyp.Count > 0 Then
|
||||||
|
getCode(Antrag_LandKz, listOfLeistungstyp(0), code, Subcode, "RO")
|
||||||
|
End If
|
||||||
|
|
||||||
Dim goods As New GoodsDescription With {.GoodsItem = New List(Of GoodsItem)}
|
Dim goods As New GoodsDescription With {.GoodsItem = New List(Of GoodsItem)}
|
||||||
goods.GoodsItem.Add(New GoodsItem With {.Code = code, .SubCode = Subcode, .FreeText = ""})
|
goods.GoodsItem.Add(New GoodsItem With {.Code = code, .SubCode = Subcode, .FreeText = ""})
|
||||||
@@ -4609,7 +4611,9 @@ Public Class frmMDM_USTVAntrag
|
|||||||
|
|
||||||
Dim code As Integer = 0
|
Dim code As Integer = 0
|
||||||
Dim Subcode = ""
|
Dim Subcode = ""
|
||||||
getCode(Antrag_LandKz, listOfLeistungstyp(0), code, Subcode)
|
If listOfLeistungstyp.Count > 0 Then
|
||||||
|
getCode(Antrag_LandKz, listOfLeistungstyp(0), code, Subcode)
|
||||||
|
End If
|
||||||
|
|
||||||
p.GoodsDescription = New GoodsDescription_ With {.Code = code, .Subcode = Subcode}
|
p.GoodsDescription = New GoodsDescription_ With {.Code = code, .Subcode = Subcode}
|
||||||
|
|
||||||
@@ -5012,24 +5016,25 @@ Public Class frmMDM_USTVAntrag
|
|||||||
|
|
||||||
|
|
||||||
listOfLeistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, row.Cells("UStVPo_SchnittstellenNr").Value)
|
listOfLeistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, row.Cells("UStVPo_SchnittstellenNr").Value)
|
||||||
|
If listOfLeistungstyp.Count > 0 Then
|
||||||
|
For Each listEntry In listOfLeistungstyp
|
||||||
|
|
||||||
For Each listEntry In listOfLeistungstyp
|
Dim code As Integer = 0
|
||||||
|
Dim Subcode = ""
|
||||||
|
getCode(Antrag_LandKz, listEntry, code, Subcode, "DE")
|
||||||
|
|
||||||
Dim code As Integer = 0
|
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
||||||
Dim Subcode = ""
|
Blatt.Range("B" & counterLeistungen + 1).Value = Subcode 'nur Subcodes!
|
||||||
getCode(Antrag_LandKz, listEntry, code, Subcode, "DE")
|
counterLeistungen += 1
|
||||||
|
|
||||||
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
Next
|
||||||
Blatt.Range("B" & counterLeistungen + 1).Value = Subcode 'nur Subcodes!
|
End If
|
||||||
counterLeistungen += 1
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Datei.Save
|
Datei.Save
|
||||||
|
|
||||||
|
|
||||||
Blatt = Datei.Worksheets(1)
|
Blatt = Datei.Worksheets(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user