MDM
This commit is contained in:
@@ -3421,7 +3421,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||
left join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||
left join adressen ON cust.[customer_id] = Adressen.MSEKundenNr
|
||||
WHERE bills.[invoice_date] = '" & DateTimePicker2.Text & "'
|
||||
WHERE bills.[invoice_date] = '" & DateTimePicker2.Text & "'
|
||||
GROUP BY cust.customer_id, cust.customer_name, Adressen.AdressenNr
|
||||
HAVING (((cust.customer_id) Is Not Null) AND ((Adressen.AdressenNr) Is Null)) OR (((cust.customer_id) Is Not Null) AND ((Adressen.AdressenNr) Is Not Null) AND (((SELECT Offerten.OffertenNr FROM Offerten WHERE (((Offerten.KundenNr)=isnull(Adressen.[AdressenNr],0)) AND ((Offerten.OffertenNr)=23)))) Is Null)))as a", "FMZOLL"))
|
||||
|
||||
@@ -3431,8 +3431,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Dim falscheLeistungsnummern As Integer = CInt((New SQL).getValueTxtBySql("select count (*) from (Select trans.device_product_type, trans.transaction_country,trans.transaction_product_name, trans.transaction_product_id, cust.[customer_id], trans.partner_haulier_id, cust.customer_name,
|
||||
Dim sqlStringfalscheLeistungsNr = "select count (*) from (Select trans.device_product_type, trans.transaction_country,trans.transaction_product_name, trans.transaction_product_id, cust.[customer_id], trans.partner_haulier_id, cust.customer_name,
|
||||
sum(trans.transaction_gross_amount) As [Summe Transaction Amount ( EUR )],
|
||||
sum(trans.msts_fee_amount) As [Summe Admin Fee Amount ( EUR )],
|
||||
sum(trans.msts_fee_amount) As [Summe Fees And Costs Amount ( EUR )],
|
||||
@@ -3444,32 +3443,26 @@ Public Class frmMDMDatenverarbetiung
|
||||
Left Join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] And inv.customer_number = cust.[customer_id] And trans.transaction_country = inv.country
|
||||
Left Join tblMSELeistungen ON trans.device_product_type = tblMSELeistungen.[Card Type] And trans.transaction_country = tblMSELeistungen.[Transaction Country]
|
||||
WHERE((trans.transaction_gross_amount <> 0) And tblMSELeistungen.LeistungsNr Is Null) And bills.[invoice_date] = '" & DateTimePicker2.Text & "'
|
||||
GROUP by trans.device_product_type, trans.transaction_country, trans.transaction_product_name, trans.transaction_product_id, cust.[customer_id], trans.partner_haulier_id, cust.customer_name) as a", "FMZOLL"))
|
||||
GROUP by trans.device_product_type, trans.transaction_country, trans.transaction_product_name, trans.transaction_product_id, cust.[customer_id], trans.partner_haulier_id, cust.customer_name) as a"
|
||||
|
||||
Dim falscheLeistungsnummern As Integer = CInt((New SQL).getValueTxtBySql(sqlStringfalscheLeistungsNr, "FMZOLL"))
|
||||
|
||||
|
||||
If falscheLeistungsnummern > 0 Then
|
||||
|
||||
pruefData_MSE = False
|
||||
MsgBox("Es fehlen " & falscheLeistungsnummern & " Leistungsnummern!" & vbNewLine & "Diese Leistungssnummern (von Rechnung " & DateTimePicker2.Text & ") müssen nachgetragen werden. (bitte an Administrator wenden, tblMSELeistungen).")
|
||||
Return False
|
||||
|
||||
End If
|
||||
|
||||
Dim fehlendeTransactionen As Integer = 0
|
||||
|
||||
fehlendeTransactionen = CInt((New SQL).getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & DateTimePicker2.Text & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "FMZOLL"))
|
||||
|
||||
|
||||
If fehlendeTransactionen > 0 Then
|
||||
pruefData_MSE = False
|
||||
Dim hint As String = ""
|
||||
If fehlendeTransactionen > 500 Then
|
||||
hint = "Batch-Nr: "
|
||||
hint &= SQL.getValueTxtBySql("select distinct(trans.batch_seq_nr) FROM [VERAG].[dbo].[tblMSESettlements] as settle INNER JOIN [VERAG].[dbo].[tblMSETransactions] as trans on trans.transaction_id = settle.transaction_id where [invoice_date] = '" & DateTimePicker2.Text & "' AND trans.[transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "FMZOLL")
|
||||
If Not SQL.doSQL("update [VERAG].[dbo].[tblMSETransactions] set device_product_type = 'HUGO SIM renewal cost' where transaction_product_id = 453 and transaction_product_name like 'HUGO SIM renewal cost%'", "FMZOLL") Then
|
||||
MsgBox("Fehler beim Setzen der HUGO SIM renewal cost")
|
||||
Return False
|
||||
End If
|
||||
MsgBox("Es fehlen " & fehlendeTransactionen & " Transaktionen in der Datenbank!" & vbNewLine & "Diese Transaktionen (von Rechnung " & DateTimePicker2.Text & ") müssen nachgeladen werden (bitte an Administrator wenden)." & IIf(hint <> "", vbNewLine & hint, ""))
|
||||
End If
|
||||
|
||||
falscheLeistungsnummern = CInt((New SQL).getValueTxtBySql(sqlStringfalscheLeistungsNr, "FMZOLL"))
|
||||
If falscheLeistungsnummern > 0 Then
|
||||
pruefData_MSE = False
|
||||
MsgBox("Es fehlen " & falscheLeistungsnummern & " Leistungsnummern!" & vbNewLine & "Diese Leistungssnummern (von Rechnung " & DateTimePicker2.Text & ") müssen nachgetragen werden. (bitte an Administrator wenden, tblMSELeistungen).")
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim nichtAufAbgerechnetGesetzteTransactionen As Integer = 0
|
||||
|
||||
@@ -3485,6 +3478,22 @@ Public Class frmMDMDatenverarbetiung
|
||||
MsgBox("Es sind " & nichtAufAbgerechnetGesetzteTransactionen & " Transaktionen in der Datenbank, die noch nicht auf VERRECHNET gesetzt sind!" & vbNewLine & "Diese Transaktionen (von Rechnung " & DateTimePicker2.Text & ") müssen aktualisiert werden. (bitte an Administrator wenden)." & IIf(hint <> "", vbNewLine & hint, ""))
|
||||
End If
|
||||
|
||||
|
||||
'das muss die letzte Prüfung sein, da uU eine Transaktion fehlen kann!
|
||||
Dim fehlendeTransactionen As Integer = 0
|
||||
|
||||
fehlendeTransactionen = CInt((New SQL).getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[tblMSESettlements] where [invoice_date] = '" & DateTimePicker2.Text & "' AND [transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "FMZOLL"))
|
||||
|
||||
If fehlendeTransactionen > 0 Then
|
||||
pruefData_MSE = False
|
||||
Dim hint As String = ""
|
||||
If fehlendeTransactionen > 500 Then
|
||||
hint = "Batch-Nr: "
|
||||
hint &= SQL.getValueTxtBySql("select distinct(trans.batch_seq_nr) FROM [VERAG].[dbo].[tblMSESettlements] as settle INNER JOIN [VERAG].[dbo].[tblMSETransactions] as trans on trans.transaction_id = settle.transaction_id where [invoice_date] = '" & DateTimePicker2.Text & "' AND trans.[transaction_id] not in (select [transaction_id] from [VERAG].[dbo].[tblMSETransactions]) ", "FMZOLL")
|
||||
End If
|
||||
MsgBox("Es fehlen " & fehlendeTransactionen & " Transaktionen in der Datenbank!" & vbNewLine & "Diese Transaktionen (von Rechnung " & DateTimePicker2.Text & ") müssen nachgeladen werden (bitte an Administrator wenden)." & IIf(hint <> "", vbNewLine & hint, ""))
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
pruefData_MSE = False
|
||||
|
||||
Reference in New Issue
Block a user