Cambios varios para los informes trimestrales y orden de empresas inicial, no recordar contraseñas

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoArmarios_FactuGES/trunk@33 0a814768-cfdd-9c42-8d01-223fcc10da9d
This commit is contained in:
roberto 2009-09-28 17:23:49 +00:00
parent fcc8f0ed90
commit cf0f268c5a
18 changed files with 251 additions and 83 deletions

View File

@ -36,8 +36,9 @@ uses
Entidades, Contadores, RdxGestorContadores; Entidades, Contadores, RdxGestorContadores;
Const Const
CTE_PRIVILEGIO_TOTAL = 'TOTAL'; CTE_PRIVILEGIO_TIENDA = 'TIENDA';
CTE_PRIVILEGIO_1 = 'PRIVILEGIO1'; CTE_PRIVILEGIO_TIENDAPARCIAL = 'TIENDAPARCIAL';
CTE_PRIVILEGIO_FABRICA = 'FABRICA';
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// COMUNES // COMUNES

View File

@ -191,7 +191,7 @@ begin
with sqlGrid do with sqlGrid do
begin begin
Add('select CODIGO, NIFCIF, LOGOTIPO, NOMBRECOMERCIAL'); Add('select CODIGO, NIFCIF, LOGOTIPO, NOMBRECOMERCIAL');
Add('from EMPRESAS '); Add('from EMPRESAS order by CODIGO ');
end; end;
end; end;

View File

@ -30,9 +30,9 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
end end
object pnlVistaPrevia: TPanel object pnlVistaPrevia: TPanel
Left = 0 Left = 0
Top = 156 Top = 197
Width = 617 Width = 617
Height = 260 Height = 219
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
Color = 16383743 Color = 16383743
@ -42,7 +42,7 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
Left = 0 Left = 0
Top = 22 Top = 22
Width = 617 Width = 617
Height = 134 Height = 175
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
@ -142,6 +142,7 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
BorderWidth = 10 BorderWidth = 10
Color = 16383743 Color = 16383743
TabOrder = 0 TabOrder = 0
Visible = False
object eTrimestre: TLabel object eTrimestre: TLabel
Left = 70 Left = 70
Top = 12 Top = 12
@ -159,14 +160,13 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
object cbxTrimestres: TcxComboBox object cbxTrimestres: TcxComboBox
Left = 129 Left = 129
Top = 10 Top = 10
Width = 275
Height = 21
ParentFont = False ParentFont = False
Properties.DropDownListStyle = lsFixedList Properties.DropDownListStyle = lsFixedList
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnEditValueChanged = cbxTrimestresPropertiesEditValueChanged Properties.OnEditValueChanged = cbxTrimestresPropertiesEditValueChanged
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 0 TabOrder = 0
Width = 275
end end
end end
end end
@ -181,6 +181,7 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
BorderWidth = 10 BorderWidth = 10
Color = 16383743 Color = 16383743
TabOrder = 1 TabOrder = 1
Visible = False
object rbGeneral: TRdxRadioButton object rbGeneral: TRdxRadioButton
Left = 129 Left = 129
Top = 10 Top = 10
@ -212,5 +213,65 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
OnClick = rbInmovilizadoClick OnClick = rbInmovilizadoClick
end end
end end
object Panel2: TPanel
Left = 10
Top = 124
Width = 597
Height = 41
Align = alTop
AutoSize = True
BevelOuter = bvNone
BorderWidth = 10
Color = 16383743
TabOrder = 2
object eFechaFin: TLabel
Left = 288
Top = 18
Width = 17
Height = 13
Alignment = taRightJustify
Caption = 'y el'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label1: TLabel
Left = 48
Top = 18
Width = 103
Height = 13
Alignment = taRightJustify
Caption = 'Facturas entre el d'#237'a:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object FechaInicial: TcxDateEdit
Left = 158
Top = 10
ParentFont = False
Properties.ImmediatePost = True
Properties.OnValidate = FechaInicialPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 0
Width = 121
end
object FechaFinal: TcxDateEdit
Left = 312
Top = 10
ParentFont = False
Properties.ImmediatePost = True
Properties.OnValidate = FechaFinalPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 1
Width = 121
end
end
end end
end end

View File

@ -32,7 +32,7 @@ uses
Grids, DBGrids, RdxPaneles, RdxRadioButton, VistaPrevia, AdvPanel, Grids, DBGrids, RdxPaneles, RdxRadioButton, VistaPrevia, AdvPanel,
cxDBEdit, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDBEdit, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
cxButtonEdit, Entidades, InformeTrimestralVentas, InformeTrimestralCompras, cxButtonEdit, Entidades, InformeTrimestralVentas, InformeTrimestralCompras,
TablaTrimestres, cxDropDownEdit; TablaTrimestres, cxDropDownEdit, cxGraphics, cxCalendar;
type type
TfrImprimirInformeTrimestral = class(TRdxFrame) TfrImprimirInformeTrimestral = class(TRdxFrame)
@ -46,11 +46,22 @@ type
rbInmovilizado: TRdxRadioButton; rbInmovilizado: TRdxRadioButton;
eTrimestre: TLabel; eTrimestre: TLabel;
cbxTrimestres: TcxComboBox; cbxTrimestres: TcxComboBox;
Panel2: TPanel;
FechaInicial: TcxDateEdit;
eFechaFin: TLabel;
FechaFinal: TcxDateEdit;
Label1: TLabel;
procedure bCancelarClick(Sender: TObject); procedure bCancelarClick(Sender: TObject);
procedure bImprimirClick(Sender: TObject); procedure bImprimirClick(Sender: TObject);
procedure cbxTrimestresPropertiesEditValueChanged(Sender: TObject); procedure cbxTrimestresPropertiesEditValueChanged(Sender: TObject);
procedure rbGeneralClick(Sender: TObject); procedure rbGeneralClick(Sender: TObject);
procedure rbInmovilizadoClick(Sender: TObject); procedure rbInmovilizadoClick(Sender: TObject);
procedure FechaInicialPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
procedure FechaFinalPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
private private
FListaTrimestres : TListaTrimestres; FListaTrimestres : TListaTrimestres;
FCodigoTrimestre : Variant; FCodigoTrimestre : Variant;
@ -76,8 +87,8 @@ implementation
{$R *.DFM} {$R *.DFM}
uses uses
Variants, BaseDatos, Clientes, Mensajes, StrFunc, Literales, Mensajes, Variants, BaseDatos, Clientes, StrFunc, DateFunc,
TablaFacturasCliente, TablaFacturasProveedor; TablaFacturasCliente, TablaFacturasProveedor, cxDateUtils;
constructor TfrImprimirInformeTrimestral.Create(AOwner : TComponent); constructor TfrImprimirInformeTrimestral.Create(AOwner : TComponent);
var var
@ -91,6 +102,13 @@ begin
FListaTrimestres := TListaTrimestres.Create(tlcTriTodos); FListaTrimestres := TListaTrimestres.Create(tlcTriTodos);
cbxTrimestres.ItemIndex := FListaTrimestres.cargarLista(cbxTrimestres.Properties.Items); cbxTrimestres.ItemIndex := FListaTrimestres.cargarLista(cbxTrimestres.Properties.Items);
FechaInicial.Date := DarDiaInicioMesDat;
FechaFinal.Date := DarDiaFinalMesDat;
FInformeTrimestralVentas.FechaIni := FechaInicial.Date;
FInformeTrimestralVentas.FechaFin := FechaFinal.Date;
FInformeTrimestralCompras.FechaIni := FechaInicial.Date;
FInformeTrimestralCompras.FechaFin := FechaFinal.Date;
end; end;
procedure TfrImprimirInformeTrimestral.bCancelarClick(Sender: TObject); procedure TfrImprimirInformeTrimestral.bCancelarClick(Sender: TObject);
@ -156,12 +174,12 @@ end;
function TfrImprimirInformeTrimestral.CambiarEntidad(EntidadAnterior, Entidad: TRdxEntidad): Boolean; function TfrImprimirInformeTrimestral.CambiarEntidad(EntidadAnterior, Entidad: TRdxEntidad): Boolean;
begin begin
inherited CambiarEntidad(EntidadAnterior, Entidad); inherited CambiarEntidad(EntidadAnterior, Entidad);
{
if (Entidad = entInformeTrimestralVentas) then if (Entidad = entInformeTrimestralVentas) then
pnlCompras.Visible := False pnlCompras.Visible := False
else if (Entidad = entInformeTrimestralCompras) then else if (Entidad = entInformeTrimestralCompras) then
pnlCompras.Visible := True; pnlCompras.Visible := True;
}
GenerarInforme; GenerarInforme;
end; end;
@ -176,4 +194,50 @@ begin
GenerarInforme; GenerarInforme;
end; end;
procedure TfrImprimirInformeTrimestral.FechaInicialPropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
var
ADate : TDateTime;
begin
try
if DisplayValue > FechaFinal.Date then
begin
ErrorText := msgFechasMal;
Error := True;
Exit;
end;
TextToDateEx(DisplayValue, ADate);
FInformeTrimestralVentas.FechaIni := ADate;
FInformeTrimestralCompras.FechaIni := ADate;
GenerarInforme;
except
Error := True;
ErrorText := msgFechaNoValida;
end;
end;
procedure TfrImprimirInformeTrimestral.FechaFinalPropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
var
ADate : TDateTime;
begin
try
if DisplayValue < FechaInicial.Date then
begin
ErrorText := msgFechasMal;
Error := True;
Exit;
end;
TextToDateEx(DisplayValue, ADate);
FInformeTrimestralVentas.FechaFin := ADate;
FInformeTrimestralCompras.FechaFin := ADate;
GenerarInforme;
except
Error := True;
ErrorText := msgFechaNoValida;
end;
end;
end. end.

View File

@ -42,6 +42,8 @@ type
private private
FTipo : TTipoFacturaProveedor; FTipo : TTipoFacturaProveedor;
FCodigoTrimestre : Variant; FCodigoTrimestre : Variant;
FFechaFin: TDateTime;
FFechaIni: TDateTime;
FListaCodTiposOp : TStringList; FListaCodTiposOp : TStringList;
FListaDesTiposOp : TStringList; FListaDesTiposOp : TStringList;
function RellenarListaTipoOp : boolean; function RellenarListaTipoOp : boolean;
@ -56,6 +58,8 @@ type
published published
property Tipo : TTipoFacturaProveedor read FTipo write FTipo; property Tipo : TTipoFacturaProveedor read FTipo write FTipo;
property CodigoTrimestre : variant read FCodigoTrimestre write FCodigoTrimestre; property CodigoTrimestre : variant read FCodigoTrimestre write FCodigoTrimestre;
property FechaIni : TDateTime read FFechaIni write FFechaIni;
property FechaFin : TDateTime read FFechaFin write FFechaFin;
end; end;
var var
@ -121,7 +125,9 @@ begin
SQL.Add('IVA, IMPORTEIVA, IMPORTETOTAL '); SQL.Add('IVA, IMPORTEIVA, IMPORTETOTAL ');
SQL.Add('from FACTURASPROVEEDOR'); SQL.Add('from FACTURASPROVEEDOR');
SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA'); SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA');
SQL.Add('and CODIGOTRIMESTRE = :CODIGO '); // SQL.Add('and CODIGOTRIMESTRE = :CODIGO ');
SQL.Add('and FECHAFACTURA between :FECHAINI and :FECHAFIN ');
if Tipo = tipGeneral if Tipo = tipGeneral
then SQL.Add('and TIPOFACTURA between 0 and 13 ') then SQL.Add('and TIPOFACTURA between 0 and 13 ')
@ -129,7 +135,10 @@ begin
SQL.Add('order by FECHAFACTURA, NOMBRE'); SQL.Add('order by FECHAFACTURA, NOMBRE');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('CODIGO').AsString := FCodigoTrimestre; // ParamByName('CODIGO').AsString := FCodigoTrimestre;
ParamByName('FECHAINI').AsDateTime := FFechaIni;
ParamByName('FECHAFIN').AsDateTime := FFechaFin;
Prepare; Prepare;
end; end;
@ -142,7 +151,8 @@ begin
SQL.Add('from FACTURASPROVEEDOR F, TIPOSFACTURAS T'); SQL.Add('from FACTURASPROVEEDOR F, TIPOSFACTURAS T');
SQL.Add('where F.TIPOFACTURA = T.CODIGO'); SQL.Add('where F.TIPOFACTURA = T.CODIGO');
SQL.Add('and F.CODIGOEMPRESA = :CODIGOEMPRESA'); SQL.Add('and F.CODIGOEMPRESA = :CODIGOEMPRESA');
SQL.Add('and F.CODIGOTRIMESTRE = :CODIGO'); // SQL.Add('and F.CODIGOTRIMESTRE = :CODIGO');
SQL.Add('and FECHAFACTURA between :FECHAINI and :FECHAFIN ');
if Tipo = tipGeneral if Tipo = tipGeneral
then SQL.Add('and TIPOFACTURA between 0 and 13 ') then SQL.Add('and TIPOFACTURA between 0 and 13 ')
@ -151,7 +161,10 @@ begin
SQL.Add('group by T.CODIGO, T.DESCRIPCION'); SQL.Add('group by T.CODIGO, T.DESCRIPCION');
SQL.Add('order by T.CODIGO, T.DESCRIPCION'); SQL.Add('order by T.CODIGO, T.DESCRIPCION');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('CODIGO').AsString := FCodigoTrimestre; // ParamByName('CODIGO').AsString := FCodigoTrimestre;
ParamByName('FECHAINI').AsDateTime := FFechaIni;
ParamByName('FECHAFIN').AsDateTime := FFechaFin;
Prepare; Prepare;
end; end;
end; end;

View File

@ -39,6 +39,8 @@ type
TablaFacturas: TIBQuery; TablaFacturas: TIBQuery;
private private
FCodigoTrimestre : Variant; FCodigoTrimestre : Variant;
FFechaFin: TDateTime;
FFechaIni: TDateTime;
FListaIVA : TStringList; FListaIVA : TStringList;
FListaRE : TStringList; FListaRE : TStringList;
function RellenarListaIVA : boolean; function RellenarListaIVA : boolean;
@ -51,6 +53,8 @@ type
destructor Destroy; override; destructor Destroy; override;
published published
property CodigoTrimestre : variant read FCodigoTrimestre write FCodigoTrimestre; property CodigoTrimestre : variant read FCodigoTrimestre write FCodigoTrimestre;
property FechaIni : TDateTime read FFechaIni write FFechaIni;
property FechaFin : TDateTime read FFechaFin write FFechaFin;
end; end;
var var
@ -131,10 +135,15 @@ begin
SQL.Add('from FACTURASCLIENTE FC, TIPOSFACTURAS TF '); SQL.Add('from FACTURASCLIENTE FC, TIPOSFACTURAS TF ');
SQL.Add('where TIPOFACTURA = TF.CODIGO '); SQL.Add('where TIPOFACTURA = TF.CODIGO ');
SQL.Add('and CODIGOEMPRESA = :CODIGOEMPRESA'); SQL.Add('and CODIGOEMPRESA = :CODIGOEMPRESA');
SQL.Add('and CODIGOTRIMESTRE = :CODIGO '); // SQL.Add('and CODIGOTRIMESTRE = :CODIGO ');
SQL.Add('and FECHAFACTURA between :FECHAINI and :FECHAFIN ');
SQL.Add('order by FECHAFACTURA, FC.CODIGO'); SQL.Add('order by FECHAFACTURA, FC.CODIGO');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('CODIGO').AsString := FCodigoTrimestre; // ParamByName('CODIGO').AsString := FCodigoTrimestre;
ParamByName('FECHAINI').AsDateTime := FFechaIni;
ParamByName('FECHAFIN').AsDateTime := FFechaFin;
Prepare; Prepare;
end; end;
end; end;

View File

@ -71,7 +71,7 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
InformeTrimestral, HistorialFacturacionProveedores, Configuracion, InformeTrimestral, ImprimirInformeTrimestral, HistorialFacturacionProveedores, Configuracion,
TablaProveedores, StrFunc, Mensajes, Literales; TablaProveedores, StrFunc, Mensajes, Literales;
procedure TfrInformesCompras.bSeleccionarClick(Sender: TObject); procedure TfrInformesCompras.bSeleccionarClick(Sender: TObject);
@ -87,9 +87,14 @@ end;
procedure TfrInformesCompras.RdxBoton3Click(Sender: TObject); procedure TfrInformesCompras.RdxBoton3Click(Sender: TObject);
begin begin
Contenido := TfrInformeTrimestral.Create(Self); // Quitamos pantalla en la que se pueden modificar las facturas entre trimestres.
// Contenido := TfrInformeTrimestral.Create(Self);
// Contenido.Entidad := entInformeTrimestralCompras;
// Contenido.Modo := Consultar;
Contenido := TfrImprimirInformeTrimestral.Create(Self);
Contenido.Entidad := entInformeTrimestralCompras; Contenido.Entidad := entInformeTrimestralCompras;
Contenido.Modo := Consultar; Contenido.Modo := Imprimir;
end; end;
constructor TfrInformesCompras.Create(AOwner: TComponent); constructor TfrInformesCompras.Create(AOwner: TComponent);

View File

@ -80,9 +80,9 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
Configuracion, InformeTrimestral, ImprimirLibro, ImprimirBeneficiosAnuales, Configuracion, InformeTrimestral, ImprimirInformeTrimestral, ImprimirLibro,
ImprimirBeneficiosAnualesContratos, TablaFacturasCliente, TablaContratos, ImprimirBeneficiosAnuales, ImprimirBeneficiosAnualesContratos,
Literales, Mensajes; TablaFacturasCliente, TablaContratos, Literales, Mensajes;
procedure TfrInformesContabilidad.RdxBoton1Click(Sender: TObject); procedure TfrInformesContabilidad.RdxBoton1Click(Sender: TObject);
@ -95,16 +95,24 @@ end;
procedure TfrInformesContabilidad.RdxBoton3Click(Sender: TObject); procedure TfrInformesContabilidad.RdxBoton3Click(Sender: TObject);
begin begin
Contenido := TfrInformeTrimestral.Create(Self); // Contenido := TfrInformeTrimestral.Create(Self);
// Contenido.Entidad := entInformeTrimestralCompras;
// Contenido.Modo := Consultar;
Contenido := TfrImprimirInformeTrimestral.Create(Self);
Contenido.Entidad := entInformeTrimestralCompras; Contenido.Entidad := entInformeTrimestralCompras;
Contenido.Modo := Consultar; Contenido.Modo := Imprimir;
end; end;
procedure TfrInformesContabilidad.bSeleccionarClick(Sender: TObject); procedure TfrInformesContabilidad.bSeleccionarClick(Sender: TObject);
begin begin
Contenido := TfrInformeTrimestral.Create(Self); // Contenido := TfrInformeTrimestral.Create(Self);
// Contenido.Entidad := entInformeTrimestralVentas;
// Contenido.Modo := Consultar;
Contenido := TfrImprimirInformeTrimestral.Create(Self);
Contenido.Entidad := entInformeTrimestralVentas; Contenido.Entidad := entInformeTrimestralVentas;
Contenido.Modo := Consultar; Contenido.Modo := Imprimir;
end; end;
procedure TfrInformesContabilidad.RdxBoton2Click(Sender: TObject); procedure TfrInformesContabilidad.RdxBoton2Click(Sender: TObject);

View File

@ -113,7 +113,7 @@ implementation
uses uses
Configuracion, ListadoPagosCliente, HistorialFacturacionClientes, Configuracion, ListadoPagosCliente, HistorialFacturacionClientes,
ListadoFacturacionProcedencia, ListadoContratacionProcedencia, ListadoFacturacionProcedencia, ListadoContratacionProcedencia,
ListadoPresupuestosProcedencia, ListadoPresupuestosProcedencia, ImprimirInformeTrimestral,
InformeTrimestral, TablaClientes, StrFunc, Mensajes, Literales; InformeTrimestral, TablaClientes, StrFunc, Mensajes, Literales;
procedure TfrInformesVentas.RdxBoton3Click(Sender: TObject); procedure TfrInformesVentas.RdxBoton3Click(Sender: TObject);
@ -135,9 +135,14 @@ end;
procedure TfrInformesVentas.RdxBoton4Click(Sender: TObject); procedure TfrInformesVentas.RdxBoton4Click(Sender: TObject);
begin begin
Contenido := TfrInformeTrimestral.Create(Self); // Quitamos pantalla en la que se pueden modificar las facturas entre trimestres.
// Contenido := TfrInformeTrimestral.Create(Self);
// Contenido.Entidad := entInformeTrimestralVentas;
// Contenido.Modo := Consultar;
Contenido := TfrImprimirInformeTrimestral.Create(Self);
Contenido.Entidad := entInformeTrimestralVentas; Contenido.Entidad := entInformeTrimestralVentas;
Contenido.Modo := Consultar; Contenido.Modo := Imprimir;
end; end;
constructor TfrInformesVentas.Create(AOwner: TComponent); constructor TfrInformesVentas.Create(AOwner: TComponent);

View File

@ -2084,8 +2084,7 @@ object fPantallaAcceso: TfPantallaAcceso
AppStoragePath = '\' AppStoragePath = '\'
Options = [] Options = []
StoredProps.Strings = ( StoredProps.Strings = (
'Usuario.Text' 'Usuario.Text')
'Clave.Text')
StoredValues = < StoredValues = <
item item
Name = 'Ruta' Name = 'Ruta'

View File

@ -1,7 +1,7 @@
object frPrincipal: TfrPrincipal object frPrincipal: TfrPrincipal
Left = 0 Left = 0
Top = 0 Top = 0
Width = 778 Width = 443
Height = 270 Height = 270
Align = alClient Align = alClient
Color = 14280169 Color = 14280169
@ -11,7 +11,7 @@ object frPrincipal: TfrPrincipal
object BarraEstado: TStatusBar object BarraEstado: TStatusBar
Left = 0 Left = 0
Top = 251 Top = 251
Width = 778 Width = 443
Height = 19 Height = 19
Panels = < Panels = <
item item
@ -21,7 +21,7 @@ object frPrincipal: TfrPrincipal
object pnlBarraSuperior: TRdxGradientePanel object pnlBarraSuperior: TRdxGradientePanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 778 Width = 443
Height = 70 Height = 70
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -34,7 +34,7 @@ object frPrincipal: TfrPrincipal
ColorShadow = clNone ColorShadow = clNone
ColorStart = 7884880 ColorStart = 7884880
object imgFondo: TImage object imgFondo: TImage
Left = -1222 Left = -1557
Top = 0 Top = 0
Width = 2000 Width = 2000
Height = 70 Height = 70

View File

@ -352,12 +352,12 @@ end;
procedure TfrPrincipal.actContabilidadUpdate(Sender: TObject); procedure TfrPrincipal.actContabilidadUpdate(Sender: TObject);
begin begin
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_TOTAL); (Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND ((dmBaseDatos.Privilegios = CTE_PRIVILEGIO_TIENDA) or (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA));
end; end;
procedure TfrPrincipal.actInformesUpdate(Sender: TObject); procedure TfrPrincipal.actInformesUpdate(Sender: TObject);
begin begin
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_TOTAL); (Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND ((dmBaseDatos.Privilegios = CTE_PRIVILEGIO_TIENDA) or (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA));
end; end;
end. end.

View File

@ -73,6 +73,11 @@ object frBarraProveedores: TfrBarraProveedores
FontDown.Height = -11 FontDown.Height = -11
FontDown.Name = 'Tahoma' FontDown.Name = 'Tahoma'
FontDown.Style = [] FontDown.Style = []
FontDisabled.Charset = DEFAULT_CHARSET
FontDisabled.Color = clWindowText
FontDisabled.Height = -11
FontDisabled.Name = 'MS Sans Serif'
FontDisabled.Style = []
Glyph.Data = { Glyph.Data = {
B6100000424DB610000000000000B60000002800000020000000200000000100 B6100000424DB610000000000000B60000002800000020000000200000000100
2000000000000010000000000000000000001000000000000000000000000000 2000000000000010000000000000000000001000000000000000000000000000
@ -237,6 +242,11 @@ object frBarraProveedores: TfrBarraProveedores
FontDown.Height = -11 FontDown.Height = -11
FontDown.Name = 'Tahoma' FontDown.Name = 'Tahoma'
FontDown.Style = [] FontDown.Style = []
FontDisabled.Charset = DEFAULT_CHARSET
FontDisabled.Color = clWindowText
FontDisabled.Height = -11
FontDisabled.Name = 'MS Sans Serif'
FontDisabled.Style = []
Glyph.Data = { Glyph.Data = {
36180000424D3618000000000000360800002800000020000000200000000100 36180000424D3618000000000000360800002800000020000000200000000100
2000000000000010000000000000000000000001000000000000000000000000 2000000000000010000000000000000000000001000000000000000000000000
@ -431,6 +441,11 @@ object frBarraProveedores: TfrBarraProveedores
FontDown.Height = -11 FontDown.Height = -11
FontDown.Name = 'Tahoma' FontDown.Name = 'Tahoma'
FontDown.Style = [] FontDown.Style = []
FontDisabled.Charset = DEFAULT_CHARSET
FontDisabled.Color = clWindowText
FontDisabled.Height = -11
FontDisabled.Name = 'MS Sans Serif'
FontDisabled.Style = []
Glyph.Data = { Glyph.Data = {
36100000424D3610000000000000360000002800000020000000200000000100 36100000424D3610000000000000360000002800000020000000200000000100
2000000000000010000000000000000000000000000000000000FF00FF00FF00 2000000000000010000000000000000000000000000000000000FF00FF00FF00
@ -613,11 +628,13 @@ object frBarraProveedores: TfrBarraProveedores
Caption = 'Facturas de proveedores' Caption = 'Facturas de proveedores'
ImageIndex = 1 ImageIndex = 1
OnExecute = actFacturasExecute OnExecute = actFacturasExecute
OnUpdate = actFacturasUpdate
end end
object actPagos: TAction object actPagos: TAction
Caption = 'Pagos de proveedores' Caption = 'Pagos de proveedores'
ImageIndex = 2 ImageIndex = 2
OnExecute = actPagosExecute OnExecute = actPagosExecute
OnUpdate = actPagosUpdate
end end
end end
end end

View File

@ -49,6 +49,8 @@ type
procedure actFacturasExecute(Sender: TObject); procedure actFacturasExecute(Sender: TObject);
procedure actProveedoresExecute(Sender: TObject); procedure actProveedoresExecute(Sender: TObject);
procedure actPagosExecute(Sender: TObject); procedure actPagosExecute(Sender: TObject);
procedure actFacturasUpdate(Sender: TObject);
procedure actPagosUpdate(Sender: TObject);
public public
constructor Create (AOwner: TComponent); override; constructor Create (AOwner: TComponent); override;
end; end;
@ -59,7 +61,8 @@ var
implementation implementation
{$R *.DFM} {$R *.DFM}
uses uses
Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion; RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion,
BaseDatos;
constructor TfrBarraProveedores.Create (AOwner: TComponent); constructor TfrBarraProveedores.Create (AOwner: TComponent);
begin begin
@ -84,4 +87,16 @@ begin
Contenido := TfrPagosProveedores.Create(Self); Contenido := TfrPagosProveedores.Create(Self);
end; end;
procedure TfrBarraProveedores.actFacturasUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA);
end;
procedure TfrBarraProveedores.actPagosUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA);
end;
end. end.

View File

@ -186,41 +186,33 @@ object frHistorialFacturacionProveedores: TfrHistorialFacturacionProveedores
object cbCantidadMin: TcxCheckBox object cbCantidadMin: TcxCheckBox
Left = 72 Left = 72
Top = 64 Top = 64
Width = 161
Height = 21
Caption = 'S'#243'lo facturas que superen:' Caption = 'S'#243'lo facturas que superen:'
ParentColor = False ParentColor = False
ParentFont = False
Properties.ImmediatePost = True Properties.ImmediatePost = True
Properties.OnChange = cbCantidadMinPropertiesChange Properties.OnChange = cbCantidadMinPropertiesChange
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
OnClick = cbCantidadMinClick OnClick = cbCantidadMinClick
Width = 161
end end
object CantidadMinima: TcxSpinEdit object CantidadMinima: TcxSpinEdit
Left = 227 Left = 227
Top = 64 Top = 64
Width = 110
Height = 21
Enabled = False Enabled = False
ParentFont = False
Properties.ImmediatePost = True Properties.ImmediatePost = True
Properties.Increment = 100.000000000000000000 Properties.Increment = 100.000000000000000000
Properties.ValueType = vtInt Properties.ValueType = vtInt
Properties.OnValidate = CantidadMinimaPropertiesValidate Properties.OnValidate = CantidadMinimaPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 1 TabOrder = 1
Value = 3000 Value = 3000
Width = 110
end end
object NombreProvIni: TcxButtonEdit object NombreProvIni: TcxButtonEdit
Left = 152 Left = 152
Top = 37 Top = 37
Width = 185
Height = 21
ParentFont = False ParentFont = False
Properties.Buttons = < Properties.Buttons = <
item item
@ -274,17 +266,13 @@ object frHistorialFacturacionProveedores: TfrHistorialFacturacionProveedores
Properties.OnButtonClick = NombreProvIniPropertiesButtonClick Properties.OnButtonClick = NombreProvIniPropertiesButtonClick
Properties.OnValidate = NombreProvIniPropertiesValidate Properties.OnValidate = NombreProvIniPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 2 TabOrder = 2
Text = 'NombreProvIni' Text = 'NombreProvIni'
Width = 185
end end
object NombreProvFin: TcxButtonEdit object NombreProvFin: TcxButtonEdit
Left = 450 Left = 450
Top = 37 Top = 37
Width = 185
Height = 21
ParentFont = False ParentFont = False
Properties.Buttons = < Properties.Buttons = <
item item
@ -338,11 +326,9 @@ object frHistorialFacturacionProveedores: TfrHistorialFacturacionProveedores
Properties.OnButtonClick = NombreProvFinPropertiesButtonClick Properties.OnButtonClick = NombreProvFinPropertiesButtonClick
Properties.OnValidate = NombreProvFinPropertiesValidate Properties.OnValidate = NombreProvFinPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 3 TabOrder = 3
Text = 'NombreProvFin' Text = 'NombreProvFin'
Width = 185
end end
object rbTrimestre: TRdxRadioButton object rbTrimestre: TRdxRadioButton
Left = 48 Left = 48
@ -363,17 +349,13 @@ object frHistorialFacturacionProveedores: TfrHistorialFacturacionProveedores
object cbxTrimestres: TcxComboBox object cbxTrimestres: TcxComboBox
Left = 196 Left = 196
Top = 109 Top = 109
Width = 275
Height = 21
ParentFont = False ParentFont = False
Properties.DropDownListStyle = lsFixedList Properties.DropDownListStyle = lsFixedList
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnEditValueChanged = cbxTrimestresPropertiesEditValueChanged Properties.OnEditValueChanged = cbxTrimestresPropertiesEditValueChanged
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 5 TabOrder = 5
Width = 275
end end
object rbFechas: TRdxRadioButton object rbFechas: TRdxRadioButton
Left = 48 Left = 48
@ -392,47 +374,36 @@ object frHistorialFacturacionProveedores: TfrHistorialFacturacionProveedores
object FechaInicial: TcxDateEdit object FechaInicial: TcxDateEdit
Left = 196 Left = 196
Top = 133 Top = 133
Width = 121
Height = 21
Enabled = False Enabled = False
ParentFont = False ParentFont = False
Properties.ImmediatePost = True Properties.ImmediatePost = True
Properties.OnValidate = FechaIniPropertiesValidate Properties.OnValidate = FechaIniPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 7 TabOrder = 7
Width = 121
end end
object FechaFinal: TcxDateEdit object FechaFinal: TcxDateEdit
Left = 350 Left = 350
Top = 133 Top = 133
Width = 121
Height = 21
Enabled = False Enabled = False
ParentFont = False ParentFont = False
Properties.ImmediatePost = True Properties.ImmediatePost = True
Properties.OnValidate = FechaFinPropertiesValidate Properties.OnValidate = FechaFinPropertiesValidate
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 8 TabOrder = 8
Width = 121
end end
object cbAgrupar: TcxCheckBox object cbAgrupar: TcxCheckBox
Left = 347 Left = 347
Top = 64 Top = 64
Width = 161
Height = 21
Caption = 'Desglosar por proveedor' Caption = 'Desglosar por proveedor'
ParentColor = False ParentColor = False
ParentFont = False
Properties.OnChange = cbAgruparPropertiesChange Properties.OnChange = cbAgruparPropertiesChange
State = cbsChecked State = cbsChecked
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 9 TabOrder = 9
Width = 161
end end
end end
end end

View File

@ -36,7 +36,7 @@ uses
cxContainer, cxEdit, cxTextEdit, StdCtrls, AdvPanel, ExtCtrls, Configuracion, cxContainer, cxEdit, cxTextEdit, StdCtrls, AdvPanel, ExtCtrls, Configuracion,
cxCheckBox, cxSpinEdit, InformeHistorialFacturacionProveedores, VistaPrevia, cxCheckBox, cxSpinEdit, InformeHistorialFacturacionProveedores, VistaPrevia,
TablaProveedores, TablaTrimestres, RdxRadioButton, RdxShape, Entidades, TablaProveedores, TablaTrimestres, RdxRadioButton, RdxShape, Entidades,
InformeResumenFacturacionProveedores; InformeResumenFacturacionProveedores, cxGraphics;
type type
TfrHistorialFacturacionProveedores = class(TRdxFrame) TfrHistorialFacturacionProveedores = class(TRdxFrame)

Binary file not shown.

Binary file not shown.