|
|
|
|
@@ -448,14 +448,14 @@ Public Class frmMDMDatenverarbetiung
|
|
|
|
|
Dim displayFilter = False
|
|
|
|
|
Dim sqlstr As String = ""
|
|
|
|
|
|
|
|
|
|
sqlstr &= " SELECT Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country AS Country,trans.device_product_type AS CardType, Sum(trans.transaction_gross_amount) AS [Transaction Amount], Sum(trans.total_gross_amount) AS [Total Amount]
|
|
|
|
|
sqlstr &= " SELECT Adressen.AdressenNr as KundenNr, Adressen.[Name 1] as Name, trans.transaction_country AS Country,trans.device_product_type AS CardType, trans.device_product_number AS CardNr,Sum(trans.transaction_gross_amount) AS [Transaction Amount], Sum(trans.total_gross_amount) AS [Total Amount]
|
|
|
|
|
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
|
|
|
|
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
|
|
|
|
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
|
|
|
|
inner 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 & "' and trans.charged <> 1
|
|
|
|
|
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type order by cust.customer_id"
|
|
|
|
|
GROUP BY Adressen.AdressenNr, Adressen.[Name 1], trans.transaction_country, trans.device_product_type, trans.device_product_number "
|
|
|
|
|
|
|
|
|
|
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
|
|
|
|
'DataGridView.DataSource = dt
|
|
|
|
|
@@ -468,9 +468,8 @@ Public Class frmMDMDatenverarbetiung
|
|
|
|
|
|
|
|
|
|
rpt.DataSource = dt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'If cbxProdukt.Checked Then
|
|
|
|
|
' rpt.GroupHeader2.DataField = "prod_descr"
|
|
|
|
|
|
|
|
|
|
'Else
|
|
|
|
|
' rpt.GroupHeader2.Visible = False
|
|
|
|
|
' rpt.GroupFooter2.Visible = False
|
|
|
|
|
@@ -503,7 +502,7 @@ Public Class frmMDMDatenverarbetiung
|
|
|
|
|
|
|
|
|
|
rpt.lblKundennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("KundenNr").Value, "")
|
|
|
|
|
rpt.lblName1.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Name").Value, "")
|
|
|
|
|
rpt.lblKartennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("Country").Value, "") & " " & SQL.isDbnullEmpty(rpt.Fields.Item("CardType").Value, "")
|
|
|
|
|
rpt.lblKartennr.Text = SQL.isDbnullEmpty(rpt.Fields.Item("CardType").Value, "") & " - " & SQL.isDbnullEmpty(rpt.Fields.Item("Country").Value, "") & " - " & SQL.isDbnullEmpty(rpt.Fields.Item("CardNr").Value, "")
|
|
|
|
|
|
|
|
|
|
rpt.lblNetto.Text = SQL.isDbnullEmptyDbl(rpt.Fields.Item("Transaction Amount").Value, 2, "")
|
|
|
|
|
rpt.lblMWST.Text = "" 'SQL.isDbnullEmptyDbl(CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Brutto_in_Darstellwährung").Value) - CDbl(rpt.Fields.Item("SummevonGesamtbetrag_Netto_in_Darstellwährung").Value), 2, "")
|
|
|
|
|
@@ -525,7 +524,7 @@ Public Class frmMDMDatenverarbetiung
|
|
|
|
|
AddHandler rpt.ReportFooter1.Format, Sub()
|
|
|
|
|
|
|
|
|
|
rpt.lblSumNetto.Text = sumNetto.ToString("N2")
|
|
|
|
|
'rpt.lblSumMwst.Text = sumMWST.ToString("N2")
|
|
|
|
|
rpt.lblSumMwst.Text = "" 'sumMWST.ToString("N2")
|
|
|
|
|
rpt.lblSumBrutto.Text = sumBrutto.ToString("N2")
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
@@ -3443,7 +3442,7 @@ Public Class frmMDMDatenverarbetiung
|
|
|
|
|
|
|
|
|
|
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]) ", "AVISO"))
|
|
|
|
|
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"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|