diff --git a/BuildR64.cmd b/BuildR64.cmd index 50c06b2..62f8a9f 100644 --- a/BuildR64.cmd +++ b/BuildR64.cmd @@ -1,2 +1,2 @@ -msbuild JUSTWIN.sln /t:Build /p:Configuration=R64 /p:WarningLevel=0 /fl /flp:logfile=Nuvolar.log;append=true;verbosity=diagnostic;encoding=utf-8 +msbuild JUSTWIN.sln /t:Build /p:Configuration=Release /p:WarningLevel=0 /fl /flp:logfile=Nuvolar.log;append=true;verbosity=diagnostic;encoding=utf-8 pause \ No newline at end of file diff --git a/Nuvolar.Module.Win/BusinessObjects/Business/Product/ProductsGant_VC.vb b/Nuvolar.Module.Win/BusinessObjects/Business/Product/ProductsGant_VC.vb index f3bf460..abb46ee 100644 --- a/Nuvolar.Module.Win/BusinessObjects/Business/Product/ProductsGant_VC.vb +++ b/Nuvolar.Module.Win/BusinessObjects/Business/Product/ProductsGant_VC.vb @@ -1,27 +1,17 @@ -Imports System -Imports System.ComponentModel -Imports System.Collections.Generic -Imports System.Diagnostics -Imports System.Text +Imports System.ComponentModel Imports DevExpress.ExpressApp Imports DevExpress.ExpressApp.Actions -Imports DevExpress.Persistent.Base Imports DevExpress.ExpressApp.Editors Imports exontrol.EXG2ANTTLib Imports DevExpress.Xpo Imports DevExpress.Data.Filtering Imports DevExpress.ExpressApp.SystemModule -Imports DevExpress.Persistent.BaseImpl -Imports System.Net.Mail -Imports System.Reflection -Imports DevExpress.ExpressApp.Utils Imports DevExpress.ExpressApp.Model -Imports System.Linq Public Class ProductsGant_VC Inherits Nuvolar.Module.ProductsGant_VC - + Dim _GanttControl As exontrol.EXG2ANTTLib.exg2antt Dim _ProductGandRowsOidindex As Long = 0 Dim _GantItemColumn_Array As New ArrayList @@ -42,14 +32,14 @@ Public Class ProductsGant_VC Public Width As Long Public GantColumnIndex As Long End Structure - + #Region "Overrides" Protected Overrides Sub OnActivated() MyBase.OnActivated() AddHandler DoWork, AddressOf _WaitFormClass.DoWork - AddHandler InitWork, AddressOf _WaitFormClass.InitWork - AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork + AddHandler InitWork, AddressOf _WaitFormClass.Initwork + AddHandler FinalWork, AddressOf _WaitFormClass.FinalWork If View.Id = "ProductsGant_DetailView" Then @@ -73,8 +63,8 @@ Public Class ProductsGant_VC MyBase.OnDeactivated() RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork - RemoveHandler InitWork, AddressOf _WaitFormClass.InitWork - RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork + RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork + RemoveHandler FinalWork, AddressOf _WaitFormClass.FinalWork If View.Id = "ProductsGant_DetailView" Then Frame.GetController(Of CloneObject.CloneObjectViewController)?.Active.SetItemValue("", True) @@ -127,9 +117,9 @@ Public Class ProductsGant_VC For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRowsBar_Collection With _ProductsGantRowsBar If _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then - .ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.ManualRotation) + .ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.ManualRotation * 7) ElseIf _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then - .ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.CalculatedRotation) + .ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.CalculatedRotation * 7) Else .ToDate = .FromDate.AddDays(1) @@ -316,7 +306,10 @@ Public Class ProductsGant_VC If Not String.IsNullOrEmpty(_GroupColumn.ColumnID) Then Select Case _GroupColumn.ColumnID Case "Customers" + _WaitFormClass.Initwork(1, 1, _ProductsGant.ProductsGantRows.Count) For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows + _WaitFormClass.DoWork() + If _GroupObjects_Collection.Count = 0 Then _GroupObjects_Collection.Add(_ProductsGantRows.Customers) Else @@ -331,6 +324,7 @@ Public Class ProductsGant_VC If _Need Then _GroupObjects_Collection.Add(_ProductsGantRows.Customers) End If Next + _WaitFormClass.FinalWork() Dim _CustomerColumn As exontrol.EXG2ANTTLib.Column = Nothing For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns @@ -346,14 +340,16 @@ Public Class ProductsGant_VC _GanttControl.Items.set_CellValue(_GroupItem, _CustomerColumn.Index, "" + _Customers.FullName + "") _GanttControl.Items.set_CellValueFormat(_GroupItem, _CustomerColumn.Index, ValueFormatEnum.exHTML) - Dim _GroupCollectionElement_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Customers=? AND ProductsGant=?", _onew.GetObject(_Customers), _onew.GetObject(_ProductsGant))) - For Each _ProductsGantRows As ProductsGantRows In _GroupCollectionElement_Collection - Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0) - If _Item = 0 Then - _Item = .Items.InsertItem(_GroupItem, "") - .Items.set_ExpandItem(_Item, True) - SetItemsAndItemData(_Item, _ProductsGantRows) + + For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows + If _Customers.Oid = _ProductsGantRows.Customers.Oid Then + Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0) + If _Item = 0 Then + _Item = .Items.InsertItem(_GroupItem, "") + .Items.set_ExpandItem(_Item, True) + SetItemsAndItemData(_Item, _ProductsGantRows) + End If End If Next _GanttControl.Items.set_ExpandItem(_GroupItem, True) @@ -389,14 +385,15 @@ Public Class ProductsGant_VC Dim _GroupItem As Long = _GanttControl.Items.AddItem() _GanttControl.Items.set_CellValue(_GroupItem, _ProductsColumn.Index, _Products.ShortName) - Dim _GroupCollectionElement_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Products=? AND ProductsGant=?", _onew.GetObject(_Products), _onew.GetObject(_ProductsGant))) - For Each _ProductsGantRows As ProductsGantRows In _GroupCollectionElement_Collection - Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0) - If _Item = 0 Then - _Item = _GanttControl.Items.InsertItem(_GroupItem, "") + For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows + If _Products.Oid = _ProductsGantRows.Products.Oid Then + Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0) + If _Item = 0 Then + _Item = _GanttControl.Items.InsertItem(_GroupItem, "") - SetItemsAndItemData(_Item, _ProductsGantRows) + SetItemsAndItemData(_Item, _ProductsGantRows) + End If End If Next Next @@ -500,8 +497,8 @@ Public Class ProductsGant_VC Select Case _G2Column.Key Case "ManualRotation" _ProductsGantRows.ManualRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index) - Case "CalculatedRotation" - _ProductsGantRows.CalculatedRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index) + 'Case "CalculatedRotation" + ' _ProductsGantRows.CalculatedRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index) End Select Next @@ -558,24 +555,24 @@ Public Class ProductsGant_VC If _ProductsGantCustomersReport.QTT > 0 Then - Dim _ProductsGantCustomersReport_New As ProductsGantCustomersReport = _ocur.FindObject(Of ProductsGantCustomersReport)(CriteriaOperator.Parse("Customers=? AND Products=? AND DateExecution=?", _ - _ocur.GetObject(_ProductsGantCustomersReport.Customers), _ - _ocur.GetObject(_ProductsGantCustomersReport.Products), _ + Dim _ProductsGantCustomersReport_New As ProductsGantCustomersReport = _ocur.FindObject(Of ProductsGantCustomersReport)(CriteriaOperator.Parse("Customers=? AND Products=? AND DateExecution=?", + _ocur.GetObject(_ProductsGantCustomersReport.Customers), + _ocur.GetObject(_ProductsGantCustomersReport.Products), _ProductsGantCustomersReport.DateExecution)) If _ProductsGantCustomersReport_New Is Nothing Then _ProductsGantCustomersReport_New = New ProductsGantCustomersReport(_ocur.Session) _ProductsGantCustomersReport_New.Customers = _ocur.GetObject(_ProductsGantCustomersReport.Customers) _ProductsGantCustomersReport_New.Products = _ocur.GetObject(_ProductsGantCustomersReport.Products) _ProductsGantCustomersReport_New.QTT = _ocur.GetObject(_ProductsGantCustomersReport.QTT) - _ProductsGantCustomersReport_New.DateExecution = _ocur.GetObject(_ProductsGantCustomersReport.DateExecution) + _ProductsGantCustomersReport_New.DateExecution = _ProductsGant.DateExecution End If - - Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("ProductsGant=? AND Customers.Oid=? AND Products.Oid=?", _ + + Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("ProductsGant=? AND Customers.Oid=? AND Products.Oid=?", _ProductsGant, _ProductsGantCustomersReport_New.Customers.Oid, _ProductsGantCustomersReport_New.Products.Oid)) If _ProductsGantRows IsNot Nothing Then Dim _ProductsGantRowsBar As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar) _ - (CriteriaOperator.Parse("ProductsGantRows.Oid=? AND GetDate(FromDate)=? AND BarType=2", _ + (CriteriaOperator.Parse("ProductsGantRows.Oid=? AND GetDate(FromDate)=? AND BarType=2", _ProductsGantRows.Oid, _ProductsGantCustomersReport.DateExecution.Date)) If _ProductsGantRowsBar Is Nothing Then _ProductsGantRowsBar = New ProductsGantRowsBar(_ocur.Session) @@ -587,9 +584,9 @@ Public Class ProductsGant_VC .ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7) Else If _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then - .ToDate = .FromDate.AddDays(.ProductsGantRows.CalculatedRotation) + .ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.CalculatedRotation * 7) ElseIf _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then - .ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation) + .ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation * 7) Else .ToDate = .FromDate.AddDays(1) 'temp End If @@ -605,9 +602,9 @@ Public Class ProductsGant_VC .ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7) Else If _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then - .ToDate = .FromDate.AddDays(.ProductsGantRows.CalculatedRotation) + .ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.CalculatedRotation * 7) ElseIf _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then - .ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation) + .ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation * 7) Else .ToDate = .FromDate.AddDays(1) 'temp End If @@ -664,8 +661,8 @@ Public Class ProductsGant_VC If Not String.IsNullOrEmpty(_ColumnID) Then Select Case _ColumnID - Case "CalculatedRotation" - _ProductsGantRows.CalculatedRotation = CType(NewValue, Double) + 'Case "CalculatedRotation" + ' _ProductsGantRows.CalculatedRotation = CType(NewValue, Double) Case "ManualRotation" _ProductsGantRows.ManualRotation = CType(NewValue, Double) End Select @@ -711,9 +708,14 @@ Public Class ProductsGant_VC Case "Products" _GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Products.ShortName) Case "CalculatedRotation" - _GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.CalculatedRotation) + If _ProductsGantRows.CalculatedRotation > 0 Then + _GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.CalculatedRotation) + End If + Case "ManualRotation" - _GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.ManualRotation) + If _ProductsGantRows.ManualRotation > 0 Then + _GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.ManualRotation) + End If End Select Next diff --git a/Nuvolar.Module.Win/Model.DesignedDiffs.Localization.hu.xafml b/Nuvolar.Module.Win/Model.DesignedDiffs.Localization.hu.xafml index e32cd29..48309b8 100644 --- a/Nuvolar.Module.Win/Model.DesignedDiffs.Localization.hu.xafml +++ b/Nuvolar.Module.Win/Model.DesignedDiffs.Localization.hu.xafml @@ -13,7 +13,6 @@ - @@ -40,9 +39,7 @@ - - @@ -69,8 +66,6 @@ - - @@ -125,7 +120,6 @@ - @@ -217,56 +211,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -466,8 +410,6 @@ - - @@ -590,15 +532,6 @@ - - - - - - - - - diff --git a/Nuvolar.Module.Win/Model.DesignedDiffs.xafml b/Nuvolar.Module.Win/Model.DesignedDiffs.xafml index dff7b44..8d9e2f5 100644 --- a/Nuvolar.Module.Win/Model.DesignedDiffs.xafml +++ b/Nuvolar.Module.Win/Model.DesignedDiffs.xafml @@ -27,9 +27,7 @@ - - @@ -47,8 +45,6 @@ - - @@ -87,7 +83,6 @@ - @@ -373,6 +368,8 @@ + + @@ -416,29 +413,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -555,8 +529,6 @@ - - @@ -587,11 +559,11 @@ - - - - - + + + + + @@ -855,98 +827,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2995,17 +2875,28 @@ - + + - - - + + + + + - + - + + + + + + + + + diff --git a/Nuvolar.Module.Win/My Project/licenses.licx b/Nuvolar.Module.Win/My Project/licenses.licx index e69de29..2cc1b23 100644 --- a/Nuvolar.Module.Win/My Project/licenses.licx +++ b/Nuvolar.Module.Win/My Project/licenses.licx @@ -0,0 +1 @@ +DevExpress.ExpressApp.SystemModule.SystemModule, DevExpress.ExpressApp.v17.2, Version=17.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a \ No newline at end of file diff --git a/Nuvolar.Module.Win/Nuvolar.Module.Win.vbproj b/Nuvolar.Module.Win/Nuvolar.Module.Win.vbproj index fc2752c..2e1cac3 100644 --- a/Nuvolar.Module.Win/Nuvolar.Module.Win.vbproj +++ b/Nuvolar.Module.Win/Nuvolar.Module.Win.vbproj @@ -1790,6 +1790,14 @@ + + Model.DesignedDiffs.xafml + Designer + + + Model.DesignedDiffs.xafml + Designer + Model.DesignedDiffs.xafml diff --git a/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant.vb b/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant.vb index b053368..e5899ee 100644 --- a/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant.vb +++ b/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant.vb @@ -9,20 +9,27 @@ Imports DevExpress.Persistent.Base Imports DevExpress.Persistent.BaseImpl Imports DevExpress.Persistent.Validation Imports DevExpress.ExpressApp.ConditionalAppearance +Imports DevExpress.ExpressApp.Editors - _ - _ +''' +''' Termék GANTT !!! +''' + + Public Class ProductsGant Inherits BaseObject Private _CustomersFrom As CustomersFrom Private _G2antt As String - + Private _Criteria As String + Private _PGR As ProductsGantRows + Private _DateExecution As DateTime Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() + DateExecution = GetSQLTime(Session) End Sub Property CustomersFrom As CustomersFrom @@ -33,7 +40,34 @@ Public Class ProductsGant SetPropertyValue("CustomersFrom", _CustomersFrom, value) End Set End Property - _ + + Property Criteria As String + Get + Return _Criteria + End Get + Set(value As String) + SetPropertyValue("Criteria", _Criteria, value) + End Set + End Property + + Public Property ObjectType() As Type + Get + Return GetType(ProductsGantRows) + End Get + Set(ByVal value As Type) + + End Set + End Property + + Public Property DateExecution As DateTime + Get + Return _DateExecution + End Get + Set(value As DateTime) + SetPropertyValue("DateExecution", _DateExecution, value) + End Set + End Property + Property G2antt As String Get Return _G2antt @@ -44,12 +78,17 @@ Public Class ProductsGant End Property 'ReadOnly - _ - _ - _ + + ReadOnly Property ProductsGantRows As XPCollection(Of ProductsGantRows) Get - Return GetCollection(Of ProductsGantRows)("ProductsGantRows") + Dim _CC As String = " ProductsGant.Oid = '" & Me.Oid.ToString() & "'" + + If String.IsNullOrEmpty(Criteria) = False Then + _CC += " AND " & CriteriaOperator.Parse(Criteria).ToString() + End If + Return New XPCollection(Of ProductsGantRows)(Session, CriteriaOperator.Parse(_CC)) + End Get End Property End Class diff --git a/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGantRows.vb b/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGantRows.vb index c4745e6..913aaaa 100644 --- a/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGantRows.vb +++ b/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGantRows.vb @@ -9,7 +9,7 @@ Imports DevExpress.Persistent.Base Imports DevExpress.Persistent.BaseImpl Imports DevExpress.Persistent.Validation - _ + Public Class ProductsGantRows Inherits BaseObject @@ -25,8 +25,6 @@ Public Class ProductsGantRows Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() End Sub - - _ Property ProductsGant As ProductsGant Get Return _ProductsGant @@ -69,9 +67,9 @@ Public Class ProductsGantRows End Property 'ReadOnly - _ - _ - _ + + + ReadOnly Property ProductsGantRowsBar As XPCollection(Of ProductsGantRowsBar) Get Return GetCollection(Of ProductsGantRowsBar)("ProductsGantRowsBar") diff --git a/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant_VC.vb b/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant_VC.vb index 68ffc1b..9b3cfae 100644 --- a/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant_VC.vb +++ b/Nuvolar.Module/BusinessObjects/Business/Products/ProductsGant_VC.vb @@ -14,6 +14,8 @@ Imports System.Linq Imports DevExpress.ExpressApp.Editors Imports DevExpress.Persistent.BaseImpl Imports DevExpress.ExpressApp.Utils +Imports DevExpress.ExpressApp.Xpo +Imports DevExpress.Xpo.DB Public Class ProductsGant_VC Inherits DevExpress.ExpressApp.ViewController @@ -26,29 +28,45 @@ Public Class ProductsGant_VC Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long) Public Event DoWork() - Public Event FinalWork + Public Event FinalWork() #Region "Overrides" Protected Overrides Sub OnActivated() MyBase.OnActivated() - If View.Id = "ProductsGant_ListView" Then - Frame.GetController(Of DeleteObjectsViewController)()?.Active.SetItemValue("", False) - Frame.GetController(Of LinkUnlinkController)()?.Active.SetItemValue("", False) - Frame.GetController(Of NewObjectViewController)()?.Active.SetItemValue("", False) - Frame.GetController(Of CloneObject.CloneObjectViewController)()?.Active.SetItemValue("", False) - End If End Sub Protected Overrides Sub OnDeactivated() MyBase.OnDeactivated() - If View.Id = "ProductsGant_ListView" Then - Frame.GetController(Of DeleteObjectsViewController)()?.Active.SetItemValue("", True) - Frame.GetController(Of LinkUnlinkController)()?.Active.SetItemValue("", True) - Frame.GetController(Of NewObjectViewController)()?.Active.SetItemValue("", True) - Frame.GetController(Of CloneObject.CloneObjectViewController)()?.Active.SetItemValue("", True) - End If End Sub #End Region + Public Function CountLast16Week(ByVal _Products_Oid As String, ByVal _Customers_Oid As String) As Double + Dim _onew As XPObjectSpace = TryCast(Application.CreateObjectSpace(), XPObjectSpace) + Dim _CalculatedRotation As Double = 0 + Dim _SQL As String + _SQL = " SELECT ROUND(SUM(t1.QTT)/16,2) As CalculatedRotation" + + _SQL = _SQL + " FROM InvoiceRows t1 JOIN OrderInRows t2 On" + _SQL = _SQL + " t1.OrderInRows=t2.Oid JOIN Products t3 On" + _SQL = _SQL + " t2.Products=t3.Oid JOIN InvoiceHeader t4 On" + _SQL = _SQL + " t1.InvoiceHeader=t4.Oid JOIN Organization t5 On" + _SQL = _SQL + " t4.Customers=t5.Oid" + _SQL = _SQL + " WHERE t4.IsEditable=0 And t4.DocumentNumber!='' AND " + _SQL = _SQL + " t3.Oid='" & _Products_Oid & "' AND t5.Oid = '" & _Customers_Oid & "' AND " + _SQL = _SQL + " DATE_ADD(NOW(),INTERVAL -16 WEEK) #7/1/2013# - Try + GeneralFunction.GLOBAL_HAS_Audit = False RaiseEvent InitWork(1, 1, IRXPQ.Count) For Each item In IRXPQ RaiseEvent DoWork() @@ -91,12 +108,12 @@ Public Class ProductsGant_VC .ProductsGant = _ProductsGant .Customers = item.Customers .Products = item.Products - .CalculatedRotation = 0 + .CalculatedRotation = CountLast16Week(item.Products.Oid.ToString, item.Customers.Oid.ToString) .ManualRotation = 0 End With 'Számlázott mennyiségekhez ProductsGantRowsBar - Dim _InvoiceRows_Collection As New XPCollection(Of InvoiceRows)(_ocur.Session, CriteriaOperator.Parse("InvoiceHeader.Customers=? AND OrderInRows.Products=? AND InvoiceHeader.IsEditable=False AND " + _ + Dim _InvoiceRows_Collection As New XPCollection(Of InvoiceRows)(_ocur.Session, CriteriaOperator.Parse("InvoiceHeader.Customers=? AND OrderInRows.Products=? AND InvoiceHeader.IsEditable=False AND " + "InvoiceHeader.IsStorno=False AND (IsNull(InvoiceHeader.DocumentNumber)=False OR InvoiceHeader.DocumentNumber<>'')", item.Customers, item.Products)) If _InvoiceRows_Collection.Count > 0 Then @@ -176,7 +193,8 @@ Public Class ProductsGant_VC Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain"))) Finally - RaiseEvent FinalWork + RaiseEvent FinalWork() + GLOBAL_HAS_Audit = True End Try End Sub @@ -194,13 +212,14 @@ Public Class ProductsGant_VC _InvoiceRowsXPQ.InvoiceHeader IsNot Nothing And _InvoiceRowsXPQ.InvoiceHeader.IsEditable = False And _InvoiceRowsXPQ.InvoiceHeader.CustomersFrom.Oid = _ProductsGant.CustomersFrom.Oid - Group _InvoiceRowsXPQ By _InvoiceRowsXPQ.InvoiceHeader.Customers, _ - _InvoiceRowsXPQ.OrderInRows.Products Into g = Group _ - Select New With {Key .Customers = Customers, _ + Group _InvoiceRowsXPQ By _InvoiceRowsXPQ.InvoiceHeader.Customers, + _InvoiceRowsXPQ.OrderInRows.Products Into g = Group + Select New With {Key .Customers = Customers, Key .Products = Products} ' _InvoiceRowsXPQ.InvoiceHeader.DateExecution.Date > #7/1/2013# Try + GLOBAL_HAS_Audit = False RaiseEvent InitWork(1, 1, IRXPQ.Count) For Each item In IRXPQ RaiseEvent DoWork() @@ -212,13 +231,13 @@ Public Class ProductsGant_VC .ProductsGant = _ProductsGant .Customers = item.Customers .Products = item.Products - .CalculatedRotation = 0 + .CalculatedRotation = CountLast16Week(item.Products.Oid.ToString, item.Customers.Oid.ToString) .ManualRotation = 0 End With End If 'Számlázott mennyiségekhez ProductsGantRowsBar - Dim _InvoiceRows_Collection As New XPCollection(Of InvoiceRows)(_ocur.Session, CriteriaOperator.Parse("InvoiceHeader.Customers=? AND OrderInRows.Products=? AND InvoiceHeader.IsEditable=False AND " + _ + Dim _InvoiceRows_Collection As New XPCollection(Of InvoiceRows)(_ocur.Session, CriteriaOperator.Parse("InvoiceHeader.Customers=? AND OrderInRows.Products=? AND InvoiceHeader.IsEditable=False AND " + "InvoiceHeader.IsStorno=False AND (IsNull(InvoiceHeader.DocumentNumber)=False OR InvoiceHeader.DocumentNumber<>'')", item.Customers, item.Products)) If _InvoiceRows_Collection.Count > 0 Then _InvoiceRows_Collection.Sorting.Add(New SortProperty("DateExecution", DB.SortingDirection.Ascending)) @@ -226,7 +245,7 @@ Public Class ProductsGant_VC Dim _FromDate As New Date(_InvoiceRows.InvoiceHeader.DateExecution.Year, _InvoiceRows.InvoiceHeader.DateExecution.Month, _InvoiceRows.InvoiceHeader.DateExecution.Day, 0, 0, 0) Dim _ToDate = New Date(_InvoiceRows.InvoiceHeader.DateExecution.Year, _InvoiceRows.InvoiceHeader.DateExecution.Month, _InvoiceRows.InvoiceHeader.DateExecution.Day, 23, 59, 59) - Dim _ProductsGantRowsBar_InvoiceRows As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND FromDate=? AND ToDate=? AND BarType=0", _ + Dim _ProductsGantRowsBar_InvoiceRows As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND FromDate=? AND ToDate=? AND BarType=0", _ProductsGantRows, _FromDate, _ToDate)) If _ProductsGantRowsBar_InvoiceRows Is Nothing Then _ProductsGantRowsBar_InvoiceRows = New ProductsGantRowsBar(_ocur.Session) @@ -283,7 +302,7 @@ Public Class ProductsGant_VC End If - Dim _ProductsGantRowsBar_Reported As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND FromDate=? AND ToDate=? AND BarType=2", _ + Dim _ProductsGantRowsBar_Reported As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND FromDate=? AND ToDate=? AND BarType=2", _ProductsGantRows, _FromDate, _ToDate)) If _ProductsGantRowsBar_Reported Is Nothing Then _ProductsGantRowsBar_Reported = New ProductsGantRowsBar(_ocur.Session) @@ -308,7 +327,7 @@ Public Class ProductsGant_VC Dim _FromDate As New Date(_OrderInRows.OrderInHeader.DateExecution.Year, _OrderInRows.OrderInHeader.DateExecution.Month, _OrderInRows.OrderInHeader.DateExecution.Day, 0, 0, 0) Dim _ToDate As New Date(_OrderInRows.OrderInHeader.DateExecution.Year, _OrderInRows.OrderInHeader.DateExecution.Month, _OrderInRows.OrderInHeader.DateExecution.Day, 23, 59, 59) - Dim _ProductsGantRowsBar As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND FromDate=? AND ToDate=? AND BarType=1", _ + Dim _ProductsGantRowsBar As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND FromDate=? AND ToDate=? AND BarType=1", _ProductsGantRows, _FromDate, _ToDate)) If _ProductsGantRowsBar Is Nothing Then @@ -329,7 +348,8 @@ Public Class ProductsGant_VC Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain"))) Finally - RaiseEvent FinalWork + RaiseEvent FinalWork() + GLOBAL_HAS_Audit = True End Try End Sub End Class diff --git a/Nuvolar.Module/Model.DesignedDiffs.xafml b/Nuvolar.Module/Model.DesignedDiffs.xafml index 2734609..2eb518c 100644 --- a/Nuvolar.Module/Model.DesignedDiffs.xafml +++ b/Nuvolar.Module/Model.DesignedDiffs.xafml @@ -24201,7 +24201,7 @@ - + diff --git a/Nuvolar.WIN.Company/app.config b/Nuvolar.WIN.Company/app.config index 4ef1eae..44581d7 100644 --- a/Nuvolar.WIN.Company/app.config +++ b/Nuvolar.WIN.Company/app.config @@ -4,11 +4,11 @@ - + - - + + diff --git a/Nuvolar.Win.Lite/app.config b/Nuvolar.Win.Lite/app.config index 329469e..0390d6c 100644 --- a/Nuvolar.Win.Lite/app.config +++ b/Nuvolar.Win.Lite/app.config @@ -7,11 +7,11 @@ - + - - + + @@ -25,8 +25,8 @@ - - + + diff --git a/momoERP.Win.HA/app.config b/momoERP.Win.HA/app.config index 4ef1eae..44581d7 100644 --- a/momoERP.Win.HA/app.config +++ b/momoERP.Win.HA/app.config @@ -4,11 +4,11 @@ - + - - + +