Se adaptan los articulos para que el precio de cada uno de los proveedore se desglose en una tabla detalle, se adaptan las pantallas de seleccion de articulos de los documentos de proveedor y cliente para que nos salga la lista de articulos desglosada por proveedor y sin desglosar respectivamente

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@471 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-07-22 11:21:06 +00:00
parent 5aeb30ff6e
commit 5981ace3dd
129 changed files with 6185 additions and 3813 deletions

View File

@ -46,6 +46,31 @@
<Property name="RetryPauseInterval" type="Cardinal">1000</Property>
<Property name="SuppressStatusMessages" type="Boolean">False</Property>
</Object>
<Object Class="TSetVariableAction" XMLID="{8B684B40-4B72-4D55-BB01-288C9EAE2FB7}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property MultiValue="1" name="ActionDescription" type="string"><![CDATA[Ruta del proyecto [ %FBPROJECTDIR% ]]]>
</Property>
<Property name="ActionTextColor" type="Cardinal">0</Property>
<Property MultiValue="0" name="ActionTypeID" type="string"></Property>
<Property name="ApplyToExisting" type="Boolean">False</Property>
<Property MultiValue="1" name="Description" type="string"><![CDATA[Ruta del proyecto [ %FBPROJECTDIR% ]]]>
</Property>
<Property name="DoExpandExpression" type="Boolean">True</Property>
<Property name="Enabled" type="WordBool">True</Property>
<Property name="ExpandActionLogTitle" type="Boolean">True</Property>
<Property name="ForceType" type="TFBSetVariableForceType">ftString</Property>
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="Modifier" type="TFBSetVariableModifier">smNone</Property>
<Property MultiValue="0" name="NewValue" type="WideString">%FBPROJECTDIR%</Property>
<Property name="NodeCollapsed" type="Boolean">False</Property>
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property name="RetryPauseInterval" type="Cardinal">1000</Property>
<Property name="SuppressStatusMessages" type="Boolean">False</Property>
<Property MultiValue="0" name="VariableName" type="WideString">project_path</Property>
</Object>
<Object Class="TCommentAction" XMLID="{BC5956A7-D316-4085-B7FB-03689AC3C01E}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property MultiValue="0" name="ActionDescription" type="string">#</Property>
<Property name="ActionTextColor" type="Cardinal">16711680</Property>
@ -82,31 +107,6 @@
<Property name="RetryPauseInterval" type="Cardinal">1000</Property>
<Property name="SuppressStatusMessages" type="Boolean">False</Property>
</Object>
<Object Class="TSetVariableAction" XMLID="{8B684B40-4B72-4D55-BB01-288C9EAE2FB7}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property MultiValue="1" name="ActionDescription" type="string"><![CDATA[Ruta del proyecto [ %FBPROJECTDIR% ]]]>
</Property>
<Property name="ActionTextColor" type="Cardinal">0</Property>
<Property MultiValue="0" name="ActionTypeID" type="string"></Property>
<Property name="ApplyToExisting" type="Boolean">False</Property>
<Property MultiValue="1" name="Description" type="string"><![CDATA[Ruta del proyecto [ %FBPROJECTDIR% ]]]>
</Property>
<Property name="DoExpandExpression" type="Boolean">True</Property>
<Property name="Enabled" type="WordBool">True</Property>
<Property name="ExpandActionLogTitle" type="Boolean">True</Property>
<Property name="ForceType" type="TFBSetVariableForceType">ftString</Property>
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="Modifier" type="TFBSetVariableModifier">smNone</Property>
<Property MultiValue="0" name="NewValue" type="WideString">%FBPROJECTDIR%</Property>
<Property name="NodeCollapsed" type="Boolean">False</Property>
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property name="RetryPauseInterval" type="Cardinal">1000</Property>
<Property name="SuppressStatusMessages" type="Boolean">False</Property>
<Property MultiValue="0" name="VariableName" type="WideString">project_path</Property>
</Object>
<Object Class="TFBScriptBasedAction" XMLID="{5B69375A-3BFE-490C-81E4-C8ED87EE3C07}"><Property MultiValue="0" name="ActionComment" type="string"></Property>
<Property MultiValue="1" name="ActionDescription" type="string"><![CDATA[Establecer ruta del proyecto]]>
</Property>
@ -604,7 +604,7 @@ source_path
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property MultiValue="0" name="ProjectFile" type="WideString">%source_path%\Servidor\FactuGES_Server.dpr</Property>
<Property name="RegenerateResource" type="WordBool">True</Property>
<Property name="ReleaseVersion" type="Integer">3</Property>
<Property name="ReleaseVersion" type="Integer">9</Property>
<Property MultiValue="0" name="ResourceCompilerOptions" type="string"></Property>
<Property MultiValue="0" name="ResourceCompilerPath" type="string"></Property>
<Property name="ResourceCompilerType" type="TFBDelphiResourceCompiler">rcBorland</Property>
@ -619,15 +619,15 @@ source_path
<Property name="UseVersionFromDOF" type="Boolean">True</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=1.0.3.0
FileVersion=1.0.9.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.3.0
ProductVersion=1.0.9.0
Comments=
CompileDate=martes, 25 de marzo de 2008 18:11
CompileDate=viernes, 20 de junio de 2008 9:56
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -6053,7 +6053,7 @@ Comments=
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property name="IsDebug" type="WordBool">False</Property>
@ -6063,7 +6063,7 @@ Comments=
<Property name="IsSpecial" type="WordBool">False</Property>
<Property name="KeepCFG" type="Boolean">False</Property>
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property name="Locale" type="Integer">3082</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
@ -6086,7 +6086,16 @@ Comments=
<Property name="UseProjectSettings" type="TFBUseProjectSettings">[usPackages,usCompiler,usLinker,usVersionInfo]</Property>
<Property name="UsePropertySet" type="Boolean">False</Property>
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[FileVersion=1.0.0.0
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -6171,7 +6180,7 @@ Comments=
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property name="IsDebug" type="WordBool">False</Property>
@ -6181,7 +6190,7 @@ Comments=
<Property name="IsSpecial" type="WordBool">False</Property>
<Property name="KeepCFG" type="Boolean">False</Property>
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property name="Locale" type="Integer">3082</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
@ -6204,7 +6213,16 @@ Comments=
<Property name="UseProjectSettings" type="TFBUseProjectSettings">[usPackages,usCompiler,usLinker,usVersionInfo]</Property>
<Property name="UsePropertySet" type="Boolean">False</Property>
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[FileVersion=1.0.0.0
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -6289,7 +6307,7 @@ Comments=
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property name="IsDebug" type="WordBool">False</Property>
@ -6299,7 +6317,7 @@ Comments=
<Property name="IsSpecial" type="WordBool">False</Property>
<Property name="KeepCFG" type="Boolean">False</Property>
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property name="Locale" type="Integer">3082</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
@ -6322,7 +6340,16 @@ Comments=
<Property name="UseProjectSettings" type="TFBUseProjectSettings">[usPackages,usCompiler,usLinker,usVersionInfo]</Property>
<Property name="UsePropertySet" type="Boolean">False</Property>
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[FileVersion=1.0.0.0
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -12901,7 +12928,7 @@ Comments=
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property name="IsDebug" type="WordBool">False</Property>
@ -12911,7 +12938,7 @@ Comments=
<Property name="IsSpecial" type="WordBool">False</Property>
<Property name="KeepCFG" type="Boolean">False</Property>
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property name="Locale" type="Integer">3082</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
@ -12935,7 +12962,16 @@ Comments=
<Property name="UseProjectSettings" type="TFBUseProjectSettings">[usPackages,usCompiler,usLinker,usVersionInfo]</Property>
<Property name="UsePropertySet" type="Boolean">False</Property>
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[FileVersion=1.0.0.0
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -14397,7 +14433,7 @@ Comments=
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">0</Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="MinorVersion" type="Integer">0</Property>
@ -14419,16 +14455,7 @@ Comments=
<Property name="UseProjectSettings" type="TFBUseProjectSettings">[usPackages,usCompiler,usLinker,usVersionInfo]</Property>
<Property name="UsePropertySet" type="Boolean">False</Property>
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=0.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=0.0.0.0
Comments=
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[FileVersion=1.0.0.0
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -14441,17 +14468,14 @@ Comments=
<Property name="AssignableConst" type="WordBool">False</Property>
<Property name="BoolEval" type="WordBool">False</Property>
<Property MultiValue="0" name="BPLOutputDir" type="WideString">%package_path%</Property>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[-w-UNSAFE_TYPE=0
-w-UNSAFE_CODE=0
-w-UNSAFE_CAST=0
]]>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[]]>
</Property>
<Property MultiValue="0" name="Conditionals" type="WideString"></Property>
<Property name="ConsoleApp" type="WordBool">False</Property>
<Property MultiValue="0" name="DCPOutputDir" type="WideString">%modules_dcp_path%</Property>
<Property name="DebugInfo" type="WordBool">True</Property>
<Property name="DebugInfo" type="WordBool">False</Property>
<Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
<Property name="DefinitionsOnly" type="WordBool">True</Property>
<Property name="DefinitionsOnly" type="WordBool">False</Property>
<Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
<Property name="ExportAllSymbols" type="WordBool">False</Property>
<Property name="ExtendedSyntax" type="WordBool">True</Property>
@ -14465,7 +14489,7 @@ Comments=
<Property name="IOChecking" type="WordBool">True</Property>
<Property MultiValue="0" name="LibraryPath" type="WideString">%library_path%</Property>
<Property name="LinkerOutput" type="Integer">0</Property>
<Property name="LocalSymbols" type="WordBool">True</Property>
<Property name="LocalSymbols" type="WordBool">False</Property>
<Property name="Mapfile" type="Integer">0</Property>
<Property name="MaxStackSize" type="Cardinal">1048576</Property>
<Property name="MinStackSize" type="Cardinal">16384</Property>
@ -14477,7 +14501,7 @@ Comments=
<Property MultiValue="0" name="Packages" type="WideString"></Property>
<Property name="RangeChecking" type="WordBool">False</Property>
<Property name="RecordFieldAlign" type="TFieldAlign">fa8</Property>
<Property name="ReferenceInfo" type="WordBool">True</Property>
<Property name="ReferenceInfo" type="WordBool">False</Property>
<Property name="SafeDivide" type="WordBool">False</Property>
<Property MultiValue="0" name="SearchPath" type="WideString"></Property>
<Property name="ShowHints" type="WordBool">True</Property>
@ -14651,7 +14675,7 @@ Comments=
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property name="IsDebug" type="WordBool">False</Property>
@ -14661,9 +14685,9 @@ Comments=
<Property name="IsSpecial" type="WordBool">False</Property>
<Property name="KeepCFG" type="Boolean">False</Property>
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property name="Locale" type="Integer">3082</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">0</Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="MinorVersion" type="Integer">0</Property>
@ -14687,13 +14711,13 @@ Comments=
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=0.0.0.0
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=0.0.0.0
ProductVersion=1.0.0.0
Comments=
]]>
</Property>
@ -14707,17 +14731,14 @@ Comments=
<Property name="AssignableConst" type="WordBool">False</Property>
<Property name="BoolEval" type="WordBool">False</Property>
<Property MultiValue="0" name="BPLOutputDir" type="WideString">%package_path%</Property>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[-w-UNSAFE_TYPE=0
-w-UNSAFE_CODE=0
-w-UNSAFE_CAST=0
]]>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[]]>
</Property>
<Property MultiValue="0" name="Conditionals" type="WideString"></Property>
<Property name="ConsoleApp" type="WordBool">False</Property>
<Property MultiValue="0" name="DCPOutputDir" type="WideString">%modules_dcp_path%</Property>
<Property name="DebugInfo" type="WordBool">True</Property>
<Property name="DebugInfo" type="WordBool">False</Property>
<Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
<Property name="DefinitionsOnly" type="WordBool">True</Property>
<Property name="DefinitionsOnly" type="WordBool">False</Property>
<Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
<Property name="ExportAllSymbols" type="WordBool">False</Property>
<Property name="ExtendedSyntax" type="WordBool">True</Property>
@ -14731,7 +14752,7 @@ Comments=
<Property name="IOChecking" type="WordBool">True</Property>
<Property MultiValue="0" name="LibraryPath" type="WideString">%library_path%</Property>
<Property name="LinkerOutput" type="Integer">0</Property>
<Property name="LocalSymbols" type="WordBool">True</Property>
<Property name="LocalSymbols" type="WordBool">False</Property>
<Property name="Mapfile" type="Integer">0</Property>
<Property name="MaxStackSize" type="Cardinal">1048576</Property>
<Property name="MinStackSize" type="Cardinal">16384</Property>
@ -14743,7 +14764,7 @@ Comments=
<Property MultiValue="0" name="Packages" type="WideString"></Property>
<Property name="RangeChecking" type="WordBool">False</Property>
<Property name="RecordFieldAlign" type="TFieldAlign">fa8</Property>
<Property name="ReferenceInfo" type="WordBool">True</Property>
<Property name="ReferenceInfo" type="WordBool">False</Property>
<Property name="SafeDivide" type="WordBool">False</Property>
<Property MultiValue="0" name="SearchPath" type="WideString"></Property>
<Property name="ShowHints" type="WordBool">True</Property>
@ -14796,7 +14817,7 @@ Comments=
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">0</Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="MinorVersion" type="Integer">0</Property>
@ -14818,16 +14839,7 @@ Comments=
<Property name="UseProjectSettings" type="TFBUseProjectSettings">[usPackages,usCompiler,usLinker,usVersionInfo]</Property>
<Property name="UsePropertySet" type="Boolean">False</Property>
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=0.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=0.0.0.0
Comments=
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[FileVersion=1.0.0.0
]]>
</Property>
<Property MultiValue="0" name="VersionInfoPropertySetName" type="string"></Property>
@ -14840,17 +14852,14 @@ Comments=
<Property name="AssignableConst" type="WordBool">False</Property>
<Property name="BoolEval" type="WordBool">False</Property>
<Property MultiValue="0" name="BPLOutputDir" type="WideString">%package_path%</Property>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[-w-UNSAFE_TYPE=0
-w-UNSAFE_CODE=0
-w-UNSAFE_CAST=0
]]>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[]]>
</Property>
<Property MultiValue="0" name="Conditionals" type="WideString"></Property>
<Property name="ConsoleApp" type="WordBool">False</Property>
<Property MultiValue="0" name="DCPOutputDir" type="WideString">%modules_dcp_path%</Property>
<Property name="DebugInfo" type="WordBool">True</Property>
<Property name="DebugInfo" type="WordBool">False</Property>
<Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
<Property name="DefinitionsOnly" type="WordBool">True</Property>
<Property name="DefinitionsOnly" type="WordBool">False</Property>
<Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
<Property name="ExportAllSymbols" type="WordBool">False</Property>
<Property name="ExtendedSyntax" type="WordBool">True</Property>
@ -14864,7 +14873,7 @@ Comments=
<Property name="IOChecking" type="WordBool">True</Property>
<Property MultiValue="0" name="LibraryPath" type="WideString">%library_path%</Property>
<Property name="LinkerOutput" type="Integer">0</Property>
<Property name="LocalSymbols" type="WordBool">True</Property>
<Property name="LocalSymbols" type="WordBool">False</Property>
<Property name="Mapfile" type="Integer">0</Property>
<Property name="MaxStackSize" type="Cardinal">1048576</Property>
<Property name="MinStackSize" type="Cardinal">16384</Property>
@ -14876,7 +14885,7 @@ Comments=
<Property MultiValue="0" name="Packages" type="WideString"></Property>
<Property name="RangeChecking" type="WordBool">False</Property>
<Property name="RecordFieldAlign" type="TFieldAlign">fa8</Property>
<Property name="ReferenceInfo" type="WordBool">True</Property>
<Property name="ReferenceInfo" type="WordBool">False</Property>
<Property name="SafeDivide" type="WordBool">False</Property>
<Property MultiValue="0" name="SearchPath" type="WideString"></Property>
<Property name="ShowHints" type="WordBool">True</Property>
@ -15311,7 +15320,7 @@ Comments=
<Property name="IgnoreFailure" type="WordBool">False</Property>
<Property name="IncludeCompileDate" type="WordBool">False</Property>
<Property name="IncludeManifest" type="Boolean">False</Property>
<Property name="IncludeVerInfo" type="WordBool">False</Property>
<Property name="IncludeVerInfo" type="WordBool">True</Property>
<Property name="IsAction" type="Boolean">True</Property>
<Property name="IsBreakPoint" type="WordBool">False</Property>
<Property name="IsDebug" type="WordBool">False</Property>
@ -15321,9 +15330,9 @@ Comments=
<Property name="IsSpecial" type="WordBool">False</Property>
<Property name="KeepCFG" type="Boolean">False</Property>
<Property name="LinkProductVersionToFileVersion" type="Boolean">False</Property>
<Property name="Locale" type="Integer">3081</Property>
<Property name="Locale" type="Integer">3082</Property>
<Property MultiValue="0" name="LogToVariable" type="string"></Property>
<Property name="MajorVersion" type="Integer">0</Property>
<Property name="MajorVersion" type="Integer">1</Property>
<Property MultiValue="0" name="ManifestFile" type="string"></Property>
<Property name="MaxRetryAttempts" type="Cardinal">0</Property>
<Property name="MinorVersion" type="Integer">0</Property>
@ -15347,13 +15356,13 @@ Comments=
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=
FileDescription=
FileVersion=0.0.0.0
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=0.0.0.0
ProductVersion=1.0.0.0
Comments=
]]>
</Property>
@ -15367,17 +15376,14 @@ Comments=
<Property name="AssignableConst" type="WordBool">False</Property>
<Property name="BoolEval" type="WordBool">False</Property>
<Property MultiValue="0" name="BPLOutputDir" type="WideString">%package_path%</Property>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[-w-UNSAFE_TYPE=0
-w-UNSAFE_CODE=0
-w-UNSAFE_CAST=0
]]>
<Property name="CompilerWarnings" type="TStrings"><![CDATA[]]>
</Property>
<Property MultiValue="0" name="Conditionals" type="WideString"></Property>
<Property name="ConsoleApp" type="WordBool">False</Property>
<Property MultiValue="0" name="DCPOutputDir" type="WideString">%modules_dcp_path%</Property>
<Property name="DebugInfo" type="WordBool">True</Property>
<Property name="DebugInfo" type="WordBool">False</Property>
<Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
<Property name="DefinitionsOnly" type="WordBool">True</Property>
<Property name="DefinitionsOnly" type="WordBool">False</Property>
<Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
<Property name="ExportAllSymbols" type="WordBool">False</Property>
<Property name="ExtendedSyntax" type="WordBool">True</Property>
@ -15391,7 +15397,7 @@ Comments=
<Property name="IOChecking" type="WordBool">True</Property>
<Property MultiValue="0" name="LibraryPath" type="WideString">%library_path%</Property>
<Property name="LinkerOutput" type="Integer">0</Property>
<Property name="LocalSymbols" type="WordBool">True</Property>
<Property name="LocalSymbols" type="WordBool">False</Property>
<Property name="Mapfile" type="Integer">0</Property>
<Property name="MaxStackSize" type="Cardinal">1048576</Property>
<Property name="MinStackSize" type="Cardinal">16384</Property>
@ -15403,7 +15409,7 @@ Comments=
<Property MultiValue="0" name="Packages" type="WideString"></Property>
<Property name="RangeChecking" type="WordBool">False</Property>
<Property name="RecordFieldAlign" type="TFieldAlign">fa8</Property>
<Property name="ReferenceInfo" type="WordBool">True</Property>
<Property name="ReferenceInfo" type="WordBool">False</Property>
<Property name="SafeDivide" type="WordBool">False</Property>
<Property MultiValue="0" name="SearchPath" type="WideString"></Property>
<Property name="ShowHints" type="WordBool">True</Property>
@ -18180,7 +18186,7 @@ Comments=
<Property name="PauseInterval" type="Cardinal">0</Property>
<Property MultiValue="0" name="ProjectFile" type="WideString">%source_path%\Cliente\FactuGES.dpr</Property>
<Property name="RegenerateResource" type="WordBool">True</Property>
<Property name="ReleaseVersion" type="Integer">2</Property>
<Property name="ReleaseVersion" type="Integer">9</Property>
<Property MultiValue="0" name="ResourceCompilerOptions" type="string"></Property>
<Property MultiValue="0" name="ResourceCompilerPath" type="string"></Property>
<Property name="ResourceCompilerType" type="TFBDelphiResourceCompiler">rcBorland</Property>
@ -18195,13 +18201,13 @@ Comments=
<Property name="UseVersionFromDOF" type="Boolean">False</Property>
<Property MultiValue="1" name="VersionInfoKeys" type="WideString"><![CDATA[CompanyName=Rodax Software S.L.
FileDescription=
FileVersion=1.0.2.0
FileVersion=1.0.9.0
InternalName=FactuGES
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=FactuGES
ProductVersion=1.0.2.0
ProductVersion=1.0.9.0
Comments=
]]>
</Property>
@ -18222,7 +18228,7 @@ Comments=
<Property MultiValue="0" name="DCPOutputDir" type="WideString">.\</Property>
<Property name="DebugInfo" type="WordBool">True</Property>
<Property MultiValue="0" name="DefaultNamespace" type="string"></Property>
<Property name="DefinitionsOnly" type="WordBool">True</Property>
<Property name="DefinitionsOnly" type="WordBool">False</Property>
<Property MultiValue="0" name="ExeDescription" type="WideString"></Property>
<Property name="ExportAllSymbols" type="WordBool">False</Property>
<Property name="ExtendedSyntax" type="WordBool">True</Property>

View File

@ -100,6 +100,9 @@ SET GENERATOR GEN_ALMACENES_ID TO 1;
CREATE GENERATOR GEN_ARTICULOS_ID;
SET GENERATOR GEN_ARTICULOS_ID TO 1;
CREATE GENERATOR GEN_ARTICULOS_PROVEEDORES_ID;
SET GENERATOR GEN_ARTICULOS_PROVEEDORES_ID TO 1;
CREATE GENERATOR GEN_CATEGORIAS_ID;
SET GENERATOR GEN_CATEGORIAS_ID TO 1;
@ -391,12 +394,6 @@ CREATE TABLE ARTICULOS (
UNIDAD_MEDIDA VARCHAR(255),
IMAGEN TIPO_BINARIO,
COMISIONABLE TIPO_BOOLEANO,
ID_PROVEEDOR TIPO_ID,
REFERENCIA_PROV VARCHAR(255),
PRECIO_COSTE TIPO_IMPORTE,
DESCUENTO TIPO_PORCENTAJE,
PRECIO_NETO TIPO_IMPORTE,
PRECIO_PORTE TIPO_IMPORTE,
FABRICANTE VARCHAR(255),
REFERENCIA_FABR VARCHAR(255),
FECHA_ALTA TIMESTAMP,
@ -405,13 +402,23 @@ CREATE TABLE ARTICULOS (
INVENTARIABLE TIPO_BOOLEANO,
ELIMINADO TIPO_BOOLEANO,
PARAM_MARGEN FLOAT,
PRECIO_PVP_VENTA TIPO_IMPORTE,
TIEMPO INTEGER,
PARAM_TIEMPO FLOAT,
MANO_OBRA TIPO_IMPORTE,
PRECIO_PVP_TOTAL TIPO_IMPORTE
MANO_OBRA TIPO_IMPORTE
);
CREATE TABLE ARTICULOS_PROVEEDORES (
ID TIPO_ID NOT NULL,
ID_ARTICULO TIPO_ID,
ID_PROVEEDOR TIPO_ID,
REFERENCIA_PROV VARCHAR(255),
PRECIO_COSTE TIPO_IMPORTE,
DESCUENTO TIPO_PORCENTAJE,
PRECIO_NETO TIPO_IMPORTE,
PRECIO_PORTE TIPO_IMPORTE,
PRECIO_PVP_VENTA TIPO_IMPORTE,
PRECIO_PVP_TOTAL TIPO_IMPORTE
);
CREATE TABLE CATEGORIAS (
ID TIPO_ID NOT NULL,
@ -1489,8 +1496,7 @@ WHERE ALMACENES.TIPO_ALMACEN = 'ALMACEN'
;
/* View: V_ARTICULOS */
CREATE VIEW V_ARTICULOS(
CREATE VIEW V_ARTICULOS_PARA_COMPRA(
ID,
ID_EMPRESA,
REFERENCIA,
@ -1518,33 +1524,102 @@ CREATE VIEW V_ARTICULOS(
TIEMPO,
PARAM_TIEMPO,
MANO_OBRA,
PRECIO_PVP_TOTAL,
ID_ARTICULO)
AS
SELECT ARTICULOS.ID || 0 || ARTICULOS_PROVEEDORES.ID_PROVEEDOR,
ARTICULOS.ID_EMPRESA, ARTICULOS.REFERENCIA, ARTICULOS.DESCRIPCION,
ARTICULOS.UNIDAD_MEDIDA, ARTICULOS.FAMILIA, ARTICULOS.IMAGEN,
ARTICULOS.COMISIONABLE, ARTICULOS.FECHA_ALTA,
ARTICULOS.FECHA_MODIFICACION, ARTICULOS.USUARIO,
ARTICULOS_PROVEEDORES.REFERENCIA_PROV,
ARTICULOS_PROVEEDORES.PRECIO_COSTE,
ARTICULOS_PROVEEDORES.PRECIO_PORTE,
ARTICULOS_PROVEEDORES.DESCUENTO,
ARTICULOS_PROVEEDORES.PRECIO_NETO,
ARTICULOS.INVENTARIABLE,
ARTICULOS_PROVEEDORES.ID_PROVEEDOR,
CONTACTOS.NOMBRE AS NOMBRE_PROVEEDOR,
ARTICULOS.ELIMINADO,
ARTICULOS.FABRICANTE,
ARTICULOS.REFERENCIA_FABR,
ARTICULOS.PARAM_MARGEN,
ARTICULOS_PROVEEDORES.PRECIO_PVP_VENTA,
ARTICULOS.TIEMPO,
ARTICULOS.PARAM_TIEMPO,
ARTICULOS.MANO_OBRA,
ARTICULOS_PROVEEDORES.PRECIO_PVP_TOTAL,
ARTICULOS.ID
FROM ARTICULOS
LEFT OUTER JOIN ARTICULOS_PROVEEDORES ON (ARTICULOS_PROVEEDORES.ID_ARTICULO = ARTICULOS.ID)
LEFT OUTER JOIN CONTACTOS ON (CONTACTOS.ID = ARTICULOS_PROVEEDORES.ID_PROVEEDOR)
WHERE (ARTICULOS.ELIMINADO = 0);
CREATE VIEW V_ARTICULOS_PVP_MAX(
ID_ARTICULO,
PRECIO_PVP_VENTA,
PRECIO_PVP_TOTAL)
AS
select
ID_ARTICULO, MAX(COALESCE(PRECIO_PVP_VENTA,0)) as PRECIO_PVP_VENTA, MAX(COALESCE(PRECIO_PVP_TOTAL,0)) as PRECIO_PVP_TOTAL
from ARTICULOS_PROVEEDORES
group by 1;
CREATE VIEW V_ARTICULOS_PARA_VENTA(
ID,
ID_EMPRESA,
REFERENCIA,
DESCRIPCION,
UNIDAD_MEDIDA,
FAMILIA,
IMAGEN,
COMISIONABLE,
FECHA_ALTA,
FECHA_MODIFICACION,
USUARIO,
REFERENCIA_PROV,
PRECIO_COSTE,
PRECIO_PORTE,
DESCUENTO,
PRECIO_NETO,
INVENTARIABLE,
ELIMINADO,
FABRICANTE,
REFERENCIA_FABR,
PARAM_MARGEN,
PRECIO_PVP_VENTA,
TIEMPO,
PARAM_TIEMPO,
MANO_OBRA,
PRECIO_PVP_TOTAL)
AS
SELECT ARTICULOS.ID, ARTICULOS.ID_EMPRESA, ARTICULOS.REFERENCIA, ARTICULOS.DESCRIPCION,
ARTICULOS.UNIDAD_MEDIDA, ARTICULOS.FAMILIA, ARTICULOS.IMAGEN,
ARTICULOS.COMISIONABLE, ARTICULOS.FECHA_ALTA,
ARTICULOS.FECHA_MODIFICACION, ARTICULOS.USUARIO,
ARTICULOS.REFERENCIA_PROV,
ARTICULOS.PRECIO_COSTE,
ARTICULOS.PRECIO_PORTE,
ARTICULOS.DESCUENTO,
ARTICULOS.PRECIO_NETO,
/*Estos Campos se necesitan para que no se tenga que tocar la lógica de selección de articulos de toda la aplicación*/
'' as REFERENCIA_PROV,
0 as PRECIO_COSTE,
0 as PRECIO_PORTE,
0 as DESCUENTO,
0 as PRECIO_NETO,
ARTICULOS.INVENTARIABLE,
ARTICULOS.ID_PROVEEDOR,
CONTACTOS.NOMBRE AS NOMBRE_PROVEEDOR,
ARTICULOS.ELIMINADO,
ARTICULOS.FABRICANTE,
ARTICULOS.REFERENCIA_FABR,
ARTICULOS.PARAM_MARGEN,
ARTICULOS.PRECIO_PVP_VENTA,
V_ARTICULOS_PVP_MAX.PRECIO_PVP_VENTA,
ARTICULOS.TIEMPO,
ARTICULOS.PARAM_TIEMPO,
ARTICULOS.MANO_OBRA,
ARTICULOS.PRECIO_PVP_TOTAL
V_ARTICULOS_PVP_MAX.PRECIO_PVP_TOTAL
FROM ARTICULOS
LEFT OUTER JOIN CONTACTOS ON (CONTACTOS.ID = ARTICULOS.ID_PROVEEDOR)
WHERE (ARTICULOS.ELIMINADO = 0)
;
LEFT OUTER JOIN V_ARTICULOS_PVP_MAX ON (V_ARTICULOS_PVP_MAX.ID_ARTICULO = ARTICULOS.ID)
WHERE (ARTICULOS.ELIMINADO = 0);
/* View: V_CONTACTOS */
@ -2383,7 +2458,7 @@ FROM V_INV_RESERVAS
/* View: V_INVENTARIO */
/* View: V_INVENTARIO desactivamos costes porque se traslada a detalles del articulo*/
CREATE VIEW V_INVENTARIO(
ID_ALMACEN,
ID_EMPRESA,
@ -2392,11 +2467,9 @@ CREATE VIEW V_INVENTARIO(
REFERENCIA,
FAMILIA,
DESCRIPCION,
REFERENCIA_PROV,
PRECIO_NETO,
REFERENCIA_FAB,
STOCK,
UNIDADES_ALMACEN,
COSTE_UNIDADES,
RESERVA,
PENDIENTE_RECEPCION)
AS
@ -2407,16 +2480,16 @@ SELECT ID_ALMACEN,
ARTICULOS.REFERENCIA,
ARTICULOS.FAMILIA,
ARTICULOS.DESCRIPCION,
ARTICULOS.REFERENCIA_PROV,
COALESCE(ARTICULOS.PRECIO_NETO,0) as PRECIO_NETO,
ARTICULOS.REFERENCIA_FABR,
/* COALESCE(ARTICULOS.PRECIO_NETO,0) as PRECIO_NETO,*/
(SUM(STOCK) - SUM(RESERVA)) as STOCK,
SUM(STOCK) as UNIDADES_ALMACEN,
/*Si las unidades son negativas no se tiene en cuenta el coste*/
CASE WHEN (SUM(STOCK) < 0) THEN 0
/* CASE WHEN (SUM(STOCK) < 0) THEN 0
ELSE (COALESCE(ARTICULOS.PRECIO_NETO,0) * SUM(STOCK))
END as COSTE_UNIDADES,
*/
SUM(RESERVA) as RESERVA,
SUM(PENDIENTE_RECEPCION) as PENDIENTE_RECEPCION
@ -2437,10 +2510,8 @@ GROUP BY ID_ALMACEN,
ARTICULOS.REFERENCIA,
ARTICULOS.FAMILIA,
ARTICULOS.DESCRIPCION,
ARTICULOS.REFERENCIA_PROV,
ARTICULOS.PRECIO_NETO
;
ARTICULOS.REFERENCIA_FABR
/* ARTICULOS.PRECIO_NETO*/;
/* View: V_OBRAS */
@ -2947,6 +3018,7 @@ ALTER TABLE ALBARANES_PROVEEDOR ADD CONSTRAINT PK_ALBARAN_PROVEEDOR PRIMARY KEY
ALTER TABLE ALBARANES_PROVEEDOR_DETALLES ADD CONSTRAINT PK_ALBARANES_PROVEEDOR_DETALLES PRIMARY KEY (ID);
ALTER TABLE ALMACENES ADD CONSTRAINT PK_ALMACENES PRIMARY KEY (ID);
ALTER TABLE ARTICULOS ADD CONSTRAINT PK_ARTICULOS PRIMARY KEY (ID);
ALTER TABLE ARTICULOS_PROVEEDORES ADD CONSTRAINT PK_ARTICULOS_PROVEEDORES PRIMARY KEY (ID);
ALTER TABLE CATEGORIAS ADD CONSTRAINT PK_CATEGORIAS PRIMARY KEY (ID);
ALTER TABLE CLIENTES_DATOS ADD CONSTRAINT PK_CLIENTES_DATOS PRIMARY KEY (ID_CLIENTE);
ALTER TABLE CLIENTES_DTOS_PROVEEDORES ADD CONSTRAINT PK_CLIENTES_DTOS_PROV PRIMARY KEY (ID);
@ -3052,7 +3124,8 @@ CREATE INDEX IDX_ALBARANES_PROVEEDOR2 ON ALBARANES_PROVEEDOR (ID_FORMA_PAGO);
CREATE INDEX IDX_ALBARANES_PROVEEDOR3 ON ALBARANES_PROVEEDOR (TIPO);
CREATE INDEX IDX_ALBARANES_PROV_DETALLES ON ALBARANES_PROVEEDOR_DETALLES (ID_ALBARAN);
CREATE INDEX IDX_ALBARANES_PROV_DETALLES1 ON ALBARANES_PROVEEDOR_DETALLES (ID_ARTICULO);
CREATE INDEX IDX_ARTICULOS ON ARTICULOS (ID_PROVEEDOR);
CREATE INDEX ARTICULOS_PROVEEDORES_IDX1 ON ARTICULOS_PROVEEDORES (ID_ARTICULO);
CREATE INDEX ARTICULOS_PROVEEDORES_IDX2 ON ARTICULOS_PROVEEDORES (ID_PROVEEDOR);
CREATE INDEX IDX_CLIENTES_DATOS ON CLIENTES_DATOS (ID_TIPO_IVA);
CREATE INDEX IDX_CLIENTES_DATOS1 ON CLIENTES_DATOS (ID_FORMA_PAGO);
CREATE INDEX IDX_CLIENTES_DATOS_ID_AGENTE ON CLIENTES_DATOS (ID_AGENTE);
@ -3197,7 +3270,9 @@ end^
SET TERM ; ^
GRANT SELECT ON PRESUPUESTOS_CLIENTE_DETALLES TO PROCEDURE PRO_PRES_CAPITULOS;
GRANT EXECUTE ON PROCEDURE PRO_PRES_CAPITULOS TO "PUBLIC";
GRANT EXECUTE ON PROCEDURE PRO_PRES_CAPITULOS TO SYSDBA;
SET TERM ^ ;
@ -3250,8 +3325,11 @@ end^
SET TERM ; ^
GRANT SELECT ON PRESUPUESTOS_CLIENTE_DETALLES TO PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS;
GRANT SELECT ON ARTICULOS TO PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS;
GRANT EXECUTE ON PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS TO "PUBLIC";
GRANT EXECUTE ON PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS TO SYSDBA;
SET TERM ^ ;
@ -3351,4 +3429,45 @@ end^
SET TERM ; ^
GRANT SELECT ON PRESUPUESTOS_CLIENTE_DETALLES TO PROCEDURE PRO_PRES_RESUMEN;
GRANT EXECUTE ON PROCEDURE PRO_PRES_RESUMEN TO "PUBLIC";
GRANT EXECUTE ON PROCEDURE PRO_PRES_RESUMEN TO SYSDBA;
SET TERM ^ ;
CREATE PROCEDURE PRO_ART_RECALCULAR_PVP (
id_empresa integer,
param_margen float,
param_tiempo numeric(11,2))
as
declare variable id_articulo integer;
declare variable mano_obra numeric(11,2);
begin
UPDATE ARTICULOS
SET PARAM_TIEMPO = :PARAM_TIEMPO,
PARAM_MARGEN = :PARAM_MARGEN,
MANO_OBRA = (TIEMPO * :PARAM_TIEMPO)
WHERE ID_EMPRESA = :ID_EMPRESA;
for select ID, MANO_OBRA
from articulos
where ID_EMPRESA = :ID_EMPRESA
into :ID_ARTICULO, :MANO_OBRA
do
begin
update articulos_proveedores
set PRECIO_PVP_VENTA = (PRECIO_NETO + PRECIO_PORTE) * (((:PARAM_MARGEN) / 100) + 1),
PRECIO_PVP_TOTAL = ((PRECIO_NETO + PRECIO_PORTE) * (((:PARAM_MARGEN) / 100) + 1)) + :MANO_OBRA
where id_articulo = :ID_ARTICULO;
end
suspend;
end^
SET TERM ; ^
GRANT SELECT,UPDATE ON ARTICULOS TO PROCEDURE PRO_ART_RECALCULAR_PVP;
GRANT SELECT,UPDATE ON ARTICULOS_PROVEEDORES TO PROCEDURE PRO_ART_RECALCULAR_PVP;
GRANT EXECUTE ON PROCEDURE PRO_ART_RECALCULAR_PVP TO SYSDBA;

View File

@ -53,58 +53,58 @@
<DelphiCompile Include="Base.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Modulos\Articulos\adortl.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxExtEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxGridD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxIntl6D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxIntlPrintSys3D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxPageControlD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Articulos\dclIndyCore.dcp" />
<DCCReference Include="..\Modulos\Articulos\designide.dcp" />
<DCCReference Include="..\Modulos\Articulos\dsnap.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\GUISDK_D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\IndyCore.dcp" />
<DCCReference Include="..\Modulos\Articulos\IndyProtocols.dcp" />
<DCCReference Include="..\Modulos\Articulos\IndySystem.dcp" />
<DCCReference Include="..\Modulos\Articulos\Jcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\JclVcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\JSDialog100.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvCmpD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvCoreD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvDlgsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvMMD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvNetD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvPageCompsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvSystemD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\pckMD5.dcp" />
<DCCReference Include="..\Modulos\Articulos\pckUCDataConnector.dcp" />
<DCCReference Include="..\Modulos\Articulos\pckUserControl_RT.dcp" />
<DCCReference Include="..\Modulos\Articulos\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Articulos\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Articulos\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\RemObjects_Indy_D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\rtl.dcp" />
<DCCReference Include="..\Modulos\Articulos\TB2k_D10.dcp" />
<DCCReference Include="..\Modulos\Articulos\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Articulos\vcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Articulos\vcldb.dcp" />
<DCCReference Include="..\Modulos\Articulos\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Articulos\VclSmp.dcp" />
<DCCReference Include="..\Modulos\Articulos\vclx.dcp" />
<DCCReference Include="..\Modulos\Articulos\xmlrtl.dcp" />
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxExportD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxExtEditorsD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxGridD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntl6D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxIntlPrintSys3D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxPageControlD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Indy_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
<DCCReference Include="Conexion\uConfigurarConexion.pas">
<Form>fConfigurarConexion</Form>
<DesignClass>TForm</DesignClass>

View File

@ -54,7 +54,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">9</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.9.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.9.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">1</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.1.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.1.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Tecsitel\Resources\Iconos\Factuges.ico"
1 VERSIONINFO
FILEVERSION 1,0,9,0
PRODUCTVERSION 1,0,9,0
FILEVERSION 1,1,0,0
PRODUCTVERSION 1,1,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "1.0.9.0\0"
VALUE "FileVersion", "1.1.0.0\0"
VALUE "InternalName", "FactuGES\0"
VALUE "ProductName", "FactuGES\0"
VALUE "ProductVersion", "1.0.9.0\0"
VALUE "ProductVersion", "1.1.0.0\0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -58,52 +58,52 @@
<DelphiCompile Include="GUIBase.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\Base.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxBarD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxBarExtItemsD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxComnD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxPsPrVwAdvD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinBlackD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinBlueD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinCaramelD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinCoffeeD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinGlassOceansD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkiniMaginaryD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinLilianD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinLiquidSkyD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinLondonLiquidSkyD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinMcSkinD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinMoneyTwinsD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinOffice2007BlackD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinOffice2007BlueD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinOffice2007GreenD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinOffice2007PinkD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinOffice2007SilverD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinsCoreD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinscxPCPainterD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinsdxLCPainterD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinSilverD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinStardustD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinValentineD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxSkinXmas2008BlueD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\frx11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\frxe11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\fs11.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\rtl.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\vcl.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\vcldb.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Facturas de proveedor\Views\vclx.dcp" />
<DCCReference Include="..\Modulos\Articulos\Base.dcp" />
<DCCReference Include="..\Modulos\Articulos\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxBarD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxBarExtItemsD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxComnD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxPsPrVwAdvD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinBlackD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinBlueD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinCaramelD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinCoffeeD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinGlassOceansD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkiniMaginaryD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinLilianD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinLiquidSkyD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinLondonLiquidSkyD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinMcSkinD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinMoneyTwinsD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007BlackD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007BlueD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007GreenD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007PinkD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007SilverD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinsCoreD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinscxPCPainterD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinsdxLCPainterD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinSilverD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinStardustD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinValentineD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxSkinXmas2008BlueD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\frx11.dcp" />
<DCCReference Include="..\Modulos\Articulos\frxe11.dcp" />
<DCCReference Include="..\Modulos\Articulos\fs11.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\rtl.dcp" />
<DCCReference Include="..\Modulos\Articulos\vcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\vcldb.dcp" />
<DCCReference Include="..\Modulos\Articulos\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Articulos\vclx.dcp" />
<DCCReference Include="uDialogBase.pas">
<Form>fDialogBase</Form>
</DCCReference>

View File

@ -75,6 +75,7 @@ inherited frViewGrid: TfrViewGrid
TabOrder = 1
Visible = False
ExplicitWidth = 607
ExplicitHeight = 102
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 607
ExplicitHeight = 102
@ -82,31 +83,23 @@ inherited frViewGrid: TfrViewGrid
Width = 607
ExplicitWidth = 607
inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 510
Width = 510
end
inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 272
Width = 272
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 376
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 376
ExplicitWidth = 221
Width = 221
end
inherited eLista: TcxComboBox
Left = 634
ExplicitLeft = 634
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 607
@ -130,6 +123,7 @@ inherited frViewGrid: TfrViewGrid
SupportedDocks = [dkStandardDock, dkMultiDock]
TabOrder = 2
Visible = False
ExplicitWidth = 128
object TBXAlignmentPanel1: TTBXAlignmentPanel
Left = 0
Top = 0
@ -179,7 +173,7 @@ inherited frViewGrid: TfrViewGrid
PrinterPage.ScaleMode = smFit
PrinterPage._dxMeasurementUnits_ = 0
PrinterPage._dxLastMU_ = 2
ReportDocument.CreationDate = 39601.798944490740000000
ReportDocument.CreationDate = 39646.545284641200000000
StyleManager = dmBase.dxPrintStyleManager1
OptionsCards.Shadow.Depth = 0
OptionsExpanding.ExpandGroupRows = True

View File

@ -151,12 +151,14 @@ end;
procedure TfrViewGrid.actQuitarAgrupacionesExecute(Sender: TObject);
var
Columna: TcxGridDBColumn;
i: Integer;
i,j: Integer;
begin
inherited;
for i := 0 to cxGridView.ColumnCount - 1 do
for j := 0 to cxGrid.ViewCount - 1 do
begin
Columna := (cxGridView as TcxGridDBTableView).Columns[i];
for i := 0 to (cxGrid.Views[j] as tcxGridDBTableView).ColumnCount - 1 do
begin
Columna := (cxGrid.Views[j] as TcxGridDBTableView).Columns[i];
if not (Columna.GroupIndex < 0) then
begin
Columna.GroupIndex := -1;
@ -164,6 +166,7 @@ begin
end;
end;
end;
end;
procedure TfrViewGrid.actQuitarAgrupacionesUpdate(Sender: TObject);
begin

View File

@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_AlbaranesCliente = '{179EC550-0441-420C-A5A6-2645AD5DF320}';
RID_AlbaranesCliente_Detalles = '{0C3A4CC7-5E16-455A-9B47-71EFAF0230F2}';
RID_AlbaranesCliente = '{FCCE9431-F9AF-47FC-827F-3B80548952DB}';
RID_AlbaranesCliente_Detalles = '{6BE5CCD5-B3AA-464D-9FE1-694242071E0E}';
{ Data table names }
nme_AlbaranesCliente = 'AlbaranesCliente';
@ -135,7 +135,7 @@ const
type
{ IAlbaranesCliente }
IAlbaranesCliente = interface(IDAStronglyTypedDataTable)
['{ADC392F2-58E1-4B5C-9A26-B6FF6A0A1910}']
['{9D9C017D-A65F-430D-9903-3724A7FA2AA7}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -626,7 +626,7 @@ type
{ IAlbaranesCliente_Detalles }
IAlbaranesCliente_Detalles = interface(IDAStronglyTypedDataTable)
['{E2A542CA-3048-41D1-B2C5-BEB5BBB159F6}']
['{C6B6C302-E6F3-44D6-8C18-B8EE3F64EBED}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);

View File

@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_AlbaranesClienteDelta = '{A0247A1C-8D8E-4287-81FB-B19EABA7591B}';
RID_AlbaranesCliente_DetallesDelta = '{D0788BB3-1048-42C6-A38C-93E893A5748A}';
RID_AlbaranesClienteDelta = '{A0E14879-92D0-49C8-A6D1-3A73C272869D}';
RID_AlbaranesCliente_DetallesDelta = '{9E3B92BA-F5F8-42DB-BC6F-E85CA27897BF}';
type
{ IAlbaranesClienteDelta }
IAlbaranesClienteDelta = interface(IAlbaranesCliente)
['{A0247A1C-8D8E-4287-81FB-B19EABA7591B}']
['{A0E14879-92D0-49C8-A6D1-3A73C272869D}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -507,7 +507,7 @@ type
{ IAlbaranesCliente_DetallesDelta }
IAlbaranesCliente_DetallesDelta = interface(IAlbaranesCliente_Detalles)
['{D0788BB3-1048-42C6-A38C-93E893A5748A}']
['{9E3B92BA-F5F8-42DB-BC6F-E85CA27897BF}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_ALBARANValue : Integer;

View File

@ -349,25 +349,24 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
'LIENTE_DETALLES.CONCEPTO) as CONCEPTO, ALBARANES_CLIENTE_DETALLE' +
'S.CANTIDAD,'#10' ALBARANES_CLIENTE_DETALLES.IMPORTE_UNIDAD, AL' +
'BARANES_CLIENTE_DETALLES.IMPORTE_TOTAL,'#10' ARTICULOS.REFEREN' +
'CIA, ARTICULOS.FAMILIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_' +
'PROVEEDOR'#10#10#10'FROM ALBARANES_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ' +
'ON (ALBARANES_CLIENTE_DETALLES.ID_ARTICULO = ARTICULOS.ID)'#10'WHERE' +
' (ID_ALBARAN = :ID_ALBARAN)'#10'AND (ARTICULOS.INVENTARIABLE = 1)'#10'OR' +
'DER BY POSICION'
'CIA, ARTICULOS.FAMILIA'#10#10#10'FROM ALBARANES_CLIENTE_DETALLES'#10'LEFT JO' +
'IN ARTICULOS ON (ALBARANES_CLIENTE_DETALLES.ID_ARTICULO = ARTICU' +
'LOS.ID)'#10'WHERE (ID_ALBARAN = :ID_ALBARAN)'#10'AND (ARTICULOS.INVENTAR' +
'IABLE = 1)'#10'ORDER BY POSICION'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'CANTIDAD'
TableField = 'CANTIDAD'
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_ALBARAN'
TableField = 'ID_ALBARAN'
end
item
DatasetField = 'POSICION'
TableField = 'POSICION'
end
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'TIPO_DETALLE'
TableField = 'TIPO_DETALLE'
@ -376,6 +375,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DatasetField = 'CONCEPTO'
TableField = 'CONCEPTO'
end
item
DatasetField = 'CANTIDAD'
TableField = 'CANTIDAD'
end
item
DatasetField = 'IMPORTE_UNIDAD'
TableField = 'IMPORTE_UNIDAD'
@ -386,19 +389,13 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
TableField = '<unknown>'
SQLOrigin = 'REFERENCIA'
end
item
DatasetField = 'FAMILIA'
TableField = 'FAMILIA'
end
item
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'ID_ALBARAN'
TableField = 'ID_ALBARAN'
TableField = '<unknown>'
SQLOrigin = 'FAMILIA'
end>
end>
Name = 'Informe_Detalles_Etiquetas'
@ -420,15 +417,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString
Size = 10
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
Size = 254
end
item
Name = 'CANTIDAD'
@ -436,19 +428,19 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datFloat
DataType = datCurrency
end
item
Name = 'IMPORTE_TOTAL'
DataType = datFloat
DataType = datCurrency
end
item
Name = 'FAMILIA'
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'REFERENCIA_PROVEEDOR'
Name = 'FAMILIA'
DataType = datString
Size = 255
end>

View File

@ -57,10 +57,10 @@ type
detallesIMPORTE_UNIDAD: TIBBCDField;
detallesIMPORTE_TOTAL: TIBBCDField;
detallesREFERENCIA: TIBStringField;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
tbl_Cabecera: TDAMemDataTable;
tbl_Detalles: TDAMemDataTable;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;

View File

@ -415,10 +415,12 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
'ENTO,'#10' ALBARANES_CLIENTE_DETALLES.IMPORTE_PORTE, ALBARANES_CL' +
'IENTE_DETALLES.IMPORTE_TOTAL,'#10' ALBARANES_CLIENTE_DETALLES.VIS' +
'IBLE,'#10' ALBARANES_CLIENTE_DETALLES.ID_ARTICULO, ARTICULOS.REFE' +
'RENCIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' A' +
'LBARANES_CLIENTE_DETALLES.ID_PEDIDO'#10#10'FROM ALBARANES_CLIENTE_DETA' +
'LLES'#10'LEFT JOIN ARTICULOS ON ALBARANES_CLIENTE_DETALLES.ID_ARTICU' +
'LO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICION;'#10#10
'RENCIA,'#10' '#39#39' as REFERENCIA_PROVEEDOR, /*Es necesario para que ' +
'no pete detalles porque tanto en la rama de cliente como de prov' +
'eedor es comun*/'#10' ALBARANES_CLIENTE_DETALLES.ID_PEDIDO'#10#10'FROM ' +
'ALBARANES_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON ALBARANES_CLIE' +
'NTE_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY P' +
'OSICION;'#10#10
StatementType = stSQL
ColumnMappings = <
item
@ -557,6 +559,7 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_Detalles_REFERENCIA_PROVEEDOR'
end
item
Name = 'ID_PEDIDO'

View File

@ -43,10 +43,6 @@
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl">File c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl not found</Excluded_Packages>
<Excluded_Packages Name="c:\archivos de programa\borland\delphi10\Bin\dclnet100.bpl">File c:\archivos de programa\borland\delphi10\Bin\dclnet100.bpl not found</Excluded_Packages>
<Excluded_Packages Name="c:\archivos de programa\borland\delphi10\Bin\dclsoap100.bpl">File c:\archivos de programa\borland\delphi10\Bin\dclsoap100.bpl not found</Excluded_Packages>
@ -58,31 +54,31 @@
<DelphiCompile Include="AlbaranesCliente_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Lib\AlbaranesCliente_controller.dcp" />
<DCCReference Include="..\..\Lib\AlbaranesCliente_model.dcp" />
<DCCReference Include="..\..\Lib\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="..\..\Lib\Almacenes_controller.dcp" />
<DCCReference Include="..\..\Lib\Articulos_view.dcp" />
<DCCReference Include="..\..\Lib\dbrtl.dcp" />
<DCCReference Include="..\..\Lib\frx11.dcp" />
<DCCReference Include="..\..\Lib\frxe11.dcp" />
<DCCReference Include="..\..\Lib\fs11.dcp" />
<DCCReference Include="..\..\Lib\Jcl.dcp" />
<DCCReference Include="..\..\Lib\JclVcl.dcp" />
<DCCReference Include="..\..\Lib\JvCoreD11R.dcp" />
<DCCReference Include="..\..\Lib\JvPageCompsD11R.dcp" />
<DCCReference Include="..\..\Lib\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\..\Lib\JvSystemD11R.dcp" />
<DCCReference Include="..\..\Lib\PngComponentsD10.dcp" />
<DCCReference Include="..\..\Lib\PNG_D10.dcp" />
<DCCReference Include="..\..\Lib\rtl.dcp" />
<DCCReference Include="..\..\Lib\tb2k_d10.dcp" />
<DCCReference Include="..\..\Lib\tbx_d10.dcp" />
<DCCReference Include="..\..\Lib\vcl.dcp" />
<DCCReference Include="..\..\Lib\vclactnband.dcp" />
<DCCReference Include="..\..\Lib\vcldb.dcp" />
<DCCReference Include="..\..\Lib\vcljpg.dcp" />
<DCCReference Include="..\..\Lib\vclx.dcp" />
<DCCReference Include="..\..\Facturas de cliente\AlbaranesCliente_controller.dcp" />
<DCCReference Include="..\..\Facturas de cliente\AlbaranesCliente_model.dcp" />
<DCCReference Include="..\..\Facturas de cliente\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="..\..\Facturas de cliente\Almacenes_controller.dcp" />
<DCCReference Include="..\..\Facturas de cliente\Articulos_view.dcp" />
<DCCReference Include="..\..\Facturas de cliente\dbrtl.dcp" />
<DCCReference Include="..\..\Facturas de cliente\frx11.dcp" />
<DCCReference Include="..\..\Facturas de cliente\frxe11.dcp" />
<DCCReference Include="..\..\Facturas de cliente\fs11.dcp" />
<DCCReference Include="..\..\Facturas de cliente\Jcl.dcp" />
<DCCReference Include="..\..\Facturas de cliente\JclVcl.dcp" />
<DCCReference Include="..\..\Facturas de cliente\JvCoreD11R.dcp" />
<DCCReference Include="..\..\Facturas de cliente\JvPageCompsD11R.dcp" />
<DCCReference Include="..\..\Facturas de cliente\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\..\Facturas de cliente\JvSystemD11R.dcp" />
<DCCReference Include="..\..\Facturas de cliente\PngComponentsD10.dcp" />
<DCCReference Include="..\..\Facturas de cliente\PNG_D10.dcp" />
<DCCReference Include="..\..\Facturas de cliente\rtl.dcp" />
<DCCReference Include="..\..\Facturas de cliente\tb2k_d10.dcp" />
<DCCReference Include="..\..\Facturas de cliente\tbx_d10.dcp" />
<DCCReference Include="..\..\Facturas de cliente\vcl.dcp" />
<DCCReference Include="..\..\Facturas de cliente\vclactnband.dcp" />
<DCCReference Include="..\..\Facturas de cliente\vcldb.dcp" />
<DCCReference Include="..\..\Facturas de cliente\vcljpg.dcp" />
<DCCReference Include="..\..\Facturas de cliente\vclx.dcp" />
<DCCReference Include="uAlbaranesClienteViewRegister.pas" />
<DCCReference Include="uEditorAlbaranCliente.pas">
<Form>fEditorAlbaranCliente</Form>

View File

@ -9,12 +9,13 @@ uses
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
JvgWizardHeader, uIEditorElegirArticulosAlbaranesCliente, uDAInterfaces;
JvgWizardHeader, uIEditorElegirArticulosAlbaranesCliente, uDAInterfaces,
uViewGridBase, uViewGrid, uViewArticulos;
type
TfEditorElegirArticulosAlbaranCliente = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesCliente)
protected
procedure AsignarVista; override;
public
constructor Create(AOwner: TComponent); override;
end;
@ -25,8 +26,9 @@ uses uViewElegirArticulosAlbaranesCliente;
{ TfEditorElegirArticulosAlbaranCliente }
procedure TfEditorElegirArticulosAlbaranCliente.AsignarVista;
constructor TfEditorElegirArticulosAlbaranCliente.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := CreateView(TfrViewElegirArticulosAlbaranesCliente) as IViewElegirArticulosAlbaranesCliente;
end;

View File

@ -1,51 +1,43 @@
inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
inherited ToolBar1: TToolBar
Height = 73
ExplicitHeight = 73
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Height = 95
ExplicitHeight = 95
inherited FontName: TJvFontComboBox [4]
Left = 56
Top = 22
ExplicitLeft = 56
ExplicitTop = 22
end
inherited ToolButton14: TToolButton [5]
Left = 201
Wrap = False
ExplicitLeft = 201
end
inherited FontSize: TEdit
Left = 266
Top = 22
ExplicitLeft = 266
ExplicitTop = 22
end
inherited UpDown1: TUpDown
Left = 308
Top = 22
ExplicitLeft = 308
ExplicitTop = 22
end
inherited ToolButton13: TToolButton
Left = 325
Top = 22
ExplicitLeft = 325
ExplicitTop = 22
end
inherited ToolButton6: TToolButton
inherited ToolButton11: TToolButton [9]
Left = 333
Top = 22
ExplicitLeft = 333
ExplicitTop = 22
end
inherited ToolButton7: TToolButton
Top = 22
ExplicitTop = 22
end
inherited ToolButton8: TToolButton
Top = 22
ExplicitTop = 22
end
inherited ToolButton12: TToolButton
inherited ToolButton12: TToolButton [10]
Left = 0
Top = 22
Wrap = True
@ -53,29 +45,41 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
ExplicitTop = 22
ExplicitHeight = 27
end
inherited ToolButton9: TToolButton
inherited ToolButton9: TToolButton [11]
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton10: TToolButton
inherited ToolButton10: TToolButton [12]
Left = 145
Top = 49
ExplicitLeft = 145
ExplicitTop = 49
end
inherited ToolButton11: TToolButton
inherited ToolButton6: TToolButton [13]
Left = 270
Top = 49
ExplicitLeft = 270
ExplicitTop = 49
end
inherited ToolButton7: TToolButton [14]
Left = 336
Top = 49
Wrap = True
ExplicitLeft = 336
ExplicitTop = 49
end
inherited ToolButton8: TToolButton [15]
Left = 0
Top = 71
ExplicitLeft = 0
ExplicitTop = 71
end
end
inherited cxGrid: TcxGrid
Top = 99
Height = 205
ExplicitWidth = 451
Top = 121
Height = 183
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewTIPO: TcxGridDBColumn
Visible = False
@ -84,8 +88,7 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
end
end
inherited TBXDock1: TTBXDock
Top = 73
ExplicitWidth = 451
Top = 95
inherited TBXToolbar1: TTBXToolbar
DockPos = 0
inherited TBXSubmenuItem1: TTBXSubmenuItem

View File

@ -20,7 +20,8 @@ uses
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue,
dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu, cxGridPopupMenu;
dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu, cxGridPopupMenu, uViewDetallesArticulosParaVenta,
cxEditRepositoryItems;
type
IViewDetallesAlbaranCliente = interface(IViewDetallesArticulos)
@ -30,7 +31,7 @@ type
property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran;
end;
TfrViewDetallesAlbaranCliente = class(TfrViewDetallesArticulos, IViewDetallesAlbaranCliente)
TfrViewDetallesAlbaranCliente = class(TfrViewDetallesArticulosParaVenta, IViewDetallesAlbaranCliente)
N2: TMenuItem;
Aadirartculos1: TMenuItem;
TBXItem18: TTBXItem;

View File

@ -1,22 +1,4 @@
inherited frViewElegirArticulosAlbaranesCliente: TfrViewElegirArticulosAlbaranesCliente
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn
Visible = False
VisibleForCustomization = False
end
inherited cxGridViewDESCUENTO: TcxGridDBColumn
Visible = False
VisibleForCustomization = False
end
inherited cxGridViewPRECIO_NETO: TcxGridDBColumn
Visible = False
end
inherited cxGridViewPRECIO_PORTE: TcxGridDBColumn
Visible = False
end
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl

View File

@ -6,6 +6,9 @@ uses
uDADataTable, uControllerDetallesArticulos, uBizDetallesAlbaranProveedor, uIDataModuleAlbaranesProveedor,
uBizArticulos, uBizContactos;
const
CAMPO_REFERENCIA_FABRICANTE = 'REFERENCIA_FABRICANTE';
type
IDetallesAlbaranProveedorController = interface(IControllerDetallesArticulos)
['{6E35D49A-C78D-481D-93E9-859CD27EB79F}']
@ -40,7 +43,7 @@ type
implementation
uses Variants, uDialogUtils, uControllerDetallesBase, uDataModuleAlbaranesProveedor, uArticulosAlbaranProveedorController,
uDataTableUtils, uCalculosUtils;
uDataTableUtils, uCalculosUtils, schArticulosClient_Intf;
{ TDetallesAlbaranProveedorController }
@ -68,7 +71,7 @@ begin
if Assigned(ADetalles) then
begin
try
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
AArticulos := (FArticulosController.BuscarTodosPorProveedor as IBizArticulo);
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
if ANuevaFila then
@ -128,6 +131,12 @@ begin
ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := AArticulos.DESCUENTO
else
ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := 0;
//Sobreescribimos el id del articulo por el campo ID_ARTICULO que nos hemos tenido que crear para
//almacenar el codigo de artículo ya que ID esta destinado a ID_ARTICULO||ID_PROVEEDOR, para identificar de forma
//unica los articulos desglosados por proveedor.
ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsVariant := AArticulos.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsVariant;
ADetalles.DataTable.FieldByName(CAMPO_REFERENCIA_FABRICANTE).AsVariant := AArticulos.DataTable.FieldByName(fld_ArticulosREFERENCIA_FABR).AsVariant;
end;
procedure TDetallesAlbaranProveedorController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);

View File

@ -373,6 +373,11 @@ inherited DataModuleAlbaranesProveedor: TDataModuleAlbaranesProveedor
item
Name = 'ID_PEDIDO'
DataType = datInteger
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
end>
Params = <>
MasterMappingMode = mmWhere

View File

@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_AlbaranesProveedor = '{DC4BC11F-D327-4E71-BD98-E2221D403DCD}';
RID_AlbaranesProveedor_Detalles = '{7E3C0C28-6CDC-44EC-B9B3-FA0D6E04B704}';
RID_AlbaranesProveedor = '{1FB6A9A8-C798-46A8-9224-D616CD25C983}';
RID_AlbaranesProveedor_Detalles = '{88D37566-EF0B-4C02-8C06-0A90970BE427}';
{ Data table names }
nme_AlbaranesProveedor = 'AlbaranesProveedor';
@ -108,6 +108,7 @@ const
fld_AlbaranesProveedor_DetallesREFERENCIA = 'REFERENCIA';
fld_AlbaranesProveedor_DetallesREFERENCIA_PROVEEDOR = 'REFERENCIA_PROVEEDOR';
fld_AlbaranesProveedor_DetallesID_PEDIDO = 'ID_PEDIDO';
fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE = 'REFERENCIA_FABRICANTE';
{ AlbaranesProveedor_Detalles field indexes }
idx_AlbaranesProveedor_DetallesID = 0;
@ -125,11 +126,12 @@ const
idx_AlbaranesProveedor_DetallesREFERENCIA = 12;
idx_AlbaranesProveedor_DetallesREFERENCIA_PROVEEDOR = 13;
idx_AlbaranesProveedor_DetallesID_PEDIDO = 14;
idx_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE = 15;
type
{ IAlbaranesProveedor }
IAlbaranesProveedor = interface(IDAStronglyTypedDataTable)
['{4A11793E-3535-4087-BAF4-4A6D47B4FB51}']
['{141F98AE-9887-4D24-9EA0-F828297F85CD}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -584,7 +586,7 @@ type
{ IAlbaranesProveedor_Detalles }
IAlbaranesProveedor_Detalles = interface(IDAStronglyTypedDataTable)
['{F72E89B1-361B-44F9-A166-02D428B67E07}']
['{E15A8B06-496C-4A7B-AFF5-EA9F396B6C7A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -646,6 +648,10 @@ type
procedure SetID_PEDIDOValue(const aValue: Integer);
function GetID_PEDIDOIsNull: Boolean;
procedure SetID_PEDIDOIsNull(const aValue: Boolean);
function GetREFERENCIA_FABRICANTEValue: String;
procedure SetREFERENCIA_FABRICANTEValue(const aValue: String);
function GetREFERENCIA_FABRICANTEIsNull: Boolean;
procedure SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean);
{ Properties }
@ -679,6 +685,8 @@ type
property REFERENCIA_PROVEEDORIsNull: Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property ID_PEDIDO: Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property ID_PEDIDOIsNull: Boolean read GetID_PEDIDOIsNull write SetID_PEDIDOIsNull;
property REFERENCIA_FABRICANTE: String read GetREFERENCIA_FABRICANTEValue write SetREFERENCIA_FABRICANTEValue;
property REFERENCIA_FABRICANTEIsNull: Boolean read GetREFERENCIA_FABRICANTEIsNull write SetREFERENCIA_FABRICANTEIsNull;
end;
{ TAlbaranesProveedor_DetallesDataTableRules }
@ -746,6 +754,10 @@ type
procedure SetID_PEDIDOValue(const aValue: Integer); virtual;
function GetID_PEDIDOIsNull: Boolean; virtual;
procedure SetID_PEDIDOIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_FABRICANTEValue: String; virtual;
procedure SetREFERENCIA_FABRICANTEValue(const aValue: String); virtual;
function GetREFERENCIA_FABRICANTEIsNull: Boolean; virtual;
procedure SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@ -778,6 +790,8 @@ type
property REFERENCIA_PROVEEDORIsNull: Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property ID_PEDIDO: Integer read GetID_PEDIDOValue write SetID_PEDIDOValue;
property ID_PEDIDOIsNull: Boolean read GetID_PEDIDOIsNull write SetID_PEDIDOIsNull;
property REFERENCIA_FABRICANTE: String read GetREFERENCIA_FABRICANTEValue write SetREFERENCIA_FABRICANTEValue;
property REFERENCIA_FABRICANTEIsNull: Boolean read GetREFERENCIA_FABRICANTEIsNull write SetREFERENCIA_FABRICANTEIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@ -1895,6 +1909,27 @@ begin
DataTable.Fields[idx_AlbaranesProveedor_DetallesID_PEDIDO].AsVariant := Null;
end;
function TAlbaranesProveedor_DetallesDataTableRules.GetREFERENCIA_FABRICANTEValue: String;
begin
result := DataTable.Fields[idx_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE].AsString;
end;
procedure TAlbaranesProveedor_DetallesDataTableRules.SetREFERENCIA_FABRICANTEValue(const aValue: String);
begin
DataTable.Fields[idx_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE].AsString := aValue;
end;
function TAlbaranesProveedor_DetallesDataTableRules.GetREFERENCIA_FABRICANTEIsNull: boolean;
begin
result := DataTable.Fields[idx_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE].IsNull;
end;
procedure TAlbaranesProveedor_DetallesDataTableRules.SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE].AsVariant := Null;
end;
initialization
RegisterDataTableRules(RID_AlbaranesProveedor, TAlbaranesProveedorDataTableRules);

View File

@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_AlbaranesProveedorDelta = '{3E80524F-4D76-4027-AD93-F08F2B616B77}';
RID_AlbaranesProveedor_DetallesDelta = '{BCE53CF1-BA9D-4944-8EB8-529E2AE826B9}';
RID_AlbaranesProveedorDelta = '{1BCA1CCB-00EC-4FCE-8444-9D6C87B77754}';
RID_AlbaranesProveedor_DetallesDelta = '{FF6EDFFA-2EFB-4B00-B095-7CAB514D7BD1}';
type
{ IAlbaranesProveedorDelta }
IAlbaranesProveedorDelta = interface(IAlbaranesProveedor)
['{3E80524F-4D76-4027-AD93-F08F2B616B77}']
['{1BCA1CCB-00EC-4FCE-8444-9D6C87B77754}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -471,7 +471,7 @@ type
{ IAlbaranesProveedor_DetallesDelta }
IAlbaranesProveedor_DetallesDelta = interface(IAlbaranesProveedor_Detalles)
['{BCE53CF1-BA9D-4944-8EB8-529E2AE826B9}']
['{FF6EDFFA-2EFB-4B00-B095-7CAB514D7BD1}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_ALBARANValue : Integer;
@ -488,6 +488,7 @@ type
function GetOldREFERENCIAValue : String;
function GetOldREFERENCIA_PROVEEDORValue : String;
function GetOldID_PEDIDOValue : Integer;
function GetOldREFERENCIA_FABRICANTEValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
@ -505,6 +506,7 @@ type
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property OldID_PEDIDO : Integer read GetOldID_PEDIDOValue;
property OldREFERENCIA_FABRICANTE : String read GetOldREFERENCIA_FABRICANTEValue;
end;
{ TAlbaranesProveedor_DetallesBusinessProcessorRules }
@ -602,6 +604,12 @@ type
function GetOldID_PEDIDOIsNull: Boolean; virtual;
procedure SetID_PEDIDOValue(const aValue: Integer); virtual;
procedure SetID_PEDIDOIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_FABRICANTEValue: String; virtual;
function GetREFERENCIA_FABRICANTEIsNull: Boolean; virtual;
function GetOldREFERENCIA_FABRICANTEValue: String; virtual;
function GetOldREFERENCIA_FABRICANTEIsNull: Boolean; virtual;
procedure SetREFERENCIA_FABRICANTEValue(const aValue: String); virtual;
procedure SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@ -664,6 +672,10 @@ type
property ID_PEDIDOIsNull : Boolean read GetID_PEDIDOIsNull write SetID_PEDIDOIsNull;
property OldID_PEDIDO : Integer read GetOldID_PEDIDOValue;
property OldID_PEDIDOIsNull : Boolean read GetOldID_PEDIDOIsNull;
property REFERENCIA_FABRICANTE : String read GetREFERENCIA_FABRICANTEValue write SetREFERENCIA_FABRICANTEValue;
property REFERENCIA_FABRICANTEIsNull : Boolean read GetREFERENCIA_FABRICANTEIsNull write SetREFERENCIA_FABRICANTEIsNull;
property OldREFERENCIA_FABRICANTE : String read GetOldREFERENCIA_FABRICANTEValue;
property OldREFERENCIA_FABRICANTEIsNull : Boolean read GetOldREFERENCIA_FABRICANTEIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -2294,6 +2306,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesProveedor_DetallesID_PEDIDO] := Null;
end;
function TAlbaranesProveedor_DetallesBusinessProcessorRules.GetREFERENCIA_FABRICANTEValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE];
end;
function TAlbaranesProveedor_DetallesBusinessProcessorRules.GetREFERENCIA_FABRICANTEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE]);
end;
function TAlbaranesProveedor_DetallesBusinessProcessorRules.GetOldREFERENCIA_FABRICANTEValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE];
end;
function TAlbaranesProveedor_DetallesBusinessProcessorRules.GetOldREFERENCIA_FABRICANTEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE]);
end;
procedure TAlbaranesProveedor_DetallesBusinessProcessorRules.SetREFERENCIA_FABRICANTEValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE] := aValue;
end;
procedure TAlbaranesProveedor_DetallesBusinessProcessorRules.SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesProveedor_DetallesREFERENCIA_FABRICANTE] := Null;
end;
initialization
RegisterBusinessProcessorRules(RID_AlbaranesProveedorDelta, TAlbaranesProveedorBusinessProcessorRules);

View File

@ -387,11 +387,16 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
'R_DETALLES.IMPORTE_TOTAL,'#10' ALBARANES_PROVEEDOR_DETALLES.VISIB' +
'LE,'#10#10' ALBARANES_PROVEEDOR_DETALLES.ID_ARTICULO, ALBARANES_PRO' +
'VEEDOR_DETALLES.DESCUENTO,'#10' ALBARANES_PROVEEDOR_DETALLES.IMPO' +
'RTE_PORTE,'#10' ARTICULOS.REFERENCIA, ARTICULOS.REFERENCIA_PROV a' +
's REFERENCIA_PROVEEDOR,'#10' ALBARANES_PROVEEDOR_DETALLES.ID_PEDI' +
'DO'#10#10'FROM ALBARANES_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON ALB' +
'ARANES_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE {wher' +
'e}'#10'ORDER BY POSICION;'#10
'RTE_PORTE,'#10' ARTICULOS.REFERENCIA, ARTICULOS_PROVEEDORES.REFER' +
'ENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' ALBARANES_PROVEEDOR_DETA' +
'LLES.ID_PEDIDO,'#10' ARTICULOS.REFERENCIA_FABR as REFERENCIA_FABR' +
'ICANTE'#10#10'FROM ALBARANES_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON' +
' ALBARANES_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'LEFT JO' +
'IN ALBARANES_PROVEEDOR ON (ALBARANES_PROVEEDOR.ID = ALBARANES_PR' +
'OVEEDOR_DETALLES.ID_ALBARAN)'#10'LEFT JOIN ARTICULOS_PROVEEDORES ON ' +
'((ARTICULOS_PROVEEDORES.ID_ARTICULO = ARTICULOS.ID) AND (ARTICUL' +
'OS_PROVEEDORES.ID_PROVEEDOR = ALBARANES_PROVEEDOR.ID_PROVEEDOR))' +
#10'WHERE {where}'#10'ORDER BY POSICION;'#10#10#10#10
StatementType = stSQL
ColumnMappings = <
item
@ -453,6 +458,10 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
item
DatasetField = 'ID_PEDIDO'
TableField = 'ID_PEDIDO'
end
item
DatasetField = 'REFERENCIA_FABRICANTE'
TableField = 'REFERENCIA_FABRICANTE'
end>
end>
Name = 'AlbaranesProveedor_Detalles'
@ -537,6 +546,11 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
item
Name = 'ID_PEDIDO'
DataType = datInteger
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
end>
end>
JoinDataTables = <>

View File

@ -1,7 +1,5 @@
inherited fEditorAlbaranDevProveedor: TfEditorAlbaranDevProveedor
Caption = 'Nueva orden de devoluci'#243'n de proveedor'
ExplicitWidth = 320
ExplicitHeight = 653
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@ -38,135 +36,66 @@ inherited fEditorAlbaranDevProveedor: TfEditorAlbaranDevProveedor
end
end
inherited pgPaginas: TPageControl
inherited pagGeneral: TTabSheet
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 751
ExplicitHeight = 426
end
inherited pagContenido: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 751
ExplicitHeight = 426
inherited frViewDetallesAlbaranProveedor1: TfrViewDetallesAlbaranProveedor
inherited ToolBar1: TToolBar
Height = 73
ExplicitHeight = 73
inherited ToolButton13: TToolButton [1]
Left = 109
inherited UpDown1: TUpDown [7]
Left = 602
Top = 0
ExplicitLeft = 109
ExplicitLeft = 602
ExplicitTop = 0
end
inherited ToolButton12: TToolButton [2]
inherited ToolButton13: TToolButton [8]
end
inherited ToolButton11: TToolButton
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 30
end
inherited ToolButton2: TToolButton [3]
Left = 0
Top = 30
ExplicitLeft = 0
ExplicitTop = 30
inherited ToolButton12: TToolButton
Left = 141
ExplicitLeft = 141
end
inherited ToolButton3: TToolButton [4]
Left = 114
Top = 30
Wrap = False
ExplicitLeft = 114
ExplicitTop = 30
inherited ToolButton9: TToolButton
Left = 149
ExplicitLeft = 149
end
inherited ToolButton4: TToolButton [5]
Left = 169
Top = 30
ExplicitLeft = 169
ExplicitTop = 30
end
inherited FontName: TJvFontComboBox [6]
Left = 225
Top = 30
ExplicitLeft = 225
ExplicitTop = 30
end
inherited ToolButton11: TToolButton [7]
Left = 370
Top = 30
Wrap = True
ExplicitLeft = 370
ExplicitTop = 30
end
inherited ToolButton14: TToolButton [8]
Left = 0
Top = 52
ExplicitLeft = 0
ExplicitTop = 52
end
inherited FontSize: TEdit [9]
Left = 65
Top = 52
ExplicitLeft = 65
ExplicitTop = 52
end
inherited ToolButton9: TToolButton [10]
Left = 107
Top = 52
ExplicitLeft = 107
ExplicitTop = 52
end
inherited ToolButton8: TToolButton [11]
Left = 252
Top = 52
ExplicitLeft = 252
ExplicitTop = 52
end
inherited ToolButton7: TToolButton [12]
Left = 335
Top = 52
ExplicitLeft = 335
ExplicitTop = 52
inherited ToolButton10: TToolButton
Left = 294
ExplicitLeft = 294
end
inherited ToolButton6: TToolButton
Left = 402
Top = 52
ExplicitLeft = 402
ExplicitTop = 52
Left = 419
ExplicitLeft = 419
end
inherited UpDown1: TUpDown [14]
Left = 468
Top = 52
ExplicitLeft = 468
ExplicitTop = 52
end
inherited ToolButton10: TToolButton [15]
inherited ToolButton7: TToolButton
Left = 485
Top = 52
ExplicitLeft = 485
ExplicitTop = 52
end
inherited ToolButton8: TToolButton
Left = 552
ExplicitLeft = 552
end
end
inherited cxGrid: TcxGrid
Top = 99
Height = 327
ExplicitTop = 99
ExplicitHeight = 327
end
inherited TBXDock1: TTBXDock
Top = 73
ExplicitTop = 73
end
inherited cxGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewDetallesAlbaranProveedor1.cxGridView
HitTypes = [gvhtNone, gvhtCell, gvhtRecord, gvhtRowIndicator]
Index = 0
PopupMenu = frViewDetallesAlbaranProveedor1.GridGeneralPopupMenu
end>
end
end
end
inherited pagInicidencias: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 751
ExplicitHeight = 426
inherited frViewIncidenciasCli: TfrViewIncidencias
inherited pnlSup: TPanel
ExplicitWidth = 751
end
inherited GroupBox1: TGroupBox
inherited eIncidencias: TcxDBMemo
ExplicitWidth = 726
@ -194,104 +123,34 @@ inherited fEditorAlbaranDevProveedor: TfEditorAlbaranDevProveedor
ExplicitWidth = 21
end
inherited ImporteDto: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 93
Width = 93
end
inherited ImporteIVA: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 137
Width = 137
end
inherited ImporteTotal: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 137
Width = 137
end
inherited edtDescuento: TcxDBSpinEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited edtIVA: TcxDBSpinEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited ImporteBase: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 92
Width = 92
end
inherited edtRE: TcxDBSpinEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited ImporteRE: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 56
Width = 56
end
inherited eImporteNeto: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 147
Width = 147
end
inherited ePorte: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 147
Width = 147
end
inherited eIVA: TcxDBLookupComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 81
Width = 81
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 219
Width = 219
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup

View File

@ -6,7 +6,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
ClientWidth = 765
OnClose = CustomEditorClose
ExplicitWidth = 773
ExplicitHeight = 646
ExplicitHeight = 653
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@ -129,7 +129,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
Width = 765
ExplicitWidth = 765
inherited tbxMain: TTBXToolbar
ExplicitWidth = 488
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
Visible = False
end
@ -147,7 +147,6 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
inherited pgPaginas: TPageControl
Width = 759
Height = 454
ActivePage = pagContenido
TabOrder = 1
OnChanging = pgPaginasChanging
ExplicitWidth = 759
@ -155,16 +154,12 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 757
ExplicitHeight = 432
ExplicitWidth = 751
ExplicitHeight = 426
end
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewDetallesAlbaranProveedor1: TfrViewDetallesAlbaranProveedor
Left = 0
Top = 0
@ -185,54 +180,105 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
ExplicitHeight = 426
inherited ToolBar1: TToolBar
Width = 751
Height = 46
Height = 51
ExplicitWidth = 751
ExplicitHeight = 46
inherited ToolButton12: TToolButton
Left = 474
ExplicitHeight = 51
inherited ToolButton3: TToolButton
Wrap = False
ExplicitLeft = 474
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
ExplicitLeft = 278
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 479
Top = 0
ExplicitLeft = 479
ExplicitTop = 0
end
inherited FontSize: TEdit
Left = 544
Top = 0
Width = 58
ExplicitLeft = 544
ExplicitTop = 0
ExplicitWidth = 58
end
inherited ToolButton13: TToolButton [7]
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 27
end
inherited UpDown1: TUpDown [8]
Left = 0
Top = 27
ExplicitLeft = 0
ExplicitTop = 27
end
inherited ToolButton11: TToolButton
Left = 17
Top = 27
ExplicitLeft = 17
ExplicitTop = 27
end
inherited ToolButton12: TToolButton
Left = 158
Top = 27
Wrap = False
ExplicitLeft = 158
ExplicitTop = 27
ExplicitHeight = 22
end
inherited ToolButton9: TToolButton
Left = 482
Top = 22
ExplicitLeft = 482
ExplicitTop = 22
Left = 166
Top = 27
ExplicitLeft = 166
ExplicitTop = 27
end
inherited ToolButton10: TToolButton
Left = 627
Top = 22
ExplicitLeft = 627
ExplicitTop = 22
Left = 311
Top = 27
ExplicitLeft = 311
ExplicitTop = 27
end
inherited ToolButton6: TToolButton
Left = 752
Top = 22
ExplicitLeft = 752
ExplicitTop = 22
Left = 436
Top = 27
ExplicitLeft = 436
ExplicitTop = 27
end
inherited ToolButton7: TToolButton
Left = 818
Top = 22
Left = 502
Top = 27
Wrap = False
ExplicitLeft = 818
ExplicitTop = 22
ExplicitLeft = 502
ExplicitTop = 27
end
inherited ToolButton8: TToolButton
Left = 885
Top = 22
ExplicitLeft = 885
ExplicitTop = 22
Left = 569
Top = 27
ExplicitLeft = 569
ExplicitTop = 27
end
end
inherited cxGrid: TcxGrid
Top = 72
Top = 77
Width = 751
Height = 354
ExplicitTop = 72
Height = 349
ExplicitTop = 77
ExplicitWidth = 751
ExplicitHeight = 354
ExplicitHeight = 349
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Options.Editing = True
@ -240,23 +286,28 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
end
end
inherited TBXDock1: TTBXDock
Top = 46
Top = 51
Width = 751
ExplicitTop = 51
ExplicitWidth = 751
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 626
ExplicitWidth = 745
end
end
inherited cxGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewDetallesAlbaranProveedor1.cxGridView
HitTypes = [gvhtNone, gvhtCell, gvhtRecord, gvhtRowIndicator]
Index = 0
PopupMenu = frViewDetallesAlbaranProveedor1.GridGeneralPopupMenu
end>
end
end
end
object pagInicidencias: TTabSheet
Caption = 'Incidencias'
ImageIndex = 2
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewIncidenciasCli: TfrViewIncidencias
Left = 0
Top = 0
@ -275,7 +326,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
ExplicitHeight = 426
inherited pnlSup: TPanel
Width = 751
ExplicitWidth = 757
ExplicitWidth = 751
inherited eIncidenciaActiva: TcxDBCheckBox
ExplicitHeight = 21
end
@ -353,51 +404,35 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
inherited ImporteDto: TcxDBCurrencyEdit
Left = 164
Top = 112
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 164
ExplicitTop = 112
ExplicitWidth = 93
Width = 93
ExplicitWidth = 199
Width = 199
end
inherited ImporteIVA: TcxDBCurrencyEdit
Left = 562
Top = 38
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 562
ExplicitTop = 38
ExplicitWidth = 137
Width = 137
ExplicitWidth = 192
Width = 192
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 492
Top = 112
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 492
ExplicitTop = 112
ExplicitWidth = 137
Width = 137
ExplicitWidth = 262
Width = 262
end
inherited edtDescuento: TcxDBSpinEdit
Left = 93
Top = 112
Properties.OnValidate = frViewTotales1edtDescuentoPropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93
ExplicitTop = 112
end
@ -405,37 +440,25 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
Left = 491
Top = 38
Properties.OnValidate = frViewTotales1edtIVAPropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 491
ExplicitTop = 38
end
inherited ImporteBase: TcxDBCurrencyEdit
Left = 491
Top = 11
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 491
ExplicitTop = 11
ExplicitWidth = 92
Width = 92
ExplicitWidth = 263
Width = 263
end
inherited edtRE: TcxDBSpinEdit
Left = 491
Top = 65
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 491
ExplicitTop = 65
end
@ -444,56 +467,40 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
Top = 65
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 562
ExplicitTop = 65
ExplicitWidth = 56
Width = 56
ExplicitWidth = 192
Width = 192
end
inherited eImporteNeto: TcxDBCurrencyEdit
Left = 93
Top = 11
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93
ExplicitTop = 11
ExplicitWidth = 147
Width = 147
ExplicitWidth = 270
Width = 270
end
inherited ePorte: TcxDBCurrencyEdit
Left = 93
Top = 139
Properties.OnValidate = frViewTotales1ePortePropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93
ExplicitTop = 139
ExplicitWidth = 147
Width = 147
ExplicitWidth = 270
Width = 270
end
inherited eIVA: TcxDBLookupComboBox
Left = 93
Top = 38
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93
ExplicitTop = 38
ExplicitWidth = 81
Width = 81
ExplicitWidth = 132
Width = 132
end
inherited bTiposIVA: TButton
Left = 231
@ -505,14 +512,10 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
Left = 93
Top = 65
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93
ExplicitTop = 65
ExplicitWidth = 219
Width = 219
ExplicitWidth = 270
Width = 270
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup
@ -562,6 +565,14 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
inherited actConfPagina: TAction
Visible = False
end
inherited actPrevisualizar: TAction
Enabled = False
Visible = False
end
inherited actImprimir: TAction
Enabled = False
Visible = False
end
end
inherited SmallImages: TPngImageList [6]
end

View File

@ -242,7 +242,8 @@ end;
procedure TfEditorAlbaranProveedor.pgPaginasChanging(Sender: TObject; var AllowChange: Boolean);
begin
inherited;
if (not Assigned(FAlbaran)) or (FAlbaran.ID_PROVEEDOR = ID_NULO) then
if (not Assigned(FAlbaran))
or (FAlbaran.ID_PROVEEDOR = 0) then
begin
ShowWarningMessage('Antes de introducir conceptos debe elegir un proveedor para este albarán');
AllowChange := False;

View File

@ -1,6 +1,5 @@
inherited fEditorElegirArticulosAlbaranProveedor: TfEditorElegirArticulosAlbaranProveedor
Caption = 'fEditorElegirArticulosAlbaranProveedor'
ExplicitWidth = 320
PixelsPerInch = 96
TextHeight = 13
end

View File

@ -10,7 +10,7 @@ uses
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
JvgWizardHeader, uIEditorElegirArticulosAlbaranesProveedor, uBizContactos,
uDAInterfaces;
uDAInterfaces, uViewGridBase, uViewGrid, uViewArticulos;
type
TfEditorElegirArticulosAlbaranProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesProveedor)
@ -20,11 +20,9 @@ type
function GetProveedor: IBizProveedor;
procedure SetProveedor(const Value: IBizProveedor);
protected
procedure AsignarVista; override;
public
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
constructor Create(AOwner: TComponent); override;
end;
@ -36,8 +34,9 @@ uses uViewElegirArticulosAlbaranesProveedor;
{ TfEditorElegirArticulosAlbaranProveedor }
procedure TfEditorElegirArticulosAlbaranProveedor.AsignarVista;
constructor TfEditorElegirArticulosAlbaranProveedor.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := CreateView(TfrViewElegirArticulosAlbaranesProveedor) as IViewElegirArticulosAlbaranesProveedor;
end;

View File

@ -75,16 +75,51 @@ inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor
inherited cxGrid: TcxGrid
Top = 99
Height = 205
ExplicitWidth = 451
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewREFERENCIA: TcxGridDBColumn
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
Visible = False
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
end
inherited cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
Visible = False
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
end
inherited cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
Visible = False
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
end
inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn
Visible = False
VisibleForCustomization = False
end
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Caption = 'Importe coste'
Properties.ReadOnly = False
Visible = True
end
end
end
inherited TBXDock1: TTBXDock
Top = 73
ExplicitWidth = 451
ExplicitTop = 73
inherited TBXToolbar1: TTBXToolbar
inherited TBXSubmenuItem1: TTBXSubmenuItem
Visible = False

View File

@ -18,7 +18,8 @@ uses
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue,
dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu, cxGridPopupMenu;
dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu, cxGridPopupMenu,
cxEditRepositoryItems, uViewDetallesArticulosParaVenta;
type
IViewDetallesAlbaranProveedor = interface(IViewDetallesArticulos)

View File

@ -4,10 +4,20 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
inherited cxGrid: TcxGrid
Height = 286
RootLevelOptions.DetailTabsPosition = dtpTop
OnActiveTabChanged = cxGridActiveTabChanged
ExplicitHeight = 286
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn
Visible = False
end
inherited cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn
Visible = False
end
end
inherited cxGridLevel: TcxGridLevel
Caption = ''
end
object cxGridLevel1: TcxGridLevel
Caption = 'Otros proveedores'
Caption = 'Generales'
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
@ -18,12 +28,16 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 225
ExplicitLeft = 225
ExplicitWidth = 121
Width = 121
end
inherited eLista: TcxComboBox
Left = 383
ExplicitLeft = 383
ExplicitWidth = 322
Width = 322
end
end
end

View File

@ -4,7 +4,7 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewArticulos, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
Dialogs, uViewArticulosPorProveedor, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, cxImageComboBox, cxCurrencyEdit,
cxSpinEdit, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev,
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, ImgList, PngImageList,
@ -18,7 +18,7 @@ uses
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue,
dxSkinscxPCPainter, uDAInterfaces;
dxSkinscxPCPainter, uDAInterfaces, uViewArticulos;
type
IViewElegirArticulosAlbaranesProveedor = interface(IViewArticulos)
@ -28,7 +28,7 @@ type
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
end;
TfrViewElegirArticulosAlbaranesProveedor = class(TfrViewArticulos, IViewElegirArticulosAlbaranesProveedor)
TfrViewElegirArticulosAlbaranesProveedor = class(TfrViewArticulosPorProveedor, IViewElegirArticulosAlbaranesProveedor)
cxGridLevel1: TcxGridLevel;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid;
ALevel: TcxGridLevel);
@ -63,7 +63,7 @@ begin
0 : if Assigned(FProveedor) then
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, FProveedor.ID, FProveedor.NOMBRE);
1 : if Assigned(FProveedor) then
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foNotEqual, FProveedor.ID, FProveedor.NOMBRE);
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, Null, 'ARTICULOS SIN PROVEEDOR');
end;
end;

View File

@ -9,7 +9,7 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Almacenes = '{EFF5A6F0-C500-4F72-8D24-5BD12C92E40E}';
RID_Almacenes = '{0C3FFC55-67A2-4BDA-9EAA-F90ED49C4DE7}';
{ Data table names }
nme_Almacenes = 'Almacenes';
@ -51,7 +51,7 @@ const
type
{ IAlmacenes }
IAlmacenes = interface(IDAStronglyTypedDataTable)
['{104709AF-567B-415E-B54F-03C0A1BF65CA}']
['{7C12ADCA-C970-4251-BDFC-7227CE755A91}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);

View File

@ -9,12 +9,12 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_AlmacenesDelta = '{C73B6766-E3E1-4A09-8FFD-B9B7A7750CF1}';
RID_AlmacenesDelta = '{3AC4736D-AB9F-4DAB-B2A2-D9EABF8D0C8C}';
type
{ IAlmacenesDelta }
IAlmacenesDelta = interface(IAlmacenes)
['{C73B6766-E3E1-4A09-8FFD-B9B7A7750CF1}']
['{3AC4736D-AB9F-4DAB-B2A2-D9EABF8D0C8C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;

View File

@ -55,11 +55,22 @@
<DelphiCompile Include="Articulos_controller.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Albaranes de cliente\Articulos_data.dcp" />
<DCCReference Include="..\..\Albaranes de cliente\Articulos_model.dcp" />
<DCCReference Include="..\..\Albaranes de cliente\Contactos_controller.dcp" />
<DCCReference Include="..\..\Albaranes de cliente\Contactos_model.dcp" />
<DCCReference Include="..\..\Albaranes de cliente\GUIBase.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\adortl.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\Articulos_data.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\Articulos_model.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\Contactos_controller.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\Contactos_model.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\dbrtl.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\dsnap.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\dxThemeD11.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\GUIBase.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\rtl.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\vcl.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\vcldb.dcp" />
<DCCReference Include="uArticulosController.pas" />
<DCCReference Include="uControllerDetallesArticulos.pas" />
<DCCReference Include="View\uIEditorArticulo.pas" />

View File

@ -3,11 +3,19 @@ unit uIEditorElegirArticulos;
interface
uses
uIEditorArticulos, uBizArticulos, uGUIBase;
uIEditorArticulos, uBizArticulos, uArticulosController, uGUIBase;
type
IEditorElegirArticulos = interface(IEditorArticulos)
['{549F3B97-46E2-4D40-8080-566065735FA0}']
function GetArticulos: IBizArticulo;
procedure SetArticulos(const Value: IBizArticulo);
property Articulos: IBizArticulo read GetArticulos write SetArticulos;
function GetController : IArticulosController;
procedure SetController (const Value : IArticulosController);
property Controller : IArticulosController read GetController write SetController;
function GetArticulosSeleccionados: IBizArticulo;
property ArticulosSeleccionados: IBizArticulo read GetArticulosSeleccionados;
@ -18,7 +26,6 @@ type
procedure SetMensaje (const AValue: String);
function GetMensaje: String;
property Mensaje : String read GetMensaje write SetMensaje;
end;

View File

@ -11,15 +11,16 @@ uses
type
IArticulosController = interface(IObservador)
['{C7EA6486-7BE4-468E-A27A-621E1BA13430}']
function Buscar(const ID: Integer; AClienteID: Integer = -1): IBizArticulo;
function Buscar(const ID: Integer; AClienteID: Integer = -1): IBizArticulo; overload;
function BuscarInventariables: IBizArticulo;
function BuscarTodos: IBizArticulo; overload;
function BuscarTodosPorProveedor: IBizArticulo; overload;
function BuscarTodos(ACliente: IBizCliente): IBizArticulo; overload;
function BuscarTodos(AProveedor: IBizProveedor): IBizArticulo; overload;
function BuscarReferencia(const Ref: String; AClienteID: Integer): IBizArticulo;
function BuscarReferenciaProveedor(const Ref: String; AClienteID: Integer): IBizArticulo;
procedure Ver(AArticulo : IBizArticulo);
procedure VerTodos(AArticulos: IBizArticulo);
procedure VerTodos;
function Nuevo : IBizArticulo;
procedure Anadir(AArticulo : IBizArticulo);
function Eliminar(const ID : Integer): Boolean; overload;
@ -75,6 +76,7 @@ type
procedure Anadir(AArticulo : IBizArticulo); virtual;
function Buscar(const ID: Integer; AClienteID: Integer = -1): IBizArticulo; virtual;
function BuscarTodos: IBizArticulo; overload;
function BuscarTodosPorProveedor: IBizArticulo; overload;
function BuscarInventariables: IBizArticulo;
function BuscarTodos(ACliente: IBizCliente): IBizArticulo; overload;
function BuscarTodos(ACliente: Integer): IBizArticulo; overload;
@ -83,7 +85,7 @@ type
function BuscarReferenciaProveedor(const Ref: String; AClienteID: Integer): IBizArticulo; virtual;
function Nuevo : IBizArticulo; virtual;
procedure Ver(AArticulo : IBizArticulo); virtual;
procedure VerTodos(AArticulos: IBizArticulo); virtual;
procedure VerTodos; virtual;
function Duplicar(AArticulo: IBizArticulo): IBizArticulo; virtual;
procedure Preview(AArticulo : IBizArticulo); virtual;
procedure Print(AArticulo : IBizArticulo); virtual;
@ -118,7 +120,7 @@ var
AProveedor : IBizContacto;
begin
inherited;
AProveedor := (FProveedoresController.Nuevo as IBizProveedor);
{ AProveedor := (FProveedoresController.Nuevo as IBizProveedor);
FProveedoresController.Ver(AProveedor);
if Assigned(AProveedor) then
begin
@ -128,6 +130,7 @@ begin
AArticulo.NOMBRE_PROVEEDOR := AProveedor.NOMBRE;
end;
AProveedor := Nil;
}
end;
procedure TArticulosController.AsignarDataModule;
@ -138,10 +141,11 @@ end;
function TArticulosController.Buscar(const ID: Integer; AClienteID: Integer = -1): IBizArticulo;
begin
if (AClienteID = -1) then
Result := (FDataModule as IDataModuleArticulos).GetItem(ID)
else
Result := (FDataModule as IDataModuleArticulos).GetItem(ID, AClienteID);
//Quitamos la funcionalidad de poder dar una lista de articulos particular de los clientes
// if (AClienteID = -1) then
Result := (FDataModule as IDataModuleArticulos).GetItem(ID);
// else
// Result := (FDataModule as IDataModuleArticulos).GetItem(ID, AClienteID);
FiltrarEmpresa(Result);
end;
@ -177,10 +181,11 @@ function TArticulosController.BuscarReferencia(const Ref: String; AClienteID: In
begin
ShowHourglassCursor;
try
if (AClienteID = -1) then
Result := BuscarTodos
else
Result := BuscarTodos(AClienteID);
//En tecsitel se desactiva el sacar una lista de articulos personalizada por cliente
// if (AClienteID = -1) then
Result := BuscarTodos;
// else
// Result := BuscarTodos(AClienteID);
// Filtrar por referencia, se cambia por el where anterior porque luego no nos reconoce bien la cadena, al contener UPPER
with Result.DataTable.Where do
@ -211,10 +216,11 @@ function TArticulosController.BuscarReferenciaProveedor(const Ref: String; AClie
begin
ShowHourglassCursor;
try
if (AClienteID = -1) then
Result := BuscarTodos
else
Result := BuscarTodos(AClienteID);
//En tecsitel se desactiva el sacar una lista de articulos personalizada por cliente
// if (AClienteID = -1) then
Result := BuscarTodosPorProveedor;
// else
// Result := BuscarTodos(AClienteID);
// Filtrar por referencia, se cambia por el where anterior porque luego no nos reconoce bien la cadena, al contener UPPER
with Result.DataTable.Where do
@ -240,16 +246,17 @@ end;
function TArticulosController.BuscarTodos(ACliente: Integer): IBizArticulo;
begin
Result := FDataModule.GetItems(ACliente);
Result := FDataModule.GetItems(txArticulo); //ACliente);
FiltrarEmpresa(Result);
end;
function TArticulosController.BuscarTodos(ACliente: IBizCliente): IBizArticulo;
begin
if not Assigned(ACliente) then
raise Exception.Create('Falta ACliente: BuscarTodos');
//En tecsitel se desactiva el sacar una lista de articulos personalizada por cliente
// if not Assigned(ACliente) then
// raise Exception.Create('Falta ACliente: BuscarTodos');
Result := BuscarTodos(ACliente.ID);
Result := BuscarTodos; //(ACliente.ID);
end;
function TArticulosController.BuscarTodos(AProveedor: IBizProveedor): IBizArticulo;
@ -260,13 +267,13 @@ begin
begin
ShowHourglassCursor;
try
Result := BuscarTodos;
Result := BuscarTodosPorProveedor;
// Filtrar los articulos del proveedor
with Result.DataTable.DynamicWhere do
begin
// (ID_PROVEEDOR = ID)
Condicion := NewBinaryExpression(NewField('', fld_ArticulosID_PROVEEDOR), NewConstant(AProveedor.ID, datInteger), dboEqual);
Condicion := NewBinaryExpression(NewField('', fld_ArticulosParaCompraID_PROVEEDOR), NewConstant(AProveedor.ID, datInteger), dboEqual);
if IsEmpty then
Expression := Condicion
@ -279,9 +286,15 @@ begin
end;
end;
function TArticulosController.BuscarTodosPorProveedor: IBizArticulo;
begin
Result := FDataModule.GetItems(txProveedor);
FiltrarEmpresa(Result);
end;
function TArticulosController.BuscarTodos: IBizArticulo;
begin
Result := FDataModule.GetItems;
Result := FDataModule.GetItems(txArticulo);
FiltrarEmpresa(Result);
end;
@ -289,6 +302,7 @@ procedure TArticulosController.CalcularPrecioNeto(AArticulos: IBizArticulo);
var
lPrecioNeto: Double;
begin
{
if Assigned(AArticulos) then
begin
with AArticulos do
@ -312,6 +326,7 @@ begin
end;
end;
end;
}
end;
constructor TArticulosController.Create;
@ -444,6 +459,7 @@ procedure TArticulosController.VerProveedor(AArticulo: IBizArticulo);
var
AProveedor : IBizContacto;
begin
{
AProveedor := FProveedoresController.Buscar(AArticulo.ID_PROVEEDOR);
FProveedoresController.Ver(AProveedor);
if Assigned(AProveedor) then
@ -454,23 +470,21 @@ begin
AArticulo.NOMBRE_PROVEEDOR := AProveedor.NOMBRE;
end;
AProveedor := Nil;
}
end;
procedure TArticulosController.VerTodos(AArticulos: IBizArticulo);
procedure TArticulosController.VerTodos;
var
AEditor : IEditorArticulos;
begin
AEditor := NIL;
ShowHourglassCursor;
try
RecuperarObjetos(AArticulos);
CreateEditor('EditorArticulos', IEditorArticulos, AEditor);
if Assigned(AEditor) then
with (AEditor as IEditorArticulos) do
begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Articulos := AArticulos;
ShowEmbedded;
end;
finally
@ -493,6 +507,7 @@ begin
if not Assigned(AArticulo) then
raise Exception.Create(Format('No se ha encontrado el artículo con ID = %d', [ID]));
AArticulo.DataTable.Active := True;
Result := Eliminar(AArticulo);
AArticulo := NIL;
end;
@ -527,6 +542,7 @@ var
AProveedor : IBizContacto;
begin
inherited;
{
AProveedor := (FProveedoresController.ElegirContacto(FProveedoresController.BuscarTodos, '', False) as IBizProveedor);
if Assigned(AProveedor) then
begin
@ -536,6 +552,7 @@ begin
AArticulo.NOMBRE_PROVEEDOR := AProveedor.NOMBRE;
end;
AProveedor := Nil;
}
end;
function TArticulosController.Eliminar(AArticulo: IBizArticulo): Boolean;
@ -630,10 +647,22 @@ begin
begin
ShowHourglassCursor;
try
//Para que no salten los eventos de calculo de PVP que daría un pete importante
AArticulo.DataTable.DisableControls;
AArticulo.Proveedores.DataTable.DisableControls;
AArticulo.DataTable.DisableEventHandlers;
AArticulo.Proveedores.DataTable.DisableEventHandlers;
AArticulo.DataTable.ApplyUpdates;
Result := True;
finally
//Para que no salten los eventos de calculo de PVP que daría un pete importante
AArticulo.DataTable.EnableControls;
AArticulo.DataTable.EnableEventHandlers;
AArticulo.Proveedores.Datatable.EnableControls;
AArticulo.Proveedores.Datatable.EnableEventHandlers;
HideHourglassCursor;
end;
end;

View File

@ -47,9 +47,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">True</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">Articulos_data.dpk</Source></Source><Excluded_Packages>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">Articulos_data.dpk</Source></Source><Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages></Delphi.Personality></BorlandProject></BorlandProject>
@ -59,7 +57,7 @@
<DelphiCompile Include="Articulos_data.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\..\Articulos_model.dcp" />
<DCCReference Include="..\Articulos_model.dcp" />
<DCCReference Include="uDataModuleArticulos.pas">
<Form>DataModuleArticulos</Form>
</DCCReference>

View File

@ -1,7 +1,7 @@
inherited DataModuleArticulos: TDataModuleArticulos
OnCreate = DAClientDataModuleCreate
Height = 289
Width = 518
Height = 468
Width = 619
object RORemoteService: TRORemoteService
Message = dmConexion.ROMessage
Channel = dmConexion.ROChannel
@ -124,6 +124,8 @@ inherited DataModuleArticulos: TDataModuleArticulos
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DisplayLabel = 'Precio neto'
DictionaryEntry = 'Articulos_PRECIO_NETO'
end
@ -133,18 +135,6 @@ inherited DataModuleArticulos: TDataModuleArticulos
DisplayLabel = 'Inventariable'
DictionaryEntry = 'Articulos_INVENTARIABLE'
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
DictionaryEntry = 'Articulos_ID_PROVEEDOR'
end
item
Name = 'NOMBRE_PROVEEDOR'
DataType = datString
Size = 255
DisplayLabel = 'Nombre'
DictionaryEntry = 'Articulos_NOMBRE_PROVEEDOR'
end
item
Name = 'ELIMINADO'
DataType = datSmallInt
@ -168,21 +158,18 @@ inherited DataModuleArticulos: TDataModuleArticulos
item
Name = 'PARAM_MARGEN'
DataType = datFloat
DisplayLabel = 'Margen'
DictionaryEntry = 'Articulos_PARAM_MARGEN'
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
DisplayLabel = 'Precio PVP (Solo suministro)'
Alignment = taRightJustify
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA'
end
item
Name = 'TIEMPO'
DataType = datInteger
DisplayLabel = 'Tiempo'
DictionaryEntry = 'Articulos_TIEMPO'
end
item
Name = 'PARAM_TIEMPO'
@ -203,6 +190,7 @@ inherited DataModuleArticulos: TDataModuleArticulos
DataType = datCurrency
DisplayLabel = 'Precio P.V.P (Total)'
Alignment = taRightJustify
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_TOTAL'
end>
Params = <>
@ -212,8 +200,8 @@ inherited DataModuleArticulos: TDataModuleArticulos
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Articulos'
IndexDefs = <>
Left = 224
Top = 120
Left = 232
Top = 96
end
object ds_Articulos: TDADataSource
DataSet = tbl_Articulos.Dataset
@ -221,7 +209,124 @@ inherited DataModuleArticulos: TDataModuleArticulos
Left = 232
Top = 32
end
object tbl_ArticulosParaCliente: TDAMemDataTable
object tbl_ProveedoresConArticulos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end>
Params = <
item
Name = 'ID_EMPRESA'
Value = ''
ParamType = daptInput
end>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Articulos
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'ProveedoresConArticulos'
IndexDefs = <>
Left = 232
Top = 248
end
object ds_ProveedoresConArticulos: TDADataSource
DataSet = tbl_ProveedoresConArticulos.Dataset
DataTable = tbl_ProveedoresConArticulos
Left = 232
Top = 192
end
object tbl_Articulos_Proveedores: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_ARTICULOS_PROVEEDORES_ID'
Required = True
InPrimaryKey = True
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
end
item
Name = 'REFERENCIA_PROV'
DataType = datString
Size = 255
DisplayLabel = 'Ref. proveedor'
DictionaryEntry = 'Articulos_REFERENCIA_PROVEEDOR'
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
DisplayLabel = 'Importe'
DictionaryEntry = 'Articulos_PRECIO_COSTE'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DisplayLabel = 'Descuento'
DictionaryEntry = 'Articulos_DESCUENTO'
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DisplayLabel = 'Precio neto'
DictionaryEntry = 'Articulos_PRECIO_NETO'
end
item
Name = 'PRECIO_PORTE'
DataType = datCurrency
DisplayLabel = 'Precio porte'
DictionaryEntry = 'Articulos_PRECIO_PORTE'
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
DisplayLabel = 'Precio PVP (Solo suministro)'
Alignment = taRightJustify
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA'
end
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
ServerAutoRefresh = True
end>
Params = <>
MasterMappingMode = mmWhere
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Articulos
MasterSource = ds_Articulos
MasterFields = 'ID'
DetailFields = 'ID_ARTICULO'
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Articulos_Proveedores'
IndexDefs = <>
Left = 368
Top = 88
end
object ds_Articulos_Proveedores: TDADataSource
DataSet = tbl_Articulos_Proveedores.Dataset
DataTable = tbl_Articulos_Proveedores
Left = 368
Top = 32
end
object tbl_ArticulosParaCompra: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
@ -322,6 +427,8 @@ inherited DataModuleArticulos: TDataModuleArticulos
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DisplayLabel = 'Precio neto'
DictionaryEntry = 'Articulos_PRECIO_NETO'
end
@ -334,14 +441,11 @@ inherited DataModuleArticulos: TDataModuleArticulos
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
DictionaryEntry = 'Articulos_ID_PROVEEDOR'
end
item
Name = 'NOMBRE_PROVEEDOR'
DataType = datString
Size = 255
DisplayLabel = 'Nombre'
DictionaryEntry = 'Articulos_NOMBRE_PROVEEDOR'
end
item
Name = 'ELIMINADO'
@ -370,8 +474,10 @@ inherited DataModuleArticulos: TDataModuleArticulos
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
DisplayLabel = 'Precio P.V.P (Solo suministro)'
DisplayLabel = 'Precio PVP (Solo suministro)'
Alignment = taRightJustify
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA'
end
item
Name = 'TIEMPO'
@ -380,71 +486,43 @@ inherited DataModuleArticulos: TDataModuleArticulos
item
Name = 'PARAM_TIEMPO'
DataType = datFloat
DisplayLabel = 'Precio min'
Alignment = taRightJustify
DictionaryEntry = 'Articulos_PARAM_TIEMPO'
end
item
Name = 'MANO_OBRA'
DataType = datCurrency
DisplayLabel = 'Mano de obra'
Alignment = taRightJustify
DictionaryEntry = 'Articulos_MANO_OBRA'
end
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
DisplayLabel = 'Precio P.V.P. (Total)'
DisplayLabel = 'Precio P.V.P (Total)'
Alignment = taRightJustify
end>
Params = <
item
Name = 'ID_CLIENTE'
Value = '2'
ParamType = daptInput
end>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Articulos
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'ArticulosParaCliente'
IndexDefs = <>
Left = 400
Top = 112
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_TOTAL'
end
object ds_ArticulosParaCliente: TDADataSource
DataSet = tbl_ArticulosParaCliente.Dataset
DataTable = tbl_ArticulosParaCliente
Left = 400
Top = 32
end
object tbl_ProveedoresConArticulos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID_PROVEEDOR'
Name = 'ID_ARTICULO'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end>
Params = <
item
Name = 'ID_EMPRESA'
Value = ''
ParamType = daptInput
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Articulos
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'ProveedoresConArticulos'
LogicalName = 'ArticulosParaCompra'
IndexDefs = <>
Left = 304
Top = 208
Left = 416
Top = 240
end
object ds_ProveedoresConArticulos: TDADataSource
DataSet = tbl_ProveedoresConArticulos.Dataset
DataTable = tbl_ProveedoresConArticulos
Left = 304
Top = 152
object ds_ArticulosParaCompra: TDADataSource
DataSet = tbl_ArticulosParaCompra.Dataset
DataTable = tbl_ArticulosParaCompra
Left = 416
Top = 192
end
end

View File

@ -8,7 +8,8 @@ uses
uRORemoteService, uROClient, uROBinMessage,
uDADesigntimeCall,
uIDataModuleArticulos, uBizArticulos, uDataModuleBase, uDARemoteDataAdapter,
uDADataStreamer, uDABin2DataStreamer, uDAInterfaces, uDAMemDataTable;
uDADataStreamer, uDABin2DataStreamer, uDAInterfaces, uDAMemDataTable,
uBizArticulosProveedores;
type
TDataModuleArticulos = class(TDataModuleBase, IDataModuleArticulos)
@ -17,19 +18,22 @@ type
rda_Articulos: TDARemoteDataAdapter;
tbl_Articulos: TDAMemDataTable;
ds_Articulos: TDADataSource;
tbl_ArticulosParaCliente: TDAMemDataTable;
ds_ArticulosParaCliente: TDADataSource;
tbl_ProveedoresConArticulos: TDAMemDataTable;
ds_ProveedoresConArticulos: TDADataSource;
tbl_Articulos_Proveedores: TDAMemDataTable;
ds_Articulos_Proveedores: TDADataSource;
tbl_ArticulosParaCompra: TDAMemDataTable;
ds_ArticulosParaCompra: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject);
private
function _GetProveedores : IBizArticulosProveedores;
protected
procedure AsignarClaseNegocio(AArticulo: TDADataTable); virtual;
public
function GetItems : IBizArticulo; overload;
function GetItems (IDCliente: Integer) : IBizArticulo; overload;
function GetItem(const ID : Integer; AClienteID: Integer = -1) : IBizArticulo;
function GetItems (const Tipo: TEnumArticulos) : IBizArticulo;
function GetItem(const ID : Integer) : IBizArticulo;
function NewItem : IBizArticulo;
function DarListaProveedoresConArticulos(const IDEmpresa: Integer) : TStringList;
end;
@ -66,16 +70,32 @@ begin
Result := GetItem(ID_NULO)
end;
function TDataModuleArticulos.GetItem(const ID: Integer; AClienteID: Integer = -1): IBizArticulo;
function TDataModuleArticulos._GetProveedores: IBizArticulosProveedores;
var
AProveedores : TDAMemDataTable;
begin
ShowHourglassCursor;
try
AProveedores := CloneDataTable(tbl_Articulos_Proveedores);
with AProveedores do
begin
BusinessRulesID := BIZ_CLIENT_ARTICULOS_PROVEEDORES;
DetailOptions := DetailOptions - [dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates];
end;
Result := (AProveedores as IBizArticulosProveedores);
finally
HideHourglassCursor;
end;
end;
function TDataModuleArticulos.GetItem(const ID: Integer): IBizArticulo;
var
Condicion: TDAWhereExpression;
begin
ShowHourglassCursor;
try
if (AClienteID = -1) then
Result := Self.GetItems
else
Result := Self.GetItems(AClienteID);
Result := Self.GetItems(txArticulo);
with Result.DataTable.DynamicWhere do
begin
@ -93,36 +113,23 @@ begin
end;
end;
function TDataModuleArticulos.GetItems(IDCliente: Integer): IBizArticulo;
var
AArticulo : TDAMemDataTable;
begin
ShowHourglassCursor;
try
AArticulo := CloneDataTable(tbl_ArticulosParaCliente);
AsignarClaseNegocio(AArticulo);
AArticulo.ParamByName('ID_CLIENTE').AsInteger := IdCliente;
Result := (AArticulo as IBizArticulo);
finally
HideHourglassCursor;
end;
end;
function TDataModuleArticulos.GetItems: IBizArticulo;
function TDataModuleArticulos.GetItems(const Tipo: TEnumArticulos): IBizArticulo;
var
AArticulo : TDAMemDataTable;
begin
ShowHourglassCursor;
try
AArticulo := CloneDataTable(tbl_Articulos);
case Tipo of
txArticulo: AArticulo := CloneDataTable(tbl_Articulos);
txProveedor: AArticulo := CloneDataTable(tbl_ArticulosParaCompra);
end;
AsignarClaseNegocio(AArticulo);
case Tipo of
txArticulo: TBizArticulo(AArticulo.BusinessEventsObj).Proveedores := _GetProveedores;
end;
Result := (AArticulo as IBizArticulo);
finally
@ -130,5 +137,4 @@ begin
end;
end;
end.

View File

@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{e4f81792-84cf-4900-a6ab-18f6dd2c7ada}</ProjectGuid>
<MainSource>Articulos_model.dpk</MainSource>
@ -54,12 +55,21 @@
<DelphiCompile Include="Articulos_model.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Pedidos a proveedor\Controller\ApplicationBase.dcp" />
<DCCReference Include="..\..\Pedidos a proveedor\Controller\Base.dcp" />
<DCCReference Include="adortl.dcp" />
<DCCReference Include="ApplicationBase.dcp" />
<DCCReference Include="Base.dcp" />
<DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="Data\uIDataModuleArticulos.pas" />
<DCCReference Include="dbrtl.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="schArticulosClient_Intf.pas" />
<DCCReference Include="schArticulosServer_Intf.pas" />
<DCCReference Include="uBizArticulos.pas" />
<DCCReference Include="uBizArticulosProveedores.pas" />
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vcldb.dcp" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line

View File

@ -6,11 +6,12 @@ uses
uBizArticulos, Classes;
type
TEnumArticulos = (txArticulo, txProveedor);
IDataModuleArticulos = interface
['{9047C468-78DE-404E-9047-1125B382FE3B}']
function GetItems: IBizArticulo; overload;
function GetItems (IDCliente: Integer) : IBizArticulo; overload;
function GetItem(const ID : Integer; AClienteID: Integer = -1) : IBizArticulo;
function GetItems (const Tipo: TEnumArticulos) : IBizArticulo;
function GetItem(const ID : Integer) : IBizArticulo;
function NewItem : IBizArticulo;
function DarListaProveedoresConArticulos(const IDEmpresa: Integer) : TStringList;
end;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,11 @@ unit uBizArticulos;
interface
uses
uDAInterfaces, uDADataTable, schArticulosClient_Intf, uDBSelectionListUtils;
uDAInterfaces, uDADataTable, schArticulosClient_Intf, uDBSelectionListUtils,
uBizArticulosProveedores;
const
BIZ_CLIENT_ARTICULO = 'Client.Articulo';
CTE_PARAM_TIEMPO = 0.5;
type
IBizArticulo = interface(IArticulos)
@ -17,13 +17,21 @@ type
procedure SalvarImagen(const AFileName: String);
procedure CargarImagen(const AFileName: String);
procedure QuitarImagen;
function GetProveedores: IBizArticulosProveedores;
procedure SetProveedores(Value: IBizArticulosProveedores);
property Proveedores: IBizArticulosProveedores read GetProveedores write SetProveedores;
end;
TBizArticulo = class(TArticulosDataTableRules, IBizArticulo, ISeleccionable)
protected
FProveedores : IBizArticulosProveedores;
FProveedoresLink : TDADataSource;
FSeleccionableInterface : ISeleccionable;
procedure OnNewRecord(Sender: TDADataTable); override;
procedure PARAMETROSPRECIOOnChange(Sender: TDACustomField);
function GetProveedores: IBizArticulosProveedores;
procedure SetProveedores(Value: IBizArticulosProveedores);
public
procedure IniciarValoresArticuloNuevo; virtual;
@ -36,6 +44,7 @@ type
destructor Destroy; override;
property SeleccionableInterface : ISeleccionable read FSeleccionableInterface
write FSeleccionableInterface implements ISeleccionable;
property Proveedores: IBizArticulosProveedores read GetProveedores write SetProveedores;
end;
implementation
@ -61,16 +70,20 @@ begin
begin
FieldByName(fld_ArticulosTIEMPO).OnChange := PARAMETROSPRECIOOnChange;
FieldByName(fld_ArticulosPARAM_TIEMPO).OnChange := PARAMETROSPRECIOOnChange;
FieldByName(fld_ArticulosPRECIO_NETO).OnChange := PARAMETROSPRECIOOnChange;
FieldByName(fld_ArticulosPRECIO_PORTE).OnChange := PARAMETROSPRECIOOnChange;
FieldByName(fld_ArticulosPARAM_MARGEN).OnChange := PARAMETROSPRECIOOnChange;
end;
FProveedoresLink := TDADataSource.Create(NIL);
FProveedoresLink.DataTable := aDataTable;
FSeleccionableInterface := TSeleccionable.Create(aDataTable);
end;
destructor TBizArticulo.Destroy;
begin
FProveedores := NIL;
FProveedoresLink.Free;
FSeleccionableInterface := NIL;
inherited;
end;
@ -80,6 +93,11 @@ begin
Result := (ID < 0);
end;
function TBizArticulo.GetProveedores: IBizArticulosProveedores;
begin
Result := FProveedores;
end;
function TBizArticulo.HayImagen: Boolean;
{var
AStream : TMemoryStream;
@ -99,22 +117,17 @@ end;
procedure TBizArticulo.IniciarValoresArticuloNuevo;
begin
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
PRECIO_PORTE := 0;
PRECIO_COSTE := 0;
DESCUENTO := 0;
PRECIO_NETO := 0;
USUARIO := AppFactuGES.UsuarioActivo.UserName;
PARAM_TIEMPO := AppFactuGES.EmpresaActiva.PARAM_TIEMPO;
PARAM_MARGEN := AppFactuGES.EmpresaActiva.PARAM_MARGEN;
INVENTARIABLE := 1;
COMISIONABLE := 1;
ELIMINADO := 0;
USUARIO := AppFactuGES.UsuarioActivo.UserName;
end;
procedure TBizArticulo.OnNewRecord(Sender: TDADataTable);
begin
inherited;
// ID := GetRecNo; // -1, -2, -3...
INVENTARIABLE := 1;
PARAM_TIEMPO := AppFactuGES.EmpresaActiva.PARAM_TIEMPO;
PARAM_MARGEN := AppFactuGES.EmpresaActiva.PARAM_MARGEN;
IniciarValoresArticuloNuevo;
end;
@ -123,13 +136,12 @@ begin
if not Self.DataTable.Editing then
Edit;
//OJO SI ALGUNA VEZ ESTO CAMBIA TAMBIEN HAY QUE CAMBIAR EL PROCEDIMIENTO ALMACENADO PRO_ART_RECALCULAR_PVP
PRECIO_PVP_VENTA := (PRECIO_NETO + PRECIO_PORTE) * ((PARAM_MARGEN / 100) + 1);
MANO_OBRA := TIEMPO * PARAM_TIEMPO;
PRECIO_PVP_TOTAL := PRECIO_PVP_VENTA + MANO_OBRA;
if Assigned(Self.Proveedores) then
begin
Self.Proveedores.RecalcularImportes;
end;
end;
procedure TBizArticulo.QuitarImagen;
@ -144,6 +156,12 @@ begin
// DataTable.FieldByName(fld_ArticulosIMAGEN).SaveToFile(AFileName);
end;
procedure TBizArticulo.SetProveedores(Value: IBizArticulosProveedores);
begin
FProveedores := Value;
EnlazarMaestroDetalle(FProveedoresLink, FProveedores);
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_ARTICULO, TBizArticulo);

View File

@ -0,0 +1,126 @@
unit uBizArticulosProveedores;
interface
uses
uDAInterfaces, uDADataTable,
schArticulosClient_Intf;
const
BIZ_CLIENT_ARTICULOS_PROVEEDORES = 'Client.ArticulosProveedores';
type
IBizArticulosProveedores = interface(IArticulos_Proveedores)
['{C5F703CB-5400-435C-81E5-9E716104D1C7}']
function EsNuevo : Boolean;
procedure RecalcularImportes;
end;
TBizArticulosProveedores = class(TArticulos_ProveedoresDataTableRules, IBizArticulosProveedores)
private
procedure RecalcularImporte;
protected
procedure BeforeInsert(Sender: TDADataTable); override;
procedure OnNewRecord(Sender: TDADataTable); override;
procedure PARAMETROSPRECIOOnChange(Sender: TDACustomField);
public
procedure RecalcularImportes;
function EsNuevo : Boolean;
constructor Create(aDataTable: TDADataTable); override;
end;
implementation
uses
Dialogs,uDataTableUtils, DB;
{ TBizArticulosProveedores }
procedure TBizArticulosProveedores.BeforeInsert(Sender: TDADataTable);
var
AMasterTable : TDADataTable;
begin
inherited;
AMasterTable := DataTable.GetMasterDataTable;
if Assigned(AMasterTable) and (AMasterTable.State in dsEditModes) then
AMasterTable.Post;
end;
constructor TBizArticulosProveedores.Create(aDataTable: TDADataTable);
begin
inherited;
with aDataTable do
begin
FieldByName(fld_Articulos_ProveedoresPRECIO_COSTE).OnChange := PARAMETROSPRECIOOnChange;
FieldByName(fld_Articulos_ProveedoresDESCUENTO).OnChange := PARAMETROSPRECIOOnChange;
FieldByName(fld_Articulos_ProveedoresPRECIO_PORTE).OnChange := PARAMETROSPRECIOOnChange;
end;
end;
function TBizArticulosProveedores.EsNuevo: Boolean;
begin
Result := (ID < 0);
end;
procedure TBizArticulosProveedores.OnNewRecord(Sender: TDADataTable);
begin
inherited;
PRECIO_PORTE := 0;
PRECIO_COSTE := 0;
DESCUENTO := 0;
PRECIO_NETO := 0;
end;
procedure TBizArticulosProveedores.PARAMETROSPRECIOOnChange(Sender: TDACustomField);
begin
RecalcularImporte;
end;
procedure TBizArticulosProveedores.RecalcularImporte;
begin
with Self.DataTable do
begin
if not Editing then
Edit;
//OJO SI ALGUNA VEZ ESTO CAMBIA TAMBIEN HAY QUE CAMBIAR EL PROCEDIMIENTO ALMACENADO PRO_ART_RECALCULAR_PVP
Self.PRECIO_NETO := Self.PRECIO_COSTE - (Self.PRECIO_COSTE * (Self.DESCUENTO / 100));
Self.PRECIO_PVP_VENTA := (Self.PRECIO_NETO + Self.PRECIO_PORTE) * ((MasterSource.DataTable.FieldByName(fld_ArticulosPARAM_MARGEN).AsFloat / 100) + 1);
Self.PRECIO_PVP_TOTAL := Self.PRECIO_PVP_VENTA + MasterSource.DataTable.FieldByName(fld_ArticulosMANO_OBRA).AsFloat;
end;
end;
procedure TBizArticulosProveedores.RecalcularImportes;
var
AIdAux: Integer;
begin
AIdAux := Self.ID;
with Self.DataTable do
begin
DisableControls;
try
First;
while not EOF do
begin
RecalcularImporte;
Post;
Next;
end;
First;
Locate(fld_Articulos_ProveedoresID, AIdAux, []);
finally
EnableControls;
end;
end;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_ARTICULOS_PROVEEDORES, TBizArticulosProveedores);
end.

View File

@ -45,12 +45,10 @@ exports
procedure TPluginArticulos.actArticulosExecute(Sender: TObject);
var
AArticulosController : IArticulosController;
AArticulos : IBizArticulo;
begin
AArticulosController := TArticulosController.Create;
AArticulos := (AArticulosController.BuscarTodos as IBizArticulo);
AArticulosController.VerTodos(AArticulos);
AArticulosController.VerTodos;
end;
constructor TPluginArticulos.Create(AOwner: TComponent);

View File

@ -10,7 +10,7 @@ object srvArticulos: TsrvArticulos
ExportedDataTables = <>
BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
Height = 229
Width = 349
Width = 517
object DataDictionary: TDADataDictionary
Fields = <
item
@ -94,6 +94,8 @@ object srvArticulos: TsrvArticulos
item
Name = 'Articulos_PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DisplayLabel = 'Precio neto'
end
item
@ -147,6 +149,7 @@ object srvArticulos: TsrvArticulos
DataType = datCurrency
DisplayLabel = 'Precio PVP (Solo suministro)'
Alignment = taRightJustify
ServerAutoRefresh = True
end
item
Name = 'Articulos_TIEMPO'
@ -170,6 +173,7 @@ object srvArticulos: TsrvArticulos
DataType = datCurrency
DisplayLabel = 'Precio P.V.P (Total)'
Alignment = taRightJustify
ServerAutoRefresh = True
end>
Left = 150
Top = 22
@ -190,12 +194,12 @@ object srvArticulos: TsrvArticulos
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
TargetTable = 'V_ARTICULOS'
TargetTable = 'V_ARTICULOS_PARA_COMPRA'
Name = 'IBX'
SQL =
'select distinct ID_PROVEEDOR, NOMBRE'#10'from V_articulos'#10'inner join' +
' contactos on (contactos.ID = V_articulos.ID_PROVEEDOR)'#10'where ID' +
'_EMPRESA = :ID_EMPRESA'#10
'select distinct ID_PROVEEDOR, NOMBRE'#10'from V_articulos_PARA_COMPR' +
'A'#10'inner join contactos on (contactos.ID = V_articulos_PARA_COMPR' +
'A.ID_PROVEEDOR)'#10'where ID_EMPRESA = :ID_EMPRESA'#10
StatementType = stSQL
ColumnMappings = <
item
@ -204,7 +208,8 @@ object srvArticulos: TsrvArticulos
end
item
DatasetField = 'NOMBRE'
TableField = 'NOMBRE'
TableField = '<unknown>'
SQLOrigin = 'NOMBRE'
end>
end>
Name = 'ProveedoresConArticulos'
@ -265,10 +270,6 @@ object srvArticulos: TsrvArticulos
DatasetField = 'PRECIO_PVP_VENTA'
TableField = 'PRECIO_PVP_VENTA'
end
item
DatasetField = 'MANO_OBRA'
TableField = 'MANO_OBRA'
end
item
DatasetField = 'PRECIO_PVP_TOTAL'
TableField = 'PRECIO_PVP_TOTAL'
@ -278,7 +279,8 @@ object srvArticulos: TsrvArticulos
Fields = <
item
Name = 'ID'
DataType = datInteger
DataType = datAutoInc
GeneratorName = 'GEN_ARTICULOS_PROVEEDORES_ID'
Required = True
InPrimaryKey = True
end
@ -294,34 +296,40 @@ object srvArticulos: TsrvArticulos
Name = 'REFERENCIA_PROV'
DataType = datString
Size = 255
DictionaryEntry = 'Articulos_REFERENCIA_PROVEEDOR'
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
DictionaryEntry = 'Articulos_PRECIO_COSTE'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'Articulos_DESCUENTO'
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DictionaryEntry = 'Articulos_PRECIO_NETO'
end
item
Name = 'PRECIO_PORTE'
DataType = datCurrency
DictionaryEntry = 'Articulos_PRECIO_PORTE'
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
end
item
Name = 'MANO_OBRA'
DataType = datCurrency
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA'
end
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
ServerAutoRefresh = True
end>
end
item
@ -329,7 +337,7 @@ object srvArticulos: TsrvArticulos
Statements = <
item
Connection = 'IBX'
TargetTable = 'V_ARTICULOS_PARA_COMPRA'
TargetTable = 'V_ARTICULOS_PARA_VENTA'
StatementType = stAutoSQL
ColumnMappings = <
item
@ -400,14 +408,6 @@ object srvArticulos: TsrvArticulos
DatasetField = 'INVENTARIABLE'
TableField = 'INVENTARIABLE'
end
item
DatasetField = 'ID_PROVEEDOR'
TableField = 'ID_PROVEEDOR'
end
item
DatasetField = 'NOMBRE_PROVEEDOR'
TableField = 'NOMBRE_PROVEEDOR'
end
item
DatasetField = 'ELIMINADO'
TableField = 'ELIMINADO'
@ -534,6 +534,8 @@ object srvArticulos: TsrvArticulos
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DictionaryEntry = 'Articulos_PRECIO_NETO'
end
item
@ -541,17 +543,6 @@ object srvArticulos: TsrvArticulos
DataType = datSmallInt
DictionaryEntry = 'Articulos_INVENTARIABLE'
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
DictionaryEntry = 'Articulos_ID_PROVEEDOR'
end
item
Name = 'NOMBRE_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'Articulos_NOMBRE_PROVEEDOR'
end
item
Name = 'ELIMINADO'
DataType = datSmallInt
@ -572,17 +563,16 @@ object srvArticulos: TsrvArticulos
item
Name = 'PARAM_MARGEN'
DataType = datFloat
DictionaryEntry = 'Articulos_PARAM_MARGEN'
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA'
end
item
Name = 'TIEMPO'
DataType = datInteger
DictionaryEntry = 'Articulos_TIEMPO'
end
item
Name = 'PARAM_TIEMPO'
@ -597,6 +587,7 @@ object srvArticulos: TsrvArticulos
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_TOTAL'
end>
end
@ -605,20 +596,8 @@ object srvArticulos: TsrvArticulos
Statements = <
item
Connection = 'IBX'
TargetTable = 'V_ARTICULOS_PARA_VENTA'
SQL =
#10#10'SELECT'#10' V_ARTICULOS_PARA_VENTA.ID, V_ARTICULOS_PARA_VENTA.I' +
'D_EMPRESA,'#10' V_ARTICULOS_PARA_VENTA.REFERENCIA, V_ARTICULOS_PA' +
'RA_VENTA.DESCRIPCION,'#10' V_ARTICULOS_PARA_VENTA.UNIDAD_MEDIDA, ' +
'V_ARTICULOS_PARA_VENTA.FAMILIA,'#10' V_ARTICULOS_PARA_VENTA.IMAGE' +
'N, V_ARTICULOS_PARA_VENTA.COMISIONABLE,'#10' V_ARTICULOS_PARA_VEN' +
'TA.FECHA_ALTA, V_ARTICULOS_PARA_VENTA.FECHA_MODIFICACION,'#10' V_' +
'ARTICULOS_PARA_VENTA.USUARIO, V_ARTICULOS_PARA_VENTA.INVENTARIAB' +
'LE,'#10' V_ARTICULOS_PARA_VENTA.ELIMINADO, V_ARTICULOS_PARA_VENTA' +
'.FABRICANTE,'#10' V_ARTICULOS_PARA_VENTA.REFERENCIA_FABR, V_ARTIC' +
'ULOS_PARA_VENTA.PRECIO_PVP_VENTA,'#10' V_ARTICULOS_PARA_VENTA.PRE' +
'CIO_PVP_TOTAL'#10' FROM'#10' V_ARTICULOS_PARA_VENTA'#10' WHERE {Where}'#10
StatementType = stSQL
TargetTable = 'V_ARTICULOS_PARA_COMPRA'
StatementType = stAutoSQL
ColumnMappings = <
item
DatasetField = 'ID'
@ -664,10 +643,38 @@ object srvArticulos: TsrvArticulos
DatasetField = 'USUARIO'
TableField = 'USUARIO'
end
item
DatasetField = 'REFERENCIA_PROV'
TableField = 'REFERENCIA_PROV'
end
item
DatasetField = 'PRECIO_COSTE'
TableField = 'PRECIO_COSTE'
end
item
DatasetField = 'PRECIO_PORTE'
TableField = 'PRECIO_PORTE'
end
item
DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'PRECIO_NETO'
TableField = 'PRECIO_NETO'
end
item
DatasetField = 'INVENTARIABLE'
TableField = 'INVENTARIABLE'
end
item
DatasetField = 'ID_PROVEEDOR'
TableField = 'ID_PROVEEDOR'
end
item
DatasetField = 'NOMBRE_PROVEEDOR'
TableField = 'NOMBRE_PROVEEDOR'
end
item
DatasetField = 'ELIMINADO'
TableField = 'ELIMINADO'
@ -680,16 +687,36 @@ object srvArticulos: TsrvArticulos
DatasetField = 'REFERENCIA_FABR'
TableField = 'REFERENCIA_FABR'
end
item
DatasetField = 'PARAM_MARGEN'
TableField = 'PARAM_MARGEN'
end
item
DatasetField = 'PRECIO_PVP_VENTA'
TableField = 'PRECIO_PVP_VENTA'
end
item
DatasetField = 'TIEMPO'
TableField = 'TIEMPO'
end
item
DatasetField = 'PARAM_TIEMPO'
TableField = 'PARAM_TIEMPO'
end
item
DatasetField = 'MANO_OBRA'
TableField = 'MANO_OBRA'
end
item
DatasetField = 'PRECIO_PVP_TOTAL'
TableField = 'PRECIO_PVP_TOTAL'
end
item
DatasetField = 'ID_ARTICULO'
TableField = 'ID_ARTICULO'
end>
end>
Name = 'ArticulosParaCliente'
Name = 'ArticulosParaCompra'
Description =
#161#161#161#161' Esta tabla debe tener los mismos campos y orden de campos q' +
'ue '#39'Art'#237'culos'#39' !!!!'
@ -757,11 +784,48 @@ object srvArticulos: TsrvArticulos
Size = 20
DictionaryEntry = 'Articulos_USUARIO'
end
item
Name = 'REFERENCIA_PROV'
DataType = datString
Size = 255
DictionaryEntry = 'Articulos_REFERENCIA_PROVEEDOR'
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
DictionaryEntry = 'Articulos_PRECIO_COSTE'
end
item
Name = 'PRECIO_PORTE'
DataType = datCurrency
DictionaryEntry = 'Articulos_PRECIO_PORTE'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'Articulos_DESCUENTO'
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DecimalPrecision = 2
DecimalScale = 2
DictionaryEntry = 'Articulos_PRECIO_NETO'
end
item
Name = 'INVENTARIABLE'
DataType = datSmallInt
DictionaryEntry = 'Articulos_INVENTARIABLE'
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
end
item
Name = 'NOMBRE_PROVEEDOR'
DataType = datString
Size = 255
end
item
Name = 'ELIMINADO'
DataType = datSmallInt
@ -779,17 +843,39 @@ object srvArticulos: TsrvArticulos
Size = 255
DictionaryEntry = 'Articulos_REFERENCIA_FABR'
end
item
Name = 'PARAM_MARGEN'
DataType = datFloat
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
DisplayLabel = 'Precio P.V.P (Solo suministro)'
Alignment = taRightJustify
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA'
end
item
Name = 'TIEMPO'
DataType = datInteger
end
item
Name = 'PARAM_TIEMPO'
DataType = datFloat
DictionaryEntry = 'Articulos_PARAM_TIEMPO'
end
item
Name = 'MANO_OBRA'
DataType = datCurrency
DictionaryEntry = 'Articulos_MANO_OBRA'
end
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
DisplayLabel = 'Precio P.V.P. (Total)'
Alignment = taRightJustify
ServerAutoRefresh = True
DictionaryEntry = 'Articulos_PRECIO_PVP_TOTAL'
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
end>
end>
JoinDataTables = <>
@ -843,30 +929,6 @@ object srvArticulos: TsrvArticulos
Name = 'USUARIO'
Value = ''
end
item
Name = 'PRECIO_COSTE'
Value = ''
end
item
Name = 'PRECIO_PORTE'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'ID_PROVEEDOR'
Value = ''
end
item
Name = 'PRECIO_NETO'
Value = ''
end
item
Name = 'REFERENCIA_PROV'
Value = ''
end
item
Name = 'INVENTARIABLE'
Value = ''
@ -887,10 +949,6 @@ object srvArticulos: TsrvArticulos
Name = 'PARAM_MARGEN'
Value = ''
end
item
Name = 'PRECIO_PVP_VENTA'
Value = ''
end
item
Name = 'TIEMPO'
Value = ''
@ -902,10 +960,6 @@ object srvArticulos: TsrvArticulos
item
Name = 'MANO_OBRA'
Value = ''
end
item
Name = 'PRECIO_PVP_TOTAL'
Value = ''
end>
Statements = <
item
@ -918,11 +972,9 @@ object srvArticulos: TsrvArticulos
', FABRICANTE, REFERENCIA_FABR, PARAM_MARGEN, TIEMPO,'#10' PARAM_' +
'TIEMPO, MANO_OBRA)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :REFERENCIA, ' +
':DESCRIPCION, :UNIDAD_MEDIDA, :FAMILIA,'#10' :IMAGEN, :COMISIONA' +
'BLE, :FECHA_ALTA, :FECHA_MODIFICACION, '#10' :USUARIO, :PRECIO_C' +
'OSTE, :PRECIO_PORTE, :DESCUENTO, '#10' :ID_PROVEEDOR, :PRECIO_NE' +
'TO, :REFERENCIA_PROV,'#10' :INVENTARIABLE, :ELIMINADO, :FABRICAN' +
'TE, :REFERENCIA_FABR, :PARAM_MARGEN,'#10' :PRECIO_PVP_VENTA, :TI' +
'EMPO, :PARAM_TIEMPO, :MANO_OBRA, :PRECIO_PVP_TOTAL)'#10
'BLE, :FECHA_ALTA, :FECHA_MODIFICACION, '#10' :USUARIO, :INVENTAR' +
'IABLE, :ELIMINADO, :FABRICANTE, :REFERENCIA_FABR, :PARAM_MARGEN,' +
#10' :TIEMPO, :PARAM_TIEMPO, :MANO_OBRA)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -988,34 +1040,10 @@ object srvArticulos: TsrvArticulos
Name = 'USUARIO'
Value = ''
end
item
Name = 'PRECIO_COSTE'
Value = ''
end
item
Name = 'PRECIO_PORTE'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'ID_PROVEEDOR'
Value = ''
end
item
Name = 'PRECIO_NETO'
Value = ''
end
item
Name = 'INVENTARIABLE'
Value = ''
end
item
Name = 'REFERENCIA_PROV'
Value = ''
end
item
Name = 'ELIMINADO'
Value = ''
@ -1032,10 +1060,6 @@ object srvArticulos: TsrvArticulos
Name = 'PARAM_MARGEN'
Value = ''
end
item
Name = 'PRECIO_PVP_VENTA'
Value = ''
end
item
Name = 'TIEMPO'
Value = ''
@ -1048,10 +1072,6 @@ object srvArticulos: TsrvArticulos
Name = 'MANO_OBRA'
Value = ''
end
item
Name = 'PRECIO_PVP_TOTAL'
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
@ -1066,16 +1086,11 @@ object srvArticulos: TsrvArticulos
'_MEDIDA = :UNIDAD_MEDIDA,'#10' FAMILIA = :FAMILIA, '#10' IMAGEN = ' +
':IMAGEN, '#10' COMISIONABLE = :COMISIONABLE, '#10' FECHA_ALTA = :F' +
'ECHA_ALTA, '#10' FECHA_MODIFICACION = :FECHA_MODIFICACION, '#10' U' +
'SUARIO = :USUARIO, '#10' PRECIO_COSTE = :PRECIO_COSTE, '#10' PRECI' +
'O_PORTE = :PRECIO_PORTE, '#10' DESCUENTO = :DESCUENTO, '#10' ID_PR' +
'OVEEDOR = :ID_PROVEEDOR, '#10' PRECIO_NETO = :PRECIO_NETO,'#10' IN' +
'VENTARIABLE = :INVENTARIABLE,'#10' REFERENCIA_PROV = :REFERENCIA_' +
'PROV,'#10' ELIMINADO = :ELIMINADO,'#10' FABRICANTE = :FABRICANTE,'#10 +
' REFERENCIA_FABR = :REFERENCIA_FABR,'#10' PARAM_MARGEN = :PARA' +
'M_MARGEN,'#10' PRECIO_PVP_VENTA = :PRECIO_PVP_VENTA,'#10' TIEMPO =' +
' :TIEMPO,'#10' PARAM_TIEMPO = :PARAM_TIEMPO,'#10' MANO_OBRA = :MAN' +
'O_OBRA,'#10' PRECIO_PVP_TOTAL = :PRECIO_PVP_TOTAL'#10' WHERE'#10' (ID' +
' = :OLD_ID)'#10
'SUARIO = :USUARIO, '#10' INVENTARIABLE = :INVENTARIABLE,'#10' ELIM' +
'INADO = :ELIMINADO,'#10' FABRICANTE = :FABRICANTE,'#10' REFERENCIA' +
'_FABR = :REFERENCIA_FABR,'#10' PARAM_MARGEN = :PARAM_MARGEN,'#10' ' +
'TIEMPO = :TIEMPO,'#10' PARAM_TIEMPO = :PARAM_TIEMPO,'#10' MANO_OBR' +
'A = :MANO_OBRA'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -1085,59 +1100,45 @@ object srvArticulos: TsrvArticulos
Params = <
item
Name = 'ID'
DataType = datInteger
Value = '0'
DataType = datAutoInc
GeneratorName = 'GEN_ARTICULOS_PROVEEDORES_ID'
Value = ''
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
Value = '0'
Value = ''
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
Value = '0'
Value = ''
end
item
Name = 'REFERENCIA_PROV'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datFloat
Value = '0'
Value = ''
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'PRECIO_PORTE'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
Value = '0'
end
item
Name = 'MANO_OBRA'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
Value = '0'
Value = ''
end>
Statements = <
item
@ -1148,10 +1149,10 @@ object srvArticulos: TsrvArticulos
SQL =
'INSERT'#10' INTO ARTICULOS_PROVEEDORES'#10' (ID, ID_ARTICULO, ID_PRO' +
'VEEDOR, REFERENCIA_PROV, PRECIO_COSTE, '#10' DESCUENTO, PRECIO_N' +
'ETO, PRECIO_PORTE, PRECIO_PVP_VENTA, '#10' MANO_OBRA, PRECIO_PVP' +
'_TOTAL)'#10' VALUES'#10' (:ID, :ID_ARTICULO, :ID_PROVEEDOR, :REFEREN' +
'CIA_PROV, '#10' :PRECIO_COSTE, :DESCUENTO, :PRECIO_NETO, :PRECIO' +
'_PORTE, '#10' :PRECIO_PVP_VENTA, :MANO_OBRA, :PRECIO_PVP_TOTAL)'
'ETO, PRECIO_PORTE, PRECIO_PVP_VENTA, PRECIO_PVP_TOTAL)'#10' VALUES'#10 +
' (:ID, :ID_ARTICULO, :ID_PROVEEDOR, :REFERENCIA_PROV, '#10' :' +
'PRECIO_COSTE, :DESCUENTO, :PRECIO_NETO, :PRECIO_PORTE, '#10' :PR' +
'ECIO_PVP_VENTA, :PRECIO_PVP_TOTAL)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -1180,66 +1181,45 @@ object srvArticulos: TsrvArticulos
end
item
Params = <
item
Name = 'ID'
DataType = datInteger
Value = '0'
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
Value = '0'
Value = ''
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
Value = '0'
Value = ''
end
item
Name = 'REFERENCIA_PROV'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'PRECIO_COSTE'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datFloat
Value = '0'
Value = ''
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'PRECIO_PORTE'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'PRECIO_PVP_VENTA'
DataType = datCurrency
Value = '0'
end
item
Name = 'MANO_OBRA'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'PRECIO_PVP_TOTAL'
DataType = datCurrency
Value = '0'
Value = ''
end
item
Name = 'OLD_ID'
DataType = datInteger
Value = '0'
Value = ''
end>
Statements = <
item
@ -1248,19 +1228,27 @@ object srvArticulos: TsrvArticulos
Default = True
TargetTable = 'ARTICULOS_PROVEEDORES'
SQL =
'UPDATE ARTICULOS_PROVEEDORES'#10' SET '#10' ID = :ID, '#10' ID_ARTICU' +
'LO = :ID_ARTICULO, '#10' ID_PROVEEDOR = :ID_PROVEEDOR, '#10' REFER' +
'ENCIA_PROV = :REFERENCIA_PROV, '#10' PRECIO_COSTE = :PRECIO_COSTE' +
', '#10' DESCUENTO = :DESCUENTO, '#10' PRECIO_NETO = :PRECIO_NETO, ' +
#10' PRECIO_PORTE = :PRECIO_PORTE, '#10' PRECIO_PVP_VENTA = :PREC' +
'IO_PVP_VENTA, '#10' MANO_OBRA = :MANO_OBRA, '#10' PRECIO_PVP_TOTAL' +
' = :PRECIO_PVP_TOTAL'#10' WHERE'#10' (ID = :OLD_ID)'
'UPDATE ARTICULOS_PROVEEDORES'#10' SET '#10' ID_ARTICULO = :ID_ARTICU' +
'LO,'#10' ID_PROVEEDOR = :ID_PROVEEDOR, '#10' REFERENCIA_PROV = :RE' +
'FERENCIA_PROV, '#10' PRECIO_COSTE = :PRECIO_COSTE, '#10' DESCUENTO' +
' = :DESCUENTO, '#10' PRECIO_NETO = :PRECIO_NETO, '#10' PRECIO_PORT' +
'E = :PRECIO_PORTE, '#10' PRECIO_PVP_VENTA = :PRECIO_PVP_VENTA, '#10' ' +
' PRECIO_PVP_TOTAL = :PRECIO_PVP_TOTAL'#10' WHERE'#10' (ID = :OLD_I' +
'D)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_Articulos_Proveedores'
end>
RelationShips = <>
RelationShips = <
item
Name = 'FK_Articulos_Proveedor1'
MasterDatasetName = 'Articulos'
MasterFields = 'ID'
DetailDatasetName = 'Articulos_Proveedores'
DetailFields = 'ID_ARTICULO'
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Insert Articulos'
@ -1269,6 +1257,20 @@ object srvArticulos: TsrvArticulos
DatasetName = 'Articulos'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert Articulos_Proveedores'
DoUpdate = False
DoDelete = False
DatasetName = 'Articulos_Proveedores'
FailureBehavior = fbRaiseException
end
item
Name = 'Update Articulos_Proveedores'
DoInsert = False
DoDelete = False
DatasetName = 'Articulos_Proveedores'
FailureBehavior = fbRaiseException
end
item
Name = 'Update Articulos'
DoInsert = False
@ -1276,6 +1278,13 @@ object srvArticulos: TsrvArticulos
DatasetName = 'Articulos'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete Articulos_Proveedores'
DoUpdate = False
DoInsert = False
DatasetName = 'Articulos_Proveedores'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete Articulos'
DoUpdate = False
@ -1299,7 +1308,18 @@ object srvArticulos: TsrvArticulos
ReferencedDataset = 'Articulos'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 264
Left = 336
Top = 24
end
object bpArticulos_Proveedores: TDABusinessProcessor
Schema = schArticulos
InsertCommandName = 'Insert_Articulos_Proveedores'
DeleteCommandName = 'Delete_Articulos_Proveedores'
UpdateCommandName = 'Update_Articulos_Proveedores'
ReferencedDataset = 'Articulos_Proveedores'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 336
Top = 96
end
end

View File

@ -23,6 +23,7 @@ type
TsrvArticulos = class(TDataAbstractService, IsrvArticulos)
bpArticulos: TDABusinessProcessor;
Bin2DataStreamer: TDABin2DataStreamer;
bpArticulos_Proveedores: TDABusinessProcessor;
schArticulos: TDASchema;
DataDictionary: TDADataDictionary;
procedure DARemoteServiceBeforeGetDatasetData(const Dataset: IDADataset;
@ -52,7 +53,7 @@ procedure TsrvArticulos.DARemoteServiceBeforeGetDatasetData(
const Dataset: IDADataset; const IncludeSchema: Boolean;
const MaxRecords: Integer);
begin
if DataSet.Name = nme_Articulos then
if (DataSet.Name = nme_Articulos) then
begin
{ Aquí se asegura que el usuario sólo accede a los Articulos
de las empresas a las que tiene permiso para acceder

View File

@ -31,7 +31,76 @@ requires
Familias_controller,
UnidadesMedida_controller,
Contactos_view,
Fabricantes_controller;
Fabricantes_controller,
vcl,
rtl,
dbrtl,
DataAbstract_Core_D11,
vcldb,
dsnap,
adortl,
RemObjects_Core_D11,
PngComponentsD10,
PNG_D10,
vclactnband,
vclx,
cxLibraryD11,
dxThemeD11,
dxGDIPlusD11,
cxEditorsD11,
cxDataD11,
vcljpg,
cxGridD11,
cxPageControlD11,
cxExtEditorsD11,
cxExportD11,
dxSkinscxPCPainterD11,
dxSkinsCoreD11,
dxSkinOffice2007BlackD11,
dxSkinBlackD11,
dxSkinBlueD11,
dxSkinCaramelD11,
dxSkinCoffeeD11,
dxSkinGlassOceansD11,
dxSkiniMaginaryD11,
dxSkinLilianD11,
dxSkinLiquidSkyD11,
dxSkinLondonLiquidSkyD11,
dxSkinMcSkinD11,
dxSkinMoneyTwinsD11,
dxSkinOffice2007BlueD11,
dxSkinOffice2007GreenD11,
dxSkinOffice2007PinkD11,
dxSkinOffice2007SilverD11,
dxSkinSilverD11,
dxSkinStardustD11,
dxSkinValentineD11,
dxSkinXmas2008BlueD11,
tb2k_d10,
tbx_d10,
JvCoreD11R,
Jcl,
JclVcl,
JvAppFrmD11R,
JvCtrlsD11R,
JvSystemD11R,
JvStdCtrlsD11R,
dxPSCoreD11,
dxComnD11,
dxPScxCommonD11,
dxPSLnksD11,
designide,
xmlrtl,
vclshlctrls,
cxIntlPrintSys3D11,
dxPScxGrid6LnkD11,
dclcxLibraryD11,
JvGlobusD11R,
bdertl,
JvPageCompsD11R,
GUISDK_D11,
cfpack_d11,
ccpackD11;
contains
uViewArticulos in 'uViewArticulos.pas' {frViewArticulos: TFrame},
@ -40,6 +109,9 @@ contains
uEditorArticulo in 'uEditorArticulo.pas' {fEditorArticulo: TfEditorArticulo},
uEditorElegirArticulos in 'uEditorElegirArticulos.pas' {fEditorElegirArticulos: TfEditorElegirArticulos},
uViewArticulo in 'uViewArticulo.pas' {frViewArticulo: TFrame},
uViewDetallesArticulos in 'uViewDetallesArticulos.pas' {frViewDetallesArticulos: TFrame};
uViewDetallesArticulos in 'uViewDetallesArticulos.pas' {frViewDetallesArticulos: TFrame},
uViewArticulosProveedores in 'uViewArticulosProveedores.pas' {frViewArticulosProveedores: TFrame},
uViewArticulosPorProveedor in 'uViewArticulosPorProveedor.pas' {frViewArticulosPorProveedor: TFrame},
uViewDetallesArticulosParaVenta in 'uViewDetallesArticulosParaVenta.pas' {frViewDetallesArticulosParaVenta: TCustomView};
end.

View File

@ -55,13 +55,74 @@
<DelphiCompile Include="Articulos_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_view.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Fabricantes_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Familias_controller.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\UnidadesMedida_controller.dcp" />
<DCCReference Include="adortl.dcp" />
<DCCReference Include="Articulos_controller.dcp" />
<DCCReference Include="Articulos_model.dcp" />
<DCCReference Include="bdertl.dcp" />
<DCCReference Include="ccpackD11.dcp" />
<DCCReference Include="cfpack_d11.dcp" />
<DCCReference Include="Contactos_view.dcp" />
<DCCReference Include="cxDataD11.dcp" />
<DCCReference Include="cxEditorsD11.dcp" />
<DCCReference Include="cxExportD11.dcp" />
<DCCReference Include="cxExtEditorsD11.dcp" />
<DCCReference Include="cxGridD11.dcp" />
<DCCReference Include="cxIntlPrintSys3D11.dcp" />
<DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="cxPageControlD11.dcp" />
<DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="dbrtl.dcp" />
<DCCReference Include="dclcxLibraryD11.dcp" />
<DCCReference Include="designide.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="dxPSCoreD11.dcp" />
<DCCReference Include="dxPScxCommonD11.dcp" />
<DCCReference Include="dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="dxPSLnksD11.dcp" />
<DCCReference Include="dxSkinBlackD11.dcp" />
<DCCReference Include="dxSkinBlueD11.dcp" />
<DCCReference Include="dxSkinCaramelD11.dcp" />
<DCCReference Include="dxSkinCoffeeD11.dcp" />
<DCCReference Include="dxSkinGlassOceansD11.dcp" />
<DCCReference Include="dxSkiniMaginaryD11.dcp" />
<DCCReference Include="dxSkinLilianD11.dcp" />
<DCCReference Include="dxSkinLiquidSkyD11.dcp" />
<DCCReference Include="dxSkinLondonLiquidSkyD11.dcp" />
<DCCReference Include="dxSkinMcSkinD11.dcp" />
<DCCReference Include="dxSkinMoneyTwinsD11.dcp" />
<DCCReference Include="dxSkinOffice2007BlackD11.dcp" />
<DCCReference Include="dxSkinOffice2007BlueD11.dcp" />
<DCCReference Include="dxSkinOffice2007GreenD11.dcp" />
<DCCReference Include="dxSkinOffice2007PinkD11.dcp" />
<DCCReference Include="dxSkinOffice2007SilverD11.dcp" />
<DCCReference Include="dxSkinsCoreD11.dcp" />
<DCCReference Include="dxSkinscxPCPainterD11.dcp" />
<DCCReference Include="dxSkinSilverD11.dcp" />
<DCCReference Include="dxSkinStardustD11.dcp" />
<DCCReference Include="dxSkinValentineD11.dcp" />
<DCCReference Include="dxSkinXmas2008BlueD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="Fabricantes_controller.dcp" />
<DCCReference Include="Familias_controller.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="GUISDK_D11.dcp" />
<DCCReference Include="Jcl.dcp" />
<DCCReference Include="JclVcl.dcp" />
<DCCReference Include="JvAppFrmD11R.dcp" />
<DCCReference Include="JvCoreD11R.dcp" />
<DCCReference Include="JvCtrlsD11R.dcp" />
<DCCReference Include="JvGlobusD11R.dcp" />
<DCCReference Include="JvPageCompsD11R.dcp" />
<DCCReference Include="JvStdCtrlsD11R.dcp" />
<DCCReference Include="JvSystemD11R.dcp" />
<DCCReference Include="PngComponentsD10.dcp" />
<DCCReference Include="PNG_D10.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="tb2k_d10.dcp" />
<DCCReference Include="tbx_d10.dcp" />
<DCCReference Include="uArticulosViewRegister.pas" />
<DCCReference Include="uEditorArticulo.pas">
<Form>fEditorArticulo</Form>
@ -75,6 +136,7 @@
<Form>fEditorElegirArticulos</Form>
<DesignClass>TfEditorElegirArticulos</DesignClass>
</DCCReference>
<DCCReference Include="UnidadesMedida_controller.dcp" />
<DCCReference Include="uViewArticulo.pas">
<Form>frViewArticulo</Form>
<DesignClass>TFrame</DesignClass>
@ -83,10 +145,29 @@
<Form>frViewArticulos</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewArticulosPorProveedor.pas">
<Form>frViewArticulosPorProveedor</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewArticulosProveedores.pas">
<Form>frViewArticulosProveedores</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewDetallesArticulos.pas">
<Form>frViewDetallesArticulos</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewDetallesArticulosParaVenta.pas">
<Form>frViewDetallesArticulosParaVenta</Form>
<DesignClass>TCustomView</DesignClass>
</DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vclactnband.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
<DCCReference Include="vclshlctrls.dcp" />
<DCCReference Include="vclx.dcp" />
<DCCReference Include="xmlrtl.dcp" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line

View File

@ -4,20 +4,20 @@ inherited fEditorArticulo: TfEditorArticulo
HorzScrollBar.Visible = False
VertScrollBar.Visible = False
Caption = 'Ficha de art'#237'culo'
ClientHeight = 480
ClientWidth = 624
ClientHeight = 505
ClientWidth = 905
Scaled = False
OnClose = CustomEditorClose
ExplicitWidth = 632
ExplicitHeight = 514
ExplicitWidth = 913
ExplicitHeight = 539
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 624
Width = 905
Caption = 'Art'#237'culo'
ExplicitWidth = 624
ExplicitWidth = 905
inherited Image1: TImage
Left = 597
Left = 878
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2
@ -36,8 +36,8 @@ inherited fEditorArticulo: TfEditorArticulo
end
end
inherited TBXDock: TTBXDock
Width = 624
ExplicitWidth = 624
Width = 905
ExplicitWidth = 905
inherited tbxMain: TTBXToolbar
ExplicitWidth = 400
inherited TBXItem2: TTBXItem
@ -61,7 +61,7 @@ inherited fEditorArticulo: TfEditorArticulo
end
inherited tbxMenu: TTBXToolbar
DockPos = 0
ExplicitWidth = 624
ExplicitWidth = 905
inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem8: TTBXItem
Visible = False
@ -96,29 +96,205 @@ inherited fEditorArticulo: TfEditorArticulo
end
end
inherited pgPaginas: TPageControl
Width = 618
Height = 379
ExplicitWidth = 618
ExplicitHeight = 379
Width = 899
Height = 404
ActivePage = TabSheet1
ExplicitWidth = 899
ExplicitHeight = 404
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 610
ExplicitHeight = 351
end
object TabSheet1: TTabSheet
Caption = 'Precios'
ImageIndex = 1
inline frViewArticulosProveedores1: TfrViewArticulosProveedores
Left = 0
Top = 105
Width = 891
Height = 271
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitTop = 105
ExplicitWidth = 891
ExplicitHeight = 271
inherited cxGrid: TcxGrid
Width = 891
Height = 246
ExplicitWidth = 891
ExplicitHeight = 246
end
inherited ToolBar1: TToolBar
Width = 891
ExplicitWidth = 891
end
end
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
Width = 891
Height = 105
Align = alTop
TabOrder = 1
TabStop = False
AutoContentSizes = [acsWidth]
object eParamMargen: TcxDBSpinEdit
Left = 118
Top = 28
DataBinding.DataField = 'PARAM_MARGEN'
DataBinding.DataSource = dsDataTable
Properties.Alignment.Horz = taRightJustify
Properties.AssignedValues.EditFormat = True
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Width = 100
end
object eTiempo: TcxDBSpinEdit
Left = 118
Top = 55
DataBinding.DataField = 'TIEMPO'
DataBinding.DataSource = dsDataTable
Properties.Alignment.Horz = taRightJustify
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 1
Width = 100
end
object eParamTiempo: TcxDBCurrencyEdit
Left = 300
Top = 55
DataBinding.DataField = 'PARAM_TIEMPO'
DataBinding.DataSource = dsDataTable
Properties.Alignment.Horz = taRightJustify
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 2
Width = 150
end
object eManoObra: TcxDBSpinEdit
Left = 545
Top = 55
DataBinding.DataField = 'MANO_OBRA'
DataBinding.DataSource = dsDataTable
Enabled = False
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Properties.SpinButtons.Visible = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 3
Width = 200
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControl1Group1: TdxLayoutGroup
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Par'#225'metros de precio'
object dxLayoutControl1Item1: TdxLayoutItem
AutoAligns = [aaVertical]
Caption = 'Margen coste (%):'
Control = eParamMargen
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Group3: TdxLayoutGroup
ShowCaption = False
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControl1Item2: TdxLayoutItem
Caption = 'Tiempo min.:'
Control = eTiempo
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item3: TdxLayoutItem
Caption = ' Precio min.:'
Control = eParamTiempo
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item4: TdxLayoutItem
Caption = ' Mano de obra'
Control = eManoObra
ControlOptions.ShowBorder = False
end
end
end
end
end
end
end
inherited StatusBar: TJvStatusBar
Top = 461
Width = 624
Top = 486
Width = 905
Panels = <
item
Width = 200
end>
ExplicitTop = 461
ExplicitWidth = 624
ExplicitTop = 486
ExplicitWidth = 905
end
inherited EditorActionList: TActionList
Top = 128
Left = 64
Top = 136
object actFamilias: TAction
Category = 'Acciones'
Caption = 'Familias'
@ -634,8 +810,8 @@ inherited fEditorArticulo: TfEditorArticulo
Bitmap = {}
end
inherited dsDataTable: TDADataSource [6]
Left = 168
Top = 120
Left = 8
Top = 128
end
inherited LargeImages: TPngImageList [7]
Top = 112

View File

@ -13,7 +13,18 @@ uses
JvAppStorage, JvAppRegistryStorage, JvFormPlacement, JvComponentBase,
uViewArticulos, uIEditorArticulo, uArticulosController, JvExComCtrls,
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces;
JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, Grids, DBGrids, cxStyles,
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee,
dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters,
dxSkinValentine, dxSkinXmas2008Blue, dxSkinscxPCPainter, cxCustomData,
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGrid, uViewDetallesGenerico,
uViewArticulosProveedores, dxSkinsdxLCPainter, dxLayoutControl, cxContainer,
cxTextEdit, cxMaskEdit, cxSpinEdit, cxDBEdit, cxCurrencyEdit;
type
TfEditorArticulo = class(TfEditorDBItem, IEditorArticulo)
@ -22,6 +33,20 @@ type
TBXItem33: TTBXItem;
actFamilias: TAction;
TBXSeparatorItem6: TTBXSeparatorItem;
TabSheet1: TTabSheet;
frViewArticulosProveedores1: TfrViewArticulosProveedores;
dxLayoutControl1Group_Root: TdxLayoutGroup;
dxLayoutControl1: TdxLayoutControl;
dxLayoutControl1Item1: TdxLayoutItem;
eParamMargen: TcxDBSpinEdit;
dxLayoutControl1Item2: TdxLayoutItem;
eTiempo: TcxDBSpinEdit;
dxLayoutControl1Item3: TdxLayoutItem;
eParamTiempo: TcxDBCurrencyEdit;
dxLayoutControl1Item4: TdxLayoutItem;
eManoObra: TcxDBSpinEdit;
dxLayoutControl1Group1: TdxLayoutGroup;
dxLayoutControl1Group3: TdxLayoutGroup;
procedure FormShow(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@ -110,14 +135,20 @@ begin
dsDataTable.DataTable := FArticulo.DataTable;
if Assigned(FViewArticulo) and Assigned(Articulo) then
begin
FViewArticulo.Articulo := Articulo;
frViewArticulosProveedores1.Articulo := Articulo;
end;
end;
procedure TfEditorArticulo.SetController(const Value: IArticulosController);
begin
FController := Value;
if Assigned(FController) then
begin
(ViewArticulo as IViewArticulo).Controller := (FController as IArticulosController);
frViewArticulosProveedores1.Controller := FController;
end;
end;
procedure TfEditorArticulo.SetViewArticulo(const Value: IViewArticulo);

View File

@ -51,7 +51,197 @@ inherited fEditorArticulos: TfEditorArticulos
Width = 657
ExplicitWidth = 657
end
object pgPaginas: TPageControl [3]
AlignWithMargins = True
Left = 3
Top = 105
Width = 651
Height = 317
ActivePage = pagArticulos
Align = alClient
TabOrder = 3
OnChange = pgPaginasChange
object pagArticulos: TTabSheet
Caption = 'Todos los art'#237'culos'
inline frViewArticulos1: TfrViewArticulos
Left = 0
Top = 0
Width = 643
Height = 289
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 643
ExplicitHeight = 289
inherited cxGrid: TcxGrid
Width = 643
Height = 161
ExplicitWidth = 643
ExplicitHeight = 161
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
Format = '0 Art'#237'culos'
Kind = skCount
Column = frViewArticulos1.cxGridViewDESCRIPCION
end>
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 643
ExplicitWidth = 643
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 643
inherited dxLayoutControl1: TdxLayoutControl
Width = 643
ExplicitWidth = 643
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 567
Width = 567
end
inherited eLista: TcxComboBox
ExplicitWidth = 20
Width = 20
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 643
ExplicitWidth = 643
inherited tbxBotones: TTBXToolbar
Width = 633
ExplicitWidth = 633
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 263
ExplicitTop = 263
ExplicitWidth = 643
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 643
ExplicitWidth = 643
inherited TBXToolbar1: TTBXToolbar
Width = 633
ExplicitWidth = 633
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 39632.498140370370000000
BuiltInReportLink = True
end
end
inherited cxViewGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewArticulos1.cxGridView
HitTypes = [gvhtCell]
Index = 0
end>
end
end
end
object pagArticulosPorProveedor: TTabSheet
Caption = 'Art'#237'culos por proveedor'
ImageIndex = 1
inline frViewArticulosPorProveedor1: TfrViewArticulosPorProveedor
Left = 0
Top = 0
Width = 643
Height = 289
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 643
ExplicitHeight = 289
inherited cxGrid: TcxGrid
Width = 643
Height = 161
ExplicitWidth = 643
ExplicitHeight = 161
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
Format = '0 Art'#237'culos por proveedor'
Kind = skCount
Column = frViewArticulosPorProveedor1.cxGridViewDESCRIPCION
end>
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 643
ExplicitWidth = 643
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 643
inherited dxLayoutControl1: TdxLayoutControl
Width = 643
ExplicitWidth = 643
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 567
Width = 567
end
inherited eLista: TcxComboBox
ExplicitWidth = 20
Width = 20
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 643
ExplicitWidth = 643
inherited tbxBotones: TTBXToolbar
Width = 633
ExplicitWidth = 633
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 263
ExplicitTop = 263
ExplicitWidth = 643
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 643
ExplicitWidth = 643
inherited TBXToolbar1: TTBXToolbar
Width = 633
ExplicitWidth = 633
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 39632.498287210650000000
BuiltInReportLink = True
end
end
inherited cxViewGridPopupMenu: TcxGridPopupMenu
PopupMenus = <
item
GridView = frViewArticulosPorProveedor1.cxGridView
HitTypes = [gvhtCell]
Index = 0
end>
end
end
end
end
inherited EditorActionList: TActionList
Left = 8
Top = 160
inherited actNuevo: TAction
ImageIndex = 24
end
@ -1429,4 +1619,12 @@ inherited fEditorArticulos: TfEditorArticulos
end>
Bitmap = {}
end
inherited dsDataTable: TDADataSource
Left = 8
Top = 128
end
inherited GridPopupMenu: TPopupMenu
Left = 40
Top = 128
end
end

View File

@ -12,19 +12,30 @@ uses
JvAppRegistryStorage, JvFormPlacement, ExtCtrls, uCustomView, uViewBase,
uViewBarraSeleccion, pngimage, uIEditorArticulos, uEditorGridBase,
JvComponentBase, uViewGridBase, uArticulosController, JvExComCtrls,
JvStatusBar, uDAInterfaces;
JvStatusBar, uDAInterfaces, cxGrid, cxGridLevel, uViewArticulosPorProveedor;
type
TfEditorArticulos = class(TfEditorGridBase, IEditorArticulos)
actFamilias: TAction;
pgPaginas: TPageControl;
pagArticulos: TTabSheet;
pagArticulosPorProveedor: TTabSheet;
frViewArticulos1: TfrViewArticulos;
frViewArticulosPorProveedor1: TfrViewArticulosPorProveedor;
procedure FormShow(Sender: TObject);
procedure actFamiliasExecute(Sender: TObject);
procedure pgPaginasChange(Sender: TObject);
private
FArticulos: IBizArticulo;
FArticulosPorProveedor: IBizArticulo;
FController : IArticulosController;
protected
procedure SetViewGrid(const Value : IViewGridBase); override;
function GetArticulos: IBizArticulo;
procedure SetArticulos(const Value: IBizArticulo);
function GetArticulosPorProveedor: IBizArticulo;
procedure SetArticulosPorProveedor(const Value: IBizArticulo);
function GetController : IArticulosController; virtual;
procedure SetController (const Value : IArticulosController); virtual;
@ -34,14 +45,12 @@ type
procedure ImprimirInterno; override;
procedure PrevisualizarInterno; override;
procedure DuplicarInterno; override;
//Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo
procedure AsignarVista; virtual;
procedure RefrescarInterno; override;
public
procedure PonerTitulos(const ATitulo: string = ''); override;
property Articulos: IBizArticulo read GetArticulos write SetArticulos;
property ArticulosPorProveedor: IBizArticulo read GetArticulosPorProveedor write SetArticulosPorProveedor;
property Controller : IArticulosController read GetController write SetController;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -50,9 +59,9 @@ type
implementation
uses
uCustomEditor, uDataModuleArticulos, uDataModuleUsuarios, uFactuGES_App,
cxControls, uCustomEditor, uDataModuleArticulos, uDataModuleUsuarios, uFactuGES_App,
uEditorArticulo, uEditorDBBase, uBizFamilias, uFamiliasController,
cxGrid, cxGridCustomTableView; //, uListaArticulos;
cxGridCustomTableView; //, uListaArticulos;
{$R *.dfm}
@ -62,15 +71,7 @@ uses
procedure TfEditorArticulos.FormShow(Sender: TObject);
begin
inherited;
if not Assigned(ViewGrid) then
raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Articulos) then
raise Exception.Create('No hay ningún articulo asignado');
Articulos.DataTable.Active := True;
ViewGrid.GotoFirst;
ViewGrid := frViewArticulos1;
end;
function TfEditorArticulos.GetArticulos: IBizArticulo;
@ -78,6 +79,11 @@ begin
Result := FArticulos;
end;
function TfEditorArticulos.GetArticulosPorProveedor: IBizArticulo;
begin
Result := FArticulosPorProveedor;
end;
function TfEditorArticulos.GetController: IArticulosController;
begin
Result := FController;
@ -89,16 +95,56 @@ begin
end;
procedure TfEditorArticulos.ModificarInterno;
var
AArticulo: IBizArticulo;
begin
inherited;
FController.Ver(Articulos);
case pgPaginas.ActivePage.TabIndex of
0: begin
AArticulo := Articulos;
FController.Ver(AArticulo);
end;
1: begin
AArticulo := FController.Buscar(ArticulosPorProveedor.DataTable.FieldByName('ID_ARTICULO').AsInteger);
FController.Ver(AArticulo);
RefrescarInterno;
end;
end;
end;
procedure TfEditorArticulos.NuevoInterno;
var
AArticulo: IBizArticulo;
begin
inherited;
FController.Anadir(Articulos);
FController.Ver(Articulos);
if (FViewGrid._Grid.ActiveLevel.Tag = 1) then
AArticulo := FController.Nuevo
else
begin
AArticulo := Articulos;
FController.Anadir(AArticulo);
end;
if not AArticulo.DataTable.Active then
AArticulo.DataTable.Active := True;
FController.Ver(AArticulo);
if (FViewGrid._Grid.ActiveLevel.Tag = 1) then
Articulos.DataTable.Refresh;
end;
procedure TfEditorArticulos.pgPaginasChange(Sender: TObject);
begin
inherited;
if pgPaginas.ActivePage.TabIndex = 0 then
ViewGrid := frViewArticulos1
else
ViewGrid := frViewArticulosPorProveedor1;
end;
procedure TfEditorArticulos.PonerTitulos(const ATitulo: string);
@ -114,12 +160,44 @@ begin
inherited;
end;
procedure TfEditorArticulos.RefrescarInterno;
begin
// inherited;
if Assigned(FArticulos) then
begin
frViewArticulos1.SaveGridStatus;
try
frViewArticulos1.dsDataSource.DataTable.Refresh;
finally
frViewArticulos1.RestoreGridStatus;
end;
end;
if Assigned(FArticulosPorProveedor) then
begin
frViewArticulosPorProveedor1.SaveGridStatus;
try
frViewArticulosPorProveedor1.dsDataSource.DataTable.Refresh;
finally
frViewArticulosPorProveedor1.RestoreGridStatus;
end;
end;
end;
procedure TfEditorArticulos.SetArticulos(const Value: IBizArticulo);
begin
FArticulos := Value;
dsDataTable.DataTable := FArticulos.DataTable;
if Assigned(ViewGrid) then
(ViewGrid as IViewArticulos).Articulos := Articulos;
(ViewGrid as IViewArticulos).Articulos := FArticulos;
end;
procedure TfEditorArticulos.SetArticulosPorProveedor(const Value: IBizArticulo);
begin
FArticulosPorProveedor := Value;
dsDataTable.DataTable := FArticulosPorProveedor.DataTable;
if Assigned(ViewGrid) then
(ViewGrid as IViewArticulos).Articulos := FArticulosPorProveedor;
end;
procedure TfEditorArticulos.SetController(const Value: IArticulosController);
@ -127,12 +205,65 @@ begin
FController := Value;
if Assigned(ViewGrid) then
(ViewGrid as IViewArticulos).Controller := FController;
end;
procedure TfEditorArticulos.SetViewGrid(const Value: IViewGridBase);
begin
inherited;
case pgPaginas.ActivePage.TabIndex of
0: begin
if not Assigned(Articulos) then
Articulos := FController.BuscarTodos;
Articulos.DataTable.Active := True;
if actFiltrar.Checked then
begin
if not frViewArticulos1.ViewFiltros.VerFiltros then
begin
actFiltrar.Execute;
frViewArticulos1.ViewFiltros.Texto := frViewArticulosPorProveedor1.ViewFiltros.Texto;
end
else
frViewArticulos1.ViewFiltros.Texto := frViewArticulosPorProveedor1.ViewFiltros.Texto;
end
else
begin
if frViewArticulos1.ViewFiltros.VerFiltros then
actFiltrar.Execute;
ViewGrid.Filter := tbxEditFiltro.Text;
end;
end;
1: begin
if not Assigned(ArticulosPorProveedor) then
ArticulosPorProveedor := FController.BuscarTodosPorProveedor;
ArticulosPorProveedor.DataTable.Active := True;
if actFiltrar.Checked then
begin
if not frViewArticulosPorProveedor1.ViewFiltros.VerFiltros then
begin
actFiltrar.Execute;
frViewArticulosPorProveedor1.ViewFiltros.Texto := frViewArticulos1.ViewFiltros.Texto;
end
else
frViewArticulosPorProveedor1.ViewFiltros.Texto := frViewArticulos1.ViewFiltros.Texto;
end
else
begin
if frViewArticulosPorProveedor1.ViewFiltros.VerFiltros then
actFiltrar.Execute;
ViewGrid.Filter := tbxEditFiltro.Text;
end;
end;
end;
end;
destructor TfEditorArticulos.Destroy;
begin
FArticulos := NIL;
FArticulosPorProveedor := NIL;
FController := NIl;
inherited;
end;
@ -141,6 +272,7 @@ procedure TfEditorArticulos.DuplicarInterno;
var
AArticulo : IBizArticulo;
begin
{
inherited;
AArticulo := FController.Duplicar(Articulos);
try
@ -148,6 +280,7 @@ begin
finally
actRefrescar.Execute;
end;
}
end;
procedure TfEditorArticulos.EliminarInterno;
@ -157,9 +290,18 @@ begin
inherited;
//Para que en el caso de no poderse realizar la operación se refresquen
//los datos y no nos permita eliminar un registro a la segunda
if not FController.Eliminar(Articulos) then
case pgPaginas.ActivePage.TabIndex of
0: begin
if not FController.Eliminar(Articulos.ID) then
actRefrescar.Execute;
end;
1: begin
if not FController.Eliminar(ArticulosPorProveedor.DataTable.FieldByName('ID_ARTICULO').AsInteger) then
actRefrescar.Execute;
end;
end;
RefrescarInterno;
end;
end;
procedure TfEditorArticulos.actFamiliasExecute(Sender: TObject);
@ -177,15 +319,9 @@ begin
end;
end;
procedure TfEditorArticulos.AsignarVista;
begin
ViewGrid := CreateView(TfrViewArticulos) as IViewArticulos;
end;
constructor TfEditorArticulos.Create(AOwner: TComponent);
begin
inherited;
AsignarVista;
end;
end.

View File

@ -2,6 +2,7 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
Caption = 'Seleccionar art'#237'culos'
ClientWidth = 656
ExplicitWidth = 664
ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
object JvgWizardHeader1: TJvgWizardHeader [0]
@ -88,11 +89,11 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
ExplicitWidth = 656
end
inherited TBXTMain2: TTBXToolbar
Left = 395
Left = 463
Top = 23
DockPos = 395
DockRow = 1
ExplicitLeft = 395
ExplicitLeft = 463
ExplicitTop = 23
end
end
@ -141,29 +142,19 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
end
end
end
inherited EditorActionList: TActionList [5]
inherited EditorActionList: TActionList [8]
Left = 112
Top = 192
inherited actPrevisualizar: TAction
Visible = False
end
inherited actImprimir: TAction
Visible = False
end
inherited actDuplicar: TAction
Visible = False
end
end
inherited SmallImages: TPngImageList [6]
end
inherited LargeImages: TPngImageList [7]
end
inherited JvFormStorage: TJvFormStorage [8]
end
inherited dsDataTable: TDADataSource [10]
inherited dsDataTable: TDADataSource [9]
Left = 8
Top = 192
end
inherited JvAppRegistryStorage: TJvAppRegistryStorage [10]
end
inherited StatusBarImages: TPngImageList [11]
Top = 384
end

View File

@ -11,10 +11,10 @@ uses
TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent,
JvNavigationPane, uViewBarraSeleccion, JvgWizardHeader, StdCtrls,
uEditorArticulos, uBizArticulos, uIEditorElegirArticulos,
JvExComCtrls, JvStatusBar, uDAInterfaces;
JvExComCtrls, JvStatusBar, uDAInterfaces, uEditorGridBase, uArticulosController;
type
TfEditorElegirArticulos = class(TfEditorArticulos, IEditorElegirArticulos)
TfEditorElegirArticulos = class(TfEditorGridBase, IEditorElegirArticulos)
frViewBarraSeleccion1: TfrViewBarraSeleccion;
JvgWizardHeader1: TJvgWizardHeader;
EditorSeleccionActionList: TActionList;
@ -27,7 +27,17 @@ type
procedure FormShow(Sender: TObject);
procedure actAnchoAuto2Execute(Sender: TObject);
procedure actQuitarFiltro2Execute(Sender: TObject);
private
FArticulos: IBizArticulo;
FController : IArticulosController;
protected
function GetArticulos: IBizArticulo;
procedure SetArticulos(const Value: IBizArticulo);
function GetController : IArticulosController; virtual;
procedure SetController (const Value : IArticulosController); virtual;
procedure SetMultiSelect (AValue : Boolean);
function GetMultiSelect : Boolean;
function GetArticulosSeleccionados: IBizArticulo;
@ -38,13 +48,17 @@ type
property Mensaje : String read GetMensaje write SetMensaje;
property ArticulosSeleccionados: IBizArticulo read GetArticulosSeleccionados;
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
property Articulos: IBizArticulo read GetArticulos write SetArticulos;
property Controller : IArticulosController read GetController write SetController;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
uses
uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
uGridStatusUtils, uEditorBase, uArticulosController;
cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils,
uGridStatusUtils, uEditorBase;
{$R *.dfm}
@ -62,9 +76,29 @@ begin
actQuitarFiltro.Execute;
end;
constructor TfEditorElegirArticulos.Create(AOwner: TComponent);
begin
inherited;
end;
destructor TfEditorElegirArticulos.Destroy;
begin
FArticulos := NIL;
FController := NIl;
inherited;
end;
procedure TfEditorElegirArticulos.FormShow(Sender: TObject);
begin
inherited;
if not Assigned(ViewGrid) then
raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Articulos) then
raise Exception.Create('No hay ningún articulo asignado');
Articulos.DataTable.Active := True;
EditorActionList.State := asSuspended;
end;
@ -89,6 +123,11 @@ begin
(Sender as TAction).Enabled := (ViewGrid._FocusedView.Controller.SelectedRowCount > 0)
end;
function TfEditorElegirArticulos.GetArticulos: IBizArticulo;
begin
Result := FArticulos;
end;
function TfEditorElegirArticulos.GetArticulosSeleccionados: IBizArticulo;
begin
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Articulos as ISeleccionable).SelectedRecords);
@ -96,6 +135,11 @@ begin
Result := (Controller as IArticulosController).ExtraerSeleccionados(Articulos) as IBizArticulo;
end;
function TfEditorElegirArticulos.GetController: IArticulosController;
begin
Result := FController;
end;
function TfEditorElegirArticulos.GetMensaje: String;
begin
Result := JvgWizardHeader1.Comments.Text;
@ -106,6 +150,21 @@ begin
Result := ViewGrid.MultiSelect;
end;
procedure TfEditorElegirArticulos.SetArticulos(const Value: IBizArticulo);
begin
FArticulos := Value;
dsDataTable.DataTable := FArticulos.DataTable;
if Assigned(ViewGrid) then
(ViewGrid as IViewArticulos).Articulos := FArticulos;
end;
procedure TfEditorElegirArticulos.SetController(const Value: IArticulosController);
begin
FController := Value;
if Assigned(ViewGrid) then
(ViewGrid as IViewArticulos).Controller := FController;
end;
procedure TfEditorElegirArticulos.SetMensaje(const AValue: String);
begin
JvgWizardHeader1.Comments.Text := AValue;

View File

@ -1,29 +1,28 @@
inherited frViewArticulo: TfrViewArticulo
Width = 953
Height = 514
Width = 818
Height = 432
Align = alClient
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
OnShow = CustomViewShow
ExplicitWidth = 451
ExplicitHeight = 304
object dxLayoutControlArticulo: TdxLayoutControl
Left = 0
Top = 0
Width = 953
Height = 507
Align = alTop
Width = 818
Height = 432
Align = alClient
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth]
ExplicitWidth = 451
ExplicitHeight = 473
DesignSize = (
953
507)
818
432)
object PngSpeedButton2: TPngSpeedButton
Left = 529
Top = 445
Left = 773
Top = 304
Width = 23
Height = 22
Action = actAnadir
@ -49,15 +48,15 @@ inherited frViewArticulo: TfrViewArticulo
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
end
object PngSpeedButton1: TPngSpeedButton
Left = 529
Top = 473
Left = 773
Top = 332
Width = 23
Height = 22
Action = actEliminar
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
end
object eReferencia: TcxDBTextEdit
Left = 132
Left = 122
Top = 28
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'REFERENCIA'
@ -76,10 +75,10 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Width = 420
Width = 328
end
object eDescripcion: TcxDBTextEdit
Left = 132
Left = 122
Top = 55
DataBinding.DataField = 'DESCRIPCION'
DataBinding.DataSource = dsViewArticulo
@ -96,10 +95,10 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 1
Width = 420
Width = 328
end
object eNoComisionable: TcxDBCheckBox
Left = 132
Left = 122
Top = 163
Caption = 'Art'#237'culo no comisionable'
DataBinding.DataField = 'COMISIONABLE'
@ -120,11 +119,11 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 5
Width = 420
Width = 328
end
object eImagen: TcxImage
Left = 28
Top = 445
Top = 304
Properties.GraphicClassName = 'TJPEGImage'
Properties.ImmediatePost = True
Properties.PopupMenuLayout.MenuItems = []
@ -140,12 +139,12 @@ inherited frViewArticulo: TfrViewArticulo
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 14
TabOrder = 8
Height = 98
Width = 495
Width = 403
end
object cbFamilia: TcxDBComboBox
Left = 132
Left = 122
Top = 82
DataBinding.DataField = 'FAMILIA'
DataBinding.DataSource = dsViewArticulo
@ -166,166 +165,10 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 2
Width = 420
end
inline frViewDatosYSeleccionProveedor1: TfrViewDatosYSeleccionProveedor
Left = 582
Top = 28
Width = 167
Height = 202
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 15
ReadOnly = False
ExplicitLeft = 582
ExplicitTop = 28
ExplicitWidth = 167
inherited dxLayoutControl1: TdxLayoutControl
Width = 167
ExplicitWidth = 167
inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 221
Width = 221
end
inherited edtNIFCIF: TcxDBTextEdit
ExplicitWidth = 221
Width = 221
end
inherited edtCalle: TcxDBTextEdit
ExplicitWidth = 221
Width = 221
end
inherited edtPoblacion: TcxDBTextEdit
ExplicitWidth = 103
Width = 103
end
inherited edtProvincia: TcxDBTextEdit
ExplicitWidth = 221
Width = 221
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 240
ExplicitLeft = 240
end
inherited Button3: TBitBtn
Left = 124
ExplicitLeft = 124
end
end
end
object eReferenciaProv: TcxDBTextEdit
Left = 663
Top = 266
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'REFERENCIA_PROV'
DataBinding.DataSource = dsViewArticulo
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = 14745599
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 16
Width = 86
end
object ePrecioCoste: TcxDBCurrencyEdit
Left = 663
Top = 293
DataBinding.DataField = 'PRECIO_COSTE'
DataBinding.DataSource = dsViewArticulo
Properties.Alignment.Horz = taRightJustify
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 17
Width = 86
end
object eDescuento: TcxDBSpinEdit
Left = 663
Top = 320
DataBinding.DataField = 'DESCUENTO'
DataBinding.DataSource = dsViewArticulo
Properties.Alignment.Horz = taRightJustify
Properties.AssignedValues.EditFormat = True
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 18
Width = 86
end
object ePrecioNeto: TcxDBCurrencyEdit
Left = 663
Top = 347
DataBinding.DataField = 'PRECIO_NETO'
DataBinding.DataSource = dsViewArticulo
Enabled = False
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = clBtnFace
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.TextColor = clWindowText
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.TextColor = clWindowText
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 19
Width = 86
end
object ePrecioPorte: TcxDBCurrencyEdit
Left = 663
Top = 374
DataBinding.DataField = 'PRECIO_PORTE'
DataBinding.DataSource = dsViewArticulo
Properties.Alignment.Horz = taRightJustify
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 20
Width = 86
Width = 328
end
object cbNoInventariable: TcxDBCheckBox
Left = 132
Left = 122
Top = 136
Caption = 'Art'#237'culo no inventariable'
DataBinding.DataField = 'INVENTARIABLE'
@ -346,10 +189,10 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 4
Width = 420
Width = 328
end
object cbUnidadMedida: TcxDBComboBox
Left = 132
Left = 122
Top = 109
DataBinding.DataField = 'UNIDAD_MEDIDA'
DataBinding.DataSource = dsViewArticulo
@ -370,11 +213,11 @@ inherited frViewArticulo: TfrViewArticulo
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 3
Width = 420
Width = 328
end
object cbFabricante: TcxDBComboBox
Left = 132
Top = 361
Left = 122
Top = 220
DataBinding.DataField = 'FABRICANTE'
DataBinding.DataSource = dsViewArticulo
Properties.DropDownRows = 16
@ -393,12 +236,12 @@ inherited frViewArticulo: TfrViewArticulo
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 12
Width = 420
TabOrder = 6
Width = 328
end
object eReferenciaFabr: TcxDBTextEdit
Left = 132
Top = 388
Left = 122
Top = 247
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'REFERENCIA_FABR'
DataBinding.DataSource = dsViewArticulo
@ -415,154 +258,8 @@ inherited frViewArticulo: TfrViewArticulo
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 13
Width = 171
end
object eTiempo: TcxDBSpinEdit
Left = 132
Top = 277
DataBinding.DataField = 'TIEMPO'
DataBinding.DataSource = dsViewArticulo
Properties.Alignment.Horz = taRightJustify
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 8
Width = 60
end
object ePrecioPvpTotal: TcxDBSpinEdit
Left = 132
Top = 304
DataBinding.DataField = 'PRECIO_PVP_TOTAL'
DataBinding.DataSource = dsViewArticulo
Enabled = False
Properties.Alignment.Horz = taRightJustify
Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Properties.SpinButtons.Visible = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 11
Width = 420
end
object eManoObra: TcxDBSpinEdit
Left = 440
Top = 277
DataBinding.DataField = 'MANO_OBRA'
DataBinding.DataSource = dsViewArticulo
Enabled = False
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Properties.SpinButtons.Visible = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 10
Width = 112
end
object eParamMargen: TcxDBSpinEdit
Left = 132
Top = 220
DataBinding.DataField = 'PARAM_MARGEN'
DataBinding.DataSource = dsViewArticulo
Properties.Alignment.Horz = taRightJustify
Properties.AssignedValues.EditFormat = True
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 6
Width = 100
end
object ePRECIO_PVP_VENTA: TcxDBSpinEdit
Left = 389
Top = 220
DataBinding.DataField = 'PRECIO_PVP_VENTA'
DataBinding.DataSource = dsViewArticulo
Enabled = False
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
Properties.SpinButtons.Visible = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.ButtonStyle = bts3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 7
Width = 163
end
object eParamTiempo: TcxDBCurrencyEdit
Left = 259
Top = 277
DataBinding.DataField = 'PARAM_TIEMPO'
DataBinding.DataSource = dsViewArticulo
Properties.Alignment.Horz = taRightJustify
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 9
Width = 100
Width = 171
end
object dxLayoutControlArticuloGroup_Root: TdxLayoutGroup
ShowCaption = False
@ -577,6 +274,7 @@ inherited frViewArticulo: TfrViewArticulo
end
object dxLayoutControlArticuloGroup14: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
Caption = 'New Group'
ShowCaption = False
Hidden = True
@ -639,55 +337,6 @@ inherited frViewArticulo: TfrViewArticulo
end
end
end
object dxLayoutControlArticuloGroup13: TdxLayoutGroup
Caption = 'Precio P.V.P (Solo suministro)'
LayoutDirection = ldHorizontal
object dxLayoutControlArticuloItem22: TdxLayoutItem
Caption = 'Margen coste (%):'
Control = eParamMargen
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem23: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Precio Venta (Solo suministro):'
Control = ePRECIO_PVP_VENTA
ControlOptions.ShowBorder = False
end
end
object dxLayoutControlArticuloGroup8: TdxLayoutGroup
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Precio P.V.P (Total)'
object dxLayoutControlArticuloGroup16: TdxLayoutGroup
ShowCaption = False
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControlArticuloItem13: TdxLayoutItem
Caption = 'Tiempo min.:'
Control = eTiempo
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem24: TdxLayoutItem
Caption = 'Precio min.:'
Control = eParamTiempo
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem21: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Mano de obra:'
Control = eManoObra
ControlOptions.ShowBorder = False
end
end
object dxLayoutControlArticuloItem20: TdxLayoutItem
Caption = 'Precio Venta (Total):'
Control = ePrecioPvpTotal
ControlOptions.ShowBorder = False
end
end
object dxLayoutControlArticuloGroup10: TdxLayoutGroup
Caption = 'Datos del fabricante'
object dxLayoutControlArticuloItem10: TdxLayoutItem
@ -734,54 +383,6 @@ inherited frViewArticulo: TfrViewArticulo
end
end
end
object dxLayoutControlArticuloGroup7: TdxLayoutGroup
AutoAligns = [aaVertical]
AlignHorz = ahClient
ShowCaption = False
Hidden = True
ShowBorder = False
object dxLayoutControlArticuloGroup12: TdxLayoutGroup
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Proveedor para el art'#237'culo'
object dxLayoutControlArticuloItem14: TdxLayoutItem
Control = frViewDatosYSeleccionProveedor1
ControlOptions.AutoColor = True
ControlOptions.ShowBorder = False
end
end
object dxLayoutControlArticuloGroup11: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
Caption = 'Datos del proveedor para el art'#237'culo'
object dxLayoutControlArticuloItem15: TdxLayoutItem
Caption = 'Ref. del prov:'
Control = eReferenciaProv
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem16: TdxLayoutItem
Caption = 'Precio material:'
Control = ePrecioCoste
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem17: TdxLayoutItem
Caption = 'Dto (%):'
Control = eDescuento
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem18: TdxLayoutItem
Caption = 'Precio coste:'
Control = ePrecioNeto
ControlOptions.ShowBorder = False
end
object dxLayoutControlArticuloItem19: TdxLayoutItem
Caption = 'Coste de envio:'
Visible = False
Control = ePrecioPorte
ControlOptions.ShowBorder = False
end
end
end
end
end
object dsViewArticulo: TDADataSource

View File

@ -59,20 +59,6 @@ type
dxLayoutControlArticuloItem4: TdxLayoutItem;
cbFamilia: TcxDBComboBox;
dxLayoutControlArticuloGroup6: TdxLayoutGroup;
dxLayoutControlArticuloItem14: TdxLayoutItem;
frViewDatosYSeleccionProveedor1: TfrViewDatosYSeleccionProveedor;
dxLayoutControlArticuloItem15: TdxLayoutItem;
eReferenciaProv: TcxDBTextEdit;
dxLayoutControlArticuloItem16: TdxLayoutItem;
ePrecioCoste: TcxDBCurrencyEdit;
dxLayoutControlArticuloItem17: TdxLayoutItem;
eDescuento: TcxDBSpinEdit;
dxLayoutControlArticuloItem18: TdxLayoutItem;
ePrecioNeto: TcxDBCurrencyEdit;
dxLayoutControlArticuloItem19: TdxLayoutItem;
ePrecioPorte: TcxDBCurrencyEdit;
dxLayoutControlArticuloGroup11: TdxLayoutGroup;
dxLayoutControlArticuloGroup12: TdxLayoutGroup;
dxLayoutControlArticuloItem7: TdxLayoutItem;
cbNoInventariable: TcxDBCheckBox;
dxLayoutControlArticuloItem9: TdxLayoutItem;
@ -83,22 +69,6 @@ type
eReferenciaFabr: TcxDBTextEdit;
dxLayoutControlArticuloGroup10: TdxLayoutGroup;
dxLayoutControlArticuloGroup14: TdxLayoutGroup;
dxLayoutControlArticuloGroup7: TdxLayoutGroup;
dxLayoutControlArticuloGroup8: TdxLayoutGroup;
dxLayoutControlArticuloItem13: TdxLayoutItem;
eTiempo: TcxDBSpinEdit;
dxLayoutControlArticuloItem20: TdxLayoutItem;
ePrecioPvpTotal: TcxDBSpinEdit;
dxLayoutControlArticuloItem21: TdxLayoutItem;
eManoObra: TcxDBSpinEdit;
dxLayoutControlArticuloItem22: TdxLayoutItem;
eParamMargen: TcxDBSpinEdit;
dxLayoutControlArticuloItem23: TdxLayoutItem;
ePRECIO_PVP_VENTA: TcxDBSpinEdit;
dxLayoutControlArticuloGroup16: TdxLayoutGroup;
dxLayoutControlArticuloGroup13: TdxLayoutGroup;
dxLayoutControlArticuloItem24: TdxLayoutItem;
eParamTiempo: TcxDBCurrencyEdit;
procedure actEliminarExecute(Sender: TObject);
procedure actAnadirExecute(Sender: TObject);
procedure cbFamiliaPropertiesInitPopup(Sender: TObject);
@ -106,7 +76,6 @@ type
procedure CustomViewDestroy(Sender: TObject);
procedure cbFamiliaPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure CustomViewShow(Sender: TObject);
procedure PrecioNetoChanged(Sender: TObject);
procedure cbUnidadMedidaPropertiesInitPopup(Sender: TObject);
procedure cbUnidadMedidaPropertiesValidate(Sender: TObject;
@ -345,18 +314,9 @@ begin
FFamiliasController := Nil;
FUnidadesController := NIL;
FFabricantesController := NIL;
ePrecioCoste.Properties.OnEditValueChanged := Nil;
eDescuento.Properties.OnEditValueChanged := Nil;
inherited;
end;
procedure TfrViewArticulo.CustomViewShow(Sender: TObject);
begin
inherited;
ePrecioCoste.Properties.OnEditValueChanged := PrecioNetoChanged;
eDescuento.Properties.OnEditValueChanged := PrecioNetoChanged;
end;
function TfrViewArticulo.GetArticulo: IBizArticulo;
begin
Result := FArticulo;
@ -372,8 +332,8 @@ begin
if Assigned(FArticulo) then
begin
FArticulo.Edit;
FArticulo.ID_PROVEEDOR := frViewDatosYSeleccionProveedor1.Proveedor.ID;
FArticulo.DESCUENTO := frViewDatosYSeleccionProveedor1.Proveedor.DESCUENTO;
// FArticulo.ID_PROVEEDOR := frViewDatosYSeleccionProveedor1.Proveedor.ID;
// FArticulo.DESCUENTO := frViewDatosYSeleccionProveedor1.Proveedor.DESCUENTO;
end;
end;
@ -402,14 +362,14 @@ end;
procedure TfrViewArticulo.SetArticulo(const Value: IBizArticulo);
begin
FArticulo := Value;
frViewDatosYSeleccionProveedor1.OnProveedorChanged := NIL;
// frViewDatosYSeleccionProveedor1.OnProveedorChanged := NIL;
if Assigned(FArticulo) then
begin
dsViewArticulo.DataTable := FArticulo.DataTable;
frViewDatosYSeleccionProveedor1.Controller := FController.ProveedoresController;
frViewDatosYSeleccionProveedor1.Proveedor := (FController.ProveedoresController.Buscar(FArticulo.ID_PROVEEDOR) as IBizProveedor);
frViewDatosYSeleccionProveedor1.OnProveedorChanged := OnProveedorChanged;
// frViewDatosYSeleccionProveedor1.Controller := FController.ProveedoresController;
// frViewDatosYSeleccionProveedor1.Proveedor := (FController.ProveedoresController.Buscar(FArticulo.ID_PROVEEDOR) as IBizProveedor);
// frViewDatosYSeleccionProveedor1.OnProveedorChanged := OnProveedorChanged;
// CargarImagen;
end

View File

@ -1,8 +1,7 @@
inherited frViewArticulos: TfrViewArticulos
Width = 715
Height = 462
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
OnShow = CustomViewShow
ExplicitWidth = 715
ExplicitHeight = 462
inherited cxGrid: TcxGrid
@ -11,13 +10,8 @@ inherited frViewArticulos: TfrViewArticulos
ExplicitWidth = 715
ExplicitHeight = 334
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'ID'
DataController.Options = [dcoAnsiSort, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoSortByDisplayText, dcoGroupsAlwaysExpanded]
DataController.KeyFieldNames = 'RecID'
DataController.Summary.FooterSummaryItems = <
item
Format = '0 almacenes'
Kind = skCount
end
item
Format = '0 Art'#237'culos'
Kind = skCount
@ -27,194 +21,48 @@ inherited frViewArticulos: TfrViewArticulos
OptionsBehavior.PullFocusing = True
OptionsCustomize.ColumnHidingOnGrouping = False
OptionsView.GroupFooters = gfAlwaysVisible
object cxGridViewINVENTARIABLE: TcxGridDBColumn
Caption = #191'Inventariable?'
DataBinding.FieldName = 'INVENTARIABLE'
PropertiesClassName = 'TcxImageComboBoxProperties'
Properties.Images = GridPNGImageList
Properties.Items = <
item
Value = 0
end
item
ImageIndex = 3
Tag = 1
Value = 1
end>
object cxGridViewRecID: TcxGridDBColumn
DataBinding.FieldName = 'RecID'
Visible = False
BestFitMaxWidth = 22
MinWidth = 22
Options.HorzSizing = False
VisibleForCustomization = False
Width = 22
end
object cxGridViewCOMISIONABLE: TcxGridDBColumn
Caption = #191'Comisionable?'
DataBinding.FieldName = 'COMISIONABLE'
PropertiesClassName = 'TcxImageComboBoxProperties'
Properties.DefaultDescription = 'S'#237
Properties.DefaultImageIndex = 1
Properties.ImmediatePost = True
Properties.ImmediateUpdateText = True
Properties.Items = <
item
Description = 'S'#237
ImageIndex = 1
Tag = 1
Value = 1
end
item
Description = 'No'
Value = 0
end
item
Description = 'S'#237
ImageIndex = 1
Tag = 1
end>
Properties.PostPopupValueOnTab = True
Properties.ShowDescriptions = False
object cxGridViewID: TcxGridDBColumn
DataBinding.FieldName = 'ID'
Visible = False
VisibleForCustomization = False
end
object cxGridViewID_EMPRESA: TcxGridDBColumn
DataBinding.FieldName = 'ID_EMPRESA'
Visible = False
BestFitMaxWidth = 22
MinWidth = 22
Options.HorzSizing = False
VisibleForCustomization = False
Width = 22
end
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewFABRICANTE: TcxGridDBColumn
Caption = 'Fabricante'
DataBinding.FieldName = 'FABRICANTE'
BestFitMaxWidth = 60
end
object cxGridViewREFERENCIA_FABR: TcxGridDBColumn
Caption = 'Ref. fabricante'
DataBinding.FieldName = 'REFERENCIA_FABR'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewDESCRIPCION: TcxGridDBColumn
Caption = 'Descripci'#243'n'
DataBinding.FieldName = 'DESCRIPCION'
Width = 120
end
object cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn
Caption = 'Unid. medida'
DataBinding.FieldName = 'UNIDAD_MEDIDA'
BestFitMaxWidth = 45
Width = 60
end
object cxGridViewFAMILIA: TcxGridDBColumn
Caption = 'Familia'
DataBinding.FieldName = 'FAMILIA'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn
Caption = 'Proveedor'
DataBinding.FieldName = 'NOMBRE_PROVEEDOR'
BestFitMaxWidth = 120
Width = 120
object cxGridViewFABRICANTE: TcxGridDBColumn
DataBinding.FieldName = 'FABRICANTE'
end
object cxGridViewREFERENCIA_PROV: TcxGridDBColumn
Caption = 'Ref. proveedor'
DataBinding.FieldName = 'REFERENCIA_PROV'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewPRECIO_COSTE: TcxGridDBColumn
Caption = 'Precio material'
DataBinding.FieldName = 'PRECIO_COSTE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewDESCUENTO: TcxGridDBColumn
Caption = 'Descuento'
DataBinding.FieldName = 'DESCUENTO'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_NETO: TcxGridDBColumn
Caption = 'Precio coste'
DataBinding.FieldName = 'PRECIO_NETO'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_PORTE: TcxGridDBColumn
Caption = 'Precio porte'
DataBinding.FieldName = 'PRECIO_PORTE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
Visible = False
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
VisibleForCustomization = False
end
object cxGridViewMARGEN: TcxGridDBColumn
Caption = 'Margen'
DataBinding.FieldName = 'PARAM_MARGEN'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
HeaderAlignmentHorz = taRightJustify
object cxGridViewREFERENCIA_FABR: TcxGridDBColumn
DataBinding.FieldName = 'REFERENCIA_FABR'
end
object cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn
Caption = 'Precio P.V.P (solo suministro)'
DataBinding.FieldName = 'PRECIO_PVP_VENTA'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
GroupSummaryAlignment = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'ID_PROVEEDOR'
Visible = False
VisibleForCustomization = False
end
object cxGridViewTIEMPO: TcxGridDBColumn
Caption = 'Tiempo min'
DataBinding.FieldName = 'TIEMPO'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPARAM_TIEMPO: TcxGridDBColumn
DataBinding.FieldName = 'PARAM_TIEMPO'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewMANO_OBRA: TcxGridDBColumn
DataBinding.FieldName = 'MANO_OBRA'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn
DataBinding.FieldName = 'PRECIO_PVP_TOTAL'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
end
inherited cxGridLevel: TcxGridLevel
Caption = 'Todos los proveedores'
Caption = 'Todos los art'#237'culos'
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
@ -243,9 +91,6 @@ inherited frViewArticulos: TfrViewArticulos
inherited dxLayoutControl1Item3: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item4: TdxLayoutItem
Visible = True
end
end
end
end
@ -282,11 +127,6 @@ inherited frViewArticulos: TfrViewArticulos
end
object TBXSeparatorItem2: TTBXSeparatorItem
end
object TBXItem2: TTBXItem
Action = actProveedor
end
object TBXSeparatorItem3: TTBXSeparatorItem
end
object TBXItem4: TTBXItem
Action = actFabricante
end
@ -307,11 +147,6 @@ inherited frViewArticulos: TfrViewArticulos
OnExecute = actFamiliaExecute
OnUpdate = actFamiliaUpdate
end
object actProveedor: TAction
Caption = 'Proveedor'
OnExecute = actProveedorExecute
OnUpdate = actProveedorUpdate
end
object actFabricante: TAction
Caption = 'Fabricante'
OnExecute = actFabricanteExecute

View File

@ -35,48 +35,35 @@ type
end;
TfrViewArticulos = class(TfrViewGrid, IViewArticulos)
cxGridViewREFERENCIA: TcxGridDBColumn;
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewFAMILIA: TcxGridDBColumn;
cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn;
actFamilia: TAction;
actProveedor: TAction;
TBXItem2: TTBXItem;
TBXItem3: TTBXItem;
TBXSeparatorItem1: TTBXSeparatorItem;
TBXSeparatorItem2: TTBXSeparatorItem;
cxGridViewINVENTARIABLE: TcxGridDBColumn;
cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn;
cxGridViewFABRICANTE: TcxGridDBColumn;
TBXItem4: TTBXItem;
TBXSeparatorItem3: TTBXSeparatorItem;
actFabricante: TAction;
cxGridViewRecID: TcxGridDBColumn;
cxGridViewID: TcxGridDBColumn;
cxGridViewID_EMPRESA: TcxGridDBColumn;
cxGridViewREFERENCIA: TcxGridDBColumn;
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn;
cxGridViewFAMILIA: TcxGridDBColumn;
cxGridViewFABRICANTE: TcxGridDBColumn;
cxGridViewREFERENCIA_FABR: TcxGridDBColumn;
cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn;
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
cxGridViewMARGEN: TcxGridDBColumn;
cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn;
cxGridViewTIEMPO: TcxGridDBColumn;
cxGridViewPARAM_TIEMPO: TcxGridDBColumn;
cxGridViewMANO_OBRA: TcxGridDBColumn;
procedure actProveedorExecute(Sender: TObject);
procedure actProveedorUpdate(Sender: TObject);
procedure actFamiliaExecute(Sender: TObject);
procedure actFamiliaUpdate(Sender: TObject);
procedure actFabricanteExecute(Sender: TObject);
procedure actFabricanteUpdate(Sender: TObject);
procedure cxGridView2DataControllerCompare(ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
procedure frViewFiltroBase1eListaPropertiesChange(Sender: TObject);
procedure frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
procedure cxGridViewDataControllerCompare(
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
procedure frViewFiltroBase1eListaPropertiesChange(Sender: TObject);
procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject);
private
FListaProveedores: TStringList;
//Filtros relativos a la vista
procedure AnadirFiltroProveedores;
protected
FArticulos: IBizArticulo;
@ -123,31 +110,8 @@ end;
procedure TfrViewArticulos.SetController(const Value: IArticulosController);
var
i: Integer;
begin
FController := Value;
//Rellenamos la lista de proveedores con articulos
if Assigned(FController) then
begin
FListaProveedores := FController.DarListaProveedoresConArticulos;
with frViewFiltroBase1.eLista.Properties.Items do
begin
BeginUpdate;
try
Clear;
Add('Todos');
for i := 0 to FListaProveedores.Count - 1 do
Add(FListaProveedores.Names[i]);
frViewFiltroBase1.eLista.ItemIndex := 0;
finally
EndUpdate;
end;
end;
end;
end;
procedure TfrViewArticulos.actFabricanteExecute(Sender: TObject);
@ -190,59 +154,10 @@ begin
(Sender as TAction).Checked := not (cxGridViewFAMILIA.GroupIndex < 0);
end;
procedure TfrViewArticulos.actProveedorExecute(Sender: TObject);
begin
inherited;
if (cxGridViewNOMBRE_PROVEEDOR.GroupIndex < 0) then
begin
cxGridViewNOMBRE_PROVEEDOR.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewNOMBRE_PROVEEDOR.Visible := False;
end
else
begin
cxGridViewNOMBRE_PROVEEDOR.GroupIndex := -1;
cxGridViewNOMBRE_PROVEEDOR.Visible := True;
end;
end;
procedure TfrViewArticulos.actProveedorUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewNOMBRE_PROVEEDOR.GroupIndex < 0);
end;
procedure TfrViewArticulos.AnadirFiltroProveedores;
var
FFiltro : TcxFilterCriteriaItemList;
CodigoProveedor: Variant;
Index: Integer;
begin
//Solo se aplica este filtro en el caso de tener activo el panel de detalle de filtro
if frViewFiltroBase1.Visible then
begin
if VarIsNull(frViewFiltroBase1.eLista.EditValue) then
CodigoProveedor := frViewFiltroBase1.eLista.EditValue
else
CodigoProveedor := FListaProveedores.Values[frViewFiltroBase1.eLista.EditValue];
if not VarIsNull(CodigoProveedor)
and (VarToStr(CodigoProveedor) <> '') then
begin
FFiltro := AddFilterGrid(fboAnd);
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, CodigoProveedor, CodigoProveedor);
cxGridViewNOMBRE_PROVEEDOR.Visible := False;
end
else
cxGridViewNOMBRE_PROVEEDOR.Visible := True;
end;
end;
procedure TfrViewArticulos.AnadirOtrosFiltros;
begin
inherited;
AnadirFiltroProveedores;
//Finalmente activamos el filtro si tenemos algo
if cxGridView.DataController.Filter.IsEmpty
then cxGridView.DataController.Filter.Active := False
@ -250,16 +165,22 @@ begin
cxGrid.ActiveLevel.GridView := cxGridView;
end;
procedure TfrViewArticulos.CustomViewCreate(Sender: TObject);
procedure TfrViewArticulos.CustomViewShow(Sender: TObject);
begin
inherited;
FListaProveedores := Nil;
AjustarAncho;
end;
procedure TfrViewArticulos.CustomViewDestroy(Sender: TObject);
procedure TfrViewArticulos.cxGridView2DataControllerCompare(
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
begin
inherited;
FreeAndNil(FListaProveedores);
if ((AItemIndex = cxGridViewREFERENCIA.Index)) and
(VarType(V1) = VarType(V2)) and (VarType(V1) = varString) then
Compare := CompararReferencias(V1, V2)
else
Compare := VarCompare(V1, V2);
end;
procedure TfrViewArticulos.cxGridViewDataControllerCompare(
@ -267,7 +188,7 @@ procedure TfrViewArticulos.cxGridViewDataControllerCompare(
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
begin
inherited;
if ((AItemIndex = cxGridViewREFERENCIA.Index)) and
if (AItemIndex = cxGridViewREFERENCIA.Index) and
(VarType(V1) = VarType(V2)) and (VarType(V1) = varString) then
Compare := CompararReferencias(V1, V2)
else

View File

@ -0,0 +1,469 @@
inherited frViewArticulosPorProveedor: TfrViewArticulosPorProveedor
Width = 715
Height = 462
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
OnShow = CustomViewShow
ExplicitWidth = 715
ExplicitHeight = 462
inherited cxGrid: TcxGrid
Width = 715
Height = 334
ExplicitWidth = 715
ExplicitHeight = 334
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'RecID'
DataController.Summary.FooterSummaryItems = <
item
Format = '0 Art'#237'culos por proveedor'
Kind = skCount
Column = cxGridViewDESCRIPCION
end>
OptionsBehavior.PullFocusing = True
OptionsCustomize.ColumnHidingOnGrouping = False
OptionsView.GroupFooters = gfAlwaysVisible
object cxGridViewINVENTARIABLE: TcxGridDBColumn
Caption = #191'Inventariable?'
DataBinding.FieldName = 'INVENTARIABLE'
PropertiesClassName = 'TcxImageComboBoxProperties'
Properties.Images = GridPNGImageList
Properties.Items = <
item
Value = 0
end
item
ImageIndex = 3
Tag = 1
Value = 1
end>
Visible = False
BestFitMaxWidth = 22
MinWidth = 22
Options.HorzSizing = False
VisibleForCustomization = False
Width = 22
end
object cxGridViewCOMISIONABLE: TcxGridDBColumn
Caption = #191'Comisionable?'
DataBinding.FieldName = 'COMISIONABLE'
PropertiesClassName = 'TcxImageComboBoxProperties'
Properties.DefaultDescription = 'S'#237
Properties.DefaultImageIndex = 1
Properties.ImmediatePost = True
Properties.ImmediateUpdateText = True
Properties.Items = <
item
Description = 'S'#237
ImageIndex = 1
Tag = 1
Value = 1
end
item
Description = 'No'
Value = 0
end
item
Description = 'S'#237
ImageIndex = 1
Tag = 1
end>
Properties.PostPopupValueOnTab = True
Properties.ShowDescriptions = False
Visible = False
BestFitMaxWidth = 22
MinWidth = 22
Options.HorzSizing = False
VisibleForCustomization = False
Width = 22
end
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewFABRICANTE: TcxGridDBColumn
Caption = 'Fabricante'
DataBinding.FieldName = 'FABRICANTE'
BestFitMaxWidth = 60
end
object cxGridViewREFERENCIA_FABR: TcxGridDBColumn
Caption = 'Ref. fabricante'
DataBinding.FieldName = 'REFERENCIA_FABR'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewDESCRIPCION: TcxGridDBColumn
Caption = 'Descripci'#243'n'
DataBinding.FieldName = 'DESCRIPCION'
Width = 120
end
object cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn
Caption = 'Unid. medida'
DataBinding.FieldName = 'UNIDAD_MEDIDA'
BestFitMaxWidth = 45
Width = 60
end
object cxGridViewFAMILIA: TcxGridDBColumn
Caption = 'Familia'
DataBinding.FieldName = 'FAMILIA'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn
Caption = 'Proveedor'
DataBinding.FieldName = 'NOMBRE_PROVEEDOR'
BestFitMaxWidth = 120
Width = 120
end
object cxGridViewREFERENCIA_PROV: TcxGridDBColumn
Caption = 'Ref. proveedor'
DataBinding.FieldName = 'REFERENCIA_PROV'
BestFitMaxWidth = 60
Width = 60
end
object cxGridViewPRECIO_COSTE: TcxGridDBColumn
Caption = 'Precio material'
DataBinding.FieldName = 'PRECIO_COSTE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewDESCUENTO: TcxGridDBColumn
Caption = 'Descuento'
DataBinding.FieldName = 'DESCUENTO'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_NETO: TcxGridDBColumn
Caption = 'Precio coste'
DataBinding.FieldName = 'PRECIO_NETO'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_PORTE: TcxGridDBColumn
Caption = 'Precio porte'
DataBinding.FieldName = 'PRECIO_PORTE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
Visible = False
BestFitMaxWidth = 60
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
VisibleForCustomization = False
end
object cxGridViewMARGEN: TcxGridDBColumn
Caption = 'Margen'
DataBinding.FieldName = 'PARAM_MARGEN'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Visible = False
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn
Caption = 'Precio P.V.P (solo suministro)'
DataBinding.FieldName = 'PRECIO_PVP_VENTA'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
GroupSummaryAlignment = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'ID_PROVEEDOR'
Visible = False
VisibleForCustomization = False
end
object cxGridViewTIEMPO: TcxGridDBColumn
Caption = 'Tiempo min'
DataBinding.FieldName = 'TIEMPO'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.Alignment.Horz = taRightJustify
Visible = False
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPARAM_TIEMPO: TcxGridDBColumn
DataBinding.FieldName = 'PARAM_TIEMPO'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
Visible = False
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewMANO_OBRA: TcxGridDBColumn
DataBinding.FieldName = 'MANO_OBRA'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
Visible = False
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn
DataBinding.FieldName = 'PRECIO_PVP_TOTAL'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
end
inherited cxGridLevel: TcxGridLevel
Caption = 'Todos los art'#237'culos'
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 715
ExplicitWidth = 715
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 715
inherited dxLayoutControl1: TdxLayoutControl
Width = 715
ExplicitWidth = 715
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 618
Width = 618
end
inherited eLista: TcxComboBox
Properties.DropDownRows = 20
Properties.OnChange = nil
ExplicitWidth = 71
Width = 71
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup
inherited dxLayoutControl1Item2: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item3: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item4: TdxLayoutItem
Visible = True
end
end
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 715
ExplicitWidth = 715
inherited tbxBotones: TTBXToolbar
Width = 705
ExplicitWidth = 705
end
end
end
inherited ActionList1: TActionList
inherited actQuitarFiltro: TAction
OnExecute = frViewFiltroBase1actQuitarFiltroExecute
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 436
Visible = True
ExplicitTop = 436
ExplicitWidth = 715
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 715
ExplicitWidth = 715
inherited TBXToolbar1: TTBXToolbar
Width = 705
ExplicitWidth = 705
object TBXSeparatorItem1: TTBXSeparatorItem
end
object TBXItem3: TTBXItem
Action = actFamilia
end
object TBXSeparatorItem2: TTBXSeparatorItem
end
object TBXItem2: TTBXItem
Action = actProveedor
end
object TBXSeparatorItem3: TTBXSeparatorItem
end
object TBXItem4: TTBXItem
Action = actFabricante
end
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 38673.842406053240000000
BuiltInReportLink = True
end
end
inherited ActionList1: TActionList
Left = 360
Top = 280
object actFamilia: TAction
Caption = 'Familia'
OnExecute = actFamiliaExecute
OnUpdate = actFamiliaUpdate
end
object actProveedor: TAction
Caption = 'Proveedor'
OnExecute = actProveedorExecute
OnUpdate = actProveedorUpdate
end
object actFabricante: TAction
Caption = 'Fabricante'
OnExecute = actFabricanteExecute
OnUpdate = actFabricanteUpdate
end
end
inherited GridPNGImageList: TPngImageList
PngImages = <
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
61000000097048597300000B1300000B1301009A9C1800000A4F694343505068
6F746F73686F70204943432070726F66696C65000078DA9D53675453E9163DF7
DEF4424B8880944B6F5215082052428B801491262A2109104A8821A1D91551C1
114545041BC8A088038E8E808C15512C0C8A0AD807E421A28E83A3888ACAFBE1
7BA36BD6BCF7E6CDFEB5D73EE7ACF39DB3CF07C0080C9648335135800CA9421E
11E083C7C4C6E1E42E40810A2470001008B3642173FD230100F87E3C3C2B22C0
07BE000178D30B0800C04D9BC0301C87FF0FEA42995C01808401C07491384B08
801400407A8E42A600404601809D98265300A0040060CB6362E300502D006027
7FE6D300809DF8997B01005B94211501A09100201365884400683B00ACCF568A
450058300014664BC43900D82D00304957664800B0B700C0CE100BB200080C00
305188852900047B0060C8232378008499001446F2573CF12BAE10E72A000078
99B23CB9243945815B082D710757572E1E28CE49172B14366102619A402EC279
99193281340FE0F3CC0000A0911511E083F3FD78CE0EAECECE368EB60E5F2DEA
BF06FF226262E3FEE5CFAB70400000E1747ED1FE2C2FB31A803B06806DFEA225
EE04685E0BA075F78B66B20F40B500A0E9DA57F370F87E3C3C45A190B9D9D9E5
E4E4D84AC4425B61CA577DFE67C25FC057FD6CF97E3CFCF7F5E0BEE22481325D
814704F8E0C2CCF44CA51CCF92098462DCE68F47FCB70BFFFC1DD322C44962B9
582A14E35112718E449A8CF332A52289429229C525D2FF64E2DF2CFB033EDF35
00B06A3E017B912DA85D6303F64B27105874C0E2F70000F2BB6FC1D428080380
6883E1CF77FFEF3FFD47A02500806649927100005E44242E54CAB33FC7080000
44A0812AB0411BF4C1182CC0061CC105DCC10BFC6036844224C4C24210420A64
801C726029AC82422886CDB01D2A602FD4401D34C051688693700E2EC255B80E
3D700FFA61089EC128BC81090441C808136121DA8801628A58238E08179985F8
21C14804128B2420C9881451224B91354831528A542055481DF23D720239875C
46BA913BC8003282FC86BC47319481B2513DD40CB543B9A8371A8446A20BD064
74319A8F16A09BD072B41A3D8C36A1E7D0AB680FDA8F3E43C730C0E8180733C4
6C302EC6C342B1382C099363CBB122AC0CABC61AB056AC03BB89F563CFB17704
128145C0093604774220611E4148584C584ED848A8201C243411DA0937090384
51C2272293A84BB426BA11F9C4186232318758482C23D6128F132F107B8843C4
37241289433227B9900249B1A454D212D246D26E5223E92CA99B34481A2393C9
DA646BB20739942C202BC885E49DE4C3E433E41BE421F25B0A9D624071A4F853
E22852CA6A4A19E510E534E5066598324155A39A52DDA8A15411358F5A42ADA1
B652AF5187A81334759A39CD8316494BA5ADA295D31A681768F769AFE874BA11
DD951E4E97D057D2CBE947E897E803F4770C0D861583C7886728199B18071867
197718AF984CA619D38B19C754303731EB98E7990F996F55582AB62A7C1591CA
0A954A9526951B2A2F54A9AAA6AADEAA0B55F355CB548FA95E537DAE46553353
E3A909D496AB55AA9D50EB531B5367A93BA887AA67A86F543FA47E59FD890659
C34CC34F43A451A0B15FE3BCC6200B6319B3782C216B0DAB86758135C426B1CD
D97C762ABB98FD1DBB8B3DAAA9A13943334A3357B352F394663F07E39871F89C
744E09E728A797F37E8ADE14EF29E2291BA6344CB931655C6BAA96979658AB48
AB51AB47EBBD36AEEDA79DA6BD45BB59FB810E41C74A275C2747678FCE059DE7
53D953DDA70AA7164D3D3AF5AE2EAA6BA51BA1BB4477BF6EA7EE989EBE5E809E
4C6FA7DE79BDE7FA1C7D2FFD54FD6DFAA7F5470C5806B30C2406DB0CCE183CC5
35716F3C1D2FC7DBF151435DC34043A561956197E18491B9D13CA3D5468D460F
8C69C65CE324E36DC66DC6A326062621264B4DEA4DEE9A524DB9A629A63B4C3B
4CC7CDCCCDA2CDD699359B3D31D732E79BE79BD79BDFB7605A785A2CB6A8B6B8
6549B2E45AA659EEB6BC6E855A3959A558555A5DB346AD9DAD25D6BBADBBA711
A7B94E934EAB9ED667C3B0F1B6C9B6A9B719B0E5D806DBAEB66DB67D61676217
67B7C5AEC3EE93BD937DBA7D8DFD3D070D87D90EAB1D5A1D7E73B472143A563A
DE9ACE9CEE3F7DC5F496E92F6758CF10CFD833E3B613CB29C4699D539BD34767
1767B97383F3888B894B82CB2E973E2E9B1BC6DDC8BDE44A74F5715DE17AD2F5
9D9BB39BC2EDA8DBAFEE36EE69EE87DC9FCC349F299E593373D0C3C843E051E5
D13F0B9F95306BDFAC7E4F434F8167B5E7232F632F9157ADD7B0B7A577AAF761
EF173EF63E729FE33EE33C37DE32DE595FCC37C0B7C8B7CB4FC36F9E5F85DF43
7F23FF64FF7AFFD100A78025016703898141815B02FBF87A7C21BF8E3F3ADB65
F6B2D9ED418CA0B94115418F82AD82E5C1AD2168C8EC90AD21F7E798CE91CE69
0E85507EE8D6D00761E6618BC37E0C2785878557863F8E7088581AD131973577
D1DC4373DF44FA449644DE9B67314F39AF2D4A352A3EAA2E6A3CDA37BA34BA3F
C62E6659CCD5589D58496C4B1C392E2AAE366E6CBEDFFCEDF387E29DE20BE37B
17982FC85D7079A1CEC2F485A716A92E122C3A96404C884E3894F041102AA816
8C25F21377258E0A79C21DC267222FD136D188D8435C2A1E4EF2482A4D7A92EC
91BC357924C533A52CE5B98427A990BC4C0D4CDD9B3A9E169A76206D323D3ABD
31839291907142AA214D93B667EA67E66676CBAC6585B2FEC56E8BB72F1E9507
C96BB390AC05592D0AB642A6E8545A28D72A07B267655766BFCD89CA3996AB9E
2BCDEDCCB3CADB90379CEF9FFFED12C212E192B6A5864B572D1D58E6BDAC6A39
B23C7179DB0AE315052B865606AC3CB88AB62A6DD54FABED5797AE7EBD267A4D
6B815EC1CA82C1B5016BEB0B550AE5857DEBDCD7ED5D4F582F59DFB561FA869D
1B3E15898AAE14DB1797157FD828DC78E51B876FCABF99DC94B4A9ABC4B964CF
66D266E9E6DE2D9E5B0E96AA97E6970E6E0DD9DAB40DDF56B4EDF5F645DB2F97
CD28DBBB83B643B9A3BF3CB8BC65A7C9CECD3B3F54A454F454FA5436EED2DDB5
61D7F86ED1EE1B7BBCF634ECD5DB5BBCF7FD3EC9BEDB5501554DD566D565FB49
FBB3F73FAE89AAE9F896FB6D5DAD4E6D71EDC703D203FD07230EB6D7B9D4D51D
D23D54528FD62BEB470EC71FBEFE9DEF772D0D360D558D9CC6E223704479E4E9
F709DFF71E0D3ADA768C7BACE107D31F761D671D2F6A429AF29A469B539AFB5B
625BBA4FCC3ED1D6EADE7AFC47DB1F0F9C343C59794AF354C969DAE982D39367
F2CF8C9D959D7D7E2EF9DC60DBA2B67BE763CEDF6A0F6FEFBA1074E1D245FF8B
E73BBC3BCE5CF2B874F2B2DBE51357B8579AAF3A5F6DEA74EA3CFE93D34FC7BB
9CBB9AAEB95C6BB9EE7ABDB57B66F7E91B9E37CEDDF4BD79F116FFD6D59E393D
DDBDF37A6FF7C5F7F5DF16DD7E7227FDCECBBBD97727EEADBC4FBC5FF440ED41
D943DD87D53F5BFEDCD8EFDC7F6AC077A0F3D1DC47F7068583CFFE91F58F0F43
058F998FCB860D86EB9E383E3939E23F72FDE9FCA743CF64CF269E17FEA2FECB
AE17162F7EF8D5EBD7CED198D1A197F29793BF6D7CA5FDEAC0EB19AFDBC6C2C6
1EBEC97833315EF456FBEDC177DC771DEFA3DF0F4FE47C207F28FF68F9B1F553
D0A7FB93199393FF040398F3FC63332DDB000000434944415478DA63FCFFFF3F
03258011D900464646ACA601D530126D00BA6298A1B80C21CA0090183639925C
80CB3B040DC0E69A510306BD010C04005E03C801036F00008D248BE16F9028BA
0000000049454E44AE426082}
Name = 'Icono_header'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
610000000970485973000017120000171201679FD2520000022E4944415478DA
8D93CF6BD36018C7BF6997A45DD376EA70CA18D31D44981741280C44119DA83D
C87619781A1EFD1BC49B2028B28353141111A43BE8CD934E65A8D4A1686B61B5
A31DD8CCBAFEDAACEDF226B389EFFB26CBCC54E6030FEFCB4B3E9FE79B9744B0
2C0B8220E0F7BA3AB2D75A282DE07F4AD82C60F0851B8F50530BF85EF98A6236
8DCCAB69B0B366BD8C95B24ACF4BB877FD226AFD635EC13A5CF99243A356869A
4D51F8398799EC476D09E5621E0F6F5EC6C8D938EE7C503604EB7055CDA34127
A8B90C3ECD3CE570A35AA2FD0DCB4B2AEE4F5CC29953C35094102667655B706D
7480C3F97412AD951AAAC502E6DEBCE47031974673B942BB8AA9DB57103F7D12
9D9D413ED4154C8C0BD6FCE7AD2F6C2816C3CE9E6E8862077C3E9F57307CE2FC
1F80655A308C35E844C7B3273318D8D78FE8B6282449A41211B7DE05FE2D304D
13866EC34433F0FAC55BF4EDE945A42B0C910A6459C6DD94F27781D936F964B2
AADB02DAEF9329ECEEED4138A240944548B2840773DBBD02B637596C6238205D
352AD175643E66B1A3BB0B0A15489204292061AAB0CB2B68D3C96B34367120BE
3AB2F96C01E1A8825028083920F35778BCD8B721387E6C9C42060788465C50A3
12B24AB0582C2110946907282C61BA3588442221B882C343E75C50A30093B104
84D849EAD53AFC1D7E0ECFFA631C76FF0526387470D4135977405B62A0D56CB2
C791891C71618FE0C0FEB873618623B2E33361FB679B4A340A1FF5C01E41928C
6DF9256E8659FD02D3B7960923D6946A0000000049454E44AE426082}
Name = 'PngImage2'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
61000000B64944415478DA6364A010300E2A031C80B800CA9E00C407408C008F
00850F3F3E2C3870E080032103E09A900D031AD0B061C70607A8185E03FE03B1
2094FD1E24E7E0E12070E1C2850D1F5E7C4800F21F90EC0207078702A0D30370
D94E300C0404040E7CF8F0A101C960BC06A000A0ED0140DB0BA006630D604206
00F51F0029DE802B80711A000C798703270E34009D0FF33B4600E335C0C0C0E0
0028F4A136630D60425E00290685FE075C014C300C8805036F00007263471179
E402210000000049454E44AE426082}
Name = 'PngImage1'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
61000000E54944415478DADD902172C3301045BF4F10C3320B9645B0ACEE0D7C
83F806F5110C0BD51B6C99A160E1C2C085850B0D372C655965DCA28C3D9DB27C
CD8E44FEDBFF55E19FAAEE104013B77EF53ED100B3595967637A1B7813B098C7
F8149E435DC3CE807C29F2943FD48C784ABC0520371FF64D83D377597FF201F8
28C899DE39D3B005D0AE8B0DB0FB3597143A2B98195EA3DA0248DBC67D79FF98
B100682278857540224EF131BCD64BFF62363FE215540594C675C098728BB3F5
2184031C72DDAE1EFFC89EC85EE493D63FB1A81F526BA65D7808BDA8EE1C0611
B969BE09F8ABEE007001C1D97F1131BF40440000000049454E44AE426082}
Name = 'PngImage3'
Background = clWindow
end>
Bitmap = {}
end
end

View File

@ -0,0 +1,296 @@
unit uViewArticulosPorProveedor;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewGrid, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, uDADataTable, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, uBizArticulos, ActnList, Menus,
cxGridBandedTableView, cxGridDBBandedTableView, JvComponent,
JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn,
dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk,
cxGridCustomPopupMenu, cxGridPopupMenu, cxCurrencyEdit, cxSpinEdit, cxCheckBox,
cxCheckComboBox, cxImageComboBox, TB2Item, TBX, TB2Toolbar, TBXDkPanels,
TB2Dock, uViewFiltroBase, dxPgsDlg, uDAInterfaces, dxSkinsCore, dxSkinBlack,
dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary,
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, uArticulosController, uViewArticulos;
type
TfrViewArticulosPorProveedor = class(TfrViewGrid, IViewArticulos)
cxGridViewREFERENCIA: TcxGridDBColumn;
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewFAMILIA: TcxGridDBColumn;
cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn;
actFamilia: TAction;
actProveedor: TAction;
TBXItem2: TTBXItem;
TBXItem3: TTBXItem;
TBXSeparatorItem1: TTBXSeparatorItem;
TBXSeparatorItem2: TTBXSeparatorItem;
cxGridViewINVENTARIABLE: TcxGridDBColumn;
cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn;
cxGridViewFABRICANTE: TcxGridDBColumn;
TBXItem4: TTBXItem;
TBXSeparatorItem3: TTBXSeparatorItem;
actFabricante: TAction;
cxGridViewREFERENCIA_FABR: TcxGridDBColumn;
cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn;
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
cxGridViewMARGEN: TcxGridDBColumn;
cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn;
cxGridViewTIEMPO: TcxGridDBColumn;
cxGridViewPARAM_TIEMPO: TcxGridDBColumn;
cxGridViewMANO_OBRA: TcxGridDBColumn;
procedure actProveedorExecute(Sender: TObject);
procedure actProveedorUpdate(Sender: TObject);
procedure actFamiliaExecute(Sender: TObject);
procedure actFamiliaUpdate(Sender: TObject);
procedure actFabricanteExecute(Sender: TObject);
procedure actFabricanteUpdate(Sender: TObject);
procedure cxGridView2DataControllerCompare(ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
procedure OnFiltroBaseListaPropertiesChange(Sender: TObject);
procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
private
FListaProveedores: TStringList;
//Filtros relativos a la vista
procedure AnadirFiltroProveedores;
protected
FArticulos: IBizArticulo;
FController: IArticulosController;
function GetArticulos: IBizArticulo; virtual;
procedure SetArticulos(const Value: IBizArticulo); virtual;
function GetController : IArticulosController;
procedure SetController (const Value : IArticulosController);
public
property Articulos: IBizArticulo read GetArticulos write SetArticulos;
property Controller : IArticulosController read GetController write SetController;
procedure AnadirOtrosFiltros; override;
end;
implementation
{$R *.dfm}
uses
schArticulosClient_Intf, uReferenciasUtils, cxVariants;
{ TfrViewArticulos }
{
******************************* TfrViewArticulos *******************************
}
function TfrViewArticulosPorProveedor.GetArticulos: IBizArticulo;
begin
Result := FArticulos;
end;
function TfrViewArticulosPorProveedor.GetController: IArticulosController;
begin
Result := FController;
end;
procedure TfrViewArticulosPorProveedor.SetArticulos(const Value: IBizArticulo);
begin
FArticulos := Value;
if Assigned(FArticulos) then
dsDataSource.DataTable := FArticulos.DataTable;
end;
procedure TfrViewArticulosPorProveedor.SetController(const Value: IArticulosController);
var
i: Integer;
begin
FController := Value;
//Rellenamos la lista de proveedores con articulos
if Assigned(FController) then
begin
FListaProveedores := FController.DarListaProveedoresConArticulos;
with frViewFiltroBase1.eLista.Properties.Items do
begin
BeginUpdate;
try
Clear;
Add('Todos');
for i := 0 to FListaProveedores.Count - 1 do
Add(FListaProveedores.Names[i]);
frViewFiltroBase1.eLista.ItemIndex := 0;
finally
EndUpdate;
end;
end;
end;
end;
procedure TfrViewArticulosPorProveedor.actFabricanteExecute(Sender: TObject);
begin
if (cxGridViewFABRICANTE.GroupIndex < 0) then
begin
cxGridViewFABRICANTE.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewFABRICANTE.Visible := False;
end
else
begin
cxGridViewFABRICANTE.GroupIndex := -1;
cxGridViewFABRICANTE.Visible := True;
end;
end;
procedure TfrViewArticulosPorProveedor.actFabricanteUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewFABRICANTE.GroupIndex < 0);
end;
procedure TfrViewArticulosPorProveedor.actFamiliaExecute(Sender: TObject);
begin
if (cxGridViewFAMILIA.GroupIndex < 0) then
begin
cxGridViewFAMILIA.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewFAMILIA.Visible := False;
end
else
begin
cxGridViewFAMILIA.GroupIndex := -1;
cxGridViewFAMILIA.Visible := True;
end;
end;
procedure TfrViewArticulosPorProveedor.actFamiliaUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewFAMILIA.GroupIndex < 0);
end;
procedure TfrViewArticulosPorProveedor.actProveedorExecute(Sender: TObject);
begin
inherited;
if (cxGrid.ActiveLevel.Tag = 1) then
if (cxGridViewNOMBRE_PROVEEDOR.GroupIndex < 0) then
begin
cxGridViewNOMBRE_PROVEEDOR.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewNOMBRE_PROVEEDOR.Visible := False;
end
else
begin
cxGridViewNOMBRE_PROVEEDOR.GroupIndex := -1;
cxGridViewNOMBRE_PROVEEDOR.Visible := True;
end;
end;
procedure TfrViewArticulosPorProveedor.actProveedorUpdate(Sender: TObject);
begin
inherited;
if (cxGrid.ActiveLevel.Tag = 1) then
begin
(Sender as TAction).Enabled := True;
(Sender as TAction).Checked := not (cxGridViewNOMBRE_PROVEEDOR.GroupIndex < 0);
end
else
(Sender as TAction).Enabled := False;
end;
procedure TfrViewArticulosPorProveedor.AnadirFiltroProveedores;
var
FFiltro : TcxFilterCriteriaItemList;
CodigoProveedor: Variant;
Index: Integer;
begin
//Solo se aplica este filtro en el caso de tener activo el panel de detalle de filtro
//y sobre la lista de articulos detallada por proveedor
if frViewFiltroBase1.Visible then
begin
if VarIsNull(frViewFiltroBase1.eLista.EditValue) then
CodigoProveedor := frViewFiltroBase1.eLista.EditValue
else
CodigoProveedor := FListaProveedores.Values[frViewFiltroBase1.eLista.EditValue];
if not VarIsNull(CodigoProveedor)
and (VarToStr(CodigoProveedor) <> '') then
begin
FFiltro := AddFilterGrid(fboAnd);
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, CodigoProveedor, CodigoProveedor);
cxGridViewNOMBRE_PROVEEDOR.Visible := False;
end
else
cxGridViewNOMBRE_PROVEEDOR.Visible := True;
end;
end;
procedure TfrViewArticulosPorProveedor.AnadirOtrosFiltros;
begin
inherited;
AnadirFiltroProveedores;
//Finalmente activamos el filtro si tenemos algo
if cxGridView.DataController.Filter.IsEmpty
then cxGridView.DataController.Filter.Active := False
else cxGridView.DataController.Filter.Active := True;
cxGrid.ActiveLevel.GridView := cxGridView;
end;
procedure TfrViewArticulosPorProveedor.CustomViewCreate(Sender: TObject);
begin
inherited;
FListaProveedores := Nil;
Controller := TArticulosController.Create;
end;
procedure TfrViewArticulosPorProveedor.CustomViewDestroy(Sender: TObject);
begin
inherited;
frViewFiltroBase1.eLista.Properties.OnChange := Nil;
FreeAndNil(FListaProveedores);
end;
procedure TfrViewArticulosPorProveedor.CustomViewShow(Sender: TObject);
begin
inherited;
AjustarAncho;
frViewFiltroBase1.eLista.Properties.OnChange := OnFiltroBaseListaPropertiesChange;
end;
procedure TfrViewArticulosPorProveedor.cxGridView2DataControllerCompare(
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
begin
inherited;
if ((AItemIndex = cxGridViewREFERENCIA.Index)) and
(VarType(V1) = VarType(V2)) and (VarType(V1) = varString) then
Compare := CompararReferencias(V1, V2)
else
Compare := VarCompare(V1, V2);
end;
procedure TfrViewArticulosPorProveedor.frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject);
begin
frViewFiltroBase1.txtFiltroTodo.Clear;
frViewFiltroBase1.eLista.Clear;
end;
procedure TfrViewArticulosPorProveedor.OnFiltroBaseListaPropertiesChange(Sender: TObject);
begin
inherited;
RefrescarFiltro;
end;
end.

View File

@ -0,0 +1,107 @@
inherited frViewArticulosProveedores: TfrViewArticulosProveedores
Width = 774
Height = 513
OnShow = CustomViewShow
ExplicitWidth = 774
ExplicitHeight = 513
inherited cxGrid: TcxGrid
Width = 774
Height = 488
ExplicitWidth = 774
ExplicitHeight = 488
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'RecID'
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'ID_PROVEEDOR'
PropertiesClassName = 'TcxTextEditProperties'
Visible = False
VisibleForCustomization = False
end
object cxGridViewPROVEEDOR: TcxGridDBColumn
Caption = 'Proveedor'
DataBinding.FieldName = 'ID_PROVEEDOR'
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.ImmediatePost = True
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
SortOrder = soAscending
FieldName = 'NOMBRE'
end>
Properties.ListOptions.GridLines = glNone
Properties.ListOptions.ShowHeader = False
Properties.ListOptions.SyncMode = True
Properties.ListSource = dsProveedores
Properties.OnEditValueChanged = cxGridViewPROVEEDORPropertiesEditValueChanged
end
object cxGridViewREFERENCIA_PROV: TcxGridDBColumn
Caption = 'Ref. proveedor'
DataBinding.FieldName = 'REFERENCIA_PROV'
end
object cxGridViewPRECIO_COSTE: TcxGridDBColumn
Caption = 'Precio material'
DataBinding.FieldName = 'PRECIO_COSTE'
end
object cxGridViewDESCUENTO: TcxGridDBColumn
Caption = 'Descuento'
DataBinding.FieldName = 'DESCUENTO'
PropertiesClassName = 'TcxSpinEditProperties'
Properties.ImmediatePost = True
Properties.MaxValue = 100.000000000000000000
BestFitMaxWidth = 30
FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify
Width = 30
end
object cxGridViewPRECIO_NETO: TcxGridDBColumn
Caption = 'Precio coste'
DataBinding.FieldName = 'PRECIO_NETO'
Options.Editing = False
end
object cxGridViewPRECIO_PORTE: TcxGridDBColumn
Caption = 'Porte'
DataBinding.FieldName = 'PRECIO_PORTE'
Visible = False
VisibleForCustomization = False
end
object cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn
Caption = 'Precio P.V.P (Suministro)'
DataBinding.FieldName = 'PRECIO_PVP_VENTA'
Options.Editing = False
end
object cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn
Caption = 'Precio P.V.P (Total)'
DataBinding.FieldName = 'PRECIO_PVP_TOTAL'
Options.Editing = False
end
object cxGridViewID_ARTICULO: TcxGridDBColumn
DataBinding.FieldName = 'ID_ARTICULO'
end
end
end
inherited ToolBar1: TToolBar
Width = 774
ExplicitWidth = 774
inherited ToolButton1: TToolButton
ExplicitWidth = 62
end
inherited ToolButton4: TToolButton
ExplicitWidth = 74
end
inherited ToolButton2: TToolButton
ExplicitWidth = 67
end
inherited ToolButton7: TToolButton
ExplicitWidth = 117
end
end
inherited ActionListContenido: TActionList
inherited actModificar: TAction
Visible = False
end
end
object dsProveedores: TDADataSource
Left = 72
Top = 144
end
end

View File

@ -0,0 +1,136 @@
unit uViewArticulosProveedores;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewBase, uViewDetallesGenerico, cxStyles, cxCustomData, cxGraphics,
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, ImgList,
PngImageList, uDADataTable, ComCtrls, ToolWin, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, cxDBLookupComboBox, cxSpinEdit,
uBizContactos, uProveedoresController, uDAInterfaces, dxSkinsCore,
dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, uBizArticulos, uArticulosController,
cxTextEdit;
type
IViewArticulosProveedores = interface(IViewBase)
['{65206152-786D-47AE-A037-5EF480BC056C}']
function GetArticulo: IBizArticulo;
procedure SetArticulo(const Value: IBizArticulo);
property Articulo: IBizArticulo read GetArticulo write SetArticulo;
function GetController : IArticulosController;
procedure SetController (const Value : IArticulosController);
property Controller : IArticulosController read GetController write SetController;
end;
TfrViewArticulosProveedores = class(TfrViewDetallesGenerico, IViewArticulosProveedores)
dsProveedores: TDADataSource;
cxGridViewPROVEEDOR: TcxGridDBColumn;
cxGridViewDESCUENTO: TcxGridDBColumn;
cxGridViewREFERENCIA_PROV: TcxGridDBColumn;
cxGridViewPRECIO_COSTE: TcxGridDBColumn;
cxGridViewPRECIO_NETO: TcxGridDBColumn;
cxGridViewPRECIO_PORTE: TcxGridDBColumn;
cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn;
cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn;
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
cxGridViewID_ARTICULO: TcxGridDBColumn;
procedure cxGridViewPROVEEDORPropertiesEditValueChanged(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
protected
FArticulo: IBizArticulo;
FController: IArticulosController;
FProvController : IProveedoresController;
FProveedores : IBizProveedor;
function GetArticulo: IBizArticulo;
procedure SetArticulo(const Value: IBizArticulo);
function GetController : IArticulosController;
procedure SetController (const Value : IArticulosController);
procedure AnadirInterno; override;
public
property Articulo: IBizArticulo read GetArticulo write SetArticulo;
property Controller : IArticulosController read GetController write SetController;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{$R *.dfm}
procedure TfrViewArticulosProveedores.AnadirInterno;
begin
dsDetalles.DataTable.Append;
end;
constructor TfrViewArticulosProveedores.Create(AOwner: TComponent);
begin
inherited;
FProvController := TProveedoresController.Create;
FProveedores := (FProvController.BuscarTodos as IBizProveedor);
dsProveedores.DataTable := FProveedores.DataTable;
if not dsProveedores.DataTable.Active then
dsProveedores.DataTable.Active := True;
end;
procedure TfrViewArticulosProveedores.CustomViewShow(Sender: TObject);
begin
inherited;
cxGridView.ApplyBestFit;
end;
procedure TfrViewArticulosProveedores.cxGridViewPROVEEDORPropertiesEditValueChanged(Sender: TObject);
begin
inherited;
//Signamos el descuento del proveedor seleccionado
if not Articulo.Proveedores.DataTable.Editing then
Articulo.Proveedores.DataTable.Edit;
Articulo.Proveedores.DESCUENTO := FProveedores.DESCUENTO;
end;
destructor TfrViewArticulosProveedores.Destroy;
begin
if dsProveedores.DataTable.Active then
dsProveedores.DataTable.Active := False;
FProveedores := NIL;
FProvController := NIL;
inherited;
end;
function TfrViewArticulosProveedores.GetArticulo: IBizArticulo;
begin
Result := FArticulo;
end;
function TfrViewArticulosProveedores.GetController: IArticulosController;
begin
Result := FController;
end;
procedure TfrViewArticulosProveedores.SetArticulo(const Value: IBizArticulo);
begin
FArticulo := Value;
dsDetalles.DataTable := FArticulo.Proveedores.DataTable;
end;
procedure TfrViewArticulosProveedores.SetController(const Value: IArticulosController);
begin
FController := Value;
end;
end.

View File

@ -2,89 +2,50 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
ParentBiDiMode = False
OnShow = CustomViewShow
inherited ToolBar1: TToolBar
Height = 100
ExplicitHeight = 100
inherited ToolButton14: TToolButton
Wrap = False
end
inherited ToolButton9: TToolButton [5]
Left = 121
Top = 22
ExplicitLeft = 121
ExplicitTop = 22
end
inherited FontName: TJvFontComboBox [6]
Left = 266
Top = 22
ExplicitLeft = 266
ExplicitTop = 22
inherited FontSize: TEdit
Width = 42
ExplicitWidth = 42
end
inherited UpDown1: TUpDown
Left = 411
Top = 22
Left = 187
Width = 17
ExplicitLeft = 411
ExplicitTop = 22
ExplicitLeft = 187
ExplicitWidth = 17
end
inherited ToolButton13: TToolButton
Left = 0
Top = 22
Wrap = True
ExplicitLeft = 0
ExplicitTop = 22
ExplicitHeight = 27
Left = 204
ExplicitLeft = 204
end
inherited ToolButton6: TToolButton
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
Left = 212
ExplicitLeft = 212
end
inherited ToolButton7: TToolButton
Left = 66
Top = 49
ExplicitLeft = 66
ExplicitTop = 49
Left = 278
ExplicitLeft = 278
end
inherited FontSize: TEdit [11]
Left = 133
Top = 49
Width = 42
ExplicitLeft = 133
ExplicitTop = 49
ExplicitWidth = 42
inherited ToolButton8: TToolButton
Left = 345
ExplicitLeft = 345
end
inherited ToolButton11: TToolButton [12]
Left = 175
Top = 49
ExplicitLeft = 175
ExplicitTop = 49
inherited ToolButton12: TToolButton
Left = 428
ExplicitLeft = 428
end
inherited ToolButton12: TToolButton [13]
Left = 0
Top = 49
Wrap = True
ExplicitLeft = 0
ExplicitTop = 49
ExplicitHeight = 27
inherited ToolButton9: TToolButton
Left = 436
ExplicitLeft = 436
end
inherited ToolButton10: TToolButton
Left = 0
Top = 76
ExplicitLeft = 0
ExplicitTop = 76
Left = 581
ExplicitLeft = 581
end
inherited ToolButton8: TToolButton [15]
Left = 125
Top = 76
ExplicitLeft = 125
ExplicitTop = 76
inherited ToolButton11: TToolButton
Left = 706
ExplicitLeft = 706
end
end
inherited cxGrid: TcxGrid
Top = 126
Height = 178
ExplicitTop = 99
ExplicitHeight = 205
inherited cxGridView: TcxGridDBTableView
@ -154,7 +115,6 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
Width = 60
end
inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn
OnGetProperties = cxGridViewIMPORTEUNIDADGetProperties
BestFitMaxWidth = 50
Width = 80
end
@ -176,7 +136,6 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
end
end
inherited TBXDock1: TTBXDock
Top = 100
ExplicitTop = 68
inherited TBXToolbar1: TTBXToolbar
inherited TBXSubmenuItem1: TTBXSubmenuItem

View File

@ -56,10 +56,6 @@ type
Sender: TObject; AButtonIndex: Integer);
procedure cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick(
Sender: TObject; AButtonIndex: Integer);
procedure cxGridViewIMPORTEUNIDADGetProperties(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
procedure cxGridViewIMPORTEUNIDAD_OnInitPopup(Sender: TObject);
private
procedure RecuperarListaUnidadesMedida;
protected
@ -151,102 +147,6 @@ begin
SeleccionarFilaActual;
end;
procedure TfrViewDetallesArticulos.cxGridViewIMPORTEUNIDAD_OnInitPopup(
Sender: TObject);
var
AIndiceCol : Integer;
AIDArticulo : Variant;
begin
inherited;
AIndiceCol := cxGridView.DataController.GetItemByFieldName('REFERENCIA').Index;
AIDArticulo := cxGridView.DataController.Values[cxGridView.DataController.FocusedRecordIndex, AIndiceCol];
with cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties do
begin
BeginUpdate;
Items.BeginUpdate;
try
Items.Clear;
Items.Add('1');
Items.Add('2');
Items.Add('3');
Items.Add(VarToStr(AIDArticulo));
finally
Items.EndUpdate;
EndUpdate;
end;
end;
{
DADataSource.DataTable.DisableControls;
try
IndiceCol := cxGridView.DataController.GetItemByFieldName('ID_ARTICULO').Index;
IdArticulo := cxGridView.DataController.Values[Sender.DataBinding.DataController.FocusedRecordIndex, IndiceCol];
if not VarIsNull(IdArticulo)
and (IdArticulo > 0) then
begin
//Lo tratamos como combox
AProperties := cxEditRepository1ComboBoxItem1.Properties;
with TcxComboBoxProperties(cxGridViewIMPORTEUNIDAD.Properties).Items do
begin
ShowHourglassCursor;
BeginUpdate;
try
Clear;
AddStrings((Controller as IControllerDetallesArticulos).DarPrecioPVPVenta(IdArticulo));
finally
EndUpdate;
HideHourglassCursor;
end;
end
end
else
AProperties := cxEditRepository1CurrencyItem1.properties;
// cxGridViewIMPORTEUNIDAD.PropertiesClassName := 'TcxCurrencyEditProperties';
finally
DADataSource.DataTable.EnableControls;
end;}
end;
procedure TfrViewDetallesArticulos.cxGridViewIMPORTEUNIDADGetProperties(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
var
Aux_IDArticulo: Variant;
begin
Aux_IDArticulo := Null;
cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties.Items.Clear;
if (_FocusedView.DataController.RecordCount > 0) then
begin
Aux_IDArticulo := ARecord.Values[cxGridViewID_ARTICULO.Index];
if not VarIsNull(Aux_IDArticulo) and (Aux_IDArticulo > 0) then
begin
with cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties do
begin
ShowHourglassCursor;
Items.BeginUpdate;
try
Items.Clear;
Items.AddStrings((Controller as IControllerDetallesArticulos).DarPrecioPVPVenta(Aux_IDArticulo));
finally
Items.EndUpdate;
HideHourglassCursor;
end;
end;
AProperties := cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties;
end
else begin
AProperties := cxEditRepositoryCurrencyItem_IMPORTEUNIDAD.Properties;
end;
end;
end;
procedure TfrViewDetallesArticulos.cxGridViewREFERENCIAPropertiesButtonClick(
Sender: TObject; AButtonIndex: Integer);
begin

View File

@ -0,0 +1,73 @@
inherited frViewDetallesArticulosParaVenta: TfrViewDetallesArticulosParaVenta
inherited ToolBar1: TToolBar
inherited FontName: TJvFontComboBox [4]
Left = 114
Top = 22
ExplicitLeft = 114
ExplicitTop = 22
end
inherited FontSize: TEdit [5]
Left = 259
Top = 22
ExplicitLeft = 259
ExplicitTop = 22
end
inherited ToolButton6: TToolButton [6]
Left = 301
ExplicitLeft = 301
end
inherited UpDown1: TUpDown [7]
Left = 367
Top = 22
ExplicitLeft = 367
ExplicitTop = 22
end
inherited ToolButton13: TToolButton [8]
Left = 384
ExplicitLeft = 384
end
inherited ToolButton14: TToolButton [9]
Left = 392
ExplicitLeft = 392
end
inherited ToolButton12: TToolButton [10]
end
inherited ToolButton9: TToolButton [11]
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton8: TToolButton [12]
Left = 145
Top = 49
Wrap = True
ExplicitLeft = 145
ExplicitTop = 49
end
inherited ToolButton10: TToolButton [13]
Left = 0
Top = 71
Wrap = False
ExplicitLeft = 0
ExplicitTop = 71
end
inherited ToolButton7: TToolButton [14]
Left = 125
Top = 71
ExplicitLeft = 125
ExplicitTop = 71
end
inherited ToolButton11: TToolButton [15]
Left = 192
ExplicitLeft = 192
end
end
inherited cxGrid: TcxGrid
ExplicitTop = 99
ExplicitHeight = 205
end
inherited TBXDock1: TTBXDock
ExplicitTop = 73
end
end

View File

@ -0,0 +1,120 @@
unit uViewDetallesArticulosParaVenta;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewDetallesArticulos, cxStyles, dxSkinsCore, dxSkinBlack,
dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary,
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, cxCustomData, cxGraphics, cxFilter,
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxCheckBox, cxImageComboBox,
cxButtonEdit, cxRichEdit, cxMaskEdit, cxDropDownEdit, cxCurrencyEdit,
cxEditRepositoryItems, Menus, cxGridCustomPopupMenu, cxGridPopupMenu, ImgList,
PngImageList, uDAInterfaces, uDADataTable, StdActns, ExtActns, ActnList,
TB2Item, TBX, TB2Dock, TB2Toolbar, cxGridLevel, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
cxGrid, ComCtrls, StdCtrls, JvExStdCtrls, JvCombobox, JvColorCombo, ToolWin;
type
TfrViewDetallesArticulosParaVenta = class(TfrViewDetallesArticulos)
procedure OnIMPORTEUNIDADGetProperties(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
procedure CustomViewDestroy(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
procedure OnIMPORTEUNIDADPropertiesEditValueChanged(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.dfm}
uses uControllerDetallesArticulos;
{ TfrViewDetallesArticulosParaVenta }
procedure TfrViewDetallesArticulosParaVenta.CustomViewDestroy(Sender: TObject);
begin
inherited;
cxGridViewIMPORTEUNIDAD.Properties.OnEditValueChanged := Nil;
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := Nil;
end;
procedure TfrViewDetallesArticulosParaVenta.CustomViewShow(Sender: TObject);
begin
inherited;
with DADataSource.DataTable do
begin
cxGridView.BeginUpdate;
try
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := OnIMPORTEUNIDADGetProperties;
finally
cxGridView.EndUpdate;
end;
end;
end;
procedure TfrViewDetallesArticulosParaVenta.OnIMPORTEUNIDADPropertiesEditValueChanged(
Sender: TObject);
begin
inherited;
cxGridView.BeginUpdate;
try
// if HayQueRecalcular(AItem) then
// begin
// if Sender.Controller.EditingController.IsEditing then
// Sender.Controller.EditingController.Edit.PostEditValue;
Controller.ActualizarTotales(Detalles);
// end;
finally
cxGridView.EndUpdate;
end;
end;
procedure TfrViewDetallesArticulosParaVenta.OnIMPORTEUNIDADGetProperties(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
var
Aux_IDArticulo: Variant;
begin
Aux_IDArticulo := Null;
cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties.Items.Clear;
if (_FocusedView.DataController.RecordCount > 0) then
begin
Aux_IDArticulo := ARecord.Values[cxGridViewID_ARTICULO.Index];
if not VarIsNull(Aux_IDArticulo) and (Aux_IDArticulo > 0) then
begin
with cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties do
begin
ShowHourglassCursor;
Items.BeginUpdate;
try
Items.Clear;
Items.AddStrings((Controller as IControllerDetallesArticulos).DarPrecioPVPVenta(Aux_IDArticulo));
finally
Items.EndUpdate;
HideHourglassCursor;
end;
end;
AProperties := cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties;
AProperties.OnEditValueChanged := OnIMPORTEUNIDADPropertiesEditValueChanged;
end
else begin
AProperties := cxEditRepositoryCurrencyItem_IMPORTEUNIDAD.Properties;
AProperties.OnEditValueChanged := OnIMPORTEUNIDADPropertiesEditValueChanged;
end;
end;
end;
end.

View File

@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FacturasCliente = '{69C46CC4-9C92-48ED-BC5C-F2A9102ECDC2}';
RID_FacturasCliente_Detalles = '{67353B9A-3348-4CA5-A9DB-114619721FAC}';
RID_FacturasCliente = '{FD805B27-D47D-4EB9-9C4A-83049E34F7C2}';
RID_FacturasCliente_Detalles = '{F90F3F16-5248-421A-AE8E-62BB89BAC55F}';
{ Data table names }
nme_FacturasCliente = 'FacturasCliente';
@ -123,7 +123,7 @@ const
type
{ IFacturasCliente }
IFacturasCliente = interface(IDAStronglyTypedDataTable)
['{273190B2-EDD5-4AE4-8774-924D1E28AEB6}']
['{8FEF79E3-8EC3-4036-A964-AA9BDFA8E393}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -554,7 +554,7 @@ type
{ IFacturasCliente_Detalles }
IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable)
['{EF027746-FBFB-4CBE-B3E6-8122C5FB2063}']
['{EFE4BA4B-0666-4263-8CD1-0E9C808DF75E}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);

View File

@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FacturasClienteDelta = '{47F2B48F-D3D8-4A91-B919-D38B47FDB832}';
RID_FacturasCliente_DetallesDelta = '{6C2D7943-8663-4AC4-AEDA-F40D14BE5D92}';
RID_FacturasClienteDelta = '{5FE12677-931B-45C0-BA3E-7C74EBA25522}';
RID_FacturasCliente_DetallesDelta = '{AB782F02-4224-40C4-90E8-5501122FA123}';
type
{ IFacturasClienteDelta }
IFacturasClienteDelta = interface(IFacturasCliente)
['{47F2B48F-D3D8-4A91-B919-D38B47FDB832}']
['{5FE12677-931B-45C0-BA3E-7C74EBA25522}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -446,7 +446,7 @@ type
{ IFacturasCliente_DetallesDelta }
IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles)
['{6C2D7943-8663-4AC4-AEDA-F40D14BE5D92}']
['{AB782F02-4224-40C4-90E8-5501122FA123}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;

View File

@ -362,9 +362,11 @@ object srvFacturasCliente: TsrvFacturasCliente
','#10' FACTURAS_CLIENTE_DETALLES.VISIBLE,'#10#10' FACTURAS_CLIENTE_D' +
'ETALLES.ID_ARTICULO, FACTURAS_CLIENTE_DETALLES.DESCUENTO,'#10' FA' +
'CTURAS_CLIENTE_DETALLES.IMPORTE_PORTE, ARTICULOS.REFERENCIA,'#10' ' +
' ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'FROM FACTURA' +
'S_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_CLIENTE_DETAL' +
'LES.ID_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICION;'#10
' '#10' '#39#39' as REFERENCIA_PROVEEDOR /*Es necesario porque los detal' +
'les es comun para la rama del cliente como del proveedor*/'#10#10'FROM' +
' FACTURAS_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_CLIEN' +
'TE_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY PO' +
'SICION;'#10
StatementType = stSQL
ColumnMappings = <
item
@ -502,6 +504,7 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_Detalles_REFERENCIA_PROVEEDOR'
end>
end>
JoinDataTables = <>

View File

@ -9,12 +9,13 @@ uses
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
JvgWizardHeader, uIEditorElegirArticulosFacturasCliente;
JvgWizardHeader, uIEditorElegirArticulosFacturasCliente, uDAInterfaces,
uViewGridBase, uViewGrid, uViewArticulos;
type
TfEditorElegirArticulosFacturaCliente = class(TfEditorElegirArticulos, IEditorElegirArticulosFacturasCliente)
protected
procedure AsignarVista; override;
public
constructor Create(AOwner: TComponent); override;
end;
@ -25,8 +26,9 @@ uses uViewElegirArticulosFacturasCliente;
{ TfEditorElegirArticulosFacturaCliente }
procedure TfEditorElegirArticulosFacturaCliente.AsignarVista;
constructor TfEditorElegirArticulosFacturaCliente.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := CreateView(TfrViewElegirArticulosFacturasCliente) as IViewElegirArticulosFacturasCliente;
end;

View File

@ -180,6 +180,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente
Left = 0
Top = 0
@ -200,106 +204,103 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitHeight = 316
inherited ToolBar1: TToolBar
Width = 815
Height = 51
Height = 46
ExplicitWidth = 815
ExplicitHeight = 51
ExplicitHeight = 46
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
Wrap = True
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
Left = 0
Wrap = False
ExplicitLeft = 334
ExplicitTop = 0
ExplicitLeft = 0
end
inherited FontName: TJvFontComboBox
Left = 399
Top = 0
ExplicitLeft = 399
ExplicitTop = 0
Left = 65
Top = 22
ExplicitLeft = 65
ExplicitTop = 22
end
inherited FontSize: TEdit
Left = 544
Top = 0
Left = 210
Top = 22
Width = 104
ExplicitLeft = 544
ExplicitTop = 0
ExplicitLeft = 210
ExplicitTop = 22
ExplicitWidth = 104
end
inherited UpDown1: TUpDown
Left = 648
Top = 0
ExplicitLeft = 648
ExplicitTop = 0
Left = 314
Top = 22
ExplicitLeft = 314
ExplicitTop = 22
end
inherited ToolButton13: TToolButton
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 27
Left = 331
Top = 22
ExplicitLeft = 331
ExplicitTop = 22
end
inherited ToolButton6: TToolButton
Left = 0
Top = 27
ExplicitLeft = 0
ExplicitTop = 27
Left = 339
Top = 22
ExplicitLeft = 339
ExplicitTop = 22
end
inherited ToolButton7: TToolButton
Left = 66
Top = 27
ExplicitLeft = 66
ExplicitTop = 27
Left = 405
Top = 22
ExplicitLeft = 405
ExplicitTop = 22
end
inherited ToolButton8: TToolButton
Left = 133
Top = 27
ExplicitLeft = 133
ExplicitTop = 27
Left = 472
Top = 22
ExplicitLeft = 472
ExplicitTop = 22
end
inherited ToolButton12: TToolButton
Left = 216
Top = 27
ExplicitLeft = 216
ExplicitTop = 27
Left = 555
Top = 22
ExplicitLeft = 555
ExplicitTop = 22
end
inherited ToolButton9: TToolButton
Left = 224
Top = 27
ExplicitLeft = 224
ExplicitTop = 27
Left = 563
Top = 22
ExplicitLeft = 563
ExplicitTop = 22
end
inherited ToolButton10: TToolButton
Left = 369
Top = 27
ExplicitLeft = 369
ExplicitTop = 27
Left = 708
Top = 22
ExplicitLeft = 708
ExplicitTop = 22
end
inherited ToolButton11: TToolButton
Left = 494
Top = 27
ExplicitLeft = 494
ExplicitTop = 27
Left = 833
Top = 22
ExplicitLeft = 833
ExplicitTop = 22
end
end
inherited cxGrid: TcxGrid
Top = 77
Top = 72
Width = 815
Height = 239
Height = 244
ExplicitTop = 77
ExplicitWidth = 815
ExplicitHeight = 239
end
inherited TBXDock1: TTBXDock
Top = 51
Top = 46
Width = 815
ExplicitTop = 51
ExplicitWidth = 815
@ -464,6 +465,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Top = 84
ExplicitTop = 84
ExplicitWidth = 255
ExplicitHeight = 0
Width = 255
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup

View File

@ -309,14 +309,7 @@ begin
// Si la factura tiene detalles hay que mirar si los descuentos y otros campos
// para los artículos hay que cambiarlos.
if (FFactura.Detalles.RecordCount > 0) then
begin
FDetallesController := TDetallesFacturaClienteController.Create;
try
FDetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente);
finally
FDetallesController := NIL;
end;
end;
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente);
end;
procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject;

View File

@ -1,2 +1,89 @@
inherited frViewDetallesFacturaCliente: TfrViewDetallesFacturaCliente
inherited ToolBar1: TToolBar
Height = 95
ExplicitHeight = 95
inherited FontName: TJvFontComboBox [4]
Left = 56
Top = 22
ExplicitLeft = 56
ExplicitTop = 22
end
inherited ToolButton14: TToolButton [5]
Left = 201
Wrap = False
ExplicitLeft = 201
end
inherited FontSize: TEdit
Left = 266
Top = 22
ExplicitLeft = 266
ExplicitTop = 22
end
inherited UpDown1: TUpDown
Left = 308
Top = 22
ExplicitLeft = 308
ExplicitTop = 22
end
inherited ToolButton13: TToolButton
Left = 325
Top = 22
ExplicitLeft = 325
ExplicitTop = 22
end
inherited ToolButton11: TToolButton [9]
Left = 333
Top = 22
ExplicitLeft = 333
ExplicitTop = 22
end
inherited ToolButton12: TToolButton [10]
Left = 0
Top = 22
Wrap = True
ExplicitLeft = 0
ExplicitTop = 22
ExplicitHeight = 27
end
inherited ToolButton9: TToolButton [11]
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton10: TToolButton [12]
Left = 145
Top = 49
ExplicitLeft = 145
ExplicitTop = 49
end
inherited ToolButton6: TToolButton [13]
Left = 270
Top = 49
ExplicitLeft = 270
ExplicitTop = 49
end
inherited ToolButton7: TToolButton [14]
Left = 336
Top = 49
Wrap = True
ExplicitLeft = 336
ExplicitTop = 49
end
inherited ToolButton8: TToolButton [15]
Left = 0
Top = 71
ExplicitLeft = 0
ExplicitTop = 71
end
end
inherited cxGrid: TcxGrid
Top = 121
Height = 183
ExplicitHeight = 210
end
inherited TBXDock1: TTBXDock
Top = 95
ExplicitTop = 68
end
end

View File

@ -19,7 +19,7 @@ uses
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu,
cxGridPopupMenu;
cxGridPopupMenu, cxEditRepositoryItems, uViewDetallesArticulosParaVenta;
type
IViewDetallesFacturaCliente = interface(IViewDetallesArticulos)
@ -29,7 +29,7 @@ type
property Factura: IBizFacturaCliente read GetFactura write SetFactura;
end;
TfrViewDetallesFacturaCliente = class(TfrViewDetallesArticulos, IViewDetallesFacturaCliente)
TfrViewDetallesFacturaCliente = class(TfrViewDetallesArticulosParaVenta, IViewDetallesFacturaCliente)
protected
FFactura: IBizFacturaCliente;
function GetFactura: IBizFacturaCliente;

View File

@ -1,21 +1,4 @@
inherited frViewElegirArticulosFacturasCliente: TfrViewElegirArticulosFacturasCliente
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewPRECIO_COSTE: TcxGridDBColumn
Visible = False
end
inherited cxGridViewDESCUENTO: TcxGridDBColumn
Visible = False
VisibleForCustomization = False
end
inherited cxGridViewPRECIO_NETO: TcxGridDBColumn
Visible = False
end
inherited cxGridViewPRECIO_PORTE: TcxGridDBColumn
Visible = False
end
end
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 39231.869697800920000000

View File

@ -8,8 +8,8 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
Height = 290
RootLevelOptions.DetailTabsPosition = dtpTop
OnActiveTabChanged = cxGridActiveTabChanged
ExplicitWidth = 531
ExplicitHeight = 269
ExplicitWidth = 665
ExplicitHeight = 290
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'ID'
DataController.Options = [dcoAnsiSort, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoGroupsAlwaysExpanded]
@ -144,33 +144,39 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 665
ExplicitWidth = 531
ExplicitWidth = 665
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 531
ExplicitWidth = 665
inherited dxLayoutControl1: TdxLayoutControl
Width = 665
ExplicitWidth = 531
ExplicitWidth = 665
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 434
Width = 434
ExplicitWidth = 568
Width = 568
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 144
Width = 144
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 307
ExplicitLeft = 307
Left = 248
ExplicitLeft = 248
ExplicitWidth = 273
Width = 273
end
inherited eLista: TcxComboBox
Left = 558
ExplicitLeft = 558
ExplicitWidth = 97
Width = 97
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 665
ExplicitWidth = 531
ExplicitWidth = 665
inherited tbxBotones: TTBXToolbar
Width = 655
ExplicitWidth = 521
ExplicitWidth = 655
end
end
end
@ -178,14 +184,14 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 392
Visible = True
ExplicitTop = 371
ExplicitWidth = 531
ExplicitTop = 392
ExplicitWidth = 665
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 665
ExplicitWidth = 531
ExplicitWidth = 665
inherited TBXToolbar1: TTBXToolbar
Width = 655
ExplicitWidth = 521
ExplicitWidth = 655
object TBXSeparatorItem2: TTBXSeparatorItem
end
object TBXItem3: TTBXItem

View File

@ -6,6 +6,9 @@ uses
uDADataTable, uControllerDetallesArticulos, uBizDetallesFacturaProveedor, uIDataModuleFacturasProveedor,
uBizContactos, uBizArticulos;
const
CAMPO_REFERENCIA_FABRICANTE = 'REFERENCIA_FABRICANTE';
type
IDetallesFacturaProveedorController = interface(IControllerDetallesArticulos)
['{49F6199E-E031-42F5-AEA5-E70C3E3479A1}']
@ -43,7 +46,7 @@ implementation
{ TDetallesFacturaProveedorController }
uses Variants, uDataModuleFacturasProveedor, uArticulosFacturaProveedorController,
uControllerDetallesBase, Dialogs, SysUtils, uDialogUtils, uCalculosUtils;
uControllerDetallesBase, Dialogs, SysUtils, uDialogUtils, uCalculosUtils, schArticulosClient_Intf;
procedure TDetallesFacturaProveedorController.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
var
@ -69,7 +72,7 @@ begin
if Assigned(ADetalles) then
begin
try
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
AArticulos := (FArticulosController.BuscarTodosPorProveedor as IBizArticulo);
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
if ANuevaFila then
@ -134,6 +137,12 @@ begin
ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := AArticulos.DESCUENTO
else
ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := 0;
//Sobreescribimos el id del articulo por el campo ID_ARTICULO que nos hemos tenido que crear para
//almacenar el codigo de artículo ya que ID esta destinado a ID_ARTICULO||ID_PROVEEDOR, para identificar de forma
//unica los articulos desglosados por proveedor.
ADetalles.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsVariant := AArticulos.DataTable.FieldByName(CAMPO_ID_ARTICULOS).AsVariant;
ADetalles.DataTable.FieldByName(CAMPO_REFERENCIA_FABRICANTE).AsVariant := AArticulos.DataTable.FieldByName(fld_ArticulosREFERENCIA_FABR).AsVariant;
end;
procedure TDetallesFacturaProveedorController.ValidarCampos(DataTable: TDADataTable);

View File

@ -333,6 +333,11 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor
DataType = datString
Size = 255
DictionaryEntry = 'FacturasProveedor_Detalles_REFERENCIA_PROVEEDOR'
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
end>
Params = <>
MasterMappingMode = mmWhere

View File

@ -9,9 +9,9 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FacturasProveedor = '{459318AB-8D63-462A-B567-DCFA25BC17E8}';
RID_FacturasProveedor_Detalles = '{76543CD5-E43C-4B99-8A13-7D617B4F2635}';
RID_FacturasProveedor_Pedidos = '{13E16CA0-EC57-43BC-B975-EAB65060F724}';
RID_FacturasProveedor = '{AE0EA268-0DA7-41DD-ADB3-A93E0C579B3F}';
RID_FacturasProveedor_Detalles = '{050FBBA0-032E-4364-961D-11C1A07418F8}';
RID_FacturasProveedor_Pedidos = '{49F51901-D17A-4576-BB9F-3078AE8C735A}';
{ Data table names }
nme_FacturasProveedor = 'FacturasProveedor';
@ -99,6 +99,7 @@ const
fld_FacturasProveedor_DetallesIMPORTE_PORTE = 'IMPORTE_PORTE';
fld_FacturasProveedor_DetallesREFERENCIA = 'REFERENCIA';
fld_FacturasProveedor_DetallesREFERENCIA_PROVEEDOR = 'REFERENCIA_PROVEEDOR';
fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE = 'REFERENCIA_FABRICANTE';
{ FacturasProveedor_Detalles field indexes }
idx_FacturasProveedor_DetallesID = 0;
@ -115,6 +116,7 @@ const
idx_FacturasProveedor_DetallesIMPORTE_PORTE = 11;
idx_FacturasProveedor_DetallesREFERENCIA = 12;
idx_FacturasProveedor_DetallesREFERENCIA_PROVEEDOR = 13;
idx_FacturasProveedor_DetallesREFERENCIA_FABRICANTE = 14;
{ FacturasProveedor_Pedidos fields }
fld_FacturasProveedor_PedidosID = 'ID';
@ -137,7 +139,7 @@ const
type
{ IFacturasProveedor }
IFacturasProveedor = interface(IDAStronglyTypedDataTable)
['{DF0436D2-5D1A-4E1E-A064-807224190B0D}']
['{B4FB668F-2EDF-4700-830A-E2624E9AD50D}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -532,7 +534,7 @@ type
{ IFacturasProveedor_Detalles }
IFacturasProveedor_Detalles = interface(IDAStronglyTypedDataTable)
['{B87224BF-44AA-441C-B770-334B8BF05DC4}']
['{286BC424-AC55-429E-B234-266BFB82C7A4}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -590,6 +592,10 @@ type
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String);
function GetREFERENCIA_PROVEEDORIsNull: Boolean;
procedure SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean);
function GetREFERENCIA_FABRICANTEValue: String;
procedure SetREFERENCIA_FABRICANTEValue(const aValue: String);
function GetREFERENCIA_FABRICANTEIsNull: Boolean;
procedure SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean);
{ Properties }
@ -621,6 +627,8 @@ type
property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property REFERENCIA_PROVEEDOR: String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property REFERENCIA_PROVEEDORIsNull: Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property REFERENCIA_FABRICANTE: String read GetREFERENCIA_FABRICANTEValue write SetREFERENCIA_FABRICANTEValue;
property REFERENCIA_FABRICANTEIsNull: Boolean read GetREFERENCIA_FABRICANTEIsNull write SetREFERENCIA_FABRICANTEIsNull;
end;
{ TFacturasProveedor_DetallesDataTableRules }
@ -684,6 +692,10 @@ type
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
function GetREFERENCIA_PROVEEDORIsNull: Boolean; virtual;
procedure SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_FABRICANTEValue: String; virtual;
procedure SetREFERENCIA_FABRICANTEValue(const aValue: String); virtual;
function GetREFERENCIA_FABRICANTEIsNull: Boolean; virtual;
procedure SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@ -714,6 +726,8 @@ type
property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property REFERENCIA_PROVEEDOR: String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property REFERENCIA_PROVEEDORIsNull: Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property REFERENCIA_FABRICANTE: String read GetREFERENCIA_FABRICANTEValue write SetREFERENCIA_FABRICANTEValue;
property REFERENCIA_FABRICANTEIsNull: Boolean read GetREFERENCIA_FABRICANTEIsNull write SetREFERENCIA_FABRICANTEIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@ -723,7 +737,7 @@ type
{ IFacturasProveedor_Pedidos }
IFacturasProveedor_Pedidos = interface(IDAStronglyTypedDataTable)
['{5350FE40-8BE0-418C-8E8D-0E04AD1696C2}']
['{5C524428-4841-4EAE-AEAE-4199417B80E2}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -1807,6 +1821,27 @@ begin
DataTable.Fields[idx_FacturasProveedor_DetallesREFERENCIA_PROVEEDOR].AsVariant := Null;
end;
function TFacturasProveedor_DetallesDataTableRules.GetREFERENCIA_FABRICANTEValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedor_DetallesREFERENCIA_FABRICANTE].AsString;
end;
procedure TFacturasProveedor_DetallesDataTableRules.SetREFERENCIA_FABRICANTEValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedor_DetallesREFERENCIA_FABRICANTE].AsString := aValue;
end;
function TFacturasProveedor_DetallesDataTableRules.GetREFERENCIA_FABRICANTEIsNull: boolean;
begin
result := DataTable.Fields[idx_FacturasProveedor_DetallesREFERENCIA_FABRICANTE].IsNull;
end;
procedure TFacturasProveedor_DetallesDataTableRules.SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FacturasProveedor_DetallesREFERENCIA_FABRICANTE].AsVariant := Null;
end;
{ TFacturasProveedor_PedidosDataTableRules }
constructor TFacturasProveedor_PedidosDataTableRules.Create(aDataTable: TDADataTable);

View File

@ -9,14 +9,14 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FacturasProveedorDelta = '{6BF5A590-3DB6-42E2-8EBC-F025A961ACF3}';
RID_FacturasProveedor_DetallesDelta = '{7AF5266B-6F21-4093-A081-6F70DB42DFF6}';
RID_FacturasProveedor_PedidosDelta = '{1E86BD08-B170-47CB-9B6F-DA6B41DE6EDE}';
RID_FacturasProveedorDelta = '{4CD57CEE-063B-490E-BCA3-828A01B7BEC8}';
RID_FacturasProveedor_DetallesDelta = '{C614C36B-3791-466E-827C-F2184A1F6BE2}';
RID_FacturasProveedor_PedidosDelta = '{A664F250-5578-4C8F-A9AB-6B916F981183}';
type
{ IFacturasProveedorDelta }
IFacturasProveedorDelta = interface(IFacturasProveedor)
['{6BF5A590-3DB6-42E2-8EBC-F025A961ACF3}']
['{4CD57CEE-063B-490E-BCA3-828A01B7BEC8}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -411,7 +411,7 @@ type
{ IFacturasProveedor_DetallesDelta }
IFacturasProveedor_DetallesDelta = interface(IFacturasProveedor_Detalles)
['{7AF5266B-6F21-4093-A081-6F70DB42DFF6}']
['{C614C36B-3791-466E-827C-F2184A1F6BE2}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@ -427,6 +427,7 @@ type
function GetOldIMPORTE_PORTEValue : Currency;
function GetOldREFERENCIAValue : String;
function GetOldREFERENCIA_PROVEEDORValue : String;
function GetOldREFERENCIA_FABRICANTEValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
@ -443,6 +444,7 @@ type
property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property OldREFERENCIA_FABRICANTE : String read GetOldREFERENCIA_FABRICANTEValue;
end;
{ TFacturasProveedor_DetallesBusinessProcessorRules }
@ -534,6 +536,12 @@ type
function GetOldREFERENCIA_PROVEEDORIsNull: Boolean; virtual;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
procedure SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_FABRICANTEValue: String; virtual;
function GetREFERENCIA_FABRICANTEIsNull: Boolean; virtual;
function GetOldREFERENCIA_FABRICANTEValue: String; virtual;
function GetOldREFERENCIA_FABRICANTEIsNull: Boolean; virtual;
procedure SetREFERENCIA_FABRICANTEValue(const aValue: String); virtual;
procedure SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@ -592,6 +600,10 @@ type
property REFERENCIA_PROVEEDORIsNull : Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property OldREFERENCIA_PROVEEDORIsNull : Boolean read GetOldREFERENCIA_PROVEEDORIsNull;
property REFERENCIA_FABRICANTE : String read GetREFERENCIA_FABRICANTEValue write SetREFERENCIA_FABRICANTEValue;
property REFERENCIA_FABRICANTEIsNull : Boolean read GetREFERENCIA_FABRICANTEIsNull write SetREFERENCIA_FABRICANTEIsNull;
property OldREFERENCIA_FABRICANTE : String read GetOldREFERENCIA_FABRICANTEValue;
property OldREFERENCIA_FABRICANTEIsNull : Boolean read GetOldREFERENCIA_FABRICANTEIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -601,7 +613,7 @@ type
{ IFacturasProveedor_PedidosDelta }
IFacturasProveedor_PedidosDelta = interface(IFacturasProveedor_Pedidos)
['{1E86BD08-B170-47CB-9B6F-DA6B41DE6EDE}']
['{A664F250-5578-4C8F-A9AB-6B916F981183}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@ -2136,6 +2148,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_DetallesREFERENCIA_PROVEEDOR] := Null;
end;
function TFacturasProveedor_DetallesBusinessProcessorRules.GetREFERENCIA_FABRICANTEValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE];
end;
function TFacturasProveedor_DetallesBusinessProcessorRules.GetREFERENCIA_FABRICANTEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE]);
end;
function TFacturasProveedor_DetallesBusinessProcessorRules.GetOldREFERENCIA_FABRICANTEValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE];
end;
function TFacturasProveedor_DetallesBusinessProcessorRules.GetOldREFERENCIA_FABRICANTEIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE]);
end;
procedure TFacturasProveedor_DetallesBusinessProcessorRules.SetREFERENCIA_FABRICANTEValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE] := aValue;
end;
procedure TFacturasProveedor_DetallesBusinessProcessorRules.SetREFERENCIA_FABRICANTEIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedor_DetallesREFERENCIA_FABRICANTE] := Null;
end;
{ TFacturasProveedor_PedidosBusinessProcessorRules }
constructor TFacturasProveedor_PedidosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);

View File

@ -335,10 +335,15 @@ object srvFacturasProveedor: TsrvFacturasProveedor
'ES.IMPORTE_TOTAL,'#10' FACTURAS_PROVEEDOR_DETALLES.VISIBLE,'#10#10' ' +
'FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO, FACTURAS_PROVEEDOR_DETA' +
'LLES.DESCUENTO,'#10' FACTURAS_PROVEEDOR_DETALLES.IMPORTE_PORTE,'#10' ' +
' ARTICULOS.REFERENCIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA' +
'_PROVEEDOR'#10'FROM FACTURAS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ' +
'ON FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE ' +
'{where}'#10'ORDER BY POSICION;'#10
' ARTICULOS.REFERENCIA, ARTICULOS_PROVEEDORES.REFERENCIA_PROV a' +
's REFERENCIA_PROVEEDOR,'#10' ARTICULOS.REFERENCIA_FABR as REFEREN' +
'CIA_FABRICANTE'#10' '#10'FROM FACTURAS_PROVEEDOR_DETALLES'#10'LEFT JOIN A' +
'RTICULOS ON FACTURAS_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.' +
'ID'#10'LEFT JOIN FACTURAS_PROVEEDOR ON (FACTURAS_PROVEEDOR.ID = FACT' +
'URAS_PROVEEDOR_DETALLES.ID_FACTURA)'#10'LEFT JOIN ARTICULOS_PROVEEDO' +
'RES ON ((ARTICULOS_PROVEEDORES.ID_ARTICULO = ARTICULOS.ID) AND (' +
'ARTICULOS_PROVEEDORES.ID_PROVEEDOR = FACTURAS_PROVEEDOR.ID_PROVE' +
'EDOR))'#10#10'WHERE {where}'#10'ORDER BY POSICION;'#10#10#10
StatementType = stSQL
ColumnMappings = <
item
@ -398,6 +403,11 @@ object srvFacturasProveedor: TsrvFacturasProveedor
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = '<unknown>'
SQLOrigin = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'REFERENCIA_FABRICANTE'
TableField = '<unknown>'
SQLOrigin = 'REFERENCIA_FABRICANTE'
end>
end>
Name = 'FacturasProveedor_Detalles'
@ -478,6 +488,11 @@ object srvFacturasProveedor: TsrvFacturasProveedor
DataType = datString
Size = 255
DictionaryEntry = 'FacturasProveedor_Detalles_REFERENCIA_PROVEEDOR'
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
end>
end
item

View File

@ -1,7 +1,5 @@
inherited fEditorElegirArticulosFacturaProveedor: TfEditorElegirArticulosFacturaProveedor
Caption = 'fEditorElegirArticulosFacturaProveedor'
ExplicitWidth = 320
ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
end

View File

@ -9,7 +9,8 @@ uses
StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls,
JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock,
TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane,
JvgWizardHeader, uIEditorElegirArticulosFacturasProveedor, uBizContactos;
JvgWizardHeader, uIEditorElegirArticulosFacturasProveedor, uBizContactos,
uDAInterfaces, uViewGridBase, uViewGrid, uViewArticulos;
type
TfEditorElegirArticulosFacturaProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosFacturasProveedor)
@ -19,11 +20,9 @@ type
function GetProveedor: IBizProveedor;
procedure SetProveedor(const Value: IBizProveedor);
protected
procedure AsignarVista; override;
public
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
constructor Create(AOwner: TComponent); override;
end;
@ -35,8 +34,9 @@ uses uViewElegirArticulosFacturasProveedor;
{ TfEditorElegirArticulosFacturaCliente }
procedure TfEditorElegirArticulosFacturaProveedor.AsignarVista;
constructor TfEditorElegirArticulosFacturaProveedor.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := CreateView(TfrViewElegirArticulosFacturasProveedor) as IViewElegirArticulosFacturasProveedor;
end;

View File

@ -42,7 +42,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Width = 819
ExplicitWidth = 819
inherited tbxMain: TTBXToolbar
ExplicitWidth = 488
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
Visible = False
end
@ -71,7 +71,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited pgPaginas: TPageControl
Width = 813
Height = 369
ActivePage = pagContenido
OnChanging = pgPaginasChanging
ExplicitWidth = 813
ExplicitHeight = 369
@ -135,7 +134,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
ExplicitWidth = 377
inherited dxLayoutControl1: TdxLayoutControl
Width = 377
ExplicitWidth = 361
ExplicitWidth = 377
inherited edtlNombre: TcxDBTextEdit
DataBinding.DataSource = frViewFacturaProveedor1.DADataSource
ExplicitWidth = 303
@ -201,21 +200,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Height = 51
ExplicitWidth = 805
ExplicitHeight = 51
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
Wrap = False
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 399
@ -266,8 +252,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited ToolButton12: TToolButton
Left = 233
Top = 27
Wrap = False
ExplicitLeft = 233
ExplicitTop = 27
ExplicitHeight = 22
end
inherited ToolButton9: TToolButton
Left = 241
@ -539,6 +527,14 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited EditorActionList: TActionList [5]
Left = 8
Top = 144
inherited actPrevisualizar: TAction
Enabled = False
Visible = False
end
inherited actImprimir: TAction
Enabled = False
Visible = False
end
end
inherited SmallImages: TPngImageList [6]
end

View File

@ -296,27 +296,13 @@ begin
// Si la factura tiene detalles hay que mirar si los descuentos y otros campos
// para los artículos hay que cambiarlos.
if (FFactura.Detalles.RecordCount > 0) then
begin
FDetallesController := TDetallesFacturaProveedorController.Create;
try
FDetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Proveedor);
finally
FDetallesController := NIL;
end;
end;
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Proveedor);
// Si la factura tiene pedidos asociados hay que mirar si pertenecen al proveedor seleccionado si no es así se eliminan
if (FFactura.Pedidos.RecordCount > 0) then
begin
showmessage('Comprobar si los pedidos pertenecen al nuevo proveedor');
{ FDetallesController := TDetallesFacturaProveedorController.Create;
try
FDetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Proveedor);
finally
FDetallesController := NIL;
end;
}
end;
end;

View File

@ -1,43 +1,51 @@
inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
inherited ToolBar1: TToolBar
Height = 95
ExplicitHeight = 95
inherited FontName: TJvFontComboBox [4]
Left = 56
Height = 73
ExplicitHeight = 73
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
ExplicitLeft = 278
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Top = 22
ExplicitLeft = 56
ExplicitTop = 22
end
inherited ToolButton14: TToolButton [5]
Left = 201
Wrap = False
ExplicitLeft = 201
end
inherited FontSize: TEdit
Left = 266
Top = 22
ExplicitLeft = 266
ExplicitTop = 22
end
inherited UpDown1: TUpDown
Left = 308
Top = 22
ExplicitLeft = 308
ExplicitTop = 22
end
inherited ToolButton13: TToolButton
Left = 325
Top = 22
ExplicitLeft = 325
ExplicitTop = 22
end
inherited ToolButton11: TToolButton [9]
Left = 333
inherited ToolButton6: TToolButton
Top = 22
ExplicitLeft = 333
ExplicitTop = 22
end
inherited ToolButton12: TToolButton [10]
inherited ToolButton7: TToolButton
Top = 22
ExplicitTop = 22
end
inherited ToolButton8: TToolButton
Top = 22
ExplicitTop = 22
end
inherited ToolButton12: TToolButton
Left = 0
Top = 22
Wrap = True
@ -45,52 +53,73 @@ inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
ExplicitTop = 22
ExplicitHeight = 27
end
inherited ToolButton9: TToolButton [11]
inherited ToolButton9: TToolButton
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton10: TToolButton [12]
inherited ToolButton10: TToolButton
Left = 145
Top = 49
ExplicitLeft = 145
ExplicitTop = 49
end
inherited ToolButton6: TToolButton [13]
inherited ToolButton11: TToolButton
Left = 270
Top = 49
ExplicitLeft = 270
ExplicitTop = 49
end
inherited ToolButton7: TToolButton [14]
Left = 336
Top = 49
Wrap = True
ExplicitLeft = 336
ExplicitTop = 49
end
inherited ToolButton8: TToolButton [15]
Left = 0
Top = 71
ExplicitLeft = 0
ExplicitTop = 71
end
end
inherited cxGrid: TcxGrid
Top = 121
Height = 183
ExplicitTop = 99
ExplicitHeight = 210
Top = 99
Height = 205
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewREFERENCIA: TcxGridDBColumn
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
Visible = False
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
end
inherited cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
Visible = False
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
end
inherited cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
Visible = False
end>
Properties.ReadOnly = True
Properties.OnButtonClick = nil
end
inherited cxGridViewIMPORTEUNIDAD: TcxGridDBColumn
Visible = False
VisibleForCustomization = False
end
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Caption = 'Importe coste'
Properties.ReadOnly = False
Visible = True
Options.Editing = True
end
end
end
inherited TBXDock1: TTBXDock
Top = 95
ExplicitTop = 68
Top = 73
ExplicitTop = 73
end
end

View File

@ -19,7 +19,7 @@ uses
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
dxSkinXmas2008Blue, dxSkinscxPCPainter, Menus, cxGridCustomPopupMenu,
cxGridPopupMenu;
cxGridPopupMenu, cxEditRepositoryItems;
type
IViewDetallesFacturaProveedor = interface(IViewDetallesArticulos)
@ -29,7 +29,7 @@ type
property Factura: IBizFacturaProveedor read GetFactura write SetFactura;
end;
TfrViewDetallesFacturaProveedor = class(TfrViewDetallesArticulos)
TfrViewDetallesFacturaProveedor = class(TfrViewDetallesArticulos, IViewDetallesFacturaProveedor)
protected
FFactura: IBizFacturaProveedor;
function GetFactura: IBizFacturaProveedor;

View File

@ -1,6 +1,5 @@
inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturasProveedor
Height = 449
OnDestroy = CustomViewDestroy
ExplicitHeight = 449
inherited cxGrid: TcxGrid
Height = 321
@ -8,30 +7,39 @@ inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturas
OnActiveTabChanged = cxGridActiveTabChanged
ExplicitHeight = 321
inherited cxGridView: TcxGridDBTableView
object cxGridViewID_PROVEEDOR: TcxGridDBColumn
DataBinding.FieldName = 'ID_PROVEEDOR'
inherited cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn
Visible = False
end
inherited cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn
Visible = False
end
end
inherited cxGridLevel: TcxGridLevel
Caption = ''
end
object cxGridLevel1: TcxGridLevel
Caption = 'Otros proveedores'
Caption = 'Generales'
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 225
ExplicitLeft = 225
ExplicitWidth = 121
Width = 121
end
inherited eLista: TcxComboBox
Left = 383
ExplicitLeft = 383
ExplicitWidth = 322
Width = 322
end
end
end
end

View File

@ -12,7 +12,13 @@ uses
uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, dxPgsDlg,
ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase,
uBizContactos;
uBizContactos, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel,
dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue,
dxSkinscxPCPainter, uDAInterfaces, uViewArticulosPorProveedor;
type
IViewElegirArticulosFacturasProveedor = interface(IViewArticulos)
@ -22,11 +28,9 @@ type
property Proveedor: IBizProveedor read GetProveedor write SetProveedor;
end;
TfrViewElegirArticulosFacturasProveedor = class(TfrViewArticulos, IViewElegirArticulosFacturasProveedor)
TfrViewElegirArticulosFacturasProveedor = class(TfrViewArticulosPorProveedor, IViewElegirArticulosFacturasProveedor)
cxGridLevel1: TcxGridLevel;
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid;
ALevel: TcxGridLevel);
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
procedure CustomViewDestroy(Sender: TObject);
private
@ -56,7 +60,7 @@ begin
0 : if Assigned(FProveedor) then
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, FProveedor.ID, FProveedor.NOMBRE);
1 : if Assigned(FProveedor) then
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foNotEqual, FProveedor.ID, FProveedor.NOMBRE);
FFiltro.AddItem(cxGridViewID_PROVEEDOR, foEqual, Null, 'ARTICULOS SIN PROVEEDOR');
end;
end;
@ -79,8 +83,7 @@ begin
inherited;
end;
procedure TfrViewElegirArticulosFacturasProveedor.cxGridActiveTabChanged(
Sender: TcxCustomGrid; ALevel: TcxGridLevel);
procedure TfrViewElegirArticulosFacturasProveedor.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
begin
inherited;
RefrescarFiltro;

View File

@ -241,7 +241,7 @@ begin
if Supports(ADetalles, IBizArticulo) then
begin
AArticulos.ID_ARTICULO := FieldByName(fld_ArticulosID).AsInteger;
AArticulos.REFERENCIA_PROVEEDOR := FieldByName(fld_ArticulosREFERENCIA_PROV).AsString;
// AArticulos.REFERENCIA_PROVEEDOR := FieldByName(fld_ArticulosREFERENCIA_PROV).AsString;
AArticulos.DESCRIPCION := FieldByName(fld_INVENTARIODESCRIPCION).AsString;
AArticulos.CANTIDAD := 1;
end
@ -249,7 +249,7 @@ begin
else
begin
AArticulos.ID_ARTICULO := FieldByName(fld_INVENTARIOID_ARTICULO).AsInteger;
AArticulos.REFERENCIA_PROVEEDOR := FieldByName(fld_INVENTARIOREFERENCIA_PROVEEDOR).AsString;
// AArticulos.REFERENCIA_PROVEEDOR := FieldByName(fld_INVENTARIOREFERENCIA_PROVEEDOR).AsString;
if Supports(ADetalles, IBizInventario) then
begin
AArticulos.DESCRIPCION := FieldByName(fld_INVENTARIODESCRIPCION).AsString;

View File

@ -183,19 +183,6 @@ inherited DataModuleInventario: TDataModuleInventario
Size = 255
DictionaryEntry = 'INVENTARIO_DESCRIPCION'
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'INVENTARIO_REFERENCIA_PROVEEDOR'
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DisplayLabel = 'Precio unidad'
Alignment = taRightJustify
DictionaryEntry = 'INVENTARIO_PRECIO_NETO'
end
item
Name = 'STOCK'
DataType = datLargeInt
@ -205,16 +192,9 @@ inherited DataModuleInventario: TDataModuleInventario
item
Name = 'UNIDADES_ALMACEN'
DataType = datLargeInt
DisplayLabel = 'U. Almac'#195#169'n'
DisplayLabel = 'U. Almac'#233'n'
DictionaryEntry = 'INVENTARIO_UNIDADES_ALMACEN'
end
item
Name = 'COSTE_UNIDADES'
DataType = datCurrency
DisplayLabel = 'Coste unidades'
Alignment = taRightJustify
DictionaryEntry = 'INVENTARIO_COSTE_UNIDADES'
end
item
Name = 'RESERVA'
DataType = datLargeInt

View File

@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Inventario = '{308FFF0B-E3D1-48F4-901A-38F4A16CCA35}';
RID_DetalleReservas = '{CE79FB16-723C-4B31-BE6C-4C48D6D8852F}';
RID_Inventario = '{0C73DA8F-2528-4826-B262-E5B7F28AE644}';
RID_DetalleReservas = '{EC76928D-0721-4595-BB59-A63FA3CD75DF}';
{ Data table names }
nme_Inventario = 'Inventario';
@ -24,11 +24,8 @@ const
fld_InventarioREFERENCIA = 'REFERENCIA';
fld_InventarioFAMILIA = 'FAMILIA';
fld_InventarioDESCRIPCION = 'DESCRIPCION';
fld_InventarioREFERENCIA_PROVEEDOR = 'REFERENCIA_PROVEEDOR';
fld_InventarioPRECIO_NETO = 'PRECIO_NETO';
fld_InventarioSTOCK = 'STOCK';
fld_InventarioUNIDADES_ALMACEN = 'UNIDADES_ALMACEN';
fld_InventarioCOSTE_UNIDADES = 'COSTE_UNIDADES';
fld_InventarioRESERVA = 'RESERVA';
fld_InventarioPENDIENTE_RECEPCION = 'PENDIENTE_RECEPCION';
fld_InventarioID = 'ID';
@ -45,18 +42,15 @@ const
idx_InventarioREFERENCIA = 4;
idx_InventarioFAMILIA = 5;
idx_InventarioDESCRIPCION = 6;
idx_InventarioREFERENCIA_PROVEEDOR = 7;
idx_InventarioPRECIO_NETO = 8;
idx_InventarioSTOCK = 9;
idx_InventarioUNIDADES_ALMACEN = 10;
idx_InventarioCOSTE_UNIDADES = 11;
idx_InventarioRESERVA = 12;
idx_InventarioPENDIENTE_RECEPCION = 13;
idx_InventarioID = 14;
idx_InventarioCANTIDAD = 15;
idx_InventarioFECHA_MOVIMIENTO = 16;
idx_InventarioCAUSA = 17;
idx_InventarioTIPO = 18;
idx_InventarioSTOCK = 7;
idx_InventarioUNIDADES_ALMACEN = 8;
idx_InventarioRESERVA = 9;
idx_InventarioPENDIENTE_RECEPCION = 10;
idx_InventarioID = 11;
idx_InventarioCANTIDAD = 12;
idx_InventarioFECHA_MOVIMIENTO = 13;
idx_InventarioCAUSA = 14;
idx_InventarioTIPO = 15;
{ DetalleReservas fields }
fld_DetalleReservasID_ALB = 'ID_ALB';
@ -95,7 +89,7 @@ const
type
{ IInventario }
IInventario = interface(IDAStronglyTypedDataTable)
['{E59DAC0B-889A-47F9-9049-052D880B24BE}']
['{01E8B549-9E00-473C-8C13-6230053472A1}']
{ Property getters and setters }
function GetID_ALMACENValue: Integer;
procedure SetID_ALMACENValue(const aValue: Integer);
@ -125,14 +119,6 @@ type
procedure SetDESCRIPCIONValue(const aValue: String);
function GetDESCRIPCIONIsNull: Boolean;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
function GetREFERENCIA_PROVEEDORValue: String;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String);
function GetREFERENCIA_PROVEEDORIsNull: Boolean;
procedure SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean);
function GetPRECIO_NETOValue: Currency;
procedure SetPRECIO_NETOValue(const aValue: Currency);
function GetPRECIO_NETOIsNull: Boolean;
procedure SetPRECIO_NETOIsNull(const aValue: Boolean);
function GetSTOCKValue: Int64;
procedure SetSTOCKValue(const aValue: Int64);
function GetSTOCKIsNull: Boolean;
@ -141,10 +127,6 @@ type
procedure SetUNIDADES_ALMACENValue(const aValue: Int64);
function GetUNIDADES_ALMACENIsNull: Boolean;
procedure SetUNIDADES_ALMACENIsNull(const aValue: Boolean);
function GetCOSTE_UNIDADESValue: Currency;
procedure SetCOSTE_UNIDADESValue(const aValue: Currency);
function GetCOSTE_UNIDADESIsNull: Boolean;
procedure SetCOSTE_UNIDADESIsNull(const aValue: Boolean);
function GetRESERVAValue: Int64;
procedure SetRESERVAValue(const aValue: Int64);
function GetRESERVAIsNull: Boolean;
@ -190,16 +172,10 @@ type
property FAMILIAIsNull: Boolean read GetFAMILIAIsNull write SetFAMILIAIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property REFERENCIA_PROVEEDOR: String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property REFERENCIA_PROVEEDORIsNull: Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property PRECIO_NETO: Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
property PRECIO_NETOIsNull: Boolean read GetPRECIO_NETOIsNull write SetPRECIO_NETOIsNull;
property STOCK: Int64 read GetSTOCKValue write SetSTOCKValue;
property STOCKIsNull: Boolean read GetSTOCKIsNull write SetSTOCKIsNull;
property UNIDADES_ALMACEN: Int64 read GetUNIDADES_ALMACENValue write SetUNIDADES_ALMACENValue;
property UNIDADES_ALMACENIsNull: Boolean read GetUNIDADES_ALMACENIsNull write SetUNIDADES_ALMACENIsNull;
property COSTE_UNIDADES: Currency read GetCOSTE_UNIDADESValue write SetCOSTE_UNIDADESValue;
property COSTE_UNIDADESIsNull: Boolean read GetCOSTE_UNIDADESIsNull write SetCOSTE_UNIDADESIsNull;
property RESERVA: Int64 read GetRESERVAValue write SetRESERVAValue;
property RESERVAIsNull: Boolean read GetRESERVAIsNull write SetRESERVAIsNull;
property PENDIENTE_RECEPCION: Int64 read GetPENDIENTE_RECEPCIONValue write SetPENDIENTE_RECEPCIONValue;
@ -249,14 +225,6 @@ type
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_PROVEEDORValue: String; virtual;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
function GetREFERENCIA_PROVEEDORIsNull: Boolean; virtual;
procedure SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean); virtual;
function GetPRECIO_NETOValue: Currency; virtual;
procedure SetPRECIO_NETOValue(const aValue: Currency); virtual;
function GetPRECIO_NETOIsNull: Boolean; virtual;
procedure SetPRECIO_NETOIsNull(const aValue: Boolean); virtual;
function GetSTOCKValue: Int64; virtual;
procedure SetSTOCKValue(const aValue: Int64); virtual;
function GetSTOCKIsNull: Boolean; virtual;
@ -265,10 +233,6 @@ type
procedure SetUNIDADES_ALMACENValue(const aValue: Int64); virtual;
function GetUNIDADES_ALMACENIsNull: Boolean; virtual;
procedure SetUNIDADES_ALMACENIsNull(const aValue: Boolean); virtual;
function GetCOSTE_UNIDADESValue: Currency; virtual;
procedure SetCOSTE_UNIDADESValue(const aValue: Currency); virtual;
function GetCOSTE_UNIDADESIsNull: Boolean; virtual;
procedure SetCOSTE_UNIDADESIsNull(const aValue: Boolean); virtual;
function GetRESERVAValue: Int64; virtual;
procedure SetRESERVAValue(const aValue: Int64); virtual;
function GetRESERVAIsNull: Boolean; virtual;
@ -313,16 +277,10 @@ type
property FAMILIAIsNull: Boolean read GetFAMILIAIsNull write SetFAMILIAIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property REFERENCIA_PROVEEDOR: String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property REFERENCIA_PROVEEDORIsNull: Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property PRECIO_NETO: Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
property PRECIO_NETOIsNull: Boolean read GetPRECIO_NETOIsNull write SetPRECIO_NETOIsNull;
property STOCK: Int64 read GetSTOCKValue write SetSTOCKValue;
property STOCKIsNull: Boolean read GetSTOCKIsNull write SetSTOCKIsNull;
property UNIDADES_ALMACEN: Int64 read GetUNIDADES_ALMACENValue write SetUNIDADES_ALMACENValue;
property UNIDADES_ALMACENIsNull: Boolean read GetUNIDADES_ALMACENIsNull write SetUNIDADES_ALMACENIsNull;
property COSTE_UNIDADES: Currency read GetCOSTE_UNIDADESValue write SetCOSTE_UNIDADESValue;
property COSTE_UNIDADESIsNull: Boolean read GetCOSTE_UNIDADESIsNull write SetCOSTE_UNIDADESIsNull;
property RESERVA: Int64 read GetRESERVAValue write SetRESERVAValue;
property RESERVAIsNull: Boolean read GetRESERVAIsNull write SetRESERVAIsNull;
property PENDIENTE_RECEPCION: Int64 read GetPENDIENTE_RECEPCIONValue write SetPENDIENTE_RECEPCIONValue;
@ -346,7 +304,7 @@ type
{ IDetalleReservas }
IDetalleReservas = interface(IDAStronglyTypedDataTable)
['{BA120247-EDE7-4A2A-A826-64062E6E767C}']
['{FF881AE1-5043-485D-9E10-52B956FB4276}']
{ Property getters and setters }
function GetID_ALBValue: Integer;
procedure SetID_ALBValue(const aValue: Integer);
@ -709,48 +667,6 @@ begin
DataTable.Fields[idx_InventarioDESCRIPCION].AsVariant := Null;
end;
function TInventarioDataTableRules.GetREFERENCIA_PROVEEDORValue: String;
begin
result := DataTable.Fields[idx_InventarioREFERENCIA_PROVEEDOR].AsString;
end;
procedure TInventarioDataTableRules.SetREFERENCIA_PROVEEDORValue(const aValue: String);
begin
DataTable.Fields[idx_InventarioREFERENCIA_PROVEEDOR].AsString := aValue;
end;
function TInventarioDataTableRules.GetREFERENCIA_PROVEEDORIsNull: boolean;
begin
result := DataTable.Fields[idx_InventarioREFERENCIA_PROVEEDOR].IsNull;
end;
procedure TInventarioDataTableRules.SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_InventarioREFERENCIA_PROVEEDOR].AsVariant := Null;
end;
function TInventarioDataTableRules.GetPRECIO_NETOValue: Currency;
begin
result := DataTable.Fields[idx_InventarioPRECIO_NETO].AsCurrency;
end;
procedure TInventarioDataTableRules.SetPRECIO_NETOValue(const aValue: Currency);
begin
DataTable.Fields[idx_InventarioPRECIO_NETO].AsCurrency := aValue;
end;
function TInventarioDataTableRules.GetPRECIO_NETOIsNull: boolean;
begin
result := DataTable.Fields[idx_InventarioPRECIO_NETO].IsNull;
end;
procedure TInventarioDataTableRules.SetPRECIO_NETOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_InventarioPRECIO_NETO].AsVariant := Null;
end;
function TInventarioDataTableRules.GetSTOCKValue: Int64;
begin
result := DataTable.Fields[idx_InventarioSTOCK].AsLargeInt;
@ -793,27 +709,6 @@ begin
DataTable.Fields[idx_InventarioUNIDADES_ALMACEN].AsVariant := Null;
end;
function TInventarioDataTableRules.GetCOSTE_UNIDADESValue: Currency;
begin
result := DataTable.Fields[idx_InventarioCOSTE_UNIDADES].AsCurrency;
end;
procedure TInventarioDataTableRules.SetCOSTE_UNIDADESValue(const aValue: Currency);
begin
DataTable.Fields[idx_InventarioCOSTE_UNIDADES].AsCurrency := aValue;
end;
function TInventarioDataTableRules.GetCOSTE_UNIDADESIsNull: boolean;
begin
result := DataTable.Fields[idx_InventarioCOSTE_UNIDADES].IsNull;
end;
procedure TInventarioDataTableRules.SetCOSTE_UNIDADESIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_InventarioCOSTE_UNIDADES].AsVariant := Null;
end;
function TInventarioDataTableRules.GetRESERVAValue: Int64;
begin
result := DataTable.Fields[idx_InventarioRESERVA].AsLargeInt;

View File

@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_InventarioDelta = '{85349204-7741-43F5-9BA3-E220A4FD11A6}';
RID_DetalleReservasDelta = '{33516718-F449-4975-84BC-AA4394AD0C53}';
RID_InventarioDelta = '{552B07EE-8CC1-4A6C-ACC8-1B9D569F37CD}';
RID_DetalleReservasDelta = '{0640D81A-8FD0-47AB-AB37-F4A91844711C}';
type
{ IInventarioDelta }
IInventarioDelta = interface(IInventario)
['{85349204-7741-43F5-9BA3-E220A4FD11A6}']
['{552B07EE-8CC1-4A6C-ACC8-1B9D569F37CD}']
{ Property getters and setters }
function GetOldID_ALMACENValue : Integer;
function GetOldID_ARTICULOValue : Integer;
@ -24,11 +24,8 @@ type
function GetOldREFERENCIAValue : String;
function GetOldFAMILIAValue : String;
function GetOldDESCRIPCIONValue : String;
function GetOldREFERENCIA_PROVEEDORValue : String;
function GetOldPRECIO_NETOValue : Currency;
function GetOldSTOCKValue : Int64;
function GetOldUNIDADES_ALMACENValue : Int64;
function GetOldCOSTE_UNIDADESValue : Currency;
function GetOldRESERVAValue : Int64;
function GetOldPENDIENTE_RECEPCIONValue : Int64;
function GetOldIDValue : Integer;
@ -45,11 +42,8 @@ type
property OldREFERENCIA : String read GetOldREFERENCIAValue;
property OldFAMILIA : String read GetOldFAMILIAValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue;
property OldSTOCK : Int64 read GetOldSTOCKValue;
property OldUNIDADES_ALMACEN : Int64 read GetOldUNIDADES_ALMACENValue;
property OldCOSTE_UNIDADES : Currency read GetOldCOSTE_UNIDADESValue;
property OldRESERVA : Int64 read GetOldRESERVAValue;
property OldPENDIENTE_RECEPCION : Int64 read GetOldPENDIENTE_RECEPCIONValue;
property OldID : Integer read GetOldIDValue;
@ -106,18 +100,6 @@ type
function GetOldDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_PROVEEDORValue: String; virtual;
function GetREFERENCIA_PROVEEDORIsNull: Boolean; virtual;
function GetOldREFERENCIA_PROVEEDORValue: String; virtual;
function GetOldREFERENCIA_PROVEEDORIsNull: Boolean; virtual;
procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
procedure SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean); virtual;
function GetPRECIO_NETOValue: Currency; virtual;
function GetPRECIO_NETOIsNull: Boolean; virtual;
function GetOldPRECIO_NETOValue: Currency; virtual;
function GetOldPRECIO_NETOIsNull: Boolean; virtual;
procedure SetPRECIO_NETOValue(const aValue: Currency); virtual;
procedure SetPRECIO_NETOIsNull(const aValue: Boolean); virtual;
function GetSTOCKValue: Int64; virtual;
function GetSTOCKIsNull: Boolean; virtual;
function GetOldSTOCKValue: Int64; virtual;
@ -130,12 +112,6 @@ type
function GetOldUNIDADES_ALMACENIsNull: Boolean; virtual;
procedure SetUNIDADES_ALMACENValue(const aValue: Int64); virtual;
procedure SetUNIDADES_ALMACENIsNull(const aValue: Boolean); virtual;
function GetCOSTE_UNIDADESValue: Currency; virtual;
function GetCOSTE_UNIDADESIsNull: Boolean; virtual;
function GetOldCOSTE_UNIDADESValue: Currency; virtual;
function GetOldCOSTE_UNIDADESIsNull: Boolean; virtual;
procedure SetCOSTE_UNIDADESValue(const aValue: Currency); virtual;
procedure SetCOSTE_UNIDADESIsNull(const aValue: Boolean); virtual;
function GetRESERVAValue: Int64; virtual;
function GetRESERVAIsNull: Boolean; virtual;
function GetOldRESERVAValue: Int64; virtual;
@ -208,14 +184,6 @@ type
property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull;
property REFERENCIA_PROVEEDOR : String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
property REFERENCIA_PROVEEDORIsNull : Boolean read GetREFERENCIA_PROVEEDORIsNull write SetREFERENCIA_PROVEEDORIsNull;
property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
property OldREFERENCIA_PROVEEDORIsNull : Boolean read GetOldREFERENCIA_PROVEEDORIsNull;
property PRECIO_NETO : Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
property PRECIO_NETOIsNull : Boolean read GetPRECIO_NETOIsNull write SetPRECIO_NETOIsNull;
property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue;
property OldPRECIO_NETOIsNull : Boolean read GetOldPRECIO_NETOIsNull;
property STOCK : Int64 read GetSTOCKValue write SetSTOCKValue;
property STOCKIsNull : Boolean read GetSTOCKIsNull write SetSTOCKIsNull;
property OldSTOCK : Int64 read GetOldSTOCKValue;
@ -224,10 +192,6 @@ type
property UNIDADES_ALMACENIsNull : Boolean read GetUNIDADES_ALMACENIsNull write SetUNIDADES_ALMACENIsNull;
property OldUNIDADES_ALMACEN : Int64 read GetOldUNIDADES_ALMACENValue;
property OldUNIDADES_ALMACENIsNull : Boolean read GetOldUNIDADES_ALMACENIsNull;
property COSTE_UNIDADES : Currency read GetCOSTE_UNIDADESValue write SetCOSTE_UNIDADESValue;
property COSTE_UNIDADESIsNull : Boolean read GetCOSTE_UNIDADESIsNull write SetCOSTE_UNIDADESIsNull;
property OldCOSTE_UNIDADES : Currency read GetOldCOSTE_UNIDADESValue;
property OldCOSTE_UNIDADESIsNull : Boolean read GetOldCOSTE_UNIDADESIsNull;
property RESERVA : Int64 read GetRESERVAValue write SetRESERVAValue;
property RESERVAIsNull : Boolean read GetRESERVAIsNull write SetRESERVAIsNull;
property OldRESERVA : Int64 read GetOldRESERVAValue;
@ -265,7 +229,7 @@ type
{ IDetalleReservasDelta }
IDetalleReservasDelta = interface(IDetalleReservas)
['{33516718-F449-4975-84BC-AA4394AD0C53}']
['{0640D81A-8FD0-47AB-AB37-F4A91844711C}']
{ Property getters and setters }
function GetOldID_ALBValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -698,68 +662,6 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioDESCRIPCION] := Null;
end;
function TInventarioBusinessProcessorRules.GetREFERENCIA_PROVEEDORValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioREFERENCIA_PROVEEDOR];
end;
function TInventarioBusinessProcessorRules.GetREFERENCIA_PROVEEDORIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioREFERENCIA_PROVEEDOR]);
end;
function TInventarioBusinessProcessorRules.GetOldREFERENCIA_PROVEEDORValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioREFERENCIA_PROVEEDOR];
end;
function TInventarioBusinessProcessorRules.GetOldREFERENCIA_PROVEEDORIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioREFERENCIA_PROVEEDOR]);
end;
procedure TInventarioBusinessProcessorRules.SetREFERENCIA_PROVEEDORValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioREFERENCIA_PROVEEDOR] := aValue;
end;
procedure TInventarioBusinessProcessorRules.SetREFERENCIA_PROVEEDORIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioREFERENCIA_PROVEEDOR] := Null;
end;
function TInventarioBusinessProcessorRules.GetPRECIO_NETOValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioPRECIO_NETO];
end;
function TInventarioBusinessProcessorRules.GetPRECIO_NETOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioPRECIO_NETO]);
end;
function TInventarioBusinessProcessorRules.GetOldPRECIO_NETOValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioPRECIO_NETO];
end;
function TInventarioBusinessProcessorRules.GetOldPRECIO_NETOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioPRECIO_NETO]);
end;
procedure TInventarioBusinessProcessorRules.SetPRECIO_NETOValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioPRECIO_NETO] := aValue;
end;
procedure TInventarioBusinessProcessorRules.SetPRECIO_NETOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioPRECIO_NETO] := Null;
end;
function TInventarioBusinessProcessorRules.GetSTOCKValue: Int64;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioSTOCK];
@ -822,37 +724,6 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioUNIDADES_ALMACEN] := Null;
end;
function TInventarioBusinessProcessorRules.GetCOSTE_UNIDADESValue: Currency;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioCOSTE_UNIDADES];
end;
function TInventarioBusinessProcessorRules.GetCOSTE_UNIDADESIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioCOSTE_UNIDADES]);
end;
function TInventarioBusinessProcessorRules.GetOldCOSTE_UNIDADESValue: Currency;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioCOSTE_UNIDADES];
end;
function TInventarioBusinessProcessorRules.GetOldCOSTE_UNIDADESIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioCOSTE_UNIDADES]);
end;
procedure TInventarioBusinessProcessorRules.SetCOSTE_UNIDADESValue(const aValue: Currency);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioCOSTE_UNIDADES] := aValue;
end;
procedure TInventarioBusinessProcessorRules.SetCOSTE_UNIDADESIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioCOSTE_UNIDADES] := Null;
end;
function TInventarioBusinessProcessorRules.GetRESERVAValue: Int64;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioRESERVA];

View File

@ -20,16 +20,17 @@ object srvInventario: TsrvInventario
TargetTable = 'V_INVENTARIO'
SQL =
'SELECT'#10' ID_ALMACEN, ID_ARTICULO, NOMBRE as ALMACEN, ID_EMPRES' +
'A, REFERENCIA, FAMILIA,'#10' DESCRIPCION, REFERENCIA_PROV as REFE' +
'RENCIA_PROVEEDOR, PRECIO_NETO, STOCK,'#10' UNIDADES_ALMACEN, COST' +
'E_UNIDADES, RESERVA, PENDIENTE_RECEPCION,'#10' '#10' /*'#10' NO BOR' +
'RAR YA QUE SIRVE PARA LAS ENTRADAS Y SALIDAS DE ALMACEN(TABLA MO' +
'VIMIENTOS)'#10' DEBERIA GENERAR UNA TABLA DE MOVIMIENTOS INDEPEND' +
'IENTE DEL INVENTARIO PERO POR FALTA'#10' DE TIEMPO Y FIABILIDAD Y' +
'A QUE AHORA FUNCIONA TODO, CREAMOS ESTOS CAMPOS FICTICIOS'#10' */' +
#10#10' 0 as ID, 0 as CANTIDAD, current_date as FECHA_MOVIMIENTO, ' +
'NULL as CAUSA, NULL as TIPO'#10#10#10'FROM V_INVENTARIO'#10'where {where}'#10'OR' +
'DER BY ID_ARTICULO'#10
'A, REFERENCIA, FAMILIA,'#10' DESCRIPCION,'#10'/* REFERENCIA_PROV a' +
's REFERENCIA_PROVEEDOR, PRECIO_NETO, COSTE_UNIDADES, SE ELIMINA' +
'N LOS PRECIOS CON HASTA SABER QUE DECISIONES SE TOMAN*/'#10' STOC' +
'K, UNIDADES_ALMACEN, RESERVA, PENDIENTE_RECEPCION,'#10' '#10' /*'#10' ' +
' NO BORRAR YA QUE SIRVE PARA LAS ENTRADAS Y SALIDAS DE ALMACEN' +
'(TABLA MOVIMIENTOS)'#10' DEBERIA GENERAR UNA TABLA DE MOVIMIENTOS' +
' INDEPENDIENTE DEL INVENTARIO PERO POR FALTA'#10' DE TIEMPO Y FIA' +
'BILIDAD YA QUE AHORA FUNCIONA TODO, CREAMOS ESTOS CAMPOS FICTICI' +
'OS'#10' */'#10#10' 0 as ID, 0 as CANTIDAD, current_date as FECHA_MOV' +
'IMIENTO, NULL as CAUSA, NULL as TIPO'#10#10#10'FROM V_INVENTARIO'#10'where {' +
'where}'#10'ORDER BY ID_ARTICULO'#10
StatementType = stSQL
ColumnMappings = <
item
@ -88,21 +89,9 @@ object srvInventario: TsrvInventario
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'UNIDADES_ALMACEN'
TableField = 'UNIDADES_ALMACEN'
end
item
DatasetField = 'PRECIO_NETO'
TableField = 'PRECIO_NETO'
end
item
DatasetField = 'COSTE_UNIDADES'
TableField = 'COSTE_UNIDADES'
end>
end>
Name = 'Inventario'
@ -146,17 +135,6 @@ object srvInventario: TsrvInventario
Size = 255
DictionaryEntry = 'INVENTARIO_DESCRIPCION'
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'INVENTARIO_REFERENCIA_PROVEEDOR'
end
item
Name = 'PRECIO_NETO'
DataType = datCurrency
DictionaryEntry = 'INVENTARIO_PRECIO_NETO'
end
item
Name = 'STOCK'
DataType = datLargeInt
@ -167,11 +145,6 @@ object srvInventario: TsrvInventario
DataType = datLargeInt
DictionaryEntry = 'INVENTARIO_UNIDADES_ALMACEN'
end
item
Name = 'COSTE_UNIDADES'
DataType = datCurrency
DictionaryEntry = 'INVENTARIO_COSTE_UNIDADES'
end
item
Name = 'RESERVA'
DataType = datLargeInt

Some files were not shown because too many files have changed in this diff Show More