Arreglado un fallo en contratos de cliente: cuando un cliente tiene varias direcciones y se elegía una direferente a la dirección fiscal no se copiaba ni el nombre ni el NIF/CIF al contrato. Sólo se copiaba la dirección. Ahora se copian todos los datos completos de la dirección al contrato. Se ha copiado del funcionamiento de facturas de cliente.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@660 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2017-04-21 16:50:18 +00:00
parent 6f62ee2ef0
commit 9b814af80b
32 changed files with 1064 additions and 744 deletions

View File

@ -52,7 +52,8 @@
<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">2</VersionInfo><VersionInfo Name="MinorVer">8</VersionInfo><VersionInfo Name="Release">2</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">2.8.2.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">2.8.2.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">2</VersionInfo><VersionInfo Name="MinorVer">8</VersionInfo><VersionInfo Name="Release">3</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">2.8.3.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">2.8.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>

View File

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

Binary file not shown.

View File

@ -58,34 +58,34 @@
<DelphiCompile Include="GUIBase.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Modulos\Contratos de cliente\Base.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\ccpackD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\frx11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\frxe11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\fs11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvGlobusD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\rtl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\tb2k_d10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vcl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vcldb.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vclx.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\Base.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\ccpackD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\frx11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\frxe11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\fs11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\JvGlobusD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\rtl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\tb2k_d10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vcl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vcldb.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Views\vclx.dcp" />
<DCCReference Include="uDialogBase.pas">
<Form>fDialogBase</Form>
</DCCReference>

View File

@ -74,6 +74,7 @@ begin
try
with ADireccion do
begin
NIF_CIF := AContacto.NIF_CIF;
NOMBRE := AContacto.NOMBRE;
CALLE := AContacto.CALLE;
POBLACION := AContacto.POBLACION;

View File

@ -2,18 +2,19 @@ inherited fEditorCliente: TfEditorCliente
Left = 387
Top = 297
Caption = 'Ficha de cliente'
ClientHeight = 852
ClientWidth = 998
ExplicitWidth = 1006
ExplicitHeight = 886
ClientHeight = 1052
ClientWidth = 994
ExplicitTop = -70
ExplicitWidth = 1002
ExplicitHeight = 1086
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 998
Width = 994
Caption = 'Ficha de cliente'
ExplicitWidth = 896
ExplicitWidth = 998
inherited Image1: TImage
Left = 971
Left = 967
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2
@ -49,49 +50,48 @@ inherited fEditorCliente: TfEditorCliente
end
end
inherited TBXDock: TTBXDock
Width = 998
ExplicitWidth = 896
Width = 994
ExplicitWidth = 998
inherited tbxMain: TTBXToolbar
ExplicitWidth = 446
ExplicitWidth = 579
object TBXItem7: TTBXItem [7]
Action = actGruposCliente
DisplayMode = nbdmImageAndText
end
end
inherited tbxMenu: TTBXToolbar
ExplicitWidth = 998
ExplicitWidth = 994
end
end
inherited StatusBar: TJvStatusBar
Top = 833
Width = 998
ExplicitTop = 626
ExplicitWidth = 896
Top = 1033
Width = 994
ExplicitTop = 833
ExplicitWidth = 998
end
inherited pgPaginas: TPageControl
Width = 992
Height = 721
ActivePage = pagPersonal
ExplicitWidth = 890
ExplicitHeight = 514
Width = 988
Height = 912
ExplicitWidth = 992
ExplicitHeight = 712
inherited pagGeneral: TTabSheet
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 984
ExplicitHeight = 684
inherited frViewPersonalContacto1: TfrViewPersonalContacto
Top = 543
Width = 984
Top = 681
Width = 980
TabOrder = 1
ExplicitTop = 336
ExplicitWidth = 882
ExplicitTop = 681
ExplicitWidth = 980
inherited cxGrid: TcxGrid
Width = 984
ExplicitTop = 25
ExplicitWidth = 882
ExplicitHeight = 461
Width = 980
ExplicitWidth = 984
end
inherited ToolBar1: TToolBar
Width = 984
ExplicitWidth = 882
Width = 980
ExplicitWidth = 984
inherited ToolButton1: TToolButton
ExplicitWidth = 62
end
@ -109,8 +109,8 @@ inherited fEditorCliente: TfEditorCliente
inline frViewCliente1: TfrViewCliente
Left = 0
Top = 0
Width = 984
Height = 543
Width = 980
Height = 681
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -120,271 +120,183 @@ inherited fEditorCliente: TfEditorCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 882
ExplicitHeight = 0
ExplicitWidth = 984
ExplicitHeight = 534
inherited dxLayoutControlContacto: TdxLayoutControl
Width = 984
Height = 543
Width = 980
Height = 681
LookAndFeel = dxLayoutOfficeLookAndFeel
ExplicitWidth = 882
ExplicitHeight = 0
ExplicitWidth = 984
ExplicitHeight = 534
inherited PngSpeedButton1: TPngSpeedButton
Left = 922
Left = 935
Top = 218
ExplicitLeft = 922
ExplicitLeft = 935
ExplicitTop = 218
end
inherited PngSpeedButton2: TPngSpeedButton
Left = 922
Left = 935
Top = 190
ExplicitLeft = 922
ExplicitLeft = 935
ExplicitTop = 190
end
inherited PngSpeedButton3: TPngSpeedButton
Left = 922
Left = 935
Top = 162
ExplicitLeft = 922
ExplicitLeft = 935
ExplicitTop = 162
end
inherited eCalle: TcxDBTextEdit
Top = 216
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 216
ExplicitWidth = 428
Width = 428
end
inherited cbProvincia: TcxDBComboBox
Top = 243
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 243
ExplicitWidth = 336
Width = 336
end
inherited cbPoblacion: TcxDBComboBox
Top = 270
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 270
ExplicitWidth = 428
Width = 428
end
inherited eCodigoPostal: TcxDBTextEdit
Left = 560
Left = 568
Top = 243
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 560
ExplicitLeft = 568
ExplicitTop = 243
end
inherited eTlfParticular: TcxDBTextEdit
Left = 739
Left = 747
Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 57
ExplicitWidth = 177
Width = 177
end
inherited eNombreComercial: TcxDBTextEdit
Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84
ExplicitWidth = 428
Width = 428
end
inherited cbClienteBloqueado: TcxDBCheckBox
Top = 348
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 348
ExplicitWidth = 538
Width = 538
end
inherited cbGrupoCliente: TcxDBComboBox
Top = 138
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 138
ExplicitWidth = 428
Width = 428
end
inherited eBloqueo: TcxDBTextEdit
Top = 375
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 375
ExplicitWidth = 428
Width = 428
end
inherited eCodigoAsignado: TcxDBTextEdit
Top = 111
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 111
ExplicitWidth = 428
Width = 428
end
inherited cbProcedenciaCliente: TcxDBComboBox
Top = 165
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 165
ExplicitWidth = 428
Width = 428
end
inherited eTlfTrabajo: TcxDBTextEdit
Left = 739
Left = 747
Top = 30
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 30
ExplicitWidth = 177
Width = 177
end
inherited eTlfMovil: TcxDBTextEdit
Left = 739
Left = 747
Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 84
ExplicitWidth = 177
Width = 177
end
inherited eFax: TcxDBTextEdit
Left = 739
Left = 747
Top = 111
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 111
ExplicitWidth = 177
Width = 177
end
inherited eNombre: TcxDBTextEdit
Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57
ExplicitWidth = 428
Width = 428
end
inherited eNIFCIF: TcxDBTextEdit
Left = 312
Left = 315
Top = 30
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 312
ExplicitLeft = 315
ExplicitTop = 30
ExplicitWidth = 271
Width = 271
end
inherited eMailTrabajo: TcxDBHyperLinkEdit
Left = 739
Left = 747
Top = 162
Properties.Prefix = 'mailto:'
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 162
ExplicitWidth = 148
Width = 148
end
inherited eMailParticular: TcxDBHyperLinkEdit
Left = 739
Left = 747
Top = 190
Properties.Prefix = 'mailto:'
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 190
ExplicitWidth = 148
Width = 148
end
inherited ePaginaWeb: TcxDBHyperLinkEdit
Left = 739
Left = 747
Top = 217
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 739
ExplicitLeft = 747
ExplicitTop = 217
ExplicitWidth = 148
Width = 148
end
inherited eReferencia: TcxDBTextEdit
Top = 30
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30
ExplicitWidth = 104
Width = 104
end
inherited ePersonaContacto: TcxDBTextEdit
Top = 297
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 297
ExplicitWidth = 428
Width = 428
end
inherited frViewTienda1: TfrViewTienda
Left = 644
Left = 652
Top = 270
ExplicitLeft = 644
ExplicitLeft = 652
ExplicitTop = 270
inherited dxLayoutControl1: TdxLayoutControl
inherited cbTienda: TcxComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 229
Width = 229
end
@ -409,54 +321,32 @@ inherited fEditorCliente: TfEditorCliente
end
end
inherited pagDatosBancarios: TTabSheet
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitWidth = 980
ExplicitHeight = 884
inherited frViewClienteDatosBancarios: TfrViewClienteDatosBancarios
Width = 984
Height = 693
ExplicitWidth = 882
ExplicitHeight = 486
Width = 980
Height = 884
ExplicitWidth = 980
ExplicitHeight = 884
inherited dxLayoutControl1: TdxLayoutControl
Width = 984
Width = 980
LookAndFeel = dxLayoutOfficeLookAndFeel
ExplicitWidth = 882
ExplicitWidth = 980
inherited eEntidad: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 345
Width = 345
end
inherited eSucursal: TcxDBTextEdit
Left = 596
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 596
Left = 594
ExplicitLeft = 594
ExplicitWidth = 318
Width = 318
end
inherited eCuenta: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 622
Width = 622
end
inherited eDC: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited eTitular: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 743
Width = 743
end
@ -466,18 +356,22 @@ inherited fEditorCliente: TfEditorCliente
inherited pagPersonal: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitWidth = 984
ExplicitHeight = 684
inherited memObservaciones22: TcxDBMemo
ExplicitWidth = 980
ExplicitHeight = 884
Height = 884
Width = 980
end
end
object pagDatosComerciales: TTabSheet
Caption = 'Datos comerciales'
ImageIndex = 4
ExplicitWidth = 882
ExplicitHeight = 486
inline frViewClienteDatosComerciales1: TfrViewClienteDatosComerciales
Left = 0
Top = 0
Width = 984
Width = 980
Height = 193
Align = alTop
Font.Charset = DEFAULT_CHARSET
@ -488,102 +382,74 @@ inherited fEditorCliente: TfEditorCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 882
ExplicitWidth = 980
ExplicitHeight = 193
inherited dxLayoutControl1: TdxLayoutControl
Width = 984
Width = 980
Height = 193
LookAndFeel = dxLayoutOfficeLookAndFeel
ExplicitWidth = 882
ExplicitWidth = 980
ExplicitHeight = 193
inherited Label1: TLabel
Left = 641
Left = 638
Top = 30
Width = 277
ExplicitLeft = 641
ExplicitLeft = 638
ExplicitTop = 30
ExplicitWidth = 277
end
inherited eDiasVencimiento: TcxDBSpinEdit
Left = 713
Left = 710
Top = 62
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 713
ExplicitLeft = 710
ExplicitTop = 62
end
inherited cbRegimenIVA: TcxDBComboBox
Top = 30
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30
ExplicitWidth = 427
Width = 427
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 111
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 111
ExplicitWidth = 427
Width = 427
end
inherited cbFormaPago: TcxDBLookupComboBox
Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57
ExplicitWidth = 289
Width = 289
end
inherited bFormasPago: TButton
Left = 481
Left = 478
Top = 57
ExplicitLeft = 481
ExplicitLeft = 478
ExplicitTop = 57
end
inherited eIVA: TcxDBLookupComboBox
Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84
ExplicitWidth = 289
Width = 289
end
inherited bTiposIVA: TButton
Left = 481
Left = 478
Top = 84
ExplicitLeft = 481
ExplicitLeft = 478
ExplicitTop = 84
end
inherited cxDBSpinEdit1: TcxDBSpinEdit
Left = 713
Left = 710
Top = 89
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 713
ExplicitLeft = 710
ExplicitTop = 89
end
inherited cxDBSpinEdit2: TcxDBSpinEdit
Left = 713
Left = 710
Top = 116
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 713
ExplicitLeft = 710
ExplicitTop = 116
end
inherited dxLayoutGroup1: TdxLayoutGroup
@ -599,13 +465,11 @@ inherited fEditorCliente: TfEditorCliente
object pagDirecciones: TTabSheet
Caption = 'Direcciones'
ImageIndex = 1
ExplicitWidth = 882
ExplicitHeight = 486
inline frViewDireccionesEntrega1: TfrViewDireccionesEntrega
Left = 0
Top = 0
Width = 984
Height = 693
Width = 980
Height = 884
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -615,11 +479,11 @@ inherited fEditorCliente: TfEditorCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitWidth = 980
ExplicitHeight = 884
inherited cxGrid: TcxGrid
Width = 984
Height = 668
Width = 980
Height = 859
ExplicitWidth = 984
ExplicitHeight = 668
inherited cxGridView: TcxGridDBTableView
@ -630,8 +494,20 @@ inherited fEditorCliente: TfEditorCliente
end
end
inherited ToolBar1: TToolBar
Width = 984
Width = 980
ExplicitWidth = 984
inherited ToolButton1: TToolButton
ExplicitWidth = 113
end
inherited ToolButton4: TToolButton
ExplicitWidth = 113
end
inherited ToolButton2: TToolButton
ExplicitWidth = 113
end
inherited ToolButton7: TToolButton
ExplicitWidth = 113
end
end
end
end
@ -639,13 +515,11 @@ inherited fEditorCliente: TfEditorCliente
Caption = 'Descuentos'
ImageIndex = 2
TabVisible = False
ExplicitWidth = 882
ExplicitHeight = 486
inline frViewClienteDescuentos1: TfrViewClienteDescuentos
Left = 0
Top = 0
Width = 984
Height = 693
Width = 980
Height = 884
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -655,16 +529,16 @@ inherited fEditorCliente: TfEditorCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitWidth = 980
ExplicitHeight = 884
inherited cxGrid: TcxGrid
Width = 984
Height = 668
Width = 980
Height = 859
ExplicitWidth = 984
ExplicitHeight = 668
end
inherited ToolBar1: TToolBar
Width = 984
Width = 980
ExplicitWidth = 984
inherited ToolButton1: TToolButton
ExplicitWidth = 62
@ -684,13 +558,15 @@ inherited fEditorCliente: TfEditorCliente
object pagContabilidad: TTabSheet
Caption = 'Contabilidad'
ImageIndex = 5
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 984
ExplicitHeight = 684
inline frViewSubCuentaContacto1: TfrViewSubCuentaContacto
Left = 0
Top = 0
Width = 984
Height = 693
Width = 980
Height = 884
Align = alClient
AutoSize = True
Font.Charset = DEFAULT_CHARSET
@ -701,50 +577,38 @@ inherited fEditorCliente: TfEditorCliente
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 882
ExplicitHeight = 486
ExplicitWidth = 984
ExplicitHeight = 684
inherited layoutApunte: TdxLayoutControl
Width = 984
Height = 693
ExplicitWidth = 882
ExplicitHeight = 486
Width = 980
Height = 884
ExplicitWidth = 984
ExplicitHeight = 684
DesignSize = (
984
693)
980
884)
inherited eRefSubCuenta: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 441
Width = 441
end
inherited BitBtn3: TBitBtn
Left = 642
ExplicitLeft = 642
Left = 638
ExplicitLeft = 638
end
inherited eSubCuenta: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 779
Width = 779
end
inherited BitBtn1: TBitBtn
Left = 758
ExplicitLeft = 758
Left = 754
ExplicitLeft = 754
end
inherited BitBtn2: TBitBtn
Left = 884
ExplicitLeft = 884
Left = 880
ExplicitLeft = 880
end
inherited cbIgnorarContabilidad: TcxDBCheckBox
DataBinding.DataSource = frViewCliente1.dsContacto
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 862
Width = 862
end
@ -760,12 +624,8 @@ inherited fEditorCliente: TfEditorCliente
end
end
inherited PnlComentario: TPanel
Width = 998
ExplicitWidth = 896
inherited lbComentario: TLabel
Width = 988
Height = 25
end
Width = 994
ExplicitWidth = 998
end
inherited dsDataTable: TDADataSource
Left = 16

View File

@ -15,7 +15,8 @@ uses
uViewDireccionesEntrega, uViewDetallesGenerico, uViewClienteDescuentos,
uViewContactoDatosBancarios, dxLayoutLookAndFeels,
uViewClienteDatosComerciales, uDAInterfaces, uViewSubCuentaContacto,
uViewPersonalContacto, Grids, DBGrids;
uViewPersonalContacto, Grids, DBGrids, cxControls, cxContainer, cxEdit,
cxTextEdit, cxMemo, cxDBEdit;
type
TfEditorCliente = class(TfEditorContacto, IEditorCliente)
@ -46,7 +47,7 @@ implementation
{$INCLUDE ..\..\..\FactuGES.inc}
uses
uEditorItem, uEditorBase, uDataModuleUsuarios, uEditorDBItem, cxDBEdit,
uEditorItem, uEditorBase, uDataModuleUsuarios, uEditorDBItem,
uGruposClienteController, uBizGruposCliente, uEditorDBBase, uDialogUtils,
uClientesController;

View File

@ -24,7 +24,7 @@ inherited fEditorContacto: TfEditorContacto
Width = 949
ExplicitWidth = 949
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
ExplicitWidth = 423
inherited TBXItem2: TTBXItem
Visible = False
end
@ -86,20 +86,19 @@ inherited fEditorContacto: TfEditorContacto
end
inherited pgPaginas: TPageControl
Width = 943
Height = 608
ActivePage = pagPersonal
Height = 599
ExplicitWidth = 943
ExplicitHeight = 608
ExplicitHeight = 599
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 935
ExplicitHeight = 580
ExplicitHeight = 571
inline frViewPersonalContacto1: TfrViewPersonalContacto
Left = 0
Top = 430
Top = 368
Width = 935
Height = 150
Height = 203
Align = alBottom
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -109,12 +108,12 @@ inherited fEditorContacto: TfEditorContacto
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitTop = 430
ExplicitTop = 368
ExplicitWidth = 935
ExplicitHeight = 150
ExplicitHeight = 203
inherited cxGrid: TcxGrid
Width = 935
Height = 125
Height = 178
ExplicitWidth = 935
ExplicitHeight = 125
end
@ -131,7 +130,7 @@ inherited fEditorContacto: TfEditorContacto
Left = 0
Top = 0
Width = 935
Height = 580
Height = 571
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -142,17 +141,13 @@ inherited fEditorContacto: TfEditorContacto
TabOrder = 0
ReadOnly = False
ExplicitWidth = 935
ExplicitHeight = 580
ExplicitHeight = 571
inherited dxLayoutControl1: TdxLayoutControl
Width = 935
LookAndFeel = dxLayoutOfficeLookAndFeel
ExplicitWidth = 935
inherited eEntidad: TcxDBTextEdit
Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57
ExplicitWidth = 114
Width = 114
@ -160,10 +155,6 @@ inherited fEditorContacto: TfEditorContacto
inherited eSucursal: TcxDBTextEdit
Left = 570
Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 570
ExplicitTop = 57
ExplicitWidth = 112
@ -171,28 +162,16 @@ inherited fEditorContacto: TfEditorContacto
end
inherited eCuenta: TcxDBTextEdit
Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84
ExplicitWidth = 194
Width = 194
end
inherited eDC: TcxDBTextEdit
Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84
end
inherited eTitular: TcxDBTextEdit
Top = 30
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30
ExplicitWidth = 194
Width = 194
@ -215,7 +194,7 @@ inherited fEditorContacto: TfEditorContacto
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Height = 580
Height = 571
Width = 935
end
end

View File

@ -1,12 +1,12 @@
inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
Width = 350
Width = 781
Height = 212
ExplicitWidth = 350
ExplicitWidth = 781
ExplicitHeight = 212
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
Width = 350
Width = 781
Height = 212
Margins.Left = 0
Margins.Top = 0
@ -18,7 +18,7 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
350
781
212)
object edtlNombre: TcxDBTextEdit
Left = 64
@ -28,7 +28,6 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -51,7 +50,6 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
DataBinding.DataField = 'NIF_CIF'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -74,7 +72,6 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
DataBinding.DataField = 'CALLE'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -97,7 +94,6 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -120,7 +116,6 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -136,14 +131,13 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
Width = 327
end
object edtCodigoPostal: TcxDBTextEdit
Left = 258
Left = 689
Top = 122
Anchors = [akLeft, akTop, akRight]
AutoSize = False
DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -247,7 +241,7 @@ inherited frViewDatosYSeleccionCliente: TfrViewDatosYSeleccionCliente
FF00FF00FF00006000000060000000600000FF00FF00FF00FF00}
end
object Button3: TBitBtn
Left = 148
Left = 579
Top = 176
Width = 192
Height = 25

View File

@ -76,9 +76,6 @@ type
FCliente : IBizCliente;
FOnClienteChanged : TNotifyEvent;
FMsgElegirCliente: String;
function GetMsgElegirCliente: String;
procedure SetMsgElegirCliente(const Value: String);
protected
function GetController: IClientesController;
procedure SetController(Value: IClientesController);
@ -89,6 +86,8 @@ type
procedure SetReadOnly(Value: Boolean); override;
function GetID_Cliente: integer;
procedure SetID_Cliente(const Value: integer);
function GetMsgElegirCliente: String;
procedure SetMsgElegirCliente(const Value: String);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -104,7 +103,7 @@ implementation
{$R *.dfm}
uses
uDataModuleClientes, Math, uCustomView;
uDataModuleClientes, Math, uCustomView, uDialogUtils;
procedure TfrViewDatosYSeleccionCliente.actElegirContactoExecute(Sender: TObject);
var
@ -137,9 +136,23 @@ begin
end;
procedure TfrViewDatosYSeleccionCliente.actVerContactoExecute(Sender: TObject);
var
ACliente : IBizCliente;
begin
inherited;
Controller.Ver(Cliente);
if not Assigned(Cliente) then
ShowErrorMessage('No se ha indicado un cliente', 'El contrato no tiene ningún cliente asociado a mostrar.')
else begin
Controller.Ver(Cliente);
if (Application.MessageBox('¿Desea recargar los datos del cliente en el documento?', 'Atención', MB_YESNO) = IDYES) then
begin
ACliente := (Controller.Buscar(Cliente.ID) as IBizCliente);
if Assigned(ACliente) then
Self.Cliente := ACliente;
ACliente := Nil;
end;
end;
end;
procedure TfrViewDatosYSeleccionCliente.actVerContactoUpdate(Sender: TObject);

View File

@ -28,7 +28,6 @@ inherited frViewDatosYSeleccionProveedor: TfrViewDatosYSeleccionProveedor
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -51,7 +50,6 @@ inherited frViewDatosYSeleccionProveedor: TfrViewDatosYSeleccionProveedor
DataBinding.DataField = 'NIF_CIF'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -74,7 +72,6 @@ inherited frViewDatosYSeleccionProveedor: TfrViewDatosYSeleccionProveedor
DataBinding.DataField = 'CALLE'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -97,7 +94,6 @@ inherited frViewDatosYSeleccionProveedor: TfrViewDatosYSeleccionProveedor
DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -120,7 +116,6 @@ inherited frViewDatosYSeleccionProveedor: TfrViewDatosYSeleccionProveedor
DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -143,7 +138,6 @@ inherited frViewDatosYSeleccionProveedor: TfrViewDatosYSeleccionProveedor
DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame

View File

@ -64,6 +64,8 @@ type
procedure FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString; const Ano: String);
procedure VerListadoBeneficios;
procedure VerPedidosProveedor(AContrato : IBizContratoCliente);
procedure CopiarDireccion (const ADireccion: IBizDireccionesContacto; AContrato: IBizContratoCliente);
end;
TContratosClienteController = class(TControllerBase, IContratosClienteController)
@ -138,6 +140,8 @@ type
procedure FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString; const Ano: String);
procedure VerListadoBeneficios;
procedure VerPedidosProveedor(AContrato : IBizContratoCliente);
procedure CopiarDireccion (const ADireccion: IBizDireccionesContacto; AContrato: IBizContratoCliente);
end;
implementation
@ -292,6 +296,45 @@ begin
end;
end;
procedure TContratosClienteController.CopiarDireccion(
const ADireccion: IBizDireccionesContacto;
AContrato: IBizContratoCliente);
var
bEnEdicion : Boolean;
begin
if not Assigned(AContrato) then
raise Exception.Create ('Contrato no asignado (CopiarDireccion)');
if not Assigned(ADireccion) then
raise Exception.Create ('No se ha indicado la dirección (CopiarDireccion)');
if AContrato.DataTable.Active then
AContrato.DataTable.Active := True;
if ADireccion.DataTable.Active then
ADireccion.DataTable.Active := True;
bEnEdicion := (AContrato.DataTable.State in dsEditModes);
if not bEnEdicion then
AContrato.Edit;
ShowHourglassCursor;
AContrato.Edit;
try
AContrato.CALLE := ADireccion.CALLE;
AContrato.POBLACION := ADireccion.POBLACION;
AContrato.CODIGO_POSTAL := ADireccion.CODIGO_POSTAL;
AContrato.PROVINCIA := ADireccion.PROVINCIA;
AContrato.NIF_CIF := ADireccion.NIF_CIF;
AContrato.NOMBRE := ADireccion.NOMBRE;
if not bEnEdicion then
AContrato.Post;
finally
HideHourglassCursor;
end;
end;
constructor TContratosClienteController.Create;
begin
inherited;

View File

@ -93,6 +93,7 @@ contains
uViewDocumentosContratoCliente in 'uViewDocumentosContratoCliente.pas' {frViewDocumentosContratoCliente: TFrame},
uViewDatosYSeleccionClienteContrato in 'uViewDatosYSeleccionClienteContrato.pas' {frViewDatosYSeleccionClienteContrato: TFrame},
uViewContratosClienteBeneficios in 'uViewContratosClienteBeneficios.pas' {frViewContratosClienteBeneficios: TFrame},
uEditorContratosClienteBeneficios in 'uEditorContratosClienteBeneficios.pas' {fEditorContratosClienteBeneficios: TFrame};
uEditorContratosClienteBeneficios in 'uEditorContratosClienteBeneficios.pas' {fEditorContratosClienteBeneficios: TFrame},
uViewClienteContrato in 'uViewClienteContrato.pas' {frViewClienteContrato: TFrame};
end.

View File

@ -49,58 +49,51 @@
<DelphiCompile Include="ContratosCliente_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Lib\adortl.dcp" />
<DCCReference Include="..\..\Lib\Articulos_view.dcp" />
<DCCReference Include="..\..\Lib\Base.dcp" />
<DCCReference Include="..\..\Lib\ConCli_AlbCli_relation.dcp" />
<DCCReference Include="..\..\Lib\ConCli_FacCli_relation.dcp" />
<DCCReference Include="..\..\Lib\ConCli_PedProv_relation.dcp" />
<DCCReference Include="..\..\Lib\ContratosCliente_controller.dcp" />
<DCCReference Include="..\..\Lib\ContratosCliente_model.dcp" />
<DCCReference Include="..\..\Lib\cxDataD11.dcp" />
<DCCReference Include="..\..\Lib\cxEditorsD11.dcp" />
<DCCReference Include="..\..\Lib\cxExportD11.dcp" />
<DCCReference Include="..\..\Lib\cxExtEditorsD11.dcp" />
<DCCReference Include="..\..\Lib\cxGridD11.dcp" />
<DCCReference Include="..\..\Lib\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Lib\cxPageControlD11.dcp" />
<DCCReference Include="..\..\Lib\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\..\Lib\dbrtl.dcp" />
<DCCReference Include="..\..\Lib\dclcxLibraryD11.dcp" />
<DCCReference Include="..\..\Lib\dcldxCoreD11.dcp" />
<DCCReference Include="..\..\Lib\designide.dcp" />
<DCCReference Include="..\..\Lib\dsnap.dcp" />
<DCCReference Include="..\..\Lib\dxComnD11.dcp" />
<DCCReference Include="..\..\Lib\dxCoreD11.dcp" />
<DCCReference Include="..\..\Lib\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Lib\dxLayoutControlD11.dcp" />
<DCCReference Include="..\..\Lib\dxPSCoreD11.dcp" />
<DCCReference Include="..\..\Lib\dxPScxCommonD11.dcp" />
<DCCReference Include="..\..\Lib\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\..\Lib\dxPSLnksD11.dcp" />
<DCCReference Include="..\..\Lib\dxThemeD11.dcp" />
<DCCReference Include="..\..\Lib\GestorInformes_controller.dcp" />
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
<DCCReference Include="..\..\Lib\GUISDK_D11R.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\RemObjects_Core_D11.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\vclshlctrls.dcp" />
<DCCReference Include="..\..\Lib\vclx.dcp" />
<DCCReference Include="..\..\Lib\xmlrtl.dcp" />
<DCCReference Include="adortl.dcp" />
<DCCReference Include="Articulos_view.dcp" />
<DCCReference Include="Base.dcp" />
<DCCReference Include="ConCli_AlbCli_relation.dcp" />
<DCCReference Include="ConCli_FacCli_relation.dcp" />
<DCCReference Include="ConCli_PedProv_relation.dcp" />
<DCCReference Include="ContratosCliente_controller.dcp" />
<DCCReference Include="ContratosCliente_model.dcp" />
<DCCReference Include="cxDataD11.dcp" />
<DCCReference Include="cxEditorsD11.dcp" />
<DCCReference Include="cxExportD11.dcp" />
<DCCReference Include="cxExtEditorsD11.dcp" />
<DCCReference Include="cxGridD11.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="dcldxCoreD11.dcp" />
<DCCReference Include="designide.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxCoreD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="dxLayoutControlD11.dcp" />
<DCCReference Include="dxPSCoreD11.dcp" />
<DCCReference Include="dxPScxCommonD11.dcp" />
<DCCReference Include="dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="dxPSLnksD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="GestorInformes_controller.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="GUISDK_D11R.dcp" />
<DCCReference Include="Jcl.dcp" />
<DCCReference Include="JclVcl.dcp" />
<DCCReference Include="JvCoreD11R.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="uContratosClienteViewRegister.pas" />
<DCCReference Include="uEditorContratoCliente.pas">
<Form>fEditorPresupuestoCliente</Form>
@ -126,6 +119,10 @@
<Form>fEditorElegirPresupuestosCliente</Form>
<DesignClass>TfEditorElegirPedidosCliente</DesignClass>
</DCCReference>
<DCCReference Include="uViewClienteContrato.pas">
<Form>frViewClienteContrato</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewContratoCliente.pas">
<Form>frViewContratoCliente</Form>
<DesignClass>TFrame</DesignClass>
@ -158,6 +155,13 @@
<Form>frViewElegirArticulosContratosCliente</Form>
<DesignClass>TFrame</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

@ -168,27 +168,219 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
item
Width = 200
end>
ExplicitTop = 614
ExplicitTop = 779
ExplicitWidth = 872
end
inherited pgPaginas: TPageControl
Width = 866
Height = 464
ActivePage = pagDocumentos
TabOrder = 1
OnChanging = pgPaginasChanging
ExplicitWidth = 866
ExplicitHeight = 299
ExplicitHeight = 464
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 858
ExplicitHeight = 271
ExplicitHeight = 436
inline frViewContratoCliente1: TfrViewContratoCliente
Left = 0
Top = 0
Width = 858
Height = 436
Align = alClient
TabOrder = 0
ReadOnly = False
ExplicitWidth = 858
ExplicitHeight = 436
inherited dxLayoutControl1: TdxLayoutControl
Width = 858
Height = 436
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 858
ExplicitHeight = 436
inherited edtFechaContrato: TcxDBDateEdit
Top = 84
ExplicitTop = 84
ExplicitWidth = 129
Width = 129
end
inherited memObservaciones: TcxDBMemo
Left = 449
Top = 378
ExplicitLeft = 449
ExplicitTop = 378
ExplicitWidth = 404
ExplicitHeight = 139
Height = 139
Width = 404
end
inherited eReferencia: TcxDBTextEdit
Top = 30
ExplicitTop = 30
ExplicitWidth = 122
Width = 122
end
inherited cbFormaPago: TcxDBLookupComboBox
Top = 138
ExplicitTop = 138
ExplicitWidth = 122
Width = 122
end
inherited bFormasPago: TButton
Left = 289
Top = 138
ExplicitLeft = 289
ExplicitTop = 138
end
inherited cbSituacion: TcxDBImageComboBox
Top = 111
ExplicitTop = 111
ExplicitWidth = 260
Width = 260
end
inherited memFormaPago: TcxDBMemo
Top = 216
ExplicitTop = 216
ExplicitWidth = 396
ExplicitHeight = 100
Height = 100
Width = 396
end
inherited memPlazoEntrega: TcxDBMemo
Top = 333
ExplicitTop = 333
ExplicitWidth = 396
ExplicitHeight = 100
Height = 100
Width = 396
end
inherited cbVendedor: TcxDBLookupComboBox
Top = 165
ExplicitTop = 165
ExplicitWidth = 27
Width = 27
end
inherited cbTipoContrato: TcxDBComboBox
Left = 310
Top = 84
ExplicitLeft = 310
ExplicitTop = 84
ExplicitWidth = 113
Width = 113
end
inherited edtlREF_CLIENTE: TcxDBTextEdit
Top = 57
ExplicitTop = 57
ExplicitWidth = 335
Width = 335
end
inherited frViewClienteContrato1: TfrViewClienteContrato
Left = 449
Top = 30
Width = 357
ExplicitLeft = 449
ExplicitTop = 30
ExplicitWidth = 357
inherited dxLayoutControl1: TdxLayoutControl
Width = 357
LookAndFeel = dxLayoutOfficeLookAndFeel1
inherited Bevel1: TBevel
Left = 82
Top = 72
Width = 266
ExplicitLeft = 82
ExplicitTop = 72
ExplicitWidth = 266
end
inherited edtlNombre: TcxDBTextEdit
Left = 82
Top = 95
DataBinding.DataSource = dsDataTable
Properties.OnChange = frViewClienteContrato1edtlNombrePropertiesChange
Properties.OnEditValueChanged = frViewClienteContrato1edtlNombrePropertiesEditValueChanged
ExplicitLeft = 82
ExplicitTop = 95
ExplicitWidth = 707
Width = 707
end
inherited edtNIFCIF: TcxDBTextEdit
Left = 82
Top = 122
DataBinding.DataSource = dsDataTable
ExplicitLeft = 82
ExplicitTop = 122
ExplicitWidth = 707
Width = 707
end
inherited edtCalle: TcxDBTextEdit
Left = 82
Top = 149
DataBinding.DataSource = dsDataTable
ExplicitLeft = 82
ExplicitTop = 149
ExplicitWidth = 707
Width = 707
end
inherited edtPoblacion: TcxDBTextEdit
Left = 82
Top = 176
DataBinding.DataSource = dsDataTable
ExplicitLeft = 82
ExplicitTop = 176
ExplicitWidth = 589
Width = 589
end
inherited edtProvincia: TcxDBTextEdit
Left = 82
Top = 203
DataBinding.DataSource = dsDataTable
ExplicitLeft = 82
ExplicitTop = 203
ExplicitWidth = 707
Width = 707
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 294
Top = 176
DataBinding.DataSource = dsDataTable
ExplicitLeft = 294
ExplicitTop = 176
end
inherited Button1: TBitBtn
Left = 11
Top = 11
ExplicitLeft = 11
ExplicitTop = 11
end
inherited Button2: TBitBtn
Left = 132
Top = 11
ExplicitLeft = 132
ExplicitTop = 11
end
inherited Button3: TBitBtn
Left = 184
Top = 230
ExplicitLeft = 184
ExplicitTop = 230
end
inherited cxDBTextEdit1: TcxDBTextEdit
Left = 82
Top = 42
ExplicitLeft = 82
ExplicitTop = 42
ExplicitWidth = 283
Width = 283
end
end
end
end
end
end
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
ExplicitHeight = 271
inline frViewDetallesContratoCliente1: TfrViewDetallesContratoCliente
Left = 0
Top = 0
@ -206,7 +398,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 858
ExplicitHeight = 271
ExplicitHeight = 436
inherited ToolBar1: TToolBar
Width = 858
ExplicitWidth = 858
@ -216,65 +408,67 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
inherited ToolButton14: TToolButton
Left = 334
Top = 0
Wrap = True
ExplicitLeft = 334
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
inherited FontSize: TEdit [5]
Left = 0
ExplicitLeft = 0
end
inherited ToolButton13: TToolButton [6]
Left = 145
ExplicitLeft = 145
end
inherited ToolButton6: TToolButton [7]
Left = 153
ExplicitLeft = 153
end
inherited ToolButton7: TToolButton [8]
Left = 187
ExplicitLeft = 187
end
inherited ToolButton8: TToolButton [9]
Left = 221
ExplicitLeft = 221
end
inherited ToolButton12: TToolButton [10]
Left = 255
ExplicitLeft = 255
end
inherited ToolButton9: TToolButton [11]
Left = 263
ExplicitLeft = 263
end
inherited ToolButton10: TToolButton [12]
Left = 297
ExplicitLeft = 297
end
inherited ToolButton11: TToolButton [13]
Left = 331
ExplicitLeft = 331
end
inherited FontSize: TEdit [14]
Left = 365
Width = 110
ExplicitLeft = 365
ExplicitLeft = 0
ExplicitWidth = 110
end
inherited UpDown1: TUpDown [15]
Left = 475
ExplicitLeft = 475
inherited UpDown1: TUpDown [6]
Left = 110
ExplicitLeft = 110
end
inherited FontName: TJvFontComboBox [7]
Left = 127
ExplicitLeft = 127
end
inherited ToolButton13: TToolButton
Left = 272
ExplicitLeft = 272
end
inherited ToolButton6: TToolButton
Left = 280
ExplicitLeft = 280
end
inherited ToolButton7: TToolButton
Left = 314
ExplicitLeft = 314
end
inherited ToolButton8: TToolButton
Left = 348
ExplicitLeft = 348
end
inherited ToolButton12: TToolButton
Left = 382
ExplicitLeft = 382
end
inherited ToolButton9: TToolButton
Left = 390
ExplicitLeft = 390
end
inherited ToolButton10: TToolButton
Left = 424
ExplicitLeft = 424
end
inherited ToolButton11: TToolButton
Left = 458
ExplicitLeft = 458
end
end
inherited cxGrid: TcxGrid
Width = 858
Height = 361
ExplicitTop = 53
ExplicitTop = 75
ExplicitWidth = 858
ExplicitHeight = 218
ExplicitHeight = 361
end
inherited TBXDock1: TTBXDock
Width = 858
ExplicitTop = 46
ExplicitWidth = 858
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 858
@ -294,7 +488,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object pagCalidades: TTabSheet
Caption = 'Calidades'
ImageIndex = 5
ExplicitHeight = 271
object dxLayoutControl2: TdxLayoutControl
Left = 0
Top = 0
@ -304,7 +497,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
ExplicitHeight = 271
object memCalidades: TcxDBMemo
Left = 10
Top = 10
@ -343,7 +535,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object pagCondiciones: TTabSheet
Caption = 'Condiciones'
ImageIndex = 4
ExplicitHeight = 271
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
@ -353,7 +544,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
ExplicitHeight = 271
object memCondiciones: TcxDBMemo
Left = 10
Top = 10
@ -392,7 +582,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
object pagInicidencias: TTabSheet
Caption = 'Incidencias'
ImageIndex = 2
ExplicitHeight = 271
inline frViewIncidenciasCli: TfrViewIncidencias
Left = 0
Top = 0
@ -408,7 +597,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 858
ExplicitHeight = 271
ExplicitHeight = 436
inherited pnlSup: TPanel
Width = 858
ExplicitWidth = 858
@ -420,9 +609,8 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
Width = 858
Height = 408
ExplicitWidth = 858
ExplicitHeight = 243
ExplicitHeight = 408
inherited eIncidencias: TcxDBMemo
ExplicitTop = 18
ExplicitWidth = 854
ExplicitHeight = 391
Height = 391
@ -435,7 +623,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
Caption = 'Documentos'
ImageIndex = 5
OnShow = pagDocumentosShow
ExplicitHeight = 271
inline frViewDocumentosContratoCliente1: TfrViewDocumentosContratoCliente
Left = 0
Top = 0
@ -451,7 +638,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 858
ExplicitHeight = 271
ExplicitHeight = 436
inherited TBXDock: TTBXDock
Width = 858
ExplicitWidth = 858
@ -459,8 +646,9 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
inherited ListView1: TListView
Width = 858
Height = 407
ExplicitTop = 29
ExplicitWidth = 858
ExplicitHeight = 242
ExplicitHeight = 407
end
inherited EditorActionList: TActionList
Left = 8
@ -491,7 +679,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ParentFont = False
TabOrder = 5
ReadOnly = False
ExplicitTop = 420
ExplicitTop = 585
ExplicitWidth = 872
ExplicitHeight = 194
inherited dxLayoutControl1: TdxLayoutControl
@ -499,7 +687,9 @@ inherited fEditorContratoCliente: TfEditorContratoCliente
ExplicitWidth = 872
inherited Bevel3: TBevel
Left = 429
Height = 122
ExplicitLeft = 429
ExplicitHeight = 122
end
inherited Bevel4: TBevel
Left = 541

View File

@ -18,7 +18,7 @@ uses
uViewDetallesDTO, uViewDetallesArticulos, uViewDetallesContratoCliente,
uDAInterfaces, cxRichEdit, cxDBRichEdit, JvGIF, cxPC,
uViewDocumentos,
uViewDocumentosContratoCliente, uViewDatosYSeleccionClienteContrato,
uViewDocumentosContratoCliente, uViewClienteContrato,
cxLabel, uBizTiposIVA, uTiposIVAController, dxLayoutControl;
type
@ -47,6 +47,7 @@ type
memCalidades: TcxDBMemo;
dxLayoutGroup1: TdxLayoutGroup;
dxLayoutItem1: TdxLayoutItem;
frViewContratoCliente1: TfrViewContratoCliente;
procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@ -61,7 +62,11 @@ type
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure OnRecargoEquivalenciaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
procedure pagDocumentosShow(Sender: TObject); //Importante en este punto se deben de quitar los eventos que puedan afectar a la tabla una vez se cierre el editor.
procedure pagDocumentosShow(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
procedure frViewClienteContrato1edtlNombrePropertiesEditValueChanged(
Sender: TObject);
procedure frViewClienteContrato1edtlNombrePropertiesChange(Sender: TObject); //Importante en este punto se deben de quitar los eventos que puedan afectar a la tabla una vez se cierre el editor.
private
//procedure RecalcularPortePorUnidad;
@ -70,7 +75,7 @@ type
FContrato: IBizContratoCliente;
FTiposIVAController : ITiposIVAController;
FTiposIVA: IBizTipoIVA;
FViewContrato: IViewContratoCliente;
FViewContratoCliente: IViewContratoCliente;
FViewClienteContrato :IViewDatosYSeleccionClienteContrato;
FController : IContratosClienteController;
@ -80,22 +85,18 @@ type
function GetContrato: IBizContratoCliente;
procedure SetContrato(const Value: IBizContratoCliente); virtual;
function GetViewContrato: IViewContratoCliente;
procedure SetViewContrato(const Value: IViewContratoCliente);
function GetViewContratoCliente: IViewContratoCliente;
procedure SetViewContratoCliente(const Value: IViewContratoCliente);
procedure PrevisualizarInterno; override;
procedure ImprimirInterno; override;
procedure GuardarInterno; override;
procedure EliminarInterno; override;
property ViewContrato: IViewContratoCliente read GetViewContrato write SetViewContrato;
property ViewContratoCliente: IViewContratoCliente read GetViewContratoCliente write SetViewContratoCliente;
procedure OnClienteChanged(Sender : TObject);
//Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo
procedure AsignarVista; virtual;
procedure PonerTitulos(const ATitulo: string = ''); override;
function GetModified: Boolean; override;
procedure SetModified(const Value : Boolean); override;
@ -123,47 +124,14 @@ uses
{
**************************** TfEditorContratoCliente ****************************
}
procedure TfEditorContratoCliente.actEliminarUpdate(Sender: TObject);
begin
inherited;
if (Sender as TAction).Enabled then
(Sender as TAction).Enabled := (FContrato.SITUACION = SITUACION_Contrato_PENDIENTE);
end;
procedure TfEditorContratoCliente.actEnviarPorEMailExecute(Sender: TObject);
begin
inherited;
FController.EnviarContratoPorEMail(Contrato);
end;
procedure TfEditorContratoCliente.actEnviarPorEMailUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := HayDatos;
end;
procedure TfEditorContratoCliente.AsignarVista;
var
AViewContratoCliente: TfrViewContratoCliente;
begin
AViewContratoCliente := TfrViewContratoCliente.create(Self);
with AViewContratoCliente do
begin
Parent := pagGeneral;
Align := alClient;
dxLayoutControl1.LookAndFeel := dxLayoutOfficeLookAndFeel1;
end;
ViewContrato := AViewContratoCliente;
end;
constructor TfEditorContratoCliente.Create(AOwner: TComponent);
begin
inherited;
pgPaginas.ActivePageIndex := 0;
AsignarVista;
ViewContratoCliente := frViewContratoCliente1;
FTiposIVAController := TTiposIVAController.Create;
FTiposIVAController := TTiposIVAController.Create;
end;
procedure TfEditorContratoCliente.CustomEditorClose(Sender: TObject;
@ -174,10 +142,15 @@ begin
//Este método eliminará el directorio temporal si se ha creado
frViewDocumentosContratoCliente1.actEliminarTodo.Execute;
FViewContrato := NIL;
dsDataTable.DataTable := NIL;
frViewTotales1.DADataSource.DataTable := NIL;
frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := nil;
FViewContratoCliente := NIL;
FViewClienteContrato := NIL;
FTiposIVA := NIL;
FTiposIVAController := Nil;
FContrato := NIL;
FTiposIVAController := Nil;
end;
destructor TfEditorContratoCliente.Destroy;
@ -186,9 +159,18 @@ begin
inherited;
end;
procedure TfEditorContratoCliente.dsDataTableDataChange(Sender: TObject;
Field: TField);
begin
inherited;
if Assigned(FContrato) and (not (FContrato.DataTable.Fetching) or
not (FContrato.DataTable.Opening) or not (FContrato.DataTable.Closing)) then
PonerTitulos;
end;
procedure TfEditorContratoCliente.EliminarInterno;
begin
if (ShowConfirmMessage('¿Desea borrar este Contrato de cliente?', '') = IDYES) then
if (ShowConfirmMessage('¿Desea borrar este contrato de cliente?', '') = IDYES) then
begin
FController.Eliminar(FContrato);
inherited
@ -199,7 +181,7 @@ procedure TfEditorContratoCliente.FormShow(Sender: TObject);
begin
inherited;
if not Assigned(FViewContrato) then
if not Assigned(FViewContratoCliente) then
raise Exception.Create('No hay ninguna vista asignada');
if not Assigned(Contrato) then
@ -211,6 +193,21 @@ begin
Contrato.DataTable.Active := True;
end;
procedure TfEditorContratoCliente.frViewClienteContrato1edtlNombrePropertiesChange(
Sender: TObject);
begin
inherited;
PonerTitulos;
end;
procedure TfEditorContratoCliente.frViewClienteContrato1edtlNombrePropertiesEditValueChanged(
Sender: TObject);
begin
inherited;
with (Sender as TcxDBTextEdit) do
Enabled := (FContrato.ID <> 0)
end;
procedure TfEditorContratoCliente.frViewTotales1bTiposIVAClick(
Sender: TObject);
begin
@ -263,9 +260,9 @@ begin
Result := FContrato;
end;
function TfEditorContratoCliente.GetViewContrato: IViewContratoCliente;
function TfEditorContratoCliente.GetViewContratoCliente: IViewContratoCliente;
begin
Result := FViewContrato;
Result := FViewContratoCliente;
end;
procedure TfEditorContratoCliente.GuardarInterno;
@ -302,14 +299,45 @@ begin
end;
procedure TfEditorContratoCliente.OnClienteChanged(Sender: TObject);
var
AClientesController : IClientesController;
ADireccion : IBizDireccionesContacto;
begin
if Assigned(FContrato) then
begin
FContrato.Cliente := ViewContrato.ViewClienteContrato.Cliente;
FContrato.Cliente := frViewContratoCliente1.frViewClienteContrato1.Cliente;
//Desactivado porque en Contratos no utilizan el catálogo de clientes
// if (FContrato.Detalles.RecordCount > 0) then
// FController.DetallesController.ActualizarDetalles(FContrato.Detalles, FContrato.Cliente);
if not (FContrato.DataTable.State in dsEditModes) then
FContrato.DataTable.Edit;
// En el caso de tener direcciones asociadas, se debe dar la posibilidad de elegir la dirección principal o las secundarias para la factura
AClientesController := TClientesController.Create;
try
case FContrato.Cliente.Direcciones.RecordCount of
0 : //No hay direcciones secundarias asociadas
else ADireccion := AClientesController.ElegirDireccion(FContrato.Cliente, 'Seleccione la dirección del cliente que quiere utilizar como dirección fiscal de este contrato.');
end;
// Si hay dirección de envio, copiarla a la factura y poner el coste del porte
if Assigned(ADireccion) then
begin
if not ADireccion.IDIsNull then
try
FContrato.Edit;
FContrato.IMPORTE_PORTE := ADireccion.PORTE;
FController.CopiarDireccion(ADireccion, FContrato);
finally
ADireccion := NIL;
end;
end
finally
AClientesController := Nil;
end;
//Desactivado porque en Contratos no utilizan el catálogo de clientes
// if (FContrato.Detalles.RecordCount > 0) then
// FController.DetallesController.ActualizarDetalles(FContrato.Detalles, FContrato.Cliente);
end;
end;
@ -384,7 +412,7 @@ begin
if Assigned(FController) then
begin
// ViewContrato.ViewClienteContrato.Controller := Controller.ClienteController;
ViewContratoCliente.Controller := FController;
frViewDetallesContratoCliente1.Controller := Controller.DetallesController;
//GESTION_DOCUMENTOS
@ -420,32 +448,55 @@ begin
frViewTotales1.dsTiposIVA.DataTable := FTiposIVA.DataTable;
FTiposIVA.DataTable.Active := True;
if Assigned(FViewContrato) then
if Assigned(FViewContratoCliente) then
begin
ViewContrato.ViewClienteContrato.OnClienteChanged := NIL;
frViewContratoCliente1.frViewClienteContrato1.Cliente := FContrato.Cliente;
frViewContratoCliente1.frViewClienteContrato1.OnClienteChanged := NIL;
try
FViewContrato.Contrato := FContrato;
ViewContratoCliente.Contrato := FContrato;
frViewDetallesContratoCliente1.Detalles := FContrato.Detalles;
frViewDetallesContratoCliente1.Contrato := FContrato; //Para poder sacar los descuento del articulos segun el cliente seleccionado
finally
ViewContrato.ViewClienteContrato.OnClienteChanged := OnClienteChanged;
frViewContratoCliente1.frViewClienteContrato1.OnClienteChanged := OnClienteChanged;
end;
end;
end;
end
end
else begin
frViewContratoCliente1.frViewClienteContrato1.OnClienteChanged := NIL;
frViewContratoCliente1.frViewClienteContrato1.Cliente := NIL;
dsDataTable.DataTable := NIL;
frViewTotales1.DADataSource.DataTable := NIL;
frViewTotales1.dsTiposIVA.DataTable := NIL;
end
end;
procedure TfEditorContratoCliente.SetViewContrato(const Value: IViewContratoCliente);
procedure TfEditorContratoCliente.SetViewContratoCliente(const Value: IViewContratoCliente);
begin
FViewContrato := Value;
FViewContratoCliente := Value;
if Assigned(FViewContrato) then
begin
FViewClienteContrato := FViewContrato.ViewClienteContrato;
if Assigned(FViewContratoCliente) and Assigned(Contrato) then
FViewContratoCliente.Contrato := Contrato;
end;
if Assigned(Contrato) then
FViewContrato.Contrato := Contrato;
end;
procedure TfEditorContratoCliente.actEliminarUpdate(Sender: TObject);
begin
inherited;
if (Sender as TAction).Enabled then
(Sender as TAction).Enabled := (FContrato.SITUACION = SITUACION_Contrato_PENDIENTE);
end;
procedure TfEditorContratoCliente.actEnviarPorEMailExecute(Sender: TObject);
begin
inherited;
FController.EnviarContratoPorEMail(Contrato);
end;
procedure TfEditorContratoCliente.actEnviarPorEMailUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := HayDatos;
end;
end.

View File

@ -0,0 +1,110 @@
inherited frViewClienteContrato: TfrViewClienteContrato
Width = 357
Height = 318
ExplicitWidth = 357
ExplicitHeight = 318
inherited dxLayoutControl1: TdxLayoutControl
Width = 357
Height = 318
ExplicitWidth = 357
ExplicitHeight = 318
DesignSize = (
357
318)
object Bevel1: TBevel [0]
Left = 81
Top = 71
Width = 266
Height = 13
Shape = bsBottomLine
end
inherited edtlNombre: TcxDBTextEdit
Left = 81
Top = 94
TabOrder = 3
ExplicitLeft = 81
ExplicitTop = 94
end
inherited edtNIFCIF: TcxDBTextEdit
Left = 81
Top = 121
TabOrder = 4
ExplicitLeft = 81
ExplicitTop = 121
end
inherited edtCalle: TcxDBTextEdit
Left = 81
Top = 148
TabOrder = 5
ExplicitLeft = 81
ExplicitTop = 148
end
inherited edtPoblacion: TcxDBTextEdit
Left = 81
Top = 175
TabOrder = 6
ExplicitLeft = 81
ExplicitTop = 175
end
inherited edtProvincia: TcxDBTextEdit
Left = 81
Top = 202
TabOrder = 8
ExplicitLeft = 81
ExplicitTop = 202
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 265
Top = 175
TabOrder = 7
ExplicitLeft = 265
ExplicitTop = 175
end
inherited Button3: TBitBtn
Left = 155
Top = 229
TabOrder = 9
ExplicitLeft = 155
ExplicitTop = 229
end
object cxDBTextEdit1: TcxDBTextEdit [10]
Left = 81
Top = 41
Anchors = [akLeft, akTop, akRight]
AutoSize = False
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = DADataSource
Enabled = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.TextColor = clWindowText
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 2
Height = 21
Width = 283
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
object dxLayoutControl1Item10: TdxLayoutItem [1]
Caption = 'Nombre:'
Control = cxDBTextEdit1
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item11: TdxLayoutItem [2]
Caption = 'Datos fiscales'
Offsets.Bottom = 3
Offsets.Top = 3
Control = Bevel1
ControlOptions.ShowBorder = False
end
inherited dxLayoutControl1Item1: TdxLayoutItem
Caption = 'Raz'#243'n:'
end
end
end
end

View File

@ -0,0 +1,34 @@
unit uViewClienteContrato;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewDatosYSeleccionCliente, ImgList, PngImageList, ActnList, DB,
uDAInterfaces, uDADataTable, dxLayoutControl, StdCtrls, Buttons, cxContainer,
cxEdit, cxTextEdit, cxDBEdit, cxControls, ExtCtrls;
type
IViewDatosYSeleccionClienteContrato = interface(IViewDatosYSeleccionCliente)
['{21E1DD04-D5F9-4A07-BA62-7A1D0C2F9A21}']
end;
TfrViewClienteContrato = class(TfrViewDatosYSeleccionCliente, IViewDatosYSeleccionClienteContrato)
dxLayoutControl1Item10: TdxLayoutItem;
cxDBTextEdit1: TcxDBTextEdit;
Bevel1: TBevel;
dxLayoutControl1Item11: TdxLayoutItem;
private
{ Private declarations }
public
{ Public declarations }
end;
var
frViewClienteContrato: TfrViewClienteContrato;
implementation
{$R *.dfm}
end.

View File

@ -42,8 +42,8 @@ inherited frViewContratoCliente: TfrViewContratoCliente
Width = 129
end
object memObservaciones: TcxDBMemo
Left = 384
Top = 289
Left = 426
Top = 382
Anchors = [akLeft, akTop, akRight, akBottom]
DataBinding.DataField = 'OBSERVACIONES'
DataBinding.DataSource = DADataSource
@ -60,8 +60,8 @@ inherited frViewContratoCliente: TfrViewContratoCliente
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 11
Height = 200
Width = 507
Height = 139
Width = 404
end
object eReferencia: TcxDBTextEdit
Left = 104
@ -119,7 +119,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente
Width = 122
end
object bFormasPago: TButton
Left = 222
Left = 264
Top = 136
Width = 132
Height = 21
@ -157,60 +157,6 @@ inherited frViewContratoCliente: TfrViewContratoCliente
TabOrder = 4
Width = 260
end
inline frViewDatosYSeleccionClienteContrato1: TfrViewDatosYSeleccionClienteContrato
Left = 384
Top = 28
Width = 127
Height = 225
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 10
ReadOnly = False
ExplicitLeft = 384
ExplicitTop = 28
ExplicitWidth = 127
ExplicitHeight = 225
inherited dxLayoutControl1: TdxLayoutControl
Width = 127
Height = 225
ExplicitWidth = 127
ExplicitHeight = 225
inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 224
Width = 224
end
inherited edtNIFCIF: TcxDBTextEdit
ExplicitWidth = 103
Width = 103
end
inherited bVerFichaCliente: TBitBtn
Left = 202
ExplicitLeft = 202
end
inherited edtDireccion: TcxMemo
ExplicitWidth = 121
Width = 121
end
inherited bElegirDireccion: TButton
Left = 371
ExplicitLeft = 371
end
inherited edtTelefonos: TcxTextEdit
ExplicitWidth = 193
Width = 193
end
inherited edtReferencia: TcxDBTextEdit
Left = 263
ExplicitLeft = 263
ExplicitWidth = 103
Width = 103
end
end
end
object memFormaPago: TcxDBMemo
Left = 22
Top = 220
@ -286,7 +232,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente
Width = 27
end
object cbTipoContrato: TcxDBComboBox
Left = 274
Left = 297
Top = 82
DataBinding.DataField = 'TIPO_CONTRATO'
DataBinding.DataSource = DADataSource
@ -333,6 +279,50 @@ inherited frViewContratoCliente: TfrViewContratoCliente
Height = 21
Width = 335
end
inline frViewClienteContrato1: TfrViewClienteContrato
Left = 426
Top = 28
Width = 357
Height = 318
TabOrder = 10
ReadOnly = False
ExplicitLeft = 426
ExplicitTop = 28
inherited dxLayoutControl1: TdxLayoutControl
inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 707
Width = 707
end
inherited edtNIFCIF: TcxDBTextEdit
ExplicitWidth = 707
Width = 707
end
inherited edtCalle: TcxDBTextEdit
ExplicitWidth = 707
Width = 707
end
inherited edtPoblacion: TcxDBTextEdit
ExplicitWidth = 589
Width = 589
end
inherited edtProvincia: TcxDBTextEdit
ExplicitWidth = 707
Width = 707
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 270
ExplicitLeft = 270
end
inherited Button3: TBitBtn
Left = 160
ExplicitLeft = 160
end
inherited cxDBTextEdit1: TcxDBTextEdit
ExplicitWidth = 283
Width = 283
end
end
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
Hidden = True
@ -457,7 +447,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente
AlignVert = avClient
Caption = 'New Item'
ShowCaption = False
Control = frViewDatosYSeleccionClienteContrato1
Control = frViewClienteContrato1
ControlOptions.AutoColor = True
ControlOptions.ShowBorder = False
end

View File

@ -11,18 +11,19 @@ uses
cxTextEdit, cxMaskEdit, cxCalendar, dxLayoutControl, cxControls, cxMemo,
uViewDireccionEntregaContratoCliente, Buttons, ActnList, cxLookupEdit,
cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uDAInterfaces,
uBizFormasPago, cxButtonEdit, uViewDatosYSeleccionClienteContrato, uBizContactos,
uVendedoresController;
uBizFormasPago, cxButtonEdit, uBizContactos, uContratosClienteController,
uVendedoresController, uViewClienteContrato;
type
IViewContratoCliente = interface(IViewBase)
['{3DE0231D-760E-437B-88E5-144B88024797}']
function GetController : IContratosClienteController;
procedure SetController (const Value : IContratosClienteController);
property Controller : IContratosClienteController read GetController write SetController;
function GetContrato: IBizContratoCliente;
procedure SetContrato(const Value: IBizContratoCliente);
property Contrato: IBizContratoCliente read GetContrato write SetContrato;
function GetViewClienteContrato: IViewDatosYSeleccionClienteContrato;
property ViewClienteContrato: IViewDatosYSeleccionClienteContrato read GetViewClienteContrato;
end;
TfrViewContratoCliente = class(TfrViewBase, IViewContratoCliente)
@ -48,7 +49,6 @@ type
cbSituacion: TcxDBImageComboBox;
dxLayoutControl1Item10: TdxLayoutItem;
dxLayoutControl1Group8: TdxLayoutGroup;
frViewDatosYSeleccionClienteContrato1: TfrViewDatosYSeleccionClienteContrato;
dxLayoutControl1Item1: TdxLayoutItem;
dxLayoutControl1Item8: TdxLayoutItem;
memFormaPago: TcxDBMemo;
@ -66,6 +66,7 @@ type
dxLayoutControl1Group11: TdxLayoutGroup;
dxLayoutControl1Item12: TdxLayoutItem;
edtlREF_CLIENTE: TcxDBTextEdit;
frViewClienteContrato1: TfrViewClienteContrato;
procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure bFormasPagoClick(Sender: TObject);
@ -77,15 +78,16 @@ type
FVendedor : IBizVendedor;
FFormasPagoController : IFormasPagoController;
FVendedoresController : IVendedoresController;
FViewClienteContrato : IViewDatosYSeleccionClienteContrato;
FController : IContratosClienteController;
function GetContrato: IBizContratoCliente;
procedure SetContrato(const Value: IBizContratoCliente); virtual;
function GetViewClienteContrato: IViewDatosYSeleccionClienteContrato;
function GetController : IContratosClienteController;
procedure SetController (const Value : IContratosClienteController);
public
property Contrato: IBizContratoCliente read GetContrato write SetContrato;
property ViewClienteContrato: IViewDatosYSeleccionClienteContrato read GetViewClienteContrato;
property Controller : IContratosClienteController read GetController write SetController;
property Contrato: IBizContratoCliente read GetContrato write SetContrato;
end;
implementation
@ -95,7 +97,7 @@ implementation
{ TfrViewContratoCliente }
uses
uClientesController, uBizDireccionesContacto, uContratosClienteController, uPresupuestosClienteController;
uClientesController, uBizDireccionesContacto, uPresupuestosClienteController;
procedure TfrViewContratoCliente.bFormasPagoClick(Sender: TObject);
@ -112,7 +114,6 @@ begin
FVendedor := Nil;
FFormasPagoController := TFormasPagoController.Create;
FVendedoresController := TVendedoresController.Create;
FViewClienteContrato := frViewDatosYSeleccionClienteContrato1;
cbTipoContrato.Properties.Items.Clear;
cbTipoContrato.Properties.Items.Add(CTE_COCINA);
@ -129,8 +130,8 @@ begin
FFormasPagoController := NIL;
FVendedor := Nil;
FVendedoresController := NIL;
FViewClienteContrato := NIL;
inherited;
inherited;
end;
procedure TfrViewContratoCliente.frViewClienteContratoButton1Click(Sender: TObject);
@ -141,7 +142,7 @@ begin
if (Application.MessageBox('Los descuentos de los artículos del Contrato serán actualizados con los del nuevo cliente seleccionado, ¿Desea continuar?', 'Atención', MB_YESNO) = IDNO) then
Exit;
end;
frViewDatosYSeleccionClienteContrato1.actElegirContacto.Execute;
frViewClienteContrato1.actElegirContacto.Execute;
end;
procedure TfrViewContratoCliente.frViewClienteContratoButton2Click(Sender: TObject);
@ -152,7 +153,7 @@ begin
if (Application.MessageBox('Los descuentos de los artículos del Contrato serán actualizados con los del nuevo cliente seleccionado, ¿Desea continuar?', 'Atención', MB_YESNO) = IDNO) then
Exit;
end;
frViewDatosYSeleccionClienteContrato1.actAnadirContacto.Execute;
frViewClienteContrato1.actAnadirContacto.Execute;
end;
function TfrViewContratoCliente.GetContrato: IBizContratoCliente;
@ -160,9 +161,9 @@ begin
Result := FContrato;
end;
function TfrViewContratoCliente.GetViewClienteContrato: IViewDatosYSeleccionClienteContrato;
function TfrViewContratoCliente.GetController: IContratosClienteController;
begin
Result := FViewClienteContrato;
Result := FController;
end;
procedure TfrViewContratoCliente.SetContrato(const Value: IBizContratoCliente);
@ -180,14 +181,23 @@ begin
dsVendedor.DataTable := FVendedor.DataTable;
dsVendedor.DataTable.Active := True;
FViewClienteContrato.Contrato := FContrato;
frViewClienteContrato1.MsgElegirCliente := 'Elija el cliente al que se le realizará el contrato.';
end
else begin
DADataSource.DataTable := NIL;
dsFormaPago.DataTable := NIL;
dsVendedor.DataTable := NIL;
FViewClienteContrato.Contrato := Nil;
frViewClienteContrato1.Cliente := Nil;
end;
end;
procedure TfrViewContratoCliente.SetController(
const Value: IContratosClienteController);
begin
FController := Value;
if Assigned(FController) then
frViewClienteContrato1.Controller := FController.ClienteController;
end;
end.

View File

@ -130,7 +130,6 @@ inherited frViewContratosCliente: TfrViewContratosCliente
DataBinding.FieldName = 'VENDEDOR'
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewLISTA_NOMBRES: TcxGridDBColumn
Caption = 'Otros nombres'

View File

@ -1,13 +1,13 @@
inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteContrato
Width = 447
Height = 224
ExplicitWidth = 447
ExplicitHeight = 224
Width = 913
Height = 258
ExplicitWidth = 913
ExplicitHeight = 258
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
Width = 447
Height = 224
Width = 913
Height = 258
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
@ -18,16 +18,15 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
447
224)
913
258)
object edtlNombre: TcxDBTextEdit
Left = 66
Top = 41
Anchors = [akLeft, akTop, akRight]
AutoSize = False
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = dsCliente
ParentFont = False
DataBinding.DataSource = dsContrato
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -48,8 +47,7 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
Anchors = [akLeft, akTop, akRight]
AutoSize = False
DataBinding.DataField = 'NIF_CIF'
DataBinding.DataSource = dsCliente
ParentFont = False
DataBinding.DataSource = dsContrato
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -153,7 +151,7 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
FF00FF00FF00006000000060000000600000FF00FF00FF00FF00}
end
object bVerFichaCliente: TBitBtn
Left = 245
Left = 711
Top = 181
Width = 192
Height = 25
@ -216,7 +214,7 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
Width = 437
end
object bElegirDireccion: TButton
Left = 414
Left = 880
Top = 95
Width = 23
Height = 25
@ -242,13 +240,12 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
Width = 193
end
object edtReferencia: TcxDBTextEdit
Left = 284
Left = 514
Top = 68
Anchors = [akLeft, akTop, akRight]
AutoSize = False
DataBinding.DataField = 'REFERENCIA'
DataBinding.DataSource = dsCliente
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame

View File

@ -222,7 +222,7 @@ var
ADireccion : IBizDireccionesContacto;
begin
if FCliente.Direcciones.RecordCount > 0 then
ADireccion := FClientesController.ElegirDireccionEntrega(FCliente, 'El cliente dispone de varias direcciones. Seleccione la que quiere utilizar.')
ADireccion := FClientesController.ElegirDireccion(FCliente, 'Seleccione la dirección del cliente que quiere utilizar como dirección fiscal de este contrato.')
else begin
ADireccion := FDireccionesController.Nuevo;
FDireccionesController.CopiarDireccionFiscal(FCliente, ADireccion);
@ -244,6 +244,9 @@ begin
with FContrato do
begin
NIF_CIF := ADireccion.NIF_CIF;
NOMBRE := ADireccion.NOMBRE;
NOMBRE_CLIENTE := ADireccion.NOMBRE;
CALLE := ADireccion.CALLE;
POBLACION := ADireccion.POBLACION;
CODIGO_POSTAL := ADireccion.CODIGO_POSTAL;

View File

@ -494,10 +494,10 @@ var
bEnEdicion : Boolean;
begin
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado (CopiarDireccionEnvio)');
raise Exception.Create ('Factura no asignada (CopiarDireccion)');
if not Assigned(ADireccionEnvio) then
raise Exception.Create ('No se ha indicado la dirección (CopiarDireccionEnvio)');
raise Exception.Create ('No se ha indicado la dirección (CopiarDireccion)');
if AFactura.DataTable.Active then
AFactura.DataTable.Active := True;

View File

@ -49,35 +49,35 @@
<DelphiCompile Include="FacturasCliente_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\Comisiones\adortl.dcp" />
<DCCReference Include="..\..\Comisiones\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="..\..\Comisiones\Articulos_view.dcp" />
<DCCReference Include="..\..\Comisiones\Contabilidad_controller.dcp" />
<DCCReference Include="..\..\Comisiones\Contabilidad_view.dcp" />
<DCCReference Include="..\..\Comisiones\Contactos_view.dcp" />
<DCCReference Include="..\..\Comisiones\cxDataD11.dcp" />
<DCCReference Include="..\..\Comisiones\cxEditorsD11.dcp" />
<DCCReference Include="..\..\Comisiones\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Comisiones\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\..\Comisiones\dbrtl.dcp" />
<DCCReference Include="..\..\Comisiones\dsnap.dcp" />
<DCCReference Include="..\..\Comisiones\dxComnD11.dcp" />
<DCCReference Include="..\..\Comisiones\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Comisiones\dxLayoutControlD11.dcp" />
<DCCReference Include="..\..\Comisiones\dxThemeD11.dcp" />
<DCCReference Include="..\..\Comisiones\FacturasCliente_controller.dcp" />
<DCCReference Include="..\..\Comisiones\FacturasCliente_model.dcp" />
<DCCReference Include="..\..\Comisiones\GestorInformes_controller.dcp" />
<DCCReference Include="..\..\Comisiones\GUIBase.dcp" />
<DCCReference Include="..\..\Comisiones\PngComponentsD10.dcp" />
<DCCReference Include="..\..\Comisiones\PNG_D10.dcp" />
<DCCReference Include="..\..\Comisiones\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\..\Comisiones\rtl.dcp" />
<DCCReference Include="..\..\Comisiones\vcl.dcp" />
<DCCReference Include="..\..\Comisiones\vclactnband.dcp" />
<DCCReference Include="..\..\Comisiones\vcldb.dcp" />
<DCCReference Include="..\..\Comisiones\vcljpg.dcp" />
<DCCReference Include="..\..\Comisiones\vclx.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\adortl.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\AlbCli_FacCli_relation.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\Articulos_view.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\Contabilidad_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\Contabilidad_view.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\Contactos_view.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\cxDataD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\cxEditorsD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\dbrtl.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\dsnap.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\dxComnD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\dxLayoutControlD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\dxThemeD11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\FacturasCliente_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\FacturasCliente_model.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\GestorInformes_controller.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\GUIBase.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\PngComponentsD10.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\PNG_D10.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\rtl.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\vcl.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\vclactnband.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\vcldb.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\vcljpg.dcp" />
<DCCReference Include="..\..\Contratos de cliente\Views\vclx.dcp" />
<DCCReference Include="uEditorElegirArticulosFacturaCliente.pas">
<Form>fEditorElegirArticulosFacturaCliente</Form>
<DesignClass>TForm</DesignClass>

View File

@ -42,7 +42,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 860
ExplicitWidth = 860
inherited tbxMain: TTBXToolbar
ExplicitWidth = 488
ExplicitWidth = 634
inherited TBXItem2: TTBXItem
Visible = False
end
@ -80,20 +80,20 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
inherited pgPaginas: TPageControl
Width = 854
Height = 368
Height = 359
OnChanging = pgPaginasChanging
ExplicitWidth = 854
ExplicitHeight = 368
ExplicitHeight = 359
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 846
ExplicitHeight = 340
ExplicitHeight = 331
inline frViewFacturaCliente1: TfrViewFacturaCliente
Left = 0
Top = 0
Width = 846
Height = 340
Height = 331
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -104,48 +104,96 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 846
ExplicitHeight = 340
ExplicitHeight = 331
inherited dxLayoutControl1: TdxLayoutControl
Width = 846
Height = 340
Height = 331
ExplicitWidth = 846
ExplicitHeight = 340
inherited frViewClienteFactura1: TfrViewClienteFactura
ExplicitHeight = 331
inherited eReferencia: TcxDBTextEdit
ExplicitWidth = 159
Width = 159
end
inherited cbFormaPago: TcxDBLookupComboBox
ExplicitWidth = 78
Width = 78
end
inherited frViewTienda1: TfrViewTienda
inherited dxLayoutControl1: TdxLayoutControl
inherited edtlNombre: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
end
inherited edtNIFCIF: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
end
inherited edtCalle: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
end
inherited edtPoblacion: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
end
inherited edtProvincia: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 244
DataBinding.DataSource = dsDataTable
ExplicitLeft = 244
end
inherited Button3: TBitBtn
Left = 134
ExplicitLeft = 134
inherited cbTienda: TcxComboBox
ExplicitWidth = 399
Width = 399
end
end
end
inherited frViewClienteFactura1: TfrViewClienteFactura
Width = 398
ExplicitWidth = 398
inherited dxLayoutControl1: TdxLayoutControl
Width = 398
inherited Bevel1: TBevel
Width = 266
ExplicitWidth = 266
end
inherited edtlNombre: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
ExplicitWidth = 276
Width = 276
end
inherited edtNIFCIF: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
ExplicitWidth = 276
Width = 276
end
inherited edtCalle: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
ExplicitWidth = 276
Width = 276
end
inherited edtPoblacion: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
ExplicitWidth = 158
Width = 158
end
inherited edtProvincia: TcxDBTextEdit
DataBinding.DataSource = dsDataTable
ExplicitWidth = 276
Width = 276
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 240
DataBinding.DataSource = dsDataTable
ExplicitLeft = 240
end
inherited Button3: TBitBtn
Left = 130
ExplicitLeft = 130
end
inherited cxDBTextEdit1: TcxDBTextEdit
ExplicitWidth = 283
Width = 283
end
end
end
inherited edtFechaVencimiento: TcxDBDateEdit
ExplicitWidth = 310
Width = 310
end
inherited frViewObservaciones1: TfrViewObservaciones
Width = 521
Height = 228
ExplicitWidth = 521
ExplicitHeight = 228
inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewFacturaCliente1.DADataSource
Height = 228
Width = 521
end
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
ExplicitWidth = 158
Width = 158
end
end
end
end
@ -156,7 +204,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Left = 0
Top = 0
Width = 846
Height = 340
Height = 331
Align = alClient
BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET
@ -169,7 +217,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 846
ExplicitHeight = 340
ExplicitHeight = 331
inherited ToolBar1: TToolBar
Width = 846
Height = 24
@ -254,12 +302,12 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
inherited cxGrid: TcxGrid
Top = 50
Top = 53
Width = 846
Height = 290
ExplicitTop = 50
Height = 278
ExplicitTop = 53
ExplicitWidth = 846
ExplicitHeight = 290
ExplicitHeight = 278
end
inherited TBXDock1: TTBXDock
Top = 24
@ -267,7 +315,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitTop = 24
ExplicitWidth = 846
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548
ExplicitWidth = 731
end
end
end
@ -348,8 +396,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited Bevel3: TBevel
Left = 457
Top = 30
Height = 122
ExplicitLeft = 457
ExplicitTop = 30
ExplicitHeight = 122
end
inherited Bevel4: TBevel
Left = 569

View File

@ -6,6 +6,8 @@ inherited frViewClienteFactura: TfrViewClienteFactura
inherited dxLayoutControl1: TdxLayoutControl
Width = 357
Height = 318
ExplicitWidth = 357
ExplicitHeight = 318
object Bevel1: TBevel [0]
Left = 81
Top = 71
@ -80,7 +82,6 @@ inherited frViewClienteFactura: TfrViewClienteFactura
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame

View File

@ -250,16 +250,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 7
Width = 158
end

View File

@ -70,8 +70,10 @@ type
FController : IFacturasClienteController;
FFormasPago : IBizFormaPago;
FFormasPagoController : IFormasPagoController;
function GetFactura: IBizFacturaCliente;
procedure SetFactura(const Value: IBizFacturaCliente);
function GetController : IFacturasClienteController;
procedure SetController (const Value : IFacturasClienteController);
public

View File

@ -27,7 +27,6 @@ inherited frViewDatosYSeleccionClientePresupuesto: TfrViewDatosYSeleccionCliente
AutoSize = False
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = dsCliente
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -49,7 +48,6 @@ inherited frViewDatosYSeleccionClientePresupuesto: TfrViewDatosYSeleccionCliente
AutoSize = False
DataBinding.DataField = 'NIF_CIF'
DataBinding.DataSource = dsCliente
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
@ -203,7 +201,6 @@ inherited frViewDatosYSeleccionClientePresupuesto: TfrViewDatosYSeleccionCliente
AutoSize = False
DataBinding.DataField = 'PERSONA_CONTACTO'
DataBinding.DataSource = dsPresupuesto
ParentFont = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
@ -258,7 +255,6 @@ inherited frViewDatosYSeleccionClientePresupuesto: TfrViewDatosYSeleccionCliente
AutoSize = False
DataBinding.DataField = 'REFERENCIA'
DataBinding.DataSource = dsCliente
ParentFont = False
Properties.ReadOnly = True
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame

View File

@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.8.3.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.8.3.0\0"
VALUE "CompileDate", "miércoles, 08 de marzo de 2017 18:18\0"
VALUE "CompileDate", "viernes, 21 de abril de 2017 18:20\0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.