ustva, Antragspos
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports System.ServiceModel.Configuration
|
||||
Imports System.Windows.Documents
|
||||
Imports itextsharp.text.pdf
|
||||
Imports itextsharp.text.pdf.parser
|
||||
@@ -177,6 +176,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
|
||||
If da_id > 0 Then
|
||||
DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = Nothing
|
||||
DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
|
||||
End If
|
||||
|
||||
@@ -411,6 +411,7 @@ Public Class frmMDM_USTVAntrag
|
||||
'refreshDgv(kdNr, SDLNr, Kfz, History)'?????????????? ausgebelndet,was das ein VErsuch? 31.07.2017
|
||||
|
||||
Dim posIdinDGV As Boolean = False
|
||||
|
||||
For Each r As DataGridViewRow In dgvUSTVPositionen.Rows
|
||||
If r.Cells("UStVPo_ID").Value = POSId Then
|
||||
posIdinDGV = True
|
||||
@@ -420,6 +421,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If posIdinDGV Then
|
||||
dgvUSTVPositionen.VALUE_CHANGED = True
|
||||
init(POSId)
|
||||
Else
|
||||
init(dgvUSTVPositionen.Rows.Count + 1)
|
||||
End If
|
||||
@@ -694,9 +696,24 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
USTV_POS.UStVPo_Leistungsbezeichnung = "Maut"
|
||||
|
||||
Dim leistender As New cUStVLeistender(ANTRAG.plose_Lieferant & " " & Antrag_LandKz, Antrag_LandKz)
|
||||
Dim leistenderName As String = ""
|
||||
|
||||
Select Case Antrag_LandKz
|
||||
Case "DK"
|
||||
leistenderName = "A/S Storebealt"
|
||||
Case Else
|
||||
If ANTRAG.plose_Lieferant = "SOFICO BELGIO" Then
|
||||
leistenderName = "Sofico"
|
||||
Else
|
||||
leistenderName = ANTRAG.plose_Lieferant
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
Dim leistender As New cUStVLeistender(leistenderName & " " & Antrag_LandKz, Antrag_LandKz)
|
||||
If leistender.UStV_LeistenderId < 1 Then
|
||||
leistender = New cUStVLeistender(ANTRAG.plose_Lieferant.ToString)
|
||||
leistender = New cUStVLeistender(leistenderName)
|
||||
End If
|
||||
|
||||
USTV_POS.UStVPo_Leistender = leistender.UStV_Leistender
|
||||
@@ -1183,7 +1200,19 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Select Case Antrag_LandKz
|
||||
Case "RO"
|
||||
|
||||
leistenderName = "Kuwait Petroleum Romania S.R.L"
|
||||
Case "SE"
|
||||
leistenderName = "OK-Q8 AB"
|
||||
Case "DK"
|
||||
leistenderName = "Q8 Danmark A/S"
|
||||
Case "PL"
|
||||
leistenderName = "Kuwait Petroleum Sp. Z.o.o"
|
||||
Case "DE"
|
||||
leistenderName = "Kuwait Petroleum Gmbh"
|
||||
Case "IT"
|
||||
leistenderName = "Kuwait Petroleum Italie Spa"
|
||||
Case "ES"
|
||||
leistenderName = "Fuel Iberia S.L.U"
|
||||
Case Else
|
||||
leistenderName = "IDS EUROPE B.V."
|
||||
End Select
|
||||
@@ -1265,22 +1294,42 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
USTV_ANTRAG.UStVAn_LandNr = cbxLand._value
|
||||
|
||||
If USTV_ANTRAG.UStVAn_LandNr = "" Then
|
||||
MsgBox("Land muss gesetzt werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If cbxWahrung.SelectedValue Is Nothing Then
|
||||
USTV_ANTRAG.UStVAn_Währungscode = SQL.DLookup("Währungscode", "[Länderverzeichnis für die Außenhandelsstatistik]", "Landnr='" & USTV_ANTRAG.UStVAn_LandNr & "'", "FMZOLL")
|
||||
Else
|
||||
USTV_ANTRAG.UStVAn_Währungscode = cbxWahrung.SelectedValue
|
||||
End If
|
||||
|
||||
If Not (IsDate(txtVon._value) AndAlso IsDate(txtBis._value)) Then
|
||||
MsgBox("Zeitraum muss gesetzt werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
'check if already existing
|
||||
Dim anzUSTVA = CInt((New SQL).getValueTxtBySql("Select count(*) from tblUStVAntrag where UStvAN_KuNr = " & KundenNr & " and isnull(UStVAn_AntragArt,'MWST') = '" & cboAntragArt._value & "' and UStVAn_LandNr = " & USTV_ANTRAG.UStVAn_LandNr & "
|
||||
AND (cast(UStVAn_ReDatvon as date) <= '" & CDate(txtVon._value).ToShortDateString & "' and cast(UStVAn_ReDatBis as date) >= '" & CDate(txtBis._value).ToShortDateString & "' or cast(UStVAn_ReDatvon as date) >= '" & CDate(txtBis._value).ToShortDateString & "' or cast(UStVAn_ReDatbis as date) >= '" & CDate(txtVon._value).ToShortDateString & "')", "FMZOLL"))
|
||||
|
||||
If anzUSTVA > 0 Then
|
||||
If Not vbYes = MsgBox("Es existiert bereits mind. ein " & cboAntragArt._value & " -Eintrag in diesem Zeitbereich von " & ADR.Name_1 & " für " & cbxLand.SelectedItem.ToString & vbNewLine & "Trotzdem Antrag speichern?", vbYesNoCancel) Then Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
USTV_ANTRAG.UStVAn_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
USTV_ANTRAG.UStVAn_Zeitstempel = Now()
|
||||
USTV_ANTRAG.UStVAn_Zeitstempel = Now()
|
||||
|
||||
getValue(USTV_ANTRAG, ADR, FIRMA)
|
||||
getValue(USTV_ANTRAG, ADR, FIRMA)
|
||||
|
||||
Me.UStVAn_ID = USTV_ANTRAG.SAVEID()
|
||||
Me.UStVAn_ID = USTV_ANTRAG.SAVEID()
|
||||
|
||||
init()
|
||||
init()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1859,8 +1908,12 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If dgvUSTVPositionen.SelectedRows.Count > 0 Then
|
||||
Dim nummerierung As Boolean = False
|
||||
If vbYes = MsgBox("Soll eine Nummerierung auf den PDF Dokumenten angegeben werden?", vbYesNoCancel) Then nummerierung = True
|
||||
|
||||
Select Case MsgBox("Soll eine Nummerierung auf den PDF Dokumenten angegeben werden?", vbYesNoCancel)
|
||||
Case vbYes : nummerierung = True
|
||||
Case vbNo : nummerierung = True
|
||||
Case Else : Exit Sub
|
||||
End Select
|
||||
|
||||
For Each row As DataGridViewRow In dgvUSTVPositionen.SelectedRows.Cast(Of DataGridViewRow)().OrderBy(Function(dgvr) dgvr.Index)
|
||||
|
||||
@@ -2076,8 +2129,14 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim bf As BaseFont = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.EMBEDDED)
|
||||
canvas.SetFontAndSize(bf, 12)
|
||||
canvas.BeginText()
|
||||
'The origin (0,0) is at the bottom-left corner of the page and represent coordinates in points!!!!!!!
|
||||
canvas.ShowTextAligned(PdfContentByte.ALIGN_CENTER, nummierung, 350, 550, 0)
|
||||
|
||||
'The origin (0,0) is at the bottom-left corner of the page and represent coordinates in points!!!!!
|
||||
Dim _height = pdfReader.GetPageSizeWithRotation(page).GetTop(25) 'oberer Rand
|
||||
Dim _width = pdfReader.GetPageSizeWithRotation(page).GetRight(0) / 2 'Mitte
|
||||
|
||||
canvas.ShowTextAligned(PdfContentByte.ALIGN_CENTER, nummierung, _width, _height, 0)
|
||||
'canvas.ShowTextAligned(PdfContentByte.ALIGN_CENTER, nummierung, 350, 550, 0)
|
||||
|
||||
canvas.EndText()
|
||||
'listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(nummierung, x, y, width, height, mFont, mSize, , itextsharp.text.Element.ALIGN_LEFT, page))
|
||||
Next
|
||||
|
||||
@@ -574,13 +574,16 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
Private Sub scanSonstiges_FileAdded(id As String, path As String, name As String) Handles scanSonstiges.FileAdded
|
||||
getValues(UStV_POS, True)
|
||||
UStV_POS.UStVPo_daId = id
|
||||
If UStV_POS.SAVE() Then scanSonstiges.INIT_daId(UStV_POS.UStVPo_daId)
|
||||
If UStV_POS.SAVE() Then
|
||||
scanSonstiges.INIT_daId(UStV_POS.UStVPo_daId)
|
||||
RaiseEvent CHANGED(UStV_POS.UStVPo_ID)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub scanSonstiges_FileDeleted() Handles scanSonstiges.FileDeleted
|
||||
getValues(UStV_POS, True)
|
||||
UStV_POS.UStVPo_daId = Nothing
|
||||
UStV_POS.SAVE()
|
||||
If UStV_POS.SAVE() Then RaiseEvent CHANGED(UStV_POS.UStVPo_ID)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user