unit uPluginControllerVentasTerminadas;

interface

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

type
  IMCVentasTerminadas = interface(IInterface)
    ['{D7C41472-C5C7-43C1-849F-2056CC98D9B1}']
  end;

  TModuleVentasTerminadas = class(TModuleController, IMCVentasTerminadas)
    actVentas: TAction;
    menu: TMenuItem;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    Ventas1: TMenuItem;
    SmallImages: TPngImageList;
    actResumenVentas: TAction;
    Resumenventasmensual1: TMenuItem;
    N1: TMenuItem;
    procedure actVentasExecute(Sender: TObject);
    procedure actResumenVentasExecute(Sender: TObject);
  public
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, uGUIBase, SysUtils, uDataModuleVentasTerminadas,
  uEditorControlesVentasTerminadas, uEditorControlResumenVentas,
  uBizControlVentasTerminadas, uBizVentasTerminadas, uEditorControlesBase;

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

exports
  GetModule name GET_MODULE_FUNC;

{
******************************* TModuleContactos *******************************
}

procedure TModuleVentasTerminadas.actVentasExecute(Sender: TObject);
var
  aControl: IBizControlVentasTerminadas;
  aObj: IEditorControlesVentasTerminadas;
begin
  aControl := dmVentasTerminadas.GetControl;
  aObj := TfEditorControlesVentasTerminadas.Create(Application);
  try
    with aObj do
    begin
      Control := aControl;
      ShowEmbedded;
    end;
  finally
    aControl := NIL;
    aObj := NIL;
  end;
end;

procedure TModuleVentasTerminadas.actResumenVentasExecute(Sender: TObject);
var
  aControl: IBizResumenVentas;
  aObj: IEditorControlResumenVentas;
begin
  aControl := dmVentasTerminadas.GetItemsCrossTab;
  aObj := TfEditorControlResumenVentas.Create(Application);
  try
    with aObj do
    begin
      Items := aControl;
      ShowEmbedded;
    end;
  finally
    aControl := NIL;
    aObj := NIL;
  end;
end;

initialization
  RegisterModuleClass(TModuleVentasTerminadas);

finalization
  UnRegisterModuleClass(TModuleVentasTerminadas);

end.
