Compare commits

..

1 Commits

Author SHA1 Message Date
3f43478c5c Se adapta el programa para requisitos de fabrica
git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoArmarios_FactuGES/tags/2.3.5@38 0a814768-cfdd-9c42-8d01-223fcc10da9d
2009-10-21 17:56:28 +00:00
74 changed files with 654 additions and 1376 deletions

View File

@ -1,6 +1,7 @@
object dmTablaContratos: TdmTablaContratos object dmTablaContratos: TdmTablaContratos
OldCreateOrder = True OldCreateOrder = True
Top = 526 Left = 215
Top = 538
Height = 200 Height = 200
Width = 640 Width = 741
end end

View File

@ -80,8 +80,6 @@ type
ImporteDescuento : double; ImporteDescuento : double;
IVA : Integer; IVA : Integer;
ImporteIVA : double; ImporteIVA : double;
Re : integer;
ImporteRe : double;
ImporteTotal : double; ImporteTotal : double;
Observaciones : string; Observaciones : string;
PlazoEntrega : string; PlazoEntrega : string;
@ -605,18 +603,6 @@ begin
EditFormat := EDIT_EUROS4; EditFormat := EDIT_EUROS4;
end; end;
if FindField('RE') <> NIL then
with (FieldByName('RE') as TFloatField) do begin
DisplayFormat := DISPLAY_DTO;
EditFormat := EDIT_DTO;
end;
if FindField('IMPORTERE') <> NIL then
with (FieldByName('IMPORTERE') as TIBBCDField) do begin
DisplayFormat := DISPLAY_EUROS2;
EditFormat := EDIT_EUROS2;
end;
if FindField('IMPORTETOTAL') <> NIL then if FindField('IMPORTETOTAL') <> NIL then
with (FieldByName('IMPORTETOTAL') as TIBBCDField) do begin with (FieldByName('IMPORTETOTAL') as TIBBCDField) do begin
DisplayFormat := DISPLAY_EUROS2; DisplayFormat := DISPLAY_EUROS2;
@ -820,7 +806,6 @@ begin
Add(' BASEIMPONIBLE, DESCUENTO, '); Add(' BASEIMPONIBLE, DESCUENTO, ');
Add(' IMPORTEDESCUENTO, '); Add(' IMPORTEDESCUENTO, ');
Add(' IVA, IMPORTEIVA, '); Add(' IVA, IMPORTEIVA, ');
Add(' RE, IMPORTERE, ');
Add(' IMPORTETOTAL, '); Add(' IMPORTETOTAL, ');
Add(' OBSERVACIONES, PLAZOENTREGA, '); Add(' OBSERVACIONES, PLAZOENTREGA, ');
Add(' FORMAPAGO) '); Add(' FORMAPAGO) ');
@ -836,7 +821,6 @@ begin
Add(' :BASEIMPONIBLE, :DESCUENTO, '); Add(' :BASEIMPONIBLE, :DESCUENTO, ');
Add(' :IMPORTEDESCUENTO, '); Add(' :IMPORTEDESCUENTO, ');
Add(' :IVA, :IMPORTEIVA, '); Add(' :IVA, :IMPORTEIVA, ');
Add(' :RE, :IMPORTERE, ');
Add(' :IMPORTETOTAL, '); Add(' :IMPORTETOTAL, ');
Add(' :OBSERVACIONES, :PLAZOENTREGA, '); Add(' :OBSERVACIONES, :PLAZOENTREGA, ');
Add(' :FORMAPAGO) '); Add(' :FORMAPAGO) ');
@ -870,8 +854,6 @@ begin
Add(' IMPORTEDESCUENTO = :IMPORTEDESCUENTO, '); Add(' IMPORTEDESCUENTO = :IMPORTEDESCUENTO, ');
Add(' IVA = :IVA, '); Add(' IVA = :IVA, ');
Add(' IMPORTEIVA = :IMPORTEIVA, '); Add(' IMPORTEIVA = :IMPORTEIVA, ');
Add(' RE = :RE, ');
Add(' IMPORTERE = :IMPORTERE, ');
Add(' IMPORTETOTAL = :IMPORTETOTAL, '); Add(' IMPORTETOTAL = :IMPORTETOTAL, ');
Add(' OBSERVACIONES = :OBSERVACIONES, '); Add(' OBSERVACIONES = :OBSERVACIONES, ');
Add(' PLAZOENTREGA = :PLAZOENTREGA, '); Add(' PLAZOENTREGA = :PLAZOENTREGA, ');
@ -984,7 +966,6 @@ begin
Add(' BASEIMPONIBLE, DESCUENTO, '); Add(' BASEIMPONIBLE, DESCUENTO, ');
Add(' IMPORTEDESCUENTO, '); Add(' IMPORTEDESCUENTO, ');
Add(' IVA, IMPORTEIVA, '); Add(' IVA, IMPORTEIVA, ');
Add(' RE, IMPORTERE, ');
Add(' IMPORTETOTAL, '); Add(' IMPORTETOTAL, ');
Add(' OBSERVACIONES, PLAZOENTREGA, '); Add(' OBSERVACIONES, PLAZOENTREGA, ');
Add(' FORMAPAGO) '); Add(' FORMAPAGO) ');
@ -1000,7 +981,6 @@ begin
Add('BASEIMPONIBLE,'); Add('BASEIMPONIBLE,');
Add('DESCUENTO, IMPORTEDESCUENTO,'); Add('DESCUENTO, IMPORTEDESCUENTO,');
Add('IVA, IMPORTEIVA,'); Add('IVA, IMPORTEIVA,');
Add('RE, IMPORTERE,');
Add('IMPORTETOTAL, OBSERVACIONES, PLAZOENTREGA, FORMAPAGO '); Add('IMPORTETOTAL, OBSERVACIONES, PLAZOENTREGA, FORMAPAGO ');
Add('from PRESUPUESTOSCLIENTE '); Add('from PRESUPUESTOSCLIENTE ');
Add('where CODIGO = :CODIGO'); Add('where CODIGO = :CODIGO');
@ -1111,7 +1091,6 @@ begin
Add(' BASEIMPONIBLE, DESCUENTO, '); Add(' BASEIMPONIBLE, DESCUENTO, ');
Add(' IMPORTEDESCUENTO, '); Add(' IMPORTEDESCUENTO, ');
Add(' IVA, IMPORTEIVA, '); Add(' IVA, IMPORTEIVA, ');
Add(' RE, IMPORTERE, ');
Add(' IMPORTETOTAL, '); Add(' IMPORTETOTAL, ');
Add(' OBSERVACIONES, PLAZOENTREGA, '); Add(' OBSERVACIONES, PLAZOENTREGA, ');
Add(' FORMAPAGO) '); Add(' FORMAPAGO) ');
@ -1122,7 +1101,7 @@ begin
Add('CALLE, NUMERO, PISO, CODIGOPOSTAL,'); Add('CALLE, NUMERO, PISO, CODIGOPOSTAL,');
Add('POBLACION, PROVINCIA,'); Add('POBLACION, PROVINCIA,');
Add('TELEFONO1, TELEFONO2, MOVIL1, MOVIL2, FAX, PERSONACONTACTO, BASEIMPONIBLE, DESCUENTO, IMPORTEDESCUENTO,'); Add('TELEFONO1, TELEFONO2, MOVIL1, MOVIL2, FAX, PERSONACONTACTO, BASEIMPONIBLE, DESCUENTO, IMPORTEDESCUENTO,');
Add('IVA, IMPORTEIVA, RE, IMPORTERE, IMPORTETOTAL, OBSERVACIONES, PLAZOENTREGA, '); Add('IVA, IMPORTEIVA, IMPORTETOTAL, OBSERVACIONES, PLAZOENTREGA, ');
Add('FORMAPAGO from CONTRATOSCLIENTE '); Add('FORMAPAGO from CONTRATOSCLIENTE ');
Add('where CODIGO = :CODIGO'); Add('where CODIGO = :CODIGO');
end; end;
@ -1687,8 +1666,6 @@ begin
ImporteDescuento := FieldByName('IMPORTEDESCUENTO').AsDouble; ImporteDescuento := FieldByName('IMPORTEDESCUENTO').AsDouble;
Iva := FieldByName('IVA').AsInteger; Iva := FieldByName('IVA').AsInteger;
ImporteIva := FieldByName('IMPORTEIVA').AsDouble; ImporteIva := FieldByName('IMPORTEIVA').AsDouble;
Re := FieldByName('RE').AsInteger;
ImporteRe := FieldByName('IMPORTERE').AsDouble;
ImporteTotal := FieldByName('IMPORTETOTAL').AsDouble; ImporteTotal := FieldByName('IMPORTETOTAL').AsDouble;
PlazoEntrega := FieldByName('PLAZOENTREGA').AsString; PlazoEntrega := FieldByName('PLAZOENTREGA').AsString;
FormaPago := FieldByName('FORMAPAGO').AsString; FormaPago := FieldByName('FORMAPAGO').AsString;

View File

@ -196,8 +196,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 ');
Add('where CODIGO IN ( select CODIGOEMPRESA from PERMISOS_EMPRESAS where usuario = :USUARIO) order by CODIGO ');
end; end;
end; end;
@ -280,8 +279,6 @@ begin
Codigo := CodigoEmpresa; Codigo := CodigoEmpresa;
// Recuperar las restricciones de la empresa para el usuario logado // Recuperar las restricciones de la empresa para el usuario logado
FRestricciones := TStringList.Create; FRestricciones := TStringList.Create;
FRestricciones.Sorted := true;
ObtenerRestricciones; ObtenerRestricciones;
// Recuperar los datos de la empresa // Recuperar los datos de la empresa
ObtenerDatos; ObtenerDatos;
@ -292,7 +289,6 @@ begin
inherited Create; inherited Create;
FDirecciones := TListaDireccionesEmpresa.Create(Codigo); FDirecciones := TListaDireccionesEmpresa.Create(Codigo);
FRestricciones := TStringList.Create; FRestricciones := TStringList.Create;
FRestricciones.Sorted := true;
end; end;
destructor TDatosEmpresa.Destroy; destructor TDatosEmpresa.Destroy;

View File

@ -1,7 +1,7 @@
object dmTablaFacturasCliente: TdmTablaFacturasCliente object dmTablaFacturasCliente: TdmTablaFacturasCliente
OldCreateOrder = False OldCreateOrder = False
Left = 507 Left = 504
Top = 81 Top = 256
Height = 408 Height = 408
Width = 123 Width = 123
end end

View File

@ -1,6 +1,7 @@
object dmTablaPresupuestos: TdmTablaPresupuestos object dmTablaPresupuestos: TdmTablaPresupuestos
OldCreateOrder = True OldCreateOrder = True
Top = 423 Left = 251
Top = 416
Height = 200 Height = 200
Width = 640 Width = 741
end end

View File

@ -79,8 +79,6 @@ type
ImporteDescuento : double; ImporteDescuento : double;
Iva : integer; Iva : integer;
ImporteIva : double; ImporteIva : double;
Re : integer;
ImporteRe : double;
ImporteTotal : double; ImporteTotal : double;
VigenciaPresupuesto : TDateTime; VigenciaPresupuesto : TDateTime;
PlazoEntrega : String; PlazoEntrega : String;
@ -608,18 +606,6 @@ begin
EditFormat := EDIT_EUROS4; EditFormat := EDIT_EUROS4;
end; end;
if FindField('RE') <> NIL then
with (FieldByName('RE') as TFloatField) do begin
DisplayFormat := DISPLAY_DTO;
EditFormat := EDIT_DTO;
end;
if FindField('IMPORTERE') <> NIL then
with (FieldByName('IMPORTERE') as TIBBCDField) do begin
DisplayFormat := DISPLAY_EUROS2;
EditFormat := EDIT_EUROS2;
end;
if FindField('IMPORTETOTAL') <> NIL then if FindField('IMPORTETOTAL') <> NIL then
with (FieldByName('IMPORTETOTAL') as TIBBCDField) do begin with (FieldByName('IMPORTETOTAL') as TIBBCDField) do begin
DisplayFormat := DISPLAY_EUROS2; DisplayFormat := DISPLAY_EUROS2;
@ -774,7 +760,7 @@ begin
Add('NUMERO, PISO, CODIGOPOSTAL, POBLACION, '); Add('NUMERO, PISO, CODIGOPOSTAL, POBLACION, ');
Add('PROVINCIA, TELEFONO1, TELEFONO2, MOVIL1, MOVIL2, FAX, PERSONACONTACTO, VENDEDOR, '); Add('PROVINCIA, TELEFONO1, TELEFONO2, MOVIL1, MOVIL2, FAX, PERSONACONTACTO, VENDEDOR, ');
Add('BASEIMPONIBLE, DESCUENTO, '); Add('BASEIMPONIBLE, DESCUENTO, ');
Add('IMPORTEDESCUENTO, IVA, IMPORTEIVA, RE, IMPORTERE, '); Add('IMPORTEDESCUENTO, IVA, IMPORTEIVA, ');
Add('IMPORTETOTAL, CODIGODOCUMENTO, VIGENCIAPRESUPUESTO, '); Add('IMPORTETOTAL, CODIGODOCUMENTO, VIGENCIAPRESUPUESTO, ');
Add('OBSERVACIONES, PLAZOENTREGA, FORMAPAGO, DESGLOSES, AUMENTO) values ('); Add('OBSERVACIONES, PLAZOENTREGA, FORMAPAGO, DESGLOSES, AUMENTO) values (');
Add(':CODIGO, :FECHAALTA, :USUARIO, '); Add(':CODIGO, :FECHAALTA, :USUARIO, ');
@ -784,7 +770,7 @@ begin
Add(':PISO, :CODIGOPOSTAL, :POBLACION, '); Add(':PISO, :CODIGOPOSTAL, :POBLACION, ');
Add(':PROVINCIA, :TELEFONO1, :TELEFONO2, :MOVIL1, :MOVIL2, :FAX, :PERSONACONTACTO, :VENDEDOR, '); Add(':PROVINCIA, :TELEFONO1, :TELEFONO2, :MOVIL1, :MOVIL2, :FAX, :PERSONACONTACTO, :VENDEDOR, ');
Add(':BASEIMPONIBLE, :DESCUENTO, '); Add(':BASEIMPONIBLE, :DESCUENTO, ');
Add(':IMPORTEDESCUENTO, :IVA, :IMPORTEIVA, :RE, :IMPORTERE,'); Add(':IMPORTEDESCUENTO, :IVA, :IMPORTEIVA, ');
Add(':IMPORTETOTAL, :CODIGODOCUMENTO, :VIGENCIAPRESUPUESTO, '); Add(':IMPORTETOTAL, :CODIGODOCUMENTO, :VIGENCIAPRESUPUESTO, ');
Add(':OBSERVACIONES, :PLAZOENTREGA, :FORMAPAGO, :DESGLOSES, :AUMENTO) '); Add(':OBSERVACIONES, :PLAZOENTREGA, :FORMAPAGO, :DESGLOSES, :AUMENTO) ');
end; end;
@ -817,8 +803,6 @@ begin
Add('IMPORTEDESCUENTO = :IMPORTEDESCUENTO, '); Add('IMPORTEDESCUENTO = :IMPORTEDESCUENTO, ');
Add('IVA = :IVA, '); Add('IVA = :IVA, ');
Add('IMPORTEIVA = :IMPORTEIVA, '); Add('IMPORTEIVA = :IMPORTEIVA, ');
Add('RE = :RE, ');
Add('IMPORTERE = :IMPORTERE, ');
Add('IMPORTETOTAL = :IMPORTETOTAL, '); Add('IMPORTETOTAL = :IMPORTETOTAL, ');
Add('VIGENCIAPRESUPUESTO = :VIGENCIAPRESUPUESTO, '); Add('VIGENCIAPRESUPUESTO = :VIGENCIAPRESUPUESTO, ');
Add('OBSERVACIONES = :OBSERVACIONES, '); Add('OBSERVACIONES = :OBSERVACIONES, ');
@ -1088,7 +1072,7 @@ begin
Add('OBSERVACIONES, VENDEDOR, '); Add('OBSERVACIONES, VENDEDOR, ');
Add('BASEIMPONIBLE, DESCUENTO, '); Add('BASEIMPONIBLE, DESCUENTO, ');
Add('IMPORTEDESCUENTO, IVA, '); Add('IMPORTEDESCUENTO, IVA, ');
Add('IMPORTEIVA, RE, IMPORTERE, IMPORTETOTAL, '); Add('IMPORTEIVA, IMPORTETOTAL, ');
Add('VIGENCIAPRESUPUESTO, PLAZOENTREGA, '); Add('VIGENCIAPRESUPUESTO, PLAZOENTREGA, ');
Add('FORMAPAGO, DESGLOSES, AUMENTO) '); Add('FORMAPAGO, DESGLOSES, AUMENTO) ');
Add('SELECT ''' + CodigoAux + ''', current_date, '); Add('SELECT ''' + CodigoAux + ''', current_date, ');
@ -1103,7 +1087,7 @@ begin
Add('TELEFONO1, TELEFONO2, MOVIL1, MOVIL2, FAX, PERSONACONTACTO, '); Add('TELEFONO1, TELEFONO2, MOVIL1, MOVIL2, FAX, PERSONACONTACTO, ');
Add('OBSERVACIONES, VENDEDOR, '); Add('OBSERVACIONES, VENDEDOR, ');
Add('BASEIMPONIBLE, DESCUENTO, IMPORTEDESCUENTO,'); Add('BASEIMPONIBLE, DESCUENTO, IMPORTEDESCUENTO,');
Add('IVA, IMPORTEIVA, RE, IMPORTERE,'); Add('IVA, IMPORTEIVA,');
Add('IMPORTETOTAL, VIGENCIAPRESUPUESTO, PLAZOENTREGA, FORMAPAGO, '); Add('IMPORTETOTAL, VIGENCIAPRESUPUESTO, PLAZOENTREGA, FORMAPAGO, ');
Add('DESGLOSES, AUMENTO '); Add('DESGLOSES, AUMENTO ');
Add('from PRESUPUESTOSCLIENTE '); Add('from PRESUPUESTOSCLIENTE ');
@ -1402,8 +1386,6 @@ begin
ImporteDescuento := FieldByName('IMPORTEDESCUENTO').AsDouble; ImporteDescuento := FieldByName('IMPORTEDESCUENTO').AsDouble;
Iva := FieldByName('IVA').AsInteger; Iva := FieldByName('IVA').AsInteger;
ImporteIva := FieldByName('IMPORTEIVA').AsDouble; ImporteIva := FieldByName('IMPORTEIVA').AsDouble;
Re := FieldByName('RE').AsInteger;
ImporteRe := FieldByName('IMPORTERE').AsDouble;
ImporteTotal := FieldByName('IMPORTETOTAL').AsDouble; ImporteTotal := FieldByName('IMPORTETOTAL').AsDouble;
VigenciaPresupuesto := FieldByName('VIGENCIAPRESUPUESTO').AsDateTime; VigenciaPresupuesto := FieldByName('VIGENCIAPRESUPUESTO').AsDateTime;
PlazoEntrega := FieldByName('PLAZOENTREGA').AsString; PlazoEntrega := FieldByName('PLAZOENTREGA').AsString;

View File

@ -827,19 +827,16 @@ object frBarraClientes: TfrBarraClientes
Caption = 'Clientes' Caption = 'Clientes'
ImageIndex = 0 ImageIndex = 0
OnExecute = actClientesExecute OnExecute = actClientesExecute
OnUpdate = actClientesUpdate
end end
object actPresupuestos: TAction object actPresupuestos: TAction
Caption = 'Presupuestos de clientes' Caption = 'Presupuestos de clientes'
ImageIndex = 1 ImageIndex = 1
OnExecute = actPresupuestosExecute OnExecute = actPresupuestosExecute
OnUpdate = actPresupuestosUpdate
end end
object actContratos: TAction object actContratos: TAction
Caption = 'Contratos de clientes' Caption = 'Contratos de clientes'
ImageIndex = 2 ImageIndex = 2
OnExecute = actContratosExecute OnExecute = actContratosExecute
OnUpdate = actContratosUpdate
end end
object actObras: TAction object actObras: TAction
Caption = 'Obras de clientes' Caption = 'Obras de clientes'
@ -849,24 +846,20 @@ object frBarraClientes: TfrBarraClientes
Caption = 'Facturas de clientes' Caption = 'Facturas de clientes'
ImageIndex = 2 ImageIndex = 2
OnExecute = actFacturasExecute OnExecute = actFacturasExecute
OnUpdate = actFacturasUpdate
end end
object actPagos: TAction object actPagos: TAction
Caption = 'Cobros de cliente' Caption = 'Cobros de cliente'
ImageIndex = 3 ImageIndex = 3
OnExecute = actPagosExecute OnExecute = actPagosExecute
OnUpdate = actPagosUpdate
end end
object actFacturasP: TAction object actFacturasP: TAction
Caption = 'Facturas proforma' Caption = 'Facturas proforma'
ImageIndex = 2 ImageIndex = 2
OnExecute = actFacturasPExecute OnExecute = actFacturasPExecute
OnUpdate = actFacturasPUpdate
end end
object actAlbaranes: TAction object actAlbaranes: TAction
Caption = 'Albaranes de cliente' Caption = 'Albaranes de cliente'
OnExecute = actAlbaranesExecute OnExecute = actAlbaranesExecute
OnUpdate = actAlbaranesUpdate
end end
end end
end end

View File

@ -63,13 +63,6 @@ type
procedure actContratosExecute(Sender: TObject); procedure actContratosExecute(Sender: TObject);
procedure actObrasExecute(Sender: TObject); procedure actObrasExecute(Sender: TObject);
procedure actAlbaranesExecute(Sender: TObject); procedure actAlbaranesExecute(Sender: TObject);
procedure actClientesUpdate(Sender: TObject);
procedure actPresupuestosUpdate(Sender: TObject);
procedure actContratosUpdate(Sender: TObject);
procedure actFacturasUpdate(Sender: TObject);
procedure actPagosUpdate(Sender: TObject);
procedure actFacturasPUpdate(Sender: TObject);
procedure actAlbaranesUpdate(Sender: TObject);
public public
constructor Create (AOwner: TComponent); override; constructor Create (AOwner: TComponent); override;
end; end;
@ -80,7 +73,7 @@ var
implementation implementation
{$R *.DFM} {$R *.DFM}
uses uses
RdxEmpresaActiva, Literales, Principal, Clientes, PresupuestosClientes, FacturasClientes, PagosClientes, Principal, Clientes, PresupuestosClientes, FacturasClientes, PagosClientes,
InformeTrimestral, Entidades, FacturasProforma, ContratosClientes, Configuracion, InformeTrimestral, Entidades, FacturasProforma, ContratosClientes, Configuracion,
AlbaranesClientes; AlbaranesClientes;
@ -132,81 +125,4 @@ begin
Contenido := TfrAlbaranesClientes.Create(Self); Contenido := TfrAlbaranesClientes.Create(Self);
end; end;
procedure TfrBarraClientes.actClientesUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_CLIENTES, i)
else
(Sender as TAction).Enabled := True;
end;
procedure TfrBarraClientes.actPresupuestosUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PRESUPUESTOS, i)
else
(Sender as TAction).Enabled := True;
end;
procedure TfrBarraClientes.actContratosUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_CONTRATOS, i)
else
(Sender as TAction).Enabled := True;
end;
procedure TfrBarraClientes.actFacturasUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_FACTURAS_CLIENTE, i)
else
(Sender as TAction).Enabled := True;
end;
procedure TfrBarraClientes.actPagosUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PAGOS_CLIENTE, i)
else
(Sender as TAction).Enabled := True;
end;
procedure TfrBarraClientes.actFacturasPUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_FACTURAS_PROFORMA, i)
else
(Sender as TAction).Enabled := True;
end;
procedure TfrBarraClientes.actAlbaranesUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_ALBARANES, i)
else
(Sender as TAction).Enabled := True;
end;
end. end.

View File

@ -1,8 +1,8 @@
object frContratoCliente: TfrContratoCliente object frContratoCliente: TfrContratoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 853
Height = 410 Height = 626
Color = 16383743 Color = 16383743
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -17,7 +17,7 @@ object frContratoCliente: TfrContratoCliente
object pnlTitulo: TRdxPanelTituloOperacion object pnlTitulo: TRdxPanelTituloOperacion
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 853
Height = 22 Height = 22
Caption = ' ' Caption = ' '
Color = 11590911 Color = 11590911
@ -30,8 +30,8 @@ object frContratoCliente: TfrContratoCliente
end end
object brSalir: TRdxBarraInferior object brSalir: TRdxBarraInferior
Left = 0 Left = 0
Top = 310 Top = 526
Width = 630 Width = 853
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -111,8 +111,8 @@ object frContratoCliente: TfrContratoCliente
end end
object brGuardar: TRdxBarraInferior object brGuardar: TRdxBarraInferior
Left = 0 Left = 0
Top = 360 Top = 576
Width = 630 Width = 853
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -265,8 +265,8 @@ object frContratoCliente: TfrContratoCliente
object pnlCuerpo: TPanel object pnlCuerpo: TPanel
Left = 0 Left = 0
Top = 22 Top = 22
Width = 630 Width = 853
Height = 288 Height = 504
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -275,7 +275,7 @@ object frContratoCliente: TfrContratoCliente
object pnlFactura: TAdvPanel object pnlFactura: TAdvPanel
Left = 10 Left = 10
Top = 10 Top = 10
Width = 610 Width = 833
Height = 79 Height = 79
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -529,8 +529,8 @@ object frContratoCliente: TfrContratoCliente
object pnlPaginas: TRdxPanel object pnlPaginas: TRdxPanel
Left = 10 Left = 10
Top = 89 Top = 89
Width = 610 Width = 833
Height = 113 Height = 320
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
ColorHighLight = 8623776 ColorHighLight = 8623776
@ -541,8 +541,8 @@ object frContratoCliente: TfrContratoCliente
object Paginas: TRdxPagesControl object Paginas: TRdxPagesControl
Left = 0 Left = 0
Top = 0 Top = 0
Width = 610 Width = 833
Height = 113 Height = 320
ActivePage = pagContenido ActivePage = pagContenido
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -1117,8 +1117,8 @@ object frContratoCliente: TfrContratoCliente
object pnlGridArticulos: TPanel object pnlGridArticulos: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 825
Height = 85 Height = 292
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 5 BorderWidth = 5
@ -1128,7 +1128,7 @@ object frContratoCliente: TfrContratoCliente
object pnlBarraContenido: TRdxPanel object pnlBarraContenido: TRdxPanel
Left = 5 Left = 5
Top = 31 Top = 31
Width = 592 Width = 815
Height = 26 Height = 26
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1246,8 +1246,8 @@ object frContratoCliente: TfrContratoCliente
object gridDetalles: TcxGrid object gridDetalles: TcxGrid
Left = 5 Left = 5
Top = 57 Top = 57
Width = 592 Width = 815
Height = 193 Height = 153
Align = alClient Align = alClient
BevelInner = bvNone BevelInner = bvNone
BevelKind = bkFlat BevelKind = bkFlat
@ -1340,7 +1340,7 @@ object frContratoCliente: TfrContratoCliente
object pnlBarraPropiedades: TRdxPanel object pnlBarraPropiedades: TRdxPanel
Left = 5 Left = 5
Top = 5 Top = 5
Width = 592 Width = 815
Height = 26 Height = 26
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1543,8 +1543,8 @@ object frContratoCliente: TfrContratoCliente
end end
object pnlObservaciones: TRdxPanel object pnlObservaciones: TRdxPanel
Left = 5 Left = 5
Top = 3 Top = 210
Width = 592 Width = 815
Height = 77 Height = 77
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1556,7 +1556,7 @@ object frContratoCliente: TfrContratoCliente
object Label1: TLabel object Label1: TLabel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 592 Width = 815
Height = 22 Height = 22
Align = alTop Align = alTop
AutoSize = False AutoSize = False
@ -1578,7 +1578,7 @@ object frContratoCliente: TfrContratoCliente
TabOrder = 0 TabOrder = 0
OnExit = ObservacionesExit OnExit = ObservacionesExit
Height = 55 Height = 55
Width = 592 Width = 815
end end
end end
end end
@ -1763,7 +1763,7 @@ object frContratoCliente: TfrContratoCliente
object pnlFormasPago: TPanel object pnlFormasPago: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 825
Height = 100 Height = 100
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -1798,7 +1798,7 @@ object frContratoCliente: TfrContratoCliente
object RdxPanel5: TPanel object RdxPanel5: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 700
Height = 100 Height = 100
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -1818,14 +1818,14 @@ object frContratoCliente: TfrContratoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 80 Height = 80
Width = 457 Width = 680
end end
end end
end end
object pnlPlazosEntrega: TPanel object pnlPlazosEntrega: TPanel
Left = 0 Left = 0
Top = 100 Top = 100
Width = 602 Width = 825
Height = 100 Height = 100
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -1860,7 +1860,7 @@ object frContratoCliente: TfrContratoCliente
object Panel3: TPanel object Panel3: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 700
Height = 100 Height = 100
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -1880,14 +1880,14 @@ object frContratoCliente: TfrContratoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 80 Height = 80
Width = 457 Width = 680
end end
end end
end end
object pnlNota: TPanel object pnlNota: TPanel
Left = 0 Left = 0
Top = 200 Top = 200
Width = 602 Width = 825
Height = 100 Height = 100
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -1922,7 +1922,7 @@ object frContratoCliente: TfrContratoCliente
object Panel5: TPanel object Panel5: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 700
Height = 100 Height = 100
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -1942,7 +1942,7 @@ object frContratoCliente: TfrContratoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 80 Height = 80
Width = 457 Width = 680
end end
end end
end end
@ -2126,9 +2126,9 @@ object frContratoCliente: TfrContratoCliente
end end
object pnlImportes: TAdvPanel object pnlImportes: TAdvPanel
Left = 10 Left = 10
Top = 202 Top = 409
Width = 610 Width = 833
Height = 76 Height = 85
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
Color = 16383743 Color = 16383743
@ -2206,274 +2206,175 @@ object frContratoCliente: TfrContratoCliente
TopIndent = 0 TopIndent = 0
URLColor = clBlue URLColor = clBlue
FullHeight = 38 FullHeight = 38
object Panel1: TPanel object Label7: TLabel
Left = 116 Left = 66
Top = 0 Top = 13
Width = 494 Width = 74
Height = 76 Height = 13
Align = alRight Caption = 'Descuento(%):'
BevelOuter = bvNone Font.Charset = DEFAULT_CHARSET
BorderWidth = 5 Font.Color = clWindowText
ParentColor = True Font.Height = -11
TabOrder = 0 Font.Name = 'Tahoma'
object RdxPanel1: TRdxPanel Font.Style = []
Left = 5 ParentFont = False
Top = 5
Width = 484
Height = 66
BorderStyle = bsSingle
Caption = ' '
BorderWidth = 1
Color = 15726583
ColorHighLight = 8623776
ColorShadow = 8623776
Align = alClient
TabOrder = 0
UseDockManager = True
object Label5: TLabel
Left = 135
Top = 10
Width = 70
Height = 13
Alignment = taRightJustify
Caption = 'Base imponible'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label9: TLabel
Left = 400
Top = 10
Width = 77
Height = 13
Alignment = taRightJustify
Caption = 'Importe total'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Label10: TLabel
Left = 29
Top = 10
Width = 76
Height = 13
Alignment = taRightJustify
Caption = 'Importe de dto.'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label11: TLabel
Left = 234
Top = 10
Width = 73
Height = 13
Alignment = taRightJustify
Caption = 'Importe de IVA'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Shape2: TShape
Left = 16
Top = 29
Width = 465
Height = 1
end
object Label4: TLabel
Left = 319
Top = 10
Width = 69
Height = 13
Alignment = taRightJustify
Caption = 'Importe de RE'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object BaseImponible: TcxDBTextEdit
Left = 95
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'BASEIMPONIBLE'
DataBinding.DataSource = dsContrato
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 0
Height = 21
Width = 110
end
object ImporteDescuento: TcxDBTextEdit
Left = 26
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTEDESCUENTO'
DataBinding.DataSource = dsContrato
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 1
Height = 21
Width = 79
end
object ImporteIVA: TcxDBTextEdit
Left = 231
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTEIVA'
DataBinding.DataSource = dsContrato
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 2
Height = 21
Width = 76
end
object ImporteTotal: TcxDBTextEdit
Left = 380
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTETOTAL'
DataBinding.DataSource = dsContrato
ParentFont = False
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.Font.Charset = DEFAULT_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -11
Style.Font.Name = 'Tahoma'
Style.Font.Style = [fsBold]
Style.HotTrack = False
Style.IsFontAssigned = True
TabOrder = 3
Height = 21
Width = 98
end
object ImporteRE: TcxDBTextEdit
Left = 312
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTERE'
DataBinding.DataSource = dsContrato
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 4
Height = 21
Width = 76
end
end
end end
object Panel6: TPanel object Label8: TLabel
Left = 0 Left = 228
Top = 0 Top = 13
Width = 116 Width = 40
Height = 76 Height = 13
Align = alClient Alignment = taRightJustify
Alignment = taLeftJustify Caption = 'IVA(%):'
BevelOuter = bvNone Font.Charset = DEFAULT_CHARSET
ParentColor = True Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label5: TLabel
Left = 22
Top = 39
Width = 70
Height = 13
Alignment = taRightJustify
Caption = 'Base imponible'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label10: TLabel
Left = 133
Top = 39
Width = 72
Height = 13
Alignment = taRightJustify
Caption = 'Importe de dto'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label11: TLabel
Left = 228
Top = 39
Width = 73
Height = 13
Alignment = taRightJustify
Caption = 'Importe de IVA'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label9: TLabel
Left = 338
Top = 39
Width = 77
Height = 13
Alignment = taRightJustify
Caption = 'Importe total'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Descuento: TcxDBTextEdit
Left = 145
Top = 9
DataBinding.DataField = 'DESCUENTO'
DataBinding.DataSource = dsContrato
ParentFont = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 0
Width = 57
end
object IVA: TcxDBTextEdit
Left = 271
Top = 9
DataBinding.DataField = 'IVA'
DataBinding.DataSource = dsContrato
ParentFont = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 1 TabOrder = 1
object Label7: TLabel Width = 57
Left = 8 end
Top = 50 object BaseImponible: TcxDBTextEdit
Width = 74 Left = 2
Height = 13 Top = 59
Caption = 'Descuento(%):' TabStop = False
Font.Charset = DEFAULT_CHARSET DataBinding.DataField = 'BASEIMPONIBLE'
Font.Color = clWindowText DataBinding.DataSource = dsContrato
Font.Height = -11 Properties.Alignment.Horz = taRightJustify
Font.Name = 'Tahoma' Properties.AutoSelect = False
Font.Style = [] Properties.ReadOnly = True
ParentFont = False Style.BorderStyle = ebsNone
end Style.Color = 15726583
object Label8: TLabel Style.HotTrack = False
Left = 157 TabOrder = 2
Top = 50 Width = 90
Width = 40 end
Height = 13 object ImporteDescuento: TcxDBTextEdit
Alignment = taRightJustify Left = 115
Caption = 'IVA(%):' Top = 59
Font.Charset = DEFAULT_CHARSET TabStop = False
Font.Color = clWindowText DataBinding.DataField = 'IMPORTEDESCUENTO'
Font.Height = -11 DataBinding.DataSource = dsContrato
Font.Name = 'Tahoma' Properties.Alignment.Horz = taRightJustify
Font.Style = [] Properties.AutoSelect = False
ParentFont = False Properties.ReadOnly = True
end Style.BorderStyle = ebsNone
object cbRecargoEquivalencia: TcxCheckBox Style.Color = 15726583
Left = 8 Style.HotTrack = False
Top = 14 TabOrder = 3
Caption = 'Acogido al recargo de equivalencia' Width = 90
ParentColor = False end
ParentFont = False object ImporteIVA: TcxDBTextEdit
Properties.NullStyle = nssUnchecked Left = 211
Properties.OnChange = cbRecargoEquivalenciaPropertiesChange Top = 59
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro TabStop = False
TabOrder = 0 DataBinding.DataField = 'IMPORTEIVA'
Width = 193 DataBinding.DataSource = dsContrato
end Properties.Alignment.Horz = taRightJustify
object Descuento: TcxDBTextEdit Properties.AutoSelect = False
Left = 85 Properties.ReadOnly = True
Top = 46 Style.BorderStyle = ebsNone
DataBinding.DataField = 'DESCUENTO' Style.Color = 15726583
DataBinding.DataSource = dsContrato Style.HotTrack = False
ParentFont = False TabOrder = 4
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Width = 90
TabOrder = 1 end
Width = 57 object ImporteTotal: TcxDBTextEdit
end Left = 325
object IVA: TcxDBTextEdit Top = 59
Left = 203 TabStop = False
Top = 46 DataBinding.DataField = 'IMPORTETOTAL'
DataBinding.DataField = 'IVA' DataBinding.DataSource = dsContrato
DataBinding.DataSource = dsContrato ParentFont = False
ParentFont = False Properties.Alignment.Horz = taRightJustify
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Properties.AutoSelect = False
TabOrder = 2 Properties.ReadOnly = True
Width = 57 Style.BorderStyle = ebsNone
end Style.Color = 15726583
object RecargoEquivalencia: TcxDBTextEdit Style.Font.Charset = DEFAULT_CHARSET
Left = 203 Style.Font.Color = clWindowText
Top = 14 Style.Font.Height = -11
DataBinding.DataField = 'RE' Style.Font.Name = 'Tahoma'
DataBinding.DataSource = dsContrato Style.Font.Style = [fsBold]
ParentFont = False Style.HotTrack = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.IsFontAssigned = True
TabOrder = 3 TabOrder = 5
Width = 57 Width = 90
end
end end
end end
end end

View File

@ -52,7 +52,7 @@ uses
cxDBLookupEdit, cxDBLookupComboBox, TablaDocumentos, TablaPropiedades, cxDBLookupEdit, cxDBLookupComboBox, TablaDocumentos, TablaPropiedades,
RdxEmpresaActiva, am2000utils, cxCurrencyEdit, RXCtrls, Mask, dbcgrids, RdxEmpresaActiva, am2000utils, cxCurrencyEdit, RXCtrls, Mask, dbcgrids,
cxDataStorage, JvExForms, JvBaseThumbnail, JvThumbViews, JvExComCtrls, cxDataStorage, JvExForms, JvBaseThumbnail, JvThumbViews, JvExComCtrls,
JvComCtrls, Dialogs, cxCheckBox; JvComCtrls, Dialogs;
type type
TfrContratoCliente = class(TRdxFrameContratos) TfrContratoCliente = class(TRdxFrameContratos)
@ -114,6 +114,7 @@ type
FormasPago: TcxDBMemo; FormasPago: TcxDBMemo;
dsPropiedadesContrato: TDataSource; dsPropiedadesContrato: TDataSource;
eDocumento: TLabel; eDocumento: TLabel;
pnlImportes: TAdvPanel;
cbxDocumento: TcxDBLookupComboBox; cbxDocumento: TcxDBLookupComboBox;
dsDocumentos: TDataSource; dsDocumentos: TDataSource;
TablaDocumentos: TIBQuery; TablaDocumentos: TIBQuery;
@ -124,6 +125,10 @@ type
TablaValores: TIBQuery; TablaValores: TIBQuery;
dsValores: TDataSource; dsValores: TDataSource;
dsPropiedades: TDataSource; dsPropiedades: TDataSource;
Label7: TLabel;
Descuento: TcxDBTextEdit;
Label8: TLabel;
IVA: TcxDBTextEdit;
actAnadirPropiedad: TAction; actAnadirPropiedad: TAction;
actEliminarPropiedad: TAction; actEliminarPropiedad: TAction;
pnlBarraPropiedades: TRdxPanel; pnlBarraPropiedades: TRdxPanel;
@ -140,6 +145,14 @@ type
DBEdit1: TDBEdit; DBEdit1: TDBEdit;
DBEdit2: TDBEdit; DBEdit2: TDBEdit;
pnlGrid: TRdxPanel; pnlGrid: TRdxPanel;
Label5: TLabel;
Label10: TLabel;
Label11: TLabel;
Label9: TLabel;
BaseImponible: TcxDBTextEdit;
ImporteDescuento: TcxDBTextEdit;
ImporteIVA: TcxDBTextEdit;
ImporteTotal: TcxDBTextEdit;
eSeccion: TLabel; eSeccion: TLabel;
Seccion: TcxComboBox; Seccion: TcxComboBox;
pnlObservaciones: TRdxPanel; pnlObservaciones: TRdxPanel;
@ -177,27 +190,6 @@ type
RdxBoton6: TRdxBoton; RdxBoton6: TRdxBoton;
tvPlanos: TJvThumbView; tvPlanos: TJvThumbView;
OpenDialog1: TOpenDialog; OpenDialog1: TOpenDialog;
pnlImportes: TAdvPanel;
Panel1: TPanel;
RdxPanel1: TRdxPanel;
Label5: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Shape2: TShape;
Label4: TLabel;
BaseImponible: TcxDBTextEdit;
ImporteDescuento: TcxDBTextEdit;
ImporteIVA: TcxDBTextEdit;
ImporteTotal: TcxDBTextEdit;
ImporteRE: TcxDBTextEdit;
Panel6: TPanel;
Label7: TLabel;
Label8: TLabel;
cbRecargoEquivalencia: TcxCheckBox;
Descuento: TcxDBTextEdit;
IVA: TcxDBTextEdit;
RecargoEquivalencia: TcxDBTextEdit;
procedure bSalirClick(Sender: TObject); procedure bSalirClick(Sender: TObject);
procedure bGuardarClick(Sender: TObject); procedure bGuardarClick(Sender: TObject);
procedure bCancelarClick(Sender: TObject); procedure bCancelarClick(Sender: TObject);
@ -246,7 +238,6 @@ type
procedure actAnadirPlanoUpdate(Sender: TObject); procedure actAnadirPlanoUpdate(Sender: TObject);
procedure tvPlanosDblClick(Sender: TObject); procedure tvPlanosDblClick(Sender: TObject);
procedure JvTrackBar1Change(Sender: TObject); procedure JvTrackBar1Change(Sender: TObject);
procedure cbRecargoEquivalenciaPropertiesChange(Sender: TObject);
private private
FRootPlanos: Variant; FRootPlanos: Variant;
FDirectorio: Variant; FDirectorio: Variant;
@ -284,7 +275,6 @@ type
procedure ProvinciaSetText(Sender: TField; const Text: String); procedure ProvinciaSetText(Sender: TField; const Text: String);
procedure IVASetText(Sender: TField; const Text: String); procedure IVASetText(Sender: TField; const Text: String);
procedure DtoSetText(Sender: TField; const Text: String); procedure DtoSetText(Sender: TField; const Text: String);
procedure RESetText(Sender: TField; const Text: String);
procedure CodigoArticuloDetalleSetText(Sender: TField; const Text: String); procedure CodigoArticuloDetalleSetText(Sender: TField; const Text: String);
procedure ReferenciaArticuloDetalleSetText(Sender: TField; const Text: String); procedure ReferenciaArticuloDetalleSetText(Sender: TField; const Text: String);
procedure CantidadDetalleSetText(Sender: TField; const Text: String); procedure CantidadDetalleSetText(Sender: TField; const Text: String);
@ -375,8 +365,6 @@ begin
CodCliente.Properties.Buttons[0].Visible := True; CodCliente.Properties.Buttons[0].Visible := True;
Poblacion.Properties.Buttons[0].Visible := True; Poblacion.Properties.Buttons[0].Visible := True;
Provincia.Properties.Buttons[0].Visible := True; Provincia.Properties.Buttons[0].Visible := True;
cbRecargoEquivalencia.Checked := False;
RecargoEquivalencia.Enabled := False;
DesactivarEventosCampos; DesactivarEventosCampos;
try try
@ -433,7 +421,6 @@ begin
dmTablaContratos.InicializarTablaContratos(@TablaContratos); dmTablaContratos.InicializarTablaContratos(@TablaContratos);
dmTablaContratos.InicializarTablaDetalles(@TablaDetallesMem); dmTablaContratos.InicializarTablaDetalles(@TablaDetallesMem);
cbRecargoEquivalencia.Properties.ReadOnly := False;
ActivarEdicionGridDetalles(VistaDetalles); ActivarEdicionGridDetalles(VistaDetalles);
@ -538,10 +525,6 @@ begin
DeshabilitarPlanos; DeshabilitarPlanos;
end;} end;}
cbRecargoEquivalencia.Checked := TablaContratos.FieldByName('RE').AsFloat > 0;
RecargoEquivalencia.Enabled := TablaContratos.FieldByName('RE').AsFloat > 0;
cbRecargoEquivalencia.Properties.ReadOnly := True;
FechaContrato.SetFocus; FechaContrato.SetFocus;
except except
on E : EIBError do on E : EIBError do
@ -609,10 +592,6 @@ begin
DeshabilitarPlanos; DeshabilitarPlanos;
end;} end;}
cbRecargoEquivalencia.Checked := TablaContratos.FieldByName('RE').AsFloat > 0;
RecargoEquivalencia.Enabled := TablaContratos.FieldByName('RE').AsFloat > 0;
cbRecargoEquivalencia.Properties.ReadOnly := True;
Visible := True; Visible := True;
except except
on E : EIBError do on E : EIBError do
@ -676,10 +655,6 @@ begin
end; end;
end; end;
cbRecargoEquivalencia.Checked := TablaContratos.FieldByName('RE').AsFloat > 0;
RecargoEquivalencia.Enabled := TablaContratos.FieldByName('RE').AsFloat > 0;
cbRecargoEquivalencia.Properties.ReadOnly := False;
ActivarEventosCampos; ActivarEventosCampos;
ConfigurarPantallaDocumento; ConfigurarPantallaDocumento;
Visible := True; Visible := True;
@ -866,16 +841,13 @@ end;
procedure TfrContratoCliente.CalcularTotalContrato; procedure TfrContratoCliente.CalcularTotalContrato;
var var
ImporteNeto,
BaseImponible, BaseImponible,
ImporteRE,
ImporteIVA, ImporteIVA,
ImporteDto, ImporteDto,
ImporteTotal : Double; ImporteTotal : Double;
FDetallesBookmark : string; FDetallesBookmark : string;
begin begin
ImporteNeto := 0; //Total de los articulos BaseImponible := 0;
BaseImponible := 0; //Importe neto una vez aplicado el dto
ImporteTotal := 0; ImporteTotal := 0;
with TablaDetallesMem do with TablaDetallesMem do
begin begin
@ -884,22 +856,19 @@ begin
try try
First; First;
while not EOF do begin while not EOF do begin
ImporteNeto := ImporteNeto + FieldByName('IMPORTETOTAL').AsFloat; BaseImponible := BaseImponible + FieldByName('IMPORTETOTAL').AsFloat;
Next; Next;
end; end;
ImporteDto := ImporteNeto * (TablaContratos.FieldByName('DESCUENTO').AsFloat/100); ImporteDto := BaseImponible * (TablaContratos.FieldByName('DESCUENTO').AsFloat/100);
BaseImponible := ImporteNeto - ImporteDto; ImporteTotal := BaseImponible - ImporteDto;
ImporteIVA := ImporteTotal * (TablaContratos.FieldByName('IVA').AsFloat/100);
ImporteRE := BaseImponible * (TablaContratos.FieldByName('RE').AsFloat/100); ImporteTotal := ImporteTotal + ImporteIVA;
ImporteIVA := BaseImponible * (TablaContratos.FieldByName('IVA').AsFloat/100);
ImporteTotal := BaseImponible + ImporteIVA + ImporteRE;
TablaContratos.Edit; TablaContratos.Edit;
TablaContratos.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible; TablaContratos.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible;
TablaContratos.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto; TablaContratos.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto;
TablaContratos.FieldByName('IMPORTEIVA').AsFloat := ImporteIVA; TablaContratos.FieldByName('IMPORTEIVA').AsFloat := ImporteIVA;
TablaContratos.FieldByName('IMPORTERE').AsFloat := ImporteRE;
TablaContratos.FieldByName('IMPORTETOTAL').AsFloat := ImporteTotal; TablaContratos.FieldByName('IMPORTETOTAL').AsFloat := ImporteTotal;
finally finally
Bookmark := FDetallesBookmark; Bookmark := FDetallesBookmark;
@ -1498,14 +1467,11 @@ end;
procedure TfrContratoCliente.ActivarEventosCampos; procedure TfrContratoCliente.ActivarEventosCampos;
begin begin
cbRecargoEquivalencia.Properties.OnChange := cbRecargoEquivalenciaPropertiesChange;
with TablaContratos do with TablaContratos do
begin begin
FieldByName('CODIGOCLIENTE').OnSetText := CodCliSetText; FieldByName('CODIGOCLIENTE').OnSetText := CodCliSetText;
FieldByName('IVA').OnSetText := IVASetText; FieldByName('IVA').OnSetText := IVASetText;
FieldByName('DESCUENTO').OnSetText := DtoSetText; FieldByName('DESCUENTO').OnSetText := DtoSetText;
FieldByName('RE').OnSetText := RESetText;
end; end;
with TablaDetallesMem do with TablaDetallesMem do
@ -1965,8 +1931,6 @@ end;
procedure TfrContratoCliente.DesactivarEventosCampos; procedure TfrContratoCliente.DesactivarEventosCampos;
begin begin
cbRecargoEquivalencia.Properties.OnChange := NIL;
with TablaContratos do with TablaContratos do
begin begin
if FindField('CODIGOCLIENTE') <> NIL then if FindField('CODIGOCLIENTE') <> NIL then
@ -1975,8 +1939,6 @@ begin
FieldByName('IVA').OnSetText := NIL; FieldByName('IVA').OnSetText := NIL;
if FindField('DESCUENTO') <> NIL then if FindField('DESCUENTO') <> NIL then
FieldByName('DESCUENTO').OnSetText := NIL; FieldByName('DESCUENTO').OnSetText := NIL;
if FindField('RE') <> NIL then
FieldByName('RE').OnSetText := NIL;
end; end;
with TablaDetallesMem do with TablaDetallesMem do
@ -2664,26 +2626,5 @@ begin
gridDetalles.SetFocus; gridDetalles.SetFocus;
end; end;
procedure TfrContratoCliente.cbRecargoEquivalenciaPropertiesChange(Sender: TObject);
begin
RecargoEquivalencia.Enabled := cbRecargoEquivalencia.Checked;
if not cbRecargoEquivalencia.Checked then
begin
RecargoEquivalencia.DataBinding.Field.Value := Null;
CalcularTotalContrato;
end;
end;
procedure TfrContratoCliente.RESetText(Sender: TField; const Text: String);
begin
if EsCadenaVacia(Text) then
Sender.AsString := '0'
else begin
ValidarDto(Text);
Sender.AsString := Text;
end;
CalcularTotalContrato;
end;
end. end.

View File

@ -1,8 +1,8 @@
object frFacturaCliente: TfrFacturaCliente object frFacturaCliente: TfrFacturaCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 954
Height = 410 Height = 639
Color = 16383743 Color = 16383743
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -17,7 +17,7 @@ object frFacturaCliente: TfrFacturaCliente
object Titulo: TRdxPanelTituloOperacion object Titulo: TRdxPanelTituloOperacion
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 954
Height = 22 Height = 22
Caption = ' ' Caption = ' '
Color = 11590911 Color = 11590911
@ -30,8 +30,8 @@ object frFacturaCliente: TfrFacturaCliente
end end
object brSalir: TRdxBarraInferior object brSalir: TRdxBarraInferior
Left = 0 Left = 0
Top = 310 Top = 539
Width = 630 Width = 954
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -111,8 +111,8 @@ object frFacturaCliente: TfrFacturaCliente
end end
object brGuardar: TRdxBarraInferior object brGuardar: TRdxBarraInferior
Left = 0 Left = 0
Top = 360 Top = 589
Width = 630 Width = 954
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -265,8 +265,8 @@ object frFacturaCliente: TfrFacturaCliente
object pnlCuerpo: TPanel object pnlCuerpo: TPanel
Left = 0 Left = 0
Top = 22 Top = 22
Width = 630 Width = 954
Height = 288 Height = 517
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -275,7 +275,7 @@ object frFacturaCliente: TfrFacturaCliente
object pnlDatosFactura: TAdvPanel object pnlDatosFactura: TAdvPanel
Left = 10 Left = 10
Top = 10 Top = 10
Width = 610 Width = 934
Height = 121 Height = 121
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -593,8 +593,8 @@ object frFacturaCliente: TfrFacturaCliente
object pnlGrid: TAdvPanel object pnlGrid: TAdvPanel
Left = 10 Left = 10
Top = 131 Top = 131
Width = 610 Width = 934
Height = 71 Height = 300
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
@ -660,8 +660,8 @@ object frFacturaCliente: TfrFacturaCliente
object Paginas: TRdxPagesControl object Paginas: TRdxPagesControl
Left = 0 Left = 0
Top = 0 Top = 0
Width = 610 Width = 934
Height = 71 Height = 300
ActivePage = pagCliente ActivePage = pagCliente
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -1236,8 +1236,8 @@ object frFacturaCliente: TfrFacturaCliente
object pnlGridArticulos: TPanel object pnlGridArticulos: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 926
Height = 43 Height = 272
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -1247,7 +1247,7 @@ object frFacturaCliente: TfrFacturaCliente
object pnlBarraGrid: TRdxPanel object pnlBarraGrid: TRdxPanel
Left = 10 Left = 10
Top = 10 Top = 10
Width = 582 Width = 906
Height = 26 Height = 26
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1401,7 +1401,7 @@ object frFacturaCliente: TfrFacturaCliente
object gridDetalles: TcxGrid object gridDetalles: TcxGrid
Left = 10 Left = 10
Top = 36 Top = 36
Width = 582 Width = 906
Height = 226 Height = 226
Align = alClient Align = alClient
BevelInner = bvNone BevelInner = bvNone
@ -1435,7 +1435,6 @@ object frFacturaCliente: TfrFacturaCliente
OptionsView.GroupByBox = False OptionsView.GroupByBox = False
OptionsView.HeaderEndEllipsis = True OptionsView.HeaderEndEllipsis = True
OptionsView.Indicator = True OptionsView.Indicator = True
OptionsView.NewItemRowInfoText = 'Click here to add a new row'
OptionsView.RowSeparatorColor = 14280169 OptionsView.RowSeparatorColor = 14280169
Styles.StyleSheet = dmConfiguracion.StyleSheetGrid Styles.StyleSheet = dmConfiguracion.StyleSheetGrid
end end
@ -1448,7 +1447,6 @@ object frFacturaCliente: TfrFacturaCliente
DataController.Summary.FooterSummaryItems = <> DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <> DataController.Summary.SummaryGroups = <>
OptionsView.GroupByBox = False OptionsView.GroupByBox = False
OptionsView.NewItemRowInfoText = 'Click here to add a new row'
Styles.StyleSheet = dmConfiguracion.StyleSheetGrid Styles.StyleSheet = dmConfiguracion.StyleSheetGrid
end end
object gridDetallesLevel1: TcxGridLevel object gridDetallesLevel1: TcxGridLevel
@ -1464,7 +1462,7 @@ object frFacturaCliente: TfrFacturaCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 125 Width = 125
Height = 43 Height = 272
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
Caption = ' ' Caption = ' '
@ -1489,8 +1487,8 @@ object frFacturaCliente: TfrFacturaCliente
object RdxPanel5: TPanel object RdxPanel5: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 801
Height = 43 Height = 272
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -1508,8 +1506,8 @@ object frFacturaCliente: TfrFacturaCliente
Properties.ScrollBars = ssVertical Properties.ScrollBars = ssVertical
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 23 Height = 252
Width = 457 Width = 781
end end
end end
end end
@ -1517,8 +1515,8 @@ object frFacturaCliente: TfrFacturaCliente
end end
object pnlImportes: TAdvPanel object pnlImportes: TAdvPanel
Left = 10 Left = 10
Top = 202 Top = 431
Width = 610 Width = 934
Height = 76 Height = 76
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
@ -1598,9 +1596,9 @@ object frFacturaCliente: TfrFacturaCliente
URLColor = clBlue URLColor = clBlue
FullHeight = 38 FullHeight = 38
object Panel1: TPanel object Panel1: TPanel
Left = 116 Left = 500
Top = 0 Top = 0
Width = 494 Width = 434
Height = 76 Height = 76
Align = alRight Align = alRight
BevelOuter = bvNone BevelOuter = bvNone
@ -1610,7 +1608,7 @@ object frFacturaCliente: TfrFacturaCliente
object RdxPanel1: TRdxPanel object RdxPanel1: TRdxPanel
Left = 5 Left = 5
Top = 5 Top = 5
Width = 484 Width = 424
Height = 66 Height = 66
BorderStyle = bsSingle BorderStyle = bsSingle
Caption = ' ' Caption = ' '
@ -1622,7 +1620,7 @@ object frFacturaCliente: TfrFacturaCliente
TabOrder = 0 TabOrder = 0
UseDockManager = True UseDockManager = True
object Label5: TLabel object Label5: TLabel
Left = 135 Left = 52
Top = 10 Top = 10
Width = 70 Width = 70
Height = 13 Height = 13
@ -1636,7 +1634,7 @@ object frFacturaCliente: TfrFacturaCliente
ParentFont = False ParentFont = False
end end
object Label9: TLabel object Label9: TLabel
Left = 400 Left = 332
Top = 10 Top = 10
Width = 77 Width = 77
Height = 13 Height = 13
@ -1650,7 +1648,7 @@ object frFacturaCliente: TfrFacturaCliente
ParentFont = False ParentFont = False
end end
object Label10: TLabel object Label10: TLabel
Left = 29 Left = 145
Top = 10 Top = 10
Width = 76 Width = 76
Height = 13 Height = 13
@ -1664,7 +1662,7 @@ object frFacturaCliente: TfrFacturaCliente
ParentFont = False ParentFont = False
end end
object Label11: TLabel object Label11: TLabel
Left = 234 Left = 238
Top = 10 Top = 10
Width = 73 Width = 73
Height = 13 Height = 13
@ -1680,25 +1678,11 @@ object frFacturaCliente: TfrFacturaCliente
object Shape2: TShape object Shape2: TShape
Left = 16 Left = 16
Top = 29 Top = 29
Width = 465 Width = 394
Height = 1 Height = 1
end end
object Label4: TLabel
Left = 319
Top = 10
Width = 69
Height = 13
Alignment = taRightJustify
Caption = 'Importe de RE'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object BaseImponible: TcxDBTextEdit object BaseImponible: TcxDBTextEdit
Left = 95 Left = 12
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1714,7 +1698,7 @@ object frFacturaCliente: TfrFacturaCliente
Width = 110 Width = 110
end end
object ImporteDescuento: TcxDBTextEdit object ImporteDescuento: TcxDBTextEdit
Left = 26 Left = 142
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1730,7 +1714,7 @@ object frFacturaCliente: TfrFacturaCliente
Width = 79 Width = 79
end end
object ImporteIVA: TcxDBTextEdit object ImporteIVA: TcxDBTextEdit
Left = 231 Left = 235
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1746,7 +1730,7 @@ object frFacturaCliente: TfrFacturaCliente
Width = 76 Width = 76
end end
object ImporteTotal: TcxDBTextEdit object ImporteTotal: TcxDBTextEdit
Left = 380 Left = 312
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1768,28 +1752,12 @@ object frFacturaCliente: TfrFacturaCliente
Height = 21 Height = 21
Width = 98 Width = 98
end end
object ImporteRE: TcxDBTextEdit
Left = 312
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTERE'
DataBinding.DataSource = dsFactura
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 4
Height = 21
Width = 76
end
end end
end end
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 116 Width = 500
Height = 76 Height = 76
Align = alClient Align = alClient
Alignment = taLeftJustify Alignment = taLeftJustify

View File

@ -167,8 +167,6 @@ type
cbxTrimestres: TcxComboBox; cbxTrimestres: TcxComboBox;
eTrimestreCerrado: TLabel; eTrimestreCerrado: TLabel;
cbComisiones: TcxDBCheckBox; cbComisiones: TcxDBCheckBox;
Label4: TLabel;
ImporteRE: TcxDBTextEdit;
procedure bCancelarClick(Sender: TObject); procedure bCancelarClick(Sender: TObject);
procedure bSalirClick(Sender: TObject); procedure bSalirClick(Sender: TObject);
procedure bGuardarClick(Sender: TObject); procedure bGuardarClick(Sender: TObject);
@ -742,7 +740,6 @@ end;
procedure TfrFacturaCliente.CalcularTotalFactura; procedure TfrFacturaCliente.CalcularTotalFactura;
var var
ImporteNeto,
BaseImponible, BaseImponible,
ImporteRE, ImporteRE,
ImporteIVA, ImporteIVA,
@ -750,8 +747,7 @@ var
ImporteTotal : Double; ImporteTotal : Double;
FDetallesBookmark : string; FDetallesBookmark : string;
begin begin
ImporteNeto := 0; //Total de los articulos BaseImponible := 0;
BaseImponible := 0; //Importe neto una vez aplicado el dto
ImporteTotal := 0; ImporteTotal := 0;
with TablaDetallesMem do with TablaDetallesMem do
begin begin
@ -760,16 +756,15 @@ begin
try try
First; First;
while not EOF do begin while not EOF do begin
ImporteNeto := ImporteNeto + FieldByName('IMPORTETOTAL').AsFloat; BaseImponible := BaseImponible + FieldByName('IMPORTETOTAL').AsFloat;
Next; Next;
end; end;
ImporteDto := ImporteNeto * (TablaFacturas.FieldByName('DESCUENTO').AsFloat/100);
BaseImponible := ImporteNeto - ImporteDto;
ImporteRE := BaseImponible * (TablaFacturas.FieldByName('RE').AsFloat/100); ImporteRE := BaseImponible * (TablaFacturas.FieldByName('RE').AsFloat/100);
ImporteIVA := BaseImponible * (TablaFacturas.FieldByName('IVA').AsFloat/100); ImporteDto := BaseImponible * (TablaFacturas.FieldByName('DESCUENTO').AsFloat/100);
ImporteTotal := BaseImponible + ImporteIVA + ImporteRE; ImporteTotal := BaseImponible - ImporteDto;
ImporteIVA := ImporteTotal * (TablaFacturas.FieldByName('IVA').AsFloat/100);
ImporteTotal := ImporteTotal + ImporteIVA + ImporteRE;
TablaFacturas.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible; TablaFacturas.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible;
TablaFacturas.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto; TablaFacturas.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto;

View File

@ -1,8 +1,8 @@
object frFacturaProforma: TfrFacturaProforma object frFacturaProforma: TfrFacturaProforma
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 736
Height = 410 Height = 643
Color = 16383743 Color = 16383743
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -17,7 +17,7 @@ object frFacturaProforma: TfrFacturaProforma
object Titulo: TRdxPanelTituloOperacion object Titulo: TRdxPanelTituloOperacion
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 736
Height = 22 Height = 22
Caption = ' ' Caption = ' '
Color = 11590911 Color = 11590911
@ -30,8 +30,8 @@ object frFacturaProforma: TfrFacturaProforma
end end
object brSalir: TRdxBarraInferior object brSalir: TRdxBarraInferior
Left = 0 Left = 0
Top = 310 Top = 543
Width = 630 Width = 736
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -111,8 +111,8 @@ object frFacturaProforma: TfrFacturaProforma
end end
object brGuardar: TRdxBarraInferior object brGuardar: TRdxBarraInferior
Left = 0 Left = 0
Top = 360 Top = 593
Width = 630 Width = 736
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -265,8 +265,8 @@ object frFacturaProforma: TfrFacturaProforma
object pnlCuerpo: TPanel object pnlCuerpo: TPanel
Left = 0 Left = 0
Top = 22 Top = 22
Width = 630 Width = 736
Height = 288 Height = 521
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -275,7 +275,7 @@ object frFacturaProforma: TfrFacturaProforma
object pnlDatosFactura: TAdvPanel object pnlDatosFactura: TAdvPanel
Left = 10 Left = 10
Top = 10 Top = 10
Width = 610 Width = 716
Height = 121 Height = 121
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -488,8 +488,8 @@ object frFacturaProforma: TfrFacturaProforma
object pnlGrid: TAdvPanel object pnlGrid: TAdvPanel
Left = 10 Left = 10
Top = 131 Top = 131
Width = 610 Width = 716
Height = 71 Height = 304
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
@ -555,8 +555,8 @@ object frFacturaProforma: TfrFacturaProforma
object Paginas: TRdxPagesControl object Paginas: TRdxPagesControl
Left = 0 Left = 0
Top = 0 Top = 0
Width = 610 Width = 716
Height = 71 Height = 304
ActivePage = pagContenido ActivePage = pagContenido
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -1131,8 +1131,8 @@ object frFacturaProforma: TfrFacturaProforma
object pnlGridArticulos: TPanel object pnlGridArticulos: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 708
Height = 43 Height = 276
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -1142,7 +1142,7 @@ object frFacturaProforma: TfrFacturaProforma
object pnlBarraGrid: TPanel object pnlBarraGrid: TPanel
Left = 10 Left = 10
Top = 10 Top = 10
Width = 582 Width = 688
Height = 28 Height = 28
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -1258,8 +1258,8 @@ object frFacturaProforma: TfrFacturaProforma
object gridDetalles: TcxGrid object gridDetalles: TcxGrid
Left = 10 Left = 10
Top = 38 Top = 38
Width = 582 Width = 688
Height = 250 Height = 228
Align = alClient Align = alClient
BevelInner = bvNone BevelInner = bvNone
BevelKind = bkFlat BevelKind = bkFlat
@ -1307,7 +1307,7 @@ object frFacturaProforma: TfrFacturaProforma
Left = 0 Left = 0
Top = 0 Top = 0
Width = 125 Width = 125
Height = 43 Height = 276
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
Caption = ' ' Caption = ' '
@ -1332,8 +1332,8 @@ object frFacturaProforma: TfrFacturaProforma
object RdxPanel5: TPanel object RdxPanel5: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 583
Height = 43 Height = 276
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -1351,8 +1351,8 @@ object frFacturaProforma: TfrFacturaProforma
Properties.ScrollBars = ssVertical Properties.ScrollBars = ssVertical
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 23 Height = 256
Width = 457 Width = 563
end end
end end
end end
@ -1360,8 +1360,8 @@ object frFacturaProforma: TfrFacturaProforma
end end
object pnlImportes: TAdvPanel object pnlImportes: TAdvPanel
Left = 10 Left = 10
Top = 202 Top = 435
Width = 610 Width = 716
Height = 76 Height = 76
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
@ -1441,9 +1441,9 @@ object frFacturaProforma: TfrFacturaProforma
URLColor = clBlue URLColor = clBlue
FullHeight = 38 FullHeight = 38
object Panel1: TPanel object Panel1: TPanel
Left = 89 Left = 282
Top = 0 Top = 0
Width = 521 Width = 434
Height = 76 Height = 76
Align = alRight Align = alRight
BevelOuter = bvNone BevelOuter = bvNone
@ -1453,7 +1453,7 @@ object frFacturaProforma: TfrFacturaProforma
object RdxPanel1: TRdxPanel object RdxPanel1: TRdxPanel
Left = 5 Left = 5
Top = 5 Top = 5
Width = 511 Width = 424
Height = 66 Height = 66
BorderStyle = bsSingle BorderStyle = bsSingle
Caption = ' ' Caption = ' '
@ -1465,7 +1465,7 @@ object frFacturaProforma: TfrFacturaProforma
TabOrder = 0 TabOrder = 0
UseDockManager = True UseDockManager = True
object Label5: TLabel object Label5: TLabel
Left = 131 Left = 52
Top = 10 Top = 10
Width = 70 Width = 70
Height = 13 Height = 13
@ -1479,7 +1479,7 @@ object frFacturaProforma: TfrFacturaProforma
ParentFont = False ParentFont = False
end end
object Label9: TLabel object Label9: TLabel
Left = 421 Left = 332
Top = 10 Top = 10
Width = 77 Width = 77
Height = 13 Height = 13
@ -1493,7 +1493,7 @@ object frFacturaProforma: TfrFacturaProforma
ParentFont = False ParentFont = False
end end
object Label10: TLabel object Label10: TLabel
Left = 18 Left = 145
Top = 10 Top = 10
Width = 76 Width = 76
Height = 13 Height = 13
@ -1507,7 +1507,7 @@ object frFacturaProforma: TfrFacturaProforma
ParentFont = False ParentFont = False
end end
object Label11: TLabel object Label11: TLabel
Left = 225 Left = 238
Top = 10 Top = 10
Width = 73 Width = 73
Height = 13 Height = 13
@ -1523,25 +1523,11 @@ object frFacturaProforma: TfrFacturaProforma
object Shape2: TShape object Shape2: TShape
Left = 16 Left = 16
Top = 29 Top = 29
Width = 484 Width = 394
Height = 1 Height = 1
end end
object Label4: TLabel
Left = 325
Top = 10
Width = 69
Height = 13
Alignment = taRightJustify
Caption = 'Importe de RE'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object BaseImponible: TcxDBTextEdit object BaseImponible: TcxDBTextEdit
Left = 91 Left = 12
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1557,7 +1543,7 @@ object frFacturaProforma: TfrFacturaProforma
Width = 110 Width = 110
end end
object ImporteDescuento: TcxDBTextEdit object ImporteDescuento: TcxDBTextEdit
Left = 15 Left = 142
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1573,7 +1559,7 @@ object frFacturaProforma: TfrFacturaProforma
Width = 79 Width = 79
end end
object ImporteIVA: TcxDBTextEdit object ImporteIVA: TcxDBTextEdit
Left = 222 Left = 235
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1589,7 +1575,7 @@ object frFacturaProforma: TfrFacturaProforma
Width = 76 Width = 76
end end
object ImporteTotal: TcxDBTextEdit object ImporteTotal: TcxDBTextEdit
Left = 401 Left = 312
Top = 37 Top = 37
TabStop = False TabStop = False
AutoSize = False AutoSize = False
@ -1611,28 +1597,12 @@ object frFacturaProforma: TfrFacturaProforma
Height = 21 Height = 21
Width = 98 Width = 98
end end
object ImporteRE: TcxDBTextEdit
Left = 318
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTERE'
DataBinding.DataSource = dsFactura
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 4
Height = 21
Width = 76
end
end end
end end
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 89 Width = 282
Height = 76 Height = 76
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone

View File

@ -137,8 +137,6 @@ type
Descuento: TcxDBTextEdit; Descuento: TcxDBTextEdit;
IVA: TcxDBTextEdit; IVA: TcxDBTextEdit;
RecargoEquivalencia: TcxDBTextEdit; RecargoEquivalencia: TcxDBTextEdit;
Label4: TLabel;
ImporteRE: TcxDBTextEdit;
procedure bCancelarClick(Sender: TObject); procedure bCancelarClick(Sender: TObject);
procedure bSalirClick(Sender: TObject); procedure bSalirClick(Sender: TObject);
procedure bGuardarClick(Sender: TObject); procedure bGuardarClick(Sender: TObject);
@ -646,7 +644,6 @@ end;
procedure TfrFacturaProforma.CalcularTotalFactura; procedure TfrFacturaProforma.CalcularTotalFactura;
var var
ImporteNeto,
BaseImponible, BaseImponible,
ImporteRE, ImporteRE,
ImporteIVA, ImporteIVA,
@ -654,8 +651,7 @@ var
ImporteTotal : Double; ImporteTotal : Double;
FDetallesBookmark : string; FDetallesBookmark : string;
begin begin
ImporteNeto := 0; //Total de los articulos BaseImponible := 0;
BaseImponible := 0; //Importe neto una vez aplicado el dto
ImporteTotal := 0; ImporteTotal := 0;
with TablaDetallesMem do with TablaDetallesMem do
begin begin
@ -664,16 +660,15 @@ begin
try try
First; First;
while not EOF do begin while not EOF do begin
ImporteNeto := ImporteNeto + FieldByName('IMPORTETOTAL').AsFloat; BaseImponible := BaseImponible + FieldByName('IMPORTETOTAL').AsFloat;
Next; Next;
end; end;
ImporteDto := ImporteNeto * (TablaFacturas.FieldByName('DESCUENTO').AsFloat/100);
BaseImponible := ImporteNeto - ImporteDto;
ImporteRE := BaseImponible * (TablaFacturas.FieldByName('RE').AsFloat/100); ImporteRE := BaseImponible * (TablaFacturas.FieldByName('RE').AsFloat/100);
ImporteIVA := BaseImponible * (TablaFacturas.FieldByName('IVA').AsFloat/100); ImporteDto := BaseImponible * (TablaFacturas.FieldByName('DESCUENTO').AsFloat/100);
ImporteTotal := BaseImponible + ImporteIVA + ImporteRE; ImporteTotal := BaseImponible - ImporteDto;
ImporteIVA := ImporteTotal * (TablaFacturas.FieldByName('IVA').AsFloat/100);
ImporteTotal := ImporteTotal + ImporteIVA + ImporteRE;
TablaFacturas.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible; TablaFacturas.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible;
TablaFacturas.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto; TablaFacturas.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto;

View File

@ -205,47 +205,60 @@ object frImprimirFacturasCliente: TfrImprimirFacturasCliente
object CodCliente: TcxTextEdit object CodCliente: TcxTextEdit
Left = 152 Left = 152
Top = 58 Top = 58
ParentFont = False Width = 113
Height = 21
Properties.ReadOnly = True Properties.ReadOnly = True
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 0 TabOrder = 0
Text = 'CodCliente' Text = 'CodCliente'
Width = 113
end end
object NIFCIF: TcxTextEdit object NIFCIF: TcxTextEdit
Left = 323 Left = 323
Top = 58 Top = 58
ParentFont = False Width = 121
Height = 21
Properties.ReadOnly = True Properties.ReadOnly = True
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 1 TabOrder = 1
Text = 'NIFCIF' Text = 'NIFCIF'
Width = 121
end end
object FechaFactura: TcxTextEdit object FechaFactura: TcxTextEdit
Left = 323 Left = 323
Top = 34 Top = 34
ParentFont = False Width = 121
Height = 21
Properties.ReadOnly = True Properties.ReadOnly = True
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 = 'FechaFactura' Text = 'FechaFactura'
Width = 121
end end
object Nombre: TcxTextEdit object Nombre: TcxTextEdit
Left = 152 Left = 152
Top = 82 Top = 82
ParentFont = False Width = 292
Height = 21
Properties.ReadOnly = True Properties.ReadOnly = True
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 = 'Nombre' Text = 'Nombre'
Width = 292
end end
object Codigo: TcxButtonEdit object Codigo: TcxButtonEdit
Left = 152 Left = 152
Top = 35 Top = 35
ParentFont = False Width = 113
Height = 21
Properties.Buttons = < Properties.Buttons = <
item item
Default = True Default = True
@ -297,9 +310,11 @@ object frImprimirFacturasCliente: TfrImprimirFacturasCliente
Properties.ReadOnly = True Properties.ReadOnly = True
Properties.OnButtonClick = CodigoPropertiesButtonClick Properties.OnButtonClick = CodigoPropertiesButtonClick
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleDisabled.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleFocused.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
StyleHot.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 4 TabOrder = 4
Text = 'Codigo' Text = 'Codigo'
Width = 113
end end
end end
end end

View File

@ -1,8 +1,8 @@
object frPresupuestoCliente: TfrPresupuestoCliente object frPresupuestoCliente: TfrPresupuestoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 973
Height = 410 Height = 704
Color = 16383743 Color = 16383743
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -17,7 +17,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlTitulo: TRdxPanelTituloOperacion object pnlTitulo: TRdxPanelTituloOperacion
Left = 0 Left = 0
Top = 0 Top = 0
Width = 630 Width = 973
Height = 22 Height = 22
Caption = ' ' Caption = ' '
Color = 11590911 Color = 11590911
@ -30,8 +30,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
end end
object brSalir: TRdxBarraInferior object brSalir: TRdxBarraInferior
Left = 0 Left = 0
Top = 310 Top = 604
Width = 630 Width = 973
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -111,8 +111,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
end end
object brGuardar: TRdxBarraInferior object brGuardar: TRdxBarraInferior
Left = 0 Left = 0
Top = 360 Top = 654
Width = 630 Width = 973
Height = 50 Height = 50
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -265,8 +265,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlCuerpo: TPanel object pnlCuerpo: TPanel
Left = 0 Left = 0
Top = 22 Top = 22
Width = 630 Width = 973
Height = 288 Height = 582
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -275,7 +275,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlFactura: TAdvPanel object pnlFactura: TAdvPanel
Left = 10 Left = 10
Top = 10 Top = 10
Width = 610 Width = 953
Height = 79 Height = 79
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -656,8 +656,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlPaginas: TRdxPanel object pnlPaginas: TRdxPanel
Left = 10 Left = 10
Top = 89 Top = 89
Width = 610 Width = 953
Height = 113 Height = 398
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
ColorHighLight = 8623776 ColorHighLight = 8623776
@ -668,8 +668,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Paginas: TRdxPagesControl object Paginas: TRdxPagesControl
Left = 0 Left = 0
Top = 0 Top = 0
Width = 610 Width = 953
Height = 113 Height = 398
ActivePage = pagContenido ActivePage = pagContenido
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -1244,8 +1244,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlGridArticulos: TPanel object pnlGridArticulos: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 945
Height = 67 Height = 352
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 5 BorderWidth = 5
@ -1255,7 +1255,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlBarraContenido: TRdxPanel object pnlBarraContenido: TRdxPanel
Left = 5 Left = 5
Top = 31 Top = 31
Width = 592 Width = 935
Height = 26 Height = 26
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1373,8 +1373,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object gridDetalles: TcxGrid object gridDetalles: TcxGrid
Left = 5 Left = 5
Top = 57 Top = 57
Width = 592 Width = 935
Height = 232 Height = 223
Align = alClient Align = alClient
BevelInner = bvNone BevelInner = bvNone
BevelKind = bkFlat BevelKind = bkFlat
@ -1514,7 +1514,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlBarraPropiedades: TRdxPanel object pnlBarraPropiedades: TRdxPanel
Left = 5 Left = 5
Top = 5 Top = 5
Width = 592 Width = 935
Height = 26 Height = 26
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1752,8 +1752,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
end end
object pnlObservaciones: TRdxPanel object pnlObservaciones: TRdxPanel
Left = 5 Left = 5
Top = -5 Top = 280
Width = 592 Width = 935
Height = 67 Height = 67
Caption = ' ' Caption = ' '
ParentColor = True ParentColor = True
@ -1765,7 +1765,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Label1: TLabel object Label1: TLabel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 592 Width = 935
Height = 25 Height = 25
Align = alTop Align = alTop
AutoSize = False AutoSize = False
@ -1787,7 +1787,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
TabOrder = 0 TabOrder = 0
OnExit = ObservacionesExit OnExit = ObservacionesExit
Height = 42 Height = 42
Width = 592 Width = 935
end end
end end
end end
@ -1798,8 +1798,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 945
Height = 67 Height = 352
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ParentColor = True ParentColor = True
@ -1808,7 +1808,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 125 Width = 125
Height = 67 Height = 352
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
Caption = ' ' Caption = ' '
@ -1833,8 +1833,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Panel7: TPanel object Panel7: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 820
Height = 67 Height = 352
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -1858,8 +1858,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
Style.IsFontAssigned = True Style.IsFontAssigned = True
TabOrder = 0 TabOrder = 0
Height = 47 Height = 332
Width = 457 Width = 800
end end
end end
end end
@ -2042,7 +2042,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Left = 0 Left = 0
Top = 0 Top = 0
Width = 125 Width = 125
Height = 67 Height = 352
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
Caption = ' ' Caption = ' '
@ -2067,8 +2067,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Panel13: TPanel object Panel13: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 820
Height = 67 Height = 352
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 10 BorderWidth = 10
@ -2092,8 +2092,8 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
Style.IsFontAssigned = True Style.IsFontAssigned = True
TabOrder = 0 TabOrder = 0
Height = 47 Height = 332
Width = 457 Width = 800
end end
end end
end end
@ -2104,7 +2104,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object pnlFormasPago: TPanel object pnlFormasPago: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 602 Width = 945
Height = 100 Height = 100
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -2139,7 +2139,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object RdxPanel5: TPanel object RdxPanel5: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 820
Height = 100 Height = 100
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -2159,14 +2159,14 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 80 Height = 80
Width = 457 Width = 800
end end
end end
end end
object pnlPlazosEntrega: TPanel object pnlPlazosEntrega: TPanel
Left = 0 Left = 0
Top = 100 Top = 100
Width = 602 Width = 945
Height = 100 Height = 100
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -2201,7 +2201,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Panel3: TPanel object Panel3: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 820
Height = 100 Height = 100
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -2221,14 +2221,14 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 80 Height = 80
Width = 457 Width = 800
end end
end end
end end
object pnlNota: TPanel object pnlNota: TPanel
Left = 0 Left = 0
Top = 200 Top = 200
Width = 602 Width = 945
Height = 100 Height = 100
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
@ -2263,7 +2263,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
object Panel5: TPanel object Panel5: TPanel
Left = 125 Left = 125
Top = 0 Top = 0
Width = 477 Width = 820
Height = 100 Height = 100
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -2283,7 +2283,7 @@ object frPresupuestoCliente: TfrPresupuestoCliente
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
TabOrder = 0 TabOrder = 0
Height = 80 Height = 80
Width = 457 Width = 800
end end
end end
end end
@ -2624,9 +2624,9 @@ object frPresupuestoCliente: TfrPresupuestoCliente
end end
object pnlImportes: TAdvPanel object pnlImportes: TAdvPanel
Left = 10 Left = 10
Top = 202 Top = 487
Width = 610 Width = 953
Height = 76 Height = 85
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
Color = 16383743 Color = 16383743
@ -2704,274 +2704,175 @@ object frPresupuestoCliente: TfrPresupuestoCliente
TopIndent = 0 TopIndent = 0
URLColor = clBlue URLColor = clBlue
FullHeight = 38 FullHeight = 38
object Panel15: TPanel object Label7: TLabel
Left = 116 Left = 66
Top = 0 Top = 13
Width = 494 Width = 74
Height = 76 Height = 13
Align = alRight Caption = 'Descuento(%):'
BevelOuter = bvNone Font.Charset = DEFAULT_CHARSET
BorderWidth = 5 Font.Color = clWindowText
ParentColor = True Font.Height = -11
TabOrder = 0 Font.Name = 'Tahoma'
object RdxPanel1: TRdxPanel Font.Style = []
Left = 5 ParentFont = False
Top = 5
Width = 484
Height = 66
BorderStyle = bsSingle
Caption = ' '
BorderWidth = 1
Color = 15726583
ColorHighLight = 8623776
ColorShadow = 8623776
Align = alClient
TabOrder = 0
UseDockManager = True
object Label5: TLabel
Left = 135
Top = 10
Width = 70
Height = 13
Alignment = taRightJustify
Caption = 'Base imponible'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label9: TLabel
Left = 400
Top = 10
Width = 77
Height = 13
Alignment = taRightJustify
Caption = 'Importe total'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Label10: TLabel
Left = 29
Top = 10
Width = 76
Height = 13
Alignment = taRightJustify
Caption = 'Importe de dto.'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label11: TLabel
Left = 234
Top = 10
Width = 73
Height = 13
Alignment = taRightJustify
Caption = 'Importe de IVA'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Shape2: TShape
Left = 16
Top = 29
Width = 465
Height = 1
end
object Label7: TLabel
Left = 319
Top = 10
Width = 69
Height = 13
Alignment = taRightJustify
Caption = 'Importe de RE'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object BaseImponible: TcxDBTextEdit
Left = 95
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'BASEIMPONIBLE'
DataBinding.DataSource = dsPresupuesto
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 0
Height = 21
Width = 110
end
object ImporteDescuento: TcxDBTextEdit
Left = 26
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTEDESCUENTO'
DataBinding.DataSource = dsPresupuesto
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 1
Height = 21
Width = 79
end
object ImporteIVA: TcxDBTextEdit
Left = 231
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTEIVA'
DataBinding.DataSource = dsPresupuesto
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 2
Height = 21
Width = 76
end
object ImporteTotal: TcxDBTextEdit
Left = 380
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTETOTAL'
DataBinding.DataSource = dsPresupuesto
ParentFont = False
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.Font.Charset = DEFAULT_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -11
Style.Font.Name = 'Tahoma'
Style.Font.Style = [fsBold]
Style.HotTrack = False
Style.IsFontAssigned = True
TabOrder = 3
Height = 21
Width = 98
end
object ImporteRE: TcxDBTextEdit
Left = 312
Top = 37
TabStop = False
AutoSize = False
DataBinding.DataField = 'IMPORTERE'
DataBinding.DataSource = dsPresupuesto
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
Style.BorderStyle = ebsNone
Style.Color = 15726583
Style.HotTrack = False
TabOrder = 4
Height = 21
Width = 76
end
end
end end
object Panel16: TPanel object Label8: TLabel
Left = 0 Left = 228
Top = 0 Top = 13
Width = 116 Width = 40
Height = 76 Height = 13
Align = alClient Alignment = taRightJustify
Alignment = taLeftJustify Caption = 'IVA(%):'
BevelOuter = bvNone Font.Charset = DEFAULT_CHARSET
ParentColor = True Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label5: TLabel
Left = 22
Top = 39
Width = 70
Height = 13
Alignment = taRightJustify
Caption = 'Base imponible'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label10: TLabel
Left = 133
Top = 39
Width = 72
Height = 13
Alignment = taRightJustify
Caption = 'Importe de dto'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label11: TLabel
Left = 228
Top = 39
Width = 73
Height = 13
Alignment = taRightJustify
Caption = 'Importe de IVA'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label9: TLabel
Left = 338
Top = 39
Width = 77
Height = 13
Alignment = taRightJustify
Caption = 'Importe total'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object Descuento: TcxDBTextEdit
Left = 145
Top = 9
DataBinding.DataField = 'DESCUENTO'
DataBinding.DataSource = dsPresupuesto
ParentFont = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 0
Width = 57
end
object IVA: TcxDBTextEdit
Left = 271
Top = 9
DataBinding.DataField = 'IVA'
DataBinding.DataSource = dsPresupuesto
ParentFont = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 1 TabOrder = 1
object Label8: TLabel Width = 57
Left = 8 end
Top = 50 object BaseImponible: TcxDBTextEdit
Width = 74 Left = 2
Height = 13 Top = 59
Caption = 'Descuento(%):' TabStop = False
Font.Charset = DEFAULT_CHARSET DataBinding.DataField = 'BASEIMPONIBLE'
Font.Color = clWindowText DataBinding.DataSource = dsPresupuesto
Font.Height = -11 Properties.Alignment.Horz = taRightJustify
Font.Name = 'Tahoma' Properties.AutoSelect = False
Font.Style = [] Properties.ReadOnly = True
ParentFont = False Style.BorderStyle = ebsNone
end Style.Color = 15726583
object Label12: TLabel Style.HotTrack = False
Left = 157 TabOrder = 2
Top = 50 Width = 90
Width = 40 end
Height = 13 object ImporteDescuento: TcxDBTextEdit
Alignment = taRightJustify Left = 115
Caption = 'IVA(%):' Top = 59
Font.Charset = DEFAULT_CHARSET TabStop = False
Font.Color = clWindowText DataBinding.DataField = 'IMPORTEDESCUENTO'
Font.Height = -11 DataBinding.DataSource = dsPresupuesto
Font.Name = 'Tahoma' Properties.Alignment.Horz = taRightJustify
Font.Style = [] Properties.AutoSelect = False
ParentFont = False Properties.ReadOnly = True
end Style.BorderStyle = ebsNone
object cbRecargoEquivalencia: TcxCheckBox Style.Color = 15726583
Left = 8 Style.HotTrack = False
Top = 14 TabOrder = 3
Caption = 'Acogido al recargo de equivalencia' Width = 90
ParentColor = False end
ParentFont = False object ImporteIVA: TcxDBTextEdit
Properties.NullStyle = nssUnchecked Left = 211
Properties.OnChange = cbRecargoEquivalenciaPropertiesChange Top = 59
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro TabStop = False
TabOrder = 0 DataBinding.DataField = 'IMPORTEIVA'
Width = 193 DataBinding.DataSource = dsPresupuesto
end Properties.Alignment.Horz = taRightJustify
object Descuento: TcxDBTextEdit Properties.AutoSelect = False
Left = 85 Properties.ReadOnly = True
Top = 46 Style.BorderStyle = ebsNone
DataBinding.DataField = 'DESCUENTO' Style.Color = 15726583
DataBinding.DataSource = dsPresupuesto Style.HotTrack = False
ParentFont = False TabOrder = 4
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Width = 90
TabOrder = 1 end
Width = 57 object ImporteTotal: TcxDBTextEdit
end Left = 325
object IVA: TcxDBTextEdit Top = 59
Left = 203 TabStop = False
Top = 46 DataBinding.DataField = 'IMPORTETOTAL'
DataBinding.DataField = 'IVA' DataBinding.DataSource = dsPresupuesto
DataBinding.DataSource = dsPresupuesto ParentFont = False
ParentFont = False Properties.Alignment.Horz = taRightJustify
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Properties.AutoSelect = False
TabOrder = 2 Properties.ReadOnly = True
Width = 57 Style.BorderStyle = ebsNone
end Style.Color = 15726583
object RecargoEquivalencia: TcxDBTextEdit Style.Font.Charset = DEFAULT_CHARSET
Left = 203 Style.Font.Color = clWindowText
Top = 14 Style.Font.Height = -11
DataBinding.DataField = 'RE' Style.Font.Name = 'Tahoma'
DataBinding.DataSource = dsPresupuesto Style.Font.Style = [fsBold]
ParentFont = False Style.HotTrack = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.IsFontAssigned = True
TabOrder = 3 TabOrder = 5
Width = 57 Width = 90
end
end end
end end
end end

View File

@ -61,7 +61,7 @@ uses
SysUtils, JvExMask, JvToolEdit, ShlObj, cxShellCommon, cxShellListView, SysUtils, JvExMask, JvToolEdit, ShlObj, cxShellCommon, cxShellListView,
JvComponent, JvChangeNotify, JvExForms, JvBaseThumbnail, JvThumbViews, JvComponent, JvChangeNotify, JvExForms, JvBaseThumbnail, JvThumbViews,
JvExComCtrls, JvComCtrls, JvComponentBase, cxRichEdit, cxDBRichEdit, JvExComCtrls, JvComCtrls, JvComponentBase, cxRichEdit, cxDBRichEdit,
ToolWin, ImgList, cxCheckBox; ToolWin, ImgList;
type type
TfrPresupuestoCliente = class(TRdxFramePresupuestos) TfrPresupuestoCliente = class(TRdxFramePresupuestos)
@ -108,6 +108,7 @@ type
FormasPago: TcxDBMemo; FormasPago: TcxDBMemo;
dsPropiedadesPresupuesto: TDataSource; dsPropiedadesPresupuesto: TDataSource;
eDocumento: TLabel; eDocumento: TLabel;
pnlImportes: TAdvPanel;
pagDesgloses: TTabSheet; pagDesgloses: TTabSheet;
pagDocumentos: TTabSheet; pagDocumentos: TTabSheet;
eVigencia: TLabel; eVigencia: TLabel;
@ -122,6 +123,10 @@ type
TablaValores: TIBQuery; TablaValores: TIBQuery;
dsValores: TDataSource; dsValores: TDataSource;
dsPropiedades: TDataSource; dsPropiedades: TDataSource;
Label7: TLabel;
Descuento: TcxDBTextEdit;
Label8: TLabel;
IVA: TcxDBTextEdit;
actAnadirPropiedad: TAction; actAnadirPropiedad: TAction;
actEliminarPropiedad: TAction; actEliminarPropiedad: TAction;
pnlBarraPropiedades: TRdxPanel; pnlBarraPropiedades: TRdxPanel;
@ -138,6 +143,14 @@ type
DBEdit1: TDBEdit; DBEdit1: TDBEdit;
DBEdit2: TDBEdit; DBEdit2: TDBEdit;
pnlGrid: TRdxPanel; pnlGrid: TRdxPanel;
Label5: TLabel;
Label10: TLabel;
Label11: TLabel;
Label9: TLabel;
BaseImponible: TcxDBTextEdit;
ImporteDescuento: TcxDBTextEdit;
ImporteIVA: TcxDBTextEdit;
ImporteTotal: TcxDBTextEdit;
eSeccion: TLabel; eSeccion: TLabel;
Seccion: TcxComboBox; Seccion: TcxComboBox;
pnlObservaciones: TRdxPanel; pnlObservaciones: TRdxPanel;
@ -226,27 +239,6 @@ type
RdxBoton6: TRdxBoton; RdxBoton6: TRdxBoton;
bEliminarTodoFiltrado: TRdxBoton; bEliminarTodoFiltrado: TRdxBoton;
actEliminarTodoPropiedad: TAction; actEliminarTodoPropiedad: TAction;
pnlImportes: TAdvPanel;
Panel15: TPanel;
RdxPanel1: TRdxPanel;
Label5: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Shape2: TShape;
Label7: TLabel;
BaseImponible: TcxDBTextEdit;
ImporteDescuento: TcxDBTextEdit;
ImporteIVA: TcxDBTextEdit;
ImporteTotal: TcxDBTextEdit;
ImporteRE: TcxDBTextEdit;
Panel16: TPanel;
Label8: TLabel;
Label12: TLabel;
cbRecargoEquivalencia: TcxCheckBox;
Descuento: TcxDBTextEdit;
IVA: TcxDBTextEdit;
RecargoEquivalencia: TcxDBTextEdit;
procedure bSalirClick(Sender: TObject); procedure bSalirClick(Sender: TObject);
procedure bGuardarClick(Sender: TObject); procedure bGuardarClick(Sender: TObject);
procedure bCancelarClick(Sender: TObject); procedure bCancelarClick(Sender: TObject);
@ -310,7 +302,6 @@ type
procedure actAnadirPlanoUpdate(Sender: TObject); procedure actAnadirPlanoUpdate(Sender: TObject);
procedure actEliminarTodoPropiedadExecute(Sender: TObject); procedure actEliminarTodoPropiedadExecute(Sender: TObject);
procedure actEliminarTodoPropiedadUpdate(Sender: TObject); procedure actEliminarTodoPropiedadUpdate(Sender: TObject);
procedure cbRecargoEquivalenciaPropertiesChange(Sender: TObject);
private private
FRootDocumentos: Variant; FRootDocumentos: Variant;
FRootPlanos: Variant; FRootPlanos: Variant;
@ -360,7 +351,6 @@ type
procedure ProvinciaSetText(Sender: TField; const Text: String); procedure ProvinciaSetText(Sender: TField; const Text: String);
procedure IVASetText(Sender: TField; const Text: String); procedure IVASetText(Sender: TField; const Text: String);
procedure DtoSetText(Sender: TField; const Text: String); procedure DtoSetText(Sender: TField; const Text: String);
procedure RESetText(Sender: TField; const Text: String);
procedure CodigoArticuloDetalleSetText(Sender: TField; const Text: String); procedure CodigoArticuloDetalleSetText(Sender: TField; const Text: String);
procedure ReferenciaArticuloDetalleSetText(Sender: TField; const Text: String); procedure ReferenciaArticuloDetalleSetText(Sender: TField; const Text: String);
procedure CantidadDetalleSetText(Sender: TField; const Text: String); procedure CantidadDetalleSetText(Sender: TField; const Text: String);
@ -452,8 +442,6 @@ begin
CodCliente.Properties.Buttons[0].Visible := True; CodCliente.Properties.Buttons[0].Visible := True;
Poblacion.Properties.Buttons[0].Visible := True; Poblacion.Properties.Buttons[0].Visible := True;
Provincia.Properties.Buttons[0].Visible := True; Provincia.Properties.Buttons[0].Visible := True;
cbRecargoEquivalencia.Checked := False;
RecargoEquivalencia.Enabled := False;
DesactivarEventosCampos; DesactivarEventosCampos;
try try
@ -511,8 +499,6 @@ begin
dmTablaPresupuestos.InicializarTablaPresupuestos(@TablaPresupuestos); dmTablaPresupuestos.InicializarTablaPresupuestos(@TablaPresupuestos);
dmTablaPresupuestos.InicializarTablaDetalles(@TablaDetallesMem); dmTablaPresupuestos.InicializarTablaDetalles(@TablaDetallesMem);
cbRecargoEquivalencia.Properties.ReadOnly := False;
ActivarEdicionGridDetalles(VistaDetalles); ActivarEdicionGridDetalles(VistaDetalles);
cbxDocumento.DataBinding.Field.AsString := dmTablaDocumentos.DarCodigoDocumento(Entidad); cbxDocumento.DataBinding.Field.AsString := dmTablaDocumentos.DarCodigoDocumento(Entidad);
CargarDatosDocumento(cbxDocumento.DataBinding.Field.AsString); CargarDatosDocumento(cbxDocumento.DataBinding.Field.AsString);
@ -646,9 +632,6 @@ begin
else else
DeshabilitarPlanos; DeshabilitarPlanos;
end;} end;}
cbRecargoEquivalencia.Checked := TablaPresupuestos.FieldByName('RE').AsFloat > 0;
RecargoEquivalencia.Enabled := TablaPresupuestos.FieldByName('RE').AsFloat > 0;
cbRecargoEquivalencia.Properties.ReadOnly := True;
FechaPresupuesto.SetFocus; FechaPresupuesto.SetFocus;
except except
@ -726,10 +709,6 @@ begin
DeshabilitarPlanos; DeshabilitarPlanos;
end;} end;}
cbRecargoEquivalencia.Checked := TablaPresupuestos.FieldByName('RE').AsFloat > 0;
RecargoEquivalencia.Enabled := TablaPresupuestos.FieldByName('RE').AsFloat > 0;
cbRecargoEquivalencia.Properties.ReadOnly := True;
except except
on E : EIBError do on E : EIBError do
TratarExcepcion(E); TratarExcepcion(E);
@ -792,10 +771,6 @@ begin
end; end;
end; end;
cbRecargoEquivalencia.Checked := TablaPresupuestos.FieldByName('RE').AsFloat > 0;
RecargoEquivalencia.Enabled := TablaPresupuestos.FieldByName('RE').AsFloat > 0;
cbRecargoEquivalencia.Properties.ReadOnly := False;
ActivarEventosCampos; ActivarEventosCampos;
ConfigurarPantallaDocumento; ConfigurarPantallaDocumento;
Visible := True; Visible := True;
@ -987,16 +962,13 @@ end;
procedure TfrPresupuestoCliente.CalcularTotalPresupuesto; procedure TfrPresupuestoCliente.CalcularTotalPresupuesto;
var var
ImporteNeto,
BaseImponible, BaseImponible,
ImporteIVA, ImporteIVA,
ImporteRE,
ImporteDto, ImporteDto,
ImporteTotal : Double; ImporteTotal : Double;
FDetallesBookmark : string; FDetallesBookmark : string;
begin begin
ImporteNeto := 0; //Total de los articulos BaseImponible := 0;
BaseImponible := 0; //Importe neto una vez aplicado el dto
ImporteTotal := 0; ImporteTotal := 0;
with TablaDetallesMem do with TablaDetallesMem do
begin begin
@ -1005,22 +977,19 @@ begin
try try
First; First;
while not EOF do begin while not EOF do begin
ImporteNeto := ImporteNeto + FieldByName('IMPORTETOTAL').AsFloat; BaseImponible := BaseImponible + FieldByName('IMPORTETOTAL').AsFloat;
Next; Next;
end; end;
ImporteDto := ImporteNeto * (TablaPresupuestos.FieldByName('DESCUENTO').AsFloat/100); ImporteDto := BaseImponible * (TablaPresupuestos.FieldByName('DESCUENTO').AsFloat/100);
BaseImponible := ImporteNeto - ImporteDto; ImporteTotal := BaseImponible - ImporteDto;
ImporteIVA := ImporteTotal * (TablaPresupuestos.FieldByName('IVA').AsFloat/100);
ImporteRE := BaseImponible * (TablaPresupuestos.FieldByName('RE').AsFloat/100); ImporteTotal := ImporteTotal + ImporteIVA;
ImporteIVA := BaseImponible * (TablaPresupuestos.FieldByName('IVA').AsFloat/100);
ImporteTotal := BaseImponible + ImporteIVA + ImporteRE;
TablaPresupuestos.Edit; TablaPresupuestos.Edit;
TablaPresupuestos.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible; TablaPresupuestos.FieldByName('BASEIMPONIBLE').AsFloat := BaseImponible;
TablaPresupuestos.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto; TablaPresupuestos.FieldByName('IMPORTEDESCUENTO').AsFloat := ImporteDto;
TablaPresupuestos.FieldByName('IMPORTEIVA').AsFloat := ImporteIVA; TablaPresupuestos.FieldByName('IMPORTEIVA').AsFloat := ImporteIVA;
TablaPresupuestos.FieldByName('IMPORTERE').AsFloat := ImporteRE;
TablaPresupuestos.FieldByName('IMPORTETOTAL').AsFloat := ImporteTotal; TablaPresupuestos.FieldByName('IMPORTETOTAL').AsFloat := ImporteTotal;
finally finally
Bookmark := FDetallesBookmark; Bookmark := FDetallesBookmark;
@ -1649,14 +1618,11 @@ end;
procedure TfrPresupuestoCliente.ActivarEventosCampos; procedure TfrPresupuestoCliente.ActivarEventosCampos;
begin begin
cbRecargoEquivalencia.Properties.OnChange := cbRecargoEquivalenciaPropertiesChange;
with TablaPresupuestos do with TablaPresupuestos do
begin begin
FieldByName('CODIGOCLIENTE').OnSetText := CodCliSetText; FieldByName('CODIGOCLIENTE').OnSetText := CodCliSetText;
FieldByName('IVA').OnSetText := IVASetText; FieldByName('IVA').OnSetText := IVASetText;
FieldByName('DESCUENTO').OnSetText := DtoSetText; FieldByName('DESCUENTO').OnSetText := DtoSetText;
FieldByName('RE').OnSetText := RESetText;
end; end;
with TablaDetallesMem do with TablaDetallesMem do
@ -2150,8 +2116,6 @@ end;
procedure TfrPresupuestoCliente.DesactivarEventosCampos; procedure TfrPresupuestoCliente.DesactivarEventosCampos;
begin begin
cbRecargoEquivalencia.Properties.OnChange := NIL;
with TablaPresupuestos do with TablaPresupuestos do
begin begin
if FindField('CODIGOCLIENTE') <> NIL then if FindField('CODIGOCLIENTE') <> NIL then
@ -2160,8 +2124,6 @@ begin
FieldByName('IVA').OnSetText := NIL; FieldByName('IVA').OnSetText := NIL;
if FindField('DESCUENTO') <> NIL then if FindField('DESCUENTO') <> NIL then
FieldByName('DESCUENTO').OnSetText := NIL; FieldByName('DESCUENTO').OnSetText := NIL;
if FindField('RE') <> NIL then
FieldByName('RE').OnSetText := NIL;
end; end;
with TablaDetallesMem do with TablaDetallesMem do
@ -3070,28 +3032,5 @@ begin
(Sender as TAction).Enabled := not (VistaPropiedades.ViewData.RecordCount = 0); (Sender as TAction).Enabled := not (VistaPropiedades.ViewData.RecordCount = 0);
end; end;
procedure TfrPresupuestoCliente.cbRecargoEquivalenciaPropertiesChange(
Sender: TObject);
begin
RecargoEquivalencia.Enabled := cbRecargoEquivalencia.Checked;
if not cbRecargoEquivalencia.Checked then
begin
RecargoEquivalencia.DataBinding.Field.Value := Null;
CalcularTotalPresupuesto;
end;
end;
procedure TfrPresupuestoCliente.RESetText(Sender: TField;
const Text: String);
begin
if EsCadenaVacia(Text) then
Sender.AsString := '0'
else begin
ValidarDto(Text);
Sender.AsString := Text;
end;
CalcularTotalPresupuesto;
end;
end. end.

View File

@ -99,7 +99,6 @@ begin
Database := BaseDatos; Database := BaseDatos;
Transaction := Transaccion; Transaction := Transaccion;
SelectSQL.Assign(dmTablaEmpresas.sqlGrid); SelectSQL.Assign(dmTablaEmpresas.sqlGrid);
ParamByName('USUARIO').AsString := UpperCase(dmBaseDatos.Usuario);
Prepare; Prepare;
EnableControls; EnableControls;
end; end;

View File

@ -1,45 +0,0 @@
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O-
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-GD
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-E".\Temp"
-N".\Temp"
-LE".\Temp"
-LN".\Temp"
-U"c:\archivos de programa\borland\delphi7\Lib\Debug;.\Frames;C:\Archivos de programa\Developer Express Inc\ExpressScheduler\Sources;D:\Proyectos\Librerias;D:\Proyectos\Componentes\Colores"
-O"c:\archivos de programa\borland\delphi7\Lib\Debug;.\Frames;C:\Archivos de programa\Developer Express Inc\ExpressScheduler\Sources;D:\Proyectos\Librerias;D:\Proyectos\Componentes\Colores"
-I"c:\archivos de programa\borland\delphi7\Lib\Debug;.\Frames;C:\Archivos de programa\Developer Express Inc\ExpressScheduler\Sources;D:\Proyectos\Librerias;D:\Proyectos\Componentes\Colores"
-R"c:\archivos de programa\borland\delphi7\Lib\Debug;.\Frames;C:\Archivos de programa\Developer Express Inc\ExpressScheduler\Sources;D:\Proyectos\Librerias;D:\Proyectos\Componentes\Colores"
-w-UNSAFE_TYPE
-w-UNSAFE_CODE
-w-UNSAFE_CAST

View File

@ -113,8 +113,8 @@ RootDir=C:\Archivos de programa\Borland\Delphi7\Bin\
IncludeVerInfo=1 IncludeVerInfo=1
AutoIncBuild=0 AutoIncBuild=0
MajorVer=3 MajorVer=3
MinorVer=3 MinorVer=2
Release=1 Release=4
Build=0 Build=0
Debug=0 Debug=0
PreRelease=0 PreRelease=0
@ -126,13 +126,13 @@ CodePage=1252
[Version Info Keys] [Version Info Keys]
CompanyName= CompanyName=
FileDescription= FileDescription=
FileVersion=3.3.1.0 FileVersion=3.2.4.0
InternalName= InternalName=
LegalCopyright= LegalCopyright=
LegalTrademarks= LegalTrademarks=
OriginalFilename= OriginalFilename=
ProductName= ProductName=
ProductVersion=3.3.1.0 ProductVersion=1.0.0.0
Comments= Comments=
[Excluded Packages] [Excluded Packages]
C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\cxLibraryVCLD7.bpl=Express Cross Platform Library (VCL Edition) by Developer Express Inc. C:\Archivos de programa\Borland\Delphi7\Projects\Bpl\cxLibraryVCLD7.bpl=Express Cross Platform Library (VCL Edition) by Developer Express Inc.

View File

@ -5112,7 +5112,7 @@ BEGIN
VDBConsts_SNotReplicatable, "Control cannot be used in a DBCtrlGrid" VDBConsts_SNotReplicatable, "Control cannot be used in a DBCtrlGrid"
VDBConsts_SPropDefByLookup, "Property already defined by lookup field" VDBConsts_SPropDefByLookup, "Property already defined by lookup field"
VDBConsts_SRemoteLogin, "Remote Login" VDBConsts_SRemoteLogin, "Remote Login"
Constantes_CTE_IVA_DEFECTO, "18" Constantes_CTE_IVA_DEFECTO, "16"
Constantes_DISPLAY_EUROS2, "#,0.00 €" Constantes_DISPLAY_EUROS2, "#,0.00 €"
Constantes_DISPLAY_EUROS4, "#,0.0000 €" Constantes_DISPLAY_EUROS4, "#,0.0000 €"
Constantes_EDIT_EUROS2, "0.00" Constantes_EDIT_EUROS2, "0.00"

View File

@ -1,40 +1,20 @@
[Closed Files] [Closed Files]
File_0=SourceModule,'C:\Codigo\Empresas\ElegirEmpresa.pas',0,1,86,70,102,1,0 File_0=SourceModule,'C:\Codigo Abeto\Informes\InformeBase.pas',0,1,212,36,224,0,0
File_1=SourceModule,'C:\Codigo\BaseDatos\TablaEmpresas.pas',0,1,187,96,200,1,0 File_1=SourceModule,'C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas',0,1,167,41,180,1,1
File_2=SourceModule,'c:\archivos de programa\borland\delphi7\source\rtl\common\ComObj.pas',0,1,1259,1,1269,0,0 File_2=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',0,1,75,14,54,0,0
File_3=SourceModule,'c:\archivos de programa\borland\delphi7\source\vcl\DB.pas',0,1,2340,1,2350,0,0 File_3=SourceModule,'C:\Codigo Abeto\Empresas\Empresa.pas',0,1,823,56,847,1,0
File_4=SourceModule,'c:\archivos de programa\borland\delphi7\source\vcl\IB.pas',0,1,403,1,411,0,0 File_4=SourceModule,'C:\Codigo Abeto\Informes\InformeBaseFR3.pas',0,1,65,28,79,0,0
File_5=SourceModule,'C:\Codigo\Informes\InformePresupuestoCliente.pas',0,1,1,1,1,1,0 File_5=SourceModule,'C:\Codigo Abeto\Informes\InformePagoCliente.pas',0,1,84,37,98,0,0
File_6=SourceModule,'C:\Codigo Abeto\Clientes\FacturaCliente.pas',0,1,334,63,344,0,0 File_6=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaFacturasCliente.pas',0,1,1873,1,1899,0,0
File_7=SourceModule,'C:\Codigo Abeto\Libreria\Constantes.pas',0,1,42,24,55,0,0 File_7=SourceModule,'C:\Codigo Abeto\BaseDatos\BaseDatos.pas',0,1,163,14,171,0,0
File_8=SourceModule,'C:\Codigo Abeto\Proveedores\FacturaProveedor.pas',0,1,272,38,285,1,0 File_8=SourceModule,'C:\Codigo Abeto\Libreria\RdxEmpresaActiva.pas',0,1,203,61,206,0,0
File_9=SourceModule,'C:\Codigo Abeto\Informes\InformeTrimestralCompras.pas',0,1,140,65,150,0,0 File_9=SourceModule,'C:\Codigo Abeto\Proveedores\BarraProveedores.pas',0,1,1,23,65,1,0
[Modules] [Modules]
Module0=C:\Codigo\Libreria\Literales.pas Count=0
Module1=C:\Codigo\Proveedores\BarraProveedores.pas EditWindowCount=0
Module2=C:\Codigo\Clientes\BarraClientes.pas
Module3=C:\Codigo\Principal.pas
Count=4
EditWindowCount=1
[C:\Codigo\Libreria\Literales.pas] [C:\Codigo Abeto\Factuges.dpr]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\Codigo\Proveedores\BarraProveedores.pas]
ModuleType=SourceModule
FormState=1
FormOnTop=0
[C:\Codigo\Clientes\BarraClientes.pas]
ModuleType=SourceModule
FormState=1
FormOnTop=0
[C:\Codigo\Principal.pas]
ModuleType=SourceModule
FormState=0 FormState=0
FormOnTop=0 FormOnTop=0
@ -42,80 +22,14 @@ FormOnTop=0
FormState=0 FormState=0
FormOnTop=0 FormOnTop=0
[C:\Codigo\Factuges.dpr]
FormState=0
FormOnTop=0
[C:\Codigo\Frames\RdxFrame.pas]
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=4
CurrentView=2
View0=0
View1=1
View2=2
View3=3
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=0
Left=447
Top=136
Width=1137
Height=560
MaxLeft=-1
MaxTop=-1
ClientWidth=1129
ClientHeight=526
LeftPanelSize=140
LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=000004000000000000000000000000000000000000000000000100000000000000000C000000436F64654578706C6F726572FFFFFFFF
RightPanelSize=0
BottomPanelSize=85
BottomPanelClients=MessageView@EditWindow0
BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
[View0]
Module=C:\Codigo\Proveedores\BarraProveedores.pas
CursorX=78
CursorY=119
TopLine=113
LeftCol=1
[View1]
Module=C:\Codigo\Clientes\BarraClientes.pas
CursorX=32
CursorY=83
TopLine=66
LeftCol=1
[View2]
Module=C:\Codigo\Libreria\Literales.pas
CursorX=33
CursorY=30
TopLine=22
LeftCol=1
[View3]
Module=C:\Codigo\Principal.pas
CursorX=74
CursorY=360
TopLine=356
LeftCol=1
[Watches] [Watches]
Count=2 Count=0
Watch0='EmpresaActiva.Restricciones.strings[1]',256,0,18,1,0,'Watches'
Watch1='EmpresaActiva.Restricciones.strings[0]',256,0,18,1,0,'Watches'
[WatchWindow] [WatchWindow]
WatchColumnWidth=100 WatchColumnWidth=100
WatchShowColumnHeaders=1 WatchShowColumnHeaders=1
Create=1 Create=1
Visible=1 Visible=0
State=0 State=0
Left=146 Left=146
Top=563 Top=563
@ -131,7 +45,7 @@ Dockable=1
[Breakpoints] [Breakpoints]
Count=1 Count=1
Breakpoint0='C:\Codigo\Empresas\ElegirEmpresa.pas',72,'',0,1,'',1,0,0,'',1,'','','' Breakpoint0='C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',387,'',0,1,'',1,0,0,'',1,'','',''
[AddressBreakpoints] [AddressBreakpoints]
Count=0 Count=0
@ -142,13 +56,13 @@ Visible=1
State=2 State=2
Left=0 Left=0
Top=0 Top=0
Width=1676 Width=640
Height=112 Height=112
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
MaxWidth=1684 MaxWidth=1680
MaxHeight=112 MaxHeight=112
ClientWidth=1676 ClientWidth=1672
ClientHeight=78 ClientHeight=78
[ProjectManager] [ProjectManager]
@ -188,7 +102,7 @@ Create=1
Visible=0 Visible=0
State=0 State=0
Left=5 Left=5
Top=7 Top=5
Width=638 Width=638
Height=444 Height=444
MaxLeft=-1 MaxLeft=-1
@ -230,7 +144,7 @@ LRDockWidth=317
Dockable=1 Dockable=1
SplitPos=201 SplitPos=201
ArrangeBy=Name ArrangeBy=Name
SelectedItem=BarraExtra SelectedItem=
ExpandedItems=ActiveTranslateStringEngine,Anchors,AppStorage,BevelEdges,Brush,Constraints,DataBinding,DataController,DataController.Filter,DataController.Options,DataController.Summary,DataController.Summary.Options,Filtering,HTTPOptions,LookAndFeel.AssignedValues,NavigatorButtons.Cancel,NavigatorButtons.Delete,NavigatorButtons.Edit,Options,OptionsBehavior,OptionsData,OptionsSelection,OptionsView,Preview,Properties,Properties.Alignment,Properties.SpinButtons,StorageOptions,Style,Styles,VertScrollBar ExpandedItems=ActiveTranslateStringEngine,Anchors,AppStorage,BevelEdges,Brush,Constraints,DataBinding,DataController,DataController.Filter,DataController.Options,DataController.Summary,DataController.Summary.Options,Filtering,HTTPOptions,LookAndFeel.AssignedValues,NavigatorButtons.Cancel,NavigatorButtons.Delete,NavigatorButtons.Edit,Options,OptionsBehavior,OptionsData,OptionsSelection,OptionsView,Preview,Properties,Properties.Alignment,Properties.SpinButtons,StorageOptions,Style,Styles,VertScrollBar
HiddenCategories= HiddenCategories=
@ -368,8 +282,8 @@ ShowChecked=1
Create=1 Create=1
Visible=0 Visible=0
State=0 State=0
Left=363 Left=417
Top=263 Top=365
Width=457 Width=457
Height=250 Height=250
MaxLeft=-1 MaxLeft=-1
@ -416,38 +330,6 @@ TBDockHeight=195
LRDockWidth=383 LRDockWidth=383
Dockable=1 Dockable=1
[CodeExplorer@EditWindow0]
Create=1
Visible=1
State=0
Left=0
Top=12
Width=140
Height=426
MaxLeft=-1
MaxTop=-1
ClientWidth=140
ClientHeight=426
TBDockHeight=305
LRDockWidth=140
Dockable=1
[MessageView@EditWindow0]
Create=1
Visible=1
State=0
Left=12
Top=0
Width=1117
Height=85
MaxLeft=-1
MaxTop=-1
ClientWidth=1117
ClientHeight=85
TBDockHeight=85
LRDockWidth=443
Dockable=1
[DockHosts] [DockHosts]
DockHostCount=1 DockHostCount=1

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -58,16 +58,10 @@ uses Literales, Mensajes;
{ TdmInformeFacturaProforma } { TdmInformeFacturaProforma }
constructor TdmInformeAlbaranCliente.Create(AOwner: TComponent); constructor TdmInformeAlbaranCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := True;
i := EmpresaActiva.Restricciones.IndexOf(CTE_INFORMES_CONLOGO);
if i < 0 then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if FConLogo then if FConLogo then
FNombreInforme := 'InformeAlbaranCliente(Con logo).frf' FNombreInforme := 'InformeAlbaranCliente(Con logo).frf'
else else

View File

@ -1,7 +1,7 @@
object dmInformeBase: TdmInformeBase object dmInformeBase: TdmInformeBase
OldCreateOrder = False OldCreateOrder = False
Left = 840 Left = 845
Top = 410 Top = 400
Height = 246 Height = 246
Width = 321 Width = 321
object FReport: TfrReport object FReport: TfrReport

View File

@ -1,7 +1,7 @@
inherited dmInformeContratoCliente: TdmInformeContratoCliente inherited dmInformeContratoCliente: TdmInformeContratoCliente
OldCreateOrder = True OldCreateOrder = True
Left = 242 Left = 464
Top = 64 Top = 265
Height = 416 Height = 416
Width = 548 Width = 548
inherited FReport: TfrReport inherited FReport: TfrReport

View File

@ -53,15 +53,9 @@ uses
{ TdmInformeContratoCliente } { TdmInformeContratoCliente }
constructor TdmInformeContratoCliente.Create(AOwner: TComponent); constructor TdmInformeContratoCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := True; FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
FDocumento := TDocumento.Create('MCOCINA'); FDocumento := TDocumento.Create('MCOCINA');
end; end;
@ -174,7 +168,7 @@ begin
with (Objeto as TfrMemoView), EmpresaActiva do with (Objeto as TfrMemoView), EmpresaActiva do
begin begin
Memo.Clear; Memo.Clear;
Memo.Add('CONFORME ' + Nombre); Memo.Add('CONFORME ' + NombreComercial);
end; end;
end; end;

View File

@ -1,7 +1,7 @@
inherited dmInformeFacturaCliente: TdmInformeFacturaCliente inherited dmInformeFacturaCliente: TdmInformeFacturaCliente
OldCreateOrder = True OldCreateOrder = True
Left = 572 Left = 569
Top = 306 Top = 300
Width = 344 Width = 344
inherited FReport: TfrReport inherited FReport: TfrReport
Dataset = TablaCab Dataset = TablaCab

View File

@ -38,15 +38,10 @@ uses
{ TdmInformeFacturaCliente } { TdmInformeFacturaCliente }
constructor TdmInformeFacturaCliente.Create(AOwner: TComponent); constructor TdmInformeFacturaCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := True;
if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if FConLogo then if FConLogo then
FNombreInforme := 'FacturaCliente(Con logo).frf' FNombreInforme := 'FacturaCliente(Con logo).frf'
else else

View File

@ -88,14 +88,14 @@ begin
SQL.Add('COALESCE(C.CODIGOPOSTAL, FC.CODIGOPOSTAL) as CODIGOPOSTAL, '); SQL.Add('COALESCE(C.CODIGOPOSTAL, FC.CODIGOPOSTAL) as CODIGOPOSTAL, ');
SQL.Add('COALESCE(C.POBLACION, FC.POBLACION) as POBLACION ,'); SQL.Add('COALESCE(C.POBLACION, FC.POBLACION) as POBLACION ,');
SQL.Add('COALESCE(C.PROVINCIA, FC.PROVINCIA) as PROVINCIA ,'); SQL.Add('COALESCE(C.PROVINCIA, FC.PROVINCIA) as PROVINCIA ,');
SQL.Add('FC.IVA, FC.BASEIMPONIBLE AS BASEIMPONIBLE, FC.IMPORTEIVA, FC.IMPORTETOTAL'); SQL.Add('FC.IVA, (FC.BASEIMPONIBLE - FC.IMPORTEDESCUENTO) AS BASEIMPONIBLE, FC.IMPORTEIVA, FC.IMPORTETOTAL');
SQL.Add('from FACTURASCLIENTE FC left join sucursalescliente C'); SQL.Add('from FACTURASCLIENTE FC left join sucursalescliente C');
SQL.Add('on (FC.CODIGOCLIENTE = C.CODIGOCLIENTE) and (C.TIPO = ''P'')'); SQL.Add('on (FC.CODIGOCLIENTE = C.CODIGOCLIENTE) and (C.TIPO = ''P'')');
SQL.Add('where FC.CODIGOEMPRESA = :CODIGOEMPRESA'); SQL.Add('where FC.CODIGOEMPRESA = :CODIGOEMPRESA');
SQL.Add('and upper(FC.NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) '); SQL.Add('and upper(FC.NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) ');
SQL.Add('and FC.FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN '); SQL.Add('and FC.FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN ');
if not VarIsNull(FImporteMinimo) then if not VarIsNull(FImporteMinimo) then
SQL.Add('and FC.BASEIMPONIBLE >= :BASEIMPONIBLE '); SQL.Add('and (FC.BASEIMPONIBLE - FC.IMPORTEDESCUENTO) >= :BASEIMPONIBLE ');
SQL.Add('order by FC.NOMBRE, FC.FECHAFACTURA'); SQL.Add('order by FC.NOMBRE, FC.FECHAFACTURA');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('NOMBREINI').AsString := FNombreIni; ParamByName('NOMBREINI').AsString := FNombreIni;

View File

@ -87,7 +87,7 @@ begin
SQL.Add('COALESCE(P.CODIGOPOSTAL, FP.CODIGOPOSTAL) as CODIGOPOSTAL, '); SQL.Add('COALESCE(P.CODIGOPOSTAL, FP.CODIGOPOSTAL) as CODIGOPOSTAL, ');
SQL.Add('COALESCE(P.POBLACION, FP.POBLACION) as POBLACION ,'); SQL.Add('COALESCE(P.POBLACION, FP.POBLACION) as POBLACION ,');
SQL.Add('COALESCE(P.PROVINCIA, FP.PROVINCIA) as PROVINCIA ,'); SQL.Add('COALESCE(P.PROVINCIA, FP.PROVINCIA) as PROVINCIA ,');
SQL.Add('FP.IVA, FP.BASEIMPONIBLE AS BASEIMPONIBLE, FP.IMPORTEIVA, FP.IMPORTETOTAL'); SQL.Add('FP.IVA, (FP.BASEIMPONIBLE - FP.IMPORTEDESCUENTO) AS BASEIMPONIBLE, FP.IMPORTEIVA, FP.IMPORTETOTAL');
SQL.Add('from FACTURASPROVEEDOR FP left join PROVEEDORES P'); SQL.Add('from FACTURASPROVEEDOR FP left join PROVEEDORES P');
SQL.Add('on FP.CODIGOPROVEEDOR = P.CODIGO'); SQL.Add('on FP.CODIGOPROVEEDOR = P.CODIGO');
SQL.Add('left join TIPOSFACTURAS TF'); SQL.Add('left join TIPOSFACTURAS TF');
@ -96,7 +96,7 @@ begin
SQL.Add('and upper(FP.NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) '); SQL.Add('and upper(FP.NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) ');
SQL.Add('and FP.FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN '); SQL.Add('and FP.FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN ');
if not VarIsNull(FImporteMinimo) then if not VarIsNull(FImporteMinimo) then
SQL.Add('and FP.BASEIMPONIBLE >= :BASEIMPONIBLE '); SQL.Add('and (FP.BASEIMPONIBLE - FP.IMPORTEDESCUENTO) >= :BASEIMPONIBLE ');
SQL.Add('order by FP.NOMBRE, FP.FECHAFACTURA'); SQL.Add('order by FP.NOMBRE, FP.FECHAFACTURA');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('NOMBREINI').AsString := FNombreIni; ParamByName('NOMBREINI').AsString := FNombreIni;

View File

@ -1,7 +1,7 @@
inherited dmInformePresupuestoCliente: TdmInformePresupuestoCliente inherited dmInformePresupuestoCliente: TdmInformePresupuestoCliente
OldCreateOrder = True OldCreateOrder = True
Left = 522 Left = 519
Top = 292 Top = 288
Height = 416 Height = 416
Width = 548 Width = 548
inherited FReport: TfrReport inherited FReport: TfrReport

View File

@ -51,14 +51,9 @@ uses
{ TdmInformePresupuestoCliente } { TdmInformePresupuestoCliente }
constructor TdmInformePresupuestoCliente.Create(AOwner: TComponent); constructor TdmInformePresupuestoCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := True; FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
end; end;
procedure TdmInformePresupuestoCliente.ImprimirFinanciacion; procedure TdmInformePresupuestoCliente.ImprimirFinanciacion;

View File

@ -84,13 +84,13 @@ begin
Database := FBaseDatos; Database := FBaseDatos;
Transaction := FTransaccion; Transaction := FTransaccion;
SQL.Clear; SQL.Clear;
SQL.Add('select NOMBRE, BASEIMPONIBLE AS BASEIMPONIBLE, IMPORTEIVA, IMPORTETOTAL '); SQL.Add('select NOMBRE, (BASEIMPONIBLE - IMPORTEDESCUENTO) AS BASEIMPONIBLE, IMPORTEIVA, IMPORTETOTAL ');
SQL.Add('from FACTURASCLIENTE '); SQL.Add('from FACTURASCLIENTE ');
SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA'); SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA');
SQL.Add('and upper(NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) '); SQL.Add('and upper(NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) ');
SQL.Add('and FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN '); SQL.Add('and FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN ');
if not VarIsNull(FImporteMinimo) then if not VarIsNull(FImporteMinimo) then
SQL.Add('and BASEIMPONIBLE >= :BASEIMPONIBLE '); SQL.Add('and (BASEIMPONIBLE - IMPORTEDESCUENTO) >= :BASEIMPONIBLE ');
SQL.Add('order by NOMBRE'); SQL.Add('order by NOMBRE');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('NOMBREINI').AsString := FNombreIni; ParamByName('NOMBREINI').AsString := FNombreIni;

View File

@ -82,13 +82,13 @@ begin
Database := FBaseDatos; Database := FBaseDatos;
Transaction := FTransaccion; Transaction := FTransaccion;
SQL.Clear; SQL.Clear;
SQL.Add('select NOMBRE, BASEIMPONIBLE AS BASEIMPONIBLE, IMPORTEIVA, IMPORTETOTAL '); SQL.Add('select NOMBRE, (BASEIMPONIBLE - IMPORTEDESCUENTO) AS BASEIMPONIBLE, IMPORTEIVA, IMPORTETOTAL ');
SQL.Add('from FACTURASPROVEEDOR '); SQL.Add('from FACTURASPROVEEDOR ');
SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA'); SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA');
SQL.Add('and upper(NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) '); SQL.Add('and upper(NOMBRE) between upper(:NOMBREINI) and upper(:NOMBREFIN) ');
SQL.Add('and FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN '); SQL.Add('and FECHAFACTURA between :FECHAFACINI and :FECHAFACFIN ');
if not VarIsNull(FImporteMinimo) then if not VarIsNull(FImporteMinimo) then
SQL.Add('and BASEIMPONIBLE >= :BASEIMPONIBLE '); SQL.Add('and (BASEIMPONIBLE - IMPORTEDESCUENTO) >= :BASEIMPONIBLE ');
SQL.Add('order by NOMBRE'); SQL.Add('order by NOMBRE');
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo; ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
ParamByName('NOMBREINI').AsString := FNombreIni; ParamByName('NOMBREINI').AsString := FNombreIni;

View File

@ -117,7 +117,7 @@ begin
for i := 0 to ContAux do for i := 0 to ContAux do
begin begin
if i < FListaCodTiposOp.Count then if i < FListaCodTiposOp.Count then
SQL.Add('case TIPOFACTURA when ' + FListaCodTiposOp.Strings[i] + ' then BASEIMPONIBLE else null end as OP' + IntToStr(i) + ', ') SQL.Add('case TIPOFACTURA when ' + FListaCodTiposOp.Strings[i] + ' then (BASEIMPONIBLE - IMPORTEDESCUENTO) else null end as OP' + IntToStr(i) + ', ')
else else
SQL.Add('0 as OP' + IntToStr(i) + ', '); SQL.Add('0 as OP' + IntToStr(i) + ', ');
end; end;
@ -147,7 +147,7 @@ begin
Database := FBaseDatos; Database := FBaseDatos;
Transaction := FTransaccion; Transaction := FTransaccion;
SQL.Clear; SQL.Clear;
SQL.Add('select T.CODIGO, T.DESCRIPCION, SUM(F.BASEIMPONIBLE) BASEIMPONIBLE, SUM(F.IMPORTEIVA) IMPORTEIVA, SUM(F.IMPORTETOTAL) IMPORTETOTAL'); SQL.Add('select T.CODIGO, T.DESCRIPCION, SUM((F.BASEIMPONIBLE - F.IMPORTEDESCUENTO)) BASEIMPONIBLE, SUM(F.IMPORTEIVA) IMPORTEIVA, SUM(F.IMPORTETOTAL) IMPORTETOTAL');
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');

View File

@ -1,7 +1,7 @@
inherited dmInformeTrimestralVentas: TdmInformeTrimestralVentas inherited dmInformeTrimestralVentas: TdmInformeTrimestralVentas
OldCreateOrder = True OldCreateOrder = True
Left = 719 Left = 715
Top = 180 Top = 174
Width = 344 Width = 344
inherited FReport: TfrReport inherited FReport: TfrReport
Dataset = TablaCab Dataset = TablaCab

View File

@ -131,7 +131,7 @@ begin
end; end;
//Para que el importe total de cada factura sea de 4 decimales y el total salga con exactitud //Para que el importe total de cada factura sea de 4 decimales y el total salga con exactitud
SQL.Add('BASEIMPONIBLE + coalesce(importere,0) + coalesce(importeiva,0) as IMPORTETOTAL '); SQL.Add('BASEIMPONIBLE - coalesce(importedescuento,0) + coalesce(importere,0) + coalesce(importeiva,0) as IMPORTETOTAL ');
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');

Binary file not shown.

View File

@ -52,7 +52,7 @@ resourcestring
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Comunes // Comunes
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
CTE_IVA_DEFECTO = '18'; CTE_IVA_DEFECTO = '16';
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -25,23 +25,6 @@ unit Literales;
interface interface
const
CTE_COMPRAS = 'COMPRAS';
CTE_PROVEEDORES = 'PROVEEDORES';
CTE_FACTURAS_PROVEEDOR = 'FACTURAS_PROVEEDOR';
CTE_PAGOS_PROVEEDOR = 'PAGOS_PROVEEDOR';
CTE_VENTAS = 'VENTAS';
CTE_CLIENTES = 'CLIENTES';
CTE_PRESUPUESTOS = 'PRESUPUESTOS';
CTE_CONTRATOS = 'CONTRATOS';
CTE_ALBARANES = 'ALBARANES';
CTE_FACTURAS_CLIENTE = 'FACTURAS_CLIENTE';
CTE_PAGOS_CLIENTE = 'PAGOS_CLIENTE';
CTE_FACTURAS_PROFORMA = 'FACTURAS_PROFORMA';
CTE_CONTABILIDAD = 'CONTABILIDAD';
CTE_INFORMES = 'INFORMES';
CTE_INFORMES_CONLOGO = 'INFORMES_SIEMPRE_CONLOGO';
resourcestring resourcestring
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Mensajes // Mensajes

View File

@ -31,6 +31,13 @@ uses
am2000menuitem, am2000popupmenu, am2000, RdxBotones, RdxPaneles, am2000menuitem, am2000popupmenu, am2000, RdxBotones, RdxPaneles,
RdxFrame, ActnList, FthImage, pngimage, am2000utils; 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 type
TfrPrincipal = class(TRdxFrame) TfrPrincipal = class(TRdxFrame)
BarraEstado: TStatusBar; BarraEstado: TStatusBar;

View File

@ -623,7 +623,6 @@ object frBarraProveedores: TfrBarraProveedores
Caption = 'Proveedores' Caption = 'Proveedores'
ImageIndex = 0 ImageIndex = 0
OnExecute = actProveedoresExecute OnExecute = actProveedoresExecute
OnUpdate = actProveedoresUpdate
end end
object actFacturas: TAction object actFacturas: TAction
Caption = 'Facturas de proveedores' Caption = 'Facturas de proveedores'

View File

@ -51,7 +51,6 @@ type
procedure actPagosExecute(Sender: TObject); procedure actPagosExecute(Sender: TObject);
procedure actFacturasUpdate(Sender: TObject); procedure actFacturasUpdate(Sender: TObject);
procedure actPagosUpdate(Sender: TObject); procedure actPagosUpdate(Sender: TObject);
procedure actProveedoresUpdate(Sender: TObject);
public public
constructor Create (AOwner: TComponent); override; constructor Create (AOwner: TComponent); override;
end; end;
@ -63,7 +62,7 @@ implementation
{$R *.DFM} {$R *.DFM}
uses uses
RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion, RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion,
BaseDatos, Literales; BaseDatos, Principal;
constructor TfrBarraProveedores.Create (AOwner: TComponent); constructor TfrBarraProveedores.Create (AOwner: TComponent);
begin begin
@ -110,15 +109,4 @@ begin
(Sender as TAction).Enabled := True; (Sender as TAction).Enabled := True;
end; end;
procedure TfrBarraProveedores.actProveedoresUpdate(Sender: TObject);
var
i: Integer;
begin
inherited;
if (EmpresaActiva.Restricciones.Count > 0) then
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PROVEEDORES, i)
else
(Sender as TAction).Enabled := True;
end;
end. end.

View File

@ -1508,14 +1508,12 @@ object frFacturaProveedor: TfrFacturaProveedor
Width = 74 Width = 74
Height = 13 Height = 13
Caption = 'Descuento(%):' Caption = 'Descuento(%):'
Enabled = False
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
Visible = False
end end
object Label8: TLabel object Label8: TLabel
Left = 157 Left = 157
@ -1550,11 +1548,9 @@ object frFacturaProveedor: TfrFacturaProveedor
Top = 38 Top = 38
DataBinding.DataField = 'DESCUENTO' DataBinding.DataField = 'DESCUENTO'
DataBinding.DataSource = dsFactura DataBinding.DataSource = dsFactura
Enabled = False
ParentFont = False ParentFont = False
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoOscuro
TabOrder = 1 TabOrder = 1
Visible = False
Width = 57 Width = 57
end end
object IVA: TcxDBTextEdit object IVA: TcxDBTextEdit

View File

@ -1,6 +1,6 @@
[BD] [BD]
ABETO ARMARIOS SERVIDOR=localhost:C:\FactuGES (Abeto)\BD\abeto.gdb ABETO ARMARIOS SERVIDOR=servidor:E:\Proyectos\FactuGES 2000 v2 (Abeto)\Codigo\BD\abeto.gdb
ABETO ARMARIOS DAVID=david:D:\Proyectos\FactuGES 2000 v2 (Abeto)\Codigo\BD\abeto.gdb ABETO ARMARIOS DAVID=david:D:\Proyectos\FactuGES 2000 v2 (Abeto)\Codigo\BD\abeto.gdb
ABETO ARMARIOS ROBERTO=xp_vm:C:\Codigo\bd\abeto.gdb ABETO ARMARIOS ROBERTO=xp_vm:C:\Codigo Abeto\bd\abeto.gdb
ABETO ARMARIOS DAVID T=david:T:\Codigo Abeto\bd\abeto.gdb ABETO ARMARIOS DAVID T=david:T:\Codigo Abeto\bd\abeto.gdb

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.