MDM, USTVA

This commit is contained in:
2025-01-03 10:40:22 +01:00
parent e45f865a0d
commit ee00953ee5
3 changed files with 39 additions and 32 deletions

View File

@@ -1144,7 +1144,7 @@ Public Class frmMDMDatenverarbetiung
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
Dim verarbOK = IIf(test, False, True)
If Not gen_SPEDBUCH_ByKdNr(R_PLOSE("AdressenNr"), SPEDBUCH, "PLOSE", R_PLOSE("PLOSEKundenNr"), dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString) Then verarbOK = False
If Not gen_SPEDBUCH_ByKdNr(R_PLOSE("AdressenNr"), SPEDBUCH, "PLOSE", R_PLOSE("PLOSEKundenNr"), dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString, datPloseAnhang.Value) Then verarbOK = False
If Not gen_RECHNUNG_BySPEDBUCH(R_PLOSE("AdressenNr"), SPEDBUCH, "PLOSE", R_PLOSE("PLOSEKundenNr"), dat_Sum_Von.Value, dat_Sum_Bis.Value) Then verarbOK = False
' ANHÄNGE WERDEN NCIHT BENÖTIGT::genPLOSEAttachmentByKdNr(R_PLOSE("AdressenNr"), R_PLOSE("PLOSEKundenNr"), dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString, dir)
@@ -1269,7 +1269,7 @@ Public Class frmMDMDatenverarbetiung
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
Dim verarbOK = IIf(test, False, True)
If Not gen_SPEDBUCH_ByKdNr(uta("Customer Nr"), SPEDBUCH, "UTA") Then verarbOK = False
If Not gen_SPEDBUCH_ByKdNr(uta("Customer Nr"), SPEDBUCH, "UTA",,,, datPloseAnhang.Value) Then verarbOK = False
If Not gen_RECHNUNG_BySPEDBUCH(uta("Customer Nr"), SPEDBUCH, "UTA") Then verarbOK = False
genUTAAttachmentByKdNr(uta("Customer Nr"), uta("Customer ID"), dir, datPloseAnhang.Value)
@@ -1406,7 +1406,7 @@ Public Class frmMDMDatenverarbetiung
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
Dim verarbOK = IIf(test, False, True)
If Not gen_SPEDBUCH_ByKdNr(MSE("Customer Nr"), SPEDBUCH, "MSE") Then verarbOK = False
If Not gen_SPEDBUCH_ByKdNr(MSE("Customer Nr"), SPEDBUCH, "MSE",,,, datPloseAnhang.Value) Then verarbOK = False
If Not gen_RECHNUNG_BySPEDBUCH(MSE("Customer Nr"), SPEDBUCH, "MSE") Then verarbOK = False
genMSEAttachmentByKdNr(MSE("Customer Nr"), MSE("Customer ID"), dir, datPloseAnhang.Value)
@@ -1525,7 +1525,7 @@ Public Class frmMDMDatenverarbetiung
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
Dim verarbOK = IIf(test, False, True)
If Not gen_SPEDBUCH_ByKdNr(IDS("KdNrVERAG"), SPEDBUCH, art) Then verarbOK = False
If Not gen_SPEDBUCH_ByKdNr(IDS("KdNrVERAG"), SPEDBUCH, art,,,, datPloseAnhang.Value) Then verarbOK = False
If Not gen_RECHNUNG_BySPEDBUCH(IDS("KdNrVERAG"), SPEDBUCH, art) Then verarbOK = False
If IDS("Rechnungsdruck") = 2 Then
@@ -1695,7 +1695,7 @@ Public Class frmMDMDatenverarbetiung
For Each R_ASFINAG In distinctDT_distKunden.Rows
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
Dim verarbOK = IIf(test, False, True)
If Not gen_SPEDBUCH_ByKdNr(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG") Then verarbOK = False
If Not gen_SPEDBUCH_ByKdNr(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG",,,, abrechnungsdatum) Then verarbOK = False
If Not gen_RECHNUNG_BySPEDBUCH(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG") Then verarbOK = False
If verarbOK Then
@@ -3098,7 +3098,7 @@ Public Class frmMDMDatenverarbetiung
End Function
Function gen_SPEDBUCH_ByKdNr(KdNr As String, ByRef SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch, Lieferant As String, Optional PLOSEKundenNr As String = "", Optional von As Date = Nothing, Optional bis As Date = Nothing)
Function gen_SPEDBUCH_ByKdNr(KdNr As String, ByRef SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch, Lieferant As String, Optional PLOSEKundenNr As String = "", Optional von As Date = Nothing, Optional bis As Date = Nothing, Optional abrechnugsdatum As Date = Nothing)
Try
If KdNr = "" Then Return False
@@ -3117,7 +3117,10 @@ Public Class frmMDMDatenverarbetiung
Case "IDS_AT" : OffertenNr = 21 : Abfertigungsart = 10 : SPEDBUCH.FilialenNr = 4868
End Select
SPEDBUCH.AbfertigungsNr = VERAG_PROG_ALLGEMEIN.cAllgemein.getMaxPosNrIncrement(SPEDBUCH.FilialenNr, Now.Year)
Dim GJ = Now.Year
If IsDate(abrechnugsdatum) Then GJ = cRKSV.getGJ(abrechnugsdatum, 15)
SPEDBUCH.AbfertigungsNr = VERAG_PROG_ALLGEMEIN.cAllgemein.getMaxPosNrIncrement(SPEDBUCH.FilialenNr, GJ)
SPEDBUCH.NewUNTER_NR()
SPEDBUCH.Vermittler = AD.Ordnungsbegriff