Fremdrechnungen, MDM-Zinsrechnung, etc,
This commit is contained in:
@@ -2058,14 +2058,24 @@ Public Class usrCntlFaktAbrechnung
|
||||
Case 19 'MDM
|
||||
|
||||
Select Case RECHNUNG.RechnungSprache
|
||||
Case "DE" : RECHNUNG.Anlage_1 = "Rechnung" : RECHNUNG.Anlage_2 = "Lief.-Rechn." : RECHNUNG.Anlage_3 = "POS-Liste"
|
||||
Case "EN" : RECHNUNG.Anlage_1 = "Invoice" : RECHNUNG.Anlage_2 = "Supplier Invoice(s)" : RECHNUNG.Anlage_3 = "Item List"
|
||||
Case "RO" : RECHNUNG.Anlage_1 = "Factura" : RECHNUNG.Anlage_2 = "Factura furnizorului" : RECHNUNG.Anlage_3 = "Lista articolelor"
|
||||
Case "DE"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_1 = "Rechnung"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_2 = "Lief.-Rechn."
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_3 = "POS-Liste"
|
||||
Case "EN"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_1 = "Invoice"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_2 = "Supplier Invoice(s)"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_3 = "Item List"
|
||||
Case "RO"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_1 = "Factura"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_2 = "Factura furnizorului"
|
||||
If If(RECHNUNG.FilialenNr, String.Empty) <> "8001" Then RECHNUNG.Anlage_3 = "Lista articolelor"
|
||||
End Select
|
||||
|
||||
|
||||
RECHNUNG.Anlage_4 = ""
|
||||
RECHNUNG.Anlage_5 = ""
|
||||
RECHNUNG.Anlage_5 = ""
|
||||
|
||||
|
||||
Case Else
|
||||
If SPEDBUCH IsNot Nothing Then
|
||||
@@ -2349,8 +2359,12 @@ Public Class usrCntlFaktAbrechnung
|
||||
RECHNUNG.Vorkasse = kdFirmaRechnungAn.KdData_KUNDE.Vorkasse
|
||||
End If
|
||||
|
||||
If RECHNUNG.FilialenNr = 8001 AndAlso RECHNUNG.Firma_ID = 19 Then
|
||||
RECHNUNG.Nettozahlungsziel = IIf(kdFirmaRechnungAn.KdData_KUNDE.Zahlungsziel > 14, 14, kdFirmaRechnungAn.KdData_KUNDE.Zahlungsziel)
|
||||
Else
|
||||
RECHNUNG.Nettozahlungsziel = kdFirmaRechnungAn.KdData_KUNDE.Zahlungsziel
|
||||
End If
|
||||
|
||||
RECHNUNG.Nettozahlungsziel = kdFirmaRechnungAn.KdData_KUNDE.Zahlungsziel
|
||||
End If
|
||||
|
||||
|
||||
@@ -3981,14 +3995,20 @@ Nächste_Textzeile_lesen:
|
||||
If vbYes = MsgBox("Möchten Sie diese ungedruckte Rechnung wirklich löschen?", vbYesNoCancel) Then
|
||||
If RECHNUNG IsNot Nothing AndAlso RECHNUNG.Status = 0 Then
|
||||
If RECHNUNG.DELETE() Then
|
||||
If FIRMA IsNot Nothing AndAlso FIRMA.Firma_ID = 19 AndAlso SPEDBUCH IsNot Nothing AndAlso SPEDBUCH.FilialenNr = 4817 Then
|
||||
Dim UST_ID As Integer = -1
|
||||
UST_ID = CInt(SQL.getValueTxtBySql("SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL",,, 0))
|
||||
If UST_ID > 0 Then
|
||||
SQL.doSQL("UPDATE [tblUStVPositionen] SET UStVPo_VZ_RKID = NULL WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL")
|
||||
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1 WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0 AND [UStVAn_ID] = " & UST_ID & " )", "FMZOLL")
|
||||
If FIRMA IsNot Nothing AndAlso FIRMA.Firma_ID = 19 AndAlso SPEDBUCH IsNot Nothing Then
|
||||
If SPEDBUCH.FilialenNr = 4817 Then
|
||||
Dim UST_ID As Integer = -1
|
||||
UST_ID = CInt(SQL.getValueTxtBySql("SELECT [UStVAn_ID] FROM [tblUStVPositionen] WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL",,, 0))
|
||||
If UST_ID > 0 Then
|
||||
SQL.doSQL("UPDATE [tblUStVPositionen] SET UStVPo_VZ_RKID = NULL WHERE [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) =" & RECHNUNG.RK_ID, "FMZOLL")
|
||||
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1 WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0 AND [UStVAn_ID] = " & UST_ID & " )", "FMZOLL")
|
||||
End If
|
||||
|
||||
ElseIf SPEDBUCH.FilialenNr = 8001 Then
|
||||
SQL.doSQL("UPDATE [tblMDM_Zinsberechnung] SET RK_ID = NULL, verrechnet = NULL WHERE isnull(RK_ID,0) =" & RECHNUNG.RK_ID, "FMZOLL")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
RaiseEvent EVENT_DELETED()
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user