GANT csesztetése
This commit is contained in:
+3
-3
@@ -3795,12 +3795,12 @@ CheckError:
|
||||
.DiscountPriceDEV = _DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.DiscountPriceDEV
|
||||
.DiscountPriceHUF = _DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.DiscountPriceHUF
|
||||
.ListPriceDEV = _DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.ListPriceDEV
|
||||
.ListPriceHUF = _DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.ListPriceHUF
|
||||
|
||||
'Ha a DEVIZA != HUF, akkor itt kell árfolyam alapján újragenerálás !!!
|
||||
If .InvoiceHeader.CurrencyName.ShortName <> "HUF" And _ORI_Invoice_Popup.PriceMode = ePriceMode.eDEVToHUF Then
|
||||
.DiscountPriceHUF = _DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.DiscountPriceDEV * _ORI_Invoice_Popup.CurrencyRate, 2, MidpointRounding.AwayFromZero)
|
||||
.DiscountPriceHUF = Math.Round(_DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.DiscountPriceDEV * _ORI_Invoice_Popup.CurrencyRate, 2, MidpointRounding.AwayFromZero)
|
||||
.ListPriceHUF = Math.Round(_DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.ListPriceDEV * _ORI_Invoice_Popup.CurrencyRate, 2, MidpointRounding.AwayFromZero)
|
||||
Else
|
||||
.ListPriceHUF = _DeliveryNoteOutRows.StorageOutRowsInRows.StorageOutRows.OrderInRows.ListPriceHUF
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ Public Class ProductsGantRows
|
||||
Private _Customers As Customers
|
||||
Private _Products As Products
|
||||
Private _CalculatedRotation As Double 'Kalkulált forgási sebesség
|
||||
Private _CalculatedRotationW52 As Double 'Kalkulált forgási sebesség 52hétre vonatkozó
|
||||
Private _ManualRotation As Double 'Manuális forgási sebesség
|
||||
Private _QTT_Minimum As Double 'Minimális mennyiség az ügyfélnél
|
||||
Private _QTT_Critical As Double 'Kritikus mennyiség az ügyfélnél
|
||||
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
@@ -57,6 +61,14 @@ Public Class ProductsGantRows
|
||||
SetPropertyValue("CalculatedRotation", _CalculatedRotation, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CalculatedRotationW52 As Double
|
||||
Get
|
||||
Return _CalculatedRotationW52
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CalculatedRotationW52", _CalculatedRotationW52, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ManualRotation As Double
|
||||
Get
|
||||
Return _ManualRotation
|
||||
@@ -65,6 +77,22 @@ Public Class ProductsGantRows
|
||||
SetPropertyValue("ManualRotation", _ManualRotation, value)
|
||||
End Set
|
||||
End Property
|
||||
Property QTT_Minimum As Double
|
||||
Get
|
||||
Return _QTT_Minimum
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("QTT_Minimum", _QTT_Minimum, value)
|
||||
End Set
|
||||
End Property
|
||||
Property QTT_Critical As Double
|
||||
Get
|
||||
Return _QTT_Critical
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("QTT_Critical", _QTT_Critical, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'ReadOnly
|
||||
<VisibleInListView(False)>
|
||||
|
||||
+1
-34
@@ -27,43 +27,10 @@ Partial Class ProductsGant_VC
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aProductsGant_GerenrateProductsGantRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aProductsGant_UpdateProductsGantRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aProductsGant_GerenrateProductsGantRows
|
||||
'ProductsGant_VC
|
||||
'
|
||||
Me.aProductsGant_GerenrateProductsGantRows.Caption = "aProductsGant_GerenrateProductsGantRows"
|
||||
Me.aProductsGant_GerenrateProductsGantRows.Category = "ObjectsCreation"
|
||||
Me.aProductsGant_GerenrateProductsGantRows.ConfirmationMessage = "Biztos benne, hogy eldobja a Gant diagram jelenlegi tartalmát és újra felépíti?"
|
||||
Me.aProductsGant_GerenrateProductsGantRows.Id = "aProductsGant_GerenrateProductsGantRows"
|
||||
Me.aProductsGant_GerenrateProductsGantRows.ImageName = Nothing
|
||||
Me.aProductsGant_GerenrateProductsGantRows.Shortcut = Nothing
|
||||
Me.aProductsGant_GerenrateProductsGantRows.Tag = Nothing
|
||||
Me.aProductsGant_GerenrateProductsGantRows.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_GerenrateProductsGantRows.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_GerenrateProductsGantRows.TargetViewId = Nothing
|
||||
Me.aProductsGant_GerenrateProductsGantRows.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aProductsGant_GerenrateProductsGantRows.ToolTip = Nothing
|
||||
Me.aProductsGant_GerenrateProductsGantRows.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aProductsGant_UpdateProductsGantRows
|
||||
'
|
||||
Me.aProductsGant_UpdateProductsGantRows.Caption = "aProductsGant_UpdateProductsGantRows"
|
||||
Me.aProductsGant_UpdateProductsGantRows.Category = "ObjectsCreation"
|
||||
Me.aProductsGant_UpdateProductsGantRows.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.Id = "aProductsGant_UpdateProductsGantRows"
|
||||
Me.aProductsGant_UpdateProductsGantRows.ImageName = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.Shortcut = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.Tag = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_UpdateProductsGantRows.TargetViewId = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aProductsGant_UpdateProductsGantRows.ToolTip = Nothing
|
||||
Me.aProductsGant_UpdateProductsGantRows.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aProductsGant_GerenrateProductsGantRows As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aProductsGant_UpdateProductsGantRows As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
|
||||
@@ -117,12 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aProductsGant_GerenrateProductsGantRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_UpdateProductsGantRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>310, 56</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
|
||||
@@ -67,289 +67,5 @@ Public Class ProductsGant_VC
|
||||
|
||||
Return _CalculatedRotation
|
||||
End Function
|
||||
Private Sub aProductsGant_GerenrateProductsGantRows_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProductsGant_GerenrateProductsGantRows.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
|
||||
Dim _ProductsGantRows_DELCollection As New XPCollection(Of ProductsGantRows)(_uow, CriteriaOperator.Parse("ProductsGant.Oid=?", _ProductsGant.Oid))
|
||||
If _ProductsGantRows_DELCollection.Count > 0 Then
|
||||
|
||||
Dim _ProductsGantRowsBar_DELCollection As New XPCollection(Of ProductsGantRowsBar)(_uow, CriteriaOperator.Parse("ProductsGantRows.ProductsGant.Oid=?", _ProductsGant.Oid))
|
||||
_uow.Delete(_ProductsGantRows_DELCollection)
|
||||
_uow.Delete(_ProductsGantRowsBar_DELCollection)
|
||||
|
||||
_uow.CommitChanges()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim InvoiceRowsXPQ As New XPQuery(Of InvoiceRows)(_ocur.Session)
|
||||
Dim IRXPQ = From _InvoiceRowsXPQ In InvoiceRowsXPQ
|
||||
Where _InvoiceRowsXPQ.OrderInRows IsNot Nothing And
|
||||
_InvoiceRowsXPQ.OrderInRows.Products IsNot Nothing And
|
||||
_InvoiceRowsXPQ.InvoiceHeader.IsStorno = False And
|
||||
String.IsNullOrEmpty(_InvoiceRowsXPQ.InvoiceHeader.DocumentNumber) = False And
|
||||
_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,
|
||||
Key .Products = Products}
|
||||
|
||||
Try
|
||||
GeneralFunction.GLOBAL_HAS_Audit = False
|
||||
RaiseEvent InitWork(1, 1, IRXPQ.Count)
|
||||
For Each item In IRXPQ
|
||||
RaiseEvent DoWork()
|
||||
Dim _ProductsGantRows As New ProductsGantRows(_ocur.Session)
|
||||
With _ProductsGantRows
|
||||
.ProductsGant = _ProductsGant
|
||||
.Customers = item.Customers
|
||||
.Products = item.Products
|
||||
.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 " +
|
||||
"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))
|
||||
For Each _InvoiceRows As InvoiceRows In _InvoiceRows_Collection
|
||||
|
||||
Dim _ProductsGantRowsBar_OrderArrive As New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar_OrderArrive
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = New Date(_InvoiceRows.InvoiceHeader.DateExecution.Year, _InvoiceRows.InvoiceHeader.DateExecution.Month, _InvoiceRows.InvoiceHeader.DateExecution.Day, 0, 0, 0)
|
||||
.ToDate = New Date(_InvoiceRows.InvoiceHeader.DateExecution.Year, _InvoiceRows.InvoiceHeader.DateExecution.Month, _InvoiceRows.InvoiceHeader.DateExecution.Day, 23, 59, 59)
|
||||
.BarType = eBarType.eAccounted
|
||||
.Caption = _InvoiceRows.QTT
|
||||
End With
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
'Adott pillanatban leadott rendelés érkezése - dinamikos cucc, frissítésnél ezeket update!
|
||||
Dim _CustomersOrderPriority_Collection As New XPCollection(Of CustomersOrderPriority)(_ocur.Session, CriteriaOperator.Parse("Products=?", item.Products))
|
||||
|
||||
If _CustomersOrderPriority_Collection.Count > 0 Then
|
||||
_CustomersOrderPriority_Collection.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
|
||||
Dim _ProductsGantRowsBar_OrderArrive As New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar_OrderArrive
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = GetSQLTime(_ocur.Session)
|
||||
If _CustomersOrderPriority_Collection(0).DeadlineWeek = 0 Then
|
||||
.ToDate = .FromDate.AddDays(7)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(_CustomersOrderPriority_Collection(0).DeadlineWeek * 7)
|
||||
End If
|
||||
.BarType = eBarType.eOrderArrive
|
||||
End With
|
||||
End If
|
||||
|
||||
'Jelentett készlet
|
||||
Dim _ProductsGantCustomersReport_Collection As New XPCollection(Of ProductsGantCustomersReport)(_ocur.Session, CriteriaOperator.Parse("Customers=? AND Products=?", item.Customers, item.Products))
|
||||
|
||||
If _ProductsGantCustomersReport_Collection.Count > 0 Then
|
||||
For Each _ProductsGantCustomersReport As ProductsGantCustomersReport In _ProductsGantCustomersReport_Collection
|
||||
Dim _ProductsGantRowsBar_Reported As New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar_Reported
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = _ProductsGantCustomersReport.DateExecution
|
||||
If .ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(_ProductsGantCustomersReport.QTT)
|
||||
End If
|
||||
.Caption = _ProductsGantCustomersReport.QTT.ToString
|
||||
.BarType = eBarType.eReported
|
||||
End With
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
'Rendelések
|
||||
Dim _OrderInRowsCollection As New XPCollection(Of OrderInRows)(_ocur.Session, CriteriaOperator.Parse("Products=? AND OrderInHeader.Customers=?", _ProductsGantRows.Products, _ProductsGantRows.Customers))
|
||||
|
||||
If _OrderInRowsCollection.Count > 0 Then
|
||||
For Each _OrderInRows As OrderInRows In _OrderInRowsCollection
|
||||
Dim _ProductsGantRowsBar As New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = New Date(_OrderInRows.OrderInHeader.DateExecution.Year, _OrderInRows.OrderInHeader.DateExecution.Month, _OrderInRows.OrderInHeader.DateExecution.Day, 0, 0, 0)
|
||||
.ToDate = New Date(_OrderInRows.OrderInHeader.DateExecution.Year, _OrderInRows.OrderInHeader.DateExecution.Month, _OrderInRows.OrderInHeader.DateExecution.Day, 23, 59, 59)
|
||||
.BarType = eBarType.eOrdered
|
||||
.Caption = String.Format("{0}", _OrderInRows.QTT)
|
||||
End With
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
RaiseEvent FinalWork()
|
||||
GLOBAL_HAS_Audit = True
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aProductsGant_UpdateProductsGantRows_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProductsGant_UpdateProductsGantRows.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
|
||||
Dim InvoiceRowsXPQ As New XPQuery(Of InvoiceRows)(_ocur.Session)
|
||||
Dim IRXPQ = From _InvoiceRowsXPQ In InvoiceRowsXPQ
|
||||
Where _InvoiceRowsXPQ.OrderInRows IsNot Nothing And
|
||||
_InvoiceRowsXPQ.OrderInRows.Products IsNot Nothing And
|
||||
_InvoiceRowsXPQ.InvoiceHeader.IsStorno = False And
|
||||
String.IsNullOrEmpty(_InvoiceRowsXPQ.InvoiceHeader.DocumentNumber) = False And
|
||||
_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,
|
||||
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()
|
||||
Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("ProductsGant=? AND Customers=? AND Products=?", _ProductsGant, item.Customers, item.Products))
|
||||
|
||||
If _ProductsGantRows Is Nothing Then
|
||||
_ProductsGantRows = New ProductsGantRows(_ocur.Session)
|
||||
With _ProductsGantRows
|
||||
.ProductsGant = _ProductsGant
|
||||
.Customers = item.Customers
|
||||
.Products = item.Products
|
||||
.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 " +
|
||||
"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))
|
||||
For Each _InvoiceRows As InvoiceRows In _InvoiceRows_Collection
|
||||
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",
|
||||
_ProductsGantRows, _FromDate, _ToDate))
|
||||
If _ProductsGantRowsBar_InvoiceRows Is Nothing Then
|
||||
_ProductsGantRowsBar_InvoiceRows = New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar_InvoiceRows
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = _FromDate
|
||||
.ToDate = _ToDate
|
||||
.BarType = eBarType.eAccounted
|
||||
.Caption = _InvoiceRows.QTT
|
||||
End With
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
'Adott pillanatban leadott rendelés érkezése - dinamikos cucc, frissítésnél ezeket update!
|
||||
Dim _CustomersOrderPriority_Collection As New XPCollection(Of CustomersOrderPriority)(_ocur.Session, CriteriaOperator.Parse("Products=?", item.Products))
|
||||
|
||||
If _CustomersOrderPriority_Collection.Count > 0 Then
|
||||
_CustomersOrderPriority_Collection.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
|
||||
Dim _ProductsGantRowsBar_OrderArrive As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar)(CriteriaOperator.Parse("ProductsGantRows=? AND BarType=3", _ProductsGantRows))
|
||||
If _ProductsGantRowsBar_OrderArrive Is Nothing Then
|
||||
_ProductsGantRowsBar_OrderArrive = New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar_OrderArrive
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = GetSQLTime(_ocur.Session).Date
|
||||
If _CustomersOrderPriority_Collection(0).DeadlineWeek = 0 Then
|
||||
.ToDate = .FromDate.AddDays(7)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(_CustomersOrderPriority_Collection(0).DeadlineWeek * 7)
|
||||
End If
|
||||
.BarType = eBarType.eOrderArrive
|
||||
End With
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Jelentett készlet
|
||||
Dim _ProductsGantCustomersReport_Collection As New XPCollection(Of ProductsGantCustomersReport)(_ocur.Session, CriteriaOperator.Parse("Customers=? AND Products=?", item.Customers, item.Products))
|
||||
|
||||
If _ProductsGantCustomersReport_Collection.Count > 0 Then
|
||||
For Each _ProductsGantCustomersReport As ProductsGantCustomersReport In _ProductsGantCustomersReport_Collection
|
||||
|
||||
Dim _FromDate As Date = _ProductsGantCustomersReport.DateExecution
|
||||
_ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
|
||||
Dim _ToDate As Date
|
||||
If _ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
_ToDate = _FromDate.AddDays(_ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
_ToDate = _FromDate.Date
|
||||
End If
|
||||
|
||||
|
||||
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)
|
||||
With _ProductsGantRowsBar_Reported
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = _FromDate
|
||||
.ToDate = _ToDate
|
||||
.Caption = _ProductsGantCustomersReport.QTT.ToString
|
||||
.BarType = eBarType.eReported
|
||||
End With
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
'Rendelések
|
||||
Dim _OrderInRowsCollection As New XPCollection(Of OrderInRows)(_ocur.Session, CriteriaOperator.Parse("Products=? AND OrderInHeader.Customers=?", _ProductsGantRows.Products, _ProductsGantRows.Customers))
|
||||
|
||||
If _OrderInRowsCollection.Count > 0 Then
|
||||
For Each _OrderInRows As OrderInRows In _OrderInRowsCollection
|
||||
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",
|
||||
_ProductsGantRows, _FromDate, _ToDate))
|
||||
|
||||
If _ProductsGantRowsBar Is Nothing Then
|
||||
_ProductsGantRowsBar = New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = New Date(_OrderInRows.OrderInHeader.DateExecution.Year, _OrderInRows.OrderInHeader.DateExecution.Month, _OrderInRows.OrderInHeader.DateExecution.Day, 0, 0, 0)
|
||||
.ToDate = New Date(_OrderInRows.OrderInHeader.DateExecution.Year, _OrderInRows.OrderInHeader.DateExecution.Month, _OrderInRows.OrderInHeader.DateExecution.Day, 23, 59, 59)
|
||||
.BarType = eBarType.eOrdered
|
||||
.Caption = String.Format("{0}", _OrderInRows.QTT)
|
||||
End With
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
RaiseEvent FinalWork()
|
||||
GLOBAL_HAS_Audit = True
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -255,7 +255,7 @@ Public Module GeneralFunction
|
||||
l = Math.Round(Math.Abs(l), 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
VégStr = ""
|
||||
SzámSzöveg = Format(l, "000000000000.0")
|
||||
SzámSzöveg = Format(l, "000000000000.00")
|
||||
|
||||
seged = Mid(SzámSzöveg, 1, 3)
|
||||
seged = Change3Value(seged)
|
||||
@@ -285,7 +285,7 @@ Public Module GeneralFunction
|
||||
seged = Change3Value(seged)
|
||||
VégStr = VégStr & seged
|
||||
seged = Mid(SzámSzöveg, 14, 1)
|
||||
VégStr = VégStr & " " & seged & "0/100"
|
||||
VégStr = VégStr & " " & seged & "/100"
|
||||
|
||||
Return UCase$(VégStr)
|
||||
End Function
|
||||
|
||||
@@ -6393,12 +6393,15 @@
|
||||
</Class>
|
||||
<Class Name="Nuvolar.Module.ProductsGantRows" Caption="Termék gant sorok">
|
||||
<OwnMembers>
|
||||
<Member Name="CalculatedRotation" Caption="Számított forgás" />
|
||||
<Member Name="CalculatedRotation" Caption="Számított forgás (W16)" />
|
||||
<Member Name="CalculatedRotationW52" Caption="Számított forgás (W52)" />
|
||||
<Member Name="Customers" Caption="Ügyfél" />
|
||||
<Member Name="ManualRotation" Caption="Kézi forgás" />
|
||||
<Member Name="Products" Caption="Termék" />
|
||||
<Member Name="ProductsGant" Caption="Termék gant" />
|
||||
<Member Name="ProductsGantRowsBar" Caption="Termék gant sor csík" />
|
||||
<Member Name="QTT_Critical" Caption="Kritikus" />
|
||||
<Member Name="QTT_Minimum" Caption="Minimum" />
|
||||
</OwnMembers>
|
||||
</Class>
|
||||
<Class Name="Nuvolar.Module.ProductsGantRowsBar" Caption="Termék gant sor csík">
|
||||
@@ -9364,6 +9367,7 @@
|
||||
<Items>
|
||||
<Item Id="@ProductFinder" Caption="Termék gyorskereső" />
|
||||
<Item Id="@ServiceFinder" Caption="Szolgáltatás gyorskereső" />
|
||||
<Item Id="@GANT" Caption="Gantt diagram" />
|
||||
</Items>
|
||||
</Item>
|
||||
<Item Id="@WorkSheet" Caption="Munkalapkezelés">
|
||||
|
||||
@@ -2919,7 +2919,15 @@
|
||||
</Class>
|
||||
<Class Name="Nuvolar.Module.ProductsGant_SetGantItemColumn_PopUp" ImageName="column" />
|
||||
<Class Name="Nuvolar.Module.ProductsGantCustomersReport" ImageName="Action_Report_Object_Inplace_Preview" />
|
||||
<Class Name="Nuvolar.Module.ProductsGantRows" ImageName="" />
|
||||
<Class Name="Nuvolar.Module.ProductsGantRows" ImageName="">
|
||||
<OwnMembers>
|
||||
<Member Name="CalculatedRotation" HideValueIfZero="True" />
|
||||
<Member Name="CalculatedRotationW52" HideValueIfZero="True" />
|
||||
<Member Name="ManualRotation" HideValueIfZero="True" />
|
||||
<Member Name="QTT_Critical" HideValueIfZero="True" />
|
||||
<Member Name="QTT_Minimum" HideValueIfZero="True" />
|
||||
</OwnMembers>
|
||||
</Class>
|
||||
<Class Name="Nuvolar.Module.ProductsGroupsDocumentations" ImageName="document_notebook" />
|
||||
<Class Name="Nuvolar.Module.ProjectHeader" ImageName="text_tree">
|
||||
<OwnMembers>
|
||||
@@ -4418,9 +4426,14 @@
|
||||
<Item Id="@PricingMinimum" ViewId="PricingMinimum_ListView" Index="4" IsNewNode="True" />
|
||||
<Item Id="Services_ListView" ViewId="Services_ListView" ObjectKey="" Index="5" IsNewNode="True" />
|
||||
<Item Id="@ServiceFinder" ViewId="ServiceFinder_DetailView" Index="6" IsNewNode="True" />
|
||||
<Item Id="@PricingActionHeader_ListView" ViewId="PricingActionHeader_ListView" IsNewNode="True" />
|
||||
<Item Id="@ProductsGant_ListView" ViewId="ProductsGant_ListView" IsNewNode="True" />
|
||||
<Item Id="@Technologies_ListView" ViewId="Technologies_ListView" IsNewNode="True" />
|
||||
<Item Id="@PricingActionHeader_ListView" ViewId="PricingActionHeader_ListView" Index="7" IsNewNode="True" />
|
||||
<Item Id="@Technologies_ListView" ViewId="Technologies_ListView" Index="8" IsNewNode="True" />
|
||||
<Item Id="@GANT" IsNewNode="True">
|
||||
<Items IsNewNode="True">
|
||||
<Item Id="@ProductsGant_ListView" ViewId="ProductsGant_ListView" Index="9" IsNewNode="True" />
|
||||
<Item Id="@513d7f43-d0fd-4331-968b-14af86d3a341" ViewId="ProductsGantCustomersReport_ListView" Index="10" IsNewNode="True" />
|
||||
</Items>
|
||||
</Item>
|
||||
</Items>
|
||||
</Item>
|
||||
<Item Id="@WorkSheet" IsNewNode="True">
|
||||
@@ -24217,6 +24230,14 @@
|
||||
<ColumnInfo Id="Width" InLineEdit="True" />
|
||||
</Columns>
|
||||
</ListView>
|
||||
<ListView Id="ProductsGantCustomersReport_ListView" AllowEdit="True" AllowLink="False" AllowUnlink="False" AutoExpandAllGroups="True">
|
||||
<Columns>
|
||||
<ColumnInfo Id="Customers" InLineEdit="True" />
|
||||
<ColumnInfo Id="Products" InLineEdit="True" />
|
||||
<ColumnInfo Id="QTT" HideValueIfZero="True" InLineEdit="True" />
|
||||
<ColumnInfo Id="DateExecution" InLineEdit="True" />
|
||||
</Columns>
|
||||
</ListView>
|
||||
<ListView Id="ProductsGantCustomersReport_ListView_PopUp" ClassName="Nuvolar.Module.ProductsGantCustomersReport" AllowDelete="False" AllowNew="False" IsNewNode="True">
|
||||
<Columns IsNewNode="True">
|
||||
<ColumnInfo Id="Customers" PropertyName="Customers" Width="70" Index="0" IsNewNode="True" />
|
||||
|
||||
Reference in New Issue
Block a user