Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4549b55a46 | |||
| ecc7ad428b | |||
| 8f4149636b |
@ -20,6 +20,11 @@
|
|||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
02-02-2004 Se ha eliminado el atributo SERIE (P8 MULTIEMPRESA)
|
02-02-2004 Se ha eliminado el atributo SERIE (P8 MULTIEMPRESA)
|
||||||
Se ha adaptado a los nuevos contadores
|
Se ha adaptado a los nuevos contadores
|
||||||
|
|
||||||
|
31-05-2007 Se cambia sentencia sqlConsultarGridFacturasProvContrato para que en el beneficio por contrato salgan las facturas
|
||||||
|
de proveedor de todas las empresas (A y B) así podré calcular el beneficio en general
|
||||||
|
teniendo en cuenta facturación en A y en B
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,6 +159,7 @@ type
|
|||||||
function DarTiposOpDesTrimestral(var ListaCodigos: TStrings): TStrings;
|
function DarTiposOpDesTrimestral(var ListaCodigos: TStrings): TStrings;
|
||||||
function ComprobarTrimestreFactura(CodigoFactura: String): Boolean;
|
function ComprobarTrimestreFactura(CodigoFactura: String): Boolean;
|
||||||
function AsignarTrimestre(CodigoFactura: String; CodigoTrimestre: String): Boolean;
|
function AsignarTrimestre(CodigoFactura: String; CodigoTrimestre: String): Boolean;
|
||||||
|
function ModificarSituacionFacturas(Codigos: TStrings; Situacion: String): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -672,7 +678,10 @@ begin
|
|||||||
Add('where fac.codigoempresa = det.codigoempresa');
|
Add('where fac.codigoempresa = det.codigoempresa');
|
||||||
Add(' and fac.codigo = det.codigofactura');
|
Add(' and fac.codigo = det.codigofactura');
|
||||||
Add(' and det.codigocontrato = :CODIGOCONTRATO');
|
Add(' and det.codigocontrato = :CODIGOCONTRATO');
|
||||||
Add(' and fac.codigoempresa = :CODIGOEMPRESA');
|
//Se cambia sentencia SQL para que en el beneficio por contrato salgan las facturas
|
||||||
|
//de proveedor de todas las empresas (A y B) así podré calcular el beneficio en general
|
||||||
|
//teniendo en cuenta facturación en A y en B
|
||||||
|
// Add(' and fac.codigoempresa = :CODIGOEMPRESA');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1194,6 +1203,47 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TdmTablaFacturasProveedor.ModificarSituacionFacturas(Codigos: TStrings; Situacion: String): Boolean;
|
||||||
|
var
|
||||||
|
oSQL : TIBSQL;
|
||||||
|
Indice : Integer;
|
||||||
|
Cadena : String;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
if Codigos.Count = 0 then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
//Formateamos los códigos para optimizar la sentencia SQL
|
||||||
|
for Indice:=0 to Codigos.Count-1 do
|
||||||
|
begin
|
||||||
|
if (Indice <> 0) then
|
||||||
|
Cadena := Cadena + ',';
|
||||||
|
Cadena := Cadena + '''' + Codigos.Strings[Indice] + '''';
|
||||||
|
end;
|
||||||
|
|
||||||
|
oSQL := TIBSQL.Create(Self);
|
||||||
|
with oSQL do
|
||||||
|
begin
|
||||||
|
Database := dmBaseDatos.BD;
|
||||||
|
Transaction := dmBaseDatos.Transaccion;
|
||||||
|
SQL.Add('update FACTURASPROVEEDOR ');
|
||||||
|
SQL.Add('set SITUACION = :SITUACION ');
|
||||||
|
SQL.Add('where CODIGOEMPRESA = :CODIGOEMPRESA ');
|
||||||
|
SQL.Add('and CODIGO IN (' + Cadena + ')');
|
||||||
|
ParamByName('CODIGOEMPRESA').AsInteger := EmpresaActiva.Codigo;
|
||||||
|
ParamByName('SITUACION').AsString := Situacion;
|
||||||
|
try
|
||||||
|
Prepare;
|
||||||
|
ExecQuery;
|
||||||
|
Result := True;
|
||||||
|
finally
|
||||||
|
Close;
|
||||||
|
Transaction := NIL;
|
||||||
|
Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TDatosFacturaProveedor }
|
{ TDatosFacturaProveedor }
|
||||||
|
|
||||||
procedure TDatosFacturaProveedor.AssignTo(Dest: TPersistent);
|
procedure TDatosFacturaProveedor.AssignTo(Dest: TPersistent);
|
||||||
|
|||||||
@ -84,13 +84,12 @@ object frCambiarSituacionFacturas: TfrCambiarSituacionFacturas
|
|||||||
object cbxSituacion: TcxComboBox
|
object cbxSituacion: TcxComboBox
|
||||||
Left = 96
|
Left = 96
|
||||||
Top = 19
|
Top = 19
|
||||||
Width = 169
|
|
||||||
Height = 21
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
Properties.DropDownListStyle = lsFixedList
|
Properties.DropDownListStyle = lsFixedList
|
||||||
Properties.ReadOnly = False
|
Properties.ReadOnly = False
|
||||||
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
Style.StyleController = dmConfiguracion.cxEstiloEditoresFondoClaro
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
Width = 169
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object brDoble: TRdxBarraInferior
|
object brDoble: TRdxBarraInferior
|
||||||
|
|||||||
@ -29,7 +29,7 @@ uses
|
|||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
Dialogs, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
|
||||||
cxDropDownEdit, StdCtrls, RdxBotones, RdxBarras, ExtCtrls,
|
cxDropDownEdit, StdCtrls, RdxBotones, RdxBarras, ExtCtrls,
|
||||||
RdxPaneles, TablaTrimestres;
|
RdxPaneles, TablaTrimestres, cxGraphics, Entidades;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrCambiarSituacionFacturas = class(TForm)
|
TfrCambiarSituacionFacturas = class(TForm)
|
||||||
@ -46,12 +46,14 @@ type
|
|||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
FEntidad: TRdxEntidad;
|
||||||
FCodigosFacturas : TStringList;
|
FCodigosFacturas : TStringList;
|
||||||
FSituacion : String;
|
FSituacion : String;
|
||||||
procedure SetSituacion(Value : String);
|
procedure SetSituacion(Value : String);
|
||||||
public
|
public
|
||||||
property CodigosFacturas : TStringList read FCodigosFacturas write FCodigosFacturas;
|
property CodigosFacturas : TStringList read FCodigosFacturas write FCodigosFacturas;
|
||||||
property Situacion : String read FSituacion write SetSituacion;
|
property Situacion : String read FSituacion write SetSituacion;
|
||||||
|
property Entidad: TRdxEntidad read FEntidad Write FEntidad;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -60,16 +62,22 @@ var
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Mensajes, Literales, BaseDatos, Configuracion, Entidades, RdxEmpresaActiva,
|
Mensajes, Literales, BaseDatos, Configuracion, RdxEmpresaActiva,
|
||||||
TablaFacturasCliente, StrFunc;
|
TablaFacturasCliente, TablaFacturasProveedor, StrFunc, Math;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
procedure TfrCambiarSituacionFacturas.bAceptarClick(Sender: TObject);
|
procedure TfrCambiarSituacionFacturas.bAceptarClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
Indice :Integer;
|
Indice :Integer;
|
||||||
|
Resultado: Boolean;
|
||||||
begin
|
begin
|
||||||
if not dmTablaFacturasCliente.ModificarSituacionFacturas(CodigosFacturas, cbxSituacion.Text) then
|
if Entidad = entFacturaProveedor then
|
||||||
|
Resultado := dmTablaFacturasProveedor.ModificarSituacionFacturas(CodigosFacturas, cbxSituacion.Text)
|
||||||
|
else
|
||||||
|
Resultado := dmTablaFacturasCliente.ModificarSituacionFacturas(CodigosFacturas, cbxSituacion.Text);
|
||||||
|
|
||||||
|
if not Resultado then
|
||||||
begin
|
begin
|
||||||
dmBaseDatos.Rollback;
|
dmBaseDatos.Rollback;
|
||||||
exit;
|
exit;
|
||||||
@ -81,6 +89,7 @@ end;
|
|||||||
procedure TfrCambiarSituacionFacturas.FormCreate(Sender: TObject);
|
procedure TfrCambiarSituacionFacturas.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
FEntidad := entFacturaCliente; //Por defecto tratara los documentos de facturas de cliente
|
||||||
FCodigosFacturas := TStringList.Create;
|
FCodigosFacturas := TStringList.Create;
|
||||||
cbxSituacion.Properties.Items := dmTablaFacturasCliente.DarSituaciones;
|
cbxSituacion.Properties.Items := dmTablaFacturasCliente.DarSituaciones;
|
||||||
cbxSituacion.ItemIndex := 0;
|
cbxSituacion.ItemIndex := 0;
|
||||||
|
|||||||
@ -343,6 +343,7 @@ object frFacturasClientes: TfrFacturasClientes
|
|||||||
OptionsView.GridLines = glHorizontal
|
OptionsView.GridLines = glHorizontal
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.HeaderEndEllipsis = True
|
OptionsView.HeaderEndEllipsis = 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
|
||||||
|
|||||||
@ -468,6 +468,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
fCambiarSituacionFacturas := TfrCambiarSituacionFacturas.Create(Self);
|
fCambiarSituacionFacturas := TfrCambiarSituacionFacturas.Create(Self);
|
||||||
|
fCambiarSituacionFacturas.Entidad := entFacturaCliente;
|
||||||
|
|
||||||
//Rellenamos la propiedad de la unidad CambiarSituacion con los códigos seleccionados
|
//Rellenamos la propiedad de la unidad CambiarSituacion con los códigos seleccionados
|
||||||
IndiceCol1 := gridFacturasDBTableView1.GetColumnByFieldName('CODIGO').Index;
|
IndiceCol1 := gridFacturasDBTableView1.GetColumnByFieldName('CODIGO').Index;
|
||||||
|
|||||||
@ -114,7 +114,7 @@ IncludeVerInfo=1
|
|||||||
AutoIncBuild=0
|
AutoIncBuild=0
|
||||||
MajorVer=3
|
MajorVer=3
|
||||||
MinorVer=0
|
MinorVer=0
|
||||||
Release=4
|
Release=5
|
||||||
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.0.4.0
|
FileVersion=3.0.5.0
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=
|
LegalCopyright=
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
|
|||||||
1202
Factuges.drc
1202
Factuges.drc
File diff suppressed because it is too large
Load Diff
BIN
Factuges.res
BIN
Factuges.res
Binary file not shown.
Binary file not shown.
@ -83,6 +83,8 @@ type
|
|||||||
eNombre: TLabel;
|
eNombre: TLabel;
|
||||||
Buscar: TcxTextEdit;
|
Buscar: TcxTextEdit;
|
||||||
bLimpiar: TRdxBoton;
|
bLimpiar: TRdxBoton;
|
||||||
|
bFacturar: TRdxBoton;
|
||||||
|
actCambiarSituacion: TAction;
|
||||||
procedure RdxFrameFacturasProveedorShow(Sender: TObject);
|
procedure RdxFrameFacturasProveedorShow(Sender: TObject);
|
||||||
procedure actAnadirExecute(Sender: TObject);
|
procedure actAnadirExecute(Sender: TObject);
|
||||||
procedure actModificarExecute(Sender: TObject);
|
procedure actModificarExecute(Sender: TObject);
|
||||||
@ -101,6 +103,7 @@ type
|
|||||||
procedure actRefrescarDatosExecute(Sender: TObject);
|
procedure actRefrescarDatosExecute(Sender: TObject);
|
||||||
procedure BuscarPropertiesChange(Sender: TObject);
|
procedure BuscarPropertiesChange(Sender: TObject);
|
||||||
procedure bLimpiarClick(Sender: TObject);
|
procedure bLimpiarClick(Sender: TObject);
|
||||||
|
procedure actCambiarSituacionExecute(Sender: TObject);
|
||||||
private
|
private
|
||||||
procedure ActualizarBotones;
|
procedure ActualizarBotones;
|
||||||
protected
|
protected
|
||||||
@ -123,7 +126,7 @@ implementation
|
|||||||
|
|
||||||
{ TfrFacturasProveedores }
|
{ TfrFacturasProveedores }
|
||||||
uses
|
uses
|
||||||
BaseDatos, TablaFacturasProveedor, IBDatabase,
|
BaseDatos, TablaFacturasProveedor, IBDatabase, CambiarSituacionFacturas,
|
||||||
IBCustomDataSet, Mensajes, Entidades, Variants,
|
IBCustomDataSet, Mensajes, Entidades, Variants,
|
||||||
FacturaProveedor, Constantes, FacturasProveedorPendientes, TablaEmpresas,
|
FacturaProveedor, Constantes, FacturasProveedorPendientes, TablaEmpresas,
|
||||||
Configuracion;
|
Configuracion;
|
||||||
@ -332,4 +335,27 @@ begin
|
|||||||
Buscar.Text := '';
|
Buscar.Text := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrFacturasProveedores.actCambiarSituacionExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
IndiceCol1 : Integer;
|
||||||
|
IndiceSel : Integer;
|
||||||
|
fCambiarSituacionFacturas : TfrCambiarSituacionFacturas;
|
||||||
|
|
||||||
|
begin
|
||||||
|
fCambiarSituacionFacturas := TfrCambiarSituacionFacturas.Create(Self);
|
||||||
|
fCambiarSituacionFacturas.Entidad := entFacturaProveedor;
|
||||||
|
|
||||||
|
//Rellenamos la propiedad de la unidad CambiarSituacion con los códigos seleccionados
|
||||||
|
IndiceCol1 := gridFacturasDBTableView1.GetColumnByFieldName('CODIGO').Index;
|
||||||
|
for IndiceSel:=0 to gridFacturasDBTableView1.Controller.SelectedRowCount-1 do
|
||||||
|
fCambiarSituacionFacturas.CodigosFacturas.Append(gridFacturasDBTableView1.Controller.SelectedRows[IndiceSel].Values[IndiceCol1]);
|
||||||
|
|
||||||
|
try
|
||||||
|
fCambiarSituacionFacturas.ShowModal;
|
||||||
|
finally
|
||||||
|
fCambiarSituacionFacturas.Free;
|
||||||
|
bRefrescar.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
[BD]
|
[BD]
|
||||||
UECKO ARMARIOS DAVID=david:D:\Proyectos\FactuGES 2000 v2 (Uecko)\Codigo\BD\uecko.gdb
|
UECKO ARMARIOS DAVID=david:D:\Proyectos\FactuGES 2000 v2 (Uecko)\Codigo\BD\uecko.gdb
|
||||||
|
UECKO ARMARIOS ROBERTO T=roberto:T:\Uecko\bd\uecko.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.
Binary file not shown.
BIN
bd/UECKO.GDB
BIN
bd/UECKO.GDB
Binary file not shown.
Loading…
Reference in New Issue
Block a user