- preguntar fecha de cierre de una ejecución
 - mejorado el editor

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@716 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-10-31 15:48:27 +00:00
parent 0a4b9e21ab
commit 816a4a38c4
25 changed files with 306 additions and 111 deletions

View File

@ -1,6 +1,7 @@
program FactuGES; program FactuGES;
uses uses
ExceptionLog,
Forms, Forms,
Windows, Windows,
SysUtils, SysUtils,

View File

@ -45,7 +45,7 @@
<DCC_ResourcePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_ResourcePath> <DCC_ResourcePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_ResourcePath>
<DCC_ObjPath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_ObjPath> <DCC_ObjPath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_ObjPath>
<DCC_IncludePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_IncludePath> <DCC_IncludePath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib</DCC_IncludePath>
<DCC_Define>DEBUG;</DCC_Define> <DCC_Define>DEBUG;EUREKALOG;EUREKALOG_VER6</DCC_Define>
<DCC_DebugInfoInExe>True</DCC_DebugInfoInExe> <DCC_DebugInfoInExe>True</DCC_DebugInfoInExe>
<DCC_DebugVN>True</DCC_DebugVN> <DCC_DebugVN>True</DCC_DebugVN>
<DCC_SymbolReferenceInfo>2</DCC_SymbolReferenceInfo> <DCC_SymbolReferenceInfo>2</DCC_SymbolReferenceInfo>
@ -62,6 +62,26 @@
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD10.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\PluginSDK_D10R.bpl">PluginSDK for Delphi 10 (Runtime)</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\PluginSDK_D10R.bpl">PluginSDK for Delphi 10 (Runtime)</Excluded_Packages>
@ -92,7 +112,7 @@
<!-- EurekaLog First Line <!-- EurekaLog First Line
[Exception Log] [Exception Log]
EurekaLog Version=6011 EurekaLog Version=6011
Activate=0 Activate=1
Activate Handle=1 Activate Handle=1
Save Log File=1 Save Log File=1
Foreground Tab=0 Foreground Tab=0

View File

@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{12085ab3-37D9-4E64-8D4C-74D7748385D4}</ProjectGuid> <ProjectGuid>{12085ab3-37D9-4E64-8D4C-74D7748385D4}</ProjectGuid>
<MainSource>Obras_controller.dpk</MainSource> <MainSource>Obras_controller.dpk</MainSource>
@ -46,12 +47,13 @@
<DelphiCompile Include="Obras_controller.dpk"> <DelphiCompile Include="Obras_controller.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="C:\Documents and Settings\Usuario\ApplicationBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_model.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Obras_data.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Obras_model.dcp" />
<DCCReference Include="uObrasController.pas" /> <DCCReference Include="uObrasController.pas" />
<DCCReference Include="View\ApplicationBase.dcp" />
<DCCReference Include="View\Contactos_model.dcp" />
<DCCReference Include="View\GUIBase.dcp" />
<DCCReference Include="View\Obras_data.dcp" />
<DCCReference Include="View\Obras_model.dcp" />
<DCCReference Include="View\uIEditorFechaCierreObra.pas" />
<DCCReference Include="View\uIEditorListaObras.pas" /> <DCCReference Include="View\uIEditorListaObras.pas" />
<DCCReference Include="View\uIEditorObra.pas" /> <DCCReference Include="View\uIEditorObra.pas" />
<DCCReference Include="View\uIEditorObras.pas" /> <DCCReference Include="View\uIEditorObras.pas" />

View File

@ -0,0 +1,18 @@
unit uIEditorFechaCierreObra;
interface
type
IEditorFechaCierreObra = interface
['{2124B621-143A-4955-90EF-EC2053840A47}']
function ShowModal : Integer;
procedure Show;
procedure SetFechaCierre (const Value : TDateTime);
function GetFechaCierre : TDateTime;
property FechaCierre : TDateTime read GetFechaCierre write SetFechaCierre;
end;
implementation
end.

View File

@ -88,7 +88,8 @@ uses
cxControls, DB, uEditorRegistryUtils, schObrasClient_Intf, cxControls, DB, uEditorRegistryUtils, schObrasClient_Intf,
uIEditorObras, uIEditorObra, uDataModuleObras, Variants, uIEditorObras, uIEditorObra, uDataModuleObras, Variants,
uDataModuleUsuarios, uDAInterfaces, uDataTableUtils, uFactuGES_App, uDataModuleUsuarios, uDAInterfaces, uDataTableUtils, uFactuGES_App,
uDateUtils, uROTypes, DateUtils, Controls, Windows, uIEditorListaObras; uDateUtils, uROTypes, DateUtils, Controls, Windows, uIEditorListaObras,
uIEditorFechaCierreObra;
{ TObrasController } { TObrasController }
@ -174,31 +175,33 @@ end;
procedure TObrasController.CerrarEjecucionActiva(AObra: IBizObra; procedure TObrasController.CerrarEjecucionActiva(AObra: IBizObra;
const AFecha: TDateTime); const AFecha: TDateTime);
var
AEditor : IEditorFechaCierreObra;
begin begin
AEditor := NIL;
if not Assigned(AObra) then if not Assigned(AObra) then
raise Exception.Create ('Obra no asignada (CerrarEjecucion)'); raise Exception.Create ('Obra no asignada (CerrarEjecucion)');
if AObra.DataTable.Active then if AObra.DataTable.Active then
AObra.DataTable.Active := True; AObra.DataTable.Active := True;
{ with AObra.Ejecuciones do CreateEditor('EditorFechaCierreObra', IEditorFechaCierreObra, AEditor);
begin try
Insert; if Assigned(AEditor) then
FECHA_INICIO := AObra.EjecucionEnCurso.FECHA_INICIO; with (AEditor as IEditorFechaCierreObra) do
FECHA_FIN := AFecha; begin
ID_SUBCONTRATA := AObra.EjecucionEnCurso.ID_SUBCONTRATA; FechaCierre := DateOf(AFecha);
NOMBRE := AObra.EjecucionEnCurso.NOMBRE; if (ShowModal = mrOk) then
IMPORTE_GASTOS := AObra.EjecucionEnCurso.IMPORTE_GASTOS; begin
IMPORTE_INGRESOS := AObra.EjecucionEnCurso.IMPORTE_INGRESOS; AObra.Ejecuciones.Edit;
IMPORTE_TOTAL := AObra.EjecucionEnCurso.IMPORTE_TOTAL; AObra.Ejecuciones.FECHA_FIN := DateOf(FechaCierre);
OBSERVACIONES.AddStrings(AObra.EjecucionEnCurso.OBSERVACIONES.Strings); AObra.Ejecuciones.Post;
Post; end;
end;
finally
AEditor := NIL;
end; end;
with AObra.EjecucionEnCurso do
begin
Delete;
end;}
end; end;
procedure TObrasController.CopiarDireccion(const ACliente: IBizCliente; procedure TObrasController.CopiarDireccion(const ACliente: IBizCliente;

View File

@ -29,6 +29,7 @@ type
['{6BAFA32B-39A5-4BC3-9F16-97A36745C3D9}'] ['{6BAFA32B-39A5-4BC3-9F16-97A36745C3D9}']
function EsNuevo : Boolean; function EsNuevo : Boolean;
function EnCurso : Boolean; function EnCurso : Boolean;
procedure RecalcularBeneficio;
function GetPresupuestos: IBizEjecucionPresupuestos; function GetPresupuestos: IBizEjecucionPresupuestos;
procedure SetPresupuestos(Value: IBizEjecucionPresupuestos); procedure SetPresupuestos(Value: IBizEjecucionPresupuestos);
@ -124,7 +125,8 @@ type
public public
function EsNuevo : Boolean; function EsNuevo : Boolean;
function EnCurso : Boolean; function EnCurso : Boolean;
procedure RecalcularBeneficio;
constructor Create(aDataTable: TDADataTable); override; constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override; destructor Destroy; override;
@ -280,6 +282,12 @@ begin
FECHA_INICIO := DateOf(Now); FECHA_INICIO := DateOf(Now);
end; end;
procedure TBizEjecucionesObra.RecalcularBeneficio;
begin
Edit;
IMPORTE_TOTAL := IMPORTE_INGRESOS - IMPORTE_GASTOS;
end;
procedure TBizEjecucionesObra.SetPedidos( procedure TBizEjecucionesObra.SetPedidos(
Value: IBizEjecucionPedidosProveedor); Value: IBizEjecucionPedidosProveedor);
begin begin

View File

@ -50,6 +50,7 @@ contains
uViewListaEjecucionesObra in 'uViewListaEjecucionesObra.pas' {frViewListaEjecucionesObra: TFrame}, uViewListaEjecucionesObra in 'uViewListaEjecucionesObra.pas' {frViewListaEjecucionesObra: TFrame},
uViewEjecucionObra in 'uViewEjecucionObra.pas' {frViewEjecucionObra: TFrame}, uViewEjecucionObra in 'uViewEjecucionObra.pas' {frViewEjecucionObra: TFrame},
uViewListaPedidosProvObra in 'uViewListaPedidosProvObra.pas' {frViewListaPedidosProvObra: TFrame}, uViewListaPedidosProvObra in 'uViewListaPedidosProvObra.pas' {frViewListaPedidosProvObra: TFrame},
uViewListaPresupuestosObra in 'uViewListaPresupuestosObra.pas' {frViewListaPresupuestosObra: TFrame}; uViewListaPresupuestosObra in 'uViewListaPresupuestosObra.pas' {frViewListaPresupuestosObra: TFrame},
uEditorFechaCierreObra in 'uEditorFechaCierreObra.pas' {fEditorFechaCierreObra: TfEditorFechaCierreObra};
end. end.

View File

@ -47,18 +47,67 @@
<DelphiCompile Include="Obras_view.dpk"> <DelphiCompile Include="Obras_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="ApplicationBase.dcp" /> <DCCReference Include="..\Controller\View\ApplicationBase.dcp" />
<DCCReference Include="Base.dcp" /> <DCCReference Include="..\Controller\View\Base.dcp" />
<DCCReference Include="Contactos_controller.dcp" /> <DCCReference Include="..\Controller\View\Contactos_controller.dcp" />
<DCCReference Include="Contactos_model.dcp" /> <DCCReference Include="..\Controller\View\Contactos_model.dcp" />
<DCCReference Include="Contactos_view.dcp" /> <DCCReference Include="..\Controller\View\Contactos_view.dcp" />
<DCCReference Include="GUIBase.dcp" /> <DCCReference Include="..\Controller\View\GUIBase.dcp" />
<DCCReference Include="Obras_controller.dcp" /> <DCCReference Include="..\Controller\View\Obras_controller.dcp" />
<DCCReference Include="Obras_model.dcp" /> <DCCReference Include="..\Controller\View\Obras_model.dcp" />
<DCCReference Include="PedidosProveedor_controllercontainsuViewObrain.dcp" /> <DCCReference Include="..\Controller\View\PedidosProveedor_controller.dcp" />
<DCCReference Include="PedidosProveedor_model.dcp" /> <DCCReference Include="..\Controller\View\PedidosProveedor_model.dcp" />
<DCCReference Include="PresupuestosCliente_controller.dcp" /> <DCCReference Include="..\Controller\View\PresupuestosCliente_controller.dcp" />
<DCCReference Include="PresupuestosCliente_model.dcp" /> <DCCReference Include="..\Controller\View\PresupuestosCliente_model.dcp" />
<DCCReference Include="uEditorFechaCierreObra.pas">
<Form>fEditorFechaCierreObra</Form>
<DesignClass>TfEditorObra</DesignClass>
</DCCReference>
<DCCReference Include="uEditorListaObras.pas">
<Form>fEditorListaObras</Form>
<DesignClass>TfListaObras</DesignClass>
</DCCReference>
<DCCReference Include="uEditorObra.pas">
<Form>fEditorObra</Form>
<DesignClass>TfEditorObra</DesignClass>
</DCCReference>
<DCCReference Include="uEditorObras.pas">
<Form>fEditorObras</Form>
<DesignClass>TfEditorObras</DesignClass>
</DCCReference>
<DCCReference Include="uObrasViewRegister.pas" />
<DCCReference Include="uViewClienteAsociadoObra.pas">
<Form>frViewClienteAsociadoObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewEjecucionObra.pas">
<Form>frViewEjecucionObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewListaEjecucionesObra.pas">
<Form>frViewListaEjecucionesObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewListaPedidosProvObra.pas">
<Form>frViewListaPedidosProvObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewListaPresupuestosObra.pas">
<Form>frViewListaPresupuestosObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewObra.pas">
<Form>frViewObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewObras.pas">
<Form>frViewObras</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewSubcontrataObra.pas">
<Form>frViewSubcontrataObra</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
</ItemGroup> </ItemGroup>
</Project> </Project>
<!-- EurekaLog First Line <!-- EurekaLog First Line

View File

@ -0,0 +1,61 @@
object fEditorFechaCierreObra: TfEditorFechaCierreObra
Left = 0
Top = 0
BorderIcons = [biSystemMenu]
Caption = 'Fecha de cierre'
ClientHeight = 141
ClientWidth = 253
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = False
Position = poMainFormCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 10
Width = 237
Height = 31
Caption = 'Establezca la fecha de cierre para esta ejecuci'#243'n de obra:'
WordWrap = True
end
object edtFechaDecision: TcxDateEdit
Left = 48
Top = 47
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
Width = 169
end
object bAceptar: TButton
Left = 85
Top = 105
Width = 75
Height = 25
Caption = 'Aceptar'
ModalResult = 1
TabOrder = 1
end
object bCancelar: TButton
Left = 166
Top = 105
Width = 75
Height = 25
Cancel = True
Caption = 'Cancelar'
ModalResult = 2
TabOrder = 2
end
end

View File

@ -0,0 +1,43 @@
unit uEditorFechaCierreObra;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, cxControls, cxContainer,
cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, cxCalendar, uIEditorFechaCierreObra;
type
TfEditorFechaCierreObra = class(TForm, IEditorFechaCierreObra)
Label1: TLabel;
edtFechaDecision: TcxDateEdit;
bAceptar: TButton;
bCancelar: TButton;
procedure FormShow(Sender: TObject);
private
procedure SetFechaCierre (const Value : TDateTime);
function GetFechaCierre : TDateTime;
public
property FechaCierre : TDateTime read GetFechaCierre write SetFechaCierre;
end;
implementation
{$R *.dfm}
procedure TfEditorFechaCierreObra.FormShow(Sender: TObject);
begin
edtFechaDecision.Date := now;
end;
function TfEditorFechaCierreObra.GetFechaCierre: TDateTime;
begin
Result := edtFechaDecision.Date;
end;
procedure TfEditorFechaCierreObra.SetFechaCierre(const Value: TDateTime);
begin
edtFechaDecision.Date := Value;
end;
end.

View File

@ -50,13 +50,19 @@ inherited fEditorObra: TfEditorObra
Width = 632 Width = 632
ExplicitWidth = 632 ExplicitWidth = 632
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 330 ExplicitWidth = 632
inherited TBXItem2: TTBXItem inherited TBXItem2: TTBXItem
Visible = False Visible = False
end end
inherited TBXItem5: TTBXItem inherited TBXItem5: TTBXItem
Visible = False Visible = False
end end
object TBXItem34: TTBXItem [7]
Action = actNuevaEjecucion
end
object TBXItem35: TTBXItem [8]
Action = actFinalizarEjecucion
end
inherited TBXItem23: TTBXItem inherited TBXItem23: TTBXItem
Visible = False Visible = False
end end
@ -115,35 +121,24 @@ inherited fEditorObra: TfEditorObra
ActivePage = pagListaEjecuciones ActivePage = pagListaEjecuciones
OnChange = pgPaginasChange OnChange = pgPaginasChange
ExplicitWidth = 626 ExplicitWidth = 626
ExplicitHeight = 240 ExplicitHeight = 318
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
ExplicitLeft = 4 ExplicitLeft = 4
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 618 ExplicitWidth = 618
ExplicitHeight = 212 ExplicitHeight = 290
end
object pagNuevaEjecucion: TTabSheet
Caption = 'Ejecuci'#243'n en curso'
ImageIndex = 3
ExplicitHeight = 212
object bNuevaEjecucion: TButton
Left = 48
Top = 24
Width = 145
Height = 25
Action = actNuevaEjecucion
TabOrder = 0
end
end end
object pagEjecucionActual: TTabSheet object pagEjecucionActual: TTabSheet
Caption = 'Ejecuci'#243'n en curso' Caption = 'Ejecuci'#243'n en curso'
ImageIndex = 4 ImageIndex = 4
ExplicitHeight = 212 ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
end end
object pagListaEjecuciones: TTabSheet object pagListaEjecuciones: TTabSheet
Caption = 'Lista de ejecuciones' Caption = 'Lista de ejecuciones'
ImageIndex = 5 ImageIndex = 5
ExplicitHeight = 212
inline frViewListaEjecucionesObra1: TfrViewListaEjecucionesObra inline frViewListaEjecucionesObra1: TfrViewListaEjecucionesObra
Left = 0 Left = 0
Top = 0 Top = 0
@ -159,12 +154,12 @@ inherited fEditorObra: TfEditorObra
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 618 ExplicitWidth = 618
ExplicitHeight = 212 ExplicitHeight = 290
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 618 Width = 618
Height = 265 Height = 265
ExplicitWidth = 618 ExplicitWidth = 618
ExplicitHeight = 187 ExplicitHeight = 265
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item

View File

@ -21,10 +21,8 @@ type
TfEditorObra = class(TfEditorDBItem, IEditorObra) TfEditorObra = class(TfEditorDBItem, IEditorObra)
dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList; dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList;
dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel; dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel;
pagNuevaEjecucion: TTabSheet;
pagEjecucionActual: TTabSheet; pagEjecucionActual: TTabSheet;
pagListaEjecuciones: TTabSheet; pagListaEjecuciones: TTabSheet;
bNuevaEjecucion: TButton;
frViewListaEjecucionesObra1: TfrViewListaEjecucionesObra; frViewListaEjecucionesObra1: TfrViewListaEjecucionesObra;
actNuevaEjecucion: TAction; actNuevaEjecucion: TAction;
actFinalizarEjecucion: TAction; actFinalizarEjecucion: TAction;
@ -33,6 +31,8 @@ type
TBXItem33: TTBXItem; TBXItem33: TTBXItem;
DBGrid1: TDBGrid; DBGrid1: TDBGrid;
dsEjecucionActiva: TDADataSource; dsEjecucionActiva: TDADataSource;
TBXItem34: TTBXItem;
TBXItem35: TTBXItem;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
procedure actNuevaEjecucionExecute(Sender: TObject); procedure actNuevaEjecucionExecute(Sender: TObject);
@ -64,6 +64,7 @@ type
//sobreescribir este metodo //sobreescribir este metodo
procedure AsignarVista; virtual; procedure AsignarVista; virtual;
procedure AsignarVistaEjecucion; procedure AsignarVistaEjecucion;
procedure DestruirVistaEjecucion;
public public
property Obra: IBizObra read GetObra write SetObra; property Obra: IBizObra read GetObra write SetObra;
@ -210,6 +211,11 @@ begin
inherited; inherited;
end; end;
procedure TfEditorObra.DestruirVistaEjecucion;
begin
FViewEjecucionActual := NIL;
end;
procedure TfEditorObra.actFinalizarEjecucionExecute(Sender: TObject); procedure TfEditorObra.actFinalizarEjecucionExecute(Sender: TObject);
begin begin
if (ShowConfirmMessage('Finalizar la ejecución en curso', 'La ejecución actual pasará a ser histórica. ¿Desea cerrar la ejecución actual de la obra?') = IDYES) then if (ShowConfirmMessage('Finalizar la ejecución en curso', 'La ejecución actual pasará a ser histórica. ¿Desea cerrar la ejecución actual de la obra?') = IDYES) then
@ -217,9 +223,9 @@ begin
ShowHourglassCursor; ShowHourglassCursor;
try try
FController.CerrarEjecucionActiva(FObra, Now); FController.CerrarEjecucionActiva(FObra, Now);
FViewEjecucionActual := NIL; DestruirVistaEjecucion;
ActualizarPestanas; ActualizarPestanas;
pgPaginas.ActivePageIndex := pagNuevaEjecucion.PageIndex; pgPaginas.ActivePageIndex := pagListaEjecuciones.PageIndex;
finally finally
HideHourglassCursor; HideHourglassCursor;
end; end;
@ -257,14 +263,9 @@ end;
procedure TfEditorObra.ActualizarPestanas; procedure TfEditorObra.ActualizarPestanas;
begin begin
if Assigned(FViewEjecucionActual) then if Assigned(FViewEjecucionActual) then
begin
pagNuevaEjecucion.TabVisible := False;
pagEjecucionActual.TabVisible := True pagEjecucionActual.TabVisible := True
end else
else begin
pagNuevaEjecucion.TabVisible := True;
pagEjecucionActual.TabVisible := False; pagEjecucionActual.TabVisible := False;
end;
end; end;
procedure TfEditorObra.AsignarVista; procedure TfEditorObra.AsignarVista;
@ -285,7 +286,7 @@ procedure TfEditorObra.AsignarVistaEjecucion;
var var
AViewEjecucion: TfrViewEjecucionObra; AViewEjecucion: TfrViewEjecucionObra;
begin begin
AViewEjecucion := TfrViewEjecucionObra.Create(Self); AViewEjecucion := TfrViewEjecucionObra.Create(NIL);
with AViewEjecucion do with AViewEjecucion do
begin begin

View File

@ -8,13 +8,15 @@ procedure UnregisterViews;
implementation implementation
uses uses
uEditorRegistryUtils, uEditorObras, uEditorObra, uEditorListaObras; uEditorRegistryUtils, uEditorObras, uEditorObra, uEditorListaObras,
uEditorFechaCierreObra;
procedure RegisterViews; procedure RegisterViews;
begin begin
EditorRegistry.RegisterClass(TfEditorObra, 'EditorObra'); EditorRegistry.RegisterClass(TfEditorObra, 'EditorObra');
EditorRegistry.RegisterClass(TfEditorObras, 'EditorObras'); EditorRegistry.RegisterClass(TfEditorObras, 'EditorObras');
EditorRegistry.RegisterClass(TfEditorListaObras, 'EditorListaObras'); EditorRegistry.RegisterClass(TfEditorListaObras, 'EditorListaObras');
EditorRegistry.RegisterClass(TfEditorFechaCierreObra, 'EditorFechaCierreObra');
end; end;
procedure UnregisterViews; procedure UnregisterViews;
@ -22,6 +24,7 @@ begin
EditorRegistry.UnRegisterClass(TfEditorObra); EditorRegistry.UnRegisterClass(TfEditorObra);
EditorRegistry.UnRegisterClass(TfEditorObras); EditorRegistry.UnRegisterClass(TfEditorObras);
EditorRegistry.UnRegisterClass(TfEditorListaObras); EditorRegistry.UnRegisterClass(TfEditorListaObras);
EditorRegistry.UnRegisterClass(TfEditorFechaCierreObra);
end; end;
end. end.

View File

@ -56,14 +56,6 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
Width = 129 Width = 129
Height = 25 Height = 25
Action = actCancelarEjecucion Action = actCancelarEjecucion
TabOrder = 2
end
object bFinEjecucion: TButton
Left = 279
Top = 28
Width = 137
Height = 25
Action = actFinEjecucion
TabOrder = 1 TabOrder = 1
end end
object ImporteBase: TcxDBCurrencyEdit object ImporteBase: TcxDBCurrencyEdit
@ -98,7 +90,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 7 TabOrder = 6
Height = 21 Height = 21
Width = 254 Width = 254
end end
@ -134,7 +126,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 8 TabOrder = 7
Height = 21 Height = 21
Width = 254 Width = 254
end end
@ -170,7 +162,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 9 TabOrder = 8
Height = 21 Height = 21
Width = 254 Width = 254
end end
@ -185,7 +177,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
TabOrder = 5 TabOrder = 4
ReadOnly = False ReadOnly = False
ExplicitLeft = 22 ExplicitLeft = 22
ExplicitTop = 120 ExplicitTop = 120
@ -208,18 +200,6 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 645 Width = 645
ExplicitWidth = 645 ExplicitWidth = 645
inherited ToolButton1: TToolButton
ExplicitWidth = 62
end
inherited ToolButton4: TToolButton
ExplicitWidth = 74
end
inherited ToolButton2: TToolButton
ExplicitWidth = 67
end
inherited ToolButton7: TToolButton
ExplicitWidth = 117
end
end end
inherited dsDetalles: TDADataSource inherited dsDetalles: TDADataSource
Left = 56 Left = 56
@ -245,7 +225,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
TabOrder = 6 TabOrder = 5
ReadOnly = False ReadOnly = False
ExplicitLeft = 22 ExplicitLeft = 22
ExplicitTop = 294 ExplicitTop = 294
@ -256,6 +236,14 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
Height = 94 Height = 94
ExplicitWidth = 645 ExplicitWidth = 645
ExplicitHeight = 94 ExplicitHeight = 94
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewListaPedidosProvObra1.cxGridViewBASE_IMPONIBLE
end>
end
end end
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 645 Width = 645
@ -280,7 +268,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
Width = 120 Width = 120
Height = 25 Height = 25
Caption = 'Elegir subcontrata' Caption = 'Elegir subcontrata'
TabOrder = 4 TabOrder = 3
OnClick = bElegirSubcontrataClick OnClick = bElegirSubcontrataClick
Glyph.Data = { Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100 36040000424D3604000000000000360000002800000010000000100000000100
@ -341,7 +329,7 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 3 TabOrder = 2
Height = 21 Height = 21
Width = 301 Width = 301
end end
@ -363,12 +351,6 @@ inherited frViewEjecucionObra: TfrViewEjecucionObra
Control = edtFecha Control = edtFecha
ControlOptions.ShowBorder = False ControlOptions.ShowBorder = False
end end
object dxLayoutControlEjecucionObraItem3: TdxLayoutItem
AutoAligns = [aaVertical]
ShowCaption = False
Control = bFinEjecucion
ControlOptions.ShowBorder = False
end
object dxLayoutControlEjecucionObraItem2: TdxLayoutItem object dxLayoutControlEjecucionObraItem2: TdxLayoutItem
AutoAligns = [aaVertical] AutoAligns = [aaVertical]
AlignHorz = ahRight AlignHorz = ahRight

View File

@ -37,8 +37,6 @@ type
actCancelarEjecucion: TAction; actCancelarEjecucion: TAction;
dxLayoutControlEjecucionObraItem2: TdxLayoutItem; dxLayoutControlEjecucionObraItem2: TdxLayoutItem;
bCancelarEjecucion: TButton; bCancelarEjecucion: TButton;
dxLayoutControlEjecucionObraItem3: TdxLayoutItem;
bFinEjecucion: TButton;
dxLayoutControlEjecucionObraGroup3: TdxLayoutGroup; dxLayoutControlEjecucionObraGroup3: TdxLayoutGroup;
dxLayoutControlEjecucionObraItem4: TdxLayoutItem; dxLayoutControlEjecucionObraItem4: TdxLayoutItem;
ImporteBase: TcxDBCurrencyEdit; ImporteBase: TcxDBCurrencyEdit;

View File

@ -86,15 +86,16 @@ inherited frViewListaEjecucionesObra: TfrViewListaEjecucionesObra
end end
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 697 Width = 697
Visible = False
ExplicitWidth = 697 ExplicitWidth = 697
inherited ToolButton1: TToolButton inherited ToolButton1: TToolButton
ExplicitWidth = 62 ExplicitWidth = 62
end end
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Visible = False
ExplicitWidth = 74 ExplicitWidth = 74
end end
inherited ToolButton2: TToolButton inherited ToolButton2: TToolButton
Visible = False
ExplicitWidth = 67 ExplicitWidth = 67
end end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton

View File

@ -73,6 +73,7 @@ begin
FObra.Ejecuciones.Edit; FObra.Ejecuciones.Edit;
FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS + FPedidosProvEjecucion.BASE_IMPONIBLE; FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS + FPedidosProvEjecucion.BASE_IMPONIBLE;
FObra.Ejecuciones.RecalcularBeneficio;
end; end;
finally finally
APedido := NIL; APedido := NIL;
@ -110,6 +111,7 @@ begin
inherited; inherited;
FObra.Ejecuciones.Edit; FObra.Ejecuciones.Edit;
FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS - AImporte; FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS - AImporte;
FObra.Ejecuciones.RecalcularBeneficio;
end; end;
function TfrViewListaPedidosProvObra.GetObra: IBizObra; function TfrViewListaPedidosProvObra.GetObra: IBizObra;
@ -144,6 +146,7 @@ begin
FObra.Ejecuciones.Edit; FObra.Ejecuciones.Edit;
FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS - AImporte; FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS - AImporte;
FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS + FPedidosProvEjecucion.BASE_IMPONIBLE; FObra.Ejecuciones.IMPORTE_GASTOS := FObra.Ejecuciones.IMPORTE_GASTOS + FPedidosProvEjecucion.BASE_IMPONIBLE;
FObra.Ejecuciones.RecalcularBeneficio;
end; end;
end; end;
finally finally

View File

@ -3,6 +3,7 @@ inherited frViewListaPresupuestosObra: TfrViewListaPresupuestosObra
ExplicitWidth = 821 ExplicitWidth = 821
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 821 Width = 821
ExplicitWidth = 821
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
@ -53,6 +54,7 @@ inherited frViewListaPresupuestosObra: TfrViewListaPresupuestosObra
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 821 Width = 821
ButtonWidth = 128 ButtonWidth = 128
ExplicitWidth = 821
inherited ToolButton1: TToolButton inherited ToolButton1: TToolButton
ExplicitWidth = 132 ExplicitWidth = 132
end end

View File

@ -79,6 +79,7 @@ begin
FObra.Ejecuciones.Edit; FObra.Ejecuciones.Edit;
FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS + FPresupuestosEjecucion.BASE_IMPONIBLE; FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS + FPresupuestosEjecucion.BASE_IMPONIBLE;
FObra.Ejecuciones.RecalcularBeneficio;
end; end;
finally finally
APresupuesto := NIL; APresupuesto := NIL;
@ -111,6 +112,7 @@ begin
inherited; inherited;
FObra.Ejecuciones.Edit; FObra.Ejecuciones.Edit;
FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS - AImporte; FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS - AImporte;
FObra.Ejecuciones.RecalcularBeneficio;
end; end;
function TfrViewListaPresupuestosObra.GetController: IObrasController; function TfrViewListaPresupuestosObra.GetController: IObrasController;
@ -150,6 +152,7 @@ begin
FObra.Ejecuciones.Edit; FObra.Ejecuciones.Edit;
FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS - AImporte; FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS - AImporte;
FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS + FPresupuestosEjecucion.BASE_IMPONIBLE; FObra.Ejecuciones.IMPORTE_INGRESOS := FObra.Ejecuciones.IMPORTE_INGRESOS + FPresupuestosEjecucion.BASE_IMPONIBLE;
FObra.Ejecuciones.RecalcularBeneficio;
end; end;
end; end;
finally finally

View File

@ -3,6 +3,7 @@ program FactuGES_Server;
{#ROGEN:..\Servicios\FactuGES.rodl} // RemObjects: Careful, do not remove! {#ROGEN:..\Servicios\FactuGES.rodl} // RemObjects: Careful, do not remove!
uses uses
ExceptionLog,
uROComInit, uROComInit,
uROComboService, uROComboService,
Forms, Forms,

View File

@ -22,7 +22,7 @@
<Version>7.0</Version> <Version>7.0</Version>
<DCC_MapFile>3</DCC_MapFile> <DCC_MapFile>3</DCC_MapFile>
<DCC_ExeOutput>..\..\Output\Debug\Servidor</DCC_ExeOutput> <DCC_ExeOutput>..\..\Output\Debug\Servidor</DCC_ExeOutput>
<DCC_Define>DEBUG;</DCC_Define> <DCC_Define>DEBUG;EUREKALOG;EUREKALOG_VER6</DCC_Define>
<DCC_GenerateStackFrames>True</DCC_GenerateStackFrames> <DCC_GenerateStackFrames>True</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>True</DCC_DebugInfoInExe> <DCC_DebugInfoInExe>True</DCC_DebugInfoInExe>
<DCC_DebugVN>True</DCC_DebugVN> <DCC_DebugVN>True</DCC_DebugVN>
@ -304,7 +304,7 @@
<!-- EurekaLog First Line <!-- EurekaLog First Line
[Exception Log] [Exception Log]
EurekaLog Version=6011 EurekaLog Version=6011
Activate=0 Activate=1
Activate Handle=1 Activate Handle=1
Save Log File=1 Save Log File=1
Foreground Tab=0 Foreground Tab=0

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN BEGIN
VALUE "FileVersion", "1.4.0.0\0" VALUE "FileVersion", "1.4.0.0\0"
VALUE "ProductVersion", "1.4.0.0\0" VALUE "ProductVersion", "1.4.0.0\0"
VALUE "CompileDate", "lunes, 27 de octubre de 2008 11:41\0" VALUE "CompileDate", "viernes, 31 de octubre de 2008 10:20\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"