unit uDialogOpcionesImpresionFacturasCliente;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls;

type
  TfDialogOpcionesImpresionFacturasCliente = class(TfDialogBase)
    cbVerSello: TCheckBox;
    cbVerCopia: TCheckBox;
    procedure actAceptarExecute(Sender: TObject);
    procedure actCancelarExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  function ElegirOpcionesImpresionFacturaCliente(var AVerSello : Boolean; var AVerCopia : Boolean): Boolean;

implementation

{$R *.dfm}

function ElegirOpcionesImpresionFacturaCliente(var AVerSello : Boolean; var AVerCopia : Boolean): Boolean;
var
  AEditor : TfDialogOpcionesImpresionFacturasCliente;
begin
  AEditor := TfDialogOpcionesImpresionFacturasCliente.Create(NIL);
  try
    AEditor.cbVerSello.Checked := AVerSello;
    AEditor.cbVerCopia.Checked := AVerCopia;

    Result := (AEditor.ShowModal = mrOk);
    if Result then
    begin
      AVerSello := AEditor.cbVerSello.Checked;
      AVerCopia := AEditor.cbVerCopia.Checked;
    end;
  finally
    AEditor.Release;
  end;
end;

procedure TfDialogOpcionesImpresionFacturasCliente.actAceptarExecute(Sender: TObject);
begin
  inherited;
  ModalResult := mrOk
end;

procedure TfDialogOpcionesImpresionFacturasCliente.actCancelarExecute(Sender: TObject);
begin
  inherited;
  ModalResult := mrCancel;
end;

end.
