Se arreglan los informes para que la base imponible siempre sea (BASEIMPONIBLE - IMPORTEDESCUENTO)

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoArmarios_FactuGES/trunk@29 0a814768-cfdd-9c42-8d01-223fcc10da9d
This commit is contained in:
roberto 2009-03-10 14:06:15 +00:00
parent e28cb68055
commit 143c42dee2
12 changed files with 23 additions and 52 deletions

View File

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

View File

@ -38,7 +38,7 @@ uses
cxContainer, cxEdit, cxTextEdit, StdCtrls, AdvPanel, ExtCtrls, Configuracion, cxContainer, cxEdit, cxTextEdit, StdCtrls, AdvPanel, ExtCtrls, Configuracion,
cxCheckBox, cxSpinEdit, InformeHistorialFacturacionClientes, VistaPrevia, cxCheckBox, cxSpinEdit, InformeHistorialFacturacionClientes, VistaPrevia,
TablaClientes, RdxRadioButton, RdxShape, TablaTrimestres, Entidades, TablaClientes, RdxRadioButton, RdxShape, TablaTrimestres, Entidades,
InformeResumenFacturacionClientes; InformeResumenFacturacionClientes, cxGraphics;
type type
TfrHistorialFacturacionClientes = class(TRdxFrame) TfrHistorialFacturacionClientes = class(TRdxFrame)

View File

@ -114,7 +114,7 @@ IncludeVerInfo=1
AutoIncBuild=0 AutoIncBuild=0
MajorVer=3 MajorVer=3
MinorVer=2 MinorVer=2
Release=1 Release=2
Build=0 Build=0
Debug=0 Debug=0
PreRelease=0 PreRelease=0
@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys] [Version Info Keys]
CompanyName= CompanyName=
FileDescription= FileDescription=
FileVersion=3.2.1.0 FileVersion=3.2.2.0
InternalName= InternalName=
LegalCopyright= LegalCopyright=
LegalTrademarks= LegalTrademarks=

Binary file not shown.

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, 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, 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

@ -84,13 +84,13 @@ begin
Database := FBaseDatos; Database := FBaseDatos;
Transaction := FTransaccion; Transaction := FTransaccion;
SQL.Clear; SQL.Clear;
SQL.Add('select NOMBRE, 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, 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

@ -1,6 +1,6 @@
[BD] [BD]
ABETO ARMARIOS SERVIDOR=servidor:E:\Proyectos\FactuGES 2000 v2 (Abeto)\Codigo\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:\Abeto\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.