Merge branch 'newMaster2024' of https://dev.azure.com/VeragAG/_git/SDL into newMaster2024
This commit is contained in:
@@ -2814,6 +2814,7 @@ Public Class cFakturierung
|
|||||||
Aktuelle_RgNr = getNewRgNr(Firma_ID, Buchungsjahr) 'Nimmt die aktuelle RgNr und zählt eine Pos. hoch.
|
Aktuelle_RgNr = getNewRgNr(Firma_ID, Buchungsjahr) 'Nimmt die aktuelle RgNr und zählt eine Pos. hoch.
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
DruckdatumUhrzeit = Now.ToString("dd.MM.yyyy HH:mm:ss.fff")
|
DruckdatumUhrzeit = Now.ToString("dd.MM.yyyy HH:mm:ss.fff")
|
||||||
|
|
||||||
If listPDFs Is Nothing Then listPDFs = New List(Of String)
|
If listPDFs Is Nothing Then listPDFs = New List(Of String)
|
||||||
@@ -2842,6 +2843,19 @@ Public Class cFakturierung
|
|||||||
AvisoIdTmp = RG.AvisoID
|
AvisoIdTmp = RG.AvisoID
|
||||||
FilialeTmp = RG.FilialenNr
|
FilialeTmp = RG.FilialenNr
|
||||||
FIRMATmp = RG.Firma_ID
|
FIRMATmp = RG.Firma_ID
|
||||||
|
Case 6 'MDM Abrechnung
|
||||||
|
If kdTmp < 0 Then kdTmp = RG.RechnungsKundenNr 'erstes Mal
|
||||||
|
' If FilialeTmp < 0 Then FilialeTmp = RG.FilialenNr 'erstes Mal
|
||||||
|
If FIRMATmp < 0 Then FIRMATmp = RG.Firma_ID 'erstes Mal
|
||||||
|
If kdTmp <> RG.RechnungsKundenNr Or FIRMATmp <> RG.Firma_ID Then 'Or FilialeTmp <> RG.FilialenNr
|
||||||
|
|
||||||
|
' KEIN doSAMMELRechnungsDruck_Abschnitt!!!!
|
||||||
|
Aktuelle_RgNr = getNewRgNr(Firma_ID, Buchungsjahr)
|
||||||
|
|
||||||
|
End If
|
||||||
|
kdTmp = RG.RechnungsKundenNr
|
||||||
|
FilialeTmp = RG.FilialenNr
|
||||||
|
FIRMATmp = RG.Firma_ID
|
||||||
Case Else
|
Case Else
|
||||||
If kdTmp < 0 Then kdTmp = RG.RechnungsKundenNr 'erstes Mal
|
If kdTmp < 0 Then kdTmp = RG.RechnungsKundenNr 'erstes Mal
|
||||||
' If FilialeTmp < 0 Then FilialeTmp = RG.FilialenNr 'erstes Mal
|
' If FilialeTmp < 0 Then FilialeTmp = RG.FilialenNr 'erstes Mal
|
||||||
@@ -2861,7 +2875,13 @@ Public Class cFakturierung
|
|||||||
RG.[VorschauID] = VorschauID
|
RG.[VorschauID] = VorschauID
|
||||||
Else
|
Else
|
||||||
RG.[RechnungsNr] = Aktuelle_RgNr
|
RG.[RechnungsNr] = Aktuelle_RgNr
|
||||||
RG.[Status] = 3
|
|
||||||
|
If SammelrechungArt = 6 Then
|
||||||
|
RG.[Status] = 2 'Bei MDM Abrechnung; Druck später!!
|
||||||
|
Else
|
||||||
|
RG.[Status] = 3
|
||||||
|
End If
|
||||||
|
|
||||||
RG.[RechnungsDatum] = Rechnungsdatum.ToShortDateString
|
RG.[RechnungsDatum] = Rechnungsdatum.ToShortDateString
|
||||||
RG.[Buchungsjahr] = Buchungsjahr
|
RG.[Buchungsjahr] = Buchungsjahr
|
||||||
RG.[DruckDatumZeit] = DruckdatumUhrzeit.ToString("dd.MM.yyyy HH:mm:ss.fff")
|
RG.[DruckDatumZeit] = DruckdatumUhrzeit.ToString("dd.MM.yyyy HH:mm:ss.fff")
|
||||||
@@ -4071,6 +4091,7 @@ Public Class cFakturierung
|
|||||||
rpt.Dispose()
|
rpt.Dispose()
|
||||||
Return True
|
Return True
|
||||||
|
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1667,7 +1667,7 @@ Public Class usrCntlMDMAuswertungen
|
|||||||
If dtSammelRechnugen.Rows.Count > 0 Then
|
If dtSammelRechnugen.Rows.Count > 0 Then
|
||||||
For Each re In dtSammelRechnugen.Rows
|
For Each re In dtSammelRechnugen.Rows
|
||||||
|
|
||||||
reIsSet = cFakturierung.doSAMMELRechnungsDruck(19, 6, rechnungsdatum, rechnungsdatum, "", False, , re("RechnungsKundenNr"), 7, , , , Today(), , ,,, ,, )
|
reIsSet = cFakturierung.doSAMMELRechnungsDruck(19, 6, rechnungsdatum, rechnungsdatum, "", False, False, re("RechnungsKundenNr"), 7, , , , Nothing, , ,,, ,, )
|
||||||
|
|
||||||
If Not reIsSet Then Return reIsSet
|
If Not reIsSet Then Return reIsSet
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports com.sun.corba.se.spi.orb
|
Imports com.sun.corba.se.spi.orb
|
||||||
|
Imports java.lang
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_declarations_ApiResponseHandler
|
Imports VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_declarations_ApiResponseHandler
|
||||||
|
|
||||||
@@ -9,7 +10,7 @@ Public Class cATEZ_ncts_api
|
|||||||
|
|
||||||
Shared API_KEY = "2a6fe6bf-6547-4d56-b14a-8a18f94f9e94"
|
Shared API_KEY = "2a6fe6bf-6547-4d56-b14a-8a18f94f9e94"
|
||||||
|
|
||||||
Public Shared Sub query_declarations(startDate As Date, endDate As Date)
|
Public Shared Sub query_declarations(startDate As Date, endDate As Date, Optional OverrideNCTSFin As Boolean = False)
|
||||||
Try
|
Try
|
||||||
' This example assumes the Chilkat API to have been previously unlocked.
|
' This example assumes the Chilkat API to have been previously unlocked.
|
||||||
' See Global Unlock Sample for sample code.
|
' See Global Unlock Sample for sample code.
|
||||||
@@ -53,87 +54,93 @@ Public Class cATEZ_ncts_api
|
|||||||
NCTS_FREMD.ncts_Partnersystem = "ATEZ"
|
NCTS_FREMD.ncts_Partnersystem = "ATEZ"
|
||||||
NCTS_FREMD.ncts_MRN = NCTS_TMP.Mrn
|
NCTS_FREMD.ncts_MRN = NCTS_TMP.Mrn
|
||||||
|
|
||||||
|
If NCTS_FREMD.ncts_Status = 60 And OverrideNCTSFin = False Then
|
||||||
NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
'Wenn NCTS beretis Erledigt und kein Flag fürs überschreiben, mach nix....
|
||||||
|
Else
|
||||||
If NCTS_TMP.MrnDate IsNot Nothing Then
|
|
||||||
If If(NCTS_FREMD.ncts_LimitDate, "").ToString = "" Then NCTS_FREMD.ncts_LimitDate = CDate(NCTS_TMP.MrnDate).AddDays(10)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
'RELEASED
|
NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
||||||
'IN_USE
|
|
||||||
If NCTS_TMP.GuaranteeUsageStatus IsNot Nothing Then
|
|
||||||
Select Case NCTS_TMP.GuaranteeUsageStatus
|
|
||||||
Case "IN_USE"
|
|
||||||
NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
|
||||||
NCTS_FREMD.ncts_Status = 50
|
|
||||||
Case "RELEASED"
|
|
||||||
NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
|
||||||
If If(NCTS_FREMD.ncts_Ankunft, "").ToString = "" Then NCTS_FREMD.ncts_Ankunft = NCTS_TMP.MrnDate
|
|
||||||
If If(NCTS_FREMD.ncts_Erledigung, "").ToString = "" Then NCTS_FREMD.ncts_Erledigung = NCTS_TMP.MrnDate
|
|
||||||
NCTS_FREMD.ncts_Status = 60
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
'WRT_NOT
|
If NCTS_TMP.MrnDate IsNot Nothing Then
|
||||||
'MRN_NOTIFIED
|
If If(NCTS_FREMD.ncts_LimitDate, "").ToString = "" Then NCTS_FREMD.ncts_LimitDate = CDate(NCTS_TMP.MrnDate).AddDays(10)
|
||||||
'GUAINF
|
|
||||||
'CTR_DEC
|
|
||||||
'CTRINFDEP
|
|
||||||
'MRN_ALL
|
|
||||||
'REL_TRA
|
|
||||||
'TRANSIT_CLOSE
|
|
||||||
'ARR_ADV
|
|
||||||
If NCTS_TMP.Status IsNot Nothing Then
|
|
||||||
Select Case NCTS_TMP.Status
|
|
||||||
Case "ARR_ADV"
|
|
||||||
If If(NCTS_FREMD.ncts_Ankunft, "").ToString = "" Then NCTS_FREMD.ncts_Ankunft = NCTS_TMP.MrnDate
|
|
||||||
NCTS_FREMD.ncts_Status = 53
|
|
||||||
Case "TRANSIT_CLOSE"
|
|
||||||
If If(NCTS_FREMD.ncts_Ankunft, "").ToString = "" Then NCTS_FREMD.ncts_Ankunft = NCTS_TMP.MrnDate
|
|
||||||
If If(NCTS_FREMD.ncts_Erledigung, "").ToString = "" Then NCTS_FREMD.ncts_Erledigung = NCTS_TMP.MrnDate
|
|
||||||
NCTS_FREMD.ncts_Status = 60
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
NCTS_FREMD.ncts_Status_KEWILL_Equivalent = NCTS_FREMD.ncts_Status
|
|
||||||
NCTS_FREMD.ncts_ObjectName = NCTS_TMP.Lrn
|
|
||||||
NCTS_FREMD.ncts_ActiveBorderTransportMeans_1_IdentificationNumber = NCTS_TMP.Trailer
|
|
||||||
|
|
||||||
|
|
||||||
NCTS_FREMD.LOAD_Guarantee()
|
|
||||||
|
|
||||||
NCTS_FREMD.ncts_GUARANTEE.Clear()
|
|
||||||
|
|
||||||
|
|
||||||
If NCTS_TMP.GuaranteeAmount > 0 AndAlso NCTS_TMP.Grn IsNot Nothing Then
|
|
||||||
|
|
||||||
Dim GRT = New cNCTS_FREMD_Guarantee
|
|
||||||
GRT.nctsGRT_Type = Nothing
|
|
||||||
|
|
||||||
GRT.nctsGRT_AccessCode = Nothing
|
|
||||||
GRT.nctsGRT_GRN = NCTS_TMP.Grn
|
|
||||||
GRT.nctsGRT_AmountToBeCoveredFremdWaehrung = NCTS_TMP.GuaranteeAmount
|
|
||||||
GRT.nctsGRT_Currency = NCTS_TMP.GuaranteeAmountCurrency
|
|
||||||
|
|
||||||
' MsgBox(If(GRT.nctsGRT_Currency, ""))
|
|
||||||
'--> EUR
|
|
||||||
If GRT.nctsGRT_AmountToBeCoveredFremdWaehrung IsNot Nothing Then
|
|
||||||
If If(GRT.nctsGRT_Currency, "") <> "EUR" Then
|
|
||||||
Dim betragEUR = VERAG_PROG_ALLGEMEIN.cEZB_Waehrungskurse.EXCHANGE_CURTOEUR(GRT.nctsGRT_AmountToBeCoveredFremdWaehrung, GRT.nctsGRT_Currency, NCTS_FREMD.ncts_Trans_DatumZeit.ToShortDateString)
|
|
||||||
GRT.nctsGRT_AmountToBeCovered = If(betragEUR > 0, betragEUR, GRT.nctsGRT_AmountToBeCoveredFremdWaehrung)
|
|
||||||
Else
|
|
||||||
GRT.nctsGRT_AmountToBeCovered = GRT.nctsGRT_AmountToBeCoveredFremdWaehrung
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
NCTS_FREMD.ncts_GUARANTEE.Clear()
|
'RELEASED
|
||||||
NCTS_FREMD.ncts_GUARANTEE.Add(GRT)
|
'IN_USE
|
||||||
End If
|
If NCTS_TMP.GuaranteeUsageStatus IsNot Nothing Then
|
||||||
|
Select Case NCTS_TMP.GuaranteeUsageStatus
|
||||||
|
Case "IN_USE"
|
||||||
|
NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
||||||
|
NCTS_FREMD.ncts_Status = 50
|
||||||
|
Case "RELEASED"
|
||||||
|
NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
|
||||||
|
If If(NCTS_FREMD.ncts_Ankunft, "").ToString = "" Then NCTS_FREMD.ncts_Ankunft = NCTS_TMP.MrnDate
|
||||||
|
If If(NCTS_FREMD.ncts_Erledigung, "").ToString = "" Then NCTS_FREMD.ncts_Erledigung = NCTS_TMP.MrnDate
|
||||||
|
NCTS_FREMD.ncts_Status = 60
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
|
||||||
NCTS_FREMD.SAVE_ALL()
|
'WRT_NOT
|
||||||
|
'MRN_NOTIFIED
|
||||||
|
'GUAINF
|
||||||
|
'CTR_DEC
|
||||||
|
'CTRINFDEP
|
||||||
|
'MRN_ALL
|
||||||
|
'REL_TRA
|
||||||
|
'TRANSIT_CLOSE
|
||||||
|
'ARR_ADV
|
||||||
|
If NCTS_TMP.Status IsNot Nothing Then
|
||||||
|
Select Case NCTS_TMP.Status
|
||||||
|
Case "ARR_ADV"
|
||||||
|
If If(NCTS_FREMD.ncts_Ankunft, "").ToString = "" Then NCTS_FREMD.ncts_Ankunft = NCTS_TMP.MrnDate
|
||||||
|
NCTS_FREMD.ncts_Status = 53
|
||||||
|
Case "TRANSIT_CLOSE"
|
||||||
|
If If(NCTS_FREMD.ncts_Ankunft, "").ToString = "" Then NCTS_FREMD.ncts_Ankunft = NCTS_TMP.MrnDate
|
||||||
|
If If(NCTS_FREMD.ncts_Erledigung, "").ToString = "" Then NCTS_FREMD.ncts_Erledigung = NCTS_TMP.MrnDate
|
||||||
|
NCTS_FREMD.ncts_Status = 60
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
NCTS_FREMD.ncts_Status_KEWILL_Equivalent = NCTS_FREMD.ncts_Status
|
||||||
|
NCTS_FREMD.ncts_ObjectName = NCTS_TMP.Lrn
|
||||||
|
NCTS_FREMD.ncts_ActiveBorderTransportMeans_1_IdentificationNumber = NCTS_TMP.Trailer
|
||||||
|
|
||||||
|
|
||||||
|
NCTS_FREMD.LOAD_Guarantee()
|
||||||
|
|
||||||
|
NCTS_FREMD.ncts_GUARANTEE.Clear()
|
||||||
|
|
||||||
|
|
||||||
|
If NCTS_TMP.GuaranteeAmount > 0 AndAlso NCTS_TMP.Grn IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim GRT = New cNCTS_FREMD_Guarantee
|
||||||
|
GRT.nctsGRT_Type = Nothing
|
||||||
|
|
||||||
|
GRT.nctsGRT_AccessCode = Nothing
|
||||||
|
GRT.nctsGRT_GRN = NCTS_TMP.Grn
|
||||||
|
GRT.nctsGRT_AmountToBeCoveredFremdWaehrung = NCTS_TMP.GuaranteeAmount
|
||||||
|
GRT.nctsGRT_Currency = NCTS_TMP.GuaranteeAmountCurrency
|
||||||
|
|
||||||
|
' MsgBox(If(GRT.nctsGRT_Currency, ""))
|
||||||
|
'--> EUR
|
||||||
|
If GRT.nctsGRT_AmountToBeCoveredFremdWaehrung IsNot Nothing Then
|
||||||
|
If If(GRT.nctsGRT_Currency, "") <> "EUR" Then
|
||||||
|
Dim betragEUR = VERAG_PROG_ALLGEMEIN.cEZB_Waehrungskurse.EXCHANGE_CURTOEUR(GRT.nctsGRT_AmountToBeCoveredFremdWaehrung, GRT.nctsGRT_Currency, NCTS_FREMD.ncts_Trans_DatumZeit.ToShortDateString)
|
||||||
|
GRT.nctsGRT_AmountToBeCovered = If(betragEUR > 0, betragEUR, GRT.nctsGRT_AmountToBeCoveredFremdWaehrung)
|
||||||
|
Else
|
||||||
|
GRT.nctsGRT_AmountToBeCovered = GRT.nctsGRT_AmountToBeCoveredFremdWaehrung
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
NCTS_FREMD.ncts_GUARANTEE.Clear()
|
||||||
|
NCTS_FREMD.ncts_GUARANTEE.Add(GRT)
|
||||||
|
End If
|
||||||
|
|
||||||
|
NCTS_FREMD.SAVE_ALL()
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|||||||
Reference in New Issue
Block a user