Fakt, Email, Nacherfassung, etc.

This commit is contained in:
2025-06-04 09:53:11 +02:00
parent b2c4576821
commit 3e2b9bbc51
4 changed files with 57 additions and 25 deletions

View File

@@ -420,6 +420,14 @@ Public Class cFakturierung
Case "EN" : strText = strText & "The credit amount was offset against the debit order issued." & vbCrLf
Case Else : strText = strText & "Der Gutschriftsbetrag wurde mit erteilten Abbuchungsauftrag verrechnet." & vbCrLf
End Select
Else
If RECHNUNG.Firma_ID = 19 Then
Select Case RECHNUNG.RechnungSprache
Case "EN" : strZahlbar = "Payment term: " & ZZTage & " days"
Case Else : strZahlbar = "Zahlungsziel: " & ZZTage & " Tage"
End Select
End If
End If
End Select
@@ -1381,13 +1389,6 @@ Public Class cFakturierung
Case Else : rpt.txtInfo.Text = "*Reverse Charge"
End Select
rpt.lblSteuersatz.Visible = False
rpt.lblSteuerbetrag.Visible = False
'rpt.lblSteuerfrei.Visible = False
rpt.lblSteuerfreiGes.Visible = False
rpt.lblZwText.Visible = False
rpt.lblZWSumme.Visible = False
Else
Select Case RECHNUNG.RechnungSprache
@@ -1403,6 +1404,8 @@ Public Class cFakturierung
rpt.txtAnlagen.Text = ""
If If(RECHNUNG.Anlage_1, "") <> "" Then rpt.txtAnlagen.Text &= RECHNUNG.Anlage_1
If If(RECHNUNG.Anlage_2, "") <> "" Then rpt.txtAnlagen.Text &= vbNewLine & RECHNUNG.Anlage_2
@@ -1502,6 +1505,16 @@ Public Class cFakturierung
'Dim cnt As Integer = 0
If RECHNUNG.Firma_ID = 19 Then
rpt.lblSteuersatz.Visible = False
rpt.lblSteuerbetrag.Visible = False
rpt.lblSteuerpflichtigGes.Visible = False
rpt.lblSteuerfreiGes.Visible = False
rpt.lblZwText.Visible = False
rpt.lblZWSumme.Visible = False
End If
Dim sumSteuerpflichtig As Double = 0
Dim sumSteuerfrei As Double = 0
@@ -1534,12 +1547,22 @@ Public Class cFakturierung
Dim MonthEnd As String = IIf(CDate(MWSTAntrag.UStVAn_ReDatBis).Month < 10, "0", "") & CDate(MWSTAntrag.UStVAn_ReDatBis).Month
If rpt.txtLeistung.Text.Contains("-00") Then
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("-00", "-" & MonthStart & MonthEnd)
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("-00", MonthStart & "-" & MonthEnd)
ElseIf rpt.txtLeistung.Text.Contains("00-") Then
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("00-", MonthStart & "-" & MonthEnd)
ElseIf rpt.txtLeistung.Text.Contains("00") Then
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("00", MonthStart & MonthEnd)
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("00", MonthStart & "-" & MonthEnd)
End If
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("23", CDate(MWSTAntrag.UStVAn_ReDatBis).Year.ToString.Substring(2))
If rpt.txtLeistung.Text.Contains("00/23") Then
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("00/23", "/" & CDate(MWSTAntrag.UStVAn_ReDatBis).Year.ToString.Substring(2))
ElseIf rpt.txtLeistung.Text.Contains("DL/23") Then
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("DL/23", "/" & CDate(MWSTAntrag.UStVAn_ReDatBis).Year.ToString.Substring(2))
Else
rpt.txtLeistung.Text = rpt.txtLeistung.Text.Replace("/23", "/" & CDate(MWSTAntrag.UStVAn_ReDatBis).Year.ToString.Substring(2))
End If
End If
@@ -1664,7 +1687,6 @@ Public Class cFakturierung
rpt.txtVermerk.Text = rpt.txtVermerk.Text.Replace("<Rechnungsdatum+ZZVL>", Now.AddDays(ZZTageVL).ToShortDateString)
rpt.TextBox1.Text = rpt.TextBox1.Text.Replace("<Rechnungsdatum+10T>", Now.AddDays(10).ToShortDateString)
rpt.TextBox1.Text = rpt.TextBox1.Text.Replace("<Rechnungsdatum+ZZ>", Now.AddDays(ZZTage).ToShortDateString)
rpt.TextBox1.Text = rpt.TextBox1.Text.Replace("<Rechnungsdatum+ZZVL>", Now.AddDays(ZZTageVL).ToShortDateString)
@@ -4128,9 +4150,6 @@ Public Class cFakturierung
If Row("RechnungsOrt") IsNot DBNull.Value AndAlso Row("RechnungsOrt") <> "" Then rpt.lblRechnungAn.Text &= Row("RechnungsOrt") & vbNewLine
If Row("RechnungsLandKz") IsNot DBNull.Value AndAlso Row("RechnungsLandKz") <> "" Then rpt.lblRechnungAn.Text &= cProgramFunctions.getLandBez_fromISO1Land(Row("RechnungsLandKz"), "", Row("RechnungSprache")).ToString.ToUpper
If isMDMRechnungsdruck Then
If getReverseChargeSumme(Firma, Row("RechnungsLandKz"), Row("RechnungsNr"), Row("RechnungsDatum"), VorschauID) > 0 Then
@@ -4146,8 +4165,6 @@ Public Class cFakturierung
rpt.Label2.Text = ""
End If
If Row("Text") IsNot DBNull.Value AndAlso Row("Text") <> "" Then
rpt.txtInfo.Text &= vbNewLine & vbNewLine & Row("Text")
rpt.txtVermerk.Text = (If(Row("Text"), "").ToString.Trim & vbNewLine & vbNewLine & If(Row("Notiz"), "").ToString.Trim).ToString.Trim

View File

@@ -929,7 +929,7 @@ Public Class frmFaktEmail
For Each a In ATTACHMENTS
If a.Pfad.ToString.Contains("VERAG") Or a.Pfad.ToString.Contains("IDS") Or a.Pfad.ToString.Contains("MSE") Or a.Pfad.ToString.Contains("UTA") Or a.Pfad.ToString.Contains("PLOSE") Or a.Pfad.ToString.Contains("RMC") Then
myListLiefereranten.Add(a.Pfad)
ElseIf a.Pfad.ToString.Contains("POS-LISTE") Then
ElseIf a.Pfad.ToString.Contains("POS_LISTE") Or a.Pfad.ToString.Contains("POS-LISTE") Then
myListPOSLIST.Add(a.Pfad)
Else
myList.Add(a.Pfad)
@@ -952,10 +952,11 @@ Public Class frmFaktEmail
If FormularManagerNEU.MergePdfFiles(myList, zielPfadZusammenfassung) AndAlso list2megered Then
If FormularManagerNEU.MergePdfFiles(myList, zielPfadZusammenfassung) Then
ATTACHMENTS.Add(New cFakt_MailATTach(zielPfadZusammenfassung, ""))
If myListLiefereranten.Count > 0 Then ATTACHMENTS.Add(New cFakt_MailATTach(zielPfadZusammenfassung_Lieferantenrechnungen, ""))
If zielPfadZusammenfassung_POSListe.Count > 0 Then ATTACHMENTS.Add(New cFakt_MailATTach(zielPfadZusammenfassung_POSListe, ""))
End If

View File

@@ -2134,7 +2134,7 @@ Public Class usrCntlFaktAbrechnung
Select Case cboRgGS.SelectedIndex
Case 0 : RECHNUNG.[BelegartenKz] = "AR" : RECHNUNG.[BelegartenNr] = 70 : RECHNUNG.Vorzeichen = "+" : RECHNUNG.BelegartenBez = "Rechnung" : RECHNUNG.Text = cProgramFunctions.isLeerNothing(txtText.Text) : RECHNUNG.TextZZ = cProgramFunctions.isLeerNothing(txtTextZZ.Text)
Case 1 : RECHNUNG.[BelegartenKz] = "AG" : RECHNUNG.[BelegartenNr] = 71 : RECHNUNG.Vorzeichen = "-" : RECHNUNG.BelegartenBez = "Gutschrift" : RECHNUNG.Text = ""
Case 1 : RECHNUNG.[BelegartenKz] = "AG" : RECHNUNG.[BelegartenNr] = 71 : RECHNUNG.Vorzeichen = "-" : RECHNUNG.BelegartenBez = "Gutschrift" : RECHNUNG.Text = "" : If RECHNUNG.Firma_ID = 19 Then RECHNUNG.TextZZ = cProgramFunctions.isLeerNothing(txtTextZZ.Text)
End Select
RECHNUNG.Sammelrechnung = cProgramFunctions.isLeerNothing(cboSammelrechnung._value)
@@ -2697,9 +2697,17 @@ Public Class usrCntlFaktAbrechnung
If curBearbPreis = curBGebBetrag * 2 AndAlso minBetragRMCUsed Then 'wenn RMCPOS und MIND-BERTAG 2x verrechnet -> nur 1x berechnen
If curBearbPreis <> row.Cells("Preis").Value Then row.Cells("Preis").Value = curBGebBetrag / 2
ElseIf curBearbPreis <> curBGebBetrag * 2 AndAlso summeRMCBearb <> curBearbPreis AndAlso (minBetragRMCUsed OrElse isRMC OrElse isFREMD) AndAlso summeRMCBearb > curBGebMinBetrag Then 'wenn RMCPOS und Summe der berechneten Bearb > Mindestbetrag --> berechnetBearb verrechnet!
If summeRMCBearb <> row.Cells("Preis").Value Then row.Cells("Preis").Value = summeRMCBearb
If summeRMCBearb <> row.Cells("Preis").Value Then
If Math.Abs(row.Cells("Preis").Value - summeRMCBearb) > 0.5 Then 'Rundungsdifferenzen ignorieren (weil sonst Deadloop)
row.Cells("Preis").Value = summeRMCBearb
End If
End If
End If
Else
If minBetragRMCUsed Then
@@ -4853,14 +4861,14 @@ mwst:
If isRMCKunde Then
If OFFERT_RMC AndAlso sumRMC <> 0 Then
r.Cells("Preis").Value = sumRMC * -1
r.Cells("Preis").Value = sumRMC '* -1
ElseIf OFFERT_FREMD AndAlso sumFremdBeleg <> 0 Then
r.Cells("Preis").Value = sumFremdBeleg * -1
r.Cells("Preis").Value = sumFremdBeleg '* -1
End If
Else
If sumBelegVZ <> 0 Then
r.Cells("Preis").Value = sumBelegVZ * -1
r.Cells("Preis").Value = sumBelegVZ '* -1
Else
Dim GesamtUSteuerEUR As Double = SQL.DLookup("isnull(sum(UStVPo_USteuerbetragEUR),0)", "tblUStVPositionen", "UStVAn_ID='" & antrag.UStVAn_ID & "'", "FMZOLL", "0")
@@ -4868,7 +4876,7 @@ mwst:
Dim DiffernezbetragEUR As Double = GesamtUSteuerEUR - GesamtErstattungEUR
If DiffernezbetragEUR <> 0 Then
r.Cells("Preis").Value = DiffernezbetragEUR * -1
r.Cells("Preis").Value = DiffernezbetragEUR '* -1
End If
End If

View File

@@ -109,8 +109,14 @@ Public Class frmNacherfassungNEU
cboSachbearbeiter.fillWithSQL("SELECT ID, Name FROM Personal WHERE [Status]<>'L' " & sbWhere & " and [SBSichtbar]=1 ORDER BY Name ", False, "FMZOLL", True)
End If
Dim enableWoelfl As Boolean = IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA_ID = 19, True, False)
txtEmpfaenger._displayWoelflKd = enableWoelfl
txtAuftraggeber._displayWoelflKd = enableWoelfl
txtAvisierer._displayWoelflKd = enableWoelfl
txtEmpfaenger._displayWoelflKd = enableWoelfl
txtEndEmpf._displayWoelflKd = enableWoelfl
txtFraechter._displayWoelflKd = enableWoelfl
If SQL.getValueTxtBySql("SELECT count(*) FROM tblAbfertigungsartenFiliale WHERE Filialennr='" & cboFiliale._value & "'", "FMZOLL") > 0 Then