diff --git a/Source/Informes/1/AlbaranCliente.rdx b/Source/Informes/1/AlbaranCliente.rdx index 3cc5f6e7..af8deeb7 100644 Binary files a/Source/Informes/1/AlbaranCliente.rdx and b/Source/Informes/1/AlbaranCliente.rdx differ diff --git a/Source/Informes/1/AlbaranProveedor.rdx b/Source/Informes/1/AlbaranProveedor.rdx index f1317eb2..191d2a53 100644 Binary files a/Source/Informes/1/AlbaranProveedor.rdx and b/Source/Informes/1/AlbaranProveedor.rdx differ diff --git a/Source/Informes/1/FacturaCliente.rdx b/Source/Informes/1/FacturaCliente.rdx index fcc69636..68664a5c 100644 Binary files a/Source/Informes/1/FacturaCliente.rdx and b/Source/Informes/1/FacturaCliente.rdx differ diff --git a/Source/Informes/1/InfAlbaranCliente.fr3 b/Source/Informes/1/InfAlbaranCliente.fr3 index ce5f912b..91c94916 100644 --- a/Source/Informes/1/InfAlbaranCliente.fr3 +++ b/Source/Informes/1/InfAlbaranCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/Source/Informes/1/InfAlbaranProveedor.fr3 b/Source/Informes/1/InfAlbaranProveedor.fr3 index fdcc953c..b5e568ff 100644 --- a/Source/Informes/1/InfAlbaranProveedor.fr3 +++ b/Source/Informes/1/InfAlbaranProveedor.fr3 @@ -1,8 +1,9 @@ - + + @@ -13,7 +14,6 @@ - diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index ad7063a0..0b17f560 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,8 +1,9 @@ - + + @@ -20,7 +21,6 @@ - @@ -70,7 +70,7 @@ - + diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3 index b019d6b4..e770ed67 100644 --- a/Source/Informes/1/InfPedidoProveedor.fr3 +++ b/Source/Informes/1/InfPedidoProveedor.fr3 @@ -1,8 +1,9 @@ - + + @@ -13,7 +14,6 @@ - diff --git a/Source/Informes/1/InfPresupuestoCliente.fr3 b/Source/Informes/1/InfPresupuestoCliente.fr3 index abcbb87f..e95a705c 100644 --- a/Source/Informes/1/InfPresupuestoCliente.fr3 +++ b/Source/Informes/1/InfPresupuestoCliente.fr3 @@ -1,12 +1,13 @@ - + + - - + + @@ -14,7 +15,6 @@ - @@ -23,13 +23,13 @@ + - @@ -42,6 +42,7 @@ + @@ -49,10 +50,9 @@ - - + @@ -70,7 +70,7 @@ - + diff --git a/Source/Informes/1/PedidoProveedor.rdx b/Source/Informes/1/PedidoProveedor.rdx index ce9002f1..26a68716 100644 Binary files a/Source/Informes/1/PedidoProveedor.rdx and b/Source/Informes/1/PedidoProveedor.rdx differ diff --git a/Source/Informes/1/Presupuesto.rdx b/Source/Informes/1/Presupuesto.rdx index db59654d..a2e76a10 100644 Binary files a/Source/Informes/1/Presupuesto.rdx and b/Source/Informes/1/Presupuesto.rdx differ diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas index 27f37726..b54e8188 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas @@ -322,13 +322,14 @@ begin if FCliente.ID > 0 then edtPersonaContacto.Enabled := True; -// if FCliente.Direcciones.RecordCount > 0 then -// ElegirDireccionCliente -// else begin -// FAlbaran.Edit; -// FAlbaran.PERSONA_CONTACTO := FCliente.PERSONA_CONTACTO; -// RefrescarDireccion; -// end; + if FCliente.Direcciones.RecordCount > 0 then + ElegirDireccionCliente + else begin + FAlbaran.Edit; + FAlbaran.PERSONA_CONTACTO := FCliente.PERSONA_CONTACTO; + FAlbaran.ID_DIRECCIONIsNull := True; //Limpiamos la direccion que pudiera tener el anterior cliente del documento si lo tuviere. + RefrescarDireccion; + end; end else begin dsCliente.DataTable := NIL; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas index cc242d21..7358ab59 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas @@ -131,6 +131,7 @@ procedure TfrViewDatosYSeleccionClienteFacturaCliente.actElegirDireccionExecute( begin inherited; ElegirDireccionCliente; + EscribirTextoDireccion; end; procedure TfrViewDatosYSeleccionClienteFacturaCliente.actElegirDireccionUpdate( @@ -214,6 +215,7 @@ procedure TfrViewDatosYSeleccionClienteFacturaCliente.edtDireccionPropertiesButt begin inherited; ElegirDireccionCliente; + EscribirTextoDireccion; end; procedure TfrViewDatosYSeleccionClienteFacturaCliente.ElegirCliente; @@ -238,13 +240,7 @@ begin if Assigned(ADireccion) then begin FDireccion := ADireccion; - -// if FDireccion.IDIsNull then -// LimpiarDireccionDeFactura -// else CopiarDireccionAFactura; - - EscribirTextoDireccion; end; end; @@ -285,9 +281,18 @@ begin FCliente.DataTable.Active := True; if FCliente.Direcciones.RecordCount > 0 then - ElegirDireccionCliente - else + begin + ElegirDireccionCliente; + EscribirTextoDireccion; + end + else begin + FFactura.Edit; + FFactura.ID_DIRECCIONIsNull := True; //Limpiamos la direccion que pudiera tener el anterior cliente del documento si lo tuviere. RefrescarDireccion; + CopiarDireccionAFactura; + EscribirTextoDireccion; + end; + end else begin dsCliente.DataTable := NIL; @@ -334,8 +339,6 @@ begin FDireccionesController.CopiarDireccion(FCliente.Direcciones, FDireccion) else FDireccionesController.CopiarDireccionFiscal(FCliente, FDireccion); - - EscribirTextoDireccion; end; procedure TfrViewDatosYSeleccionClienteFacturaCliente.SetOnClienteChanged( @@ -359,6 +362,7 @@ begin FCliente.DataTable.Active := True; RefrescarDireccion; + EscribirTextoDireccion; end else begin dsFactura.DataTable := NIL; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas index 9215a6cc..6656cf66 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewDatosYSeleccionClientePresupuesto.pas @@ -326,6 +326,7 @@ begin else begin FPresupuesto.Edit; FPresupuesto.PERSONA_CONTACTO := FCliente.PERSONA_CONTACTO; + FPresupuesto.ID_DIRECCIONIsNull := True; //Limpiamos la direccion que pudiera tener el anterior cliente del documento si lo tuviere. RefrescarDireccion; end; end