diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas index f64fe3cc..cfbcd938 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas @@ -317,7 +317,10 @@ begin if not FCliente.DataTable.Active then FCliente.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + + //Solo podremos establecer persona de contacto si se ha asignado un cliente + if FCliente.ID > 0 then + edtPersonaContacto.Enabled := True; if FCliente.Direcciones.RecordCount > 0 then ElegirDireccionCliente @@ -386,7 +389,10 @@ begin if not FCliente.DataTable.Active then FCliente.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + //Solo podremos establecer persona de contacto si se ha asignado un cliente + if FCliente.ID > 0 then + edtPersonaContacto.Enabled := True; + RefrescarDireccion; end else begin diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewDatosYSeleccionProveedorAlbaran.pas b/Source/Modulos/Albaranes de proveedor/Views/uViewDatosYSeleccionProveedorAlbaran.pas index 9bbc40bc..b06f7b6f 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewDatosYSeleccionProveedorAlbaran.pas +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewDatosYSeleccionProveedorAlbaran.pas @@ -318,7 +318,9 @@ begin if not FProveedor.DataTable.Active then FProveedor.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + //Solo podremos establecer persona de contacto si se ha asignado un proveedor + if FProveedor.ID > 0 then + edtPersonaContacto.Enabled := True; if FProveedor.Direcciones.RecordCount > 0 then ElegirDireccionProveedor @@ -387,7 +389,10 @@ begin if not FProveedor.DataTable.Active then FProveedor.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + //Solo podremos establecer persona de contacto si se ha asignado un proveedor + if FProveedor.ID > 0 then + edtPersonaContacto.Enabled := True; + RefrescarDireccion; end else begin diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDatosYSeleccionProveedorPedido.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewDatosYSeleccionProveedorPedido.pas index 828f7ea1..fda671a2 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uViewDatosYSeleccionProveedorPedido.pas +++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDatosYSeleccionProveedorPedido.pas @@ -325,7 +325,9 @@ begin if not FProveedor.DataTable.Active then FProveedor.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + //Solo podremos establecer persona de contacto si se ha asignado un proveedor + if FProveedor.ID > 0 then + edtPersonaContacto.Enabled := True; if FProveedor.Direcciones.RecordCount > 0 then ElegirDireccionProveedor @@ -394,7 +396,10 @@ begin if not FProveedor.DataTable.Active then FProveedor.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + //Solo podremos establecer persona de contacto si se ha asignado un proveedor + if FProveedor.ID > 0 then + edtPersonaContacto.Enabled := True; + RefrescarDireccion; end else begin diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas index c2e2e88f..9215a6cc 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas @@ -316,7 +316,10 @@ begin if not FCliente.DataTable.Active then FCliente.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + + //Solo podremos establecer persona de contacto si se ha asignado un cliente + if FCliente.ID > 0 then + edtPersonaContacto.Enabled := True; if FCliente.Direcciones.RecordCount > 0 then ElegirDireccionCliente @@ -385,7 +388,10 @@ begin if not FCliente.DataTable.Active then FCliente.DataTable.Active := True; - edtPersonaContacto.Enabled := True; + //Solo podremos establecer persona de contacto si se ha asignado un cliente + if FCliente.ID > 0 then + edtPersonaContacto.Enabled := True; + RefrescarDireccion; end else begin diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 563231df..b2953fc7 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index 9f99a564..3f995668 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -14,7 +14,7 @@ BEGIN BEGIN VALUE "FileVersion", "1.7.7.0\0" VALUE "ProductVersion", "1.7.7.0\0" - VALUE "CompileDate", "martes, 14 de julio de 2009 17:12\0" + VALUE "CompileDate", "martes, 04 de agosto de 2009 16:44\0" END END BLOCK "VarFileInfo"