Arreglo de error al añadir una factura nueva y cerrar sin hacer nada
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@403 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
94344a883b
commit
6f9193f9dd
@ -6,6 +6,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
||||
ClientWidth = 860
|
||||
Position = poScreenCenter
|
||||
OnClose = CustomEditorClose
|
||||
ExplicitTop = -39
|
||||
ExplicitWidth = 868
|
||||
ExplicitHeight = 696
|
||||
PixelsPerInch = 96
|
||||
@ -81,7 +82,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
||||
inherited pgPaginas: TPageControl
|
||||
Width = 854
|
||||
Height = 368
|
||||
ActivePage = pagContabilidad
|
||||
OnChanging = pgPaginasChanging
|
||||
ExplicitTop = 109
|
||||
ExplicitWidth = 854
|
||||
@ -608,7 +608,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
||||
end
|
||||
inherited cbRecargoEquivalencia: TcxDBCheckBox
|
||||
Top = 138
|
||||
Properties.OnEditValueChanged = frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
|
||||
@ -38,11 +38,11 @@ type
|
||||
procedure frViewTotales1bTiposIVAClick(Sender: TObject);
|
||||
procedure frViewTotales1eIVAPropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(Sender: TObject);
|
||||
procedure frViewTotales1ePortePropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure frViewTotales1ePorteEditing(Sender: TObject; var CanEdit: Boolean);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); override; //Importante en este punto se deben de quitar los eventos que puedan afectar a la tabla una vez se cierre el editor.
|
||||
procedure OnRecargoEquivalenciaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||
var Error: Boolean); //Importante en este punto se deben de quitar los eventos que puedan afectar a la tabla una vez se cierre el editor.
|
||||
|
||||
private
|
||||
procedure RecalcularPortePorUnidad;
|
||||
@ -110,9 +110,12 @@ procedure TfEditorFacturaCliente.CustomEditorClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
inherited;
|
||||
dsDataTable.DataTable := NIL;
|
||||
frViewTotales1.DADataSource.DataTable := NIL;
|
||||
frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := nil;
|
||||
|
||||
Factura := NIL;
|
||||
FTiposIVA := NIL;
|
||||
|
||||
FTiposIVAController := Nil;
|
||||
FController := NIL;
|
||||
FViewFactura := NIL;
|
||||
@ -150,15 +153,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaCliente.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
frViewTotales1.cbRecargoEquivalencia.Properties.OnEditValueChanged := nil;
|
||||
frViewTotales1.eIVA.Properties.OnValidate := nil;
|
||||
frViewTotales1.ePorte.Properties.OnValidate := nil;
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaCliente.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
@ -169,6 +163,7 @@ begin
|
||||
if not Assigned(Factura) then
|
||||
raise Exception.Create('No hay ninguna factura asignada');
|
||||
|
||||
frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := OnRecargoEquivalenciaPropertiesValidate;
|
||||
Factura.DataTable.Active := True;
|
||||
end;
|
||||
|
||||
@ -192,21 +187,16 @@ begin
|
||||
FTiposIVAController.VerTodos(FTiposIVA);
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaCliente.frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
procedure TfEditorFacturaCliente.OnRecargoEquivalenciaPropertiesValidate(
|
||||
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||
var Error: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if assigned(Factura) then
|
||||
begin
|
||||
if not Factura.datatable.Editing then
|
||||
Factura.datatable.Edit;
|
||||
|
||||
if frViewTotales1.cbRecargoEquivalencia.Checked then
|
||||
Factura.RECARGO_EQUIVALENCIA := 1
|
||||
else
|
||||
Factura.RECARGO_EQUIVALENCIA := 0;
|
||||
end;
|
||||
if frViewTotales1.cbRecargoEquivalencia.Checked then
|
||||
Factura.RECARGO_EQUIVALENCIA := 1
|
||||
else
|
||||
Factura.RECARGO_EQUIVALENCIA := 0;
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaCliente.frViewTotales1edtDescuentoPropertiesValidate(
|
||||
@ -464,6 +454,7 @@ begin
|
||||
end
|
||||
else begin
|
||||
frViewFacturaCliente1.frViewClienteFactura1.OnClienteChanged := NIL;
|
||||
frViewFacturaCliente1.frViewClienteFactura1.Cliente := NIL;
|
||||
dsDataTable.DataTable := NIL;
|
||||
frViewTotales1.DADataSource.DataTable := NIL;
|
||||
frViewTotales1.dsTiposIVA.DataTable := NIL;
|
||||
|
||||
@ -590,7 +590,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
||||
end
|
||||
inherited cbRecargoEquivalencia: TcxDBCheckBox
|
||||
Top = 138
|
||||
Properties.OnEditValueChanged = frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
|
||||
@ -36,10 +36,12 @@ type
|
||||
procedure frViewTotales1bTiposIVAClick(Sender: TObject);
|
||||
procedure frViewTotales1eIVAPropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(Sender: TObject);
|
||||
procedure frViewTotales1ePortePropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure frViewTotales1ePorteEditing(Sender: TObject; var CanEdit: Boolean);
|
||||
procedure OnRecargoEquivalenciaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||
var Error: Boolean); //Importante en este punto se deben de quitar los eventos que puedan afectar a la tabla una vez se cierre el editor.
|
||||
|
||||
private
|
||||
procedure RecalcularPortePorUnidad;
|
||||
|
||||
@ -107,6 +109,7 @@ begin
|
||||
inherited;
|
||||
dsDataTable.DataTable := NIL;
|
||||
frViewTotales1.DADataSource.DataTable := NIL;
|
||||
frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := nil;
|
||||
|
||||
FTiposIVA := NIL;
|
||||
FTiposIVAController := Nil;
|
||||
@ -157,6 +160,7 @@ begin
|
||||
if not Assigned(Factura) then
|
||||
raise Exception.Create('No hay ninguna factura asignada');
|
||||
|
||||
frViewTotales1.cbRecargoEquivalencia.Properties.OnValidate := OnRecargoEquivalenciaPropertiesValidate;
|
||||
Factura.DataTable.Active := True;
|
||||
end;
|
||||
|
||||
@ -180,16 +184,6 @@ begin
|
||||
FTiposIVAController.VerTodos(FTiposIVA);
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaProveedor.frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
{ if frViewTotales1.cbRecargoEquivalencia.Checked then
|
||||
Factura.RECARGO_EQUIVALENCIA := 1
|
||||
else
|
||||
Factura.RECARGO_EQUIVALENCIA := 0;}
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaProveedor.frViewTotales1edtDescuentoPropertiesValidate(
|
||||
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||
var Error: Boolean);
|
||||
@ -340,6 +334,16 @@ begin
|
||||
FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Proveedor);
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaProveedor.OnRecargoEquivalenciaPropertiesValidate(
|
||||
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||
var Error: Boolean);
|
||||
begin
|
||||
if frViewTotales1.cbRecargoEquivalencia.Checked then
|
||||
Factura.RECARGO_EQUIVALENCIA := 1
|
||||
else
|
||||
Factura.RECARGO_EQUIVALENCIA := 0;
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaProveedor.pgPaginasChanging(Sender: TObject;
|
||||
var AllowChange: Boolean);
|
||||
var
|
||||
|
||||
Binary file not shown.
@ -16,7 +16,7 @@ BEGIN
|
||||
VALUE "FileVersion", "2.2.9.0\0"
|
||||
VALUE "ProductName", "FactuGES (Servidor)\0"
|
||||
VALUE "ProductVersion", "2.2.9.0\0"
|
||||
VALUE "CompileDate", "martes, 03 de marzo de 2009 16:40\0"
|
||||
VALUE "CompileDate", "martes, 03 de marzo de 2009 19:08\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user