Vorauskassen-Aviso - Offertenberechnung, DigicustAPI Fix
This commit is contained in:
@@ -361,9 +361,9 @@ Partial Class usrcntlVorauskasse
|
|||||||
Me.Label16.AutoSize = True
|
Me.Label16.AutoSize = True
|
||||||
Me.Label16.Location = New System.Drawing.Point(18, 240)
|
Me.Label16.Location = New System.Drawing.Point(18, 240)
|
||||||
Me.Label16.Name = "Label16"
|
Me.Label16.Name = "Label16"
|
||||||
Me.Label16.Size = New System.Drawing.Size(67, 13)
|
Me.Label16.Size = New System.Drawing.Size(53, 13)
|
||||||
Me.Label16.TabIndex = 26
|
Me.Label16.TabIndex = 26
|
||||||
Me.Label16.Text = "Papiere Porti"
|
Me.Label16.Text = "Fixe Taxe"
|
||||||
'
|
'
|
||||||
'Label18
|
'Label18
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -781,23 +781,30 @@ Public Class usrcntlVorauskasse
|
|||||||
|
|
||||||
|
|
||||||
'Dim SQL As New SQL
|
'Dim SQL As New SQL
|
||||||
Dim dt As DataTable = SQL.loadDgvBySql("SELECT [LeistungsNr], [BerechnungsartNr], [Preis], [Anzahl], [BGebLeistungsNr], [BGebProzent], [BGebMinBetrag], BerechnungsartPosInkludiert,[Eingegeben am],[Geändert am], [Sachbearbeiter], [PreisänderungProzent], [PreisAlt], [Preisänderung], KundenNr, OffertenNr FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr='1'", "FMZOLL")
|
' Dim dt As DataTable = SQL.loadDgvBySql("SELECT [LeistungsNr], [Preis], [Anzahl], BerechnungsartPosInkludiert FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr='1' and preis is not null order by LeistungsNr, Preis desc", "FMZOLL")
|
||||||
|
|
||||||
' wenn AnzahlPos angegeben, dann nur Berechnungsart = 10 verwenden,
|
Dim dt As DataTable = SQL.loadDgvBySql("SELECT [LeistungsNr], [Preis], [BerechnungsartNr] ,[Anzahl], BerechnungsartPosInkludiert FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr=(SELECT ISNULL(AO.ao_OffertenNr,-1) FROM tblAbfertigungsartOffertenstamm as AO WHERE AO.ao_Abfertigungsart='" & SENDUNG.tblSnd_Abfertigungsart_ID & "') and preis is not null order by LeistungsNr, Preis desc", "FMZOLL")
|
||||||
|
|
||||||
|
If dt.Rows.Count = 0 Then
|
||||||
|
MsgBox("Es konnten keine Offertpositionen für Abfertigunsgart" & SENDUNG.tblSnd_Abfertigungsart_ID & " ermittelt werden!")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
' wenn AnzahlPos angegeben, dann Berechnungsart = 10 verwenden,
|
||||||
If txtPos.Text <> "" AndAlso CInt(txtPos.Text) > 0 Then
|
If txtPos.Text <> "" AndAlso CInt(txtPos.Text) > 0 Then
|
||||||
For Each row As DataRow In dt.Select("BerechnungsartNr = '10'")
|
For Each row As DataRow In dt.Select("BerechnungsartNr = '10'")
|
||||||
If row("LeistungsNr") = 340 AndAlso Not IsDBNull(row("Preis")) Then
|
If row("LeistungsNr") = 340 Then
|
||||||
|
|
||||||
If IsDBNull(row("BerechnungsartPosInkludiert")) Then
|
If IsDBNull(row("BerechnungsartPosInkludiert")) Then
|
||||||
txtWeitereTarifPos.Text = row("Preis") * txtPos.Text
|
txtWeitereTarifPos._value = row("Preis") * txtPos.Text
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If row("BerechnungsartPosInkludiert") >= txtPos.Text Then
|
If row("BerechnungsartPosInkludiert") >= txtPos.Text Then
|
||||||
txtWeitereTarifPos.Text = row("Preis") * 1
|
txtWeitereTarifPos._value = row("Preis") * 1
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
txtWeitereTarifPos.Text = row("Preis") * (txtPos.Text - row("BerechnungsartPosInkludiert") + 1)
|
txtWeitereTarifPos._value = row("Preis") * (txtPos.Text - row("BerechnungsartPosInkludiert") + 1)
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -806,29 +813,21 @@ Public Class usrcntlVorauskasse
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Automatisches laden der Offerte -> Parameter müssen noch angepasst werden!
|
For Each row As DataRow In dt.Select("Anzahl = '1'")
|
||||||
|
If row("LeistungsNr") = 348 Then txtAviso._value = row("Preis")
|
||||||
|
If row("LeistungsNr") = 340 Then txtVerzollungskosten._value = row("Preis")
|
||||||
|
If row("LeistungsNr") = 324 Then txtATLAS._value = row("Preis")
|
||||||
|
If row("LeistungsNr") = 440 Then txtPapierePorti._value = row("Preis")
|
||||||
|
|
||||||
'For Each row As DataRow In dt.Select("BerechnungsartNr = '1' AND Preis is not null")
|
Next
|
||||||
' If row("LeistungsNr") = 348 Then txtAviso.Text = row("Preis")
|
|
||||||
|
|
||||||
'Next
|
initBerechnung()
|
||||||
|
|
||||||
'For Each row As DataRow In dt.Select("BerechnungsartNr = '8' AND Preis is not null")
|
'For Each row As DataRow In dt.Select("BerechnungsartNr = '8'")
|
||||||
|
|
||||||
' If row("LeistungsNr") = 60 Then txtVerzollungskosten.Text = row("Preis")
|
' If row("LeistungsNr") = 60 Then txtVerzollungskosten.Text = row("Preis")
|
||||||
' If row("LeistungsNr") = 20 Then txtZoll._value = row("Preis")
|
' If row("LeistungsNr") = 20 Then txtZoll._value = row("Preis")
|
||||||
|
|
||||||
'Next
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -651,6 +651,7 @@ Public Class cDigicustAPI
|
|||||||
'afterNormalization(overwrite -> werden mit mitgeschickten Infos überschrieben).
|
'afterNormalization(overwrite -> werden mit mitgeschickten Infos überschrieben).
|
||||||
json.UpdateString("priority", "afterNormalization")
|
json.UpdateString("priority", "afterNormalization")
|
||||||
json.UpdateString("documentStatus", "finished")
|
json.UpdateString("documentStatus", "finished")
|
||||||
|
json.UpdateString("documentType", "UserInput")
|
||||||
|
|
||||||
If sendung.consignee_name <> "" Then json.UpdateString("annotatedAggregated.consignee.name.input", sendung.consignee_name)
|
If sendung.consignee_name <> "" Then json.UpdateString("annotatedAggregated.consignee.name.input", sendung.consignee_name)
|
||||||
|
|
||||||
@@ -659,7 +660,7 @@ Public Class cDigicustAPI
|
|||||||
If sendung.consignee_eori <> "" Then json.UpdateString("annotatedAggregated.consignee.EORI.input", sendung.consignee_eori)
|
If sendung.consignee_eori <> "" Then json.UpdateString("annotatedAggregated.consignee.EORI.input", sendung.consignee_eori)
|
||||||
|
|
||||||
If sendung.licencePlate <> "" AndAlso sendung.lkwCountryId <> "" Then
|
If sendung.licencePlate <> "" AndAlso sendung.lkwCountryId <> "" Then
|
||||||
json.UpdateString("annotatedAggregated.meansOfTransportation[0].type", "Inland")
|
json.UpdateString("annotatedAggregated.meansOfTransportation[0].type", "Border")
|
||||||
json.UpdateString("annotatedAggregated.meansOfTransportation[0].value", "Road")
|
json.UpdateString("annotatedAggregated.meansOfTransportation[0].value", "Road")
|
||||||
json.UpdateString("annotatedAggregated.meansOfTransportation[0].licensePlate", sendung.licencePlate)
|
json.UpdateString("annotatedAggregated.meansOfTransportation[0].licensePlate", sendung.licencePlate)
|
||||||
json.UpdateString("annotatedAggregated.meansOfTransportation[0].countryCode", sendung.lkwCountryId)
|
json.UpdateString("annotatedAggregated.meansOfTransportation[0].countryCode", sendung.lkwCountryId)
|
||||||
|
|||||||
Reference in New Issue
Block a user