diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index d37d0ff..53f33db 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -1353,13 +1353,14 @@ CREATE VIEW V_EMPRESAS(
ID_TIPO_IVA,
ID_FORMA_PAGO,
ID_ALMACEN,
- ID_PERFIL)
+ ID_PERFIL,
+ VALIDEZ_PRESUPUESTOS)
AS
select E.ID, E.NIF_CIF, E.NOMBRE, E.RAZON_SOCIAL, E.CALLE, E.POBLACION,
E.PROVINCIA, E.CODIGO_POSTAL, E.TELEFONO_1, E.TELEFONO_2, E.MOVIL_1, E.MOVIL_2,
E.FAX, E.EMAIL_1, E.EMAIL_2, E.PAGINA_WEB, E.NOTAS, E.FECHA_ALTA, E.FECHA_MODIFICACION,
E.USUARIO, E.LOGOTIPO, E.REGISTRO_MERCANTIL, E.PARAM_TIEMPO, E.PARAM_MARGEN, E.ID_TIPO_IVA,
-E.ID_FORMA_PAGO, E.ID_ALMACEN, EP.id_perfil
+E.ID_FORMA_PAGO, E.ID_ALMACEN, EP.id_perfil, E.VALIDEZ_PRESUPUESTOS
from empresas E
left join empresas_PERFILES EP on (EP.ID_EMPRESA = E.ID)
;
@@ -5193,7 +5194,6 @@ ALTER TABLE PEDIDOS_PROVEEDOR ADD CONSTRAINT FK_PEDIDOS_PROVEEDOR2 FOREIGN KEY (
ALTER TABLE PEDIDOS_PROVEEDOR ADD CONSTRAINT FK_PEDIDOS_PROVEEDOR_1 FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_PROVEEDOR (ID) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE PRESUPUESTOS_CLIENTE ADD CONSTRAINT FK_PRESUPUESTOS_CLIENTE_1 FOREIGN KEY (ID_EMPRESA) REFERENCES EMPRESAS (ID);
ALTER TABLE PRESUPUESTOS_CLIENTE ADD CONSTRAINT FK_PRESUPUESTOS_CLIENTE_2 FOREIGN KEY (ID_CLIENTE) REFERENCES CONTACTOS (ID);
-alter table PRESUPUESTOS_CLIENTE add constraint FK_PRESUPUESTOS_CLIENTE_3 foreign key (ID_FACTURA_PROFORMA) references FACTURAS_PROFORMA(ID);
ALTER TABLE RECIBOS_CLIENTE ADD CONSTRAINT FK_RECIBOS_CLIENTE FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_CLIENTE (ID) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE RECIBOS_CLIENTE ADD CONSTRAINT FK_RECIBOS_CLIENTE2 FOREIGN KEY (ID_REMESA) REFERENCES REMESAS_CLIENTE (ID) ON DELETE SET NULL ON UPDATE SET NULL;
ALTER TABLE RECIBOS_PROVEEDOR ADD CONSTRAINT FK_RECIBOS_PROVEEDOR FOREIGN KEY (ID_FACTURA) REFERENCES FACTURAS_PROVEEDOR (ID) ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
index 6d0538b..2e21f13 100644
--- a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
+++ b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
@@ -211,6 +211,10 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
item
Name = 'ID_PERFIL'
DataType = datInteger
+ end
+ item
+ Name = 'VALIDEZ_PRESUPUESTOS'
+ DataType = datSmallInt
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
index c9e24d4..c89e8b7 100644
--- a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
+++ b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
@@ -9,8 +9,8 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_Empresas = '{62467EEF-21A5-4B49-89AB-35AE73A15515}';
- RID_EmpresasDatosBanco = '{EA93C21F-6570-4108-B25C-512F72920134}';
+ RID_Empresas = '{DB389F2C-AF2C-4C7E-BD9F-A3A39017C639}';
+ RID_EmpresasDatosBanco = '{EE4E0FEC-81F6-4D3D-9310-3C96C5E35E0B}';
{ Data table names }
nme_Empresas = 'Empresas';
@@ -45,6 +45,7 @@ const
fld_EmpresasID_FORMA_PAGO = 'ID_FORMA_PAGO';
fld_EmpresasID_ALMACEN = 'ID_ALMACEN';
fld_EmpresasID_PERFIL = 'ID_PERFIL';
+ fld_EmpresasVALIDEZ_PRESUPUESTOS = 'VALIDEZ_PRESUPUESTOS';
{ Empresas field indexes }
idx_EmpresasID = 0;
@@ -75,6 +76,7 @@ const
idx_EmpresasID_FORMA_PAGO = 25;
idx_EmpresasID_ALMACEN = 26;
idx_EmpresasID_PERFIL = 27;
+ idx_EmpresasVALIDEZ_PRESUPUESTOS = 28;
{ EmpresasDatosBanco fields }
fld_EmpresasDatosBancoID = 'ID';
@@ -117,7 +119,7 @@ const
type
{ IEmpresas }
IEmpresas = interface(IDAStronglyTypedDataTable)
- ['{81B08C9A-BF70-4385-BDA7-302F3F2075B3}']
+ ['{3258A439-7ECA-4924-ADC8-F32ED996CBEA}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -229,6 +231,10 @@ type
procedure SetID_PERFILValue(const aValue: Integer);
function GetID_PERFILIsNull: Boolean;
procedure SetID_PERFILIsNull(const aValue: Boolean);
+ function GetVALIDEZ_PRESUPUESTOSValue: SmallInt;
+ procedure SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt);
+ function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean;
+ procedure SetVALIDEZ_PRESUPUESTOSIsNull(const aValue: Boolean);
{ Properties }
@@ -288,6 +294,8 @@ type
property ID_ALMACENIsNull: Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull;
property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue;
property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
+ property VALIDEZ_PRESUPUESTOS: SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue;
+ property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
end;
{ TEmpresasDataTableRules }
@@ -409,6 +417,10 @@ type
procedure SetID_PERFILValue(const aValue: Integer); virtual;
function GetID_PERFILIsNull: Boolean; virtual;
procedure SetID_PERFILIsNull(const aValue: Boolean); virtual;
+ function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual;
+ procedure SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt); virtual;
+ function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean; virtual;
+ procedure SetVALIDEZ_PRESUPUESTOSIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -467,6 +479,8 @@ type
property ID_ALMACENIsNull: Boolean read GetID_ALMACENIsNull write SetID_ALMACENIsNull;
property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue;
property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
+ property VALIDEZ_PRESUPUESTOS: SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue;
+ property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -476,7 +490,7 @@ type
{ IEmpresasDatosBanco }
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
- ['{75E6F351-83DD-4C64-A708-CBED48F69C95}']
+ ['{392595DA-98CB-4179-BE5A-32F9667DCF5F}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1321,6 +1335,27 @@ begin
DataTable.Fields[idx_EmpresasID_PERFIL].AsVariant := Null;
end;
+function TEmpresasDataTableRules.GetVALIDEZ_PRESUPUESTOSValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_EmpresasVALIDEZ_PRESUPUESTOS].AsSmallInt;
+end;
+
+procedure TEmpresasDataTableRules.SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_EmpresasVALIDEZ_PRESUPUESTOS].AsSmallInt := aValue;
+end;
+
+function TEmpresasDataTableRules.GetVALIDEZ_PRESUPUESTOSIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_EmpresasVALIDEZ_PRESUPUESTOS].IsNull;
+end;
+
+procedure TEmpresasDataTableRules.SetVALIDEZ_PRESUPUESTOSIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_EmpresasVALIDEZ_PRESUPUESTOS].AsVariant := Null;
+end;
+
{ TEmpresasDatosBancoDataTableRules }
constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
index 8049918..61f1cb5 100644
--- a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
+++ b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
@@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_EmpresasDelta = '{415F9B21-75FF-4944-BC51-36EE7893F213}';
- RID_EmpresasDatosBancoDelta = '{89191BEE-980B-4F20-BC43-492662CF8779}';
+ RID_EmpresasDelta = '{D78C3F16-F8BB-4C07-BB77-B5B801803B96}';
+ RID_EmpresasDatosBancoDelta = '{C793A29B-3930-49F4-ABCD-2C5598D0D160}';
type
{ IEmpresasDelta }
IEmpresasDelta = interface(IEmpresas)
- ['{415F9B21-75FF-4944-BC51-36EE7893F213}']
+ ['{D78C3F16-F8BB-4C07-BB77-B5B801803B96}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String;
@@ -45,6 +45,7 @@ type
function GetOldID_FORMA_PAGOValue : SmallInt;
function GetOldID_ALMACENValue : SmallInt;
function GetOldID_PERFILValue : Integer;
+ function GetOldVALIDEZ_PRESUPUESTOSValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -75,6 +76,7 @@ type
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
property OldID_ALMACEN : SmallInt read GetOldID_ALMACENValue;
property OldID_PERFIL : Integer read GetOldID_PERFILValue;
+ property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue;
end;
{ TEmpresasBusinessProcessorRules }
@@ -252,6 +254,12 @@ type
function GetOldID_PERFILIsNull: Boolean; virtual;
procedure SetID_PERFILValue(const aValue: Integer); virtual;
procedure SetID_PERFILIsNull(const aValue: Boolean); virtual;
+ function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual;
+ function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean; virtual;
+ function GetOldVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual;
+ function GetOldVALIDEZ_PRESUPUESTOSIsNull: Boolean; virtual;
+ procedure SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt); virtual;
+ procedure SetVALIDEZ_PRESUPUESTOSIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -366,6 +374,10 @@ type
property ID_PERFILIsNull : Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
property OldID_PERFIL : Integer read GetOldID_PERFILValue;
property OldID_PERFILIsNull : Boolean read GetOldID_PERFILIsNull;
+ property VALIDEZ_PRESUPUESTOS : SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue;
+ property VALIDEZ_PRESUPUESTOSIsNull : Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
+ property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue;
+ property OldVALIDEZ_PRESUPUESTOSIsNull : Boolean read GetOldVALIDEZ_PRESUPUESTOSIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -375,7 +387,7 @@ type
{ IEmpresasDatosBancoDelta }
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
- ['{89191BEE-980B-4F20-BC43-492662CF8779}']
+ ['{C793A29B-3930-49F4-ABCD-2C5598D0D160}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -1502,6 +1514,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL] := Null;
end;
+function TEmpresasBusinessProcessorRules.GetVALIDEZ_PRESUPUESTOSValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS];
+end;
+
+function TEmpresasBusinessProcessorRules.GetVALIDEZ_PRESUPUESTOSIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS]);
+end;
+
+function TEmpresasBusinessProcessorRules.GetOldVALIDEZ_PRESUPUESTOSValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS];
+end;
+
+function TEmpresasBusinessProcessorRules.GetOldVALIDEZ_PRESUPUESTOSIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS]);
+end;
+
+procedure TEmpresasBusinessProcessorRules.SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS] := aValue;
+end;
+
+procedure TEmpresasBusinessProcessorRules.SetVALIDEZ_PRESUPUESTOSIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS] := Null;
+end;
+
{ TEmpresasDatosBancoBusinessProcessorRules }
constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
index 20367d2..dbc393a 100644
--- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
+++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
@@ -136,6 +136,10 @@ object srvEmpresas: TsrvEmpresas
item
DatasetField = 'ID_PERFIL'
TableField = 'ID_PERFIL'
+ end
+ item
+ DatasetField = 'VALIDEZ_PRESUPUESTOS'
+ TableField = 'VALIDEZ_PRESUPUESTOS'
end>
end>
Name = 'Empresas'
@@ -299,6 +303,10 @@ object srvEmpresas: TsrvEmpresas
item
Name = 'ID_PERFIL'
DataType = datInteger
+ end
+ item
+ Name = 'VALIDEZ_PRESUPUESTOS'
+ DataType = datSmallInt
end>
end
item
@@ -688,6 +696,11 @@ object srvEmpresas: TsrvEmpresas
Name = 'ID_ALMACEN'
DataType = datSmallInt
Value = ''
+ end
+ item
+ Name = 'VALIDEZ_PRESUPUESTOS'
+ DataType = datSmallInt
+ Value = ''
end>
Statements = <
item
@@ -700,13 +713,14 @@ object srvEmpresas: TsrvEmpresas
'FONO_2, MOVIL_1, MOVIL_2, '#10' FAX, EMAIL_1, EMAIL_2, PAGINA_WE' +
'B, NOTAS, FECHA_ALTA, '#10' FECHA_MODIFICACION, USUARIO, LOGOTIP' +
'O, REGISTRO_MERCANTIL, '#10' PARAM_TIEMPO, PARAM_MARGEN, ID_TIPO' +
- '_IVA, ID_FORMA_PAGO, '#10' ID_ALMACEN)'#10' VALUES'#10' (:ID, :NIF_C' +
- 'IF, :NOMBRE, :RAZON_SOCIAL, :CALLE, :POBLACION,'#10' :PROVINCIA,' +
- ' :CODIGO_POSTAL, :TELEFONO_1, :TELEFONO_2, '#10' :MOVIL_1, :MOVI' +
- 'L_2, :FAX, :EMAIL_1, :EMAIL_2, :PAGINA_WEB, '#10' :NOTAS, :FECHA' +
- '_ALTA, :FECHA_MODIFICACION, :USUARIO, '#10' :LOGOTIPO, :REGISTRO' +
- '_MERCANTIL, :PARAM_TIEMPO, :PARAM_MARGEN, '#10' :ID_TIPO_IVA, :I' +
- 'D_FORMA_PAGO, :ID_ALMACEN)'#10
+ '_IVA, ID_FORMA_PAGO, '#10' ID_ALMACEN, VALIDEZ_PRESUPUESTOS)'#10' V' +
+ 'ALUES'#10' (:ID, :NIF_CIF, :NOMBRE, :RAZON_SOCIAL, :CALLE, :POBLA' +
+ 'CION,'#10' :PROVINCIA, :CODIGO_POSTAL, :TELEFONO_1, :TELEFONO_2,' +
+ ' '#10' :MOVIL_1, :MOVIL_2, :FAX, :EMAIL_1, :EMAIL_2, :PAGINA_WEB' +
+ ', '#10' :NOTAS, :FECHA_ALTA, :FECHA_MODIFICACION, :USUARIO, '#10' ' +
+ ' :LOGOTIPO, :REGISTRO_MERCANTIL, :PARAM_TIEMPO, :PARAM_MARGEN, ' +
+ #10' :ID_TIPO_IVA, :ID_FORMA_PAGO, :ID_ALMACEN, :VALIDEZ_PRESUP' +
+ 'UESTOS)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -879,9 +893,13 @@ object srvEmpresas: TsrvEmpresas
DataType = datSmallInt
Value = ''
end
+ item
+ Name = 'VALIDEZ_PRESUPUESTOS'
+ DataType = datSmallInt
+ Value = ''
+ end
item
Name = 'OLD_ID'
- DataType = datAutoInc
Value = ''
end>
Statements = <
@@ -902,7 +920,8 @@ object srvEmpresas: TsrvEmpresas
'TIPO, '#10' REGISTRO_MERCANTIL = :REGISTRO_MERCANTIL, '#10' PARAM_' +
'TIEMPO = :PARAM_TIEMPO, '#10' PARAM_MARGEN = :PARAM_MARGEN, '#10' ' +
'ID_TIPO_IVA = :ID_TIPO_IVA, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO,' +
- ' '#10' ID_ALMACEN = :ID_ALMACEN'#10' WHERE'#10' (ID = :OLD_ID)'
+ ' '#10' ID_ALMACEN = :ID_ALMACEN,'#10' VALIDEZ_PRESUPUESTOS = :VALI' +
+ 'DEZ_PRESUPUESTOS'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -1232,9 +1251,9 @@ object srvEmpresas: TsrvEmpresas
Top = 90
DiagramData =
''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10
+ 'idth="400" Height="300">'#13#10' '#13#10' '#13#10' '#13#10''#13#10
end
object DABin2DataStreamer: TDABin2DataStreamer
Left = 48
diff --git a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm
index e7586f1..daf2b5c 100644
--- a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm
+++ b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm
@@ -34,8 +34,8 @@ inherited frViewEmpresa: TfrViewEmpresa
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
end
object eCalle: TcxDBTextEdit
- Left = 162
- Top = 304
+ Left = 169
+ Top = 331
DataBinding.DataField = 'CALLE'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@@ -52,12 +52,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 8
+ TabOrder = 9
Width = 223
end
object eCodigoPostal: TcxDBTextEdit
- Left = 312
- Top = 331
+ Left = 319
+ Top = 358
DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@@ -74,11 +74,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 10
+ TabOrder = 11
Width = 73
end
object ePaginaWeb: TcxDBTextEdit
- Left = 510
+ Left = 517
Top = 220
DataBinding.DataField = 'PAGINA_WEB'
DataBinding.DataSource = DADataSource
@@ -96,13 +96,35 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
+ TabOrder = 20
+ Width = 247
+ end
+ object eMailParticular: TcxDBTextEdit
+ Left = 517
+ Top = 193
+ DataBinding.DataField = 'EMAIL_2'
+ DataBinding.DataSource = DADataSource
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ 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 = 19
Width = 247
end
- object eMailParticular: TcxDBTextEdit
- Left = 510
- Top = 193
- DataBinding.DataField = 'EMAIL_2'
+ object eMailTrabajo: TcxDBTextEdit
+ Left = 517
+ Top = 166
+ DataBinding.DataField = 'EMAIL_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
@@ -121,31 +143,9 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 18
Width = 247
end
- object eMailTrabajo: TcxDBTextEdit
- Left = 510
- Top = 166
- DataBinding.DataField = 'EMAIL_1'
- DataBinding.DataSource = DADataSource
- Style.BorderColor = clWindowFrame
- Style.BorderStyle = ebs3D
- 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 = 17
- Width = 247
- end
object cxDBMemo1: TcxDBMemo
Left = 22
- Top = 415
+ Top = 442
DataBinding.DataField = 'NOTAS'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@@ -162,12 +162,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 12
+ TabOrder = 13
Height = 75
Width = 318
end
object eTlfParticular: TcxDBTextEdit
- Left = 510
+ Left = 517
Top = 55
DataBinding.DataField = 'TELEFONO_2'
DataBinding.DataSource = DADataSource
@@ -185,57 +185,35 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 14
- Width = 247
- end
- object eTlfTrabajo: TcxDBTextEdit
- Left = 510
- Top = 28
- DataBinding.DataField = 'TELEFONO_1'
- DataBinding.DataSource = DADataSource
- Style.BorderColor = clWindowFrame
- Style.BorderStyle = ebs3D
- 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 = 13
- Width = 247
- end
- object eTlfMovil: TcxDBTextEdit
- Left = 510
- Top = 82
- DataBinding.DataField = 'MOVIL_1'
- DataBinding.DataSource = DADataSource
- Style.BorderColor = clWindowFrame
- Style.BorderStyle = ebs3D
- 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 = 15
Width = 247
end
- object eFax: TcxDBTextEdit
- Left = 510
- Top = 109
- DataBinding.DataField = 'FAX'
+ object eTlfTrabajo: TcxDBTextEdit
+ Left = 517
+ Top = 28
+ DataBinding.DataField = 'TELEFONO_1'
+ DataBinding.DataSource = DADataSource
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ 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 = 14
+ Width = 247
+ end
+ object eTlfMovil: TcxDBTextEdit
+ Left = 517
+ Top = 82
+ DataBinding.DataField = 'MOVIL_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
@@ -254,8 +232,30 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 16
Width = 247
end
+ object eFax: TcxDBTextEdit
+ Left = 517
+ Top = 109
+ DataBinding.DataField = 'FAX'
+ DataBinding.DataSource = DADataSource
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ 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 = 17
+ Width = 247
+ end
object eNombre: TcxDBTextEdit
- Left = 162
+ Left = 169
Top = 28
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = DADataSource
@@ -278,7 +278,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 223
end
object eNIFCIF: TcxDBTextEdit
- Left = 162
+ Left = 169
Top = 55
DataBinding.DataField = 'NIF_CIF'
DataBinding.DataSource = DADataSource
@@ -301,7 +301,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 223
end
object memRegistroMercantil: TcxDBMemo
- Left = 162
+ Left = 169
Top = 82
DataBinding.DataField = 'REGISTRO_MERCANTIL'
DataBinding.DataSource = DADataSource
@@ -325,7 +325,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 223
end
object cxDBImage1: TcxDBImage
- Left = 415
+ Left = 422
Top = 277
DataBinding.DataField = 'LOGOTIPO'
DataBinding.DataSource = DADataSource
@@ -341,13 +341,13 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 20
+ TabOrder = 21
Height = 249
Width = 313
end
object eParamMargen: TcxDBSpinEdit
- Left = 162
- Top = 247
+ Left = 169
+ Top = 274
DataBinding.DataField = 'PARAM_MARGEN'
DataBinding.DataSource = DADataSource
Properties.OnValidate = eParamMargenPropertiesValidate
@@ -367,12 +367,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 6
+ TabOrder = 7
Width = 60
end
object eParamTiempo: TcxDBCurrencyEdit
- Left = 285
- Top = 247
+ Left = 292
+ Top = 274
DataBinding.DataField = 'PARAM_TIEMPO'
DataBinding.DataSource = DADataSource
Properties.Alignment.Horz = taRightJustify
@@ -392,12 +392,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 7
+ TabOrder = 8
Width = 100
end
object cbProvincia: TcxDBComboBox
- Left = 162
- Top = 331
+ Left = 169
+ Top = 358
DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource
Properties.ImmediatePost = True
@@ -421,12 +421,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 9
+ TabOrder = 10
Width = 80
end
object cbPoblacion: TcxDBComboBox
- Left = 162
- Top = 358
+ Left = 169
+ Top = 385
DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource
Properties.ImmediatePost = True
@@ -450,11 +450,38 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 11
+ TabOrder = 12
Width = 223
end
object cbFormaPago: TcxComboBox
- Left = 162
+ Left = 169
+ Top = 190
+ Anchors = [akLeft, akTop, akRight]
+ Properties.DropDownListStyle = lsEditFixedList
+ Properties.DropDownRows = 25
+ Properties.ImmediatePost = True
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ Style.HotTrack = False
+ Style.LookAndFeel.Kind = lfStandard
+ Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
+ Style.ButtonStyle = bts3D
+ Style.PopupBorderStyle = epbsFrame3D
+ 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 = 5
+ Width = 202
+ end
+ object cbTipoIVA: TcxComboBox
+ Left = 169
Top = 163
Anchors = [akLeft, akTop, akRight]
Properties.DropDownListStyle = lsEditFixedList
@@ -480,9 +507,9 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 4
Width = 202
end
- object cbTipoIVA: TcxComboBox
- Left = 162
- Top = 136
+ object cbAlmacen: TcxComboBox
+ Left = 169
+ Top = 217
Anchors = [akLeft, akTop, akRight]
Properties.DropDownListStyle = lsEditFixedList
Properties.DropDownRows = 25
@@ -504,35 +531,32 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
+ TabOrder = 6
+ Width = 223
+ end
+ object eValidez: TcxDBSpinEdit
+ Left = 169
+ Top = 136
+ DataBinding.DataField = 'VALIDEZ_PRESUPUESTOS'
+ DataBinding.DataSource = DADataSource
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ Style.HotTrack = False
+ Style.LookAndFeel.Kind = lfStandard
+ Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
+ Style.ButtonStyle = bts3D
+ 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 = 3
- Width = 202
- end
- object cbAlmacen: TcxComboBox
- Left = 162
- Top = 190
- Anchors = [akLeft, akTop, akRight]
- Properties.DropDownListStyle = lsEditFixedList
- Properties.DropDownRows = 25
- Properties.ImmediatePost = True
- Style.BorderColor = clWindowFrame
- Style.BorderStyle = ebs3D
- Style.HotTrack = False
- Style.LookAndFeel.Kind = lfStandard
- Style.LookAndFeel.NativeStyle = True
- Style.LookAndFeel.SkinName = ''
- Style.ButtonStyle = bts3D
- Style.PopupBorderStyle = epbsFrame3D
- 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 = 5
- Width = 223
+ Width = 60
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
@@ -565,6 +589,11 @@ inherited frViewEmpresa: TfrViewEmpresa
Control = memRegistroMercantil
ControlOptions.ShowBorder = False
end
+ object dxLayoutControl1Item24: TdxLayoutItem
+ Caption = 'Validez presupuestos en dias:'
+ Control = eValidez
+ ControlOptions.ShowBorder = False
+ end
object dxLayoutControl1Item16: TdxLayoutItem
Caption = 'IVA por defecto:'
Control = cbTipoIVA
diff --git a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas
index fdbc1aa..6573004 100644
--- a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas
+++ b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas
@@ -92,6 +92,8 @@ type
cbTipoIVA: TcxComboBox;
dxLayoutControl1Item23: TdxLayoutItem;
cbAlmacen: TcxComboBox;
+ dxLayoutControl1Item24: TdxLayoutItem;
+ eValidez: TcxDBSpinEdit;
procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
diff --git a/Source/Informes/1/InfFacturaProforma.fr3 b/Source/Informes/1/InfFacturaProforma.fr3
index df99e7a..1a98974 100644
--- a/Source/Informes/1/InfFacturaProforma.fr3
+++ b/Source/Informes/1/InfFacturaProforma.fr3
@@ -1,5 +1,5 @@
-
+
@@ -16,15 +16,15 @@
-
-
+
+
-
-
+
+
@@ -34,6 +34,8 @@
+
+
diff --git a/Source/Informes/6/InfFacturaProforma.fr3 b/Source/Informes/6/InfFacturaProforma.fr3
index b7758b9..103eb3b 100644
--- a/Source/Informes/6/InfFacturaProforma.fr3
+++ b/Source/Informes/6/InfFacturaProforma.fr3
@@ -1,5 +1,5 @@
-
+
@@ -11,17 +11,17 @@
-
+
-
-
+
+
-
+
-
-
-
+
+
+
@@ -30,6 +30,8 @@
+
+
diff --git a/Source/Modulos/Facturas proforma/Controller/uFacturasProformaController.pas b/Source/Modulos/Facturas proforma/Controller/uFacturasProformaController.pas
index 96ccca7..da08c5a 100644
--- a/Source/Modulos/Facturas proforma/Controller/uFacturasProformaController.pas
+++ b/Source/Modulos/Facturas proforma/Controller/uFacturasProformaController.pas
@@ -61,6 +61,7 @@ type
function DarListaAnosFacturas: TStringList;
procedure FiltrarAno(AFactura: IBizFacturaProforma; ADynWhereDataTable: WideString; const Ano: String);
+ function CambiarSituacion(AFactura : IBizFacturaProforma; Situacion: String; AllItems: Boolean = false): Boolean;
end;
TFacturasProformaController = class(TControllerBase, IFacturasProformaController)
@@ -134,6 +135,8 @@ type
function DarListaAnosFacturas: TStringList;
procedure FiltrarAno(AFactura: IBizFacturaProforma; ADynWhereDataTable: WideString; const Ano: String);
+
+ function CambiarSituacion(AFactura : IBizFacturaProforma; Situacion: String; AllItems: Boolean = false): Boolean;
end;
implementation
@@ -431,6 +434,56 @@ begin
FiltrarEmpresa(Result);
end;
+function TFacturasProformaController.CambiarSituacion(AFactura: IBizFacturaProforma; Situacion: String; AllItems: Boolean): Boolean;
+ // En el caso de cambiar almenos un elemento del conjunto se devuelve true
+begin
+ if not Assigned(AFactura) then
+ raise Exception.Create ('AFactura no asignado');
+
+ ShowHourglassCursor;
+ try
+ if not AFactura.DataTable.Active then
+ AFactura.DataTable.Active := True;
+
+ if (AFactura.State in dsEditModes) then
+ AFactura.Cancel;
+
+ //Siempre cambiaremos de situacion el seleccionado
+ if AFactura.SITUACION <> Situacion then
+ begin
+ AFactura.DataTable.Edit;
+ AFactura.SITUACION := Situacion;
+ AFactura.DataTable.Post;
+ end;
+
+ //En el caso de querer modificar todos los items del objeto
+ if AllItems then
+ begin
+ with AFactura.DataTable do
+ begin
+ First;
+ while not EOF do
+ begin
+ if AFactura.SITUACION <> Situacion then
+ begin
+ AFactura.DataTable.Edit;
+ AFactura.SITUACION := Situacion;
+ AFactura.DataTable.Post;
+ end;
+ Next;
+ end;
+ end;
+ end;
+
+ AFactura.DataTable.ApplyUpdates;
+ Result := True;
+
+ finally
+ HideHourglassCursor;
+ end;
+
+end;
+
constructor TFacturasProformaController.Create;
begin
inherited;
diff --git a/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.dfm b/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.dfm
index ca03869..5d5d014 100644
--- a/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.dfm
+++ b/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.dfm
@@ -67,11 +67,15 @@ inherited fEditorFacturasProforma: TfEditorFacturasProforma
Left = 427
Visible = True
ExplicitLeft = 427
- ExplicitWidth = 117
+ ExplicitWidth = 76
object TBXItem38: TTBXItem
Action = actGenerarFactura
DisplayMode = nbdmImageAndText
end
+ object TBXItem39: TTBXItem
+ Action = actPagada
+ DisplayMode = nbdmImageAndText
+ end
end
end
inherited StatusBar: TJvStatusBar
@@ -160,6 +164,9 @@ inherited fEditorFacturasProforma: TfEditorFacturasProforma
end
end
end
+ inherited ActionList1: TActionList
+ Left = 272
+ end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 519
@@ -190,8 +197,8 @@ inherited fEditorFacturasProforma: TfEditorFacturasProforma
end
end
inherited EditorActionList: TActionList [4]
- Left = 136
- Top = 176
+ Left = 192
+ Top = 192
inherited actNuevo: TAction
ImageIndex = 22
end
@@ -223,10 +230,19 @@ inherited fEditorFacturasProforma: TfEditorFacturasProforma
object actGenerarFactura: TAction
Category = 'Archivo'
Caption = 'Generar factura'
+ Enabled = False
ImageIndex = 25
+ Visible = False
OnExecute = actGenerarFacturaExecute
OnUpdate = actGenerarFacturaUpdate
end
+ object actPagada: TAction
+ Category = 'Acciones'
+ Caption = 'Pagada'
+ ImageIndex = 25
+ OnExecute = actPagadaExecute
+ OnUpdate = actPagadaUpdate
+ end
end
inherited SmallImages: TPngImageList [5]
PngImages = <
diff --git a/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.pas b/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.pas
index b8f7956..db227c2 100644
--- a/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.pas
+++ b/Source/Modulos/Facturas proforma/Views/uEditorFacturasProforma.pas
@@ -38,6 +38,8 @@ type
frViewFacturasProforma1: TfrViewFacturasProforma;
actGenerarFactura: TAction;
TBXItem38: TTBXItem;
+ actPagada: TAction;
+ TBXItem39: TTBXItem;
procedure FormShow(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
procedure actNuevaFacturaExecute(Sender: TObject);
@@ -46,6 +48,8 @@ type
procedure OnListaAnosChange(Sender: TObject; const Text: string);
procedure actGenerarFacturaExecute(Sender: TObject);
procedure actGenerarFacturaUpdate(Sender: TObject);
+ procedure actPagadaUpdate(Sender: TObject);
+ procedure actPagadaExecute(Sender: TObject);
private
FFacturas: IBizFacturaProforma;
@@ -152,6 +156,44 @@ begin
actNuevo.Execute;
end;
+procedure TfEditorFacturasProforma.actPagadaExecute(Sender: TObject);
+var
+ AFacturas: IBizFacturaProforma;
+ AllItems: Boolean;
+ AFecha: Variant;
+begin
+ AFacturas := Nil;
+ AllItems := False;
+
+ if MultiSelect and Assigned(ViewGrid) then
+ AllItems := (ViewGrid.NumSeleccionados > 1);
+
+ if AllItems then
+ begin
+ SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords);
+ AFacturas := (Controller as IFacturasProformaController).ExtraerSeleccionados(Facturas) as IBizFacturaProforma;
+ end
+ else begin
+ AFacturas := Facturas;
+ end;
+
+ ViewGrid._Grid.BeginUpdate;
+ if Assigned(AFacturas) then
+ begin
+ FController.CambiarSituacion(AFacturas, CTE_PAGADA, AllItems);
+ actRefrescar.Execute;
+ end;
+ ViewGrid._Grid.EndUpdate;
+end;
+
+procedure TfEditorFacturasProforma.actPagadaUpdate(Sender: TObject);
+begin
+ inherited;
+ (Sender as TAction).Enabled := HayDatos
+ and ViewGrid.esSeleccionCeldaDatos
+ and (FFacturas.SITUACION = CTE_PENDIENTE);
+end;
+
constructor TfEditorFacturasProforma.Create(AOwner: TComponent);
begin
inherited;
@@ -325,6 +367,7 @@ var
begin
inherited;
+{
Respuesta := JsNuevaFacturaDialog.Execute;
if Respuesta <> IDCANCEL then
@@ -339,11 +382,14 @@ begin
actRefrescar.Execute;
end;
100 : begin // Albaran nuevo vacio
+}
if FController.Anadir(Facturas) then
FController.Ver(Facturas);
+{
end;
end;
end;
+}
end;
procedure TfEditorFacturasProforma.OnListaAnosChange(Sender: TObject; const Text: string);
diff --git a/Source/Modulos/Facturas proforma/Views/uViewFacturasProforma.dfm b/Source/Modulos/Facturas proforma/Views/uViewFacturasProforma.dfm
index 75da48b..b4e49c2 100644
--- a/Source/Modulos/Facturas proforma/Views/uViewFacturasProforma.dfm
+++ b/Source/Modulos/Facturas proforma/Views/uViewFacturasProforma.dfm
@@ -185,7 +185,9 @@ inherited frViewFacturasProforma: TfrViewFacturasProforma
DataBinding.FieldName = 'REFERENCIA_FACTURA_FINAL'
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taRightJustify
+ Visible = False
HeaderAlignmentHorz = taRightJustify
+ VisibleForCustomization = False
end
end
inherited cxGridLevel: TcxGridLevel
diff --git a/Source/Modulos/Pedidos de cliente/Controller/uPedidosClienteController.pas b/Source/Modulos/Pedidos de cliente/Controller/uPedidosClienteController.pas
index 45bf834..9191883 100644
--- a/Source/Modulos/Pedidos de cliente/Controller/uPedidosClienteController.pas
+++ b/Source/Modulos/Pedidos de cliente/Controller/uPedidosClienteController.pas
@@ -34,7 +34,8 @@ type
const AHeaderText: String = '');
procedure VerDireccionEntrega(APedido : IBizPedidoCliente);
- procedure VerProcesoCompleto(APedidos: IBizPedidoCliente; AllItems: Boolean = True);
+ function VerProcesoCompleto(APresupuesto: Integer): Boolean; overload;
+ procedure VerProcesoCompleto(APedidos: IBizPedidoCliente; AllItems: Boolean = True); overload;
function Nuevo : IBizPedidoCliente;
procedure Anadir(APedido : IBizPedidoCliente);
@@ -123,6 +124,7 @@ type
function BuscarTodos(const AID_Cliente: Integer): IBizPedidoCliente; overload;
function BuscarPendientes : IBizPedidoCliente;
function BuscarSituacion(Const ASituacion: String) : IBizPedidoCliente;
+ function BuscarPedidosDePresupuesto(const IdPresupuesto: Integer): IBizPedidoCliente;
function BuscarPendientesPedir(const ID : Integer): IBizPedidoClienteArticulosPendientesPedirAProv;
function BuscarPendientesPedirNoArticulos(const ID : Integer): IBizPedidoClienteArticulosPendientesPedirAProv;
@@ -137,7 +139,8 @@ type
procedure VerDireccionEntrega(APedido : IBizPedidoCliente);
function Duplicar(APedido: IBizPedidoCliente): IBizPedidoCliente;
- procedure VerProcesoCompleto(APedidos: IBizPedidoCliente; AllItems: Boolean = True);
+ function VerProcesoCompleto(APresupuesto: Integer): Boolean; overload;
+ procedure VerProcesoCompleto(APedidos: IBizPedidoCliente; AllItems: Boolean = True); overload;
procedure Preview(APedido : IBizPedidoCliente; AllItems: Boolean = False;
const VerPrecios: Boolean = True; const VerRefProveedor: Boolean = True);
@@ -242,6 +245,30 @@ begin
FiltrarEmpresa(Result);
end;
+function TPedidosClienteController.BuscarPedidosDePresupuesto(const IdPresupuesto: Integer): IBizPedidoCliente;
+var
+ Condicion: TDAWhereExpression;
+begin
+ ShowHourglassCursor;
+ try
+ Result := BuscarTodos;
+
+ // Filtrar los pedidos pendientes de recepcion
+ with Result.DataTable.DynamicWhere do
+ begin
+ // (ID_PRESUPUESTO = IdPresupuesto)
+ Condicion := NewBinaryExpression(NewField('', fld_PedidosClienteID_PRESUPUESTO), NewConstant(IdPresupuesto, datInteger), dboEqual);
+
+ if IsEmpty then
+ Expression := Condicion
+ else
+ Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
+ end;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
function TPedidosClienteController.BuscarPendientes: IBizPedidoCliente;
var
Condicion: TDAWhereExpression;
@@ -622,11 +649,30 @@ begin
end;
end;
+function TPedidosClienteController.VerProcesoCompleto(APresupuesto: Integer): Boolean;
+var
+ APedidos: IBizPedidoCliente;
+begin
+ Result := True;
+ APedidos := BuscarPedidosDePresupuesto(APresupuesto);
+
+ if not Assigned(APedidos) then
+ raise Exception.Create ('Pedidos no asignado (VerProcesoCompleto)');
+
+ if not APedidos.DataTable.Active then
+ APedidos.DataTable.Active := True;
+
+ if (APedidos.DataTable.RecordCount > 0) then
+ VerProcesoCompleto(APedidos, True)
+ else
+ Result := False;
+end;
+
procedure TPedidosClienteController.VerProcesoCompleto(APedidos: IBizPedidoCliente; AllItems: Boolean = True);
var
AModule : TModuleController;
APlugin : IMCProcesoPresupuestosCliente;
- ListaIDPedidosCliente: TIntegerArray;
+ ListaIDPedidosCliente: TIntegerArray;
begin
if not Assigned(APedidos) then
raise Exception.Create ('Pedidos no asignado (VerProcesoCompleto)');
diff --git a/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj b/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj
index 66e2719..6b43521 100644
--- a/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj
+++ b/Source/Modulos/Pedidos de cliente/PedidosCliente_Group.groupproj
@@ -31,6 +31,7 @@
+
@@ -402,6 +403,15 @@
+
+
+
+
+
+
+
+
+
@@ -412,13 +422,13 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas
index b6d67dd..11c0683 100644
--- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas
+++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas
@@ -154,6 +154,7 @@ type
procedure BorrarBonificacion(APresupuesto : IBizPresupuestoCliente);
+
function DarListaAnosPresupuestos: TStringList;
procedure FiltrarAno(APresupuesto: IBizPresupuestoCliente; ADynWhereDataTable: WideString; const Ano: String);
end;
@@ -568,7 +569,7 @@ begin
AEditor := NIL;
end;
end;
-}
+}
end;
procedure TPresupuestosClienteController.VerTodos(APresupuestos: IBizPresupuestoCliente;
diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas
index 4f3c330..856eb05 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas
@@ -244,10 +244,12 @@ begin
ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA;
FECHA_PRESUPUESTO := DateOf(Date);
+ FECHA_VIGENCIA := IncDay(Date, AppFactuGES.EmpresaActiva.VALIDEZ_PRESUPUESTOS);
INCIDENCIAS_ACTIVAS := 0;
// INCIDENCIAS := NIL;
REFERENCIA := '';
SITUACION := SITUACION_PRESUPUESTO_PENDIENTE;
+
end;
procedure TBizPresupuestoCliente.IVAOnChange(Sender: TDACustomField);
diff --git a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
index 1d9a0dc..0c25984 100644
--- a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
+++ b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
@@ -20,6 +20,7 @@
+
@@ -291,14 +292,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm
index 09ea235..8e3200c 100644
--- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm
@@ -208,14 +208,15 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
Name = 'IBX'
SQL =
'SELECT DET.ID, DET.ID_PRESUPUESTO,'#10' DET.POSICION, DET.TIPO' +
- '_DETALLE,'#10' ARTICULOS.REFERENCIA, DET.CONCEPTO, DET.CANTIDA' +
- 'D, DET.IMPORTE_UNIDAD,'#10' DET.DESCUENTO, DET.IMPORTE_UNIDAD ' +
- '- (DET.IMPORTE_UNIDAD * (COALESCE(DET.DESCUENTO,0) / 100)) as IM' +
- 'PORTE_NETO, DET.IMPORTE_TOTAL,'#10' ARTICULOS.REFERENCIA_PROV ' +
- 'as REFERENCIA_PROVEEDOR, DET.VISIBLE'#10'FROM PRESUPUESTOS_CLIENTE_D' +
- 'ETALLES DET'#10'LEFT OUTER JOIN ARTICULOS ON (DET.ID_ARTICULO = ARTI' +
- 'CULOS.ID)'#10#10'WHERE DET.ID_PRESUPUESTO = :ID_PRESUPUESTO AND {Where' +
- '}'#10'ORDER BY DET.ID_PRESUPUESTO, DET.POSICION;'#10#10#10
+ '_DETALLE,'#10' ARTICULOS.REFERENCIA, F_RTFTOTEXT(DET.CONCEPTO)' +
+ ' as CONCEPTO, DET.CANTIDAD, DET.IMPORTE_UNIDAD,'#10' DET.DESCU' +
+ 'ENTO, DET.IMPORTE_UNIDAD - (DET.IMPORTE_UNIDAD * (COALESCE(DET.D' +
+ 'ESCUENTO,0) / 100)) as IMPORTE_NETO, DET.IMPORTE_TOTAL,'#10' A' +
+ 'RTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR, DET.VISIBLE'#10'FR' +
+ 'OM PRESUPUESTOS_CLIENTE_DETALLES DET'#10'LEFT OUTER JOIN ARTICULOS O' +
+ 'N (DET.ID_ARTICULO = ARTICULOS.ID)'#10#10'WHERE DET.ID_PRESUPUESTO = :' +
+ 'ID_PRESUPUESTO AND {Where}'#10'ORDER BY DET.ID_PRESUPUESTO, DET.POSI' +
+ 'CION;'#10#10#10
StatementType = stSQL
ColumnMappings = <
item
@@ -298,7 +299,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
item
Name = 'CONCEPTO'
DataType = datString
- Size = 2000
+ Size = 32765
end
item
Name = 'CANTIDAD'
diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas
index 7dcd3cd..07ee767 100644
--- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas
+++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas
@@ -73,9 +73,9 @@ type
frxDBInformeListadoPresupuestosResumen: TfrxDBDataset;
DADSInformeListadoPresupuestosResumen: TDADataSource;
tbl_InformeListadoPresupuestosResumen: TDAMemDataTable;
+ tbl_Detalles: TDAMemDataTable;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
- tbl_Detalles: TDAMemDataTable;
procedure DataModuleCreate(Sender: TObject);
procedure DataModuleDestroy(Sender: TObject);
function frxReportUserFunction(const MethodName: string;
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm
index 400608e..9d43566 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm
@@ -167,7 +167,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
DockPos = 343
Visible = True
ExplicitLeft = 427
- ExplicitWidth = 378
+ ExplicitWidth = 373
object TBXItem43: TTBXItem
Action = actAceptar
DisplayMode = nbdmImageAndText
@@ -189,6 +189,10 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
object TBXItem46: TTBXItem
Action = actInformes
end
+ object TBXItem48: TTBXItem
+ Action = actVerProcesoCompleto
+ DisplayMode = nbdmImageAndText
+ end
end
end
inherited StatusBar: TJvStatusBar
@@ -208,13 +212,17 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
object actGenerarAlbaranCli: TAction
Category = 'Acciones'
Caption = 'Generar albar'#225'n de cliente'
+ Enabled = False
ImageIndex = 23
+ Visible = False
OnExecute = actGenerarAlbaranCliExecute
end
object actGenerarFacturaProforma: TAction
Category = 'Acciones'
Caption = 'Generar factura proforma'
+ Enabled = False
ImageIndex = 24
+ Visible = False
OnExecute = actGenerarFacturaProformaExecute
OnUpdate = actGenerarFacturaProformaUpdate
end
@@ -262,6 +270,13 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
OnExecute = actGenerarPedidoExecute
OnUpdate = actGenerarPedidoUpdate
end
+ object actVerProcesoCompleto: TAction
+ Category = 'Acciones'
+ Caption = 'Ver proceso completo'
+ ImageIndex = 2
+ OnExecute = actVerProcesoCompletoExecute
+ OnUpdate = actVerProcesoCompletoUpdate
+ end
end
inherited SmallImages: TPngImageList
PngImages = <
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas
index 7d0b5ee..9ba5cc7 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas
+++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas
@@ -47,6 +47,8 @@ type
JSInformesDialog: TJSDialog;
TBXItem47: TTBXItem;
actGenerarPedido: TAction;
+ actVerProcesoCompleto: TAction;
+ TBXItem48: TTBXItem;
procedure FormShow(Sender: TObject);
procedure actGenerarAlbaranCliExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
@@ -66,6 +68,8 @@ type
procedure OnListaAnosChange(Sender: TObject; const Text: string);
procedure actGenerarPedidoExecute(Sender: TObject);
procedure actGenerarPedidoUpdate(Sender: TObject);
+ procedure actVerProcesoCompletoUpdate(Sender: TObject);
+ procedure actVerProcesoCompletoExecute(Sender: TObject);
protected
FPresupuestos: IBizPresupuestoCliente;
@@ -391,6 +395,24 @@ begin
end;
end;
+procedure TfEditorPresupuestosCliente.actVerProcesoCompletoExecute(
+ Sender: TObject);
+begin
+ inherited;
+ if not VerProcesoCompletoDeLosPedidosDelPresupuesto(FPresupuestos.ID) then
+ showmessage('El presupuesto no tiene pedidos relacionados, por lo que no se puede consultar el listado de documentos relacionados en el proceso del pedido del cliente');
+end;
+
+procedure TfEditorPresupuestosCliente.actVerProcesoCompletoUpdate(
+ Sender: TObject);
+begin
+ inherited;
+ (Sender as TAction).Enabled := HayDatos
+ and not (ViewGrid.NumSeleccionados > 1)
+ and ViewGrid.esSeleccionCeldaDatos
+ and (FPresupuestos.SITUACION = SITUACION_PRESUPUESTO_ACEPTADO);
+end;
+
procedure TfEditorPresupuestosCliente.AsignarVista;
begin
ViewGrid := CreateView(TfrViewPresupuestosCliente) as IViewPresupuestosCliente;
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
index 6c7641f..90b900b 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
@@ -136,7 +136,9 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
object cxGridViewFACTURA_PROFORMA: TcxGridDBColumn
Caption = 'Ref. factura proforma'
DataBinding.FieldName = 'FACTURA_PROFORMA'
+ Visible = False
BestFitMaxWidth = 25
+ VisibleForCustomization = False
Width = 25
end
end
diff --git a/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.dfm b/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.dfm
index 28a7234..1461c77 100644
--- a/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.dfm
+++ b/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.dfm
@@ -1,9 +1,11 @@
inherited fEditorProcesoPresupuestosCliente: TfEditorProcesoPresupuestosCliente
- Caption = 'fEditorProcesoPresupuestosCliente'
+ Caption = 'Listado de documentos relacionados con un pedido de cliente'
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
- Caption = 'Listado de proceso completo de presupuesto de cliente'
+ Caption =
+ 'Listado de documentos relacionados en un proceso completo de ped' +
+ 'ido de cliente'
end
inherited TBXDock: TTBXDock
inherited tbxMain: TTBXToolbar
@@ -39,6 +41,13 @@ inherited fEditorProcesoPresupuestosCliente: TfEditorProcesoPresupuestosCliente
Height = 255
ExplicitWidth = 894
ExplicitHeight = 255
+ inherited cxGridView: TcxGridDBTableView
+ inherited cxGridViewREFERENCIA_PRESUPUESTO: TcxGridDBColumn
+ PropertiesClassName = 'TcxTextEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
+ end
+ end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 894
diff --git a/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.pas b/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.pas
index aa8a911..5fa63d7 100644
--- a/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.pas
+++ b/Source/Modulos/ProcesoPresupuestoCliente/Views/uEditorProcesoPresupuestosCliente.pas
@@ -52,6 +52,7 @@ type
property FacturasProforma: IBizFacturaProforma read GetFacturasProforma write SetFacturasProforma;
property FacturasCliente: IBizFacturaCliente read GetFacturasCliente write SetFacturasCliente;
+ procedure PonerTitulos(const ATitulo: string = ''); override;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
@@ -155,6 +156,12 @@ begin
Result := FPedidosProveedor;
end;
+procedure TfEditorProcesoPresupuestosCliente.PonerTitulos(
+ const ATitulo: string);
+begin
+// inherited; Para que no borre el caption
+end;
+
procedure TfEditorProcesoPresupuestosCliente.SetAlbaranesCliente(const Value: IBizAlbaranCliente);
begin
FAlbaranesCliente := Value;
diff --git a/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.dfm b/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.dfm
index 182215b..cf3465c 100644
--- a/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.dfm
+++ b/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.dfm
@@ -28,6 +28,13 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewFECHA_PEDIDO: TcxGridDBColumn
Caption = 'Fecha del pedido'
DataBinding.FieldName = 'FECHA_PEDIDO'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
+ end
+ object cxGridViewREFERENCIA_PRESUPUESTO: TcxGridDBColumn
+ Caption = 'Ref. presupuesto'
+ DataBinding.FieldName = 'REFERENCIA_PRESUPUESTO'
end
end
object cxGridViewPedidosProveedor: TcxGridDBTableView [1]
@@ -72,6 +79,9 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewPedidosProveedorFECHA_PEDIDO: TcxGridDBColumn
Caption = 'Fecha del pedido'
DataBinding.FieldName = 'FECHA_PEDIDO'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
end
end
object cxGridViewAlbaranesProveedor: TcxGridDBTableView [2]
@@ -112,6 +122,9 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewAlbaranesProveedorFECHA_ALBARAN: TcxGridDBColumn
Caption = 'Fecha de albar'#225'n'
DataBinding.FieldName = 'FECHA_ALBARAN'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
end
end
object cxGridViewFacturasProveedor: TcxGridDBTableView [3]
@@ -156,6 +169,9 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewFacturasProveedorFECHA_FACTURA: TcxGridDBColumn
Caption = 'Fecha factura'
DataBinding.FieldName = 'FECHA_FACTURA'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
end
end
object cxGridViewAlbaranesCliente: TcxGridDBTableView [4]
@@ -196,6 +212,9 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewAlbaranesClienteFECHA_ALBARAN: TcxGridDBColumn
Caption = 'Fecha albar'#225'n'
DataBinding.FieldName = 'FECHA_ALBARAN'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
end
end
object cxGridViewFacturasCliente: TcxGridDBTableView [5]
@@ -236,6 +255,9 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewFacturasClienteFECHA_FACTURA: TcxGridDBColumn
Caption = 'Fecha'
DataBinding.FieldName = 'FECHA_FACTURA'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
end
end
object cxGridViewFacturasProforma: TcxGridDBTableView [6]
@@ -276,13 +298,16 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
object cxGridViewFacturasProformaFECHA_FACTURA: TcxGridDBColumn
Caption = 'Fecha'
DataBinding.FieldName = 'FECHA_FACTURA'
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
end
end
inherited cxGridLevel: TcxGridLevel
Options.DetailFrameColor = cl3DLight
Options.DetailTabsPosition = dtpTop
object cxGridLevelPedidosProveedor: TcxGridLevel
- Caption = 'Documentos de Proveedor'
+ Caption = 'Pedidos/Albaranes/Facturas de Proveedor'
GridView = cxGridViewPedidosProveedor
object cxGridLevelAlbaranesProveedor: TcxGridLevel
GridView = cxGridViewAlbaranesProveedor
@@ -292,13 +317,13 @@ inherited frViewProcesoPresupuestosCliente: TfrViewProcesoPresupuestosCliente
end
end
object cxGridAlbaranesCliente: TcxGridLevel
- Caption = 'Documentos de Cliente'
+ Caption = 'Albaranes/Facturas de Cliente'
GridView = cxGridViewAlbaranesCliente
object cxGridFacturasCliente: TcxGridLevel
GridView = cxGridViewFacturasCliente
end
end
- object cxGridLevel1: TcxGridLevel
+ object cxGridFacturasProforma: TcxGridLevel
Caption = 'Facturas Proforma'
GridView = cxGridViewFacturasProforma
end
diff --git a/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.pas b/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.pas
index 50f9bfd..31ab88e 100644
--- a/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.pas
+++ b/Source/Modulos/ProcesoPresupuestoCliente/Views/uViewProcesoPresupuestosCliente.pas
@@ -14,7 +14,7 @@ uses
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
cxGrid, uBizPedidosCliente, uBizPedidosProveedor, uBizAlbaranesProveedor,
uBizFacturasProveedor, uBizAlbaranesCliente, uBizFacturasCliente, uBizFacturasProforma,
- Grids, DBGrids;
+ Grids, DBGrids, cxCalendar;
type
IViewListadoProcesoPedidoCliente = interface(IViewGrid)
@@ -85,9 +85,10 @@ type
dsFacturasProforma: TDADataSource;
cxGridViewFacturasProforma: TcxGridDBTableView;
cxGridViewFacturasProformaREFERENCIA: TcxGridDBColumn;
- cxGridLevel1: TcxGridLevel;
+ cxGridFacturasProforma: TcxGridLevel;
cxGridViewFacturasProformaSITUACION: TcxGridDBColumn;
cxGridViewFacturasProformaFECHA_FACTURA: TcxGridDBColumn;
+ cxGridViewREFERENCIA_PRESUPUESTO: TcxGridDBColumn;
procedure CustomViewShow(Sender: TObject);
protected
diff --git a/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas b/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas
index eadb88a..6b09d81 100644
--- a/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas
+++ b/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas
@@ -175,7 +175,7 @@ begin
FPagos := NIL;
FRecibosCompensados := Nil;
FreeAndNIL(FPagosLink);
- FreeAndNIL(FRecibosCompensadosLink);
+// FreeAndNIL(FRecibosCompensadosLink);
FSeleccionableInterface := NIL;
inherited;
end;
diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas b/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas
index 680037f..b407b55 100644
--- a/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas
+++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Pedidos de cliente/uGenerarPedidosCliUtils.pas
@@ -14,6 +14,8 @@ type
function GenerarPedidoCliPre(const IDPresupuesto : Integer) : Boolean; overload;
function GenerarPedidoCliPre(APresupuesto : IBizPresupuestoCliente) : Boolean; overload;
+ function VerProcesoCompletoDeLosPedidosDelPresupuesto(APresupuesto: Integer):Boolean;
+
implementation
{$R *.dfm}
@@ -33,6 +35,7 @@ var
AClientesController : IClientesController;
{ Métodos auxiliares }
+
procedure CopiarPresupuestoAPedido(APresupuesto: IBizPresupuestoCliente; APedido : IBizPedidoCliente);
begin
if not Assigned(APedido) then
@@ -47,7 +50,7 @@ begin
// El albarán tiene que venir ya abierto y posicionado donde hay que copiar
APedido.ID_PRESUPUESTO := APresupuesto.ID;
APedido.REFERENCIA_CLIENTE := APresupuesto.REFERENCIA_CLIENTE;
- APedido.TIPO_PEDIDO := APresupuesto.TIPO_PRESUPUESTO;
+ APedido.TIPO_PEDIDO := APresupuesto.TIPO_PRESUPUESTO;
APedido.IMPORTE_NETO := APresupuesto.IMPORTE_NETO;
APedido.IMPORTE_PORTE := APresupuesto.IMPORTE_PORTE;
APedido.DESCUENTO := APresupuesto.DESCUENTO;
@@ -61,7 +64,7 @@ begin
APresupuestosClienteController.RecuperarCliente(APresupuesto);
APedido.Cliente := APresupuesto.Cliente;
-
+
//Siempre cogeremos la primera direcci¢n del contacto para el envio
APedido.CALLE := APedido.Cliente.Direcciones.CALLE;
APedido.CODIGO_POSTAL := APedido.Cliente.Direcciones.CODIGO_POSTAL;
@@ -393,4 +396,16 @@ begin
end;
}
+function VerProcesoCompletoDeLosPedidosDelPresupuesto(APresupuesto: Integer):Boolean;
+begin
+ if not Assigned(APedidosClienteController) then
+ Inicializar;
+
+ Result := APedidosClienteController.VerProcesoCompleto(APresupuesto);
+
+ if Assigned(APedidosClienteController) then
+ Finalizar;
+end;
+
+
end.
diff --git a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas
index 782b1a1..66628f1 100644
--- a/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas
+++ b/Source/Modulos/Remesas de cliente/Views/uEditorRemesaCliente.pas
@@ -396,4 +396,3 @@ end;
end.
-
\ No newline at end of file
diff --git a/Source/Modulos/Remesas de proveedor/Controller/RemesasProveedor_controller.dproj b/Source/Modulos/Remesas de proveedor/Controller/RemesasProveedor_controller.dproj
index b2416dd..186c738 100644
--- a/Source/Modulos/Remesas de proveedor/Controller/RemesasProveedor_controller.dproj
+++ b/Source/Modulos/Remesas de proveedor/Controller/RemesasProveedor_controller.dproj
@@ -42,62 +42,23 @@
..\..\..\Lib;..\..\Lib
..\..\..\Lib;..\..\Lib
..\..\..\Lib;..\..\Lib
+ 3
Delphi.Personality
Package
-
- False
- True
- False
-
-
- True
- False
- False
-
-
- True
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 3082
- 1252
-
-
-
-
- 1.0.0.0
-
-
-
-
-
- 1.0.0.0
-
-
-
- RemesasProveedor_controller.dpk
-
-
+FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0RemesasProveedor_controller.dpk
MainSource
-
-
-
-
+
+
+
+
@@ -105,11 +66,10 @@
-
diff --git a/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas b/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas
index c5a7a38..2d78126 100644
--- a/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas
+++ b/Source/Modulos/Remesas de proveedor/Controller/uRemesasProveedorController.pas
@@ -233,28 +233,25 @@ begin
CreateEditor('EditorRemesaProveedor', IEditorRemesaProveedor, AEditor);
if Assigned(AEditor) then
- with (AEditor as IEditorRemesaProveedor) do
- begin
- try
- Controller := Self; //OJO ORDEN MUY IMPORTANTE
- RemesaProveedor := ARemesaProveedor;
+ try
+ AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
+ AEditor.RemesaProveedor := ARemesaProveedor;
- //MODO CONSULTAR
- if not EsModificable(ARemesaProveedor) then
- begin
- SetDataTableReadOnly(ARemesaProveedor.DataTable, True);
- ReadOnly := True;
- end;
-
- ShowModal;
-
- //MODO CONSULTAR (Se deja la tabla como estaba)
- if ReadOnly then
- SetDataTableReadOnly(ARemesaProveedor.DataTable, False);
- finally
- AEditor.Release;
- AEditor := NIL;
+ //MODO CONSULTAR
+ if not EsModificable(ARemesaProveedor) then
+ begin
+ SetDataTableReadOnly(ARemesaProveedor.DataTable, True);
+ AEditor.ReadOnly := True;
end;
+
+ AEditor.ShowModal;
+
+ //MODO CONSULTAR (Se deja la tabla como estaba)
+ if AEditor.ReadOnly then
+ SetDataTableReadOnly(ARemesaProveedor.DataTable, False);
+ finally
+ AEditor.Release;
+ AEditor := NIL;
end;
end;
@@ -461,8 +458,14 @@ begin
end;
procedure TRemesasProveedorController.RecuperarRecibos(ARemesaProveedor: IBizRemesaProveedor);
+var
+ ARecibos : IBizRecibosProveedor;
begin
- ARemesaProveedor.Recibos := RecibosProveedorController.BuscarRecibosRemesa(ARemesaProveedor.ID);
+ if not Assigned(ARemesaProveedor) then
+ raise Exception.Create ('ARemesaProveedor no asignada');
+
+ ARecibos := RecibosProveedorController.BuscarRecibosRemesa(ARemesaProveedor.ID);
+ ARemesaProveedor.Recibos := ARecibos;
end;
function TRemesasProveedorController.Existe(const ID: Integer): Boolean;
diff --git a/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj b/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj
index 0544c85..03dc2e6 100644
--- a/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj
+++ b/Source/Modulos/Remesas de proveedor/RemesasProveedor_Group.groupproj
@@ -9,7 +9,11 @@
+
+
+
+
@@ -85,15 +89,6 @@
-
-
-
-
-
-
-
-
-
@@ -103,6 +98,15 @@
+
+
+
+
+
+
+
+
+
@@ -121,14 +125,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Remesas de proveedor/Views/uEditorRemesaProveedor.dfm b/Source/Modulos/Remesas de proveedor/Views/uEditorRemesaProveedor.dfm
index 0247233..051b09f 100644
--- a/Source/Modulos/Remesas de proveedor/Views/uEditorRemesaProveedor.dfm
+++ b/Source/Modulos/Remesas de proveedor/Views/uEditorRemesaProveedor.dfm
@@ -8,7 +8,6 @@ inherited fEditorRemesaProveedor: TfEditorRemesaProveedor
ClientWidth = 690
Scaled = False
OnClose = CustomEditorClose
- ExplicitTop = -83
ExplicitWidth = 698
ExplicitHeight = 638
PixelsPerInch = 96
@@ -48,6 +47,8 @@ inherited fEditorRemesaProveedor: TfEditorRemesaProveedor
inherited lblDesbloquear: TcxLabel
Left = 592
ExplicitLeft = 592
+ AnchorX = 637
+ AnchorY = 14
end
end
inherited TBXDock: TTBXDock
@@ -237,8 +238,7 @@ inherited fEditorRemesaProveedor: TfEditorRemesaProveedor
item
Width = 200
end>
- ExplicitLeft = 8
- ExplicitTop = 597
+ ExplicitTop = 585
ExplicitWidth = 690
end
inline frViewTotales1: TfrViewTotales [4]
@@ -255,7 +255,7 @@ inherited fEditorRemesaProveedor: TfEditorRemesaProveedor
ParentFont = False
TabOrder = 4
ReadOnly = False
- ExplicitTop = 558
+ ExplicitTop = 539
ExplicitWidth = 690
ExplicitHeight = 46
inherited dxLayoutControl1: TdxLayoutControl
diff --git a/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu b/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu
index 699c169..c0601bb 100644
Binary files a/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu and b/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu differ
diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES
index 8f367b3..e317360 100644
Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index cb9f857..6e8edb3 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -3,6 +3,7 @@ program FactuGES_Server;
{#ROGEN:..\Servicios\FactuGES.rodl} // RemObjects: Careful, do not remove!
uses
+// ExceptionLog,
uROComInit,
uROComboService,
Forms,
@@ -156,8 +157,6 @@ uses
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
schUsuariosServer_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosServer_Intf.pas',
- schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
- schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
srvFacturasProforma_Impl in '..\Modulos\Facturas proforma\Servidor\srvFacturasProforma_Impl.pas' {srvFacturasProforma: TDataAbstractService},
uBizFacturasProformaServer in '..\Modulos\Facturas proforma\Model\uBizFacturasProformaServer.pas',
uRptFacturasProforma_Server in '..\Modulos\Facturas proforma\Reports\uRptFacturasProforma_Server.pas' {RptFacturasProforma: TDataModule},
@@ -171,7 +170,9 @@ uses
schTiposDocumentoClient_Intf in '..\Modulos\TiposDocumento\Model\schTiposDocumentoClient_Intf.pas',
schTiposDocumentoServer_Intf in '..\Modulos\TiposDocumento\Model\schTiposDocumentoServer_Intf.pas',
schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
- schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas';
+ schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
+ schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
+ schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index b2acc9d..9e222d7 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -22,7 +22,7 @@
7.0
3
..\..\Output\Debug\Servidor
- DEBUG;
+ DEBUG;EUREKALOG;EUREKALOG_VER6
True
True
True
@@ -48,18 +48,18 @@
-
TDARemoteService
+
-
TDataModule
+
-
TDataAbstractService
+
@@ -68,55 +68,55 @@
-
TDataModule
+
TDataModule
-
TDataAbstractService
+
-
TDataModule
+
TDataModule
-
TDataAbstractService
+
-
TDARemoteService
+
-
TDARemoteService
+
-
TDataModule
+
-
TDataAbstractService
+
@@ -126,153 +126,153 @@
-
TDataModule
+
-
TDataModule
+
-
TDARemoteService
+
-
TDataAbstractService
+
-
TDataModule
+
TDataModule
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDARemoteService
+
-
TDARemoteService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataModule
+
TDataModule
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
-
TDataModule
+
TDataModule
@@ -283,60 +283,60 @@
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
-
TDataModule
+
-
TDataAbstractService
+
@@ -347,63 +347,63 @@
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TDataAbstractService
+
-
TFrame
+
-
TFrame
+
-
TFrame
+
-
TForm
+
-
TFrame
+
-
TDARemoteService
+
-
TDataModule
+
@@ -423,7 +423,7 @@