ONLINE INVOICE VOL 3
This commit is contained in:
@@ -22,7 +22,7 @@ Public Class InvoiceVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||
Public Event DoWork()
|
||||
Public Event FinalWork
|
||||
Public Event FinalWork()
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
@@ -355,7 +355,7 @@ Public Class InvoiceVC
|
||||
If Not String.IsNullOrEmpty(_InvoiceHeader.UserCreated.Email) Then
|
||||
_MailMessage.To.Clear()
|
||||
_MailMessage.To.Add(_InvoiceHeader.UserCreated.Email)
|
||||
_MailMessage.Body = String.Format("Ön {0} számmal új számlát véglegesített a(z) {1} ügyfél részére.", _
|
||||
_MailMessage.Body = String.Format("Ön {0} számmal új számlát véglegesített a(z) {1} ügyfél részére.",
|
||||
_InvoiceHeader.DocumentNumber, _InvoiceHeader.Customers.FullName)
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
@@ -474,8 +474,8 @@ Public Class InvoiceVC
|
||||
|
||||
_CS.BeginUpdateCriteria()
|
||||
_CS.Criteria.Clear()
|
||||
_CS.Criteria("First") = CriteriaOperator.Parse("Contracts.ContractTemplate.PartnerType=0 AND Contracts.CustomersFrom=? AND Contracts.Customers=? AND DateExecution=? and InvoiceRows=?", _
|
||||
_InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, _
|
||||
_CS.Criteria("First") = CriteriaOperator.Parse("Contracts.ContractTemplate.PartnerType=0 AND Contracts.CustomersFrom=? AND Contracts.Customers=? AND DateExecution=? and InvoiceRows=?",
|
||||
_InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers,
|
||||
_InvoiceHeader.DateExecution, Nothing)
|
||||
_CS.EndUpdateCriteria()
|
||||
|
||||
@@ -740,6 +740,18 @@ Public Class InvoiceVC
|
||||
_p_InvoiceHeader.RecalculateInvoice(_p_InvoiceHeader, _ocur)
|
||||
_ocur.CommitChanges()
|
||||
|
||||
If _p_InvoiceHeader.TotalVATHUF >= 100000 And
|
||||
_p_InvoiceHeader.DateCreated >= #2018-07-01# And
|
||||
_p_InvoiceHeader.NAV_InvoiceStatus <> "DONE" And
|
||||
_p_InvoiceHeader.IsEditable = False And
|
||||
_p_InvoiceHeader.IsProforma = False And
|
||||
String.IsNullOrEmpty(_p_InvoiceHeader.DocumentNumber) = False Then
|
||||
'Számla NAV feladása
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GLFunctions.ReconfigurePCI(_uow_pci, _p_InvoiceHeader.CustomersFrom, _p_InvoiceHeader.Customers, 0, _p_InvoiceHeader.ConnectInfo)
|
||||
@@ -1278,10 +1290,10 @@ CheckError:
|
||||
Dim _CS_Description As New CollectionSource(_onew, GetType(InvoiceHeader_DescriptionChanger_PopUp))
|
||||
|
||||
Dim _InvoiceHeader_xpquery = New XPQuery(Of InvoiceHeader)(_ocur.Session)
|
||||
Dim query = From _InvoiceHeader In _InvoiceHeader_xpquery _
|
||||
Where _InvoiceHeader.Description IsNot Nothing _
|
||||
Group _InvoiceHeader By _InvoiceHeader.Description Into g = Group _
|
||||
Select New With {Key .Description = Description}
|
||||
Dim query = From _InvoiceHeader In _InvoiceHeader_xpquery
|
||||
Where _InvoiceHeader.Description IsNot Nothing
|
||||
Group _InvoiceHeader By _InvoiceHeader.Description Into g = Group
|
||||
Select New With {Key .Description = Description}
|
||||
For Each item In query
|
||||
_InvoiceHeader_DescriptionChanger_PopUp = _onew.CreateObject(Of InvoiceHeader_DescriptionChanger_PopUp)()
|
||||
_InvoiceHeader_DescriptionChanger_PopUp.Description = item.Description
|
||||
@@ -1433,7 +1445,7 @@ CheckError:
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
RaiseEvent FinalWork()
|
||||
Else
|
||||
Throw New Exception("*Nincs egy kijelölt sor sem!")
|
||||
End If
|
||||
@@ -1560,10 +1572,10 @@ CheckError:
|
||||
Dim _CS_Description As New CollectionSource(_onew, GetType(InvoiceHeader_DescriptionChanger_PopUp))
|
||||
|
||||
Dim _InvoiceHeader_xpquery = New XPQuery(Of InvoiceHeader)(_ocur.Session)
|
||||
Dim query = From _InvoiceHeader In _InvoiceHeader_xpquery _
|
||||
Where _InvoiceHeader.DescriptionHeader IsNot Nothing _
|
||||
Group _InvoiceHeader By _InvoiceHeader.DescriptionHeader Into g = Group _
|
||||
Select New With {Key .DescriptionHeader = DescriptionHeader}
|
||||
Dim query = From _InvoiceHeader In _InvoiceHeader_xpquery
|
||||
Where _InvoiceHeader.DescriptionHeader IsNot Nothing
|
||||
Group _InvoiceHeader By _InvoiceHeader.DescriptionHeader Into g = Group
|
||||
Select New With {Key .DescriptionHeader = DescriptionHeader}
|
||||
For Each item In query
|
||||
_InvoiceHeader_DescriptionChanger_PopUp = _onew.CreateObject(Of InvoiceHeader_DescriptionChanger_PopUp)()
|
||||
_InvoiceHeader_DescriptionChanger_PopUp.Description = item.DescriptionHeader
|
||||
@@ -1592,7 +1604,7 @@ CheckError:
|
||||
GLFunctions.ReconfigurePCI(_uow, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
RaiseEvent FinalWork()
|
||||
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End Sub
|
||||
@@ -1602,8 +1614,8 @@ CheckError:
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHeader As InvoiceHeader = TryCast(View.SelectedObjects(0), InvoiceHeader)
|
||||
|
||||
ViewPDCI.ViewPDCIDetail(_onew, Application, e, _InvoiceHeader.CustomersFrom, _
|
||||
_InvoiceHeader.Customers, ePartnerType.eReceivables, _
|
||||
ViewPDCI.ViewPDCIDetail(_onew, Application, e, _InvoiceHeader.CustomersFrom,
|
||||
_InvoiceHeader.Customers, ePartnerType.eReceivables,
|
||||
_InvoiceHeader.ConnectInfo)
|
||||
End Sub
|
||||
|
||||
@@ -1723,6 +1735,8 @@ CheckError:
|
||||
.Customers = _onew.GetObject(_InvoiceHeader.Customers)
|
||||
.PaymentOption = _onew.GetObject(_InvoiceHeader.PaymentOption)
|
||||
.Description = _onew.GetObject(_InvoiceHeader.DescriptionHeader)
|
||||
.CurrencyName = _onew.GetObject(_InvoiceHeader.CurrencyName)
|
||||
.DateExecution = _InvoiceHeader.DateExecution
|
||||
End With
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "InvoiceCreditNoteHeader_DetailView", True, _InvoiceCreditNoteHeader)
|
||||
@@ -1850,7 +1864,8 @@ CheckError:
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
RaiseEvent FinalWork
|
||||
RaiseEvent FinalWork()
|
||||
|
||||
If _NOEmail.Count > 0 Then
|
||||
Dim _ErrorMessage As String = "A következő számlák küldése nem lehetséges:" + vbNewLine
|
||||
|
||||
@@ -1885,10 +1900,10 @@ CheckError:
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
_ocur.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
RaiseEvent FinalWork()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub aGeneratePDFandSendDefaultMailClient_Invoice_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGeneratePDFandSendDefaultMailClient_Invoice.Execute
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user