diff --git a/Source/Base/Utiles/uDataTableUtils.pas b/Source/Base/Utiles/uDataTableUtils.pas
index 95a98dd3..9035c674 100644
--- a/Source/Base/Utiles/uDataTableUtils.pas
+++ b/Source/Base/Utiles/uDataTableUtils.pas
@@ -31,10 +31,12 @@ function CloneDataTable(const ASource : TDAMemDataTable;
procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable;
- Const WithPKKey: Boolean = False; Const WithFKKey: Boolean = False);
+ const WithPKKey: Boolean = False; const WithFKKey: Boolean = False;
+ const Insertar: Boolean = True);
+
procedure DuplicarRegistros(ASource : TDADataTable; ATarget : TDADataTable;
AModo : TModoDuplicarRegistros; APermitirRepetidos: Boolean = True;
- Const WithDeltas: Boolean = True; Const WithPKKey: Boolean = False; Const WithFKKey: Boolean = False);
+ const WithDeltas: Boolean = True; const WithPKKey: Boolean = False; const WithFKKey: Boolean = False);
procedure DeleteAllTable(const ADataTable : TDADataTable);
@@ -347,7 +349,7 @@ begin
end;
-procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; const WithPKKey: Boolean = False; const WithFKKey: Boolean = False);
+procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; const WithPKKey: Boolean = False; const WithFKKey: Boolean = False; const Insertar: Boolean = True);
var
i, j: Integer;
ATargetField: TDAField;
@@ -380,7 +382,11 @@ begin
else
ADetailFields := Nil;
- ATarget.Insert;
+ if Insertar then
+ ATarget.Insert
+ else
+ ATarget.Edit;
+
{ Hay que desactivar los eventos para que dejan de funcionar
las reglas de negocio y no nos interfieran en la copia
de valores de los campos. }
diff --git a/Source/Modulos/Contactos/Controller/uClientesController.pas b/Source/Modulos/Contactos/Controller/uClientesController.pas
index 9233b2de..c04a9ce0 100644
--- a/Source/Modulos/Contactos/Controller/uClientesController.pas
+++ b/Source/Modulos/Contactos/Controller/uClientesController.pas
@@ -107,19 +107,20 @@ begin
Result := NIL;
CreateEditor('EditorElegirClientes', IEditorElegirClientes, AEditor);
- try
- with AEditor do
- begin
- Contactos := AContactos;
- Controller := Self;
- MultiSelect := AMultiSelect;
- Mensaje := AMensaje;
- if IsPositiveResult(ShowModal) then
- Result := ContactosSeleccionados;
- Release;
+ if Assigned(AEditor) then
+ begin
+ try
+ AEditor.Contactos := AContactos;
+ AEditor.Controller := Self;
+ AEditor.MultiSelect := AMultiSelect;
+ AEditor.Mensaje := AMensaje;
+ if IsPositiveResult(AEditor.ShowModal) then
+ Result := AEditor.ContactosSeleccionados;
+ finally
+ AEditor.Release;
+ AEditor := NIL;
+ Application.ProcessMessages;
end;
- finally
- AEditor := NIL;
end;
end;
@@ -141,6 +142,7 @@ begin
finally
AEditor.Release;
AEditor := NIL;
+ Application.ProcessMessages;
end;
end;
end;
@@ -163,6 +165,7 @@ begin
finally
AEditor.Release;
AEditor := NIL;
+ Application.ProcessMessages;
end;
end;
end;
diff --git a/Source/Modulos/Contactos/Controller/uContactosController.pas b/Source/Modulos/Contactos/Controller/uContactosController.pas
index 2de0fd7e..24067f2f 100644
--- a/Source/Modulos/Contactos/Controller/uContactosController.pas
+++ b/Source/Modulos/Contactos/Controller/uContactosController.pas
@@ -269,8 +269,6 @@ end;
function TContactosController.ValidarContacto(AContacto: IBizContacto): Boolean;
begin
- Result := False;
-
if not Assigned(AContacto) then
raise Exception.Create ('Contacto no asignado');
diff --git a/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas b/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas
index 5877f5a3..d3fcf03d 100644
--- a/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas
+++ b/Source/Modulos/Contactos/Controller/uDireccionesContactoController.pas
@@ -10,7 +10,8 @@ uses
type
IDireccionesContactoController = interface(IControllerBase)
['{9B6CB172-F32C-414F-A0E2-99920CAF88FB}']
- procedure CopiarDireccionFiscal(AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir : Boolean = True);
+ procedure CopiarDireccionFiscal(AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir : Boolean = True);
+ procedure CopiarDireccion(ADireccionOrigen: IBizDireccionesContacto; ADireccionDestino: IBizDireccionesContacto; AAnadir : Boolean = True);
procedure Ver(ADireccion : IBizDireccionesContacto);
function Localizar(ADirecciones: IBizDireccionesContacto; const ID : Integer): Boolean;
function Nuevo : IBizDireccionesContacto;
@@ -21,9 +22,10 @@ type
FDataModule : IDataModuleContactos;
public
procedure CopiarDireccionFiscal(AContacto: IBizContacto; ADireccion: IBizDireccionesContacto; AAnadir : Boolean = True);
+ procedure CopiarDireccion(ADireccionOrigen: IBizDireccionesContacto; ADireccionDestino: IBizDireccionesContacto; AAnadir : Boolean = True);
procedure Ver(ADireccion : IBizDireccionesContacto);
function Localizar(ADirecciones: IBizDireccionesContacto; const ID : Integer): Boolean;
- function Nuevo : IBizDireccionesContacto;
+ function Nuevo : IBizDireccionesContacto;
constructor Create; override;
destructor Destroy; override;
end;
@@ -34,9 +36,24 @@ implementation
uses
uDataModuleContactos, schContactosClient_Intf, uIEditorDireccionContacto,
- uEditorRegistryUtils, cxControls;
+ uEditorRegistryUtils, cxControls, uDataTableUtils;
+procedure TDireccionesContactoController.CopiarDireccion(ADireccionOrigen,
+ ADireccionDestino: IBizDireccionesContacto; AAnadir: Boolean);
+begin
+ if not Assigned(ADireccionOrigen) then
+ raise Exception.Create ('Dirección de origen no asignada (CopiarDireccion)');
+
+ if not Assigned(ADireccionDestino) then
+ raise Exception.Create ('Dirección de destino no asignada (CopiarDireccion)');
+
+ ADireccionOrigen.Active := True;
+ ADireccionDestino.Active := True;
+
+ DuplicarRegistro(ADireccionOrigen.DataTable, ADireccionDestino.DataTable, True, True, AAnadir);
+end;
+
procedure TDireccionesContactoController.CopiarDireccionFiscal(
AContacto: IBizContacto; ADireccion: IBizDireccionesContacto;
AAnadir: Boolean);
@@ -46,7 +63,10 @@ begin
if not Assigned(ADireccion) then
raise Exception.Create ('Dirección no asignada (CopiarDireccionFiscal)');
-
+
+ AContacto.Active := True;
+ ADireccion.Active := True;
+
if AAnadir then
ADireccion.DataTable.Insert
else
@@ -54,12 +74,13 @@ begin
try
with ADireccion do
begin
- NOMBRE := 'Dirección de entrega';
+ NOMBRE := AContacto.NOMBRE;
CALLE := AContacto.CALLE;
POBLACION := AContacto.POBLACION;
PROVINCIA := AContacto.PROVINCIA;
CODIGO_POSTAL := AContacto.CODIGO_POSTAL;
TELEFONO := AContacto.TELEFONO_1;
+ MOVIL := AContacto.MOVIL_1;
EMAIL := AContacto.EMAIL_1;
end;
finally
diff --git a/Source/Modulos/Contactos/Controller/uEmpleadosController.pas b/Source/Modulos/Contactos/Controller/uEmpleadosController.pas
index 255e95bc..ae8341e8 100644
--- a/Source/Modulos/Contactos/Controller/uEmpleadosController.pas
+++ b/Source/Modulos/Contactos/Controller/uEmpleadosController.pas
@@ -255,12 +255,9 @@ begin
if Result then
begin
- if not (AContacto as IBizEmpleado).FECHA_BAJAIsNull
- and (Length((AContacto as IBizEmpleado).CAUSA_BAJA) = 0) then
- begin
- Result := False;
+ if not (AContacto as IBizEmpleado).FECHA_BAJAIsNull and
+ (Length((AContacto as IBizEmpleado).CAUSA_BAJA) = 0) then
raise Exception.Create('Debe indicar la causa de la baja del empleado.');
- end;
end;
end;
diff --git a/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas b/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas
index 6dd7daf3..43fcffb3 100644
--- a/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas
+++ b/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas
@@ -53,6 +53,9 @@ type
procedure actDirSocialExecute(Sender: TObject);
procedure actOtroExecute(Sender: TObject);
procedure actOtroUpdate(Sender: TObject);
+ private
+ procedure ColorearTextoDirSocial(AColor : TColor);
+ procedure ColorearTextoDirOtra(AColor : TColor);
protected
FDirecciones: IBizDireccionesContacto;
FContacto : IBizContacto;
@@ -77,7 +80,7 @@ implementation
{$R *.dfm}
uses
- uStringsUtils;
+ uStringsUtils, Variants, uDialogUtils;
{ TfEditorDireccionEntrega }
@@ -162,6 +165,7 @@ begin
begin
with Result do
begin
+ ID := FDirecciones.ID;
NOMBRE := FDirecciones.NOMBRE;
CALLE := FDirecciones.CALLE;
POBLACION := FDirecciones.POBLACION;
@@ -177,6 +181,7 @@ begin
else begin
with Result do
begin
+ DataTable.FieldByName('ID').AsVariant := Null;
NOMBRE := FContacto.NOMBRE;
CALLE := FContacto.CALLE;
POBLACION := FContacto.POBLACION;
@@ -204,6 +209,9 @@ begin
DBCtrlGrid1.Color := clWindow;
pnlDirSocial.Enabled := False;
pnlDirSocial.Color := clBtnFace;
+
+ ColorearTextoDirOtra(clWindowText);
+ ColorearTextoDirSocial(clGray);
end;
if (actDirSocial.Checked) then
@@ -212,9 +220,34 @@ begin
DBCtrlGrid1.Color := clBtnFace;
pnlDirSocial.Enabled := True;
pnlDirSocial.Color := clWindow;
+
+ ColorearTextoDirSocial(clWindowText);
+ ColorearTextoDirOtra(clGray);
end;
end;
+procedure TfEditorElegirDireccionEntrega.ColorearTextoDirOtra(AColor: TColor);
+begin
+ eNombre.Font.Color := AColor;
+ eCalle.Font.Color := AColor;
+ ePoblacion.Font.Color := AColor;
+ eProvincia.Font.Color := AColor;
+ eTelefono.Font.Color := AColor;
+ ePersonaContacto.Font.Color := AColor;
+ eCodigoPostal.Font.Color := AColor;
+end;
+
+procedure TfEditorElegirDireccionEntrega.ColorearTextoDirSocial(AColor: TColor);
+begin
+ DBText1.Font.Color := AColor;
+ DBText2.Font.Color := AColor;
+ DBText3.Font.Color := AColor;
+ DBText4.Font.Color := AColor;
+ DBText5.Font.Color := AColor;
+ DBText6.Font.Color := AColor;
+ DBText7.Font.Color := AColor;
+end;
+
procedure TfEditorElegirDireccionEntrega.SetContacto(const Value: IBizContacto);
begin
FContacto := Value;
diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas
index f0bd6e40..e51cc768 100644
--- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas
+++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas
@@ -46,8 +46,6 @@ type
function ExtraerSeleccionados(APresupuesto: IBizPresupuestoCliente) : IBizPresupuestoCliente;
function ElegirPresupuestos(APresupuesto: IBizPresupuestoCliente; AMensaje: String; AMultiSelect: Boolean): IBizPresupuestoCliente;
- procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto;
- APresupuesto: IBizPresupuestoCliente);
procedure QuitarDireccionEnvio(APresupuesto: IBizPresupuestoCliente);
procedure RecalcularImportes(APresupuesto : IBizPresupuestoCliente);
@@ -113,8 +111,6 @@ type
procedure VerTodos(APresupuestos: IBizPresupuestoCliente);
procedure VerDireccionEntrega(APresupuesto : IBizPresupuestoCliente);
function Duplicar(APresupuesto: IBizPresupuestoCliente): IBizPresupuestoCliente;
- procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto;
- APresupuesto: IBizPresupuestoCliente);
procedure QuitarDireccionEnvio(APresupuesto: IBizPresupuestoCliente);
function ExtraerSeleccionados(APresupuesto: IBizPresupuestoCliente) : IBizPresupuestoCliente;
@@ -297,47 +293,6 @@ begin
end;
end;
-procedure TPresupuestosClienteController.CopiarDireccionEnvio(
- const ADireccionEnvio: IBizDireccionesContacto; APresupuesto: IBizPresupuestoCliente);
-{var
- bEnEdicion : Boolean;}
-begin
-{
- if not Assigned(APresupuesto) then
- raise Exception.Create ('Presupuesto no asignado (CopiarDireccionEnvio)');
-
- if not Assigned(ADireccionEnvio) then
- raise Exception.Create ('No se ha indicado la dirección (CopiarDireccionEnvio)');
-
- if APresupuesto.DataTable.Active then
- APresupuesto.DataTable.Active := True;
-
- if ADireccionEnvio.DataTable.Active then
- ADireccionEnvio.DataTable.Active := True;
-
-
- bEnEdicion := (APresupuesto.DataTable.State in dsEditModes);
- if not bEnEdicion then
- APresupuesto.Edit;
-
- ShowHourglassCursor;
- APresupuesto.Edit;
- try
- APresupuesto.CALLE := ADireccionEnvio.CALLE;
- APresupuesto.POBLACION := ADireccionEnvio.POBLACION;
- APresupuesto.CODIGO_POSTAL := ADireccionEnvio.CODIGO_POSTAL;
- APresupuesto.PROVINCIA := ADireccionEnvio.PROVINCIA;
- APresupuesto.TELEFONO := ADireccionEnvio.TELEFONO;
- APresupuesto.PERSONA_CONTACTO := ADireccionEnvio.PERSONA_CONTACTO;
-
- if not bEnEdicion then
- APresupuesto.Post;
- finally
- HideHourglassCursor;
- end;
-}
-end;
-
constructor TPresupuestosClienteController.Create;
begin
inherited;
diff --git a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
index 52bc1f7c..a02b1877 100644
--- a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
@@ -92,6 +92,10 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_NOMBRE'
end
+ item
+ Name = 'ID_DIRECCION'
+ DataType = datInteger
+ end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
index bc675ffe..959511f7 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_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_PresupuestosCliente = '{1477AFCF-F38F-4C8E-B16A-F50F1C2169E4}';
- RID_PresupuestosCliente_Detalles = '{750706FF-951F-4152-B683-2BC96C124A4C}';
+ RID_PresupuestosCliente = '{A0C46F24-09A9-4D39-B820-60B5E53322DC}';
+ RID_PresupuestosCliente_Detalles = '{6BDA3BE4-1300-42EA-B8C1-F26A414F492B}';
{ Data table names }
nme_PresupuestosCliente = 'PresupuestosCliente';
@@ -27,6 +27,7 @@ const
fld_PresupuestosClienteID_CLIENTE = 'ID_CLIENTE';
fld_PresupuestosClienteNIF_CIF = 'NIF_CIF';
fld_PresupuestosClienteNOMBRE = 'NOMBRE';
+ fld_PresupuestosClienteID_DIRECCION = 'ID_DIRECCION';
fld_PresupuestosClienteREFERENCIA_CLIENTE = 'REFERENCIA_CLIENTE';
fld_PresupuestosClienteCLIENTE_FINAL = 'CLIENTE_FINAL';
fld_PresupuestosClientePORTADA = 'PORTADA';
@@ -61,28 +62,29 @@ const
idx_PresupuestosClienteID_CLIENTE = 7;
idx_PresupuestosClienteNIF_CIF = 8;
idx_PresupuestosClienteNOMBRE = 9;
- idx_PresupuestosClienteREFERENCIA_CLIENTE = 10;
- idx_PresupuestosClienteCLIENTE_FINAL = 11;
- idx_PresupuestosClientePORTADA = 12;
- idx_PresupuestosClienteMEMORIA = 13;
- idx_PresupuestosClienteOBSERVACIONES = 14;
- idx_PresupuestosClienteINCIDENCIAS = 15;
- idx_PresupuestosClienteINCIDENCIAS_ACTIVAS = 16;
- idx_PresupuestosClienteFECHA_ALTA = 17;
- idx_PresupuestosClienteFECHA_MODIFICACION = 18;
- idx_PresupuestosClienteUSUARIO = 19;
- idx_PresupuestosClienteIMPORTE_NETO = 20;
- idx_PresupuestosClienteIMPORTE_PORTE = 21;
- idx_PresupuestosClienteDESCUENTO = 22;
- idx_PresupuestosClienteIMPORTE_DESCUENTO = 23;
- idx_PresupuestosClienteBASE_IMPONIBLE = 24;
- idx_PresupuestosClienteIVA = 25;
- idx_PresupuestosClienteIMPORTE_IVA = 26;
- idx_PresupuestosClienteIMPORTE_TOTAL = 27;
- idx_PresupuestosClienteID_FORMA_PAGO = 28;
- idx_PresupuestosClienteID_FACTURA = 29;
- idx_PresupuestosClienteFACTURA = 30;
- idx_PresupuestosClientePERSONA_CONTACTO = 31;
+ idx_PresupuestosClienteID_DIRECCION = 10;
+ idx_PresupuestosClienteREFERENCIA_CLIENTE = 11;
+ idx_PresupuestosClienteCLIENTE_FINAL = 12;
+ idx_PresupuestosClientePORTADA = 13;
+ idx_PresupuestosClienteMEMORIA = 14;
+ idx_PresupuestosClienteOBSERVACIONES = 15;
+ idx_PresupuestosClienteINCIDENCIAS = 16;
+ idx_PresupuestosClienteINCIDENCIAS_ACTIVAS = 17;
+ idx_PresupuestosClienteFECHA_ALTA = 18;
+ idx_PresupuestosClienteFECHA_MODIFICACION = 19;
+ idx_PresupuestosClienteUSUARIO = 20;
+ idx_PresupuestosClienteIMPORTE_NETO = 21;
+ idx_PresupuestosClienteIMPORTE_PORTE = 22;
+ idx_PresupuestosClienteDESCUENTO = 23;
+ idx_PresupuestosClienteIMPORTE_DESCUENTO = 24;
+ idx_PresupuestosClienteBASE_IMPONIBLE = 25;
+ idx_PresupuestosClienteIVA = 26;
+ idx_PresupuestosClienteIMPORTE_IVA = 27;
+ idx_PresupuestosClienteIMPORTE_TOTAL = 28;
+ idx_PresupuestosClienteID_FORMA_PAGO = 29;
+ idx_PresupuestosClienteID_FACTURA = 30;
+ idx_PresupuestosClienteFACTURA = 31;
+ idx_PresupuestosClientePERSONA_CONTACTO = 32;
{ PresupuestosCliente_Detalles fields }
fld_PresupuestosCliente_DetallesID = 'ID';
@@ -121,7 +123,7 @@ const
type
{ IPresupuestosCliente }
IPresupuestosCliente = interface(IDAStronglyTypedDataTable)
- ['{FD0CFF42-2DC5-478D-BEC2-170BA3E2A992}']
+ ['{BED574C7-BB23-4AF4-99E8-A57512A34442}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -163,6 +165,10 @@ type
procedure SetNOMBREValue(const aValue: String);
function GetNOMBREIsNull: Boolean;
procedure SetNOMBREIsNull(const aValue: Boolean);
+ function GetID_DIRECCIONValue: Integer;
+ procedure SetID_DIRECCIONValue(const aValue: Integer);
+ function GetID_DIRECCIONIsNull: Boolean;
+ procedure SetID_DIRECCIONIsNull(const aValue: Boolean);
function GetREFERENCIA_CLIENTEValue: String;
procedure SetREFERENCIA_CLIENTEValue(const aValue: String);
function GetREFERENCIA_CLIENTEIsNull: Boolean;
@@ -270,6 +276,8 @@ type
property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull;
+ property ID_DIRECCION: Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue;
+ property ID_DIRECCIONIsNull: Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull;
property REFERENCIA_CLIENTE: String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue;
property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull;
property CLIENTE_FINAL: String read GetCLIENTE_FINALValue write SetCLIENTE_FINALValue;
@@ -369,6 +377,10 @@ type
procedure SetNOMBREValue(const aValue: String); virtual;
function GetNOMBREIsNull: Boolean; virtual;
procedure SetNOMBREIsNull(const aValue: Boolean); virtual;
+ function GetID_DIRECCIONValue: Integer; virtual;
+ procedure SetID_DIRECCIONValue(const aValue: Integer); virtual;
+ function GetID_DIRECCIONIsNull: Boolean; virtual;
+ procedure SetID_DIRECCIONIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_CLIENTEValue: String; virtual;
procedure SetREFERENCIA_CLIENTEValue(const aValue: String); virtual;
function GetREFERENCIA_CLIENTEIsNull: Boolean; virtual;
@@ -475,6 +487,8 @@ type
property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull;
+ property ID_DIRECCION: Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue;
+ property ID_DIRECCIONIsNull: Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull;
property REFERENCIA_CLIENTE: String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue;
property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull;
property CLIENTE_FINAL: String read GetCLIENTE_FINALValue write SetCLIENTE_FINALValue;
@@ -528,7 +542,7 @@ type
{ IPresupuestosCliente_Detalles }
IPresupuestosCliente_Detalles = interface(IDAStronglyTypedDataTable)
- ['{7EA81F15-BEA7-4E6A-9141-ED27C69439FE}']
+ ['{9B9C28F6-E2A6-49BB-A539-82586ADEB234}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -992,6 +1006,27 @@ begin
DataTable.Fields[idx_PresupuestosClienteNOMBRE].AsVariant := Null;
end;
+function TPresupuestosClienteDataTableRules.GetID_DIRECCIONValue: Integer;
+begin
+ result := DataTable.Fields[idx_PresupuestosClienteID_DIRECCION].AsInteger;
+end;
+
+procedure TPresupuestosClienteDataTableRules.SetID_DIRECCIONValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_PresupuestosClienteID_DIRECCION].AsInteger := aValue;
+end;
+
+function TPresupuestosClienteDataTableRules.GetID_DIRECCIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PresupuestosClienteID_DIRECCION].IsNull;
+end;
+
+procedure TPresupuestosClienteDataTableRules.SetID_DIRECCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PresupuestosClienteID_DIRECCION].AsVariant := Null;
+end;
+
function TPresupuestosClienteDataTableRules.GetREFERENCIA_CLIENTEValue: String;
begin
result := DataTable.Fields[idx_PresupuestosClienteREFERENCIA_CLIENTE].AsString;
diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
index 5af7acf9..f81d1137 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_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_PresupuestosClienteDelta = '{46A71D84-5EDC-4232-A77B-63A5AB0B0254}';
- RID_PresupuestosCliente_DetallesDelta = '{9E7172B6-B04C-45B7-B8E5-4D7EA47AF466}';
+ RID_PresupuestosClienteDelta = '{C9E347B5-FCED-413B-AD2F-A17871A5FF7C}';
+ RID_PresupuestosCliente_DetallesDelta = '{10BCC39C-D3B8-4B20-85AF-78E1739C9BB7}';
type
{ IPresupuestosClienteDelta }
IPresupuestosClienteDelta = interface(IPresupuestosCliente)
- ['{46A71D84-5EDC-4232-A77B-63A5AB0B0254}']
+ ['{C9E347B5-FCED-413B-AD2F-A17871A5FF7C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -27,6 +27,7 @@ type
function GetOldID_CLIENTEValue : Integer;
function GetOldNIF_CIFValue : String;
function GetOldNOMBREValue : String;
+ function GetOldID_DIRECCIONValue : Integer;
function GetOldREFERENCIA_CLIENTEValue : String;
function GetOldCLIENTE_FINALValue : String;
function GetOldPORTADAValue : IROStrings;
@@ -61,6 +62,7 @@ type
property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue;
property OldNIF_CIF : String read GetOldNIF_CIFValue;
property OldNOMBRE : String read GetOldNOMBREValue;
+ property OldID_DIRECCION : Integer read GetOldID_DIRECCIONValue;
property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue;
property OldCLIENTE_FINAL : String read GetOldCLIENTE_FINALValue;
property OldPORTADA : IROStrings read GetOldPORTADAValue;
@@ -158,6 +160,12 @@ type
function GetOldNOMBREIsNull: Boolean; virtual;
procedure SetNOMBREValue(const aValue: String); virtual;
procedure SetNOMBREIsNull(const aValue: Boolean); virtual;
+ function GetID_DIRECCIONValue: Integer; virtual;
+ function GetID_DIRECCIONIsNull: Boolean; virtual;
+ function GetOldID_DIRECCIONValue: Integer; virtual;
+ function GetOldID_DIRECCIONIsNull: Boolean; virtual;
+ procedure SetID_DIRECCIONValue(const aValue: Integer); virtual;
+ procedure SetID_DIRECCIONIsNull(const aValue: Boolean); virtual;
function GetREFERENCIA_CLIENTEValue: String; virtual;
function GetREFERENCIA_CLIENTEIsNull: Boolean; virtual;
function GetOldREFERENCIA_CLIENTEValue: String; virtual;
@@ -328,6 +336,10 @@ type
property NOMBREIsNull : Boolean read GetNOMBREIsNull write SetNOMBREIsNull;
property OldNOMBRE : String read GetOldNOMBREValue;
property OldNOMBREIsNull : Boolean read GetOldNOMBREIsNull;
+ property ID_DIRECCION : Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue;
+ property ID_DIRECCIONIsNull : Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull;
+ property OldID_DIRECCION : Integer read GetOldID_DIRECCIONValue;
+ property OldID_DIRECCIONIsNull : Boolean read GetOldID_DIRECCIONIsNull;
property REFERENCIA_CLIENTE : String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue;
property REFERENCIA_CLIENTEIsNull : Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull;
property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue;
@@ -425,7 +437,7 @@ type
{ IPresupuestosCliente_DetallesDelta }
IPresupuestosCliente_DetallesDelta = interface(IPresupuestosCliente_Detalles)
- ['{9E7172B6-B04C-45B7-B8E5-4D7EA47AF466}']
+ ['{10BCC39C-D3B8-4B20-85AF-78E1739C9BB7}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_PRESUPUESTOValue : Integer;
@@ -989,6 +1001,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNOMBRE] := Null;
end;
+function TPresupuestosClienteBusinessProcessorRules.GetID_DIRECCIONValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_DIRECCION];
+end;
+
+function TPresupuestosClienteBusinessProcessorRules.GetID_DIRECCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_DIRECCION]);
+end;
+
+function TPresupuestosClienteBusinessProcessorRules.GetOldID_DIRECCIONValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteID_DIRECCION];
+end;
+
+function TPresupuestosClienteBusinessProcessorRules.GetOldID_DIRECCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteID_DIRECCION]);
+end;
+
+procedure TPresupuestosClienteBusinessProcessorRules.SetID_DIRECCIONValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_DIRECCION] := aValue;
+end;
+
+procedure TPresupuestosClienteBusinessProcessorRules.SetID_DIRECCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_DIRECCION] := Null;
+end;
+
function TPresupuestosClienteBusinessProcessorRules.GetREFERENCIA_CLIENTEValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteREFERENCIA_CLIENTE];
diff --git a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
index 9ba5c689..6d4eddf4 100644
--- a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
@@ -148,6 +148,10 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
item
DatasetField = 'PERSONA_CONTACTO'
TableField = 'PERSONA_CONTACTO'
+ end
+ item
+ DatasetField = 'ID_DIRECCION'
+ TableField = 'ID_DIRECCION'
end>
end>
Name = 'PresupuestosCliente'
@@ -211,6 +215,10 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_NOMBRE'
end
+ item
+ Name = 'ID_DIRECCION'
+ DataType = datInteger
+ end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
@@ -631,19 +639,20 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
SQL =
'INSERT'#10' INTO PRESUPUESTOS_CLIENTE'#10' (ID, ID_EMPRESA, FECHA_PR' +
'ESUPUESTO, FECHA_DECISION, REFERENCIA,'#10' REFERENCIA_AUX, SITU' +
- 'ACION, ID_CLIENTE, REFERENCIA_CLIENTE,'#10' CLIENTE_FINAL, PORTA' +
- 'DA, MEMORIA, OBSERVACIONES, INCIDENCIAS, '#10' INCIDENCIAS_ACTIV' +
- 'AS, FECHA_ALTA, FECHA_MODIFICACION, '#10' USUARIO, IMPORTE_NETO,' +
- ' IMPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' BASE_IMPONIB' +
- 'LE, IVA, IMPORTE_IVA, IMPORTE_TOTAL, ID_FORMA_PAGO, ID_FACTURA,'#10 +
- ' PERSONA_CONTACTO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :FECHA_PR' +
- 'ESUPUESTO, :FECHA_DECISION, :REFERENCIA,'#10' :REFERENCIA_AUX, :' +
- 'SITUACION, :ID_CLIENTE, :REFERENCIA_CLIENTE,'#10' :CLIENTE_FINAL' +
- ', :PORTADA, :MEMORIA, :OBSERVACIONES, '#10' :INCIDENCIAS, :INCID' +
- 'ENCIAS_ACTIVAS, :FECHA_ALTA, :FECHA_MODIFICACION, '#10' :USUARIO' +
- ', :IMPORTE_NETO, :IMPORTE_PORTE, :DESCUENTO, '#10' :IMPORTE_DESC' +
- 'UENTO, :BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, '#10' :IMPORTE_TOTAL' +
- ', :ID_FORMA_PAGO, :ID_FACTURA, :PERSONA_CONTACTO)'#10
+ 'ACION, ID_CLIENTE, ID_DIRECCION, REFERENCIA_CLIENTE,'#10' CLIENT' +
+ 'E_FINAL, PORTADA, MEMORIA, OBSERVACIONES, INCIDENCIAS, '#10' INC' +
+ 'IDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_MODIFICACION, '#10' USUARIO,' +
+ ' IMPORTE_NETO, IMPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' ' +
+ ' BASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_TOTAL, ID_FORMA_PAGO' +
+ ', ID_FACTURA,'#10' PERSONA_CONTACTO)'#10' VALUES'#10' (:ID, :ID_EMPR' +
+ 'ESA, :FECHA_PRESUPUESTO, :FECHA_DECISION, :REFERENCIA,'#10' :REF' +
+ 'ERENCIA_AUX, :SITUACION, :ID_CLIENTE, :ID_DIRECCION, :REFERENCIA' +
+ '_CLIENTE,'#10' :CLIENTE_FINAL, :PORTADA, :MEMORIA, :OBSERVACIONE' +
+ 'S, '#10' :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, :FECHA_ALTA, :FECHA' +
+ '_MODIFICACION, '#10' :USUARIO, :IMPORTE_NETO, :IMPORTE_PORTE, :D' +
+ 'ESCUENTO, '#10' :IMPORTE_DESCUENTO, :BASE_IMPONIBLE, :IVA, :IMPO' +
+ 'RTE_IVA, '#10' :IMPORTE_TOTAL, :ID_FORMA_PAGO, :ID_FACTURA, :PER' +
+ 'SONA_CONTACTO)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -801,19 +810,19 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
'= :ID_EMPRESA, '#10' FECHA_PRESUPUESTO = :FECHA_PRESUPUESTO, '#10' ' +
' FECHA_DECISION = :FECHA_DECISION, '#10' REFERENCIA = :REFERENCIA' +
', '#10' REFERENCIA_AUX = :REFERENCIA_AUX,'#10' SITUACION = :SITUAC' +
- 'ION, '#10' ID_CLIENTE = :ID_CLIENTE, '#10' REFERENCIA_CLIENTE = :R' +
- 'EFERENCIA_CLIENTE,'#10' CLIENTE_FINAL = :CLIENTE_FINAL, '#10' PORT' +
- 'ADA = :PORTADA, '#10' MEMORIA = :MEMORIA, '#10' OBSERVACIONES = :O' +
- 'BSERVACIONES, '#10' INCIDENCIAS = :INCIDENCIAS, '#10' INCIDENCIAS_' +
- 'ACTIVAS = :INCIDENCIAS_ACTIVAS, '#10' FECHA_ALTA = :FECHA_ALTA, '#10 +
- ' FECHA_MODIFICACION = :FECHA_MODIFICACION, '#10' USUARIO = :US' +
- 'UARIO, '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPORTE_PORTE = :' +
- 'IMPORTE_PORTE, '#10' DESCUENTO = :DESCUENTO, '#10' IMPORTE_DESCUEN' +
- 'TO = :IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE = :BASE_IMPONIBLE, ' +
- #10' IVA = :IVA, '#10' IMPORTE_IVA = :IMPORTE_IVA, '#10' IMPORTE_T' +
- 'OTAL = :IMPORTE_TOTAL, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' ' +
- 'ID_FACTURA = :ID_FACTURA,'#10' PERSONA_CONTACTO = :PERSONA_CONTAC' +
- 'TO'#10' WHERE'#10' (ID = :OLD_ID)'#10
+ 'ION, '#10' ID_CLIENTE = :ID_CLIENTE, '#10' ID_DIRECCION = :ID_DIRE' +
+ 'CCION,'#10' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE,'#10' CLIENTE' +
+ '_FINAL = :CLIENTE_FINAL, '#10' PORTADA = :PORTADA, '#10' MEMORIA =' +
+ ' :MEMORIA, '#10' OBSERVACIONES = :OBSERVACIONES, '#10' INCIDENCIAS' +
+ ' = :INCIDENCIAS, '#10' INCIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVAS' +
+ ', '#10' FECHA_ALTA = :FECHA_ALTA, '#10' FECHA_MODIFICACION = :FECH' +
+ 'A_MODIFICACION, '#10' USUARIO = :USUARIO, '#10' IMPORTE_NETO = :IM' +
+ 'PORTE_NETO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE, '#10' DESCUENTO ' +
+ '= :DESCUENTO, '#10' IMPORTE_DESCUENTO = :IMPORTE_DESCUENTO, '#10' ' +
+ 'BASE_IMPONIBLE = :BASE_IMPONIBLE, '#10' IVA = :IVA, '#10' IMPORTE_' +
+ 'IVA = :IMPORTE_IVA, '#10' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' ID' +
+ '_FORMA_PAGO = :ID_FORMA_PAGO,'#10' ID_FACTURA = :ID_FACTURA,'#10' ' +
+ 'PERSONA_CONTACTO = :PERSONA_CONTACTO'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
diff --git a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk
index be837499..cede3ed4 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk
+++ b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk
@@ -53,7 +53,19 @@ requires
vclactnband,
vclx,
dxLayoutControlD11,
- dxComnD11;
+ dxComnD11,
+ JvStdCtrlsD11R,
+ JclVcl,
+ Jcl,
+ JvCoreD11R,
+ JvSystemD11R,
+ JvCtrlsD11R,
+ GUISDK_D11,
+ xmlrtl,
+ cfpack_d11,
+ designide,
+ ccpackD11,
+ cxExtEditorsD11;
contains
uPresupuestosClienteViewRegister in 'uPresupuestosClienteViewRegister.pas',
@@ -67,8 +79,8 @@ contains
uEditorElegirArticulosPresupuestoCliente in 'uEditorElegirArticulosPresupuestoCliente.pas' {fEditorElegirArticulosPresupuestoCliente: TfEditorElegirArticulosPedidoCliente},
uEditorPresupuestosClienteReport in 'uEditorPresupuestosClienteReport.pas' {fEditorPresupuestosClientePreview: TfEditorPedidosClientePreview},
uViewDireccionEntregaPresupuestoCliente in 'uViewDireccionEntregaPresupuestoCliente.pas' {frViewDireccionEntregaPresupuestoCliente: TFrame},
- uEditorFechaDecision in 'uEditorFechaDecision.pas' {fEditorFechaDecision},
+ uEditorFechaDecision in 'uEditorFechaDecision.pas' {fEditorFechaDecision: T},
uViewDocumentosPresupuestoCliente in 'uViewDocumentosPresupuestoCliente.pas' {frViewDocumentosPresupuestoCliente: TFrame},
- uViewDatosClientePresupuesto in 'uViewDatosClientePresupuesto.pas' {frViewDatosClientePresupuesto: TFrame};
+ uViewDatosYSeleccionClientePresupuesto in 'uViewDatosYSeleccionClientePresupuesto.pas' {frViewDatosYSeleccionClientePresupuesto: TFrame};
end.
diff --git a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj
index 862c3ba5..a395df5b 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj
+++ b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj
@@ -49,30 +49,47 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TfEditorElegirArticulosPedidoCliente
@@ -83,6 +100,7 @@
+ T
@@ -97,8 +115,8 @@
TfEditorPedidosClientePreview
-
-
+
+
TFrame
@@ -125,11 +143,6 @@
TFrame
-
-
-
-
-