Se arregla editordbbase para que se de cuenta de los cambios del editor (setmodified), se adaptan tambien los editores para que no se pueda imprimir documentos hasta que no se añada el cliente.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@465 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
roberto 2009-11-23 19:29:41 +00:00
parent cac0a513bf
commit 949479f30e
20 changed files with 726 additions and 665 deletions

Binary file not shown.

View File

@ -33,7 +33,8 @@ type
procedure dsDataTableDataChange(Sender: TObject; Field: TField); procedure dsDataTableDataChange(Sender: TObject; Field: TField);
protected protected
function HayDatos: Boolean; function HayDatos: Boolean;
// function GetModified: Boolean; override; function PuedoImprimir: Boolean; virtual;
function GetModified: Boolean; override;
procedure RefrescarInterno; override; procedure RefrescarInterno; override;
procedure CancelarCambiosInterno; override; procedure CancelarCambiosInterno; override;
end; end;
@ -163,7 +164,7 @@ begin
and Assigned(dsDataTable.DataTable) then and Assigned(dsDataTable.DataTable) then
(Sender as TAction).Enabled := not dsDataTable.DataTable.ReadOnly; (Sender as TAction).Enabled := not dsDataTable.DataTable.ReadOnly;
end; end;
{
function TfEditorDBBase.GetModified: Boolean; function TfEditorDBBase.GetModified: Boolean;
begin begin
if ReadOnly then if ReadOnly then
@ -171,12 +172,17 @@ begin
else else
Result := DataTableModified(dsDataTable.DataTable) or inherited GetModified; Result := DataTableModified(dsDataTable.DataTable) or inherited GetModified;
end; end;
}
function TfEditorDBBase.HayDatos: Boolean; function TfEditorDBBase.HayDatos: Boolean;
begin begin
Result := Assigned(dsDataTable.DataTable) and (dsDataTable.DataTable.State <> dsInactive) Result := Assigned(dsDataTable.DataTable)
and (not dsDataTable.DataTable.IsEmpty); and (dsDataTable.DataTable.State <> dsInactive)
and (not dsDataTable.DataTable.IsEmpty);
end;
function TfEditorDBBase.PuedoImprimir: Boolean;
begin
Result := True;
end; end;
procedure TfEditorDBBase.RefrescarInterno; procedure TfEditorDBBase.RefrescarInterno;
@ -246,13 +252,13 @@ end;
procedure TfEditorDBBase.actPrevisualizarUpdate(Sender: TObject); procedure TfEditorDBBase.actPrevisualizarUpdate(Sender: TObject);
begin begin
inherited; inherited;
(Sender as TAction).Enabled := HayDatos; (Sender as TAction).Enabled := HayDatos and PuedoImprimir;
end; end;
procedure TfEditorDBBase.actImprimirUpdate(Sender: TObject); procedure TfEditorDBBase.actImprimirUpdate(Sender: TObject);
begin begin
inherited; inherited;
(Sender as TAction).Enabled := HayDatos; (Sender as TAction).Enabled := HayDatos and PuedoImprimir;
end; end;
initialization initialization

View File

@ -63,6 +63,8 @@ type
//Si queremos crear otra vista para el editor heredado solo tendriamos que //Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo //sobreescribir este metodo
procedure AsignarVista; virtual; procedure AsignarVista; virtual;
function PuedoImprimir: Boolean; override;
public public
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
@ -123,6 +125,11 @@ begin
inherited; inherited;
end; end;
function TfEditorAlbaranCliente.PuedoImprimir: Boolean;
begin
Result := inherited PuedoImprimir and (not Albaran.Cliente.IDIsNull);
end;
procedure TfEditorAlbaranCliente.EliminarInterno; procedure TfEditorAlbaranCliente.EliminarInterno;
begin begin
if (ShowConfirmMessage('¿Desea borrar este albarán de cliente?', '') = IDYES) then if (ShowConfirmMessage('¿Desea borrar este albarán de cliente?', '') = IDYES) then

View File

@ -118,7 +118,6 @@ end;
procedure TBizComisiones.OnNewRecord(Sender: TDADataTable); procedure TBizComisiones.OnNewRecord(Sender: TDADataTable);
begin begin
inherited; inherited;
// ID := GetRecNo; // -1, -2, -3...
IniciarValoresComisionLiquidacionNuevo; IniciarValoresComisionLiquidacionNuevo;
end; end;

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ type
procedure ImprimirInterno; override; procedure ImprimirInterno; override;
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
// function GetModified: Boolean; override; function GetModified: Boolean; override;
public public
property Comision: IBizComisiones read GetComision write SetComision; property Comision: IBizComisiones read GetComision write SetComision;
@ -93,7 +93,7 @@ function TfEditorComision.GetController: IComisionesController;
begin begin
Result := FController; Result := FController;
end; end;
{
function TfEditorComision.GetModified: Boolean; function TfEditorComision.GetModified: Boolean;
var var
bCambiado : Boolean; bCambiado : Boolean;
@ -101,10 +101,10 @@ begin
bCambiado := inherited GetModified; bCambiado := inherited GetModified;
//Si no hay cambios miramos que no los halla en la lista de recibos //Si no hay cambios miramos que no los halla en la lista de recibos
if not bCambiado then if not bCambiado then
bCambiado := frViewRecibosComision1.Modified; bCambiado := frViewFacturasComision1.Modified;
Result := bCambiado; Result := bCambiado;
end; end;
}
function TfEditorComision.GetViewComision: IViewComision; function TfEditorComision.GetViewComision: IViewComision;
begin begin
Result := FViewComision; Result := FViewComision;
@ -117,7 +117,7 @@ begin
inherited; inherited;
ShowHourglassCursor; ShowHourglassCursor;
// frViewRecibosComision1.OnViewModified := Nil; frViewFacturasComision1.OnViewModified := Nil;
//frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid //frViewDetallesFacturaCliente1.SaveGridStatus; // Para guardar estado del grid
frViewFacturasComision1.cxGrid.ActiveView.BeginUpdate; // Para que no se mueva el foco frViewFacturasComision1.cxGrid.ActiveView.BeginUpdate; // Para que no se mueva el foco
frViewVendedoresComision1.cxGrid.ActiveView.BeginUpdate; // Para que no se mueva el foco frViewVendedoresComision1.cxGrid.ActiveView.BeginUpdate; // Para que no se mueva el foco
@ -135,8 +135,8 @@ begin
if bEsNuevo then if bEsNuevo then
ShowInfoMessage('La liquidación de comisiones se ha dado de alta con el código ' + FComision.REFERENCIA); ShowInfoMessage('La liquidación de comisiones se ha dado de alta con el código ' + FComision.REFERENCIA);
Modified := False; Modified := False;
// frViewRecibosComision1.Modified := False; frViewFacturasComision1.Modified := False;
// frViewRecibosComision1.OnViewModified := OnRecibosChanged; // frViewFacturasComision1.OnViewModified := OnFacturasChanged;
end; end;
procedure TfEditorComision.ImprimirInterno; procedure TfEditorComision.ImprimirInterno;

View File

@ -1,14 +1,5 @@
inherited fEditorComisionesPreview: TfEditorComisionesPreview inherited fEditorComisionesPreview: TfEditorComisionesPreview
Caption = 'fEditorComisionesPreview' Caption = 'fEditorComisionesPreview'
ExplicitWidth = 954
ExplicitHeight = 543
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
ExplicitWidth = 946
end
inherited StatusBar: TJvStatusBar
ExplicitTop = 490
ExplicitWidth = 946
end
end end

View File

@ -89,6 +89,8 @@ type
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
function GetModified: Boolean; override; function GetModified: Boolean; override;
procedure SetModified(const Value : Boolean); override; procedure SetModified(const Value : Boolean); override;
function PuedoImprimir: Boolean; override;
public public
property Controller : IContratosClienteController read GetController write SetController; property Controller : IContratosClienteController read GetController write SetController;
@ -380,6 +382,11 @@ begin
frViewDocumentosContratoCliente1.Modified := Value; frViewDocumentosContratoCliente1.Modified := Value;
end; end;
function TfEditorContratoCliente.PuedoImprimir: Boolean;
begin
Result := inherited PuedoImprimir and (not Contrato.Cliente.IDIsNull);
end;
procedure TfEditorContratoCliente.SetContrato(const Value: IBizContratoCliente); procedure TfEditorContratoCliente.SetContrato(const Value: IBizContratoCliente);
begin begin
FContrato := Value; FContrato := Value;

View File

@ -77,6 +77,7 @@ type
function GetContrato: IBizContratoCliente; function GetContrato: IBizContratoCliente;
procedure SetContrato(const Value: IBizContratoCliente); virtual; procedure SetContrato(const Value: IBizContratoCliente); virtual;
function GetViewClienteContrato: IViewDatosYSeleccionClienteContrato; function GetViewClienteContrato: IViewDatosYSeleccionClienteContrato;
public public
property Contrato: IBizContratoCliente read GetContrato write SetContrato; property Contrato: IBizContratoCliente read GetContrato write SetContrato;
property ViewClienteContrato: IViewDatosYSeleccionClienteContrato read GetViewClienteContrato; property ViewClienteContrato: IViewDatosYSeleccionClienteContrato read GetViewClienteContrato;

View File

@ -146,6 +146,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 399
Width = 399
end end
end end
end end
@ -456,8 +458,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 457 Left = 457
Top = 30 Top = 30
Height = 122
ExplicitLeft = 457 ExplicitLeft = 457
ExplicitTop = 30 ExplicitTop = 30
ExplicitHeight = 122
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 569 Left = 569

View File

@ -71,6 +71,9 @@ type
procedure PrevisualizarInterno; override; procedure PrevisualizarInterno; override;
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
function PuedoImprimir: Boolean; override;
public public
destructor Destroy; override; destructor Destroy; override;
property Controller : IFacturasClienteController read GetController write SetController; property Controller : IFacturasClienteController read GetController write SetController;
@ -139,17 +142,20 @@ procedure TfEditorFacturaCliente.EliminarInterno;
var var
ACadena : String; ACadena : String;
begin begin
if Factura.TIPO = CTE_TIPO_FACTURA then if (Application.MessageBox('Atención, si elimina facturas/abonos de cliente podría producir huecos el la lista de facturas, ¿Desea continuar?', 'Atención', MB_YESNO) = IDYES) then
ACadena := '¿Desea borrar esta factura de cliente?'
else
ACadena := '¿Desea borrar este abono a cliente?';
if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then
begin begin
//Es el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones if Factura.TIPO = CTE_TIPO_FACTURA then
if not FController.Eliminar(Factura) then ACadena := '¿Desea borrar esta factura de cliente?'
Application.MessageBox('La factura no ha podido ser eliminada porque tiene recibos con pagos o devoluciones emitidas.', 'Atención', MB_OK); else
inherited; ACadena := '¿Desea borrar este abono a cliente?';
if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then
begin
//Es el caso de querer borrar una factura pendiente cuyos recibos tienen devoluciones
if not FController.Eliminar(Factura) then
Application.MessageBox('La factura no ha podido ser eliminada porque tiene recibos con pagos o devoluciones emitidas.', 'Atención', MB_OK);
inherited;
end;
end; end;
end; end;
@ -396,6 +402,11 @@ begin
Self.Caption := FTitulo + ' (' + AppFactuGES.EmpresaActiva.NOMBRE + ')'; Self.Caption := FTitulo + ' (' + AppFactuGES.EmpresaActiva.NOMBRE + ')';
end; end;
function TfEditorFacturaCliente.PuedoImprimir: Boolean;
begin
Result := inherited PuedoImprimir and (not Factura.Cliente.IDIsNull);
end;
procedure TfEditorFacturaCliente.PrevisualizarInterno; procedure TfEditorFacturaCliente.PrevisualizarInterno;
begin begin
inherited; inherited;

View File

@ -200,16 +200,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 263
Width = 263
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 367
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 = 367
ExplicitWidth = 263 ExplicitWidth = 263
Width = 263 Width = 263
end end

View File

@ -197,23 +197,24 @@ begin
if MultiSelect and Assigned(ViewGrid) then if MultiSelect and Assigned(ViewGrid) then
AllItems := (ViewGrid.NumSeleccionados > 1); AllItems := (ViewGrid.NumSeleccionados > 1);
if AllItems then if (Application.MessageBox('Atención, si elimina facturas/abonos de cliente podría producir huecos el la lista de facturas, ¿Desea continuar?', 'Atención', MB_YESNO) = IDYES) then
begin if AllItems then
if (Application.MessageBox('¿Desea borrar las facturas/abonos de cliente seleccionados?', 'Atención', MB_YESNO) = IDYES) then begin
begin if (Application.MessageBox('¿Desea borrar las facturas/abonos de cliente seleccionados?', 'Atención', MB_YESNO) = IDYES) then
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); begin
AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente; SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords);
end AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente;
end end
else begin end
if Facturas.TIPO = CTE_TIPO_FACTURA then else begin
ACadena := '¿Desea borrar esta factura de cliente?' if Facturas.TIPO = CTE_TIPO_FACTURA then
else ACadena := '¿Desea borrar esta factura de cliente?'
ACadena := '¿Desea borrar este abono a cliente?'; else
ACadena := '¿Desea borrar este abono a cliente?';
if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then
AFacturas := Facturas; AFacturas := Facturas;
end; end;
if Assigned(AFacturas) then if Assigned(AFacturas) then
begin begin

View File

@ -42,7 +42,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Width = 746 Width = 746
ExplicitWidth = 746 ExplicitWidth = 746
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 488 ExplicitWidth = 330
inherited TBXItem2: TTBXItem inherited TBXItem2: TTBXItem
Visible = False Visible = False
end end
@ -305,9 +305,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 732 Width = 732
ExplicitWidth = 732 ExplicitWidth = 732
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548
end
end end
end end
end end
@ -334,12 +331,20 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
ExplicitWidth = 732 ExplicitWidth = 732
inherited cbSubCuentas: TcxComboBox inherited cbSubCuentas: TcxComboBox
Left = 92 Left = 92
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 92 ExplicitLeft = 92
ExplicitWidth = 407 ExplicitWidth = 407
Width = 407 Width = 407
end end
inherited eContabilizar: TcxCheckBox inherited eContabilizar: TcxCheckBox
Left = 505 Left = 505
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 505 ExplicitLeft = 505
ExplicitWidth = 217 ExplicitWidth = 217
Width = 217 Width = 217
@ -391,7 +396,11 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
end end
inherited ImporteDto: TcxDBCurrencyEdit inherited ImporteDto: TcxDBCurrencyEdit
Top = 57 Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 207 ExplicitWidth = 207
Width = 207 Width = 207
@ -399,7 +408,11 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 581 Left = 581
Top = 77 Top = 77
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 581 ExplicitLeft = 581
ExplicitTop = 77 ExplicitTop = 77
ExplicitWidth = 143 ExplicitWidth = 143
@ -408,7 +421,11 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 511 Left = 511
Top = 131 Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 511 ExplicitLeft = 511
ExplicitTop = 131 ExplicitTop = 131
ExplicitWidth = 213 ExplicitWidth = 213
@ -417,20 +434,32 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited edtDescuento: TcxDBSpinEdit inherited edtDescuento: TcxDBSpinEdit
Top = 57 Top = 57
Properties.OnValidate = frViewTotales1edtDescuentoPropertiesValidate Properties.OnValidate = frViewTotales1edtDescuentoPropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57 ExplicitTop = 57
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 510 Left = 510
Top = 77 Top = 77
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 510 ExplicitLeft = 510
ExplicitTop = 77 ExplicitTop = 77
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 510 Left = 510
Top = 30 Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 510 ExplicitLeft = 510
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 214 ExplicitWidth = 214
@ -440,14 +469,22 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Left = 510 Left = 510
Top = 104 Top = 104
Properties.AssignedValues.MinValue = True Properties.AssignedValues.MinValue = True
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 510 ExplicitLeft = 510
ExplicitTop = 104 ExplicitTop = 104
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 581 Left = 581
Top = 104 Top = 104
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 581 ExplicitLeft = 581
ExplicitTop = 104 ExplicitTop = 104
ExplicitWidth = 143 ExplicitWidth = 143
@ -455,7 +492,11 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
end end
inherited eImporteNeto: TcxDBCurrencyEdit inherited eImporteNeto: TcxDBCurrencyEdit
Top = 30 Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 278 ExplicitWidth = 278
Width = 278 Width = 278
@ -464,7 +505,11 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Top = 84 Top = 84
DataBinding.DataSource = dsDataTable DataBinding.DataSource = dsDataTable
Properties.OnValidate = frViewTotales1ePortePropertiesValidate Properties.OnValidate = frViewTotales1ePortePropertiesValidate
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
OnEditing = frViewTotales1ePorteEditing OnEditing = frViewTotales1ePorteEditing
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 278 ExplicitWidth = 278
@ -474,6 +519,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Top = 111 Top = 111
Properties.OnValidate = frViewTotales1eIVAPropertiesValidate Properties.OnValidate = frViewTotales1eIVAPropertiesValidate
Style.Color = clInfoBk Style.Color = clInfoBk
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 111 ExplicitTop = 111
ExplicitWidth = 140 ExplicitWidth = 140
Width = 140 Width = 140
@ -487,6 +536,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 138 Top = 138
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 138 ExplicitTop = 138
ExplicitWidth = 278 ExplicitWidth = 278
Width = 278 Width = 278
@ -538,6 +591,14 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited EditorActionList: TActionList [9] inherited EditorActionList: TActionList [9]
Left = 8 Left = 8
Top = 144 Top = 144
inherited actPrevisualizar: TAction
Enabled = False
Visible = False
end
inherited actImprimir: TAction
Enabled = False
Visible = False
end
end end
inherited dsDataTable: TDADataSource [10] inherited dsDataTable: TDADataSource [10]
Left = 40 Left = 40

View File

@ -421,14 +421,14 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
Width = 848 Width = 848
ExplicitWidth = 848 ExplicitWidth = 848
inherited Bevel3: TBevel inherited Bevel3: TBevel
Left = 417 Left = 461
ExplicitLeft = 417 Height = 122
ExplicitLeft = 461
ExplicitHeight = 122
end end
inherited Bevel4: TBevel inherited Bevel4: TBevel
Left = 529 Left = 573
Width = 210 ExplicitLeft = 573
ExplicitLeft = 529
ExplicitWidth = 210
end end
inherited ImporteDto: TcxDBCurrencyEdit inherited ImporteDto: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
@ -436,30 +436,24 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 93
Width = 93
end end
inherited ImporteIVA: TcxDBCurrencyEdit inherited ImporteIVA: TcxDBCurrencyEdit
Left = 600 Left = 644
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 600 ExplicitLeft = 644
ExplicitWidth = 137
Width = 137
end end
inherited ImporteTotal: TcxDBCurrencyEdit inherited ImporteTotal: TcxDBCurrencyEdit
Left = 530 Left = 574
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 530 ExplicitLeft = 574
ExplicitWidth = 137
Width = 137
end end
inherited edtDescuento: TcxDBSpinEdit inherited edtDescuento: TcxDBSpinEdit
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
@ -469,44 +463,40 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
end end
inherited edtIVA: TcxDBSpinEdit inherited edtIVA: TcxDBSpinEdit
Left = 529 Left = 573
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 573
end end
inherited ImporteBase: TcxDBCurrencyEdit inherited ImporteBase: TcxDBCurrencyEdit
Left = 529 Left = 573
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 573
ExplicitWidth = 92
Width = 92
end end
inherited edtRE: TcxDBSpinEdit inherited edtRE: TcxDBSpinEdit
Left = 529 Left = 573
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 573
end end
inherited ImporteRE: TcxDBCurrencyEdit inherited ImporteRE: TcxDBCurrencyEdit
Left = 600 Left = 644
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 600 ExplicitLeft = 644
ExplicitWidth = 56
Width = 56
end end
inherited eImporteNeto: TcxDBCurrencyEdit inherited eImporteNeto: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
@ -514,8 +504,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 147
Width = 147
end end
inherited ePorte: TcxDBCurrencyEdit inherited ePorte: TcxDBCurrencyEdit
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
@ -523,8 +511,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 147
Width = 147
end end
inherited eIVA: TcxDBLookupComboBox inherited eIVA: TcxDBLookupComboBox
Properties.OnValidate = frViewTotales1eIVAPropertiesValidate Properties.OnValidate = frViewTotales1eIVAPropertiesValidate
@ -533,21 +519,17 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 81
Width = 81
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 269 Left = 313
OnClick = frViewTotales1bTiposIVAClick OnClick = frViewTotales1bTiposIVAClick
ExplicitLeft = 269 ExplicitLeft = 313
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
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 = 219
Width = 219
end end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup

View File

@ -90,6 +90,7 @@ type
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
function GetModified: Boolean; override; function GetModified: Boolean; override;
procedure SetModified(const Value : Boolean); override; procedure SetModified(const Value : Boolean); override;
function PuedoImprimir: Boolean; override;
public public
property Controller : IPresupuestosClienteController read GetController write SetController; property Controller : IPresupuestosClienteController read GetController write SetController;
@ -350,6 +351,11 @@ begin
FController.Preview(FPresupuesto); FController.Preview(FPresupuesto);
end; end;
function TfEditorPresupuestoCliente.PuedoImprimir: Boolean;
begin
Result := inherited PuedoImprimir and (not Presupuesto.Cliente.IDIsNull);
end;
procedure TfEditorPresupuestoCliente.RecalcularPortePorUnidad; procedure TfEditorPresupuestoCliente.RecalcularPortePorUnidad;
begin begin
//Esta lógica se llamará en el editor porque es para facilitar el rellenado de información del documento //Esta lógica se llamará en el editor porque es para facilitar el rellenado de información del documento

View File

@ -65,6 +65,7 @@ type
procedure PonerTitulos(const ATitulo: string = ''); override; procedure PonerTitulos(const ATitulo: string = ''); override;
procedure OnClienteChanged(Sender: TObject); procedure OnClienteChanged(Sender: TObject);
function PuedoImprimir: Boolean; override;
public public
property Recibo: IBizRecibosCliente read GetRecibo write SetRecibo; property Recibo: IBizRecibosCliente read GetRecibo write SetRecibo;
@ -142,6 +143,11 @@ begin
CalcularTotal; CalcularTotal;
end; end;
function TfEditorReciboCliente.PuedoImprimir: Boolean;
begin
Result := inherited PuedoImprimir and (not Recibo.Cliente.IDIsNull);
end;
procedure TfEditorReciboCliente.frViewPagosCliente1actAnadirExecute(Sender: TObject); procedure TfEditorReciboCliente.frViewPagosCliente1actAnadirExecute(Sender: TObject);
var var
AFechaPago: String; AFechaPago: String;

Binary file not shown.

View File

@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.3.9.0\0" VALUE "FileVersion", "2.3.9.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.3.9.0\0" VALUE "ProductVersion", "2.3.9.0\0"
VALUE "CompileDate", "viernes, 20 de noviembre de 2009 19:46\0" VALUE "CompileDate", "lunes, 23 de noviembre de 2009 20:01\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"