Limpieza de mensajes de warning.
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@268 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
5de8d0e1a4
commit
f067420216
@ -201,8 +201,6 @@ end;
|
|||||||
|
|
||||||
function TEjerciciosController.ValidarEjercicio(AEjercicio: IBizEjercicio): Boolean;
|
function TEjerciciosController.ValidarEjercicio(AEjercicio: IBizEjercicio): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AEjercicio) then
|
if not Assigned(AEjercicio) then
|
||||||
raise Exception.Create ('Ejercicio no asignado');
|
raise Exception.Create ('Ejercicio no asignado');
|
||||||
|
|
||||||
@ -264,8 +262,6 @@ end;
|
|||||||
|
|
||||||
function TEjerciciosController.Eliminar(AEjercicio: IBizEjercicio): Boolean;
|
function TEjerciciosController.Eliminar(AEjercicio: IBizEjercicio): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AEjercicio) then
|
if not Assigned(AEjercicio) then
|
||||||
raise Exception.Create ('Ejercicio no asignado');
|
raise Exception.Create ('Ejercicio no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
FDataModule : IDataModuleEmpresas;
|
FDataModule : IDataModuleEmpresas;
|
||||||
function ValidarEmpresa(AEmpresa : IBizEmpresa): Boolean; virtual;
|
function ValidarEmpresa(AEmpresa : IBizEmpresa): Boolean; virtual;
|
||||||
public
|
public
|
||||||
constructor Create; virtual;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
function Eliminar(const ID : Integer): Boolean; overload;
|
function Eliminar(const ID : Integer): Boolean; overload;
|
||||||
@ -76,6 +76,7 @@ end;
|
|||||||
|
|
||||||
constructor TEmpresasController.Create;
|
constructor TEmpresasController.Create;
|
||||||
begin
|
begin
|
||||||
|
inherited;
|
||||||
FDataModule := TDataModuleEmpresas.Create(Nil);
|
FDataModule := TDataModuleEmpresas.Create(Nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -83,7 +84,6 @@ function TEmpresasController.DarListaTiendas(
|
|||||||
AEmpresa: IBizEmpresa): TStringList;
|
AEmpresa: IBizEmpresa): TStringList;
|
||||||
var
|
var
|
||||||
ATiendas: IBizEmpresasTiendas;
|
ATiendas: IBizEmpresasTiendas;
|
||||||
i : integer;
|
|
||||||
begin
|
begin
|
||||||
if not Assigned(AEmpresa) then
|
if not Assigned(AEmpresa) then
|
||||||
raise Exception.Create ('Empresa no asignada (DarListaTiendas)');
|
raise Exception.Create ('Empresa no asignada (DarListaTiendas)');
|
||||||
@ -133,8 +133,6 @@ end;
|
|||||||
|
|
||||||
function TEmpresasController.Eliminar(AEmpresa: IBizEmpresa): Boolean;
|
function TEmpresasController.Eliminar(AEmpresa: IBizEmpresa): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AEmpresa) then
|
if not Assigned(AEmpresa) then
|
||||||
raise Exception.Create ('Empresa no asignada (Eliminar)');
|
raise Exception.Create ('Empresa no asignada (Eliminar)');
|
||||||
|
|
||||||
@ -215,8 +213,6 @@ end;
|
|||||||
|
|
||||||
function TEmpresasController.ValidarEmpresa(AEmpresa: IBizEmpresa): Boolean;
|
function TEmpresasController.ValidarEmpresa(AEmpresa: IBizEmpresa): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AEmpresa) then
|
if not Assigned(AEmpresa) then
|
||||||
raise Exception.Create ('Empresa no asignada (ValidarEmpresa)');
|
raise Exception.Create ('Empresa no asignada (ValidarEmpresa)');
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,6 @@ end;
|
|||||||
function TTiendasEmpresaController.DarListaTiendas: TStringList;
|
function TTiendasEmpresaController.DarListaTiendas: TStringList;
|
||||||
var
|
var
|
||||||
ATiendas: IBizEmpresasTiendas;
|
ATiendas: IBizEmpresasTiendas;
|
||||||
i : integer;
|
|
||||||
begin
|
begin
|
||||||
ATiendas := AppFactuGES.EmpresaActiva.Tiendas;
|
ATiendas := AppFactuGES.EmpresaActiva.Tiendas;
|
||||||
ATiendas.DataTable.Active := True;
|
ATiendas.DataTable.Active := True;
|
||||||
|
|||||||
@ -17,6 +17,7 @@ inherited frViewTienda: TfrViewTienda
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
ParentBackground = True
|
ParentBackground = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
TabStop = False
|
||||||
AutoContentSizes = [acsWidth, acsHeight]
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
451
|
451
|
||||||
|
|||||||
@ -6,7 +6,12 @@ uses
|
|||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics,
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics,
|
||||||
dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
||||||
cxControls;
|
cxControls, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee,
|
||||||
|
dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||||
|
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinXmas2008Blue, dxSkinsdxLCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewTienda = interface(IViewBase)
|
IViewTienda = interface(IViewBase)
|
||||||
|
|||||||
@ -120,7 +120,7 @@ type
|
|||||||
function GetUsarPasswordsSeguras: Boolean;
|
function GetUsarPasswordsSeguras: Boolean;
|
||||||
procedure SetUsarPasswordsSeguras(const Value: Boolean);
|
procedure SetUsarPasswordsSeguras(const Value: Boolean);
|
||||||
public
|
public
|
||||||
constructor Create; virtual;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
procedure Logoff;
|
procedure Logoff;
|
||||||
@ -321,10 +321,15 @@ begin
|
|||||||
Controller := Self;
|
Controller := Self;
|
||||||
Usuario := AUser;
|
Usuario := AUser;
|
||||||
CambioObligatorio := False;
|
CambioObligatorio := False;
|
||||||
|
|
||||||
if (Length(Trim(AUser.PASS)) = 0) then
|
if (Length(Trim(AUser.PASS)) = 0) then
|
||||||
EditAtu.Enabled := False;
|
EditAtu.Enabled := False;
|
||||||
|
|
||||||
if (ShowModal = mrOk) then
|
if (ShowModal = mrOk) then
|
||||||
Result := CambiarPassword(AIDUser, EditNova.Text);
|
Result := CambiarPassword(AIDUser, EditNova.Text)
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
Release;
|
Release;
|
||||||
AUser.Active := False;
|
AUser.Active := False;
|
||||||
@ -352,6 +357,7 @@ end;
|
|||||||
|
|
||||||
constructor TUsuariosController.Create;
|
constructor TUsuariosController.Create;
|
||||||
begin
|
begin
|
||||||
|
inherited;
|
||||||
AsignarDataModule;
|
AsignarDataModule;
|
||||||
FCurrentUser := NIL;
|
FCurrentUser := NIL;
|
||||||
FUserControl := TUserControl.Create(nil);
|
FUserControl := TUserControl.Create(nil);
|
||||||
@ -372,7 +378,6 @@ end;
|
|||||||
function TUsuariosController.DarListaPerfilesUsuario: TStringList;
|
function TUsuariosController.DarListaPerfilesUsuario: TStringList;
|
||||||
var
|
var
|
||||||
APerfilesUsuario: IBizPerfilUsuario;
|
APerfilesUsuario: IBizPerfilUsuario;
|
||||||
i : integer;
|
|
||||||
begin
|
begin
|
||||||
APerfilesUsuario := FDataModule.GetPerfiles;
|
APerfilesUsuario := FDataModule.GetPerfiles;
|
||||||
APerfilesUsuario.DataTable.Active := True;
|
APerfilesUsuario.DataTable.Active := True;
|
||||||
@ -396,7 +401,6 @@ end;
|
|||||||
function TUsuariosController.DarListaUsuarios: TStringList;
|
function TUsuariosController.DarListaUsuarios: TStringList;
|
||||||
var
|
var
|
||||||
AUsuarios: IBizUsuario;
|
AUsuarios: IBizUsuario;
|
||||||
i : integer;
|
|
||||||
begin
|
begin
|
||||||
AUsuarios := FDataModule.GetUsuarios;
|
AUsuarios := FDataModule.GetUsuarios;
|
||||||
AUsuarios.DataTable.Active := True;
|
AUsuarios.DataTable.Active := True;
|
||||||
@ -484,7 +488,9 @@ begin
|
|||||||
AUser.Active := True;
|
AUser.Active := True;
|
||||||
|
|
||||||
if AUser.DataTable.RecordCount > 0 then
|
if AUser.DataTable.RecordCount > 0 then
|
||||||
Result := EliminarUsuario(AUser.ID);
|
Result := EliminarUsuario(AUser.ID)
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TUsuariosController.EliminarUsuario(const AIDUser: integer): Boolean;
|
function TUsuariosController.EliminarUsuario(const AIDUser: integer): Boolean;
|
||||||
@ -499,6 +505,8 @@ begin
|
|||||||
case FUserControl.Criptografia of
|
case FUserControl.Criptografia of
|
||||||
cPadrao: Result := ucStandard;
|
cPadrao: Result := ucStandard;
|
||||||
cMD5: Result := ucMD5;
|
cMD5: Result := ucMD5;
|
||||||
|
else
|
||||||
|
Result := ucStandard;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -525,8 +533,6 @@ end;
|
|||||||
|
|
||||||
function TUsuariosController.GuardarPerfil(APerfil: IBizPerfilUsuario): Boolean;
|
function TUsuariosController.GuardarPerfil(APerfil: IBizPerfilUsuario): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(APerfil) then
|
if not Assigned(APerfil) then
|
||||||
raise Exception.Create('No hay perfil asignado (GuardarPerfil)');
|
raise Exception.Create('No hay perfil asignado (GuardarPerfil)');
|
||||||
|
|
||||||
@ -538,8 +544,6 @@ end;
|
|||||||
|
|
||||||
function TUsuariosController.GuardarUsuario(AUser: IBizUsuario): Boolean;
|
function TUsuariosController.GuardarUsuario(AUser: IBizUsuario): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AUser) then
|
if not Assigned(AUser) then
|
||||||
raise Exception.Create('No hay usuario asignado (GuardarUsuario)');
|
raise Exception.Create('No hay usuario asignado (GuardarUsuario)');
|
||||||
|
|
||||||
@ -554,8 +558,6 @@ function TUsuariosController.HayUsuarioConPerfil(
|
|||||||
var
|
var
|
||||||
TempDS: TDataset;
|
TempDS: TDataset;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
TempDS := FUserControl.DataConnector.UCGetSQLDataset('Select ' + FUserControl.TableUsers.FieldUserID + ' as IdUser from ' +
|
TempDS := FUserControl.DataConnector.UCGetSQLDataset('Select ' + FUserControl.TableUsers.FieldUserID + ' as IdUser from ' +
|
||||||
FUserControl.TableUsers.TableName +
|
FUserControl.TableUsers.TableName +
|
||||||
@ -738,8 +740,6 @@ end;
|
|||||||
|
|
||||||
function TUsuariosController.ValidarPerfil(APerfil: IBizPerfilUsuario): Boolean;
|
function TUsuariosController.ValidarPerfil(APerfil: IBizPerfilUsuario): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(APerfil) then
|
if not Assigned(APerfil) then
|
||||||
raise Exception.Create ('Perfil no asignado (ValidarPerfil)');
|
raise Exception.Create ('Perfil no asignado (ValidarPerfil)');
|
||||||
|
|
||||||
@ -754,8 +754,6 @@ end;
|
|||||||
|
|
||||||
function TUsuariosController.ValidarUsuario(AUser: IBizUsuario): Boolean;
|
function TUsuariosController.ValidarUsuario(AUser: IBizUsuario): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AUser) then
|
if not Assigned(AUser) then
|
||||||
raise Exception.Create ('Usuario no asignado (ValidarUsuario)');
|
raise Exception.Create ('Usuario no asignado (ValidarUsuario)');
|
||||||
|
|
||||||
@ -920,8 +918,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUsuariosController.FiltrarEmpresa(AUsuario: IBizUsuario);
|
procedure TUsuariosController.FiltrarEmpresa(AUsuario: IBizUsuario);
|
||||||
var
|
{var
|
||||||
Condicion: TDAWhereExpression;
|
Condicion: TDAWhereExpression;}
|
||||||
begin
|
begin
|
||||||
|
|
||||||
// AQUI HAY QUE TENER EN CUENTA QUE UN USUARIO PUEDE QUE NO TENGA ACCESO
|
// AQUI HAY QUE TENER EN CUENTA QUE UN USUARIO PUEDE QUE NO TENGA ACCESO
|
||||||
|
|||||||
@ -26,13 +26,13 @@ inherited fEditorUsuario: TfEditorUsuario
|
|||||||
inherited pagGeneral: TTabSheet
|
inherited pagGeneral: TTabSheet
|
||||||
ExplicitLeft = 4
|
ExplicitLeft = 4
|
||||||
ExplicitTop = 24
|
ExplicitTop = 24
|
||||||
ExplicitWidth = 638
|
ExplicitWidth = 636
|
||||||
ExplicitHeight = 332
|
ExplicitHeight = 330
|
||||||
inline frViewUsuario1: TfrViewUsuario
|
inline frViewUsuario1: TfrViewUsuario
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 638
|
Width = 636
|
||||||
Height = 332
|
Height = 330
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -42,14 +42,14 @@ inherited fEditorUsuario: TfEditorUsuario
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
ExplicitWidth = 638
|
ExplicitWidth = 636
|
||||||
ExplicitHeight = 332
|
ExplicitHeight = 330
|
||||||
inherited dxLayoutControlArticulo: TdxLayoutControl
|
inherited dxLayoutControlArticulo: TdxLayoutControl
|
||||||
Width = 638
|
Width = 636
|
||||||
LookAndFeel = dxLayoutOfficeLookAndFeel1
|
LookAndFeel = dxLayoutOfficeLookAndFeel1
|
||||||
ExplicitWidth = 638
|
ExplicitWidth = 636
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
638
|
636
|
||||||
273)
|
273)
|
||||||
inherited PngSpeedButton3: TPngSpeedButton
|
inherited PngSpeedButton3: TPngSpeedButton
|
||||||
Top = 84
|
Top = 84
|
||||||
|
|||||||
@ -127,7 +127,6 @@ var
|
|||||||
AContinuar : Boolean;
|
AContinuar : Boolean;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
AContinuar := False;
|
|
||||||
if FUsuario.EsNuevo then
|
if FUsuario.EsNuevo then
|
||||||
begin
|
begin
|
||||||
if (frViewUsuario1.ePassword.Text <> frViewUsuario1.eConfirmarPassword.Text) then
|
if (frViewUsuario1.ePassword.Text <> frViewUsuario1.eConfirmarPassword.Text) then
|
||||||
|
|||||||
@ -13,6 +13,7 @@ inherited frViewUsuario: TfrViewUsuario
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
ParentBackground = True
|
ParentBackground = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
TabStop = False
|
||||||
AutoContentSizes = [acsWidth]
|
AutoContentSizes = [acsWidth]
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
510
|
510
|
||||||
@ -111,6 +112,8 @@ inherited frViewUsuario: TfrViewUsuario
|
|||||||
Top = 167
|
Top = 167
|
||||||
Properties.EchoMode = eemPassword
|
Properties.EchoMode = eemPassword
|
||||||
Properties.PasswordChar = '*'
|
Properties.PasswordChar = '*'
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
Style.LookAndFeel.NativeStyle = True
|
Style.LookAndFeel.NativeStyle = True
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
@ -127,6 +130,8 @@ inherited frViewUsuario: TfrViewUsuario
|
|||||||
Top = 194
|
Top = 194
|
||||||
Properties.EchoMode = eemPassword
|
Properties.EchoMode = eemPassword
|
||||||
Properties.PasswordChar = '*'
|
Properties.PasswordChar = '*'
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
Style.LookAndFeel.NativeStyle = True
|
Style.LookAndFeel.NativeStyle = True
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
@ -146,8 +151,12 @@ inherited frViewUsuario: TfrViewUsuario
|
|||||||
Properties.ImmediateUpdateText = True
|
Properties.ImmediateUpdateText = True
|
||||||
Properties.PostPopupValueOnTab = True
|
Properties.PostPopupValueOnTab = True
|
||||||
Properties.OnValidate = cbPerfilPropertiesValidate
|
Properties.OnValidate = cbPerfilPropertiesValidate
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
Style.LookAndFeel.NativeStyle = True
|
Style.LookAndFeel.NativeStyle = True
|
||||||
|
Style.ButtonStyle = bts3D
|
||||||
|
Style.PopupBorderStyle = epbsFrame3D
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||||
|
|||||||
@ -9,7 +9,13 @@ uses
|
|||||||
uDADataTable, ActnList, cxCheckBox, cxDBEdit, cxMaskEdit, cxSpinEdit,
|
uDADataTable, ActnList, cxCheckBox, cxDBEdit, cxMaskEdit, cxSpinEdit,
|
||||||
cxHyperLinkEdit, cxContainer, cxEdit, cxTextEdit, Buttons, PngSpeedButton,
|
cxHyperLinkEdit, cxContainer, cxEdit, cxTextEdit, Buttons, PngSpeedButton,
|
||||||
uBizUsuarios, cxDropDownEdit, ExtCtrls, cxLookupEdit, cxDBLookupEdit,
|
uBizUsuarios, cxDropDownEdit, ExtCtrls, cxLookupEdit, cxDBLookupEdit,
|
||||||
cxDBLookupComboBox;
|
cxDBLookupComboBox, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel,
|
||||||
|
dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian,
|
||||||
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
|
||||||
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust,
|
||||||
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue,
|
||||||
|
dxSkinsdxLCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewUsuario = interface(IViewBase)
|
IViewUsuario = interface(IViewBase)
|
||||||
|
|||||||
@ -33,8 +33,6 @@ function CalcularLineaConcepto (const ADataTable : TDADataTable): Double;
|
|||||||
var
|
var
|
||||||
ImporteTotal : Double;
|
ImporteTotal : Double;
|
||||||
begin
|
begin
|
||||||
ImporteTotal := 0;
|
|
||||||
|
|
||||||
with ADataTable do
|
with ADataTable do
|
||||||
begin
|
begin
|
||||||
if (VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then
|
if (VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then
|
||||||
@ -74,9 +72,11 @@ var
|
|||||||
ABookmark : TBookmark;
|
ABookmark : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
ImporteUnidad := 0;
|
||||||
|
ImporteSobrante := 0;
|
||||||
|
|
||||||
|
ABookmark := ADetalles.DataTable.GetBookMark;
|
||||||
try
|
try
|
||||||
ABookmark := ADetalles.DataTable.GetBookMark;
|
|
||||||
ADetalles.DataTable.DisableControls;
|
ADetalles.DataTable.DisableControls;
|
||||||
ADetalles.DataTable.DisableEventHandlers;
|
ADetalles.DataTable.DisableEventHandlers;
|
||||||
|
|
||||||
|
|||||||
@ -528,6 +528,8 @@ var
|
|||||||
ASourceField: TDAField;
|
ASourceField: TDAField;
|
||||||
ADetailFields : TStringList;
|
ADetailFields : TStringList;
|
||||||
begin
|
begin
|
||||||
|
ADetailFields := Nil;
|
||||||
|
|
||||||
if not ASource.Active then
|
if not ASource.Active then
|
||||||
ASource.Open;
|
ASource.Open;
|
||||||
|
|
||||||
@ -548,9 +550,7 @@ begin
|
|||||||
ADetailFields.Add(ATarget.DetailFields);
|
ADetailFields.Add(ATarget.DetailFields);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end;
|
||||||
else
|
|
||||||
ADetailFields := Nil;
|
|
||||||
|
|
||||||
ATarget.Insert;
|
ATarget.Insert;
|
||||||
{ Hay que desactivar los eventos para que dejan de funcionar
|
{ Hay que desactivar los eventos para que dejan de funcionar
|
||||||
|
|||||||
@ -232,10 +232,7 @@ end;
|
|||||||
function TApuntesController.ValidarApunte(AApunte: IBizApunte): Boolean;
|
function TApuntesController.ValidarApunte(AApunte: IBizApunte): Boolean;
|
||||||
var
|
var
|
||||||
Descuadre : Double;
|
Descuadre : Double;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AApunte) then
|
if not Assigned(AApunte) then
|
||||||
raise Exception.Create ('Apuntes no asignados');
|
raise Exception.Create ('Apuntes no asignados');
|
||||||
|
|
||||||
@ -334,8 +331,6 @@ end;
|
|||||||
|
|
||||||
function TApuntesController.Eliminar(AApunte: IBizApunte): Boolean;
|
function TApuntesController.Eliminar(AApunte: IBizApunte): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AApunte) then
|
if not Assigned(AApunte) then
|
||||||
raise Exception.Create ('Apunte no asignado');
|
raise Exception.Create ('Apunte no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -136,8 +136,6 @@ function TAsientosController.CerrarCajaBanco(IdSubcuenta: Integer): Boolean;
|
|||||||
var
|
var
|
||||||
AAsiento: IBizAsiento;
|
AAsiento: IBizAsiento;
|
||||||
begin
|
begin
|
||||||
Result:= False;
|
|
||||||
|
|
||||||
AAsiento:= Anadir(IdSubCuenta);
|
AAsiento:= Anadir(IdSubCuenta);
|
||||||
try
|
try
|
||||||
AAsiento.TIPO := 'X'; //CIERRE DE CAJA
|
AAsiento.TIPO := 'X'; //CIERRE DE CAJA
|
||||||
@ -208,8 +206,6 @@ end;
|
|||||||
|
|
||||||
function TAsientosController.ValidarAsiento(AAsiento: IBizAsiento): Boolean;
|
function TAsientosController.ValidarAsiento(AAsiento: IBizAsiento): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AAsiento) then
|
if not Assigned(AAsiento) then
|
||||||
raise Exception.Create ('Asiento no asignado');
|
raise Exception.Create ('Asiento no asignado');
|
||||||
|
|
||||||
@ -301,8 +297,6 @@ end;
|
|||||||
|
|
||||||
function TAsientosController.Eliminar(AAsiento: IBizAsiento): Boolean;
|
function TAsientosController.Eliminar(AAsiento: IBizAsiento): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AAsiento) then
|
if not Assigned(AAsiento) then
|
||||||
raise Exception.Create ('Asiento no asignado');
|
raise Exception.Create ('Asiento no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -159,8 +159,6 @@ end;
|
|||||||
|
|
||||||
function TBalancesController.ValidarBalance(ABalance: IBizBalance): Boolean;
|
function TBalancesController.ValidarBalance(ABalance: IBizBalance): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ABalance) then
|
if not Assigned(ABalance) then
|
||||||
raise Exception.Create ('Balance no asignado');
|
raise Exception.Create ('Balance no asignado');
|
||||||
|
|
||||||
@ -240,8 +238,6 @@ end;
|
|||||||
|
|
||||||
function TBalancesController.Eliminar(ABalance: IBizBalance): Boolean;
|
function TBalancesController.Eliminar(ABalance: IBizBalance): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ABalance) then
|
if not Assigned(ABalance) then
|
||||||
raise Exception.Create ('Balance no asignado');
|
raise Exception.Create ('Balance no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -172,8 +172,6 @@ end;
|
|||||||
|
|
||||||
function TCuentasController.ValidarCuenta(ACuenta: IBizCuenta): Boolean;
|
function TCuentasController.ValidarCuenta(ACuenta: IBizCuenta): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ACuenta) then
|
if not Assigned(ACuenta) then
|
||||||
raise Exception.Create ('Cuenta no asignado');
|
raise Exception.Create ('Cuenta no asignado');
|
||||||
|
|
||||||
@ -341,8 +339,6 @@ end;
|
|||||||
|
|
||||||
function TCuentasController.Eliminar(ACuenta: IBizCuenta): Boolean;
|
function TCuentasController.Eliminar(ACuenta: IBizCuenta): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ACuenta) then
|
if not Assigned(ACuenta) then
|
||||||
raise Exception.Create ('Cuenta no asignado');
|
raise Exception.Create ('Cuenta no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -160,8 +160,6 @@ end;
|
|||||||
|
|
||||||
function TCuentasEspecialesController.ValidarCuentaEspecial(ACuentaEspecial: IBizCuentaEspecial): Boolean;
|
function TCuentasEspecialesController.ValidarCuentaEspecial(ACuentaEspecial: IBizCuentaEspecial): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ACuentaEspecial) then
|
if not Assigned(ACuentaEspecial) then
|
||||||
raise Exception.Create ('CuentaEspecial no asignado');
|
raise Exception.Create ('CuentaEspecial no asignado');
|
||||||
|
|
||||||
@ -242,8 +240,6 @@ end;
|
|||||||
|
|
||||||
function TCuentasEspecialesController.Eliminar(ACuentaEspecial: IBizCuentaEspecial): Boolean;
|
function TCuentasEspecialesController.Eliminar(ACuentaEspecial: IBizCuentaEspecial): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ACuentaEspecial) then
|
if not Assigned(ACuentaEspecial) then
|
||||||
raise Exception.Create ('CuentaEspecial no asignado');
|
raise Exception.Create ('CuentaEspecial no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -180,8 +180,6 @@ end;
|
|||||||
|
|
||||||
function TEpigrafesController.ValidarEpigrafe(AEpigrafe: IBizEpigrafe): Boolean;
|
function TEpigrafesController.ValidarEpigrafe(AEpigrafe: IBizEpigrafe): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AEpigrafe) then
|
if not Assigned(AEpigrafe) then
|
||||||
raise Exception.Create ('Epigrafe no asignado');
|
raise Exception.Create ('Epigrafe no asignado');
|
||||||
|
|
||||||
@ -264,8 +262,6 @@ end;
|
|||||||
|
|
||||||
function TEpigrafesController.Eliminar(AEpigrafe: IBizEpigrafe): Boolean;
|
function TEpigrafesController.Eliminar(AEpigrafe: IBizEpigrafe): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(AEpigrafe) then
|
if not Assigned(AEpigrafe) then
|
||||||
raise Exception.Create ('Epigrafe no asignado');
|
raise Exception.Create ('Epigrafe no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -197,9 +197,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TSubCuentasController.BuscarCompras: IBizSubCuenta;
|
function TSubCuentasController.BuscarCompras: IBizSubCuenta;
|
||||||
var
|
{var
|
||||||
Condicion: TDAWhereExpression;
|
Condicion: TDAWhereExpression;
|
||||||
|
}
|
||||||
begin
|
begin
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
@ -313,7 +313,6 @@ end;
|
|||||||
function TSubCuentasController.DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
|
function TSubCuentasController.DarLista(Const TipoSubCuenta: TEnumTipoSubCuenta): TStringList;
|
||||||
var
|
var
|
||||||
ASubCuentas: IBizSubCuenta;
|
ASubCuentas: IBizSubCuenta;
|
||||||
i : integer;
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
case TipoSubCuenta of
|
case TipoSubCuenta of
|
||||||
@ -387,8 +386,6 @@ end;
|
|||||||
|
|
||||||
function TSubCuentasController.ValidarSubCuenta(ASubCuenta: IBizSubCuenta): Boolean;
|
function TSubCuentasController.ValidarSubCuenta(ASubCuenta: IBizSubCuenta): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ASubCuenta) then
|
if not Assigned(ASubCuenta) then
|
||||||
raise Exception.Create ('SubCuenta no asignado');
|
raise Exception.Create ('SubCuenta no asignado');
|
||||||
|
|
||||||
@ -543,8 +540,6 @@ end;
|
|||||||
|
|
||||||
function TSubCuentasController.Eliminar(ASubCuenta: IBizSubCuenta): Boolean;
|
function TSubCuentasController.Eliminar(ASubCuenta: IBizSubCuenta): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
|
||||||
|
|
||||||
if not Assigned(ASubCuenta) then
|
if not Assigned(ASubCuenta) then
|
||||||
raise Exception.Create ('SubCuenta no asignado');
|
raise Exception.Create ('SubCuenta no asignado');
|
||||||
|
|
||||||
|
|||||||
@ -72,6 +72,8 @@ var
|
|||||||
ABookmark : TBookmark;
|
ABookmark : TBookmark;
|
||||||
NumOrdenMax : Integer;
|
NumOrdenMax : Integer;
|
||||||
begin
|
begin
|
||||||
|
ABookmark := NIL;
|
||||||
|
|
||||||
with Self.DataTable do
|
with Self.DataTable do
|
||||||
begin
|
begin
|
||||||
if not Opening then
|
if not Opening then
|
||||||
|
|||||||
@ -54,9 +54,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBizExtractoMovimiento.AfterPost(Sender: TDADataTable);
|
procedure TBizExtractoMovimiento.AfterPost(Sender: TDADataTable);
|
||||||
var
|
{var
|
||||||
i, x: Integer;
|
i, x: Integer;
|
||||||
|
}
|
||||||
begin
|
begin
|
||||||
//Comprobamos los cambios para solo recalcular en el caso de modificar el importe
|
//Comprobamos los cambios para solo recalcular en el caso de modificar el importe
|
||||||
//y añadir un asiento nuevo
|
//y añadir un asiento nuevo
|
||||||
@ -77,11 +77,11 @@ end;
|
|||||||
|
|
||||||
procedure TBizExtractoMovimiento.CalcularSaldo;
|
procedure TBizExtractoMovimiento.CalcularSaldo;
|
||||||
var
|
var
|
||||||
varImporteAnt: double;
|
|
||||||
varImportePos: double;
|
varImportePos: double;
|
||||||
ABookmark: Pointer;
|
ABookmark: Pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
ABookmark := NIL;
|
||||||
DataTable.DisableControls;
|
DataTable.DisableControls;
|
||||||
DataTable.DisableEventHandlers;
|
DataTable.DisableEventHandlers;
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ inherited frViewListaSubcuentas: TfrViewListaSubcuentas
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
ParentBackground = True
|
ParentBackground = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
TabStop = False
|
||||||
AutoContentSizes = [acsWidth, acsHeight]
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
453
|
453
|
||||||
@ -51,6 +52,8 @@ inherited frViewListaSubcuentas: TfrViewListaSubcuentas
|
|||||||
Caption = 'Ignorar en contabiliad'
|
Caption = 'Ignorar en contabiliad'
|
||||||
Properties.ValueChecked = 1
|
Properties.ValueChecked = 1
|
||||||
Properties.ValueUnchecked = 0
|
Properties.ValueUnchecked = 0
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Width = 203
|
Width = 203
|
||||||
end
|
end
|
||||||
|
|||||||
@ -6,7 +6,13 @@ uses
|
|||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics,
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics,
|
||||||
dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
dxLayoutControl, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
||||||
cxControls, cxCheckBox, uSubCuentasController;
|
cxControls, cxCheckBox, uSubCuentasController, dxSkinsCore, dxSkinBlack,
|
||||||
|
dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary,
|
||||||
|
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
||||||
|
dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
|
||||||
|
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
|
||||||
|
dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinXmas2008Blue, dxSkinsdxLCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewListaSubcuentas = interface(IViewBase)
|
IViewListaSubcuentas = interface(IViewBase)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user