Se adapata a multiempresa sin migrar repaso total
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@335 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
a94bd81b86
commit
005ad1b637
BIN
Build/Build.fbl6
BIN
Build/Build.fbl6
Binary file not shown.
@ -30,6 +30,8 @@ type
|
||||
function BuscarFacturasDesglosadas(AFacturas: IBizFacturaCliente): IBizFacturasComision;
|
||||
// procedure QuitarExistentes(AFacturas: IBizFacturaCliente; AFacturasComision: IBizFacturasComision);
|
||||
|
||||
procedure FiltrarEmpresa(AComision: IBizComisiones);
|
||||
|
||||
protected
|
||||
FDataModule : IDataModuleComisiones;
|
||||
FFacturasClienteController: IFacturasClienteController;
|
||||
@ -219,6 +221,7 @@ end;
|
||||
function TComisionesController.BuscarTodos: IBizComisiones;
|
||||
begin
|
||||
Result := FDataModule.GetItems;
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
constructor TComisionesController.Create;
|
||||
@ -429,6 +432,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TComisionesController.FiltrarEmpresa(AComision: IBizComisiones);
|
||||
begin
|
||||
if AComision.DataTable.Active then
|
||||
AComision.DataTable.Active := False;
|
||||
|
||||
// Filtrar los recibos actuales por empresa
|
||||
with AComision.DataTable.Where do
|
||||
begin
|
||||
if NotEmpty then
|
||||
AddOperator(opAND);
|
||||
AddCondition(fld_ComisionesID_EMPRESA, cEqual, dmUsuarios.IDEmpresaActual);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TComisionesController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -342,6 +342,7 @@ object PluginEmpresas: TPluginEmpresas
|
||||
object actGestionEmpresas: TAction
|
||||
Category = 'Empresa'
|
||||
Caption = 'Gesti'#243'n de empresas'
|
||||
Enabled = False
|
||||
OnExecute = actGestionEmpresasExecute
|
||||
end
|
||||
object actSucursales: TAction
|
||||
|
||||
@ -8,11 +8,7 @@
|
||||
<Option Name="GUID">{31F77077-B4B9-443C-9AA9-F13B4EB640B4}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Default.Personality>
|
||||
|
||||
|
||||
|
||||
<Projects>
|
||||
<Default.Personality> <Projects>
|
||||
<Projects Name="Base.bpl">..\..\Base\Base.bdsproj</Projects>
|
||||
<Projects Name="ControllerBase.bpl">..\..\Base\ControllerBase\ControllerBase.bdsproj</Projects>
|
||||
<Projects Name="GUIBase.bpl">..\..\Base\GUIBase\GUIBase.bdsproj</Projects>
|
||||
@ -42,7 +38,12 @@
|
||||
<Projects Name="RecibosProveedor_view.bpl">..\Recibos de proveedor\Views\RecibosProveedor_view.bdsproj</Projects>
|
||||
<Projects Name="RemesasCliente_view.bpl">..\Remesas de cliente\Views\RemesasCliente_view.bdsproj</Projects>
|
||||
<Projects Name="RemesasProveedor_view.bpl">..\Remesas de proveedor\Views\RemesasProveedor_view.bdsproj</Projects>
|
||||
<Projects Name="Targets">Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_model.bpl Contactos_data.bpl Contactos_controller.bpl Articulos_model.bpl Articulos_data.bpl Articulos_controller.bpl Contactos_view.bpl Articulos_view.bpl FacturasCliente_model.bpl FacturasCliente_data.bpl FacturasCliente_controller.bpl AlbCli_FacCli_relation.bpl FacturasCliente_view.bpl FactuGES.exe FactuGES_Server.exe AlbaranesCliente_controller.bpl FacturasProveedor_view.bpl PedidosCliente_view.bpl PedidosCliente_controller.bpl AlbaranesCliente_view.bpl AlbaranesProveedor_view.bpl PedidosProveedor_view.bpl RecibosCliente_view.bpl RecibosProveedor_view.bpl RemesasCliente_view.bpl RemesasProveedor_view.bpl</Projects>
|
||||
<Projects Name="Referencias_model.bpl">..\Referencias\Model\Referencias_model.bdsproj</Projects>
|
||||
<Projects Name="Referencias_data.bpl">..\Referencias\Data\Referencias_data.bdsproj</Projects>
|
||||
<Projects Name="Referencias_controller.bpl">..\Referencias\Controller\Referencias_controller.bdsproj</Projects>
|
||||
<Projects Name="Referencias_view.bpl">..\Referencias\Views\Referencias_view.bdsproj</Projects>
|
||||
<Projects Name="Referencias_plugin.bpl">..\Referencias\Plugin\Referencias_plugin.bdsproj</Projects>
|
||||
<Projects Name="Targets">Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_model.bpl Contactos_data.bpl Contactos_controller.bpl Articulos_model.bpl Articulos_data.bpl Articulos_controller.bpl Contactos_view.bpl Articulos_view.bpl FacturasCliente_model.bpl FacturasCliente_data.bpl FacturasCliente_controller.bpl AlbCli_FacCli_relation.bpl FacturasCliente_view.bpl FactuGES.exe FactuGES_Server.exe AlbaranesCliente_controller.bpl FacturasProveedor_view.bpl PedidosCliente_view.bpl PedidosCliente_controller.bpl AlbaranesCliente_view.bpl AlbaranesProveedor_view.bpl PedidosProveedor_view.bpl RecibosCliente_view.bpl RecibosProveedor_view.bpl RemesasCliente_view.bpl RemesasProveedor_view.bpl Referencias_model.bpl Referencias_data.bpl Referencias_controller.bpl Referencias_view.bpl Referencias_plugin.bpl</Projects>
|
||||
</Projects>
|
||||
<Dependencies/>
|
||||
</Default.Personality>
|
||||
|
||||
@ -146,7 +146,7 @@ implementation
|
||||
uses
|
||||
uROTypes, Controls, cxControls, DB, uEditorRegistryUtils, uEditorPreview, DateUtils,
|
||||
uIEditorPedidosCliente, uDataModulePedidosCliente, Variants,
|
||||
uBizContactos, uDataTableUtils, uDataModuleUsuarios,
|
||||
uBizContactos, uDataTableUtils, uDataModuleUsuarios,
|
||||
schPedidosClienteClient_Intf, uDAInterfaces, uDateUtils, uIEditorPedidoCliente,
|
||||
uIEditorElegirPedidosCliente, uIEditorDireccionEntregaPedidoCliente,
|
||||
schContactosClient_Intf, uPedidosClienteReportController, uDataModuleRegistroCorreos,
|
||||
|
||||
@ -93,6 +93,8 @@ type
|
||||
function ImporteTotalModificado(ARecibosCliente: IBizRecibosCliente; var ImporteRestante: Currency): Boolean;
|
||||
procedure _AnadirMarcaEnvioCorreo(ARecibo: IBizRecibosCliente);
|
||||
|
||||
procedure FiltrarEmpresa(ARecibo: IBizRecibosCliente);
|
||||
|
||||
protected
|
||||
FDataModule : IDataModuleRecibosCliente;
|
||||
FPagosController : IPagosClienteController;
|
||||
@ -293,6 +295,7 @@ end;
|
||||
function TRecibosClienteController.BuscarTodos: IBizRecibosCliente;
|
||||
begin
|
||||
Result := FDataModule.GetItems;
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.BuscarRecibosACompensar(const Recibo: IBizRecibosCliente): IBizRecibosCliente;
|
||||
@ -351,6 +354,7 @@ end;
|
||||
function TRecibosClienteController.Buscar(const ID: Integer): IBizRecibosCliente;
|
||||
begin
|
||||
Result := (FDataModule as IDataModuleRecibosCliente).GetItem(ID);
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.BuscarRecibosFactura(const ID_FACTURA: Integer): IBizRecibosCliente;
|
||||
@ -952,6 +956,7 @@ var
|
||||
ARecibo : IBizRecibosCliente;
|
||||
begin
|
||||
ARecibo := Buscar(ID_NULO);
|
||||
FiltrarEmpresa(Result);
|
||||
ARecibo.DataTable.Active := True;
|
||||
Anadir(ARecibo);
|
||||
Result := ARecibo;
|
||||
@ -1035,6 +1040,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRecibosClienteController.FiltrarEmpresa(ARecibo: IBizRecibosCliente);
|
||||
begin
|
||||
if ARecibo.DataTable.Active then
|
||||
ARecibo.DataTable.Active := False;
|
||||
|
||||
// Filtrar los recibos actuales por empresa
|
||||
with ARecibo.DataTable.Where do
|
||||
begin
|
||||
if NotEmpty then
|
||||
AddOperator(opAND);
|
||||
AddCondition(fld_RecibosClienteID_EMPRESA, cEqual, dmUsuarios.IDEmpresaActual);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRecibosClienteController.Preview(ARecibosCliente: IBizRecibosCliente; AllItems: Boolean = false);
|
||||
var
|
||||
AReportController : IRecibosClienteReportController;
|
||||
|
||||
@ -80,6 +80,9 @@ type
|
||||
private
|
||||
function ImporteTotalModificado(ARecibosProveedor: IBizRecibosProveedor;
|
||||
var ImporteRestante: Currency): Boolean;
|
||||
|
||||
procedure FiltrarEmpresa(ARecibo: IBizRecibosProveedor);
|
||||
|
||||
protected
|
||||
FDataModule : IDataModuleRecibosProveedor;
|
||||
FPagosController : IPagosProveedorController;
|
||||
@ -258,6 +261,7 @@ end;
|
||||
function TRecibosProveedorController.BuscarTodos: IBizRecibosProveedor;
|
||||
begin
|
||||
Result := FDataModule.GetItems;
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
constructor TRecibosProveedorController.Create;
|
||||
@ -272,6 +276,7 @@ end;
|
||||
function TRecibosProveedorController.Buscar(const ID: Integer): IBizRecibosProveedor;
|
||||
begin
|
||||
Result := (FDataModule as IDataModuleRecibosProveedor).GetItem(ID);
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
function TRecibosProveedorController.BuscarRecibosFactura(const ID_FACTURA: Integer): IBizRecibosProveedor;
|
||||
@ -779,6 +784,7 @@ var
|
||||
ARecibo : IBizRecibosProveedor;
|
||||
begin
|
||||
ARecibo := Buscar(ID_NULO);
|
||||
FiltrarEmpresa(Result);
|
||||
ARecibo.DataTable.Active := True;
|
||||
Anadir(ARecibo);
|
||||
Result := ARecibo;
|
||||
@ -831,6 +837,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRecibosProveedorController.FiltrarEmpresa(ARecibo: IBizRecibosProveedor);
|
||||
begin
|
||||
if ARecibo.DataTable.Active then
|
||||
ARecibo.DataTable.Active := False;
|
||||
|
||||
// Filtrar los recibos actuales por empresa
|
||||
with ARecibo.DataTable.Where do
|
||||
begin
|
||||
if NotEmpty then
|
||||
AddOperator(opAND);
|
||||
AddCondition(fld_RecibosProveedorID_EMPRESA, cEqual, dmUsuarios.IDEmpresaActual);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRecibosProveedorController.Preview(ARecibosProveedor: IBizRecibosProveedor);
|
||||
var
|
||||
AReportController : IRecibosProveedorReportController;
|
||||
|
||||
@ -174,7 +174,7 @@
|
||||
</Delphi.Personality>
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
EurekaLog Version=519
|
||||
EurekaLog Version=6014
|
||||
Activate=0
|
||||
Activate Handle=1
|
||||
Save Log File=1
|
||||
@ -488,5 +488,190 @@ Count mtSend_SuccessMsg=1
|
||||
mtSend_SuccessMsg0="The message was sent successfully."
|
||||
Count mtSend_FailureMsg=1
|
||||
mtSend_FailureMsg0="Sorry, sending the message didn't work."
|
||||
ProxyURL=
|
||||
ProxyUser=
|
||||
ProxyPassword=
|
||||
ProxyPort=8080
|
||||
TrakerUser=
|
||||
TrakerPassword=
|
||||
TrakerAssignTo=
|
||||
TrakerProject=
|
||||
TrakerCategory=
|
||||
TrakerTrialID=
|
||||
ZipPassword=
|
||||
PreBuildEvent=
|
||||
PostSuccessfulBuildEvent=
|
||||
PostFailureBuildEvent=
|
||||
ExceptionDialogType=2
|
||||
loSaveModulesAndProcessesSections=1
|
||||
loSaveAssemblerAndCPUSections=1
|
||||
soAppUpTime=1
|
||||
soExcModuleName=1
|
||||
soExcModuleVersion=1
|
||||
soExcID=1
|
||||
soExcCount=1
|
||||
soExcStatus=1
|
||||
soExcNote=1
|
||||
soUserID=1
|
||||
soUserName=1
|
||||
soUserEmail=1
|
||||
soUserPrivileges=1
|
||||
soUserCompany=1
|
||||
soCmpDisplayDPI=1
|
||||
soCmpVideoCard=1
|
||||
soCmpPrinter=1
|
||||
soOSCharset=1
|
||||
soCustomData=1
|
||||
sndAddComputerNameInFileName=0
|
||||
edoSendErrorReportChecked=1
|
||||
edoShowSendErrorReportOption=1
|
||||
edoShowAttachScreenshotOption=1
|
||||
edoShowCustomButton=0
|
||||
csoDoNotStoreProcNames=0
|
||||
boHandleSafeCallExceptions=1
|
||||
boCallRTLExceptionEvent=0
|
||||
boCatchHandledExceptions=0
|
||||
loCatchLeaks=0
|
||||
loGroupsSonLeaks=1
|
||||
loHideBorlandLeaks=1
|
||||
loFreeAllLeaks=1
|
||||
loCatchLeaksExceptions=1
|
||||
cfoReduceFileSize=1
|
||||
cfoCheckFileCorruption=0
|
||||
Count mtErrorMsgCaption=1
|
||||
mtErrorMsgCaption0="Error."
|
||||
Count mtDialog_ProcessesCaption=1
|
||||
mtDialog_ProcessesCaption0="Processes"
|
||||
Count mtDialog_ProcessesHeader=1
|
||||
mtDialog_ProcessesHeader0="Processes Information"
|
||||
Count mtDialog_AsmCaption=1
|
||||
mtDialog_AsmCaption0="Assembler"
|
||||
Count mtDialog_AsmHeader=1
|
||||
mtDialog_AsmHeader0="Assembler Information"
|
||||
Count mtDialog_CustomButtonCaption=1
|
||||
mtDialog_CustomButtonCaption0="%26Help"
|
||||
Count mtMSDialog_ErrorMsgCaption=1
|
||||
mtMSDialog_ErrorMsgCaption0="The application has encountered a problem. We are sorry for the inconvenience."
|
||||
Count mtMSDialog_RestartCaption=1
|
||||
mtMSDialog_RestartCaption0="Restart application."
|
||||
Count mtMSDialog_TerminateCaption=1
|
||||
mtMSDialog_TerminateCaption0="Terminate application."
|
||||
Count mtMSDialog_PleaseCaption=1
|
||||
mtMSDialog_PleaseCaption0="Please tell us about this problem."
|
||||
Count mtMSDialog_DescriptionCaption=1
|
||||
mtMSDialog_DescriptionCaption0="We have created an error report that you can send to us. We will treat this report as confidential and anonymous."
|
||||
Count mtMSDialog_SeeDetailsCaption=1
|
||||
mtMSDialog_SeeDetailsCaption0="To see what data the error report contains,"
|
||||
Count mtMSDialog_SeeClickCaption=1
|
||||
mtMSDialog_SeeClickCaption0="click here."
|
||||
Count mtMSDialog_HowToReproduceCaption=1
|
||||
mtMSDialog_HowToReproduceCaption0="What were you doing when the problem happened (optional)?"
|
||||
Count mtMSDialog_EmailCaption=1
|
||||
mtMSDialog_EmailCaption0="Email address (optional):"
|
||||
Count mtMSDialog_SendButtonCaption=1
|
||||
mtMSDialog_SendButtonCaption0="%26Send Error Report"
|
||||
Count mtMSDialog_NoSendButtonCaption=1
|
||||
mtMSDialog_NoSendButtonCaption0="%26Don't Send"
|
||||
Count mtLog_AppUpTime=1
|
||||
mtLog_AppUpTime0="Up Time"
|
||||
Count mtLog_ExcModuleName=1
|
||||
mtLog_ExcModuleName0="Module Name"
|
||||
Count mtLog_ExcModuleVersion=1
|
||||
mtLog_ExcModuleVersion0="Module Version"
|
||||
Count mtLog_ExcID=1
|
||||
mtLog_ExcID0="ID"
|
||||
Count mtLog_ExcCount=1
|
||||
mtLog_ExcCount0="Count"
|
||||
Count mtLog_ExcStatus=1
|
||||
mtLog_ExcStatus0="Status"
|
||||
Count mtLog_ExcNote=1
|
||||
mtLog_ExcNote0="Note"
|
||||
Count mtLog_UserHeader=1
|
||||
mtLog_UserHeader0="User"
|
||||
Count mtLog_UserID=1
|
||||
mtLog_UserID0="ID"
|
||||
Count mtLog_UserName=1
|
||||
mtLog_UserName0="Name"
|
||||
Count mtLog_UserEmail=1
|
||||
mtLog_UserEmail0="Email"
|
||||
Count mtLog_UserCompany=1
|
||||
mtLog_UserCompany0="Company"
|
||||
Count mtLog_UserPrivileges=1
|
||||
mtLog_UserPrivileges0="Privileges"
|
||||
Count mtLog_CmpDisplayDPI=1
|
||||
mtLog_CmpDisplayDPI0="Display DPI"
|
||||
Count mtLog_CmpVideoCard=1
|
||||
mtLog_CmpVideoCard0="Video Card"
|
||||
Count mtLog_CmpPrinter=1
|
||||
mtLog_CmpPrinter0="Printer"
|
||||
Count mtLog_OSCharset=1
|
||||
mtLog_OSCharset0="Charset"
|
||||
Count mtCallStack_LeakCaption=1
|
||||
mtCallStack_LeakCaption0="Memory Leak"
|
||||
Count mtCallStack_LeakData=1
|
||||
mtCallStack_LeakData0="Data"
|
||||
Count mtCallStack_LeakType=1
|
||||
mtCallStack_LeakType0="Type"
|
||||
Count mtCallStack_LeakSize=1
|
||||
mtCallStack_LeakSize0="Total size"
|
||||
Count mtCallStack_LeakCount=1
|
||||
mtCallStack_LeakCount0="Count"
|
||||
Count mtSendDialog_Login=1
|
||||
mtSendDialog_Login0="Login..."
|
||||
Count mtSendDialog_Sent=1
|
||||
mtSendDialog_Sent0="Message sent."
|
||||
Count mtSendDialog_SelectProject=1
|
||||
mtSendDialog_SelectProject0="Select project..."
|
||||
Count mtSendDialog_Searching=1
|
||||
mtSendDialog_Searching0="Searching..."
|
||||
Count mtSendDialog_Modifying=1
|
||||
mtSendDialog_Modifying0="Modifying..."
|
||||
Count mtSendDialog_Disconnecting=1
|
||||
mtSendDialog_Disconnecting0="Disconnecting..."
|
||||
Count mtSendDialog_Disconnected=1
|
||||
mtSendDialog_Disconnected0="Disconnected."
|
||||
Count mtProcesses_ID=1
|
||||
mtProcesses_ID0="ID"
|
||||
Count mtProcesses_Name=1
|
||||
mtProcesses_Name0="Name"
|
||||
Count mtProcesses_Description=1
|
||||
mtProcesses_Description0="Description"
|
||||
Count mtProcesses_Version=1
|
||||
mtProcesses_Version0="Version"
|
||||
Count mtProcesses_Memory=1
|
||||
mtProcesses_Memory0="Memory"
|
||||
Count mtProcesses_Priority=1
|
||||
mtProcesses_Priority0="Priority"
|
||||
Count mtProcesses_Threads=1
|
||||
mtProcesses_Threads0="Threads"
|
||||
Count mtProcesses_Path=1
|
||||
mtProcesses_Path0="Path"
|
||||
Count mtSend_BugClosedMsg=2
|
||||
mtSend_BugClosedMsg0="These BUG is just closed."
|
||||
mtSend_BugClosedMsg1="Contact the program support to obtain an update."
|
||||
Count mtSend_UnknownErrorMsg=1
|
||||
mtSend_UnknownErrorMsg0="Unknown error."
|
||||
Count mtSend_InvalidLoginMsg=1
|
||||
mtSend_InvalidLoginMsg0="Invalid login request."
|
||||
Count mtSend_InvalidSearchMsg=1
|
||||
mtSend_InvalidSearchMsg0="Invalid search request."
|
||||
Count mtSend_InvalidSelectionMsg=1
|
||||
mtSend_InvalidSelectionMsg0="Invalid selection request."
|
||||
Count mtSend_InvalidInsertMsg=1
|
||||
mtSend_InvalidInsertMsg0="Invalid insert request."
|
||||
Count mtSend_InvalidModifyMsg=1
|
||||
mtSend_InvalidModifyMsg0="Invalid modify request."
|
||||
Count mtFileCrackedMsg=2
|
||||
mtFileCrackedMsg0="This file is cracked."
|
||||
mtFileCrackedMsg1="The application will be closed."
|
||||
Count mtException_LeakMultiFree=1
|
||||
mtException_LeakMultiFree0="Multi Free memory leak."
|
||||
Count mtException_LeakMemoryOverrun=1
|
||||
mtException_LeakMemoryOverrun0="Memory Overrun leak."
|
||||
Count mtException_AntiFreeze=1
|
||||
mtException_AntiFreeze0="The application seems to be frozen."
|
||||
Count mtInvalidEmailMsg=1
|
||||
mtInvalidEmailMsg0="Invalid email."
|
||||
TextsCollection=English
|
||||
EurekaLog Last Line -->
|
||||
</BorlandProject>
|
||||
|
||||
@ -43,7 +43,8 @@ requires
|
||||
dxPScxGrid6LnkD10,
|
||||
dxPsPrVwAdvD10,
|
||||
Referencias_model,
|
||||
Referencias_data;
|
||||
Referencias_data,
|
||||
Contactos_controller;
|
||||
|
||||
contains
|
||||
uReferenciasController in 'uReferenciasController.pas',
|
||||
|
||||
Binary file not shown.
@ -24,6 +24,7 @@ type
|
||||
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
|
||||
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
|
||||
|
||||
procedure FiltrarEmpresa(AReferencia: IBizReferencia);
|
||||
function ValidarReferencia(AReferencia: IBizReferencia): Boolean;
|
||||
procedure AsignarDataModule;
|
||||
procedure AsignarID(AReferencia: IBizReferencia; const IDNuevo: Integer);
|
||||
@ -44,7 +45,7 @@ implementation
|
||||
uses
|
||||
cxControls, DB, uEditorRegistryUtils, schReferenciasClient_Intf,
|
||||
uIEditorReferencias, uDataModuleReferencias,
|
||||
uDAInterfaces, uDataTableUtils, uDialogUtils,
|
||||
uDAInterfaces, uDataTableUtils, uDialogUtils, uDataModuleUsuarios,
|
||||
uDateUtils, uROTypes, DateUtils, Controls, Windows;
|
||||
|
||||
{ TReferenciasController }
|
||||
@ -63,6 +64,7 @@ end;
|
||||
function TReferenciasController.BuscarTodos: IBizReferencia;
|
||||
begin
|
||||
Result := FDataModule.GetItems;
|
||||
FiltrarEmpresa(Result);
|
||||
end;
|
||||
|
||||
constructor TReferenciasController.Create;
|
||||
@ -97,6 +99,21 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TReferenciasController.FiltrarEmpresa(AReferencia: IBizReferencia);
|
||||
begin
|
||||
if AReferencia.DataTable.Active then
|
||||
AReferencia.DataTable.Active := False;
|
||||
|
||||
// Filtrar los presupuestos actuales por empresa
|
||||
with AReferencia.DataTable.Where do
|
||||
begin
|
||||
if NotEmpty then
|
||||
AddOperator(opAND);
|
||||
AddCondition(fld_ReferenciasID_EMPRESA, cEqual, dmUsuarios.IDEmpresaActual);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function TReferenciasController.ValidarReferencia(AReferencia: IBizReferencia): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
@ -26,16 +26,19 @@ object PluginTiendaWeb: TPluginTiendaWeb
|
||||
Caption = 'Recoger pedidos...'
|
||||
ImageIndex = 0
|
||||
OnExecute = actRecogerPedidosExecute
|
||||
OnUpdate = actRecogerPedidosUpdate
|
||||
end
|
||||
object actActualizarTienda: TAction
|
||||
Category = 'TiendaWeb'
|
||||
Caption = 'Actualizar tienda...'
|
||||
OnExecute = actActualizarTiendaExecute
|
||||
OnUpdate = actActualizarTiendaUpdate
|
||||
end
|
||||
object actConfigurarTienda: TAction
|
||||
Category = 'TiendaWeb'
|
||||
Caption = 'Configurar tienda'
|
||||
OnExecute = actConfigurarTiendaExecute
|
||||
OnUpdate = actConfigurarTiendaUpdate
|
||||
end
|
||||
end
|
||||
object MainMenu: TMainMenu
|
||||
|
||||
@ -28,6 +28,9 @@ type
|
||||
procedure actRecogerPedidosExecute(Sender: TObject);
|
||||
procedure actConfigurarTiendaExecute(Sender: TObject);
|
||||
procedure actActualizarTiendaExecute(Sender: TObject);
|
||||
procedure actRecogerPedidosUpdate(Sender: TObject);
|
||||
procedure actActualizarTiendaUpdate(Sender: TObject);
|
||||
procedure actConfigurarTiendaUpdate(Sender: TObject);
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -60,6 +63,13 @@ begin
|
||||
ATiendaWebController.ActualizarTienda(ATiendaWeb);
|
||||
end;
|
||||
|
||||
procedure TPluginTiendaWeb.actActualizarTiendaUpdate(Sender: TObject);
|
||||
begin
|
||||
//La tienda solo estará activa para la empresa Luis León Representaciones
|
||||
if (Sender as TAction).Enabled then
|
||||
(Sender as TAction).Enabled := (dmUsuarios.IDEmpresaActual = 1)
|
||||
end;
|
||||
|
||||
procedure TPluginTiendaWeb.actConfigurarTiendaExecute(Sender: TObject);
|
||||
var
|
||||
ATiendaWebController : ITiendaWebController;
|
||||
@ -70,6 +80,13 @@ begin
|
||||
ATiendaWebController.Ver(ATiendaWeb);
|
||||
end;
|
||||
|
||||
procedure TPluginTiendaWeb.actConfigurarTiendaUpdate(Sender: TObject);
|
||||
begin
|
||||
//La tienda solo estará activa para la empresa Luis León Representaciones
|
||||
if (Sender as TAction).Enabled then
|
||||
(Sender as TAction).Enabled := (dmUsuarios.IDEmpresaActual = 1)
|
||||
end;
|
||||
|
||||
procedure TPluginTiendaWeb.actRecogerPedidosExecute(Sender: TObject);
|
||||
var
|
||||
ATiendaWebController : ITiendaWebController;
|
||||
@ -80,6 +97,14 @@ begin
|
||||
ATiendaWebController.DescargarPedidos(ATiendaWeb);
|
||||
end;
|
||||
|
||||
procedure TPluginTiendaWeb.actRecogerPedidosUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
//La tienda solo estará activa para la empresa Luis León Representaciones
|
||||
if (Sender as TAction).Enabled then
|
||||
(Sender as TAction).Enabled := (dmUsuarios.IDEmpresaActual = 1)
|
||||
end;
|
||||
|
||||
constructor TPluginTiendaWeb.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -16,7 +16,7 @@ BEGIN
|
||||
VALUE "FileVersion", "3.3.7.0\0"
|
||||
VALUE "ProductName", "FactuGES Server\0"
|
||||
VALUE "ProductVersion", "3.3.7.0\0"
|
||||
VALUE "CompileDate", "jueves, 15 de julio de 2010 18:00\0"
|
||||
VALUE "CompileDate", "viernes, 16 de julio de 2010 11:03\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user