Arreglo de copia de direcciones al seleccionar un cliente en la facturas de cliente.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@937 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
dabeed4f07
commit
a843c20577
@ -40,6 +40,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
inherited lblDesbloquear: TcxLabel
|
inherited lblDesbloquear: TcxLabel
|
||||||
Left = 687
|
Left = 687
|
||||||
ExplicitLeft = 687
|
ExplicitLeft = 687
|
||||||
|
AnchorX = 732
|
||||||
|
AnchorY = 14
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
@ -121,9 +123,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
284)
|
284)
|
||||||
inherited Label1: TLabel
|
inherited Label1: TLabel
|
||||||
Left = 378
|
Left = 378
|
||||||
Width = 311
|
|
||||||
ExplicitLeft = 378
|
ExplicitLeft = 378
|
||||||
ExplicitWidth = 311
|
|
||||||
end
|
end
|
||||||
inherited eReferencia: TcxDBTextEdit
|
inherited eReferencia: TcxDBTextEdit
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
@ -178,8 +178,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitLeft = 378
|
ExplicitLeft = 378
|
||||||
ExplicitWidth = 339
|
|
||||||
Width = 339
|
|
||||||
end
|
end
|
||||||
inherited bElegirClienteFinal: TButton
|
inherited bElegirClienteFinal: TButton
|
||||||
Left = 725
|
Left = 725
|
||||||
@ -187,18 +185,13 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
end
|
end
|
||||||
inherited frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente
|
inherited frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente
|
||||||
Left = 367
|
Left = 367
|
||||||
Width = 505
|
|
||||||
ExplicitLeft = 367
|
ExplicitLeft = 367
|
||||||
ExplicitWidth = 505
|
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
Width = 505
|
|
||||||
inherited edtlNombre: TcxDBTextEdit
|
inherited edtlNombre: TcxDBTextEdit
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 224
|
|
||||||
Width = 224
|
|
||||||
end
|
end
|
||||||
inherited edtNIFCIF: TcxDBTextEdit
|
inherited edtNIFCIF: TcxDBTextEdit
|
||||||
Left = 279
|
Left = 279
|
||||||
@ -217,8 +210,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 121
|
|
||||||
Width = 121
|
|
||||||
end
|
end
|
||||||
inherited Button4: TButton
|
inherited Button4: TButton
|
||||||
Left = 359
|
Left = 359
|
||||||
@ -231,8 +222,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 275
|
|
||||||
Width = 275
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -260,108 +249,102 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
|||||||
ExplicitHeight = 284
|
ExplicitHeight = 284
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 798
|
Width = 798
|
||||||
Height = 78
|
Height = 46
|
||||||
ExplicitWidth = 798
|
ExplicitWidth = 798
|
||||||
ExplicitHeight = 78
|
ExplicitHeight = 46
|
||||||
inherited ToolButton3: TToolButton
|
inherited ToolButton3: TToolButton
|
||||||
Wrap = False
|
Wrap = False
|
||||||
end
|
end
|
||||||
inherited ToolButton4: TToolButton
|
inherited ToolButton4: TToolButton
|
||||||
Left = 278
|
Left = 278
|
||||||
Top = 0
|
Top = 0
|
||||||
|
Wrap = True
|
||||||
ExplicitLeft = 278
|
ExplicitLeft = 278
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton14: TToolButton
|
inherited ToolButton14: TToolButton
|
||||||
Left = 334
|
Left = 0
|
||||||
Top = 0
|
|
||||||
Wrap = False
|
Wrap = False
|
||||||
ExplicitLeft = 334
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
end
|
||||||
inherited FontName: TJvFontComboBox
|
inherited FontName: TJvFontComboBox
|
||||||
Left = 399
|
Left = 65
|
||||||
Top = 0
|
Top = 22
|
||||||
ExplicitLeft = 399
|
ExplicitTop = 22
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton [6]
|
inherited FontSize: TEdit
|
||||||
Left = 0
|
Top = 22
|
||||||
Top = 0
|
|
||||||
Wrap = True
|
|
||||||
ExplicitLeft = 0
|
|
||||||
ExplicitTop = 0
|
|
||||||
ExplicitHeight = 27
|
|
||||||
end
|
|
||||||
inherited FontSize: TEdit [7]
|
|
||||||
Left = 0
|
|
||||||
Top = 27
|
|
||||||
Width = 248
|
Width = 248
|
||||||
ExplicitLeft = 0
|
ExplicitTop = 22
|
||||||
ExplicitTop = 27
|
|
||||||
ExplicitWidth = 248
|
ExplicitWidth = 248
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown [8]
|
inherited UpDown1: TUpDown
|
||||||
Left = 248
|
Left = 393
|
||||||
Top = 27
|
Top = 22
|
||||||
ExplicitLeft = 248
|
ExplicitLeft = 393
|
||||||
ExplicitTop = 27
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 410
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 410
|
||||||
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton6: TToolButton
|
||||||
Left = 265
|
Left = 418
|
||||||
Top = 27
|
Top = 22
|
||||||
ExplicitLeft = 265
|
ExplicitLeft = 418
|
||||||
ExplicitTop = 27
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
inherited ToolButton7: TToolButton
|
||||||
Left = 331
|
Left = 484
|
||||||
Top = 27
|
Top = 22
|
||||||
ExplicitLeft = 331
|
ExplicitLeft = 484
|
||||||
ExplicitTop = 27
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton8: TToolButton
|
inherited ToolButton8: TToolButton
|
||||||
Left = 398
|
Left = 551
|
||||||
Top = 27
|
Top = 22
|
||||||
ExplicitLeft = 398
|
ExplicitLeft = 551
|
||||||
ExplicitTop = 27
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton12: TToolButton
|
inherited ToolButton12: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 27
|
Top = 22
|
||||||
Wrap = True
|
Wrap = True
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 27
|
ExplicitTop = 22
|
||||||
ExplicitHeight = 27
|
ExplicitHeight = 27
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton
|
inherited ToolButton9: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 54
|
Top = 49
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 54
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton10: TToolButton
|
||||||
Left = 145
|
Left = 145
|
||||||
Top = 54
|
Top = 49
|
||||||
ExplicitLeft = 145
|
ExplicitLeft = 145
|
||||||
ExplicitTop = 54
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton11: TToolButton
|
inherited ToolButton11: TToolButton
|
||||||
Left = 270
|
Left = 270
|
||||||
Top = 54
|
Top = 49
|
||||||
ExplicitLeft = 270
|
ExplicitLeft = 270
|
||||||
ExplicitTop = 54
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Top = 104
|
Top = 99
|
||||||
Width = 798
|
Width = 798
|
||||||
Height = 180
|
Height = 185
|
||||||
ExplicitTop = 104
|
ExplicitTop = 104
|
||||||
ExplicitWidth = 798
|
ExplicitWidth = 798
|
||||||
ExplicitHeight = 180
|
ExplicitHeight = 180
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 78
|
Top = 73
|
||||||
Width = 798
|
Width = 798
|
||||||
ExplicitTop = 78
|
ExplicitTop = 78
|
||||||
ExplicitWidth = 798
|
ExplicitWidth = 798
|
||||||
|
|||||||
@ -333,10 +333,11 @@ begin
|
|||||||
else
|
else
|
||||||
Factura.RE := 0;
|
Factura.RE := 0;
|
||||||
|
|
||||||
|
//Desactivado porque en presupuestos no utilizan el catálogo de clientes
|
||||||
// Si la factura tiene detalles hay que mirar si los descuentos y otros campos
|
// Si la factura tiene detalles hay que mirar si los descuentos y otros campos
|
||||||
// para los artículos hay que cambiarlos.
|
// para los artículos hay que cambiarlos.
|
||||||
if (FFactura.Detalles.RecordCount > 0) then
|
// if (FFactura.Detalles.RecordCount > 0) then
|
||||||
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente);
|
// FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject;
|
procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject;
|
||||||
|
|||||||
@ -241,12 +241,11 @@ begin
|
|||||||
if Assigned(ADireccion) then
|
if Assigned(ADireccion) then
|
||||||
begin
|
begin
|
||||||
FDireccion := ADireccion;
|
FDireccion := ADireccion;
|
||||||
FFactura.Edit;
|
|
||||||
|
|
||||||
if FDireccion.IDIsNull then
|
// if FDireccion.IDIsNull then
|
||||||
LimpiarDireccionDeFactura
|
// LimpiarDireccionDeFactura
|
||||||
else
|
// else
|
||||||
CopiarDireccionAFactura;
|
CopiarDireccionAFactura;
|
||||||
|
|
||||||
EscribirTextoDireccion;
|
EscribirTextoDireccion;
|
||||||
end;
|
end;
|
||||||
@ -292,6 +291,11 @@ begin
|
|||||||
|
|
||||||
if not FCliente.DataTable.Active then
|
if not FCliente.DataTable.Active then
|
||||||
FCliente.DataTable.Active := True;
|
FCliente.DataTable.Active := True;
|
||||||
|
|
||||||
|
if FCliente.Direcciones.RecordCount > 0 then
|
||||||
|
ElegirDireccionCliente
|
||||||
|
else
|
||||||
|
RefrescarDireccion;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
dsCliente.DataTable := NIL;
|
dsCliente.DataTable := NIL;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
inherited frViewFacturaCliente: TfrViewFacturaCliente
|
inherited frViewFacturaCliente: TfrViewFacturaCliente
|
||||||
Width = 674
|
Width = 1146
|
||||||
Height = 407
|
Height = 511
|
||||||
Align = alClient
|
Align = alClient
|
||||||
OnCreate = CustomViewCreate
|
OnCreate = CustomViewCreate
|
||||||
OnDestroy = CustomViewDestroy
|
OnDestroy = CustomViewDestroy
|
||||||
@ -9,8 +9,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
object dxLayoutControl1: TdxLayoutControl
|
object dxLayoutControl1: TdxLayoutControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 674
|
Width = 1146
|
||||||
Height = 407
|
Height = 511
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentBackground = True
|
ParentBackground = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -20,10 +20,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
ExplicitWidth = 451
|
ExplicitWidth = 451
|
||||||
ExplicitHeight = 304
|
ExplicitHeight = 304
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
674
|
1146
|
||||||
407)
|
511)
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 373
|
Left = 617
|
||||||
Top = 193
|
Top = 193
|
||||||
Width = 311
|
Width = 311
|
||||||
Height = 26
|
Height = 26
|
||||||
@ -142,7 +142,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
Width = 269
|
Width = 269
|
||||||
end
|
end
|
||||||
object bFormasPago: TButton
|
object bFormasPago: TButton
|
||||||
Left = 191
|
Left = 435
|
||||||
Top = 103
|
Top = 103
|
||||||
Width = 132
|
Width = 132
|
||||||
Height = 23
|
Height = 23
|
||||||
@ -173,7 +173,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
Width = 165
|
Width = 165
|
||||||
end
|
end
|
||||||
object cbClienteFinal: TcxDBTextEdit
|
object cbClienteFinal: TcxDBTextEdit
|
||||||
Left = 373
|
Left = 617
|
||||||
Top = 227
|
Top = 227
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
DataBinding.DataField = 'CLIENTE_FINAL'
|
DataBinding.DataField = 'CLIENTE_FINAL'
|
||||||
@ -201,7 +201,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
Width = 339
|
Width = 339
|
||||||
end
|
end
|
||||||
object bElegirClienteFinal: TButton
|
object bElegirClienteFinal: TButton
|
||||||
Left = 618
|
Left = 1090
|
||||||
Top = 225
|
Top = 225
|
||||||
Width = 23
|
Width = 23
|
||||||
Height = 25
|
Height = 25
|
||||||
@ -209,7 +209,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
end
|
end
|
||||||
inline frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente
|
inline frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente
|
||||||
Left = 362
|
Left = 606
|
||||||
Top = 30
|
Top = 30
|
||||||
Width = 505
|
Width = 505
|
||||||
Height = 138
|
Height = 138
|
||||||
@ -221,40 +221,37 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitLeft = 362
|
ExplicitLeft = 606
|
||||||
ExplicitTop = 30
|
ExplicitTop = 30
|
||||||
inherited dxLayoutControl1: TdxLayoutControl
|
inherited dxLayoutControl1: TdxLayoutControl
|
||||||
|
ExplicitWidth = 101
|
||||||
inherited edtlNombre: TcxDBTextEdit
|
inherited edtlNombre: TcxDBTextEdit
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 224
|
|
||||||
Width = 224
|
|
||||||
end
|
end
|
||||||
inherited edtNIFCIF: TcxDBTextEdit
|
inherited edtNIFCIF: TcxDBTextEdit
|
||||||
Left = 177
|
Left = 405
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitLeft = 177
|
ExplicitLeft = 405
|
||||||
end
|
end
|
||||||
inherited Button3: TBitBtn
|
inherited Button3: TBitBtn
|
||||||
Left = 88
|
Left = 316
|
||||||
ExplicitLeft = 88
|
ExplicitLeft = 316
|
||||||
end
|
end
|
||||||
inherited edtDireccion: TcxTextEdit
|
inherited edtDireccion: TcxTextEdit
|
||||||
Style.LookAndFeel.SkinName = ''
|
Style.LookAndFeel.SkinName = ''
|
||||||
StyleDisabled.LookAndFeel.SkinName = ''
|
StyleDisabled.LookAndFeel.SkinName = ''
|
||||||
StyleFocused.LookAndFeel.SkinName = ''
|
StyleFocused.LookAndFeel.SkinName = ''
|
||||||
StyleHot.LookAndFeel.SkinName = ''
|
StyleHot.LookAndFeel.SkinName = ''
|
||||||
ExplicitWidth = 121
|
|
||||||
Width = 121
|
|
||||||
end
|
end
|
||||||
inherited Button4: TButton
|
inherited Button4: TButton
|
||||||
Left = 257
|
Left = 485
|
||||||
ExplicitLeft = 257
|
ExplicitLeft = 485
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited ActionList1: TActionList
|
inherited ActionList1: TActionList
|
||||||
|
|||||||
@ -249,8 +249,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
DADataSource.DataTable := FFactura.DataTable;
|
DADataSource.DataTable := FFactura.DataTable;
|
||||||
|
|
||||||
frViewDatosYSeleccionClienteFacturaCliente1.Factura := FFactura;
|
FViewClienteFactura.Factura := FFactura;
|
||||||
frViewDatosYSeleccionClienteFacturaCliente1.Cliente := FFactura.Cliente;
|
|
||||||
|
|
||||||
FFormasPago := FFormasPagoController.BuscarTodos;
|
FFormasPago := FFormasPagoController.BuscarTodos;
|
||||||
dsFormaPago.DataTable := FFormasPago.DataTable;
|
dsFormaPago.DataTable := FFormasPago.DataTable;
|
||||||
@ -276,8 +275,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
DADataSource.DataTable := NIL;
|
DADataSource.DataTable := NIL;
|
||||||
dsFormaPago.DataTable := NIL;
|
dsFormaPago.DataTable := NIL;
|
||||||
frViewDatosYSeleccionClienteFacturaCliente1.Factura := NIL;
|
FViewClienteFactura.Factura := NIL;
|
||||||
frViewDatosYSeleccionClienteFacturaCliente1.Cliente := NIL;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user