Se adapta el programa para poder facturar albaranes, poner correos distintos a las sucursales de la empresa y se hace bien la politica de restricciones con una tabla y todo. Se repasan cabeceras de informes
git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoArmarios_FactuGES/trunk@35 0a814768-cfdd-9c42-8d01-223fcc10da9d
This commit is contained in:
parent
1367ac9a7e
commit
6d23da04ff
@ -1,7 +1,7 @@
|
||||
object dmBaseDatos: TdmBaseDatos
|
||||
OldCreateOrder = True
|
||||
Left = 544
|
||||
Top = 343
|
||||
Left = 545
|
||||
Top = 395
|
||||
Height = 235
|
||||
Width = 461
|
||||
end
|
||||
|
||||
@ -160,7 +160,7 @@ type
|
||||
function DarUsuario : string;
|
||||
function GetRutaBD: String;
|
||||
function GetNombreServidor: String;
|
||||
function validarPrivilegios: Boolean;
|
||||
function validarUsuario: Boolean;
|
||||
|
||||
public
|
||||
procedure Commit;
|
||||
@ -514,7 +514,7 @@ begin
|
||||
Screen.Cursor := crHourGlass;
|
||||
Connected := True;
|
||||
FTransaccionBD.StartTransaction;
|
||||
if (ValidarPrivilegios) then
|
||||
if (ValidarUsuario) then
|
||||
begin
|
||||
GestorContadores.BD := FBD;
|
||||
GestorContadores.Transaccion := FTransaccionBD;
|
||||
@ -595,12 +595,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TdmBaseDatos.validarPrivilegios: Boolean;
|
||||
function TdmBaseDatos.validarUsuario: Boolean;
|
||||
var
|
||||
oSQL : TIBSQL;
|
||||
begin
|
||||
//Por si en un futuro se desea establecer una politica de privilegios de usuario
|
||||
//para cada EmpresaActiva.
|
||||
Result := False;
|
||||
|
||||
oSQL := TIBSQL.Create(Self);
|
||||
@ -608,7 +606,7 @@ begin
|
||||
begin
|
||||
Database := dmBaseDatos.BD;
|
||||
Transaction := dmBaseDatos.Transaccion;
|
||||
SQL.Add('select perfil ');
|
||||
SQL.Add('select usuario ');
|
||||
SQL.Add('from usuarios ');
|
||||
SQL.Add('where UPPER(usuario) = UPPER(:usuario) ');
|
||||
ParamByName('usuario').AsString := Usuario;
|
||||
@ -617,10 +615,7 @@ begin
|
||||
ExecQuery;
|
||||
// Compruebo si se han recuperado datos
|
||||
if (RecordCount > 0) then
|
||||
begin
|
||||
FPrivilegios := Fields[0].AsString;
|
||||
Result := True;
|
||||
end;
|
||||
finally
|
||||
Close;
|
||||
Transaction := NIL;
|
||||
|
||||
@ -48,6 +48,8 @@ type
|
||||
Provincia : String;
|
||||
Telefono : String;
|
||||
Fax : String;
|
||||
Correo : String;
|
||||
Web: String;
|
||||
procedure SalvarDatos;
|
||||
procedure Eliminar;
|
||||
end;
|
||||
@ -68,8 +70,10 @@ type
|
||||
TDatosEmpresa = class(TObjeto)
|
||||
private
|
||||
FDirecciones : TListaDireccionesEmpresa;
|
||||
FRestricciones: TStringList;
|
||||
protected
|
||||
procedure ObtenerDatos; override;
|
||||
procedure ObtenerRestricciones;
|
||||
public
|
||||
Codigo : Integer;
|
||||
FechaAlta : String;
|
||||
@ -86,6 +90,7 @@ type
|
||||
LibroDefecto : String;
|
||||
Logotipo : TPicture;
|
||||
property Direcciones : TListaDireccionesEmpresa read FDirecciones;
|
||||
property Restricciones : TStringList read FRestricciones;
|
||||
constructor Create; overload;
|
||||
constructor Create(CodigoEmpresa : Integer); overload;
|
||||
destructor Destroy; override;
|
||||
@ -116,7 +121,7 @@ implementation
|
||||
{$R *.DFM}
|
||||
|
||||
uses
|
||||
Literales;
|
||||
Literales, Dialogs;
|
||||
|
||||
constructor TdmTablaEmpresas.Create (AOwner : TComponent);
|
||||
begin
|
||||
@ -272,6 +277,9 @@ constructor TDatosEmpresa.Create(CodigoEmpresa: Integer);
|
||||
begin
|
||||
inherited Create;
|
||||
Codigo := CodigoEmpresa;
|
||||
// Recuperar las restricciones de la empresa para el usuario logado
|
||||
FRestricciones := TStringList.Create;
|
||||
ObtenerRestricciones;
|
||||
// Recuperar los datos de la empresa
|
||||
ObtenerDatos;
|
||||
end;
|
||||
@ -280,6 +288,7 @@ constructor TDatosEmpresa.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
FDirecciones := TListaDireccionesEmpresa.Create(Codigo);
|
||||
FRestricciones := TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TDatosEmpresa.Destroy;
|
||||
@ -289,6 +298,13 @@ begin
|
||||
FDirecciones.Free;
|
||||
FDirecciones := NIL;
|
||||
end;
|
||||
|
||||
if Assigned(FRestricciones) then
|
||||
begin
|
||||
FRestricciones.Free;
|
||||
FRestricciones := NIL;
|
||||
end;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
@ -327,7 +343,7 @@ begin
|
||||
NombreComercial := FieldByName('NOMBRECOMERCIAL').AsString;
|
||||
CodigoTrimestre := FieldByName('CODIGOTRIMESTRE').AsString;
|
||||
IvaDefecto := FieldByName('IVADEFECTO').AsString;
|
||||
LibroDefecto := FieldByName('LIBRODEFECTO').AsString;
|
||||
LibroDefecto := FieldByName('LIBRODEFECTO').AsString;
|
||||
ValidezDefecto := FieldByName('VALIDEZDEFECTO').AsString;
|
||||
IntervaloPagosCli := FieldByName('INTERVALOPAGOSCLI').AsFloat;
|
||||
|
||||
@ -349,6 +365,38 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDatosEmpresa.ObtenerRestricciones;
|
||||
var
|
||||
oSQL : TIBQuery;
|
||||
begin
|
||||
oSQL := TIBQuery.Create(dmTablaEmpresas);
|
||||
with oSQL do
|
||||
begin
|
||||
Database := dmBaseDatos.BD;
|
||||
Transaction := dmBaseDatos.Transaccion;
|
||||
SQL.Add('select RESTRICCION ');
|
||||
SQL.Add('from PERMISOS ');
|
||||
SQL.Add('where CODIGOEMPRESA = :codigo ');
|
||||
SQL.Add('and UPPER(usuario) = UPPER(:usuario) ');
|
||||
ParamByName('usuario').AsString := dmBaseDatos.Usuario;
|
||||
ParamByName('codigo').AsInteger := Codigo;
|
||||
try
|
||||
Prepare;
|
||||
Open;
|
||||
// Compruebo si se han recuperado datos
|
||||
while not Eof do
|
||||
begin
|
||||
FRestricciones.Add(FieldByName('RESTRICCION').AsString);
|
||||
Next;
|
||||
end;
|
||||
finally
|
||||
Close;
|
||||
Transaction := NIL;
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TDatosDireccionEmpresa }
|
||||
|
||||
procedure TDatosDireccionEmpresa.Eliminar;
|
||||
@ -434,12 +482,12 @@ begin
|
||||
Add('insert into SUCURSALESEMPRESA ( ');
|
||||
Add('CODIGOEMPRESA, CODIGO, FECHAALTA, USUARIO, ');
|
||||
Add('CALLE, NUMERO, CODIGOPOSTAL, POBLACION, ');
|
||||
Add('PROVINCIA, TELEFONO, FAX) ');
|
||||
Add('PROVINCIA, TELEFONO, FAX, CORREO, WEB) ');
|
||||
Add('values ( ');
|
||||
Add(':CODIGOEMPRESA, :CODIGO, CURRENT_DATE, ');
|
||||
Add('CURRENT_USER, :CALLE, :NUMERO, ');
|
||||
Add(':CODIGOPOSTAL, :POBLACION, :PROVINCIA, ');
|
||||
Add(':TELEFONO, :FAX) ');
|
||||
Add(':TELEFONO, :FAX, :CORREO, :WEB) ');
|
||||
end
|
||||
else begin
|
||||
Add('update SUCURSALESEMPRESA set ');
|
||||
@ -450,6 +498,7 @@ begin
|
||||
Add('PROVINCIA = :PROVINCIA, ');
|
||||
Add('TELEFONO = :TELEFONO, ');
|
||||
Add('FAX = :FAX ');
|
||||
Add('CORREO = :CORREO ');
|
||||
Add('WHERE (CODIGOEMPRESA = :CODIGOEMPRESA) AND (CODIGO = :CODIGO) ');
|
||||
end;
|
||||
end;
|
||||
@ -462,6 +511,8 @@ begin
|
||||
ParamByName('PROVINCIA').AsString := Provincia;
|
||||
ParamByName('TELEFONO').AsString := Telefono;
|
||||
ParamByName('FAX').AsString := Fax;
|
||||
ParamByName('CORREO').AsString := Correo;
|
||||
ParamByName('WEB').AsString := Web;
|
||||
|
||||
try
|
||||
Prepare;
|
||||
@ -508,7 +559,7 @@ begin
|
||||
Database := dmBaseDatos.BD;
|
||||
Transaction := dmBaseDatos.Transaccion;
|
||||
SQL.Add('select CODIGO, CALLE, NUMERO, CODIGOPOSTAL, POBLACION, ');
|
||||
SQL.Add('PROVINCIA, TELEFONO, FAX ');
|
||||
SQL.Add('PROVINCIA, TELEFONO, FAX, CORREO, WEB ');
|
||||
SQL.Add('from SUCURSALESEMPRESA ');
|
||||
SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA ');
|
||||
SQL.Add('order by CODIGO');
|
||||
@ -533,6 +584,8 @@ begin
|
||||
Provincia := FieldByName('PROVINCIA').AsString;
|
||||
Telefono := FieldByName('TELEFONO').AsString;
|
||||
Fax := FieldByName('FAX').AsString;
|
||||
Correo := FieldByName('CORREO').AsString;
|
||||
Web := FieldByName('WEB').AsString;
|
||||
end;
|
||||
Add(FDireccion);
|
||||
Next;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
object dmTablaFacturasCliente: TdmTablaFacturasCliente
|
||||
OldCreateOrder = False
|
||||
Left = 503
|
||||
Top = 222
|
||||
Left = 504
|
||||
Top = 256
|
||||
Height = 408
|
||||
Width = 123
|
||||
end
|
||||
|
||||
@ -146,8 +146,10 @@ type
|
||||
function ValidarCodigo(Codigo : String) : Boolean;
|
||||
function FormatearCodigo(Codigo : String) : String;
|
||||
|
||||
function CrearFactura(CodigoContrato, TipoFactura: String) : String;
|
||||
function CrearFacturaContrato(CodigoContrato, TipoFactura: String) : String;
|
||||
function CrearFacturaAlbaran(CodigoAlbaran, TipoFactura: String) : String;
|
||||
function ExisteFacturaConContrato(CodigoContrato : String) : Boolean;
|
||||
function ExisteFacturaConAlbaran(CodigoAlbaran : String) : Boolean;
|
||||
function ExisteFacturaConCliente(Codigo : Variant) : Boolean;
|
||||
function RecalcularPreciosFactura(CodigoFactura : String) : Boolean;
|
||||
function DarDatosFactura(Datos : TDatosFacturaCliente): Boolean;
|
||||
@ -535,6 +537,12 @@ begin
|
||||
Columna.Caption := 'Contrato';
|
||||
Columna.Width := tamColCodigo;
|
||||
Columna.Options.Filtering := False;
|
||||
{Columna CODIGOALBARAN}
|
||||
Columna := CreateColumn;
|
||||
Columna.DataBinding.FieldName := 'CODIGOALBARAN';
|
||||
Columna.Caption := 'Albarán';
|
||||
Columna.Width := tamColCodigo;
|
||||
Columna.Options.Filtering := False;
|
||||
|
||||
end;
|
||||
end;
|
||||
@ -674,7 +682,7 @@ begin
|
||||
Add('select FAC.CODIGO, FAC.CLASEFACTURA, FAC.SITUACION, ');
|
||||
Add('FAC.FECHAALTA, FAC.FECHAFACTURA, FAC.CODIGOCLIENTE, FAC.NIFCIF, ');
|
||||
Add('FAC.NOMBRE, FAC.IMPORTETOTAL, FAC.CODIGODOCUMENTO, DOC.DESCRIPCION, ');
|
||||
Add('FAC.CODIGOCONTRATO ');
|
||||
Add('FAC.CODIGOCONTRATO, FAC.CODIGOALBARAN ');
|
||||
Add('from FACTURASCLIENTE FAC, DOCUMENTOS DOC ');
|
||||
Add('WHERE (FAC.CODIGOEMPRESA = :CODIGOEMPRESA) AND ');
|
||||
Add('(DOC.CODIGO = FAC.CODIGODOCUMENTO)');
|
||||
@ -1617,7 +1625,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TdmTablaFacturasCliente.CrearFactura(CodigoContrato, TipoFactura: String): String;
|
||||
function TdmTablaFacturasCliente.CrearFacturaContrato(CodigoContrato, TipoFactura: String): String;
|
||||
var
|
||||
oSQL : TIBSQL;
|
||||
oSQL2 : TIBSQL;
|
||||
@ -1862,6 +1870,35 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TdmTablaFacturasCliente.ExisteFacturaConAlbaran(
|
||||
CodigoAlbaran: String): Boolean;
|
||||
var
|
||||
oSQL : TIBSQL;
|
||||
begin
|
||||
Result := False;
|
||||
oSQL := TIBSQL.Create(Self);
|
||||
with oSQL do
|
||||
begin
|
||||
Database := dmBaseDatos.BD;
|
||||
Transaction := dmBaseDatos.Transaccion;
|
||||
SQL.Add('select count(CODIGO) ');
|
||||
SQL.Add('from FACTURASCLIENTE ');
|
||||
SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA');
|
||||
SQL.Add(' and CODIGOALBARAN = :CODIGOALBARAN');
|
||||
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
|
||||
ParamByName('CODIGOALBARAN').AsString := CodigoAlbaran;
|
||||
try
|
||||
Prepare;
|
||||
ExecQuery;
|
||||
Result := not (Fields[0].AsInteger = 0);
|
||||
finally
|
||||
Close;
|
||||
Transaction := NIL;
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TdmTablaFacturasCliente.InicializarGridFacturasCliContrato(var Grid: TcxGrid);
|
||||
var
|
||||
Columna : TcxGridDBColumn;
|
||||
@ -2184,4 +2221,103 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TdmTablaFacturasCliente.CrearFacturaAlbaran(CodigoAlbaran, TipoFactura: String): String;
|
||||
var
|
||||
oSQL : TIBSQL;
|
||||
oSQL2 : TIBSQL;
|
||||
CodigoAux : String;
|
||||
CodigoEmpAux : Integer;
|
||||
CodDoc : String;
|
||||
Cadena : String;
|
||||
begin
|
||||
Result := '';
|
||||
|
||||
CodigoAux := dmTablaFacturasCliente.DarNuevoCodigo;
|
||||
CodigoEmpAux := EmpresaActiva.Codigo;
|
||||
|
||||
oSQL := TIBSQL.Create(Self);
|
||||
try
|
||||
with oSQL do
|
||||
begin
|
||||
Database := dmBaseDatos.BD;
|
||||
Transaction := dmBaseDatos.Transaccion;
|
||||
|
||||
SQL.Add('insert into FACTURASCLIENTE (');
|
||||
SQL.Add('CODIGOEMPRESA, CODIGO, FECHAALTA,');
|
||||
SQL.Add('USUARIO, CODIGODOCUMENTO,');
|
||||
SQL.Add('FECHAFACTURA, SITUACION, CLASEFACTURA, COMISION,');
|
||||
SQL.Add('CODIGOCLIENTE, NIFCIF,');
|
||||
SQL.Add('NOMBRE, CALLE,');
|
||||
SQL.Add('NUMERO, PISO,');
|
||||
SQL.Add('CODIGOPOSTAL, POBLACION,');
|
||||
SQL.Add('PROVINCIA, PERSONACONTACTO,');
|
||||
SQL.Add('OBSERVACIONES, FORMAPAGO, ');
|
||||
SQL.Add('DESCUENTO, IVA,');
|
||||
SQL.Add('BASEIMPONIBLE, IMPORTEDESCUENTO, ');
|
||||
SQL.Add('IMPORTEIVA, IMPORTETOTAL, ');
|
||||
SQL.Add('TIPOFACTURA, CODIGOTRIMESTRE, CODIGOALBARAN) ');
|
||||
SQL.Add('select ' + IntToStr(CodigoEmpAux) + ', ''' + CodigoAux + ''', current_date,');
|
||||
SQL.Add('''' + dmBaseDatos.Usuario + ''', ''VARIOS'',');
|
||||
SQL.Add('current_date, ''PENDIENTE'', ''' + TipoFactura + ''', 1,');
|
||||
SQL.Add('CODIGOCLIENTE,');
|
||||
SQL.Add('NIFCIF, NOMBRE,');
|
||||
SQL.Add('CALLE, NUMERO,');
|
||||
SQL.Add('PISO, CODIGOPOSTAL,');
|
||||
SQL.Add('POBLACION, PROVINCIA,');
|
||||
SQL.Add('PERSONACONTACTO, null, null, DESCUENTO, ' + EmpresaActiva.IvaDefecto + ', ');
|
||||
if TipoFactura = CTE_CF_ABONO then
|
||||
SQL.Add('BASEIMPONIBLE * (-1), IMPORTEDESCUENTO * (-1), IMPORTEIVA * (-1), IMPORTETOTAL * (-1), ')
|
||||
else
|
||||
SQL.Add('BASEIMPONIBLE, IMPORTEDESCUENTO, IMPORTEIVA, IMPORTETOTAL, ');
|
||||
SQL.Add(IntToStr(CTE_TIPFAC_VENTA) + ', ''' + EmpresaActiva.CodigoTrimestre + ''', ');
|
||||
SQL.Add('''' + CODIGOALBARAN + ''' ');
|
||||
SQL.Add('from ALBARANESCLIENTE ');
|
||||
SQL.Add('where CODIGO = ''' + CodigoAlbaran + '''');
|
||||
|
||||
Prepare;
|
||||
ExecQuery;
|
||||
Close;
|
||||
end;
|
||||
|
||||
oSQL2 := TIBSQL.Create(Self);
|
||||
oSQL2.Database := dmBaseDatos.BD;
|
||||
oSQL2.Transaction := dmBaseDatos.Transaccion;
|
||||
|
||||
// Insertar todos los registros
|
||||
with oSQL2 do
|
||||
begin
|
||||
SQL.Add('insert into DETALLESFACTURASCLIARTICULOS (');
|
||||
SQL.Add('CODIGOEMPRESA, CODIGOFACTURA, NUMCONCEPTO,');
|
||||
SQL.Add('CODIGOARTICULO, REFERENCIA, ');
|
||||
SQL.Add('DESCRIPCION, CANTIDAD,');
|
||||
SQL.Add('IMPORTEUNIDAD, IMPORTETOTAL)');
|
||||
SQL.Add('select ' + IntToStr(CodigoEmpAux) + ', ''' + CodigoAux + ''', NUMCONCEPTO,');
|
||||
SQL.Add('CODIGOARTICULO, REFERENCIA, ');
|
||||
SQL.Add('DESCRIPCION, CANTIDAD,');
|
||||
if TipoFactura = CTE_CF_ABONO then
|
||||
SQL.Add('IMPORTEUNIDAD * (-1), IMPORTETOTAL * (-1) ')
|
||||
else
|
||||
SQL.Add('IMPORTEUNIDAD, IMPORTETOTAL ');
|
||||
|
||||
SQL.Add('from DETALLESALBARANESCLIENTE ');
|
||||
SQL.Add('where CODIGOALBARAN = :CODIGOALBARAN');
|
||||
ParamByName('CODIGOALBARAN').AsString := CodigoAlbaran;
|
||||
Prepare;
|
||||
ExecQuery;
|
||||
end;
|
||||
|
||||
RecalcularPreciosFactura(CodigoAux);
|
||||
dmTablaFacturasCliente.IncrementarCodigo;
|
||||
Result := CodigoAux;
|
||||
finally
|
||||
oSQL.Close;
|
||||
oSQL.Transaction := NIL;
|
||||
oSQL.Free;
|
||||
|
||||
oSQL2.Close;
|
||||
oSQL2.Transaction := NIL;
|
||||
oSQL2.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -671,6 +671,15 @@ object frAlbaranesClientes: TfrAlbaranesClientes
|
||||
TabOrder = 1
|
||||
UseDockManager = True
|
||||
Margen = 5
|
||||
object Shape1: TShape
|
||||
Left = 127
|
||||
Top = 4
|
||||
Width = 1
|
||||
Height = 17
|
||||
Brush.Style = bsClear
|
||||
Pen.Color = 5594726
|
||||
Pen.Style = psDot
|
||||
end
|
||||
object bRefrescar: TRdxBoton
|
||||
Left = 4
|
||||
Top = 3
|
||||
@ -715,6 +724,50 @@ object frAlbaranesClientes: TfrAlbaranesClientes
|
||||
TabOrder = 0
|
||||
Spacing = 2
|
||||
end
|
||||
object bFacturar: TRdxBoton
|
||||
Left = 133
|
||||
Top = 3
|
||||
Width = 135
|
||||
Height = 19
|
||||
Action = actFacturarAlbaran
|
||||
Alignment = taLeftJustify
|
||||
Color = 15726583
|
||||
ColorFocused = 12775679
|
||||
ColorDown = 16383743
|
||||
ColorBorder = 8623776
|
||||
ColorHighLight = 5594726
|
||||
ColorShadow = 5594726
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = 5594726
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
FontDown.Charset = DEFAULT_CHARSET
|
||||
FontDown.Color = 5594726
|
||||
FontDown.Height = -11
|
||||
FontDown.Name = 'Tahoma'
|
||||
FontDown.Style = [fsBold]
|
||||
FontDisabled.Charset = DEFAULT_CHARSET
|
||||
FontDisabled.Color = clWindowText
|
||||
FontDisabled.Height = -11
|
||||
FontDisabled.Name = 'MS Sans Serif'
|
||||
FontDisabled.Style = []
|
||||
Glyph.Data = {
|
||||
F6000000424DF600000000000000760000002800000010000000100000000100
|
||||
04000000000080000000320B0000320B000010000000100000003D99A100FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00111111111111
|
||||
1111100000000000000110000000000000011001111111111001100111111111
|
||||
1001111111111001111111111111011011111111111101101111111110001001
|
||||
1111111100000111111111110000011111111111000001111111111110001111
|
||||
1111111111111111111111111111111111111111111111111111}
|
||||
Margin = 3
|
||||
ParentFont = False
|
||||
ParentColor = False
|
||||
TabStop = True
|
||||
TabOrder = 1
|
||||
Spacing = 2
|
||||
end
|
||||
end
|
||||
end
|
||||
object dsAlbaranes: TDataSource
|
||||
@ -818,5 +871,9 @@ object frAlbaranesClientes: TfrAlbaranesClientes
|
||||
Caption = 'Refrescar datos'
|
||||
OnExecute = actRefrescarDatosExecute
|
||||
end
|
||||
object actFacturarAlbaran: TAction
|
||||
Caption = 'Facturar albar'#225'n'
|
||||
OnExecute = actFacturarAlbaranExecute
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -82,6 +82,9 @@ type
|
||||
eNombre: TLabel;
|
||||
Buscar: TcxTextEdit;
|
||||
bLimpiar: TRdxBoton;
|
||||
bFacturar: TRdxBoton;
|
||||
Shape1: TShape;
|
||||
actFacturarAlbaran: TAction;
|
||||
procedure RdxFrameAlbaranesClienteShow(Sender: TObject);
|
||||
procedure actImprimirExecute(Sender: TObject);
|
||||
procedure actAnadirExecute(Sender: TObject);
|
||||
@ -95,6 +98,7 @@ type
|
||||
procedure actRefrescarDatosExecute(Sender: TObject);
|
||||
procedure BuscarPropertiesChange(Sender: TObject);
|
||||
procedure bLimpiarClick(Sender: TObject);
|
||||
procedure actFacturarAlbaranExecute(Sender: TObject);
|
||||
private
|
||||
procedure ActualizarBotones;
|
||||
protected
|
||||
@ -114,8 +118,9 @@ implementation
|
||||
{$R *.DFM}
|
||||
uses
|
||||
BaseDatos, IBDatabase, Literales, IBCustomDataSet, Mensajes, Entidades,
|
||||
Variants, Constantes,
|
||||
TablaEmpresas, TablaAlbaranesCliente, ImprimirAlbaranCliente, AlbaranCliente;
|
||||
Variants, Constantes, FacturarAlbaran,
|
||||
TablaEmpresas, TablaAlbaranesCliente, ImprimirAlbaranCliente, AlbaranCliente,
|
||||
TablaFacturasCliente;
|
||||
|
||||
procedure TfrAlbaranesClientes.BuscarAlbaran;
|
||||
begin
|
||||
@ -239,6 +244,13 @@ end;
|
||||
|
||||
procedure TfrAlbaranesClientes.actEliminarExecute(Sender: TObject);
|
||||
begin
|
||||
if dmTablaFacturasCliente.ExisteFacturaConAlbaran(
|
||||
TablaAlbaranes.FieldByName('CODIGO').AsString) then
|
||||
begin
|
||||
VerMensaje('No se puede eliminar este albarán porque tiene al menos una factura de cliente relacionada.');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
Contenido := TfrAlbaranCliente.Create(Self);
|
||||
Contenido.Modo := Eliminar;
|
||||
end;
|
||||
@ -291,4 +303,31 @@ begin
|
||||
Buscar.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrAlbaranesClientes.actFacturarAlbaranExecute(Sender: TObject);
|
||||
var
|
||||
CodAux : String;
|
||||
begin
|
||||
CodigoAlbaran := TablaAlbaranes.FieldByName('CODIGO').AsString;
|
||||
frFacturarAlbaran := TfrFacturarAlbaran.Create(Self);
|
||||
with frFacturarAlbaran do
|
||||
begin
|
||||
try
|
||||
frFacturarAlbaran.CodigoAlbaran := Self.CodigoAlbaran;
|
||||
ShowModal;
|
||||
|
||||
if ModalResult = mrYes then
|
||||
begin
|
||||
Commit;
|
||||
VerMensajeFmt('La factura asociada a este albarán es %s.', [frFacturarAlbaran.CodigoFactura])
|
||||
end
|
||||
else begin
|
||||
Rollback;
|
||||
VerMensaje('No se ha podido facturar el albarán')
|
||||
end;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
object frFacturarContrato: TfrFacturarContrato
|
||||
Left = 479
|
||||
Top = 236
|
||||
Left = 480
|
||||
Top = 272
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Facturar contrato de cliente'
|
||||
ClientHeight = 244
|
||||
|
||||
@ -89,7 +89,7 @@ begin
|
||||
TipoAux := CTE_CF_FACTURA
|
||||
else
|
||||
TipoAux := CTE_CF_ABONO;
|
||||
FCodigoFactura := dmTablaFacturasCliente.CrearFactura(FCodigoContrato, TipoAux);
|
||||
FCodigoFactura := dmTablaFacturasCliente.CrearFacturaContrato(FCodigoContrato, TipoAux);
|
||||
end;
|
||||
if EsCadenaVacia(FCodigoFactura) then
|
||||
begin
|
||||
|
||||
@ -3,7 +3,7 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 617
|
||||
Height = 416
|
||||
Height = 412
|
||||
Color = 16383743
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -32,7 +32,7 @@ object frImprimirInformeTrimestral: TfrImprimirInformeTrimestral
|
||||
Left = 0
|
||||
Top = 197
|
||||
Width = 617
|
||||
Height = 219
|
||||
Height = 215
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Color = 16383743
|
||||
|
||||
@ -2,8 +2,8 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
Tag = 4
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 928
|
||||
Height = 554
|
||||
Width = 630
|
||||
Height = 410
|
||||
Color = 16383743
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -18,8 +18,8 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object pnlCuerpo: TRdxPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 928
|
||||
Height = 504
|
||||
Width = 630
|
||||
Height = 360
|
||||
Caption = ' '
|
||||
ParentColor = True
|
||||
ColorHighLight = 8623776
|
||||
@ -30,7 +30,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object pnlTitulo: TRdxPanelTituloOperacion
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 928
|
||||
Width = 630
|
||||
Height = 22
|
||||
Caption = ' '
|
||||
Color = 9685681
|
||||
@ -44,8 +44,8 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object pnlContenido: TRdxPanel
|
||||
Left = 0
|
||||
Top = 47
|
||||
Width = 928
|
||||
Height = 457
|
||||
Width = 630
|
||||
Height = 313
|
||||
Caption = ' '
|
||||
BorderWidth = 10
|
||||
ParentColor = True
|
||||
@ -57,13 +57,13 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object Splitter1: TSplitter
|
||||
Left = 160
|
||||
Top = 10
|
||||
Height = 437
|
||||
Height = 293
|
||||
end
|
||||
object pnlGrid: TRdxPanel
|
||||
Left = 163
|
||||
Top = 10
|
||||
Width = 755
|
||||
Height = 437
|
||||
Width = 457
|
||||
Height = 293
|
||||
Caption = ' '
|
||||
ParentColor = True
|
||||
ColorHighLight = 8623776
|
||||
@ -74,8 +74,8 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object gridFacturas: TcxGrid
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 755
|
||||
Height = 437
|
||||
Width = 457
|
||||
Height = 293
|
||||
Align = alClient
|
||||
BevelInner = bvNone
|
||||
BevelKind = bkFlat
|
||||
@ -97,6 +97,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
OnMouseDown = gridFacturasDBTableView1MouseDown
|
||||
OnStartDrag = gridFacturasDBTableView1StartDrag
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
FilterBox.Visible = fvNever
|
||||
OnCustomDrawCell = gridFacturasDBTableView1CustomDrawCell
|
||||
DataController.DataSource = dsFacturas
|
||||
DataController.KeyFieldNames = 'CODIGO'
|
||||
@ -104,7 +105,6 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
Filtering.Visible = fvNever
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.FocusFirstCellOnNewRecord = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
@ -121,6 +121,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
OptionsView.GridLines = glHorizontal
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.HeaderEndEllipsis = True
|
||||
OptionsView.NewItemRowInfoText = 'Click here to add a new row'
|
||||
OptionsView.RowSeparatorColor = 14280169
|
||||
Styles.StyleSheet = dmConfiguracion.StyleSheetGrid
|
||||
end
|
||||
@ -133,7 +134,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 150
|
||||
Height = 437
|
||||
Height = 293
|
||||
Caption = ' '
|
||||
ParentColor = True
|
||||
ColorHighLight = 8623776
|
||||
@ -145,7 +146,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 150
|
||||
Height = 437
|
||||
Height = 293
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
@ -213,7 +214,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object pnlExtra: TRdxBarraSuperior
|
||||
Left = 0
|
||||
Top = 22
|
||||
Width = 928
|
||||
Width = 630
|
||||
Height = 25
|
||||
Caption = ' '
|
||||
BorderWidth = 1
|
||||
@ -385,7 +386,7 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
Spacing = 2
|
||||
end
|
||||
object RdxPanel1: TRdxPanel
|
||||
Left = 628
|
||||
Left = 330
|
||||
Top = 1
|
||||
Width = 299
|
||||
Height = 23
|
||||
@ -414,17 +415,13 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
object cbxTipos: TcxComboBox
|
||||
Left = 105
|
||||
Top = 1
|
||||
Width = 192
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.ReadOnly = False
|
||||
Properties.OnChange = cbxTiposPropertiesChange
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 0
|
||||
Width = 192
|
||||
end
|
||||
end
|
||||
object bCambioTrimestre: TRdxBoton
|
||||
@ -467,8 +464,8 @@ object frInformeTrimestral: TfrInformeTrimestral
|
||||
end
|
||||
object brSalir: TRdxBarraInferior
|
||||
Left = 0
|
||||
Top = 504
|
||||
Width = 928
|
||||
Top = 360
|
||||
Width = 630
|
||||
Height = 50
|
||||
Caption = ' '
|
||||
ParentColor = True
|
||||
|
||||
@ -2,8 +2,8 @@ object frEmpresa: TfrEmpresa
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 497
|
||||
Height = 658
|
||||
Width = 665
|
||||
Height = 773
|
||||
Color = 16383743
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -18,7 +18,7 @@ object frEmpresa: TfrEmpresa
|
||||
object pnlTitulo: TRdxPanelTituloOperacion
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 497
|
||||
Width = 665
|
||||
Height = 22
|
||||
Caption = ' '
|
||||
Color = 11590911
|
||||
@ -32,8 +32,8 @@ object frEmpresa: TfrEmpresa
|
||||
object pnlCuerpo: TPanel
|
||||
Left = 0
|
||||
Top = 22
|
||||
Width = 497
|
||||
Height = 536
|
||||
Width = 665
|
||||
Height = 651
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 10
|
||||
@ -42,8 +42,8 @@ object frEmpresa: TfrEmpresa
|
||||
object pnlDatos: TAdvPanel
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 477
|
||||
Height = 192
|
||||
Width = 645
|
||||
Height = 167
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Color = 16383743
|
||||
@ -196,7 +196,7 @@ object frEmpresa: TfrEmpresa
|
||||
end
|
||||
object eCorreo: TLabel
|
||||
Left = 54
|
||||
Top = 131
|
||||
Top = 158
|
||||
Width = 92
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
@ -207,10 +207,11 @@ object frEmpresa: TfrEmpresa
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 120
|
||||
Top = 159
|
||||
Top = 131
|
||||
Width = 26
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
@ -239,85 +240,76 @@ object frEmpresa: TfrEmpresa
|
||||
object NIF: TcxDBTextEdit
|
||||
Left = 153
|
||||
Top = 73
|
||||
Width = 136
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
DataBinding.DataField = 'NIFCIF'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
TabOrder = 1
|
||||
Height = 21
|
||||
Width = 136
|
||||
end
|
||||
object Nombre: TcxDBTextEdit
|
||||
Left = 153
|
||||
Top = 100
|
||||
Width = 320
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
DataBinding.DataField = 'NOMBRE'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
TabOrder = 2
|
||||
Height = 21
|
||||
Width = 320
|
||||
end
|
||||
object Correo: TcxDBTextEdit
|
||||
Left = 153
|
||||
Top = 127
|
||||
Width = 320
|
||||
Height = 21
|
||||
Top = 154
|
||||
AutoSize = False
|
||||
DataBinding.DataField = 'CORREO'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
Height = 21
|
||||
Width = 320
|
||||
end
|
||||
object Web: TcxDBTextEdit
|
||||
Left = 153
|
||||
Top = 155
|
||||
Width = 320
|
||||
Height = 21
|
||||
Top = 127
|
||||
AutoSize = False
|
||||
DataBinding.DataField = 'WEB'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
TabOrder = 4
|
||||
Height = 21
|
||||
Width = 320
|
||||
end
|
||||
object NombreComercial: TcxDBTextEdit
|
||||
Left = 153
|
||||
Top = 46
|
||||
Width = 320
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
DataBinding.DataField = 'NOMBRECOMERCIAL'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
|
||||
TabOrder = 0
|
||||
Height = 21
|
||||
Width = 320
|
||||
end
|
||||
end
|
||||
object RdxPagesControl1: TRdxPagesControl
|
||||
Left = 10
|
||||
Top = 202
|
||||
Width = 477
|
||||
Height = 324
|
||||
ActivePage = pagLogo
|
||||
Top = 177
|
||||
Width = 645
|
||||
Height = 464
|
||||
ActivePage = pagDirecciones
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
TabWidth = 130
|
||||
@ -334,7 +326,7 @@ object frEmpresa: TfrEmpresa
|
||||
Left = 6
|
||||
Top = 8
|
||||
Width = 457
|
||||
Height = 137
|
||||
Height = 169
|
||||
Caption = 'Direcci'#243'n 1'
|
||||
TabOrder = 0
|
||||
object eDireccion: TLabel
|
||||
@ -435,108 +427,116 @@ object frEmpresa: TfrEmpresa
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label17: TLabel
|
||||
Left = 45
|
||||
Top = 136
|
||||
Width = 37
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Correo:'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Calle1: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 20
|
||||
Width = 224
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 150
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 0
|
||||
Height = 21
|
||||
Width = 224
|
||||
end
|
||||
object Provincia1: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 48
|
||||
Width = 224
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 30
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 2
|
||||
Width = 224
|
||||
end
|
||||
object Numero1: TcxTextEdit
|
||||
Left = 350
|
||||
Top = 20
|
||||
Width = 59
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 20
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 1
|
||||
Height = 21
|
||||
Width = 59
|
||||
end
|
||||
object CodigoPostal1: TcxTextEdit
|
||||
Left = 350
|
||||
Top = 47
|
||||
Width = 59
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 5
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 3
|
||||
Height = 21
|
||||
Width = 59
|
||||
end
|
||||
object Poblacion1: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 76
|
||||
Width = 320
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 40
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 4
|
||||
Width = 320
|
||||
end
|
||||
object Telefono1: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 103
|
||||
Width = 136
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 30
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 5
|
||||
Height = 21
|
||||
Width = 136
|
||||
end
|
||||
object Fax1: TcxTextEdit
|
||||
Left = 281
|
||||
Top = 103
|
||||
Width = 128
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 30
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 6
|
||||
Height = 21
|
||||
Width = 128
|
||||
end
|
||||
object Correo1: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 132
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 40
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 7
|
||||
Width = 320
|
||||
end
|
||||
end
|
||||
object GroupBox2: TGroupBox
|
||||
Left = 7
|
||||
Top = 152
|
||||
Top = 180
|
||||
Width = 457
|
||||
Height = 137
|
||||
Height = 170
|
||||
Caption = 'Direcci'#243'n 1'
|
||||
TabOrder = 1
|
||||
object Label8: TLabel
|
||||
@ -637,101 +637,109 @@ object frEmpresa: TfrEmpresa
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label18: TLabel
|
||||
Left = 45
|
||||
Top = 136
|
||||
Width = 37
|
||||
Height = 13
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Correo:'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Calle2: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 20
|
||||
Width = 224
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 150
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 0
|
||||
Height = 21
|
||||
Width = 224
|
||||
end
|
||||
object Provincia2: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 48
|
||||
Width = 224
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 30
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 2
|
||||
Width = 224
|
||||
end
|
||||
object Numero2: TcxTextEdit
|
||||
Left = 350
|
||||
Top = 20
|
||||
Width = 59
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 20
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 1
|
||||
Height = 21
|
||||
Width = 59
|
||||
end
|
||||
object CodigoPostal2: TcxTextEdit
|
||||
Left = 350
|
||||
Top = 47
|
||||
Width = 59
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 5
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 3
|
||||
Height = 21
|
||||
Width = 59
|
||||
end
|
||||
object Poblacion2: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 76
|
||||
Width = 320
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 40
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 4
|
||||
Width = 320
|
||||
end
|
||||
object Telefono2: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 103
|
||||
Width = 136
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 30
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 5
|
||||
Height = 21
|
||||
Width = 136
|
||||
end
|
||||
object Fax2: TcxTextEdit
|
||||
Left = 281
|
||||
Top = 103
|
||||
Width = 128
|
||||
Height = 21
|
||||
AutoSize = False
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 30
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 6
|
||||
Height = 21
|
||||
Width = 128
|
||||
end
|
||||
object Correo2: TcxTextEdit
|
||||
Left = 89
|
||||
Top = 132
|
||||
ParentFont = False
|
||||
Properties.MaxLength = 40
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 7
|
||||
Width = 320
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -851,83 +859,63 @@ object frEmpresa: TfrEmpresa
|
||||
object cbxTrimestres: TcxComboBox
|
||||
Left = 152
|
||||
Top = 21
|
||||
Width = 137
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 0
|
||||
Width = 137
|
||||
end
|
||||
object cbxLibros: TcxComboBox
|
||||
Left = 153
|
||||
Top = 46
|
||||
Width = 136
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.ReadOnly = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 2
|
||||
Width = 136
|
||||
end
|
||||
object IvaDefecto: TcxDBSpinEdit
|
||||
Left = 152
|
||||
Top = 78
|
||||
Width = 136
|
||||
Height = 21
|
||||
DataBinding.DataField = 'IVADEFECTO'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 3
|
||||
Width = 136
|
||||
end
|
||||
object validezdefecto: TcxDBSpinEdit
|
||||
Left = 152
|
||||
Top = 103
|
||||
Width = 137
|
||||
Height = 21
|
||||
DataBinding.DataField = 'VALIDEZDEFECTO'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 4
|
||||
Width = 137
|
||||
end
|
||||
object Ano: TcxSpinEdit
|
||||
Left = 354
|
||||
Top = 23
|
||||
Width = 81
|
||||
Height = 21
|
||||
ParentFont = False
|
||||
Properties.MaxValue = 9999.000000000000000000
|
||||
Properties.MinValue = 1000.000000000000000000
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 1
|
||||
Value = 1000
|
||||
Width = 81
|
||||
end
|
||||
object IntervaloPagosCli: TcxDBSpinEdit
|
||||
Left = 152
|
||||
Top = 127
|
||||
Width = 137
|
||||
Height = 21
|
||||
DataBinding.DataField = 'INTERVALOPAGOSCLI'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
ParentFont = False
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 5
|
||||
Width = 137
|
||||
end
|
||||
end
|
||||
object pagLogo: TTabSheet
|
||||
@ -972,26 +960,23 @@ object frEmpresa: TfrEmpresa
|
||||
object Logotipo: TcxDBImage
|
||||
Left = 112
|
||||
Top = 18
|
||||
Width = 337
|
||||
Height = 239
|
||||
DataBinding.DataField = 'LOGOTIPO'
|
||||
DataBinding.DataSource = dsEmpresas
|
||||
Properties.Caption = 'Logotipo de la empresa'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.Stretch = True
|
||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||
TabOrder = 1
|
||||
Height = 239
|
||||
Width = 337
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object brDoble: TRdxBarraInferior
|
||||
Left = 0
|
||||
Top = 558
|
||||
Width = 497
|
||||
Top = 673
|
||||
Width = 665
|
||||
Height = 50
|
||||
Caption = ' '
|
||||
ParentColor = True
|
||||
@ -1132,8 +1117,8 @@ object frEmpresa: TfrEmpresa
|
||||
end
|
||||
object brSimple: TRdxBarraInferior
|
||||
Left = 0
|
||||
Top = 608
|
||||
Width = 497
|
||||
Top = 723
|
||||
Width = 665
|
||||
Height = 50
|
||||
Caption = ' '
|
||||
ParentColor = True
|
||||
|
||||
@ -112,6 +112,10 @@ type
|
||||
Label15: TLabel;
|
||||
IntervaloPagosCli: TcxDBSpinEdit;
|
||||
Label16: TLabel;
|
||||
Correo1: TcxTextEdit;
|
||||
Label17: TLabel;
|
||||
Label18: TLabel;
|
||||
Correo2: TcxTextEdit;
|
||||
procedure bAceptarClick(Sender: TObject);
|
||||
procedure bCancelarClick(Sender: TObject);
|
||||
procedure bSalirClick(Sender: TObject);
|
||||
@ -720,6 +724,7 @@ begin
|
||||
CodigoPostal1.Text := Items[0].CodigoPostal;
|
||||
Telefono1.Text := Items[0].Telefono;
|
||||
Fax1.Text := Items[0].Fax;
|
||||
Correo1.Text := Items[0].Correo;
|
||||
end;
|
||||
|
||||
if Count > 1 then
|
||||
@ -731,6 +736,7 @@ begin
|
||||
CodigoPostal2.Text := Items[1].CodigoPostal;
|
||||
Telefono2.Text := Items[1].Telefono;
|
||||
Fax2.Text := Items[1].Fax;
|
||||
Correo2.Text := Items[1].Correo;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -767,6 +773,7 @@ begin
|
||||
Dir1.CodigoPostal := CodigoPostal1.Text;
|
||||
Dir1.Telefono := Telefono1.Text;
|
||||
Dir1.Fax := Fax1.Text;
|
||||
Dir1.Correo := Correo1.Text;
|
||||
Dir1.SalvarDatos;
|
||||
end;
|
||||
|
||||
@ -782,6 +789,7 @@ begin
|
||||
Dir2.CodigoPostal := CodigoPostal2.Text;
|
||||
Dir2.Telefono := Telefono2.Text;
|
||||
Dir2.Fax := Fax2.Text;
|
||||
Dir2.Correo := Correo2.Text;
|
||||
Dir2.SalvarDatos;
|
||||
end;
|
||||
|
||||
@ -808,6 +816,7 @@ begin
|
||||
CodigoPostal1.Text := '';
|
||||
Telefono1.Text := '';
|
||||
Fax1.Text := '';
|
||||
Correo1.Text := '';
|
||||
|
||||
Calle2.Text := '';
|
||||
Numero2.Text := '';
|
||||
@ -816,6 +825,7 @@ begin
|
||||
CodigoPostal2.Text := '';
|
||||
Telefono2.Text := '';
|
||||
Fax2.Text := '';
|
||||
Correo2.Text := '';
|
||||
end;
|
||||
|
||||
function TfrEmpresa.EsVaciaDir1: Boolean;
|
||||
@ -823,7 +833,7 @@ begin
|
||||
if EsCadenaVacia(Calle1.Text) and EsCadenaVacia(Numero1.Text) and
|
||||
EsCadenaVacia(Provincia1.Text) and EsCadenaVacia(Poblacion1.Text) and
|
||||
EsCadenaVacia(CodigoPostal1.Text) and EsCadenaVacia(Telefono1.Text) and
|
||||
EsCadenaVacia(Fax1.Text) then
|
||||
EsCadenaVacia(Fax1.Text) and EsCadenaVacia(Correo1.Text) then
|
||||
Result := True
|
||||
else
|
||||
Result := False;
|
||||
@ -834,7 +844,7 @@ begin
|
||||
if EsCadenaVacia(Calle2.Text) and EsCadenaVacia(Numero2.Text) and
|
||||
EsCadenaVacia(Provincia2.Text) and EsCadenaVacia(Poblacion2.Text) and
|
||||
EsCadenaVacia(CodigoPostal2.Text) and EsCadenaVacia(Telefono2.Text) and
|
||||
EsCadenaVacia(Fax2.Text) then
|
||||
EsCadenaVacia(Fax2.Text) and EsCadenaVacia(Correo2.Text) then
|
||||
Result := True
|
||||
else
|
||||
Result := False;
|
||||
|
||||
@ -204,7 +204,8 @@ uses
|
||||
InformeListadoContratacionProcedencia in 'Informes\InformeListadoContratacionProcedencia.pas' {dmInformeListadoContratacionProcedencia: TDataModule},
|
||||
ListadoPresupuestosProcedencia in 'Clientes\ListadoPresupuestosProcedencia.pas' {frListadoPresupuestosProcedencia: TRdxFrame},
|
||||
ListadoProcedencias in 'Clientes\ListadoProcedencias.pas' {frListadoProcedencias: TRdxFrame},
|
||||
ListadoContratacionProcedencia in 'Clientes\ListadoContratacionProcedencia.pas' {frListadoContratacionProcedencia: TRdxFrame};
|
||||
ListadoContratacionProcedencia in 'Clientes\ListadoContratacionProcedencia.pas' {frListadoContratacionProcedencia: TRdxFrame},
|
||||
FacturarAlbaran in 'Clientes\FacturarAlbaran.pas' {frFacturarAlbaran};
|
||||
|
||||
{$R *.RES}
|
||||
{$R Prueba.res}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
object dmInformeBase: TdmInformeBase
|
||||
OldCreateOrder = False
|
||||
Left = 75
|
||||
Top = 491
|
||||
Left = 79
|
||||
Top = 371
|
||||
Height = 246
|
||||
Width = 321
|
||||
object FReport: TfrReport
|
||||
|
||||
@ -143,12 +143,15 @@ begin
|
||||
CadenaAux := '';
|
||||
if not EsCadenaVacia(EmpresaActiva.Web) then
|
||||
CadenaAux := EmpresaActiva.Web;
|
||||
|
||||
{El correo electronico será propio a cada sucursal
|
||||
if not EsCadenaVacia(EmpresaActiva.Correo) then
|
||||
begin
|
||||
if not EsCadenaVacia(CadenaAux) then
|
||||
CadenaAux := CadenaAux + ' · ';
|
||||
CadenaAux := CadenaAux + EmpresaActiva.Correo;
|
||||
end;
|
||||
}
|
||||
Memo.Add(CadenaAux);
|
||||
CadenaAux := '';
|
||||
if (not EsCadenaVacia(EmpresaActiva.NifCif)) then
|
||||
@ -217,6 +220,8 @@ begin
|
||||
CadenaAux := 'Telf. ' + Telefono;
|
||||
if (not EsCadenaVacia(Fax)) then
|
||||
CadenaAux := CadenaAux + ' Fax ' + Fax;
|
||||
if (not EsCadenaVacia(Correo)) then
|
||||
CadenaAux := CadenaAux + #10 + Correo;
|
||||
Result := CadenaAux;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -94,6 +94,8 @@ begin
|
||||
CadenaAux := 'Telf. ' + Telefono;
|
||||
if (not EsCadenaVacia(Fax)) then
|
||||
CadenaAux := CadenaAux + ' Fax ' + Fax;
|
||||
if (not EsCadenaVacia(Correo)) then
|
||||
CadenaAux := CadenaAux + #10 + Correo;
|
||||
Result := CadenaAux;
|
||||
end;
|
||||
end;
|
||||
@ -146,12 +148,14 @@ begin
|
||||
CadenaAux := '';
|
||||
if not EsCadenaVacia(EmpresaActiva.Web) then
|
||||
CadenaAux := EmpresaActiva.Web;
|
||||
{El correo será local a cada sucursal
|
||||
if not EsCadenaVacia(EmpresaActiva.Correo) then
|
||||
begin
|
||||
if not EsCadenaVacia(CadenaAux) then
|
||||
CadenaAux := CadenaAux + ' · ';
|
||||
CadenaAux := CadenaAux + EmpresaActiva.Correo;
|
||||
end;
|
||||
}
|
||||
CadenaAux := '';
|
||||
if (not EsCadenaVacia(EmpresaActiva.NifCif)) then
|
||||
CadenaAux := ' NIF: ' + EmpresaActiva.NifCif;
|
||||
|
||||
@ -183,12 +183,14 @@ begin
|
||||
CadenaAux := '';
|
||||
if not EsCadenaVacia(EmpresaActiva.Web) then
|
||||
CadenaAux := EmpresaActiva.Web;
|
||||
{El correo sera propio a cada sucursal
|
||||
if not EsCadenaVacia(EmpresaActiva.Correo) then
|
||||
begin
|
||||
if not EsCadenaVacia(CadenaAux) then
|
||||
CadenaAux := CadenaAux + ' · ';
|
||||
CadenaAux := CadenaAux + EmpresaActiva.Correo;
|
||||
end;
|
||||
}
|
||||
Memo.Add(CadenaAux);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
inherited dmInformeTrimestralCompras: TdmInformeTrimestralCompras
|
||||
OldCreateOrder = True
|
||||
Left = 773
|
||||
Top = 280
|
||||
Top = 245
|
||||
Width = 344
|
||||
inherited FReport: TfrReport
|
||||
Dataset = TablaRes
|
||||
|
||||
@ -108,7 +108,7 @@ begin
|
||||
Database := FBaseDatos;
|
||||
Transaction := FTransaccion;
|
||||
SQL.Clear;
|
||||
SQL.Add('select EXTRACT (MONTH FROM FECHAFACTURA) as MES, EXTRACT (DAY FROM FECHAFACTURA) as DIA, REFERENCIA, ');
|
||||
SQL.Add('select EXTRACT (MONTH FROM FECHAFACTURA) as MES, EXTRACT (DAY FROM FECHAFACTURA) as DIA, REFERENCIA, CODIGO, ');
|
||||
SQL.Add('NIFCIF, NOMBRE, ');
|
||||
|
||||
if Tipo = tipGeneral
|
||||
@ -198,6 +198,12 @@ begin
|
||||
if (FListaDesTiposOp.Count-1) >= i then
|
||||
(Objeto as TfrMemoView).Memo.Add(FListaDesTiposOp.Strings[i]);
|
||||
end;
|
||||
|
||||
if ((Objeto is TfrMemoView) and (Pos('RangoFechas', Objeto.Name) > 0)) then
|
||||
begin
|
||||
(Objeto as TfrMemoView).Memo.Clear;
|
||||
(Objeto as TfrMemoView).Memo.Add('Rango de fechas: ' + DateToStr(FFechaIni) + ' - ' + DateToStr(FFechaFin));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
inherited dmInformeTrimestralVentas: TdmInformeTrimestralVentas
|
||||
OldCreateOrder = True
|
||||
Left = 714
|
||||
Top = 199
|
||||
Left = 715
|
||||
Top = 174
|
||||
Width = 344
|
||||
inherited FReport: TfrReport
|
||||
Dataset = TablaCab
|
||||
|
||||
@ -184,6 +184,12 @@ begin
|
||||
if (FListaRE.Count-1) >= i then
|
||||
(Objeto as TfrMemoView).Memo.Add(FListaRE.Strings[i] + '%');
|
||||
end;
|
||||
|
||||
if ((Objeto is TfrMemoView) and (Pos('RangoFechas', Objeto.Name) > 0)) then
|
||||
begin
|
||||
(Objeto as TfrMemoView).Memo.Clear;
|
||||
(Objeto as TfrMemoView).Memo.Add('Rango de fechas: ' + DateToStr(FFechaIni) + ' - ' + DateToStr(FFechaFin));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
object frInformesCompras: TfrInformesCompras
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 669
|
||||
Height = 497
|
||||
Width = 630
|
||||
Height = 410
|
||||
Color = 16383743
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -15,7 +15,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object BarraInformes: TRdxBarraSuperior
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 669
|
||||
Width = 630
|
||||
Height = 25
|
||||
Caption = 'Informes de compras y gastos '
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@ -34,7 +34,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object imgSombra: TImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 669
|
||||
Width = 630
|
||||
Height = 8
|
||||
Align = alTop
|
||||
end
|
||||
@ -42,8 +42,8 @@ object frInformesCompras: TfrInformesCompras
|
||||
object pnlCuerpo: TPanel
|
||||
Left = 0
|
||||
Top = 25
|
||||
Width = 669
|
||||
Height = 472
|
||||
Width = 630
|
||||
Height = 385
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 10
|
||||
@ -52,8 +52,8 @@ object frInformesCompras: TfrInformesCompras
|
||||
object RdxPanel1: TRdxPanel
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 649
|
||||
Height = 452
|
||||
Width = 610
|
||||
Height = 365
|
||||
BorderStyle = bsSingle
|
||||
Caption = ' '
|
||||
BorderWidth = 1
|
||||
@ -66,7 +66,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel1: TPanel
|
||||
Left = 1
|
||||
Top = 17
|
||||
Width = 647
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -153,7 +153,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel2: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 563
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -161,7 +161,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 287
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -209,7 +209,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 287
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -219,7 +219,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Label1: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 287
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -235,7 +235,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Label2: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 287
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption =
|
||||
@ -266,7 +266,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel5: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 647
|
||||
Width = 608
|
||||
Height = 16
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
@ -276,7 +276,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel17: TPanel
|
||||
Left = 1
|
||||
Top = 109
|
||||
Width = 647
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -363,7 +363,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel18: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 563
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -371,7 +371,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel19: TPanel
|
||||
Left = 287
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -419,7 +419,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Panel20: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 287
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -429,7 +429,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Label7: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 287
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -445,7 +445,7 @@ object frInformesCompras: TfrInformesCompras
|
||||
object Label8: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 287
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption = 'Informe con el importe por compras de un determinado trimestre'
|
||||
|
||||
@ -2,7 +2,7 @@ object frInformesContabilidad: TfrInformesContabilidad
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 610
|
||||
Height = 592
|
||||
Height = 412
|
||||
Color = 16383743
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
@ -37,7 +37,7 @@ object frInformesContabilidad: TfrInformesContabilidad
|
||||
Left = 0
|
||||
Top = 25
|
||||
Width = 610
|
||||
Height = 567
|
||||
Height = 387
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 10
|
||||
@ -47,7 +47,7 @@ object frInformesContabilidad: TfrInformesContabilidad
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 590
|
||||
Height = 547
|
||||
Height = 367
|
||||
BorderStyle = bsSingle
|
||||
Caption = ' '
|
||||
BorderWidth = 1
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
object frInformesVentas: TfrInformesVentas
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 713
|
||||
Height = 624
|
||||
Width = 630
|
||||
Height = 410
|
||||
Color = 16383743
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
object BarraInformes: TRdxBarraSuperior
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 713
|
||||
Width = 630
|
||||
Height = 25
|
||||
Caption = 'Informes de ventas e ingresos '
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@ -28,7 +28,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object imgSombra: TImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 713
|
||||
Width = 630
|
||||
Height = 8
|
||||
Align = alTop
|
||||
end
|
||||
@ -36,8 +36,8 @@ object frInformesVentas: TfrInformesVentas
|
||||
object pnlCuerpo: TPanel
|
||||
Left = 0
|
||||
Top = 25
|
||||
Width = 713
|
||||
Height = 599
|
||||
Width = 630
|
||||
Height = 385
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 10
|
||||
@ -46,8 +46,8 @@ object frInformesVentas: TfrInformesVentas
|
||||
object RdxPanel1: TRdxPanel
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 693
|
||||
Height = 579
|
||||
Width = 610
|
||||
Height = 365
|
||||
BorderStyle = bsSingle
|
||||
Caption = ' '
|
||||
BorderWidth = 1
|
||||
@ -60,7 +60,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel1: TPanel
|
||||
Left = 1
|
||||
Top = 385
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -147,7 +147,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel2: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 607
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -155,7 +155,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 331
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -203,7 +203,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -213,7 +213,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label1: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -229,7 +229,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label2: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption =
|
||||
@ -260,7 +260,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel5: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 16
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
@ -270,7 +270,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel17: TPanel
|
||||
Left = 1
|
||||
Top = 293
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -357,7 +357,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel18: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 607
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -365,7 +365,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel19: TPanel
|
||||
Left = 331
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -413,7 +413,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel20: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -423,7 +423,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label7: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -439,7 +439,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label8: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption =
|
||||
@ -470,7 +470,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel22: TPanel
|
||||
Left = 1
|
||||
Top = 477
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -558,7 +558,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel23: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 607
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -566,7 +566,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel24: TPanel
|
||||
Left = 331
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -615,7 +615,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel25: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -625,7 +625,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label9: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -642,7 +642,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label10: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption = 'Informe con los ingresos por ventas de un determinado trimestre'
|
||||
@ -672,7 +672,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel7: TPanel
|
||||
Left = 1
|
||||
Top = 109
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -759,7 +759,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel8: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 607
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -767,7 +767,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel9: TPanel
|
||||
Left = 331
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -815,7 +815,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel10: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -825,7 +825,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label3: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -841,7 +841,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label4: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption =
|
||||
@ -872,7 +872,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel12: TPanel
|
||||
Left = 1
|
||||
Top = 201
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -959,7 +959,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel13: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 607
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -967,7 +967,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel14: TPanel
|
||||
Left = 331
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -1015,7 +1015,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel15: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -1025,7 +1025,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label5: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -1041,7 +1041,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label6: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption =
|
||||
@ -1072,7 +1072,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel27: TPanel
|
||||
Left = 1
|
||||
Top = 17
|
||||
Width = 691
|
||||
Width = 608
|
||||
Height = 92
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
@ -1159,7 +1159,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel28: TPanel
|
||||
Left = 74
|
||||
Top = 10
|
||||
Width = 607
|
||||
Width = 524
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -1167,7 +1167,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
ParentColor = True
|
||||
TabOrder = 0
|
||||
object Panel29: TPanel
|
||||
Left = 331
|
||||
Left = 248
|
||||
Top = 0
|
||||
Width = 276
|
||||
Height = 72
|
||||
@ -1215,7 +1215,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Panel30: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 72
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
@ -1225,7 +1225,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label11: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 20
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
@ -1241,7 +1241,7 @@ object frInformesVentas: TfrInformesVentas
|
||||
object Label12: TLabel
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 331
|
||||
Width = 248
|
||||
Height = 52
|
||||
Align = alClient
|
||||
Caption =
|
||||
|
||||
Binary file not shown.
@ -58,6 +58,7 @@ type
|
||||
function GetIntervaloPagosCli: Real;
|
||||
function GetWeb: String;
|
||||
procedure SetCodigo(const Value: Integer);
|
||||
function GetRestricciones: TStringList;
|
||||
public
|
||||
property Codigo : Integer read GetCodigo write SetCodigo;
|
||||
property FechaAlta : String read GetFechaAlta;
|
||||
@ -74,6 +75,7 @@ type
|
||||
property LibroDefecto : String read GetLibroDefecto;
|
||||
property Logotipo : TPicture read GetLogotipo;
|
||||
property Direcciones : TListaObjetos read GetDirecciones;
|
||||
property Restricciones : TStringList read GetRestricciones;
|
||||
class function NewInstance: TObject; override;
|
||||
procedure FreeInstance; override;
|
||||
procedure Refrescar;
|
||||
@ -198,6 +200,14 @@ begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TEmpresaSingleton.GetRestricciones: TStringList;
|
||||
begin
|
||||
if Assigned(FDatosEmpresa) then
|
||||
Result := (FDatosEmpresa as TDatosEmpresa).Restricciones
|
||||
else
|
||||
Result := NIL;
|
||||
end;
|
||||
|
||||
function TEmpresaSingleton.GetUsuario: String;
|
||||
begin
|
||||
if Assigned(FDatosEmpresa) then
|
||||
|
||||
@ -361,7 +361,7 @@ object frPrincipal: TfrPrincipal
|
||||
object actVentas: TAction
|
||||
Caption = 'Ventas'
|
||||
OnExecute = actVentasExecute
|
||||
OnUpdate = actDatosUpdate
|
||||
OnUpdate = actVentasUpdate
|
||||
end
|
||||
object actContabilidad: TAction
|
||||
Caption = 'Contabilidad'
|
||||
|
||||
@ -31,6 +31,13 @@ uses
|
||||
am2000menuitem, am2000popupmenu, am2000, RdxBotones, RdxPaneles,
|
||||
RdxFrame, ActnList, FthImage, pngimage, am2000utils;
|
||||
|
||||
const
|
||||
CTE_FACTURAS_PROVEEDOR = 'FACTURAS_PROVEEDOR';
|
||||
CTE_PAGOS_PROVEEDOR = 'PAGOS_PROVEEDOR';
|
||||
CTE_VENTAS = 'VENTAS';
|
||||
CTE_CONTABILIDAD = 'CONTABILIDAD';
|
||||
CTE_INFORMES = 'INFORMES';
|
||||
|
||||
type
|
||||
TfrPrincipal = class(TRdxFrame)
|
||||
BarraEstado: TStatusBar;
|
||||
@ -107,6 +114,7 @@ type
|
||||
procedure actActualizarExecute(Sender: TObject);
|
||||
procedure actContabilidadUpdate(Sender: TObject);
|
||||
procedure actInformesUpdate(Sender: TObject);
|
||||
procedure actVentasUpdate(Sender: TObject);
|
||||
private
|
||||
public
|
||||
Version : String;
|
||||
@ -351,13 +359,36 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfrPrincipal.actContabilidadUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND ((dmBaseDatos.Privilegios = CTE_PRIVILEGIO_TIENDA) or (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA));
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_CONTABILIDAD, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrPrincipal.actInformesUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND ((dmBaseDatos.Privilegios = CTE_PRIVILEGIO_TIENDA) or (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA));
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_INFORMES, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrPrincipal.actVentasUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_VENTAS, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -62,7 +62,7 @@ implementation
|
||||
{$R *.DFM}
|
||||
uses
|
||||
RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion,
|
||||
BaseDatos;
|
||||
BaseDatos, Principal;
|
||||
|
||||
constructor TfrBarraProveedores.Create (AOwner: TComponent);
|
||||
begin
|
||||
@ -88,15 +88,25 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfrBarraProveedores.actFacturasUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA);
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_FACTURAS_PROVEEDOR, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraProveedores.actPagosUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := (EmpresaActiva.Codigo <> -1) AND (dmBaseDatos.Privilegios = CTE_PRIVILEGIO_FABRICA);
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PAGOS_PROVEEDOR, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bd/ABETO.GDB
BIN
bd/ABETO.GDB
Binary file not shown.
Reference in New Issue
Block a user