StorageMoveEvents
This commit is contained in:
2017-04-25 10:13:21 +02:00
parent 103f4650e1
commit 2cf199449f
3 changed files with 6 additions and 8 deletions
@@ -288,17 +288,17 @@ Public Class InvoiceCreditNote_VC
'Betárolás véglegesítése
For Each _StorageInRows As StorageInRows In _StorageInHeader.StorageInRows
Dim _StorageComputed As StorageComputed = _onew.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_onew.GetObject(_StorageInRows.Products), _onew.GetObject(_StorageInHeader.Storage)))
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?",
_ocur.GetObject(_StorageInRows.Products), _ocur.GetObject(_StorageInHeader.Storage)))
If _StorageInRows.QTT_Will > 0 Then
_StorageInRows.QTT = _StorageInRows.QTT_Will
_StorageComputed.QTTFree += _StorageInRows.QTT_Will
_StorageComputed.QTTReservedIn -= _StorageInRows.QTT_Will
Dim _StorageMoveEvents As New StorageMoveEvents(_onew.Session)
Dim _StorageMoveEvents As New StorageMoveEvents(_ocur.Session)
With _StorageMoveEvents
.StorageInRows = _onew.GetObject(_StorageInRows)
.StorageInRows = _ocur.GetObject(_StorageInRows)
.QTT = _StorageInRows.QTT_Will
.QTT_Free_After = _StorageComputed.QTTFree
.QTT_Free_Before = _StorageMoveEvents.QTT_Free_After - _StorageMoveEvents.QTT
@@ -320,7 +320,7 @@ Public Class InvoiceCreditNote_VC
Next
_ocur.CommitChanges()
Dim _ReportData_Storage As ReportData = _onew.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageInHeader.Storage.ReportIn.Oid), True)
Dim _ReportData_Storage As ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageInHeader.Storage.ReportIn.Oid), True)
If _ReportData_Storage Is Nothing Or _StorageInHeader Is Nothing Then
Else
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData_Storage, CriteriaOperator.Parse("StorageInHeader.DocumentNumber =?", _StorageInHeader.DocumentNumber), True)
@@ -6,6 +6,7 @@ Imports DevExpress.ExpressApp.Model
Public Module LockingModule
Public Function LockObject(_Paramuow As UnitOfWork, _ParamObjectType As Type, _ParamObjectKey As String, _ParamUser As User) As Boolean
UnLockObject(_Paramuow, _ParamObjectType, _ParamObjectKey, _ParamUser)
Dim _IsLocked As Boolean = False
Dim _TableName As String
Dim _LockingObject As LockingObject