unit uPluginControllerFacturasCliente;

interface

uses
  uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
  ImgList, Controls, PngImageList;

type
  IMCFacturasCliente = interface(IInterface)
    ['{B4D89107-AD47-448F-B29B-68879BA722A0}']
  end;

  TModuleFacturasCliente = class(TModuleController, IMCFacturasCliente)
    actFacturasCliente: TAction;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    SmallImages: TPngImageList;
    Ventas1: TMenuItem;
    MenuItem2: TMenuItem;
    procedure actFacturasClienteExecute(Sender: TObject);
  public
  end;
  
implementation

{$R *.dfm}

uses
  Forms, Dialogs, uGUIBase, uCustomEditor, SysUtils, uBizFacturasCliente,
  uDataModuleFacturasCliente, uEditorFacturasCliente;

function GetModule : TModuleController;
begin
  Result := TModuleFacturasCliente.Create(NIL);
end;

exports
  GetModule name GET_MODULE_FUNC;

procedure TModuleFacturasCliente.actFacturasClienteExecute(Sender: TObject);
var
  aObj: IEditorFacturasCliente;
  AFacturasCliente : IBizFacturasCliente;
begin
  AFacturasCliente := dmFacturasCliente.GetItems;
  aObj := TfEditorFacturasCliente.Create(Application);
  try
    with aObj do
    begin
      FacturasCliente := AFacturasCliente;
      ShowEmbedded;
    end;
  finally
    AFacturasCliente := NIL;
    aObj := NIL;
  end;
end;

initialization
  RegisterModuleClass(TModuleFacturasCliente);

finalization
  UnRegisterModuleClass(TModuleFacturasCliente);

end.
