Se adaptan los presupuestos para que puedan meter bonificaciones como en el preograma antiguo.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@754 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-11-11 18:55:52 +00:00
parent 7235d880fd
commit 98d47c6ac5
7 changed files with 584 additions and 240 deletions

View File

@ -32,7 +32,23 @@ requires
Articulos_view, Articulos_view,
PreCli_AlbCli_relation, PreCli_AlbCli_relation,
PreCli_FacCli_relation, PreCli_FacCli_relation,
GestorInformes_controller; GestorInformes_controller,
vcl,
rtl,
dbrtl,
DataAbstract_Core_D11,
vcldb,
dsnap,
adortl,
RemObjects_Core_D11,
cxLibraryD11,
dxThemeD11,
dxGDIPlusD11,
cxEditorsD11,
cxDataD11,
vcljpg,
dxLayoutControlD11,
dxComnD11;
contains contains
uPresupuestosClienteViewRegister in 'uPresupuestosClienteViewRegister.pas', uPresupuestosClienteViewRegister in 'uPresupuestosClienteViewRegister.pas',
@ -48,6 +64,7 @@ contains
uViewDireccionEntregaPresupuestoCliente in 'uViewDireccionEntregaPresupuestoCliente.pas' {frViewDireccionEntregaPresupuestoCliente: TFrame}, uViewDireccionEntregaPresupuestoCliente in 'uViewDireccionEntregaPresupuestoCliente.pas' {frViewDireccionEntregaPresupuestoCliente: TFrame},
uEditorFechaDecision in 'uEditorFechaDecision.pas' {fEditorFechaDecision: T}, uEditorFechaDecision in 'uEditorFechaDecision.pas' {fEditorFechaDecision: T},
uViewDocumentosPresupuestoCliente in 'uViewDocumentosPresupuestoCliente.pas' {frViewDocumentosPresupuestoCliente: TFrame}, uViewDocumentosPresupuestoCliente in 'uViewDocumentosPresupuestoCliente.pas' {frViewDocumentosPresupuestoCliente: TFrame},
uViewDatosYSeleccionClientePresupuesto in 'uViewDatosYSeleccionClientePresupuesto.pas' {frViewDatosYSeleccionClientePresupuesto: TFrame}; uViewDatosYSeleccionClientePresupuesto in 'uViewDatosYSeleccionClientePresupuesto.pas' {frViewDatosYSeleccionClientePresupuesto: TFrame},
uViewTotalesPresupuesto in 'uViewTotalesPresupuesto.pas' {frViewTotalesPresupuesto: TFrame};
end. end.

View File

@ -49,14 +49,27 @@
<DelphiCompile Include="PresupuestosCliente_view.dpk"> <DelphiCompile Include="PresupuestosCliente_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\..\Servidor\Articulos_view.dcp" /> <DCCReference Include="adortl.dcp" />
<DCCReference Include="..\..\..\Servidor\Base.dcp" /> <DCCReference Include="Articulos_view.dcp" />
<DCCReference Include="..\..\..\Servidor\GestorInformes_controller.dcp" /> <DCCReference Include="Base.dcp" />
<DCCReference Include="..\..\..\Servidor\GUIBase.dcp" /> <DCCReference Include="cxDataD11.dcp" />
<DCCReference Include="..\..\..\Servidor\PreCli_AlbCli_relation.dcp" /> <DCCReference Include="cxEditorsD11.dcp" />
<DCCReference Include="..\..\..\Servidor\PreCli_FacCli_relation.dcp" /> <DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="..\..\..\Servidor\PresupuestosCliente_controller.dcp" /> <DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\..\..\Servidor\PresupuestosCliente_model.dcp" /> <DCCReference Include="dbrtl.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="dxLayoutControlD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="GestorInformes_controller.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="PreCli_AlbCli_relation.dcp" />
<DCCReference Include="PreCli_FacCli_relation.dcp" />
<DCCReference Include="PresupuestosCliente_controller.dcp" />
<DCCReference Include="PresupuestosCliente_model.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="uEditorElegirArticulosPresupuestoCliente.pas"> <DCCReference Include="uEditorElegirArticulosPresupuestoCliente.pas">
<Form>fEditorElegirArticulosPresupuestoCliente</Form> <Form>fEditorElegirArticulosPresupuestoCliente</Form>
<DesignClass>TfEditorElegirArticulosPedidoCliente</DesignClass> <DesignClass>TfEditorElegirArticulosPedidoCliente</DesignClass>
@ -110,6 +123,13 @@
<Form>frViewPresupuestosCliente</Form> <Form>frViewPresupuestosCliente</Form>
<DesignClass>TFrame</DesignClass> <DesignClass>TFrame</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="uViewTotalesPresupuesto.pas">
<Form>frViewTotalesPresupuesto</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
</ItemGroup> </ItemGroup>
</Project> </Project>
<!-- EurekaLog First Line <!-- EurekaLog First Line

View File

@ -5,6 +5,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ClientHeight = 615 ClientHeight = 615
ClientWidth = 764 ClientWidth = 764
OnClose = CustomEditorClose OnClose = CustomEditorClose
ExplicitTop = -101
ExplicitWidth = 772 ExplicitWidth = 772
ExplicitHeight = 649 ExplicitHeight = 649
PixelsPerInch = 96 PixelsPerInch = 96
@ -169,25 +170,26 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
end end
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 758 Width = 758
Height = 414 Height = 238
TabOrder = 1 TabOrder = 1
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitWidth = 758 ExplicitWidth = 758
ExplicitHeight = 414 ExplicitHeight = 402
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
ExplicitLeft = 4 ExplicitLeft = 4
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 386 ExplicitHeight = 374
end end
object pagContenido: TTabSheet object pagContenido: TTabSheet
Caption = 'Contenido' Caption = 'Contenido'
ImageIndex = 1 ImageIndex = 1
ExplicitHeight = 374
inline frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente inline frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 750 Width = 750
Height = 386 Height = 210
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -200,102 +202,69 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 386 ExplicitHeight = 374
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 750 Width = 750
Height = 46 Height = 73
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 46 ExplicitHeight = 73
inherited ToolButton3: TToolButton inherited ToolButton3: TToolButton
Wrap = False Wrap = False
end end
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Left = 278 Left = 278
Top = 0 Top = 0
Wrap = True
ExplicitLeft = 278 ExplicitLeft = 278
ExplicitTop = 0 ExplicitTop = 0
end end
inherited ToolButton14: TToolButton
Left = 0
Wrap = False
ExplicitLeft = 0
end
inherited FontName: TJvFontComboBox inherited FontName: TJvFontComboBox
Left = 65 Left = 334
Top = 22 Top = 0
ExplicitTop = 22 ExplicitLeft = 334
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 479
Top = 0
Wrap = True
ExplicitLeft = 479
ExplicitTop = 0
end end
inherited FontSize: TEdit inherited FontSize: TEdit
Top = 22 Left = 0
Width = 200 Width = 200
ExplicitTop = 22 ExplicitLeft = 0
ExplicitWidth = 200 ExplicitWidth = 200
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 345 Left = 216
Top = 22 ExplicitLeft = 216
ExplicitLeft = 345
ExplicitTop = 22
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 362 Left = 233
Top = 22 ExplicitLeft = 233
ExplicitLeft = 362
ExplicitTop = 22
end
inherited ToolButton6: TToolButton
Left = 370
Top = 22
ExplicitLeft = 370
ExplicitTop = 22
end
inherited ToolButton7: TToolButton
Left = 436
Top = 22
ExplicitLeft = 436
ExplicitTop = 22
end
inherited ToolButton8: TToolButton
Left = 503
Top = 22
ExplicitLeft = 503
ExplicitTop = 22
end
inherited ToolButton12: TToolButton
Left = 0
Top = 22
Wrap = True
ExplicitLeft = 0
ExplicitTop = 22
ExplicitHeight = 27
end
inherited ToolButton9: TToolButton
Left = 0
Top = 49
ExplicitLeft = 0
ExplicitTop = 49
end
inherited ToolButton10: TToolButton
Left = 145
Top = 49
ExplicitLeft = 145
ExplicitTop = 49
end end
inherited ToolButton11: TToolButton inherited ToolButton11: TToolButton
Left = 270 Left = 241
ExplicitLeft = 241
end
inherited ToolButton7: TToolButton
Wrap = False
end
inherited ToolButton8: TToolButton
Left = 403
Top = 49 Top = 49
ExplicitLeft = 270 ExplicitLeft = 403
ExplicitTop = 49 ExplicitTop = 49
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Top = 99 Top = 99
Width = 750 Width = 750
Height = 287 Height = 111
ExplicitTop = 99 ExplicitTop = 99
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 287 ExplicitHeight = 275
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Top = 73 Top = 73
@ -320,13 +289,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
object pagPortada: TTabSheet object pagPortada: TTabSheet
Caption = 'Portada' Caption = 'Portada'
ImageIndex = 3 ImageIndex = 3
ExplicitHeight = 374
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 145 Width = 145
Height = 386 Height = 210
Align = alLeft Align = alLeft
TabOrder = 0 TabOrder = 0
ExplicitHeight = 374
object Image2: TImage object Image2: TImage
Left = 16 Left = 16
Top = 16 Top = 16
@ -414,7 +385,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Left = 145 Left = 145
Top = 0 Top = 0
Width = 605 Width = 605
Height = 386 Height = 210
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -426,7 +397,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ReadOnly = False ReadOnly = False
ExplicitLeft = 145 ExplicitLeft = 145
ExplicitWidth = 605 ExplicitWidth = 605
ExplicitHeight = 386 ExplicitHeight = 374
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 605 Width = 605
ExplicitWidth = 605 ExplicitWidth = 605
@ -442,8 +413,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
DataBinding.DataSource = dsDataTable DataBinding.DataSource = dsDataTable
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitWidth = 605 ExplicitWidth = 605
ExplicitHeight = 360 ExplicitHeight = 348
Height = 360 Height = 184
Width = 605 Width = 605
end end
end end
@ -451,13 +422,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
object pagMemoria: TTabSheet object pagMemoria: TTabSheet
Caption = 'Memoria' Caption = 'Memoria'
ImageIndex = 4 ImageIndex = 4
ExplicitHeight = 374
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 145 Width = 145
Height = 386 Height = 210
Align = alLeft Align = alLeft
TabOrder = 0 TabOrder = 0
ExplicitHeight = 374
object Image3: TImage object Image3: TImage
Left = 16 Left = 16
Top = 16 Top = 16
@ -716,7 +689,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Left = 145 Left = 145
Top = 0 Top = 0
Width = 605 Width = 605
Height = 386 Height = 210
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -728,7 +701,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ReadOnly = False ReadOnly = False
ExplicitLeft = 145 ExplicitLeft = 145
ExplicitWidth = 605 ExplicitWidth = 605
ExplicitHeight = 386 ExplicitHeight = 374
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 605 Width = 605
ExplicitWidth = 605 ExplicitWidth = 605
@ -744,8 +717,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
DataBinding.DataSource = dsDataTable DataBinding.DataSource = dsDataTable
Style.IsFontAssigned = True Style.IsFontAssigned = True
ExplicitWidth = 605 ExplicitWidth = 605
ExplicitHeight = 360 ExplicitHeight = 348
Height = 360 Height = 184
Width = 605 Width = 605
end end
end end
@ -753,11 +726,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
object pagInicidencias: TTabSheet object pagInicidencias: TTabSheet
Caption = 'Incidencias' Caption = 'Incidencias'
ImageIndex = 2 ImageIndex = 2
ExplicitHeight = 374
inline frViewIncidenciasCli: TfrViewIncidencias inline frViewIncidenciasCli: TfrViewIncidencias
Left = 0 Left = 0
Top = 0 Top = 0
Width = 750 Width = 750
Height = 386 Height = 210
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -768,7 +742,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 386 ExplicitHeight = 374
inherited pnlSup: TPanel inherited pnlSup: TPanel
Width = 750 Width = 750
ExplicitWidth = 750 ExplicitWidth = 750
@ -778,13 +752,13 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
end end
inherited GroupBox1: TGroupBox inherited GroupBox1: TGroupBox
Width = 750 Width = 750
Height = 358 Height = 182
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 358 ExplicitHeight = 346
inherited eIncidencias: TcxDBMemo inherited eIncidencias: TcxDBMemo
ExplicitWidth = 727 ExplicitWidth = 727
ExplicitHeight = 325 ExplicitHeight = 313
Height = 325 Height = 149
Width = 727 Width = 727
end end
end end
@ -793,11 +767,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
object pagDocumentos: TTabSheet object pagDocumentos: TTabSheet
Caption = 'Documentos' Caption = 'Documentos'
ImageIndex = 5 ImageIndex = 5
ExplicitHeight = 374
inline frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente inline frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 750 Width = 750
Height = 386 Height = 210
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -808,16 +783,16 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 386 ExplicitHeight = 374
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Width = 750 Width = 750
ExplicitWidth = 750 ExplicitWidth = 750
end end
inherited ListView1: TListView inherited ListView1: TListView
Width = 750 Width = 750
Height = 363 Height = 187
ExplicitWidth = 750 ExplicitWidth = 750
ExplicitHeight = 363 ExplicitHeight = 351
end end
end end
end end
@ -832,11 +807,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ExplicitTop = 596 ExplicitTop = 596
ExplicitWidth = 764 ExplicitWidth = 764
end end
inline frViewTotales1: TfrViewTotales [4] inline frViewTotalesPresupuesto1: TfrViewTotalesPresupuesto [4]
Left = 0 Left = 0
Top = 496 Top = 320
Width = 764 Width = 764
Height = 100 Height = 276
Align = alBottom Align = alBottom
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -846,235 +821,168 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
ParentFont = False ParentFont = False
TabOrder = 4 TabOrder = 4
ReadOnly = False ReadOnly = False
ExplicitTop = 496 ExplicitTop = 320
ExplicitWidth = 764 ExplicitWidth = 764
ExplicitHeight = 100 ExplicitHeight = 276
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 764 Width = 764
Height = 171
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 764 ExplicitWidth = 764
ExplicitHeight = 171
inherited Bevel1: TBevel inherited Bevel1: TBevel
Left = 93
Top = 92
Width = 73 Width = 73
ExplicitLeft = 93
ExplicitTop = 92
ExplicitWidth = 73 ExplicitWidth = 73
end end
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 375 Left = 441
Top = 11 Height = 122
Width = 8 ExplicitLeft = 441
Height = 54 ExplicitHeight = 122
ExplicitLeft = 375
ExplicitTop = 11
ExplicitWidth = 8
ExplicitHeight = 54
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 492 Left = 553
Top = 92 Width = 192
Width = 21 ExplicitLeft = 553
ExplicitLeft = 492 ExplicitWidth = 192
ExplicitTop = 92
ExplicitWidth = 21
end end
inherited ImporteDto: TcxDBCurrencyEdit inherited ImporteDto: TcxDBCurrencyEdit
Left = 164
Top = 112
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 164 ExplicitWidth = 87
ExplicitTop = 112 Width = 87
ExplicitWidth = 188
Width = 188
end end
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 563 Left = 624
Top = 38
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 563 ExplicitLeft = 624
ExplicitTop = 38 ExplicitWidth = 20
ExplicitWidth = 182 Width = 20
Width = 182
end end
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 493 Left = 554
Top = 112
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 493 ExplicitLeft = 554
ExplicitTop = 112 ExplicitWidth = 90
ExplicitWidth = 252 Width = 90
Width = 252
end end
inherited edtDescuento: TcxDBSpinEdit inherited edtDescuento: TcxDBSpinEdit
Left = 93
Top = 112
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93
ExplicitTop = 112
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 492 Left = 553
Top = 38
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 492 ExplicitLeft = 553
ExplicitTop = 38
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 492 Left = 553
Top = 11
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 492 ExplicitLeft = 553
ExplicitTop = 11 ExplicitWidth = 91
ExplicitWidth = 253 Width = 91
Width = 253
end end
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 492 Left = 553
Top = 65
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 492 ExplicitLeft = 553
ExplicitTop = 65
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 563 Left = 624
Top = 65
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 563 ExplicitLeft = 624
ExplicitTop = 65 ExplicitWidth = 20
ExplicitWidth = 182 Width = 20
Width = 182
end end
inherited eImporteNeto: TcxDBCurrencyEdit inherited eImporteNeto: TcxDBCurrencyEdit
Left = 93
Top = 11
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93 ExplicitWidth = 158
ExplicitTop = 11 Width = 158
ExplicitWidth = 259
Width = 259
end end
inherited ePorte: TcxDBCurrencyEdit inherited ePorte: TcxDBCurrencyEdit
Left = 93
Top = 139
Properties.OnValidate = frViewTotales1ePortePropertiesValidate
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93 ExplicitWidth = 158
ExplicitTop = 139 Width = 158
ExplicitWidth = 259
Width = 259
end end
inherited eIVA: TcxDBLookupComboBox inherited eIVA: TcxDBLookupComboBox
Left = 93
Top = 38
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93 ExplicitWidth = 20
ExplicitTop = 38 Width = 20
ExplicitWidth = 121
Width = 121
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 227 Left = 293
Top = 38 ExplicitLeft = 293
ExplicitLeft = 227
ExplicitTop = 38
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
Left = 93
Top = 65
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 93 ExplicitWidth = 221
ExplicitTop = 65 Width = 221
ExplicitWidth = 259
Width = 259
end end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited eDescripcionBonificacion: TcxDBTextEdit
inherited dxLayoutControl1Group1: TdxLayoutGroup Style.LookAndFeel.SkinName = ''
ShowCaption = False StyleDisabled.LookAndFeel.SkinName = ''
ShowBorder = False StyleFocused.LookAndFeel.SkinName = ''
inherited dxLayoutControl1Group2: TdxLayoutGroup StyleHot.LookAndFeel.SkinName = ''
inherited dxLayoutControl1Group6: TdxLayoutGroup ExplicitWidth = 325
Visible = False Width = 325
end end
inherited dxLayoutControl1Item16: TdxLayoutItem inherited eImporteBonificacion: TcxDBCurrencyEdit
Visible = False Style.LookAndFeel.SkinName = ''
end Style.IsFontAssigned = True
inherited dxLayoutControl1Item10: TdxLayoutItem StyleDisabled.LookAndFeel.SkinName = ''
Visible = False StyleFocused.LookAndFeel.SkinName = ''
end StyleHot.LookAndFeel.SkinName = ''
end ExplicitWidth = 277
inherited dxLayoutControl1Group5: TdxLayoutGroup Width = 277
inherited dxLayoutControl1Group3: TdxLayoutGroup end
inherited dxLayoutControl1Item12: TdxLayoutItem inherited cbBonificacion: TcxCheckBox
Visible = False Style.LookAndFeel.SkinName = ''
end StyleDisabled.LookAndFeel.SkinName = ''
inherited dxLayoutControl1Group9: TdxLayoutGroup StyleFocused.LookAndFeel.SkinName = ''
Visible = False StyleHot.LookAndFeel.SkinName = ''
end ExplicitWidth = 277
inherited dxLayoutControl1Group8: TdxLayoutGroup Width = 277
Visible = False
end
inherited dxLayoutControl1Item14: TdxLayoutItem
Visible = False
end
end
end
end
end end
end end
end end

View File

@ -19,7 +19,7 @@ uses
uDAInterfaces, cxRichEdit, cxDBRichEdit, JvGIF, uViewRichEditor, cxPC, uDAInterfaces, cxRichEdit, cxDBRichEdit, JvGIF, uViewRichEditor, cxPC,
uViewDetallesArticulosParaVenta, uViewDocumentos, uViewDetallesArticulosParaVenta, uViewDocumentos,
uViewDocumentosPresupuestoCliente, uViewDatosYSeleccionClientePresupuesto, uViewDocumentosPresupuestoCliente, uViewDatosYSeleccionClientePresupuesto,
cxLabel; cxLabel, uViewTotalesPresupuesto;
type type
TfEditorPresupuestoCliente = class(TfEditorDBItem, IEditorPresupuestoCliente) TfEditorPresupuestoCliente = class(TfEditorDBItem, IEditorPresupuestoCliente)
@ -28,7 +28,6 @@ type
frViewIncidenciasCli: TfrViewIncidencias; frViewIncidenciasCli: TfrViewIncidencias;
dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList; dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList;
dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel; dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel;
frViewTotales1: TfrViewTotales;
pagPortada: TTabSheet; pagPortada: TTabSheet;
pagMemoria: TTabSheet; pagMemoria: TTabSheet;
Panel1: TPanel; Panel1: TPanel;
@ -48,6 +47,7 @@ type
TBXItem35: TTBXItem; TBXItem35: TTBXItem;
pagDocumentos: TTabSheet; pagDocumentos: TTabSheet;
frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente; frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente;
frViewTotalesPresupuesto1: TfrViewTotalesPresupuesto;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@ -177,6 +177,7 @@ begin
//GESTION_DOCUMENTOS //GESTION_DOCUMENTOS
//Este método eliminará el directorio temporal si se ha creado //Este método eliminará el directorio temporal si se ha creado
frViewDocumentosPresupuestoCliente1.actEliminarTodo.Execute; frViewDocumentosPresupuestoCliente1.actEliminarTodo.Execute;
FViewPresupuesto := NIL; FViewPresupuesto := NIL;
FViewClientePresupuesto := NIL; FViewClientePresupuesto := NIL;
FPresupuesto := NIL; FPresupuesto := NIL;
@ -216,11 +217,11 @@ procedure TfEditorPresupuestoCliente.frViewTotales1ePortePropertiesValidate(
var Error: Boolean); var Error: Boolean);
begin begin
inherited; inherited;
if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then { if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then
FPresupuesto.IMPORTE_PORTE := DisplayValue FPresupuesto.IMPORTE_PORTE := DisplayValue
else else
FPresupuesto.IMPORTE_PORTE := 0; FPresupuesto.IMPORTE_PORTE := 0;
}
// RecalcularPortePorUnidad; En los documentos de cliente no se desglosa el porte por articulo // RecalcularPortePorUnidad; En los documentos de cliente no se desglosa el porte por articulo
end; end;
@ -376,6 +377,8 @@ begin
//GESTION_DOCUMENTOS //GESTION_DOCUMENTOS
frViewDocumentosPresupuestoCliente1.Controller := Controller; frViewDocumentosPresupuestoCliente1.Controller := Controller;
frViewTotalesPresupuesto1.Controller := FController;
end; end;
end; end;
@ -393,7 +396,7 @@ begin
begin begin
dsDataTable.DataTable := FPresupuesto.DataTable; dsDataTable.DataTable := FPresupuesto.DataTable;
frViewIncidenciasCli.DADataSource.DataTable := dsDataTable.DataTable; frViewIncidenciasCli.DADataSource.DataTable := dsDataTable.DataTable;
frViewTotales1.DADataSource.DataTable := dsDataTable.DataTable; frViewTotalesPresupuesto1.DADataSource.DataTable := dsDataTable.DataTable;
if Assigned(FViewPresupuesto) then if Assigned(FViewPresupuesto) then
begin begin
ViewPresupuesto.ViewClientePresupuesto.OnClienteChanged := NIL; ViewPresupuesto.ViewClientePresupuesto.OnClienteChanged := NIL;
@ -404,6 +407,9 @@ begin
//GESTION_DOCUMENTOS //GESTION_DOCUMENTOS
frViewDocumentosPresupuestoCliente1.Presupuesto := FPresupuesto; frViewDocumentosPresupuestoCliente1.Presupuesto := FPresupuesto;
frViewTotalesPresupuesto1.Presupuesto := FPresupuesto;
finally finally
ViewPresupuesto.ViewClientePresupuesto.OnClienteChanged := OnClienteChanged; ViewPresupuesto.ViewClientePresupuesto.OnClienteChanged := OnClienteChanged;
end; end;

View File

@ -235,6 +235,7 @@ var
ACliente : IBizCliente; ACliente : IBizCliente;
begin begin
inherited; inherited;
ACliente := (FClientesController.ElegirContacto(FClientesController.BuscarTodos, FMsgElegirCliente, False) as IBizCliente); ACliente := (FClientesController.ElegirContacto(FClientesController.BuscarTodos, FMsgElegirCliente, False) as IBizCliente);
if Assigned(ACliente) then if Assigned(ACliente) then

View File

@ -0,0 +1,289 @@
inherited frViewTotalesPresupuesto: TfrViewTotalesPresupuesto
Width = 848
Height = 287
OnDestroy = CustomViewDestroy
OnShow = CustomViewShow
ExplicitHeight = 287
inherited dxLayoutControl1: TdxLayoutControl
Width = 848
Height = 281
ExplicitWidth = 451
ExplicitHeight = 281
DesignSize = (
848
281)
inherited Bevel1: TBevel
Width = 73
ExplicitWidth = 73
end
inherited Bevel3: TBevel
Left = 488
Height = 122
ExplicitLeft = 488
ExplicitHeight = 122
end
inherited Bevel4: TBevel
Left = 600
Width = 192
ExplicitLeft = 600
ExplicitWidth = 192
end
inherited ImporteDto: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited ImporteIVA: TcxDBCurrencyEdit
Left = 671
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 12
ExplicitLeft = 671
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 601
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 15
ExplicitLeft = 601
end
inherited edtDescuento: TcxDBSpinEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited edtIVA: TcxDBSpinEdit
Left = 600
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 11
ExplicitLeft = 600
end
inherited ImporteBase: TcxDBCurrencyEdit
Left = 600
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 10
ExplicitLeft = 600
end
inherited edtRE: TcxDBSpinEdit
Left = 600
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 13
ExplicitLeft = 600
end
inherited ImporteRE: TcxDBCurrencyEdit
Left = 671
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 14
ExplicitLeft = 671
end
inherited eImporteNeto: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited ePorte: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited eIVA: TcxDBLookupComboBox
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited bTiposIVA: TButton
Left = 340
ExplicitLeft = 340
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 221
Width = 221
end
object eDescripcionBonificacion: TcxDBTextEdit [16]
Left = 104
Top = 210
Anchors = [akLeft, akTop, akRight]
AutoSize = False
DataBinding.DataField = 'DESCRIPCION_BONIFICACION'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleDisabled.TextColor = clWindowText
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 8
Height = 21
Width = 325
end
object eImporteBonificacion: TcxDBCurrencyEdit [17]
Left = 104
Top = 237
AutoSize = False
DataBinding.DataField = 'IMPORTE_BONIFICACION'
DataBinding.DataSource = DADataSource
Enabled = False
ParentFont = False
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = False
Properties.UseLeftAlignmentOnEditing = False
Properties.UseThousandSeparator = True
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Font.Charset = DEFAULT_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -11
Style.Font.Name = 'Tahoma'
Style.Font.Style = []
Style.HotTrack = False
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.TextColor = clWindowText
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleDisabled.TextColor = clWindowText
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 9
Height = 21
Width = 277
end
object cbBonificacion: TcxCheckBox [18]
Left = 22
Top = 183
Caption = 'Incluir descuento por bonificaci'#243'n:'
Properties.DisplayChecked = '1'
Properties.DisplayUnchecked = '0'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
Properties.ValueChecked = 1
Properties.ValueUnchecked = 0
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
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 = 277
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup
inherited dxLayoutControl1Group2: TdxLayoutGroup
inherited dxLayoutControl1Item8: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Group6: TdxLayoutGroup
Visible = False
end
inherited dxLayoutControl1Item16: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item10: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Group7: TdxLayoutGroup
Visible = False
end
inherited dxLayoutControl1Item9: TdxLayoutItem
Visible = False
end
object dxLayoutControl1Item19: TdxLayoutItem
ShowCaption = False
Control = cbBonificacion
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item17: TdxLayoutItem
Caption = 'Descripci'#243'n:'
Control = eDescripcionBonificacion
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item18: TdxLayoutItem
Caption = 'Importe:'
Control = eImporteBonificacion
ControlOptions.ShowBorder = False
end
end
inherited dxLayoutControl1Group5: TdxLayoutGroup
inherited dxLayoutControl1Group3: TdxLayoutGroup
inherited dxLayoutControl1Item12: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Group9: TdxLayoutGroup
Visible = False
end
inherited dxLayoutControl1Group8: TdxLayoutGroup
Visible = False
inherited dxLayoutControl1Item6: TdxLayoutItem
Visible = False
end
end
inherited dxLayoutControl1Item14: TdxLayoutItem
Visible = False
end
end
end
end
end
end
end

View File

@ -0,0 +1,103 @@
unit uViewTotalesPresupuesto;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uViewTotales, cxGraphics, dxLayoutLookAndFeels, DB, uDAInterfaces,
uDADataTable, dxLayoutControl, cxCheckBox, cxDBEdit, StdCtrls, cxDropDownEdit,
cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, cxMaskEdit, cxSpinEdit,
cxContainer, cxEdit, cxTextEdit, cxCurrencyEdit, ExtCtrls, cxControls,
uBizPresupuestosCliente, uPresupuestosClienteController;
type
TfrViewTotalesPresupuesto = class(TfrViewTotales)
dxLayoutControl1Item17: TdxLayoutItem;
eDescripcionBonificacion: TcxDBTextEdit;
dxLayoutControl1Item18: TdxLayoutItem;
eImporteBonificacion: TcxDBCurrencyEdit;
dxLayoutControl1Item19: TdxLayoutItem;
cbBonificacion: TcxCheckBox;
procedure CustomViewDestroy(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
procedure OnBonificacionPropertiesEditValueChanged(Sender: TObject);
protected
FPresupuesto: IBizPresupuestoCliente;
FController : IPresupuestosClienteController;
function GetPresupuesto: IBizPresupuestoCliente;
procedure SetPresupuesto(const Value: IBizPresupuestoCliente);
function GetController : IPresupuestosClienteController;
procedure SetController (const Value : IPresupuestosClienteController); virtual;
public
property Presupuesto: IBizPresupuestoCliente read GetPresupuesto write SetPresupuesto;
property Controller : IPresupuestosClienteController read GetController write SetController;
end;
implementation
{$R *.dfm}
{ TfrViewTotalesPresupuesto }
procedure TfrViewTotalesPresupuesto.CustomViewDestroy(Sender: TObject);
begin
cbBonificacion.Properties.OnEditValueChanged := Nil;
FPresupuesto := NIL;
FController := NIL;
inherited;
end;
procedure TfrViewTotalesPresupuesto.CustomViewShow(Sender: TObject);
begin
inherited;
if not Presupuesto.DESCRIPCION_BONIFICACIONIsNull
or not Presupuesto.IMPORTE_BONIFICACIONIsNull then
begin
cbBonificacion.Checked := True;
eDescripcionBonificacion.Enabled := True;
eImporteBonificacion.Enabled := True;
end;
cbBonificacion.Properties.OnEditValueChanged := OnBonificacionPropertiesEditValueChanged;
end;
function TfrViewTotalesPresupuesto.GetController: IPresupuestosClienteController;
begin
Result := FController;
end;
function TfrViewTotalesPresupuesto.GetPresupuesto: IBizPresupuestoCliente;
begin
Result := FPresupuesto;
end;
procedure TfrViewTotalesPresupuesto.OnBonificacionPropertiesEditValueChanged(
Sender: TObject);
begin
if cbBonificacion.Checked then
begin
eDescripcionBonificacion.Enabled := True;
eImporteBonificacion.Enabled := True;
end
else
begin
eDescripcionBonificacion.Enabled := False;
eImporteBonificacion.Enabled := False;
Controller.BorrarBonificacion(Presupuesto);
end;
end;
procedure TfrViewTotalesPresupuesto.SetController(const Value: IPresupuestosClienteController);
begin
FController := Value;
end;
procedure TfrViewTotalesPresupuesto.SetPresupuesto(const Value: IBizPresupuestoCliente);
begin
FPresupuesto := Value;
end;
end.