Reconfigure for GIT
This commit is contained in:
+84
@@ -0,0 +1,84 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports System.IO
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("FinancialTransactions")> _
|
||||
Public Class ProjectPlan
|
||||
Inherits BaseObject
|
||||
Private _CustomersFrom As CustomersFrom
|
||||
Private _ShortName As String 'Megnevezés
|
||||
Private _IsEditable As Boolean 'Szerkeszthető vagy végleges
|
||||
Private _ExcelProperty As Stream
|
||||
Private _DateFrom As Date 'Kezdő dátumtum
|
||||
Private _DateTo As Date 'Vég dátum
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(ByVal value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsEditable As Boolean
|
||||
Get
|
||||
Return _IsEditable
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsEditable", _IsEditable, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateFrom As Date
|
||||
Get
|
||||
Return _DateFrom
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateFrom", _DateFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateTo As Date
|
||||
Get
|
||||
Return _DateTo
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateTo", _DateTo, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<VisibleInListView(False)> _
|
||||
<Association("ProjectPlan-ProjectPlanRows", GetType(ProjectPlanRows))> _
|
||||
ReadOnly Property ProjectPlanRows As XPCollection(Of ProjectPlanRows)
|
||||
Get
|
||||
Return GetCollection(Of ProjectPlanRows)("ProjectPlanRows")
|
||||
End Get
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property ExcelProperty As Stream
|
||||
Get
|
||||
Return _ExcelProperty
|
||||
End Get
|
||||
Set(ByVal value As Stream)
|
||||
SetPropertyValue("ExcelProperty", _ExcelProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False), DeferredDeletion(False)> _
|
||||
Public Class ProjectPlanRows
|
||||
Inherits BaseObject
|
||||
Private _ProjectPlan As ProjectPlan 'tervezõ fejléc
|
||||
Private _Controlling As Controlling 'Kontroll szám
|
||||
Private _CostHolder As CostHolder
|
||||
Private _CostPlace As CostPlace
|
||||
Private _UniqueObjects As UniqueObjects 'Egyedi azonosító
|
||||
Private _JobNumberObjects As JobNumberObjects
|
||||
Private _ChartOfAccountsName As String
|
||||
Private _AccountNumber As String
|
||||
Private _DateYear As Long 'Év
|
||||
Private _DateMonth As Long 'Hónap
|
||||
|
||||
'//HUF adatok
|
||||
Private _DebitAmountPlanHUF As Double 'Tartozik Terv HUF
|
||||
Private _CreditAmountPlanHUF As Double 'Követel terv HUF
|
||||
Private _DebitAmountFactHUF As Double 'Tartozik tény HUF
|
||||
Private _CreditAmountFactHUF As Double 'Követel tény HUF
|
||||
Private _DebitAmountContractHUF As Double 'Tartozik szerzõdés HUF
|
||||
Private _CreditAmountContractHUF As Double 'Követel szerzõdés HUF
|
||||
|
||||
Private _CurrencyName As CurrencyName 'Deviza
|
||||
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<Association("ProjectPlan-ProjectPlanRows", GetType(ProjectPlan))> _
|
||||
Property ProjectPlan As ProjectPlan
|
||||
Get
|
||||
Return _ProjectPlan
|
||||
End Get
|
||||
Set(ByVal value As ProjectPlan)
|
||||
SetPropertyValue("ProjectPlan", _ProjectPlan, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("ProjectPlanRows-Controlling", DefaultContexts.Save)> _
|
||||
<DataSourceCriteria("IsParent=False")> _
|
||||
Property Controlling As Controlling
|
||||
Get
|
||||
Return _Controlling
|
||||
End Get
|
||||
Set(ByVal value As Controlling)
|
||||
SetPropertyValue("Controlling", _Controlling, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CostHolder As CostHolder
|
||||
Get
|
||||
Return _CostHolder
|
||||
End Get
|
||||
Set(value As CostHolder)
|
||||
SetPropertyValue("CostHolder", _CostHolder, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CostPlace As CostPlace
|
||||
Get
|
||||
Return _CostPlace
|
||||
End Get
|
||||
Set(value As CostPlace)
|
||||
SetPropertyValue("CostPlace", _CostPlace, value)
|
||||
End Set
|
||||
End Property
|
||||
Property UniqueObjects As UniqueObjects
|
||||
Get
|
||||
Return _UniqueObjects
|
||||
End Get
|
||||
Set(ByVal value As UniqueObjects)
|
||||
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
|
||||
End Set
|
||||
End Property
|
||||
Property JobNumberObjects As JobNumberObjects
|
||||
Get
|
||||
Return _JobNumberObjects
|
||||
End Get
|
||||
Set(ByVal value As JobNumberObjects)
|
||||
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property ChartOfAccountsName As String
|
||||
Get
|
||||
Return _ChartOfAccountsName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ChartOfAccountsName", _ChartOfAccountsName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountNumber As String
|
||||
Get
|
||||
Return _AccountNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AccountNumber", _AccountNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateYear As Long
|
||||
Get
|
||||
Return _DateYear
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("DateYear", _DateYear, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateMonth As Long
|
||||
Get
|
||||
Return _DateMonth
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("DateMonth", _DateMonth, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DebitAmountPlanHUF As Double
|
||||
Get
|
||||
Return _DebitAmountPlanHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("DebitAmountPlanHUF", _DebitAmountPlanHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditAmountPlanHUF As Double
|
||||
Get
|
||||
Return _CreditAmountPlanHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CreditAmountPlanHUF", _CreditAmountPlanHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DebitAmountFactHUF As Double
|
||||
Get
|
||||
Return _DebitAmountFactHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("DebitAmountFactHUF", _DebitAmountFactHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditAmountFactHUF As Double
|
||||
Get
|
||||
Return _CreditAmountFactHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CreditAmountFactHUF", _CreditAmountFactHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DebitAmountContractHUF As Double
|
||||
Get
|
||||
Return _DebitAmountContractHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("DebitAmountContractHUF", _DebitAmountContractHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditAmountContractHUF As Double
|
||||
Get
|
||||
Return _CreditAmountContractHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CreditAmountContractHUF", _CreditAmountContractHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CurrencyName As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(ByVal value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Generated
+99
@@ -0,0 +1,99 @@
|
||||
Partial Class ProjectPlanVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aProjectPlanGenerateFact = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aProjectPlanEditPlan = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aProjectPlanViewContract = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aProjectPlanViewFact = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aProjectPlanGenerateFact
|
||||
'
|
||||
Me.aProjectPlanGenerateFact.Caption = "aProject Plan Generate Fact"
|
||||
Me.aProjectPlanGenerateFact.ConfirmationMessage = Nothing
|
||||
Me.aProjectPlanGenerateFact.Id = "aProjectPlanGenerateFact"
|
||||
Me.aProjectPlanGenerateFact.ImageName = Nothing
|
||||
Me.aProjectPlanGenerateFact.Shortcut = Nothing
|
||||
Me.aProjectPlanGenerateFact.Tag = Nothing
|
||||
Me.aProjectPlanGenerateFact.TargetObjectsCriteria = Nothing
|
||||
Me.aProjectPlanGenerateFact.TargetObjectType = GetType(SISBusiness.[Module].ProjectPlan)
|
||||
Me.aProjectPlanGenerateFact.TargetViewId = Nothing
|
||||
Me.aProjectPlanGenerateFact.ToolTip = Nothing
|
||||
Me.aProjectPlanGenerateFact.TypeOfView = Nothing
|
||||
'
|
||||
'aProjectPlanEditPlan
|
||||
'
|
||||
Me.aProjectPlanEditPlan.Caption = "aProject Plan Edit Plan"
|
||||
Me.aProjectPlanEditPlan.ConfirmationMessage = Nothing
|
||||
Me.aProjectPlanEditPlan.Id = "aProjectPlanEditPlan"
|
||||
Me.aProjectPlanEditPlan.ImageName = Nothing
|
||||
Me.aProjectPlanEditPlan.Shortcut = Nothing
|
||||
Me.aProjectPlanEditPlan.Tag = Nothing
|
||||
Me.aProjectPlanEditPlan.TargetObjectsCriteria = Nothing
|
||||
Me.aProjectPlanEditPlan.TargetObjectType = GetType(SISBusiness.[Module].ProjectPlanRows)
|
||||
Me.aProjectPlanEditPlan.TargetViewId = Nothing
|
||||
Me.aProjectPlanEditPlan.ToolTip = Nothing
|
||||
Me.aProjectPlanEditPlan.TypeOfView = Nothing
|
||||
'
|
||||
'aProjectPlanViewContract
|
||||
'
|
||||
Me.aProjectPlanViewContract.Caption = "aProject Plan View Contract"
|
||||
Me.aProjectPlanViewContract.ConfirmationMessage = Nothing
|
||||
Me.aProjectPlanViewContract.Id = "aProjectPlanViewContract"
|
||||
Me.aProjectPlanViewContract.ImageName = Nothing
|
||||
Me.aProjectPlanViewContract.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aProjectPlanViewContract.Shortcut = Nothing
|
||||
Me.aProjectPlanViewContract.Tag = Nothing
|
||||
Me.aProjectPlanViewContract.TargetObjectsCriteria = Nothing
|
||||
Me.aProjectPlanViewContract.TargetObjectType = GetType(SISBusiness.[Module].ProjectPlanRows)
|
||||
Me.aProjectPlanViewContract.TargetViewId = Nothing
|
||||
Me.aProjectPlanViewContract.ToolTip = Nothing
|
||||
Me.aProjectPlanViewContract.TypeOfView = Nothing
|
||||
'
|
||||
'aProjectPlanViewFact
|
||||
'
|
||||
Me.aProjectPlanViewFact.Caption = "aProject Plan View Fact"
|
||||
Me.aProjectPlanViewFact.ConfirmationMessage = Nothing
|
||||
Me.aProjectPlanViewFact.Id = "aProjectPlanViewFact"
|
||||
Me.aProjectPlanViewFact.ImageName = Nothing
|
||||
Me.aProjectPlanViewFact.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aProjectPlanViewFact.Shortcut = Nothing
|
||||
Me.aProjectPlanViewFact.Tag = Nothing
|
||||
Me.aProjectPlanViewFact.TargetObjectsCriteria = Nothing
|
||||
Me.aProjectPlanViewFact.TargetObjectType = GetType(SISBusiness.[Module].ProjectPlanRows)
|
||||
Me.aProjectPlanViewFact.TargetViewId = Nothing
|
||||
Me.aProjectPlanViewFact.ToolTip = Nothing
|
||||
Me.aProjectPlanViewFact.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aProjectPlanGenerateFact As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aProjectPlanViewContract As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aProjectPlanViewFact As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Protected WithEvents aProjectPlanEditPlan As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aProjectPlanGenerateFact.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aProjectPlanEditPlan.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aProjectPlanViewContract.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aProjectPlanViewFact.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>208, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+760
@@ -0,0 +1,760 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
Imports System.Linq
|
||||
Imports System.Linq.Expressions
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class ProjectPlanVC
|
||||
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 Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aProjectPlanViewContract_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProjectPlanViewContract.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ProjectPlanRows As ProjectPlanRows = _onew.GetObject(TryCast(View.SelectedObjects(0), ProjectPlanRows))
|
||||
|
||||
|
||||
Dim _ContractRows_Controlling As New CollectionSource(_onew, GetType(ContractRows))
|
||||
Dim _ContractRows As ContractRows
|
||||
|
||||
'_ContractRows.GLHeader.DateExecution.Date
|
||||
|
||||
_ContractRows_Controlling.BeginUpdateCriteria()
|
||||
'_ContractRows_Controlling.Criteria("Plan1") = CriteriaOperator.Parse("(DebitChartOfAccounts.AccountNumber=? or CreditChartOfAccounts.AccountNumber=?)", _ProjectPlanRows.AccountNumber, _ProjectPlanRows.AccountNumber)
|
||||
If _ProjectPlanRows.Controlling Is Nothing Then
|
||||
_ContractRows_Controlling.Criteria("Controlling") = CriteriaOperator.Parse("isnull(Controlling)=True")
|
||||
Else
|
||||
_ContractRows_Controlling.Criteria("Controlling") = CriteriaOperator.Parse("Controlling=?", _ProjectPlanRows.Controlling)
|
||||
End If
|
||||
If _ProjectPlanRows.CostHolder Is Nothing Then
|
||||
_ContractRows_Controlling.Criteria("CostHolder") = CriteriaOperator.Parse("isnull(CostHolder)=True")
|
||||
Else
|
||||
_ContractRows_Controlling.Criteria("CostHolder") = CriteriaOperator.Parse("CostHolder=?", _ProjectPlanRows.CostHolder)
|
||||
End If
|
||||
If _ProjectPlanRows.CostPlace Is Nothing Then
|
||||
_ContractRows_Controlling.Criteria("CostPlace") = CriteriaOperator.Parse("isnull(CostPlace)=True")
|
||||
Else
|
||||
_ContractRows_Controlling.Criteria("CostPlace") = CriteriaOperator.Parse("CostPlace=?", _ProjectPlanRows.CostPlace)
|
||||
End If
|
||||
If _ProjectPlanRows.JobNumberObjects Is Nothing Then
|
||||
_ContractRows_Controlling.Criteria("JobNumberObjects") = CriteriaOperator.Parse("isnull(JobNumberObjects)=True")
|
||||
Else
|
||||
_ContractRows_Controlling.Criteria("JobNumberObjects") = CriteriaOperator.Parse("JobNumberObjects=?", _ProjectPlanRows.JobNumberObjects)
|
||||
End If
|
||||
If _ProjectPlanRows.UniqueObjects Is Nothing Then
|
||||
_ContractRows_Controlling.Criteria("UniqueObjects") = CriteriaOperator.Parse("isnull(UniqueObjects)=True")
|
||||
Else
|
||||
_ContractRows_Controlling.Criteria("UniqueObjects") = CriteriaOperator.Parse("UniqueObjects=?", _ProjectPlanRows.UniqueObjects)
|
||||
End If
|
||||
|
||||
_ContractRows_Controlling.Criteria("DateExecution") = CriteriaOperator.Parse("GetYear(DateExecution)=? and GetMonth(DateExecution)=? and Contracts.CustomersFrom=?", _
|
||||
_ProjectPlanRows.DateYear, _ProjectPlanRows.DateMonth, _ProjectPlanRows.ProjectPlan.CustomersFrom)
|
||||
_ContractRows_Controlling.EndUpdateCriteria()
|
||||
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateListView("ContractRows_ListView_ProjectPlan", _ContractRows_Controlling, True)
|
||||
End Sub
|
||||
|
||||
Private Sub aProjectPlanGenerateFact_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProjectPlanGenerateFact.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
|
||||
Dim _ProjectPlan As ProjectPlan = _uow.GetObjectByKey(Of ProjectPlan)(TryCast(View.SelectedObjects(0), ProjectPlan).Oid)
|
||||
Dim _ProjectPlanRows As ProjectPlanRows
|
||||
Dim _SQL As String
|
||||
|
||||
Select Case GLOBAL_SQLType
|
||||
Case eSQLType.PostgreSQL
|
||||
_SQL = "Update ""ProjectPlanRows"" set "
|
||||
_SQL += " ""DebitAmountFactHUF""=0,""CreditAmountFactHUF""=0, "
|
||||
_SQL += " ""DebitAmountContractHUF""=0,""CreditAmountContractHUF""=0 "
|
||||
_SQL += " Where ""ProjectPlan""='" & _ProjectPlan.Oid.ToString & "'"
|
||||
Case Else
|
||||
_SQL = "Update ProjectPlanRows set "
|
||||
_SQL += " DebitAmountFactHUF=0,CreditAmountFactHUF=0, "
|
||||
_SQL += " DebitAmountContractHUF=0,CreditAmountContractHUF=0 "
|
||||
_SQL += " Where ProjectPlan='" & _ProjectPlan.Oid.ToString & "'"
|
||||
End Select
|
||||
_onew.Session.ExecuteNonQuery(_SQL)
|
||||
|
||||
_onew.CommitChanges()
|
||||
|
||||
Dim _ChartOfAccounts As ChartOfAccounts
|
||||
Dim _AccountNumber As String = ""
|
||||
Dim _Customers As Customers
|
||||
Dim _Controlling As Controlling
|
||||
Dim _VAT As VAT
|
||||
Dim _GLRows_xpquery = New XPQuery(Of GLRows)(_uow)
|
||||
Dim query As System.Linq.IQueryable(Of Object)
|
||||
|
||||
Dim _criteria As String = ""
|
||||
'// Tartozik láb alapján
|
||||
query = From _glrows In _GLRows_xpquery
|
||||
Where _glrows.GLHeader.IsEditable = False And _
|
||||
_glrows.GLHeader.DateExecution.Date >= _ProjectPlan.DateFrom.Date And _
|
||||
_glrows.GLHeader.DateExecution.Date < _ProjectPlan.DateTo.Date And _
|
||||
_glrows.GLHeader IsNot Nothing And _
|
||||
_glrows.GLHeader.CustomersFrom.Oid = _ProjectPlan.CustomersFrom.Oid _
|
||||
Group _glrows By _glrows.DebitChartOfAccounts.AccountNumber, _
|
||||
_glrows.GLHeader.DateExecution.Date.Year, _
|
||||
_glrows.GLHeader.DateExecution.Date.Month, _
|
||||
_glrows.Controlling, _
|
||||
_glrows.CostHolder, _
|
||||
_glrows.CostPlace, _
|
||||
_glrows.UniqueObjects, _
|
||||
_glrows.JobNumberObjects Into g = Group _
|
||||
Select New With {Key .AccountNumber = AccountNumber, _
|
||||
Key .DateYear = Year, _
|
||||
Key .DateMonth = Month, _
|
||||
Key .Controlling = Controlling, _
|
||||
Key .CostHolder = CostHolder, _
|
||||
Key .CostPlace = CostPlace, _
|
||||
Key .UniqueObjects = UniqueObjects, _
|
||||
Key .JobNumberObjects = JobNumberObjects, _
|
||||
Key .AmountNettoHUF = g.Sum(Function(inv) (inv.AmountHUF))}
|
||||
|
||||
RaiseEvent InitWork(1, 1, query.Count)
|
||||
For Each item In query
|
||||
RaiseEvent DoWork()
|
||||
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & item.AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_ProjectPlanRows.DebitAmountFactHUF += item.AmountNettoHUF
|
||||
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", item.AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = item.AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
Next
|
||||
_uow.CommitTransaction()
|
||||
RaiseEvent FinalWork
|
||||
|
||||
'// Követel láb alapján
|
||||
query = From _glrows In _GLRows_xpquery
|
||||
Where _glrows.GLHeader.IsEditable = False And _
|
||||
_glrows.GLHeader.DateExecution.Date >= _ProjectPlan.DateFrom.Date And _
|
||||
_glrows.GLHeader.DateExecution.Date < _ProjectPlan.DateTo.Date And _
|
||||
_glrows.GLHeader IsNot Nothing And _
|
||||
_glrows.GLHeader.CustomersFrom.Oid = _ProjectPlan.CustomersFrom.Oid _
|
||||
Group _glrows By _glrows.CreditChartOfAccounts.AccountNumber, _
|
||||
_glrows.GLHeader.DateExecution.Date.Year, _
|
||||
_glrows.GLHeader.DateExecution.Date.Month, _
|
||||
_glrows.Controlling, _
|
||||
_glrows.CostHolder, _
|
||||
_glrows.CostPlace, _
|
||||
_glrows.UniqueObjects, _
|
||||
_glrows.JobNumberObjects Into g = Group _
|
||||
Select New With {Key .AccountNumber = AccountNumber, _
|
||||
Key .DateYear = Year, _
|
||||
Key .DateMonth = Month, _
|
||||
Key .Controlling = Controlling, _
|
||||
Key .CostHolder = CostHolder, _
|
||||
Key .CostPlace = CostPlace, _
|
||||
Key .UniqueObjects = UniqueObjects, _
|
||||
Key .JobNumberObjects = JobNumberObjects, _
|
||||
Key .AmountNettoHUF = g.Sum(Function(inv) (inv.AmountHUF))}
|
||||
|
||||
RaiseEvent InitWork(1, 1, query.Count)
|
||||
For Each item In query
|
||||
RaiseEvent DoWork()
|
||||
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & item.AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_ProjectPlanRows.CreditAmountFactHUF += item.AmountNettoHUF
|
||||
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", item.AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = item.AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
Next
|
||||
_uow.CommitTransaction()
|
||||
RaiseEvent FinalWork
|
||||
|
||||
'// Most a vevõi szerzõdési sorok jönnek
|
||||
Dim _ContractRows_xpquery = New XPQuery(Of ContractRows)(_uow)
|
||||
|
||||
query = From _ContractRows In _ContractRows_xpquery
|
||||
Where _ContractRows.Contracts.State = State.Signed And _
|
||||
_ContractRows.Contracts.ContractTemplate.PartnerType = ePartnerType.eReceivables And _
|
||||
_ContractRows.DateExecution.Date >= _ProjectPlan.DateFrom.Date And _
|
||||
_ContractRows.DateExecution.Date < _ProjectPlan.DateTo.Date And _
|
||||
_ContractRows.Contracts IsNot Nothing And _
|
||||
_ContractRows.Contracts.CustomersFrom.Oid = _ProjectPlan.CustomersFrom.Oid _
|
||||
Group _ContractRows By _ContractRows.DateExecution.Date.Year, _
|
||||
_ContractRows.DateExecution.Date.Month, _
|
||||
_ContractRows.Controlling, _
|
||||
_ContractRows.CostHolder, _
|
||||
_ContractRows.CostPlace, _
|
||||
_ContractRows.UniqueObjects, _
|
||||
_ContractRows.Contracts.Customers, _
|
||||
_ContractRows.VAT, _
|
||||
_ContractRows.JobNumberObjects Into g = Group _
|
||||
Select New With {Key .DateYear = Year, _
|
||||
Key .DateMonth = Month, _
|
||||
Key .Controlling = Controlling, _
|
||||
Key .CostHolder = CostHolder, _
|
||||
Key .CostPlace = CostPlace, _
|
||||
Key .UniqueObjects = UniqueObjects, _
|
||||
Key .JobNumberObjects = JobNumberObjects, _
|
||||
Key .VAT = VAT,
|
||||
Key .Customers = Customers,
|
||||
Key .AmountNettoHUF = g.Sum(Function(inv) (inv.QTT * inv.NettoPriceHUF))}
|
||||
|
||||
RaiseEvent InitWork(1, 1, query.Count)
|
||||
For Each item In query
|
||||
RaiseEvent DoWork()
|
||||
_Customers = item.Customers
|
||||
_ChartOfAccounts = _Customers.CustomersGLParameters.GetChartOfAccounts(item.DateYear, eVATMode.eOut)
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
End If
|
||||
|
||||
'//Bruttó sor tartozikba -------------------
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & _AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_VAT = item.VAT
|
||||
If _VAT IsNot Nothing Then
|
||||
_ProjectPlanRows.DebitAmountContractHUF += Math.Round(item.AmountNettoHUF * (1 + _VAT.KeyValue), 0, MidpointRounding.AwayFromZero)
|
||||
Else
|
||||
_ProjectPlanRows.DebitAmountContractHUF += item.AmountNettoHUF
|
||||
End If
|
||||
|
||||
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", _AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = _AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
|
||||
'//Nettó sor követelbe --------------------------
|
||||
_Controlling = item.Controlling
|
||||
If _Controlling IsNot Nothing Then
|
||||
_ChartOfAccounts = _Controlling.GetChartOfAccounts(item.DateYear, False)
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & _AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_ProjectPlanRows.CreditAmountContractHUF += item.AmountNettoHUF
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", _AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = _AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
End If
|
||||
End If
|
||||
'//ÁFA követelbe -------------------------------
|
||||
If _VAT IsNot Nothing Then
|
||||
_ChartOfAccounts = _VAT.GetChartOfAccounts(item.DateYear, eVATMode.eOut)
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & _AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_ProjectPlanRows.CreditAmountContractHUF += Math.Round(item.AmountNettoHUF * _VAT.KeyValue, 0, MidpointRounding.AwayFromZero)
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", _AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = _AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_uow.CommitTransaction()
|
||||
RaiseEvent FinalWork
|
||||
|
||||
'// Most a Szállítói szerzõdési sorok jönnek
|
||||
|
||||
query = From _ContractRows In _ContractRows_xpquery
|
||||
Where _ContractRows.Contracts.State = State.Signed And _
|
||||
_ContractRows.Contracts.ContractTemplate.PartnerType = ePartnerType.ePayabels And _
|
||||
_ContractRows.DateExecution.Date >= _ProjectPlan.DateFrom.Date And _
|
||||
_ContractRows.DateExecution.Date < _ProjectPlan.DateTo.Date And _
|
||||
_ContractRows.Contracts IsNot Nothing And _
|
||||
_ContractRows.Contracts.CustomersFrom.Oid = _ProjectPlan.CustomersFrom.Oid _
|
||||
Group _ContractRows By _ContractRows.DateExecution.Date.Year, _
|
||||
_ContractRows.DateExecution.Date.Month, _
|
||||
_ContractRows.Controlling, _
|
||||
_ContractRows.CostHolder, _
|
||||
_ContractRows.CostPlace, _
|
||||
_ContractRows.UniqueObjects, _
|
||||
_ContractRows.Contracts.Customers, _
|
||||
_ContractRows.VAT, _
|
||||
_ContractRows.JobNumberObjects Into g = Group _
|
||||
Select New With {Key .DateYear = Year, _
|
||||
Key .DateMonth = Month, _
|
||||
Key .Controlling = Controlling, _
|
||||
Key .CostHolder = CostHolder, _
|
||||
Key .CostPlace = CostPlace, _
|
||||
Key .UniqueObjects = UniqueObjects, _
|
||||
Key .JobNumberObjects = JobNumberObjects, _
|
||||
Key .VAT = VAT,
|
||||
Key .Customers = Customers,
|
||||
Key .AmountNettoHUF = g.Sum(Function(inv) (inv.QTT * inv.NettoPriceHUF))}
|
||||
|
||||
RaiseEvent InitWork(1, 1, query.Count)
|
||||
For Each item In query
|
||||
RaiseEvent DoWork()
|
||||
_Customers = item.Customers
|
||||
_ChartOfAccounts = _Customers.CustomersGLParameters.GetChartOfAccounts(item.DateYear, eVATMode.eIn)
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
End If
|
||||
|
||||
'//Bruttó sor követel -------------------
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & _AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_VAT = item.VAT
|
||||
If _VAT IsNot Nothing Then
|
||||
_ProjectPlanRows.CreditAmountContractHUF += Math.Round(item.AmountNettoHUF * (1 + _VAT.KeyValue), 0, MidpointRounding.AwayFromZero)
|
||||
Else
|
||||
_ProjectPlanRows.CreditAmountContractHUF += item.AmountNettoHUF
|
||||
End If
|
||||
|
||||
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", _AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = _AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
|
||||
'//Nettó sor tartozikba --------------------------
|
||||
_Controlling = item.Controlling
|
||||
If _Controlling IsNot Nothing Then
|
||||
_ChartOfAccounts = _Controlling.GetChartOfAccounts(item.DateYear, False)
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & _AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_ProjectPlanRows.DebitAmountContractHUF += item.AmountNettoHUF
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", _AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = _AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
End If
|
||||
End If
|
||||
'//ÁFA követelbe -------------------------------
|
||||
If _VAT IsNot Nothing Then
|
||||
_ChartOfAccounts = _VAT.GetChartOfAccounts(item.DateYear, eVATMode.eIn)
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
'//-------------------------------------------------------------------------------------------------------------
|
||||
_criteria = " AccountNumber='" & _AccountNumber & "' and"
|
||||
_criteria += " DateYear=" & item.DateYear & " and "
|
||||
_criteria += " DateMonth=" & item.DateMonth & " and "
|
||||
If item.Controlling Is Nothing Then
|
||||
_criteria += "isnull(Controlling)=True and "
|
||||
Else
|
||||
_criteria += " Controlling.Oid='" & item.Controlling.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostHolder Is Nothing Then
|
||||
_criteria += " isnull(CostHolder)=True and "
|
||||
Else
|
||||
_criteria += " CostHolder.Oid='" & item.CostHolder.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.CostPlace Is Nothing Then
|
||||
_criteria += " isnull(CostPlace)=True and "
|
||||
Else
|
||||
_criteria += " CostPlace.Oid='" & item.CostPlace.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.UniqueObjects Is Nothing Then
|
||||
_criteria += " isnull(UniqueObjects)=True and "
|
||||
Else
|
||||
_criteria += " UniqueObjects.Oid='" & item.UniqueObjects.Oid.ToString & "' and "
|
||||
End If
|
||||
If item.JobNumberObjects Is Nothing Then
|
||||
_criteria += " isnull(JobNumberObjects)=True "
|
||||
Else
|
||||
_criteria += " JobNumberObjects.Oid='" & item.JobNumberObjects.Oid.ToString & "' "
|
||||
End If
|
||||
|
||||
_ProjectPlanRows = _uow.FindObject(Of ProjectPlanRows)(PersistentCriteriaEvaluationBehavior.InTransaction, CriteriaOperator.Parse(_criteria))
|
||||
If _ProjectPlanRows Is Nothing Then
|
||||
_ProjectPlanRows = New ProjectPlanRows(_uow)
|
||||
End If
|
||||
_ProjectPlanRows.ProjectPlan = _ProjectPlan
|
||||
_ProjectPlanRows.DebitAmountContractHUF += Math.Round(item.AmountNettoHUF * _VAT.KeyValue, 0, MidpointRounding.AwayFromZero)
|
||||
_ChartOfAccounts = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=?", _AccountNumber))
|
||||
If _ChartOfAccounts IsNot Nothing Then
|
||||
_ProjectPlanRows.ChartOfAccountsName = _ChartOfAccounts.Name
|
||||
End If
|
||||
_ProjectPlanRows.AccountNumber = _AccountNumber
|
||||
_ProjectPlanRows.Controlling = item.Controlling
|
||||
_ProjectPlanRows.CostHolder = item.CostHolder
|
||||
_ProjectPlanRows.DateYear = item.DateYear
|
||||
_ProjectPlanRows.DateMonth = item.DateMonth
|
||||
_ProjectPlanRows.JobNumberObjects = item.JobNumberObjects
|
||||
_ProjectPlanRows.UniqueObjects = item.UniqueObjects
|
||||
_uow.CommitTransaction()
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_uow.CommitTransaction()
|
||||
|
||||
_SQL = " Delete from ""ProjectPlanRows"" "
|
||||
_SQL += " Where ""DebitAmountPlanHUF""=0 and "
|
||||
_SQL += " ""CreditAmountPlanHUF""=0 and "
|
||||
_SQL += " ""DebitAmountFactHUF""=0 and "
|
||||
_SQL += " ""CreditAmountFactHUF""=0 and "
|
||||
_SQL += " ""DebitAmountContractHUF""=0 and "
|
||||
_SQL += " ""CreditAmountContractHUF""=0 "
|
||||
_onew.Session.ExecuteNonQuery(_SQL)
|
||||
|
||||
RaiseEvent FinalWork
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aProjectPlanGeneratePlan_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProjectPlanEditPlan.Execute
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aProjectPlanShowPlan_Execute(sender As Object, e As SimpleActionExecuteEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aProjectPlanViewFact_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProjectPlanViewFact.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ProjectPlanRows As ProjectPlanRows = _onew.GetObject(TryCast(View.SelectedObjects(0), ProjectPlanRows))
|
||||
|
||||
|
||||
Dim _GLRows_Controlling As New CollectionSource(_onew, GetType(GLRows))
|
||||
Dim _GLRows As GLRows
|
||||
|
||||
'_GLRows.GLHeader.DateExecution.Date
|
||||
|
||||
_GLRows_Controlling.BeginUpdateCriteria()
|
||||
_GLRows_Controlling.Criteria("Plan1") = CriteriaOperator.Parse("(DebitChartOfAccounts.AccountNumber=? or CreditChartOfAccounts.AccountNumber=?)", _
|
||||
_ProjectPlanRows.AccountNumber, _ProjectPlanRows.AccountNumber)
|
||||
If _ProjectPlanRows.Controlling Is Nothing Then
|
||||
_GLRows_Controlling.Criteria("Controlling") = CriteriaOperator.Parse("isnull(Controlling)=True")
|
||||
Else
|
||||
_GLRows_Controlling.Criteria("Controlling") = CriteriaOperator.Parse("Controlling=?", _ProjectPlanRows.Controlling)
|
||||
End If
|
||||
If _ProjectPlanRows.CostHolder Is Nothing Then
|
||||
_GLRows_Controlling.Criteria("CostHolder") = CriteriaOperator.Parse("isnull(CostHolder)=True")
|
||||
Else
|
||||
_GLRows_Controlling.Criteria("CostHolder") = CriteriaOperator.Parse("CostHolder=?", _ProjectPlanRows.CostHolder)
|
||||
End If
|
||||
If _ProjectPlanRows.CostPlace Is Nothing Then
|
||||
_GLRows_Controlling.Criteria("CostPlace") = CriteriaOperator.Parse("isnull(CostPlace)=True")
|
||||
Else
|
||||
_GLRows_Controlling.Criteria("CostPlace") = CriteriaOperator.Parse("CostPlace=?", _ProjectPlanRows.CostPlace)
|
||||
End If
|
||||
If _ProjectPlanRows.JobNumberObjects Is Nothing Then
|
||||
_GLRows_Controlling.Criteria("JobNumberObjects") = CriteriaOperator.Parse("isnull(JobNumberObjects)=True")
|
||||
Else
|
||||
_GLRows_Controlling.Criteria("JobNumberObjects") = CriteriaOperator.Parse("JobNumberObjects=?", _ProjectPlanRows.JobNumberObjects)
|
||||
End If
|
||||
If _ProjectPlanRows.UniqueObjects Is Nothing Then
|
||||
_GLRows_Controlling.Criteria("UniqueObjects") = CriteriaOperator.Parse("isnull(UniqueObjects)=True")
|
||||
Else
|
||||
_GLRows_Controlling.Criteria("UniqueObjects") = CriteriaOperator.Parse("UniqueObjects=?", _ProjectPlanRows.UniqueObjects)
|
||||
End If
|
||||
_GLRows_Controlling.Criteria("DateExecution") = CriteriaOperator.Parse("GetYear(GLHeader.DateExecution)=? and GetMonth(GLHeader.DateExecution)=? and GLHeader.IsEditable=False and GLHeader.CustomersFrom=?", _
|
||||
_ProjectPlanRows.DateYear, _ProjectPlanRows.DateMonth, _ProjectPlanRows.ProjectPlan.CustomersFrom)
|
||||
_GLRows_Controlling.EndUpdateCriteria()
|
||||
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateListView("GLRows_ListView_ProjectPlan", _GLRows_Controlling, True)
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user