Repaso de releaciones entre modulos

git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@60 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
This commit is contained in:
roberto 2010-09-15 16:42:46 +00:00
parent ecbc916cb9
commit 3310838d46
29 changed files with 1778 additions and 385 deletions

View File

@ -141,7 +141,8 @@ begin
try
case Tipo of
txArticulo: AArticulo := CloneDataTable(tbl_Articulos);
txProveedor: AArticulo := CloneDataTable(tbl_ArticulosParaCompra);
// txProveedor: AArticulo := CloneDataTable(tbl_ArticulosParaCompra); En el caso de tener varios proveedores para un mismo artículo
txProveedor: AArticulo := CloneDataTable(tbl_Articulos);
end;
AsignarClaseNegocio(AArticulo);

View File

@ -9,6 +9,8 @@
<Projects Include="..\..\Cliente\FactuGES.dproj" />
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
<Projects Include="..\Contactos\Controller\Contactos_controller.dproj" />
<Projects Include="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" />
<Projects Include="Controller\Comisiones_controller.dproj" />
<Projects Include="Data\Comisiones_data.dproj" />
<Projects Include="Model\Comisiones_model.dproj" />
@ -111,14 +113,32 @@
<Target Name="FactuGES_Server:Make">
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
</Target>
<Target Name="FacturasCliente_controller">
<MSBuild Projects="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" Targets="" />
</Target>
<Target Name="FacturasCliente_controller:Clean">
<MSBuild Projects="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" Targets="Clean" />
</Target>
<Target Name="FacturasCliente_controller:Make">
<MSBuild Projects="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" Targets="Make" />
</Target>
<Target Name="Contactos_controller">
<MSBuild Projects="..\Contactos\Controller\Contactos_controller.dproj" Targets="" />
</Target>
<Target Name="Contactos_controller:Clean">
<MSBuild Projects="..\Contactos\Controller\Contactos_controller.dproj" Targets="Clean" />
</Target>
<Target Name="Contactos_controller:Make">
<MSBuild Projects="..\Contactos\Controller\Contactos_controller.dproj" Targets="Make" />
</Target>
<Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;Comisiones_model;Comisiones_data;Comisiones_controller;Comisiones_view;Comisiones_plugin;FactuGES;FactuGES_Server" />
<CallTarget Targets="Base;GUIBase;ApplicationBase;Comisiones_model;Comisiones_data;Comisiones_controller;Comisiones_view;Comisiones_plugin;FactuGES;FactuGES_Server;FacturasCliente_controller;Contactos_controller" />
</Target>
<Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Comisiones_model:Clean;Comisiones_data:Clean;Comisiones_controller:Clean;Comisiones_view:Clean;Comisiones_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean" />
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Comisiones_model:Clean;Comisiones_data:Clean;Comisiones_controller:Clean;Comisiones_view:Clean;Comisiones_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasCliente_controller:Clean;Contactos_controller:Clean" />
</Target>
<Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Comisiones_model:Make;Comisiones_data:Make;Comisiones_controller:Make;Comisiones_view:Make;Comisiones_plugin:Make;FactuGES:Make;FactuGES_Server:Make" />
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Comisiones_model:Make;Comisiones_data:Make;Comisiones_controller:Make;Comisiones_view:Make;Comisiones_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasCliente_controller:Make;Contactos_controller:Make" />
</Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>

View File

@ -173,42 +173,66 @@ begin
end;
procedure TComisionesController.AsignarImporteTotal(AComision: IBizComisiones; const ImporteTotal: Variant);
var
AEdicion: Boolean;
begin
if Assigned(AComision) then
begin
if (not VarIsNull(ImporteTotal))
and (AComision.DataTable.FieldByName(fld_ComisionesIMPORTE_TOTAL).IsNull or (AComision.IMPORTE_TOTAL <> ImporteTotal)) then
begin
AComision.Edit;
AEdicion := AComision.DataTable.Editing;
if not AEdicion then
AComision.Edit;
AComision.IMPORTE_TOTAL := ImporteTotal;
AComision.Post;
if AEdicion then
AComision.Edit;
end;
end;
end;
function TComisionesController.BuscarFacturasDesglosadas(AFacturas: IBizFacturaCliente): IBizFacturasComision;
var
Cadena: String;
Condicion: TDAWhereExpression;
AArray : Array of TDAWhereExpression;
i: Integer;
begin
if Assigned(AFacturas) then
Result := FDataModule.GetFacturasDesglosadas;
with Result.DataTable.DynamicWhere do
begin
with AFacturas.DataTable do
//Solo sacaremos las facturas elegidas y pasadas por parámetro
if Assigned(AFacturas) then
begin
if not Active then Active := True;
First;
Cadena := '';
While not Eof do
with AFacturas.DataTable do
begin
if (Length(Cadena) > 0) then
Cadena := Cadena + ', ';
Cadena := Cadena + IntToStr(AFacturas.ID);
Next;
if not Active then Active := True;
SetLength(AArray, AFacturas.DataTable.RecordCount);
First;
i := 0;
While not Eof do
begin
AArray[i] := NewConstant(AFacturas.ID, datInteger);
Next;
Inc(i);
end;
end;
end;
Condicion := NewBinaryExpression(NewField('', fld_Facturas_ComisionID_FACTURA), NewList(AArray), dboIn);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
// Showmessage(Cadena);
Result := FDataModule.GetFacturasDesglosadas;
{
with Result.DataTable.Where do
begin
if NotEmpty then
@ -217,6 +241,7 @@ begin
AddText('ID_FACTURA in (' + Cadena + ')');
CloseBraket;
end;
}
end;
function TComisionesController.BuscarTodos: IBizComisiones;
@ -295,25 +320,28 @@ var
AEditor : IEditorComision;
begin
AEditor := NIL;
ShowHourglassCursor;
try
// RecuperarObjetos(ARemesaCliente);
CreateEditor('EditorComision', IEditorComision, AEditor);
with (AEditor as IEditorComision) do
begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Comision := AComision;
end;
finally
HideHourglassCursor;
end;
CreateEditor('EditorComision', IEditorComision, AEditor);
if Assigned(AEditor) then
try
AEditor.ShowModal;
AEditor.Release;
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.Comision := AComision;
//MODO CONSULTAR
// if not EsModificable(AComision) then
// begin
// SetDataTableReadOnly(AComision.DataTable, True);
// AEditor.ReadOnly := True;
// end;
AEditor.ShowModal;
//MODO CONSULTAR (Se deja la tabla como estaba)
// if AEditor.ReadOnly then
// SetDataTableReadOnly(AComision.DataTable, False);
finally
AEditor.Release;
AEditor := NIL;
end;
end;
@ -323,24 +351,28 @@ var
AEditor : IEditorComisiones;
begin
AEditor := NIL;
ShowHourglassCursor;
try
CreateEditor('EditorComisiones', IEditorComisiones, AEditor);
with AEditor do
begin
Controller := Self; //OJO ORDEN MUY IMPORTANTE
Comisiones := AComision;
end;
finally
HideHourglassCursor;
end;
CreateEditor('EditorComisiones', IEditorComisiones, AEditor);
if Assigned(AEditor) then
try
AEditor.ShowEmbedded;
// if not EsCadenaVacia(AWindowCaption) then
// AEditor.WindowCaption := AWindowCaption;
// if not EsCadenaVacia(AHeaderText) then
// AEditor.HeaderText := AHeaderText;
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.Comisiones := AComision;
// AEditor.MultiSelect := True;
// if AVerModal then
// AEditor.ShowModal
// else
AEditor.ShowEmbedded;
finally
AEditor := NIL;
end;
// if AVerModal then
// AEditor.Release;
AEditor := Nil;
end;
end;
function TComisionesController.ElegirFacturasComision(AComision: IBizComisiones): Boolean;
@ -380,7 +412,8 @@ begin
ShowHourglassCursor;
try
AFacturasDesglosadas := BuscarFacturasDesglosadas(AFacturasSeleccionadas);
AFacturasDesglosadas.DataTable.Active := True;
//Copia las facturas desglosadas de las facturas seleccionadas
DuplicarRegistros(AFacturasDesglosadas.DataTable, AComision.Facturas.DataTable, mdrTodos, True, True, False);

View File

@ -65,17 +65,21 @@ begin
AStream := FDataModule.GetReport(AComisionID, DesglosadoProv,'', '', Null);
try
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
AEditor.DataModule := FDataModule;
AEditor.LoadFromStream(AStream);
if Assigned(AEditor) then
try
AEditor.DataModule := FDataModule;
AEditor.LoadFromStream(AStream);
AEditor.Preview;
finally
AEditor.Release;
end;
finally
AStream.Free;
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
if Assigned(AEditor) then
AEditor.Preview;
end;
procedure TComisionesReportController.Print(const AComisionID : Variant; const DesglosadoProv: Boolean);
@ -87,20 +91,24 @@ begin
ShowHourglassCursor;
try
AStream := FDataModule.GetReport(AComisionID, DesglosadoProv, '', '', Null);
AStream := FDataModule.GetReport(AComisionID, DesglosadoProv,'', '', Null);
try
CreateEditor('EditorComisionesPreview', IEditorComisionesPreview, AEditor);
AEditor.DataModule := FDataModule;
AEditor.LoadFromStream(AStream);
if Assigned(AEditor) then
try
AEditor.DataModule := FDataModule;
AEditor.LoadFromStream(AStream);
AEditor.Print;
finally
AEditor.Release;
end;
finally
AStream.Free;
FreeAndNil(AStream);
AEditor := Nil;
end;
finally
HideHourglassCursor;
end;
if Assigned(AEditor) then
AEditor.Print
end;
end.

View File

@ -1,7 +1,7 @@
inherited DataModuleComisiones: TDataModuleComisiones
OnCreate = DAClientDataModuleCreate
Height = 248
Width = 390
Height = 251
Width = 414
object RORemoteService: TRORemoteService
Message = dmConexion.ROMessage
Channel = dmConexion.ROChannel
@ -79,6 +79,7 @@ inherited DataModuleComisiones: TDataModuleComisiones
DataType = datString
Size = 255
DisplayLabel = 'Comisiones_NOMBRE'
ServerAutoRefresh = True
DictionaryEntry = 'Comisiones_NOMBRE'
end>
Params = <>
@ -175,15 +176,10 @@ inherited DataModuleComisiones: TDataModuleComisiones
end
item
Name = 'IMPORTE_COMISION'
DataType = datCurrency
DataType = datFloat
DictionaryEntry = 'Facturas_Comision_IMPORTE_COMISION'
end>
Params = <
item
Name = 'ID_COMISION'
Value = ''
ParamType = daptInput
end>
Params = <>
MasterMappingMode = mmWhere
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Comisiones
@ -280,7 +276,7 @@ inherited DataModuleComisiones: TDataModuleComisiones
end
item
Name = 'IMPORTE_COMISION'
DataType = datCurrency
DataType = datFloat
DictionaryEntry = 'V_Detalles_Facturas_Comision_IMPORTE_COMISION'
end>
Params = <>

View File

@ -3,15 +3,15 @@ unit schComisionesClient_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Facturas_Comision = '{69C6A9C2-1439-4AAC-9471-8B3FB42EDFE3}';
RID_Comisiones = '{81E932F0-7BF0-4C1D-A22F-2FED176FD36A}';
RID_V_Detalles_Facturas_Comision = '{C60C13FF-26D0-444D-85A3-03DC05AAB574}';
RID_Facturas_Comision = '{80CF12AA-6D93-492A-BAEF-84156B2B83AE}';
RID_Comisiones = '{2E6A5B1C-EC92-4E6D-B986-2445F4AC11D4}';
RID_V_Detalles_Facturas_Comision = '{01AA2110-3187-4E1E-BE6C-6587A5BEF596}';
{ Data table names }
nme_Facturas_Comision = 'Facturas_Comision';
@ -111,7 +111,7 @@ const
type
{ IFacturas_Comision }
IFacturas_Comision = interface(IDAStronglyTypedDataTable)
['{C147ECB9-0DAF-46FD-B1F6-007A2D40E218}']
['{6DD26EF2-D21F-4324-94B3-11F17FC3A310}']
{ Property getters and setters }
function GetID_EMPRESAValue: Integer;
procedure SetID_EMPRESAValue(const aValue: Integer);
@ -169,8 +169,8 @@ type
procedure SetIMPORTE_COMISIONABLEValue(const aValue: Currency);
function GetIMPORTE_COMISIONABLEIsNull: Boolean;
procedure SetIMPORTE_COMISIONABLEIsNull(const aValue: Boolean);
function GetIMPORTE_COMISIONValue: Currency;
procedure SetIMPORTE_COMISIONValue(const aValue: Currency);
function GetIMPORTE_COMISIONValue: Float;
procedure SetIMPORTE_COMISIONValue(const aValue: Float);
function GetIMPORTE_COMISIONIsNull: Boolean;
procedure SetIMPORTE_COMISIONIsNull(const aValue: Boolean);
@ -204,12 +204,12 @@ type
property COMISIONIsNull: Boolean read GetCOMISIONIsNull write SetCOMISIONIsNull;
property IMPORTE_COMISIONABLE: Currency read GetIMPORTE_COMISIONABLEValue write SetIMPORTE_COMISIONABLEValue;
property IMPORTE_COMISIONABLEIsNull: Boolean read GetIMPORTE_COMISIONABLEIsNull write SetIMPORTE_COMISIONABLEIsNull;
property IMPORTE_COMISION: Currency read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISION: Float read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISIONIsNull: Boolean read GetIMPORTE_COMISIONIsNull write SetIMPORTE_COMISIONIsNull;
end;
{ TFacturas_ComisionDataTableRules }
TFacturas_ComisionDataTableRules = class(TDADataTableRules, IFacturas_Comision)
TFacturas_ComisionDataTableRules = class(TIntfObjectDADataTableRules, IFacturas_Comision)
private
protected
{ Property getters and setters }
@ -269,8 +269,8 @@ type
procedure SetIMPORTE_COMISIONABLEValue(const aValue: Currency); virtual;
function GetIMPORTE_COMISIONABLEIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONABLEIsNull(const aValue: Boolean); virtual;
function GetIMPORTE_COMISIONValue: Currency; virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Currency); virtual;
function GetIMPORTE_COMISIONValue: Float; virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Float); virtual;
function GetIMPORTE_COMISIONIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONIsNull(const aValue: Boolean); virtual;
@ -303,7 +303,7 @@ type
property COMISIONIsNull: Boolean read GetCOMISIONIsNull write SetCOMISIONIsNull;
property IMPORTE_COMISIONABLE: Currency read GetIMPORTE_COMISIONABLEValue write SetIMPORTE_COMISIONABLEValue;
property IMPORTE_COMISIONABLEIsNull: Boolean read GetIMPORTE_COMISIONABLEIsNull write SetIMPORTE_COMISIONABLEIsNull;
property IMPORTE_COMISION: Currency read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISION: Float read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISIONIsNull: Boolean read GetIMPORTE_COMISIONIsNull write SetIMPORTE_COMISIONIsNull;
public
@ -314,7 +314,7 @@ type
{ IComisiones }
IComisiones = interface(IDAStronglyTypedDataTable)
['{08412911-08D5-4CB6-BD93-E55E146EB577}']
['{72453F7B-858F-4439-A873-81D7B0CAE940}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -376,7 +376,7 @@ type
end;
{ TComisionesDataTableRules }
TComisionesDataTableRules = class(TDADataTableRules, IComisiones)
TComisionesDataTableRules = class(TIntfObjectDADataTableRules, IComisiones)
private
protected
{ Property getters and setters }
@ -445,7 +445,7 @@ type
{ IV_Detalles_Facturas_Comision }
IV_Detalles_Facturas_Comision = interface(IDAStronglyTypedDataTable)
['{DF8D0894-2A3B-4713-86FE-C8B816CB3256}']
['{8397080E-A3D6-4F0C-B038-85A52551E790}']
{ Property getters and setters }
function GetID_EMPRESAValue: Integer;
procedure SetID_EMPRESAValue(const aValue: Integer);
@ -503,8 +503,8 @@ type
procedure SetIMPORTE_COMISIONABLEValue(const aValue: Currency);
function GetIMPORTE_COMISIONABLEIsNull: Boolean;
procedure SetIMPORTE_COMISIONABLEIsNull(const aValue: Boolean);
function GetIMPORTE_COMISIONValue: Currency;
procedure SetIMPORTE_COMISIONValue(const aValue: Currency);
function GetIMPORTE_COMISIONValue: Float;
procedure SetIMPORTE_COMISIONValue(const aValue: Float);
function GetIMPORTE_COMISIONIsNull: Boolean;
procedure SetIMPORTE_COMISIONIsNull(const aValue: Boolean);
@ -538,12 +538,12 @@ type
property COMISIONIsNull: Boolean read GetCOMISIONIsNull write SetCOMISIONIsNull;
property IMPORTE_COMISIONABLE: Currency read GetIMPORTE_COMISIONABLEValue write SetIMPORTE_COMISIONABLEValue;
property IMPORTE_COMISIONABLEIsNull: Boolean read GetIMPORTE_COMISIONABLEIsNull write SetIMPORTE_COMISIONABLEIsNull;
property IMPORTE_COMISION: Currency read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISION: Float read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISIONIsNull: Boolean read GetIMPORTE_COMISIONIsNull write SetIMPORTE_COMISIONIsNull;
end;
{ TV_Detalles_Facturas_ComisionDataTableRules }
TV_Detalles_Facturas_ComisionDataTableRules = class(TDADataTableRules, IV_Detalles_Facturas_Comision)
TV_Detalles_Facturas_ComisionDataTableRules = class(TIntfObjectDADataTableRules, IV_Detalles_Facturas_Comision)
private
protected
{ Property getters and setters }
@ -603,8 +603,8 @@ type
procedure SetIMPORTE_COMISIONABLEValue(const aValue: Currency); virtual;
function GetIMPORTE_COMISIONABLEIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONABLEIsNull(const aValue: Boolean); virtual;
function GetIMPORTE_COMISIONValue: Currency; virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Currency); virtual;
function GetIMPORTE_COMISIONValue: Float; virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Float); virtual;
function GetIMPORTE_COMISIONIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONIsNull(const aValue: Boolean); virtual;
@ -637,7 +637,7 @@ type
property COMISIONIsNull: Boolean read GetCOMISIONIsNull write SetCOMISIONIsNull;
property IMPORTE_COMISIONABLE: Currency read GetIMPORTE_COMISIONABLEValue write SetIMPORTE_COMISIONABLEValue;
property IMPORTE_COMISIONABLEIsNull: Boolean read GetIMPORTE_COMISIONABLEIsNull write SetIMPORTE_COMISIONABLEIsNull;
property IMPORTE_COMISION: Currency read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISION: Float read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISIONIsNull: Boolean read GetIMPORTE_COMISIONIsNull write SetIMPORTE_COMISIONIsNull;
public
@ -955,14 +955,14 @@ begin
DataTable.Fields[idx_Facturas_ComisionIMPORTE_COMISIONABLE].AsVariant := Null;
end;
function TFacturas_ComisionDataTableRules.GetIMPORTE_COMISIONValue: Currency;
function TFacturas_ComisionDataTableRules.GetIMPORTE_COMISIONValue: Float;
begin
result := DataTable.Fields[idx_Facturas_ComisionIMPORTE_COMISION].AsCurrency;
result := DataTable.Fields[idx_Facturas_ComisionIMPORTE_COMISION].AsFloat;
end;
procedure TFacturas_ComisionDataTableRules.SetIMPORTE_COMISIONValue(const aValue: Currency);
procedure TFacturas_ComisionDataTableRules.SetIMPORTE_COMISIONValue(const aValue: Float);
begin
DataTable.Fields[idx_Facturas_ComisionIMPORTE_COMISION].AsCurrency := aValue;
DataTable.Fields[idx_Facturas_ComisionIMPORTE_COMISION].AsFloat := aValue;
end;
function TFacturas_ComisionDataTableRules.GetIMPORTE_COMISIONIsNull: boolean;
@ -1483,14 +1483,14 @@ begin
DataTable.Fields[idx_V_Detalles_Facturas_ComisionIMPORTE_COMISIONABLE].AsVariant := Null;
end;
function TV_Detalles_Facturas_ComisionDataTableRules.GetIMPORTE_COMISIONValue: Currency;
function TV_Detalles_Facturas_ComisionDataTableRules.GetIMPORTE_COMISIONValue: Float;
begin
result := DataTable.Fields[idx_V_Detalles_Facturas_ComisionIMPORTE_COMISION].AsCurrency;
result := DataTable.Fields[idx_V_Detalles_Facturas_ComisionIMPORTE_COMISION].AsFloat;
end;
procedure TV_Detalles_Facturas_ComisionDataTableRules.SetIMPORTE_COMISIONValue(const aValue: Currency);
procedure TV_Detalles_Facturas_ComisionDataTableRules.SetIMPORTE_COMISIONValue(const aValue: Float);
begin
DataTable.Fields[idx_V_Detalles_Facturas_ComisionIMPORTE_COMISION].AsCurrency := aValue;
DataTable.Fields[idx_V_Detalles_Facturas_ComisionIMPORTE_COMISION].AsFloat := aValue;
end;
function TV_Detalles_Facturas_ComisionDataTableRules.GetIMPORTE_COMISIONIsNull: boolean;

View File

@ -9,14 +9,14 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Facturas_ComisionDelta = '{88A76329-95DC-43B9-B006-2105266C4624}';
RID_ComisionesDelta = '{09A69155-5018-438D-B5C6-F0C7C44D67A1}';
RID_V_Detalles_Facturas_ComisionDelta = '{E0EC6778-1F46-4E20-AFD3-40F830E827D0}';
RID_Facturas_ComisionDelta = '{4C5DE436-DABE-4CF3-82F0-DBE9E5E15ED4}';
RID_ComisionesDelta = '{68D578AF-F1C5-407E-8982-243DEDD3DBC7}';
RID_V_Detalles_Facturas_ComisionDelta = '{F4B4675E-F31B-456C-8523-3BB2CEB9A910}';
type
{ IFacturas_ComisionDelta }
IFacturas_ComisionDelta = interface(IFacturas_Comision)
['{88A76329-95DC-43B9-B006-2105266C4624}']
['{4C5DE436-DABE-4CF3-82F0-DBE9E5E15ED4}']
{ Property getters and setters }
function GetOldID_EMPRESAValue : Integer;
function GetOldID_AGENTEValue : Integer;
@ -32,7 +32,7 @@ type
function GetOldPROVEEDORValue : String;
function GetOldCOMISIONValue : Float;
function GetOldIMPORTE_COMISIONABLEValue : Currency;
function GetOldIMPORTE_COMISIONValue : Currency;
function GetOldIMPORTE_COMISIONValue : Float;
{ Properties }
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
@ -49,7 +49,7 @@ type
property OldPROVEEDOR : String read GetOldPROVEEDORValue;
property OldCOMISION : Float read GetOldCOMISIONValue;
property OldIMPORTE_COMISIONABLE : Currency read GetOldIMPORTE_COMISIONABLEValue;
property OldIMPORTE_COMISION : Currency read GetOldIMPORTE_COMISIONValue;
property OldIMPORTE_COMISION : Float read GetOldIMPORTE_COMISIONValue;
end;
{ TFacturas_ComisionBusinessProcessorRules }
@ -141,11 +141,11 @@ type
function GetOldIMPORTE_COMISIONABLEIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONABLEValue(const aValue: Currency); virtual;
procedure SetIMPORTE_COMISIONABLEIsNull(const aValue: Boolean); virtual;
function GetIMPORTE_COMISIONValue: Currency; virtual;
function GetIMPORTE_COMISIONValue: Float; virtual;
function GetIMPORTE_COMISIONIsNull: Boolean; virtual;
function GetOldIMPORTE_COMISIONValue: Currency; virtual;
function GetOldIMPORTE_COMISIONValue: Float; virtual;
function GetOldIMPORTE_COMISIONIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Currency); virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Float); virtual;
procedure SetIMPORTE_COMISIONIsNull(const aValue: Boolean); virtual;
{ Properties }
@ -205,9 +205,9 @@ type
property IMPORTE_COMISIONABLEIsNull : Boolean read GetIMPORTE_COMISIONABLEIsNull write SetIMPORTE_COMISIONABLEIsNull;
property OldIMPORTE_COMISIONABLE : Currency read GetOldIMPORTE_COMISIONABLEValue;
property OldIMPORTE_COMISIONABLEIsNull : Boolean read GetOldIMPORTE_COMISIONABLEIsNull;
property IMPORTE_COMISION : Currency read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISION : Float read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISIONIsNull : Boolean read GetIMPORTE_COMISIONIsNull write SetIMPORTE_COMISIONIsNull;
property OldIMPORTE_COMISION : Currency read GetOldIMPORTE_COMISIONValue;
property OldIMPORTE_COMISION : Float read GetOldIMPORTE_COMISIONValue;
property OldIMPORTE_COMISIONIsNull : Boolean read GetOldIMPORTE_COMISIONIsNull;
public
@ -218,7 +218,7 @@ type
{ IComisionesDelta }
IComisionesDelta = interface(IComisiones)
['{09A69155-5018-438D-B5C6-F0C7C44D67A1}']
['{68D578AF-F1C5-407E-8982-243DEDD3DBC7}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@ -348,7 +348,7 @@ type
{ IV_Detalles_Facturas_ComisionDelta }
IV_Detalles_Facturas_ComisionDelta = interface(IV_Detalles_Facturas_Comision)
['{E0EC6778-1F46-4E20-AFD3-40F830E827D0}']
['{F4B4675E-F31B-456C-8523-3BB2CEB9A910}']
{ Property getters and setters }
function GetOldID_EMPRESAValue : Integer;
function GetOldID_AGENTEValue : Integer;
@ -364,7 +364,7 @@ type
function GetOldPROVEEDORValue : String;
function GetOldCOMISIONValue : Float;
function GetOldIMPORTE_COMISIONABLEValue : Currency;
function GetOldIMPORTE_COMISIONValue : Currency;
function GetOldIMPORTE_COMISIONValue : Float;
{ Properties }
property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
@ -381,7 +381,7 @@ type
property OldPROVEEDOR : String read GetOldPROVEEDORValue;
property OldCOMISION : Float read GetOldCOMISIONValue;
property OldIMPORTE_COMISIONABLE : Currency read GetOldIMPORTE_COMISIONABLEValue;
property OldIMPORTE_COMISION : Currency read GetOldIMPORTE_COMISIONValue;
property OldIMPORTE_COMISION : Float read GetOldIMPORTE_COMISIONValue;
end;
{ TV_Detalles_Facturas_ComisionBusinessProcessorRules }
@ -473,11 +473,11 @@ type
function GetOldIMPORTE_COMISIONABLEIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONABLEValue(const aValue: Currency); virtual;
procedure SetIMPORTE_COMISIONABLEIsNull(const aValue: Boolean); virtual;
function GetIMPORTE_COMISIONValue: Currency; virtual;
function GetIMPORTE_COMISIONValue: Float; virtual;
function GetIMPORTE_COMISIONIsNull: Boolean; virtual;
function GetOldIMPORTE_COMISIONValue: Currency; virtual;
function GetOldIMPORTE_COMISIONValue: Float; virtual;
function GetOldIMPORTE_COMISIONIsNull: Boolean; virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Currency); virtual;
procedure SetIMPORTE_COMISIONValue(const aValue: Float); virtual;
procedure SetIMPORTE_COMISIONIsNull(const aValue: Boolean); virtual;
{ Properties }
@ -537,9 +537,9 @@ type
property IMPORTE_COMISIONABLEIsNull : Boolean read GetIMPORTE_COMISIONABLEIsNull write SetIMPORTE_COMISIONABLEIsNull;
property OldIMPORTE_COMISIONABLE : Currency read GetOldIMPORTE_COMISIONABLEValue;
property OldIMPORTE_COMISIONABLEIsNull : Boolean read GetOldIMPORTE_COMISIONABLEIsNull;
property IMPORTE_COMISION : Currency read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISION : Float read GetIMPORTE_COMISIONValue write SetIMPORTE_COMISIONValue;
property IMPORTE_COMISIONIsNull : Boolean read GetIMPORTE_COMISIONIsNull write SetIMPORTE_COMISIONIsNull;
property OldIMPORTE_COMISION : Currency read GetOldIMPORTE_COMISIONValue;
property OldIMPORTE_COMISION : Float read GetOldIMPORTE_COMISIONValue;
property OldIMPORTE_COMISIONIsNull : Boolean read GetOldIMPORTE_COMISIONIsNull;
public
@ -998,7 +998,7 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_Facturas_ComisionIMPORTE_COMISIONABLE] := Null;
end;
function TFacturas_ComisionBusinessProcessorRules.GetIMPORTE_COMISIONValue: Currency;
function TFacturas_ComisionBusinessProcessorRules.GetIMPORTE_COMISIONValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_Facturas_ComisionIMPORTE_COMISION];
end;
@ -1008,7 +1008,7 @@ begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Facturas_ComisionIMPORTE_COMISION]);
end;
function TFacturas_ComisionBusinessProcessorRules.GetOldIMPORTE_COMISIONValue: Currency;
function TFacturas_ComisionBusinessProcessorRules.GetOldIMPORTE_COMISIONValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_Facturas_ComisionIMPORTE_COMISION];
end;
@ -1018,7 +1018,7 @@ begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Facturas_ComisionIMPORTE_COMISION]);
end;
procedure TFacturas_ComisionBusinessProcessorRules.SetIMPORTE_COMISIONValue(const aValue: Currency);
procedure TFacturas_ComisionBusinessProcessorRules.SetIMPORTE_COMISIONValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_Facturas_ComisionIMPORTE_COMISION] := aValue;
end;
@ -1766,7 +1766,7 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_V_Detalles_Facturas_ComisionIMPORTE_COMISIONABLE] := Null;
end;
function TV_Detalles_Facturas_ComisionBusinessProcessorRules.GetIMPORTE_COMISIONValue: Currency;
function TV_Detalles_Facturas_ComisionBusinessProcessorRules.GetIMPORTE_COMISIONValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_V_Detalles_Facturas_ComisionIMPORTE_COMISION];
end;
@ -1776,7 +1776,7 @@ begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_V_Detalles_Facturas_ComisionIMPORTE_COMISION]);
end;
function TV_Detalles_Facturas_ComisionBusinessProcessorRules.GetOldIMPORTE_COMISIONValue: Currency;
function TV_Detalles_Facturas_ComisionBusinessProcessorRules.GetOldIMPORTE_COMISIONValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_V_Detalles_Facturas_ComisionIMPORTE_COMISION];
end;
@ -1786,7 +1786,7 @@ begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_V_Detalles_Facturas_ComisionIMPORTE_COMISION]);
end;
procedure TV_Detalles_Facturas_ComisionBusinessProcessorRules.SetIMPORTE_COMISIONValue(const aValue: Currency);
procedure TV_Detalles_Facturas_ComisionBusinessProcessorRules.SetIMPORTE_COMISIONValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_V_Detalles_Facturas_ComisionIMPORTE_COMISION] := aValue;
end;

View File

@ -98,10 +98,6 @@ procedure TBizComisiones.SetFacturas(const Value: IBizFacturasComision);
begin
FFacturas := Value;
EnlazarMaestroDetalle(FFacturasLink, FFacturas);
if Assigned(FFacturas) then
if not FFacturas.DataTable.Active then
FFacturas.DataTable.Active := True;
end;
initialization

View File

@ -3,76 +3,112 @@ unit uBizComisionesServer;
interface
uses
schComisionesServer_Intf, uDAInterfaces,
uDADataTable, uDABusinessProcessor;
uDAInterfaces, uDADelta, uDABusinessProcessor,
schComisionesServer_Intf;
const
BIZ_SERVER_COMISIONES = 'Server.Comisiones';
REF_COMISIONES = 'REF_COMISIONES';
type
TBizComisionesServer = class(TComisionesBusinessProcessorRules)
private
FReferenciaAutomatica : Boolean;
function DarReferencia : String;
function IncrementarReferencia : Boolean;
protected
procedure BeforeProcessChange(Sender: TDABusinessProcessor;
aChangeType: TDAChangeType; aChange: TDADeltaChange;
var ProcessChange: Boolean); override;
procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override;
procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean;
var CanRemoveFromDelta: Boolean); override;
end;
implementation
uses
Dialogs, SysUtils, Variants, uDataModuleServer, uDAClasses, DARemoteService_Impl,
schComisionesClient_Intf, uBusinessUtils, uReferenciasUtils, uROClasses;
{ TBizComisionesServer }
procedure TBizComisionesServer.BeforeProcessChange(
Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
aChange: TDADeltaChange; var ProcessChange: Boolean);
var
ASchema : TDASchema;
ACurrentConn : IDAConnection;
dsData: IDADataset;
Empresa : Variant;
uses
Variants, uDAClasses, uBusinessUtils, uROClasses, uROServer, SysUtils,
uDataModuleServer, schComisionesClient_Intf, FactuGES_Intf;
const
REF_COMISIONES = 'REF_COMISIONES';
procedure TBizComisionesServer.AfterProcessChange(Sender: TDABusinessProcessor;
aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean);
begin
inherited;
case aChangeType of
case aChange.ChangeType of
ctInsert: begin
// Insert_Asiento_Factura(aChange);
end;
ctUpdate: begin
// Update_Asiento_Factura(aChange);
end;
ctDelete: begin
// Delete_Asiento_Factura(aChange);
end;
end;
{ Por defecto, mantenemos los deltas por si alguna tabla hija los necesita }
CanRemoveFromDelta := False;
case aChange.ChangeType of
ctInsert, ctUpdate: begin
if FReferenciaAutomatica then
begin
IncrementarReferencia;
FReferenciaAutomatica := False;
end;
end;
end;
end;
procedure TBizComisionesServer.BeforeProcessDelta(Sender: TDABusinessProcessor;
const aDelta: IDADelta);
begin
FReferenciaAutomatica := False;
case Sender.CurrentChange.ChangeType of
ctInsert, ctUpdate: begin
//Si la referencia no ha sido asignada le asignamos una nosotros
if (VarIsNull(aChange.NewValueByName[fld_ComisionesREFERENCIA]))
or (VarToStr(aChange.NewValueByName[fld_ComisionesREFERENCIA]) = '') then
if REFERENCIAIsNull or (Length(REFERENCIA) = 0) then
begin
ASchema := BusinessProcessor.Schema;
ACurrentConn := GetBusinessProcessorConnection(BusinessProcessor);
try
//Siempre va a estar rellena
Empresa := aChange.NewValueByName[fld_ComisionesID_EMPRESA];
dsData := ASchema.NewDataset(ACurrentConn, 'DarReferencia', ['CODIGO', 'EMPRESA'], [REF_COMISIONES, Empresa]);
except
RaiseError('No existe la tabla REFERENCIAS');
end;
dsData.Active := True;
if dsData.IsEmpty then
RaiseError('NO HAY REFERENCIA ' + REF_COMISIONES + ' DECLARADA EN TABLA REFERENCIAS');
REFERENCIA := dsData.FieldByName('VALOR').AsString;
try
ASchema.NewCommand(ACurrentConn, 'ModificarReferencia', ['CODIGO', 'VALOR', 'ID_EMPRESA'], [REF_COMISIONES, DarReferenciaSiguiente(REFERENCIA), Empresa]);
except
RaiseError('Error al asignar la nueva ' + REFERENCIA + ' referencia en tabla');
end;
FReferenciaAutomatica := True;
REFERENCIA := DarReferencia;
end;
end;
end;
end;
function TBizComisionesServer.DarReferencia: String;
var
AReferenciasService : IsrvReferencias;
Intf : IInterface;
AClientID : TGUID;
begin
// Aunque sea un abono, la referencia es la misma que una factura
CreateGUID(AClientID);
GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf);
AReferenciasService := Intf as IsrvReferencias;
Result := AReferenciasService.DarNuevaReferencia(REF_COMISIONES, ID_EMPRESA)
end;
function TBizComisionesServer.IncrementarReferencia: Boolean;
var
AReferenciasService : IsrvReferencias;
Intf : IInterface;
AClientID : TGUID;
begin
// Aunque sea un abono, la referencia es la misma que una factura
CreateGUID(AClientID);
GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf);
AReferenciasService := Intf as IsrvReferencias;
Result := AReferenciasService.IncrementarValorReferencia(REF_COMISIONES, Self.REFERENCIA, ID_EMPRESA)
end;
initialization
RegisterBusinessProcessorRules(BIZ_SERVER_COMISIONES, TBizComisionesServer);

View File

@ -0,0 +1,935 @@
object RptComisiones: TRptComisiones
OldCreateOrder = True
OnCreate = DataModuleCreate
Height = 405
Width = 447
object DADataCabecera: TDADataSource
DataSet = tbl_Comisiones.Dataset
DataTable = tbl_Comisiones
Left = 264
Top = 72
end
object tbl_Comisiones: TDACDSDataTable
RemoteUpdatesOptions = []
Fields = <>
Params = <>
MasterMappingMode = mmDataRequest
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
LocalSchema = schReport
LocalDataStreamer = Bin2DataStreamer
IndexDefs = <>
Left = 264
Top = 128
end
object frxRichObject1: TfrxRichObject
Left = 48
Top = 296
end
object frxBarCodeObject1: TfrxBarCodeObject
Left = 144
Top = 296
end
object frxOLEObject1: TfrxOLEObject
Left = 48
Top = 344
end
object frxCrossObject1: TfrxCrossObject
Left = 144
Top = 344
end
object frxCheckBoxObject1: TfrxCheckBoxObject
Left = 256
Top = 296
end
object frxGradientObject1: TfrxGradientObject
Left = 360
Top = 296
end
object frxChartObject1: TfrxChartObject
Left = 256
Top = 344
end
object schReport: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'IBX'
TargetTable = 'V_AGENTES_COMISIONES_DET_FAC'
SQL =
'select'#10' COMISIONES_LIQUIDADAS.FECHA AS FECHA_COMISION,'#10' ' +
' COMISIONES_LIQUIDADAS.REFERENCIA AS REFERENCIA_COMISION,'#10' ' +
' COMISIONES_LIQUIDADAS.DESCRIPCION,'#10' COMISIONES_LIQUIDA' +
'DAS.IMPORTE_TOTAL,'#10#10' V_AGENTES_COMISIONES_DET_FAC.ID_EMPRE' +
'SA, EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, COALESCE(EMPRESAS.RAZON' +
'_SOCIAL, EMPRESAS.NOMBRE) as RAZON_SOCIAL,'#10' EMPRESAS.CALLE' +
' as CALLE_EMPRESA, EMPRESAS.POBLACION as POBLACION_EMPRESA,'#10' ' +
' EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPRESAS.CODIGO_POST' +
'AL as CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.TELEFONO_1, EMPRESA' +
'S.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10' EMPRESAS.PAGIN' +
'A_WEB, EMPRESAS.REGISTRO_MERCANTIL,'#10#10' V_AGENTES_COMISIONES' +
'_DET_FAC.ID_AGENTE, CONTACTOS1.NOMBRE as AGENTE,'#10' V_AGENTE' +
'S_COMISIONES_DET_FAC.ID_FACTURA,'#10' V_AGENTES_COMISIONES_DET' +
'_FAC.ID_COMISION_LIQUIDADA,'#10' V_AGENTES_COMISIONES_DET_FAC.' +
'FECHA,'#10' V_AGENTES_COMISIONES_DET_FAC.REFERENCIA,'#10' V_' +
'AGENTES_COMISIONES_DET_FAC.SITUACION,'#10' V_AGENTES_COMISIONE' +
'S_DET_FAC.ID_CLIENTE,'#10' CONTACTOS2.NOMBRE as CLIENTE,'#10#10' ' +
' SUM(V_AGENTES_COMISIONES_DET_FAC.IMPORTE_TOTAL) as IMPORTE_CO' +
'MISIONABLE,'#10' SUM(V_AGENTES_COMISIONES_DET_FAC.IMPORTE_COMI' +
'SION) as IMPORTE_COMISION'#10#10#10'from V_AGENTES_COMISIONES_DET_FAC'#10'LE' +
'FT JOIN COMISIONES_LIQUIDADAS ON (COMISIONES_LIQUIDADAS.ID = V_A' +
'GENTES_COMISIONES_DET_FAC.ID_COMISION_LIQUIDADA)'#10'LEFT JOIN EMPRE' +
'SAS ON EMPRESAS.ID = V_AGENTES_COMISIONES_DET_FAC.ID_EMPRESA'#10'LEF' +
'T JOIN CONTACTOS CONTACTOS1 ON (CONTACTOS1.ID = V_AGENTES_COMISI' +
'ONES_DET_FAC.ID_AGENTE)'#10'LEFT JOIN CONTACTOS CONTACTOS2 ON (CONTA' +
'CTOS2.ID = V_AGENTES_COMISIONES_DET_FAC.ID_CLIENTE)'#10'LEFT JOIN CO' +
'NTACTOS CONTACTOS3 ON (CONTACTOS3.ID = V_AGENTES_COMISIONES_DET_' +
'FAC.ID_PROVEEDOR)'#10'WHERE V_AGENTES_COMISIONES_DET_FAC.ID_COMISION' +
'_LIQUIDADA IS NOT NULL'#10'and {where}'#10'GROUP BY 1, 2, 3, 4, 5, 6, 7,' +
' 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2' +
'4, 25, 26'#10'ORDER BY 1'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'ID_CLIENTE'
TableField = 'ID_CLIENTE'
end
item
DatasetField = 'REFERENCIA_COMISION'
TableField = 'REFERENCIA_COMISION'
end
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
end
item
DatasetField = 'ID_AGENTE'
TableField = 'ID_AGENTE'
end
item
DatasetField = 'AGENTE'
TableField = 'AGENTE'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
end
item
DatasetField = 'ID_COMISION_LIQUIDADA'
TableField = 'ID_COMISION_LIQUIDADA'
end
item
DatasetField = 'FECHA'
TableField = 'FECHA'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'CLIENTE'
TableField = 'CLIENTE'
end
item
DatasetField = 'IMPORTE_COMISIONABLE'
TableField = 'IMPORTE_COMISIONABLE'
end
item
DatasetField = 'IMPORTE_COMISION'
TableField = 'IMPORTE_COMISION'
end
item
DatasetField = 'FECHA_COMISION'
TableField = 'FECHA_COMISION'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'NIF_CIF_EMPRESA'
TableField = 'NIF_CIF_EMPRESA'
end
item
DatasetField = 'RAZON_SOCIAL'
TableField = 'RAZON_SOCIAL'
end
item
DatasetField = 'CALLE_EMPRESA'
TableField = 'CALLE_EMPRESA'
end
item
DatasetField = 'POBLACION_EMPRESA'
TableField = 'POBLACION_EMPRESA'
end
item
DatasetField = 'PROVINCIA_EMPRESA'
TableField = 'PROVINCIA_EMPRESA'
end
item
DatasetField = 'CODIGO_POSTAL_EMPRESA'
TableField = 'CODIGO_POSTAL_EMPRESA'
end
item
DatasetField = 'TELEFONO_1'
TableField = 'TELEFONO_1'
end
item
DatasetField = 'FAX'
TableField = 'FAX'
end
item
DatasetField = 'MOVIL_1'
TableField = 'MOVIL_1'
end
item
DatasetField = 'EMAIL_1'
TableField = 'EMAIL_1'
end
item
DatasetField = 'PAGINA_WEB'
TableField = 'PAGINA_WEB'
end
item
DatasetField = 'REGISTRO_MERCANTIL'
TableField = 'REGISTRO_MERCANTIL'
end>
end>
Name = 'InformeComisiones'
Fields = <
item
Name = 'FECHA_COMISION'
DataType = datDateTime
end
item
Name = 'REFERENCIA_COMISION'
DataType = datString
Size = 255
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'NIF_CIF_EMPRESA'
DataType = datString
Size = 15
end
item
Name = 'RAZON_SOCIAL'
DataType = datString
Size = 255
end
item
Name = 'CALLE_EMPRESA'
DataType = datString
Size = 255
end
item
Name = 'POBLACION_EMPRESA'
DataType = datString
Size = 255
end
item
Name = 'PROVINCIA_EMPRESA'
DataType = datString
Size = 255
end
item
Name = 'CODIGO_POSTAL_EMPRESA'
DataType = datString
Size = 10
end
item
Name = 'TELEFONO_1'
DataType = datString
Size = 25
end
item
Name = 'FAX'
DataType = datString
Size = 25
end
item
Name = 'MOVIL_1'
DataType = datString
Size = 25
end
item
Name = 'EMAIL_1'
DataType = datString
Size = 255
end
item
Name = 'PAGINA_WEB'
DataType = datString
Size = 255
end
item
Name = 'REGISTRO_MERCANTIL'
DataType = datString
Size = 255
end
item
Name = 'ID_AGENTE'
DataType = datInteger
end
item
Name = 'AGENTE'
DataType = datString
Size = 255
end
item
Name = 'ID_FACTURA'
DataType = datInteger
end
item
Name = 'ID_COMISION_LIQUIDADA'
DataType = datInteger
end
item
Name = 'FECHA'
DataType = datDateTime
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 19
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
end
item
Name = 'CLIENTE'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_COMISIONABLE'
DataType = datCurrency
end
item
Name = 'IMPORTE_COMISION'
DataType = datFloat
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
TargetTable = 'V_AGENTES_COMISIONES_DET_FAC'
SQL =
'select'#10' COMISIONES_LIQUIDADAS.FECHA AS FECHA_COMISION,'#10' ' +
' COMISIONES_LIQUIDADAS.REFERENCIA AS REFERENCIA_COMISION,'#10' ' +
' COMISIONES_LIQUIDADAS.DESCRIPCION,'#10' COMISIONES_LIQUIDA' +
'DAS.IMPORTE_TOTAL,'#10#10' V_AGENTES_COMISIONES_DET_FAC.ID_EMPRE' +
'SA, EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, COALESCE(EMPRESAS.RAZON' +
'_SOCIAL, EMPRESAS.NOMBRE) as RAZON_SOCIAL,'#10' EMPRESAS.CALLE' +
' as CALLE_EMPRESA, EMPRESAS.POBLACION as POBLACION_EMPRESA,'#10' ' +
' EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPRESAS.CODIGO_POST' +
'AL as CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.TELEFONO_1, EMPRESA' +
'S.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10' EMPRESAS.PAGIN' +
'A_WEB, EMPRESAS.REGISTRO_MERCANTIL,'#10#10' V_AGENTES_COMISIONES' +
'_DET_FAC.ID_AGENTE, CONTACTOS1.NOMBRE as AGENTE,'#10' V_AGENTE' +
'S_COMISIONES_DET_FAC.ID_FACTURA,'#10' V_AGENTES_COMISIONES_DET' +
'_FAC.ID_COMISION_LIQUIDADA,'#10' V_AGENTES_COMISIONES_DET_FAC.' +
'FECHA,'#10' V_AGENTES_COMISIONES_DET_FAC.REFERENCIA,'#10' V_' +
'AGENTES_COMISIONES_DET_FAC.SITUACION,'#10' V_AGENTES_COMISIONE' +
'S_DET_FAC.ID_CLIENTE,'#10' CONTACTOS2.NOMBRE as CLIENTE,'#10' ' +
' V_AGENTES_COMISIONES_DET_FAC.ID_PROVEEDOR,'#10' CONTACTOS3.N' +
'OMBRE as PROVEEDOR,'#10' V_AGENTES_COMISIONES_DET_FAC.COMISION' +
','#10#10' SUM(V_AGENTES_COMISIONES_DET_FAC.IMPORTE_TOTAL) as IMP' +
'ORTE_COMISIONABLE,'#10' SUM(V_AGENTES_COMISIONES_DET_FAC.IMPOR' +
'TE_COMISION) as IMPORTE_COMISION'#10#10#10'from V_AGENTES_COMISIONES_DET' +
'_FAC'#10'LEFT JOIN COMISIONES_LIQUIDADAS ON (COMISIONES_LIQUIDADAS.I' +
'D = V_AGENTES_COMISIONES_DET_FAC.ID_COMISION_LIQUIDADA)'#10'LEFT JOI' +
'N EMPRESAS ON EMPRESAS.ID = V_AGENTES_COMISIONES_DET_FAC.ID_EMPR' +
'ESA'#10'LEFT JOIN CONTACTOS CONTACTOS1 ON (CONTACTOS1.ID = V_AGENTES' +
'_COMISIONES_DET_FAC.ID_AGENTE)'#10'LEFT JOIN CONTACTOS CONTACTOS2 ON' +
' (CONTACTOS2.ID = V_AGENTES_COMISIONES_DET_FAC.ID_CLIENTE)'#10'LEFT ' +
'JOIN CONTACTOS CONTACTOS3 ON (CONTACTOS3.ID = V_AGENTES_COMISION' +
'ES_DET_FAC.ID_PROVEEDOR)'#10'WHERE V_AGENTES_COMISIONES_DET_FAC.ID_C' +
'OMISION_LIQUIDADA IS NOT NULL'#10'and {where}'#10'GROUP BY 1, 2, 3, 4, 5' +
', 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22' +
', 23, 24, 25, 26, 27, 28, 29'#10'ORDER BY 1'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'ID_CLIENTE'
TableField = 'ID_CLIENTE'
end
item
DatasetField = 'REFERENCIA_COMISION'
TableField = 'REFERENCIA_COMISION'
end
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
end
item
DatasetField = 'ID_AGENTE'
TableField = 'ID_AGENTE'
end
item
DatasetField = 'AGENTE'
TableField = 'AGENTE'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
end
item
DatasetField = 'ID_COMISION_LIQUIDADA'
TableField = 'ID_COMISION_LIQUIDADA'
end
item
DatasetField = 'FECHA'
TableField = 'FECHA'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'CLIENTE'
TableField = 'CLIENTE'
end
item
DatasetField = 'ID_PROVEEDOR'
TableField = 'ID_PROVEEDOR'
end
item
DatasetField = 'PROVEEDOR'
TableField = 'PROVEEDOR'
end
item
DatasetField = 'COMISION'
TableField = 'COMISION'
end
item
DatasetField = 'IMPORTE_COMISIONABLE'
TableField = 'IMPORTE_COMISIONABLE'
end
item
DatasetField = 'IMPORTE_COMISION'
TableField = 'IMPORTE_COMISION'
end
item
DatasetField = 'FECHA_COMISION'
TableField = 'FECHA_COMISION'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'NIF_CIF_EMPRESA'
TableField = 'NIF_CIF_EMPRESA'
end
item
DatasetField = 'RAZON_SOCIAL'
TableField = 'RAZON_SOCIAL'
end
item
DatasetField = 'CALLE_EMPRESA'
TableField = 'CALLE_EMPRESA'
end
item
DatasetField = 'POBLACION_EMPRESA'
TableField = 'POBLACION_EMPRESA'
end
item
DatasetField = 'PROVINCIA_EMPRESA'
TableField = 'PROVINCIA_EMPRESA'
end
item
DatasetField = 'CODIGO_POSTAL_EMPRESA'
TableField = 'CODIGO_POSTAL_EMPRESA'
end
item
DatasetField = 'TELEFONO_1'
TableField = 'TELEFONO_1'
end
item
DatasetField = 'FAX'
TableField = 'FAX'
end
item
DatasetField = 'MOVIL_1'
TableField = 'MOVIL_1'
end
item
DatasetField = 'EMAIL_1'
TableField = 'EMAIL_1'
end
item
DatasetField = 'PAGINA_WEB'
TableField = 'PAGINA_WEB'
end
item
DatasetField = 'REGISTRO_MERCANTIL'
TableField = 'REGISTRO_MERCANTIL'
end>
end>
Name = 'InformeComisionesDesglosado'
Fields = <
item
Name = 'FECHA_COMISION'
DataType = datDateTime
end
item
Name = 'REFERENCIA_COMISION'
DataType = datString
Size = 255
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'NIF_CIF_EMPRESA'
DataType = datString
Size = 15
end
item
Name = 'RAZON_SOCIAL'
DataType = datString
Size = 255
end
item
Name = 'CALLE_EMPRESA'
DataType = datString
Size = 255
end
item
Name = 'POBLACION_EMPRESA'
DataType = datString
Size = 255
end
item
Name = 'PROVINCIA_EMPRESA'
DataType = datString
Size = 255
end
item
Name = 'CODIGO_POSTAL_EMPRESA'
DataType = datString
Size = 10
end
item
Name = 'TELEFONO_1'
DataType = datString
Size = 25
end
item
Name = 'FAX'
DataType = datString
Size = 25
end
item
Name = 'MOVIL_1'
DataType = datString
Size = 25
end
item
Name = 'EMAIL_1'
DataType = datString
Size = 255
end
item
Name = 'PAGINA_WEB'
DataType = datString
Size = 255
end
item
Name = 'REGISTRO_MERCANTIL'
DataType = datString
Size = 255
end
item
Name = 'ID_AGENTE'
DataType = datInteger
end
item
Name = 'AGENTE'
DataType = datString
Size = 255
end
item
Name = 'ID_FACTURA'
DataType = datInteger
end
item
Name = 'ID_COMISION_LIQUIDADA'
DataType = datInteger
end
item
Name = 'FECHA'
DataType = datDateTime
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 19
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
end
item
Name = 'CLIENTE'
DataType = datString
Size = 255
end
item
Name = 'ID_PROVEEDOR'
DataType = datInteger
end
item
Name = 'PROVEEDOR'
DataType = datString
Size = 255
end
item
Name = 'COMISION'
DataType = datFloat
end
item
Name = 'IMPORTE_COMISIONABLE'
DataType = datCurrency
end
item
Name = 'IMPORTE_COMISION'
DataType = datFloat
end>
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <>
RelationShips = <>
UpdateRules = <>
Version = 0
Left = 48
Top = 16
end
object DataDictionary: TDADataDictionary
Fields = <
item
Name = 'FacturasCliente_ID'
DataType = datAutoInc
Required = True
DisplayLabel = 'ID'
end
item
Name = 'FacturasCliente_ID_EMPRESA'
DataType = datInteger
DisplayLabel = 'ID_EMPRESA'
end
item
Name = 'FacturasCliente_ID_CONTRATO'
DataType = datInteger
DisplayLabel = 'ID_CONTRATO'
end
item
Name = 'FacturasCliente_FECHA_FACTURA'
DataType = datDateTime
DisplayLabel = 'Fecha de las factura'
end
item
Name = 'FacturasCliente_VENCIMIENTO'
DataType = datInteger
DisplayLabel = 'Vencimiento'
end
item
Name = 'FacturasCliente_SITUACION'
DataType = datString
Size = 255
DisplayLabel = 'Situaci'#243'n'
end
item
Name = 'FacturasCliente_BASE_IMPONIBLE'
DataType = datFloat
DisplayLabel = 'Base imponible'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Importe dto.'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_IVA'
DataType = datFloat
DisplayLabel = 'Importe IVA'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_TOTAL'
DataType = datFloat
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_FORMA_PAGO'
DataType = datMemo
DisplayLabel = 'Forma de pago'
end
item
Name = 'FacturasCliente_ID_CLIENTE'
DataType = datInteger
DisplayLabel = 'ID_CLIENTE'
end
item
Name = 'FacturasCliente_NIF_CIF'
DataType = datString
Size = 15
DisplayLabel = 'NIF/CIF'
end
item
Name = 'FacturasCliente_CODIGO_POSTAL'
DataType = datString
Size = 10
DisplayLabel = 'C'#243'd. postal'
end
item
Name = 'FacturasCliente_FECHA_ALTA'
DataType = datDateTime
DisplayLabel = 'FECHA_ALTA'
end
item
Name = 'FacturasCliente_FECHA_MODIFICACION'
DataType = datDateTime
DisplayLabel = 'FECHA_MODIFICACION'
end
item
Name = 'FacturasCliente_OBSERVACIONES'
DataType = datMemo
DisplayLabel = 'Observaciones'
end
item
Name = 'FacturasCliente_NOMBRE'
DataType = datString
Size = 100
DisplayLabel = 'Cliente'
end
item
Name = 'FacturasCliente_CALLE'
DataType = datString
Size = 150
DisplayLabel = 'Direcci'#243'n'
end
item
Name = 'FacturasCliente_PROVINCIA'
DataType = datString
Size = 30
DisplayLabel = 'Provincia'
end
item
Name = 'FacturasCliente_POBLACION'
DataType = datString
Size = 150
DisplayLabel = 'Poblaci'#243'n'
end
item
Name = 'FacturasCliente_IVA'
DataType = datFloat
DisplayLabel = 'IVA'
end
item
Name = 'FacturasCliente_USUARIO'
DataType = datString
Size = 100
DisplayLabel = 'USUARIO'
end
item
Name = 'FacturasCliente_REFERENCIA'
DataType = datString
Size = 20
DisplayLabel = 'Referencia'
end
item
Name = 'FacturasCliente_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Dto.'
end
item
Name = 'FacturasCliente_Detalles_ID'
DataType = datAutoInc
Required = True
DisplayLabel = 'ID'
end
item
Name = 'FacturasCliente_Detalles_ID_FACTURA'
DataType = datInteger
DisplayLabel = 'ID_FACTURA'
end
item
Name = 'FacturasCliente_Detalles_TIPO_DETALLE'
DataType = datString
Size = 10
DisplayLabel = 'Tipo detalle'
end
item
Name = 'FacturasCliente_Detalles_CONCEPTO'
DataType = datString
Size = 2000
DisplayLabel = 'Concepto'
end
item
Name = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
DataType = datFloat
DisplayLabel = 'Importe unidad'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
DataType = datFloat
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_Detalles_VISIBLE'
DataType = datInteger
DisplayLabel = #191'Visible?'
end
item
Name = 'FacturasCliente_Detalles_POSICION'
DataType = datInteger
DisplayLabel = 'Posici'#243'n'
end
item
Name = 'FacturasCliente_Detalles_CANTIDAD'
DataType = datInteger
DisplayLabel = 'Cantidad'
end>
Left = 46
Top = 158
end
object frxReport: TfrxReport
Version = '4.7.71'
DotMatrixReport = False
EngineOptions.DoublePass = True
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
PreviewOptions.OutlineWidth = 180
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 37871.995398692100000000
ReportOptions.LastChange = 39266.688905347220000000
ReportOptions.VersionBuild = '1'
ReportOptions.VersionMajor = '12'
ReportOptions.VersionMinor = '13'
ReportOptions.VersionRelease = '1'
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
'var'
' Cadena: String;'
'begin'
' DatosEmpresa.Lines.Clear;'
' DatosEmpresa.Lines.Add(<frxDBCabecera."RAZON_SOCIAL">);'
' DatosEmpresa.Lines.Add(<frxDBCabecera."CALLE_EMPRESA">);'
''
' Cadena := '#39#39';'
' if (<frxDBCabecera."TELEFONO_1"> <> '#39#39') then'
' Cadena := '#39'TLF: '#39' + <frxDBCabecera."TELEFONO_1">;'
' if (<frxDBCabecera."FAX"> <> '#39#39') then'
' Cadena := Cadena + '#39' FAX: '#39' + <frxDBCabecera."FAX">;'
' DatosEmpresa.Lines.Add(Cadena);'
''
' Cadena := '#39#39';'
' if (<frxDBCabecera."CODIGO_POSTAL_EMPRESA"> <> '#39#39') then'
' Cadena := <frxDBCabecera."CODIGO_POSTAL_EMPRESA">;'
' if (<frxDBCabecera."POBLACION_EMPRESA"> <> '#39#39') then'
' Cadena := Cadena + '#39' '#39' + <frxDBCabecera."POBLACION_EMPRES' +
'A">;'
' if (<frxDBCabecera."PROVINCIA_EMPRESA"> <> '#39#39') then'
' Cadena := Cadena + '#39' - '#39' + <frxDBCabecera."PROVINCIA_EMPR' +
'ESA">;'
' DatosEmpresa.Lines.Add(Cadena);'
'end;'
''
'procedure Memo26OnBeforePrint(Sender: TfrxComponent);'
'begin'
' if (<FechaIni> <> '#39#39') then'
' Memo31.Visible := True'
' else'
' Memo31.Visible := False;'
'end;'
''
'BEGIN'
''
'END.')
ShowProgress = False
StoreInDFM = False
Left = 169
Top = 16
end
object frxDBCabecera: TfrxDBDataset
UserName = 'frxDBCabecera'
CloseDataSource = False
DataSource = DADataCabecera
BCDToCurrency = False
Left = 264
Top = 16
end
object Bin2DataStreamer: TDABin2DataStreamer
Left = 48
Top = 88
end
end

View File

@ -0,0 +1,146 @@
unit uRptComisiones_Server;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
uDAInterfaces, uDADataStreamer, uDABin2DataStreamer;
type
TRptComisiones = class(TDataModule)
DADataCabecera: TDADataSource;
tbl_Comisiones: TDACDSDataTable;
frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject;
frxOLEObject1: TfrxOLEObject;
frxCrossObject1: TfrxCrossObject;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxGradientObject1: TfrxGradientObject;
frxChartObject1: TfrxChartObject;
frxDBCabecera: TfrxDBDataset;
frxReport: TfrxReport;
Bin2DataStreamer: TDABin2DataStreamer;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;
public
function GenerarComision(const AComisionID : Variant; const DesglosadoProv: Boolean; FechaIni: String; FechaFin: String; AAgenteID: Variant): Binary;
end;
implementation
{$R *.dfm}
uses
uSistemaFunc, uDataModuleServer, schComisionesClient_Intf;
const
rptComision = 'InfComisiones.fr3';
rptComisionDesglosado = 'InfComisionesDesglosado.fr3';
{ Dataset names for schReport }
ds_InformeComisiones = 'InformeComisiones';
ds_InformeComisionesDesglosado = 'InformeComisionesDesglosado';
{ TRptComision }
procedure TRptComisiones.DataModuleCreate(Sender: TObject);
begin
schReport.ConnectionManager := dmServer.ConnectionManager;
FConnection := dmServer.DarNuevaConexion;
frxReport.EngineOptions.NewSilentMode := simReThrow;
end;
function TRptComisiones.GenerarComision(const AComisionID : Variant; const DesglosadoProv: Boolean; FechaIni: String; FechaFin: String; AAgenteID: Variant): Binary;
var
dsMaster: IDADataset;
AStream: TMemoryStream;
AInforme: Variant;
Condicion: TDAWhereExpression;
begin
AStream := TMemoryStream.Create;
Result := Binary.Create;
FConnection.BeginTransaction;
try
if DesglosadoProv then
dsMaster := schReport.NewDataset(FConnection, ds_InformeComisionesDesglosado,[], [], False)
else
dsMaster := schReport.NewDataset(FConnection, ds_InformeComisiones,[], [], False);
// Filtrar las facturas actuales por empresa
with dsMaster.DynamicWhere do
begin
if not VarIsNull(AComisionID) then
begin
Condicion := NewBinaryExpression(NewField('', fld_Facturas_ComisionID_COMISION_LIQUIDADA), NewConstant(VarToStr(AComisionID), datString), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
if not VarIsNull(AAgenteID) then
begin
Condicion := NewBinaryExpression(NewField('', fld_Facturas_ComisionID_AGENTE), NewConstant(VarToStr(AAgenteID), datString), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
if (Length(FechaIni) > 0)
and (Length(FechaFin) > 0) then
begin
// (FECHA_INICIO between FECHA_FIN)
Condicion := NewBinaryExpression(NewField('', fld_Facturas_ComisionFecha), NewConstant(FechaIni, datString), dboGreaterOrEqual);
Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_Facturas_ComisionFecha), NewConstant(FechaFin, datString), dboLessOrEqual), Condicion, dboAnd);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Expression, Condicion, dboAnd);
end;
end;
dsMaster.Open;
AStream.Clear;
Bin2DataStreamer.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
Bin2DataStreamer.ReadDataset(AStream, tbl_Comisiones, TRUE, '', TRUE, TRUE);
if DesglosadoProv then
begin
AInforme := DarRutaFichero(DarRutaInformes, rptComisionDesglosado, tbl_Comisiones.FieldByName('ID_EMPRESA').AsString);
if VarIsNull(AInforme) then
raise Exception.Create (('Error Servidor: _GenerarComision, no encuentra informe ' + rptComisionDesglosado));
frxReport.LoadFromFile(AInforme, True);
end
else
begin
AInforme := DarRutaFichero(DarRutaInformes, rptComision, tbl_Comisiones.FieldByName('ID_EMPRESA').AsString);
if VarIsNull(AInforme) then
raise Exception.Create (('Error Servidor: _GenerarComision, no encuentra informe ' + rptComision));
frxReport.LoadFromFile(AInforme, True);
end;
frxReport.Variables['FechaIni'] := QuotedStr(FechaIni);
frxReport.Variables['FechaFin'] := QuotedStr(FechaFin);
frxReport.PrepareReport;
frxReport.PreviewPages.SaveToStream(Result);
finally
AStream.Free;
dsMaster := Nil;
FConnection.RollbackTransaction;
end;
end;
end.

View File

@ -77,12 +77,7 @@ object srvComisiones: TsrvComisiones
Diagrams = Diagrams
Datasets = <
item
Params = <
item
Name = 'ID_COMISION'
Value = ''
ParamType = daptInput
end>
Params = <>
Statements = <
item
Connection = 'IBX'
@ -104,9 +99,8 @@ object srvComisiones: TsrvComisiones
'V_AGENTES_COMISIONES_DET_FAC.ID_AGENTE)'#10'LEFT JOIN CONTACTOS CONT' +
'ACTOS2 ON (CONTACTOS2.ID = V_AGENTES_COMISIONES_DET_FAC.ID_CLIEN' +
'TE)'#10'LEFT JOIN CONTACTOS CONTACTOS3 ON (CONTACTOS3.ID = V_AGENTES' +
'_COMISIONES_DET_FAC.ID_PROVEEDOR)'#10'WHERE V_AGENTES_COMISIONES_DET' +
'_FAC.ID_COMISION_LIQUIDADA = :ID_COMISION'#10'GROUP BY 1, 2, 3, 4, 5' +
', 6, 7, 8, 9, 10, 11, 12, 13'
'_COMISIONES_DET_FAC.ID_PROVEEDOR)'#10' WHERE {Where}'#10'GROUP BY 1, 2,' +
' 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13'#10
StatementType = stSQL
ColumnMappings = <
item
@ -249,7 +243,7 @@ object srvComisiones: TsrvComisiones
end
item
Name = 'IMPORTE_COMISION'
DataType = datCurrency
DataType = datFloat
DictionaryEntry = 'Facturas_Comision_IMPORTE_COMISION'
end>
end
@ -350,6 +344,7 @@ object srvComisiones: TsrvComisiones
Name = 'NOMBRE'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'Comisiones_NOMBRE'
end>
end
@ -376,8 +371,8 @@ object srvComisiones: TsrvComisiones
' V_AGENTES_COMISIONES_DET_FAC.ID_AGENTE)'#10'LEFT JOIN CONTACTOS CON' +
'TACTOS2 ON (CONTACTOS2.ID = V_AGENTES_COMISIONES_DET_FAC.ID_CLIE' +
'NTE)'#10'LEFT JOIN CONTACTOS CONTACTOS3 ON (CONTACTOS3.ID = V_AGENTE' +
'S_COMISIONES_DET_FAC.ID_PROVEEDOR)'#10'GROUP BY 1, 2, 3, 4, 5, 6, 7,' +
' 8, 9, 10, 11, 12, 13'
'S_COMISIONES_DET_FAC.ID_PROVEEDOR)'#10'where {where}'#10'GROUP BY 1, 2, ' +
'3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13'#10
StatementType = stSQL
ColumnMappings = <
item
@ -519,7 +514,7 @@ object srvComisiones: TsrvComisiones
end
item
Name = 'IMPORTE_COMISION'
DataType = datCurrency
DataType = datFloat
DictionaryEntry = 'V_Detalles_Facturas_Comision_IMPORTE_COMISION'
end>
end>
@ -754,7 +749,15 @@ object srvComisiones: TsrvComisiones
end>
Name = 'Update_Comisiones'
end>
RelationShips = <>
RelationShips = <
item
Name = 'FK_Comision_Facturas'
MasterDatasetName = 'Comisiones'
MasterFields = 'ID'
DetailDatasetName = 'Facturas_Comision'
DetailFields = 'ID_COMISION_LIQUIDADA'
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Insert Comisiones'
@ -819,7 +822,7 @@ object srvComisiones: TsrvComisiones
DeleteCommandName = 'Delete_Comisiones'
UpdateCommandName = 'Update_Comisiones'
ReferencedDataset = 'Comisiones'
ProcessorOptions = [poPrepareCommands]
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 248
Top = 24

View File

@ -38,8 +38,9 @@ implementation
{$R *.dfm}
uses
{Generated:} FactuGES_Invk, uDataModuleServer,
uDatabaseUtils, schComisionesClient_Intf, uRestriccionesUsuarioUtils;
{Generated:} FactuGES_Invk, uDataModuleServer,
uDatabaseUtils, schComisionesClient_Intf, uRestriccionesUsuarioUtils,
uBizComisionesServer, uRptComisiones_Server;
procedure Create_srvComisiones(out anInstance : IUnknown);
begin
@ -50,6 +51,8 @@ end;
procedure TsrvComisiones.DARemoteServiceCreate(Sender: TObject);
begin
//SessionManager := dmServer.SessionManager;
//SessionManager := dmServer.SessionManager;
bpComisiones.BusinessRulesID := BIZ_SERVER_COMISIONES;
end;
procedure TsrvComisiones.DataAbstractServiceBeforeAcquireConnection(
@ -61,16 +64,15 @@ end;
function TsrvComisiones.GenerateReport(const AComisionID: Variant;
const DesglosadoProv: Boolean; const FechaIni, FechaFin: String;
const AAgenteID: Variant): Binary;
//var
// AReportGenerator : TRptComisiones;
var
AReportGenerator : TRptComisiones;
begin
{ AReportGenerator := TRptComisiones.Create(nil);
AReportGenerator := TRptComisiones.Create(nil);
try
Result := AReportGenerator.GenerarComision(AComisionID, DesglosadoProv, FechaIni, FechaFin, AAgenteID);
finally
FreeAndNIL(AReportGenerator);
end;
}
end;
initialization

View File

@ -29,11 +29,62 @@ requires
Contactos_controller,
Contactos_model,
GUIBase,
ApplicationBase;
ApplicationBase,
rtl,
vcl,
dbrtl,
vcldb,
PngComponentsD10,
PNG_D10,
vclactnband,
vclx,
cxLibraryD11,
dxThemeD11,
dxGDIPlusD11,
dxCoreD11,
cxEditorsD11,
cxDataD11,
vcljpg,
DataAbstract_Core_D11,
dsnap,
adortl,
RemObjects_Core_D11,
GUISDK_D11R,
designide,
xmlrtl,
dxLayoutControlD11,
dxComnD11,
JvCoreD11R,
JclVcl,
Jcl,
JvAppFrmD11R,
JvCtrlsD11R,
JvSystemD11R,
JvStdCtrlsD11R,
cxGridD11,
cxPageControlD11,
cxExtEditorsD11,
cxExportD11,
tb2k_d10,
tbx_d10,
JvPageCompsD11R,
frx11,
fs11,
fqb110,
bdertl,
frxe11,
frxTee11,
fsTee11,
tee,
teeUI;
contains
uComisionesViewRegister in 'uComisionesViewRegister.pas',
uViewComisiones in 'uViewComisiones.pas' {frViewComisiones: TFrame},
uEditorComisiones in 'uEditorComisiones.pas' {fEditorComisiones: TfEditorComisiones};
uEditorComisiones in 'uEditorComisiones.pas' {fEditorComisiones: TfEditorComisiones},
uViewComision in 'uViewComision.pas' {frViewComision: TFrame},
uViewFacturasComision in 'uViewFacturasComision.pas' {frViewFacturasComision: TFrame},
uEditorComision in 'uEditorComision.pas' {fEditorComision: TfEditorComision},
uEditorComisionesReport in 'uEditorComisionesReport.pas' {fEditorComisionesReport: TfEditorComisionesReport};
end.

View File

@ -31,70 +31,92 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<BorlandProject> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Package_Options>
<Package_Options Name="ImplicitBuild">False</Package_Options>
<Package_Options Name="DesigntimeOnly">False</Package_Options>
<Package_Options Name="RuntimeOnly">False</Package_Options>
</Package_Options>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">3082</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">Comisiones_view.dpk</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">False</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">Comisiones_view.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>
<DelphiCompile Include="Comisiones_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\Plugin\ApplicationBase.dcp" />
<DCCReference Include="..\Plugin\Comisiones_controller.dcp" />
<DCCReference Include="..\Plugin\Contactos_controller.dcp" />
<DCCReference Include="..\Plugin\Contactos_model.dcp" />
<DCCReference Include="..\Plugin\GUIBase.dcp" />
<DCCReference Include="adortl.dcp" />
<DCCReference Include="ApplicationBase.dcp" />
<DCCReference Include="bdertl.dcp" />
<DCCReference Include="Comisiones_controller.dcp" />
<DCCReference Include="Contactos_controller.dcp" />
<DCCReference Include="Contactos_model.dcp" />
<DCCReference Include="cxDataD11.dcp" />
<DCCReference Include="cxEditorsD11.dcp" />
<DCCReference Include="cxExportD11.dcp" />
<DCCReference Include="cxExtEditorsD11.dcp" />
<DCCReference Include="cxGridD11.dcp" />
<DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="cxPageControlD11.dcp" />
<DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="dbrtl.dcp" />
<DCCReference Include="designide.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxCoreD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="dxLayoutControlD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="fqb110.dcp" />
<DCCReference Include="frx11.dcp" />
<DCCReference Include="frxe11.dcp" />
<DCCReference Include="frxTee11.dcp" />
<DCCReference Include="fs11.dcp" />
<DCCReference Include="fsTee11.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="GUISDK_D11R.dcp" />
<DCCReference Include="Jcl.dcp" />
<DCCReference Include="JclVcl.dcp" />
<DCCReference Include="JvAppFrmD11R.dcp" />
<DCCReference Include="JvCoreD11R.dcp" />
<DCCReference Include="JvCtrlsD11R.dcp" />
<DCCReference Include="JvPageCompsD11R.dcp" />
<DCCReference Include="JvStdCtrlsD11R.dcp" />
<DCCReference Include="JvSystemD11R.dcp" />
<DCCReference Include="PngComponentsD10.dcp" />
<DCCReference Include="PNG_D10.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="tb2k_d10.dcp" />
<DCCReference Include="tbx_d10.dcp" />
<DCCReference Include="tee.dcp" />
<DCCReference Include="teeUI.dcp" />
<DCCReference Include="uComisionesViewRegister.pas" />
<DCCReference Include="uEditorComision.pas">
<Form>fEditorComision</Form>
<DesignClass>TfEditorComisiones</DesignClass>
</DCCReference>
<DCCReference Include="uEditorComisiones.pas">
<Form>fEditorComisiones</Form>
<DesignClass>TfEditorComisiones</DesignClass>
</DCCReference>
<DCCReference Include="uEditorComisionesReport.pas">
<Form>fEditorComisionesRepor</Form>
<DesignClass>TfEditorComisiones</DesignClass>
</DCCReference>
<DCCReference Include="uViewComision.pas">
<Form>frViewComision</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewComisiones.pas">
<Form>frViewComisiones</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="uViewFacturasComision.pas">
<Form>frViewFacturasComision</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vclactnband.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
<DCCReference Include="vclx.dcp" />
<DCCReference Include="xmlrtl.dcp" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line
[Exception Log]
EurekaLog Version=6011

View File

@ -9,22 +9,22 @@ implementation
uses
uEditorRegistryUtils,
// uEditorComisionesReport,
// uEditorComision,
uEditorComisionesReport,
uEditorComision,
uEditorComisiones;
procedure RegisterViews;
begin
EditorRegistry.RegisterClass(TfEditorComisiones, 'EditorComisiones');
// EditorRegistry.RegisterClass(TfEditorComision, 'EditorComision');
// EditorRegistry.RegisterClass(TfEditorComisionesPreview, 'EditorComisionesPreview');
EditorRegistry.RegisterClass(TfEditorComision, 'EditorComision');
EditorRegistry.RegisterClass(TfEditorComisionesPreview, 'EditorComisionesPreview');
end;
procedure UnregisterViews;
begin
EditorRegistry.UnRegisterClass(TfEditorComisiones);
// EditorRegistry.UnRegisterClass(TfEditorComision);
// EditorRegistry.UnRegisterClass(TfEditorComisionesPreview);
EditorRegistry.UnRegisterClass(TfEditorComision);
EditorRegistry.UnRegisterClass(TfEditorComisionesPreview);
end;
end.

View File

@ -17,7 +17,7 @@ inherited fEditorComision: TfEditorComision
Caption = 'Liquidaci'#243'n de comisiones'
ExplicitWidth = 611
inherited Image1: TImage
Left = 584
Left = 478
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2
@ -57,6 +57,12 @@ inherited fEditorComision: TfEditorComision
4FB2402F1C4138F79E0000000049454E44AE426082}
ExplicitLeft = 607
end
inherited lblDesbloquear: TcxLabel
Left = 513
ExplicitLeft = 513
AnchorX = 558
AnchorY = 14
end
end
inherited TBXDock: TTBXDock
Width = 611
@ -114,20 +120,20 @@ inherited fEditorComision: TfEditorComision
end
end
inherited pgPaginas: TPageControl
Width = 611
Height = 403
Width = 605
Height = 397
MultiLine = True
ExplicitWidth = 611
ExplicitHeight = 403
ExplicitWidth = 605
ExplicitHeight = 397
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 603
ExplicitHeight = 375
ExplicitWidth = 597
ExplicitHeight = 369
inline frViewComision1: TfrViewComision
Left = 0
Top = 0
Width = 603
Width = 597
Height = 127
Align = alTop
Font.Charset = DEFAULT_CHARSET
@ -138,15 +144,15 @@ inherited fEditorComision: TfEditorComision
ParentFont = False
TabOrder = 0
ReadOnly = False
ExplicitWidth = 603
ExplicitWidth = 597
ExplicitHeight = 127
inherited dxLayoutControlComision: TdxLayoutControl
Width = 603
Width = 597
Height = 127
ExplicitWidth = 603
ExplicitWidth = 597
ExplicitHeight = 127
DesignSize = (
603
597
127)
inherited eReferencia: TcxDBTextEdit
ExplicitWidth = 164
@ -157,8 +163,8 @@ inherited fEditorComision: TfEditorComision
Width = 108
end
inherited edtFecha: TcxDBDateEdit
Left = 355
ExplicitLeft = 355
Left = 351
ExplicitLeft = 351
ExplicitWidth = 170
Width = 170
end
@ -171,11 +177,12 @@ inherited fEditorComision: TfEditorComision
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 127
Width = 603
Height = 248
Width = 597
Height = 242
Align = alClient
ParentBackground = True
TabOrder = 1
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
LookAndFeel = frViewComision1.dxLayoutOfficeLookAndFeel1
inline frViewFacturasComision1: TfrViewFacturasComision
@ -210,17 +217,31 @@ inherited fEditorComision: TfEditorComision
Kind = skSum
Column = frViewFacturasComision1.cxGridViewIMPORTE_COMISION
end>
DataController.Summary.OnAfterSummary = frViewFacturasComision1cxGridViewDataControllerSummaryAfterSummary
inherited cxGridViewID: TcxGridDBColumn
IsCaptionAssigned = True
end
end
end
inherited ToolBar1: TToolBar
Width = 607
ExplicitWidth = 607
inherited ToolButton1: TToolButton
ExplicitWidth = 113
end
inherited ToolButton4: TToolButton
ExplicitWidth = 113
end
inherited ToolButton2: TToolButton
ExplicitWidth = 113
end
inherited ToolButton7: TToolButton
ExplicitWidth = 113
end
inherited ToolButton3: TToolButton
ExplicitWidth = 98
ExplicitWidth = 113
end
inherited ToolButton8: TToolButton
ExplicitWidth = 99
ExplicitWidth = 113
end
end
end
@ -275,148 +296,242 @@ inherited fEditorComision: TfEditorComision
ExplicitHeight = 46
inherited dxLayoutControl1: TdxLayoutControl
Width = 611
Height = 46
ExplicitWidth = 611
inherited Bevel1: TBevel
Left = 92
Top = 91
Width = 73
ExplicitLeft = 92
ExplicitTop = 91
ExplicitWidth = 73
end
ExplicitHeight = 46
inherited Bevel3: TBevel
Left = 305
Left = 345
Top = 10
Height = 30
ExplicitLeft = 305
ExplicitLeft = 345
ExplicitTop = 10
ExplicitHeight = 30
end
inherited Bevel4: TBevel
Left = 417
Top = 91
Left = 457
Top = 52
Width = 192
ExplicitLeft = 417
ExplicitTop = 91
ExplicitLeft = 457
ExplicitTop = 52
ExplicitWidth = 192
end
inherited Bevel1: TBevel
Left = 457
Top = 168
Width = 73
ExplicitLeft = 457
ExplicitTop = 168
ExplicitWidth = 73
end
inherited Bevel2: TBevel
Left = 119
Top = 170
Width = 368
ExplicitLeft = 119
ExplicitTop = 170
ExplicitWidth = 368
end
inherited ImporteDto: TcxDBCurrencyEdit
Left = 163
Top = 111
Left = 190
Top = 37
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 163
ExplicitTop = 111
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 190
ExplicitTop = 37
ExplicitWidth = 93
Width = 93
end
inherited ImporteIVA: TcxDBCurrencyEdit
Left = 488
Top = 37
Left = 528
Top = 87
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 488
ExplicitTop = 37
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 528
ExplicitTop = 87
ExplicitWidth = 137
Width = 137
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 418
Top = 111
Left = 458
Top = 141
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 418
ExplicitTop = 111
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 458
ExplicitTop = 141
ExplicitWidth = 137
Width = 137
end
inherited edtDescuento: TcxDBSpinEdit
Left = 92
Top = 111
DataBinding.DataField = ''
Style.IsFontAssigned = True
ExplicitLeft = 92
ExplicitTop = 111
end
inherited edtIVA: TcxDBSpinEdit
Left = 417
Left = 119
Top = 37
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 417
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 119
ExplicitTop = 37
end
inherited edtIVA: TcxDBSpinEdit
Left = 457
Top = 87
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 457
ExplicitTop = 87
end
inherited ImporteBase: TcxDBCurrencyEdit
Left = 417
Left = 457
Top = 10
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 417
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 457
ExplicitTop = 10
ExplicitWidth = 92
Width = 92
end
inherited edtRE: TcxDBSpinEdit
Left = 417
Top = 64
Left = 457
Top = 114
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 417
ExplicitTop = 64
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 457
ExplicitTop = 114
end
inherited ImporteRE: TcxDBCurrencyEdit
Left = 488
Top = 64
Left = 528
Top = 114
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 488
ExplicitTop = 64
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 528
ExplicitTop = 114
ExplicitWidth = 56
Width = 56
end
inherited eImporteNeto: TcxDBCurrencyEdit
Left = 92
Left = 119
Top = 10
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 92
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 119
ExplicitTop = 10
ExplicitWidth = 147
Width = 147
end
inherited ePorte: TcxDBCurrencyEdit
Left = 92
Top = 138
Left = 119
Top = 64
DataBinding.DataField = ''
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
ExplicitLeft = 92
ExplicitTop = 138
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 119
ExplicitTop = 64
ExplicitWidth = 147
Width = 147
end
inherited eIVA: TcxDBLookupComboBox
Left = 92
Top = 37
Left = 119
Top = 91
DataBinding.DataField = ''
ExplicitLeft = 92
ExplicitTop = 37
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 119
ExplicitTop = 91
ExplicitWidth = 81
Width = 81
end
inherited bTiposIVA: TButton
Left = 157
Top = 37
ExplicitLeft = 157
ExplicitTop = 37
Left = 197
Top = 91
ExplicitLeft = 197
ExplicitTop = 91
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
Left = 92
Top = 64
Left = 119
Top = 118
DataBinding.DataField = ''
ExplicitLeft = 92
ExplicitTop = 64
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 119
ExplicitTop = 118
ExplicitWidth = 219
Width = 219
end
inherited edtRetencion: TcxDBSpinEdit
Left = 457
Top = 188
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 457
ExplicitTop = 188
end
inherited edtImporteRetencion: TcxDBCurrencyEdit
Left = 528
Top = 188
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 528
ExplicitTop = 188
ExplicitWidth = 180
Width = 180
end
inherited edtFechaRetencion: TcxDBDateEdit
Left = 119
Top = 190
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 119
ExplicitTop = 190
ExplicitWidth = 280
Width = 280
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup
ShowCaption = False
@ -432,15 +547,15 @@ inherited fEditorComision: TfEditorComision
inherited dxLayoutControl1Item12: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item14: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Group9: TdxLayoutGroup
Visible = False
end
inherited dxLayoutControl1Group8: TdxLayoutGroup
Visible = False
end
inherited dxLayoutControl1Item14: TdxLayoutItem
Visible = False
end
end
end
end

View File

@ -15,7 +15,7 @@ uses
uIEditorComision, uComisionesController, JvExComCtrls,
JvStatusBar, dxLayoutLookAndFeels, uViewGridBase, uViewGrid,
uViewDetallesGenerico, uViewFacturasComision, dxLayoutControl, cxControls,
uViewTotales;
uViewTotales, uDAInterfaces, cxContainer, cxEdit, cxLabel;
type
TfEditorComision = class(TfEditorDBItem, IEditorComision)
@ -36,8 +36,7 @@ type
procedure JvFormStorageRestorePlacement(Sender: TObject);
procedure JvFormStorageSavePlacement(Sender: TObject);
procedure dsDataTableDataChange(Sender: TObject; Field: TField);
procedure frViewFacturasComision1cxGridViewDataControllerSummaryAfterSummary(
ASender: TcxDataSummary);
procedure OnFacturasComisionSummaryAfterSummary(ASender: TcxDataSummary);
protected
FController : IComisionesController;
FComision: IBizComisiones;
@ -72,7 +71,7 @@ implementation
uses
uDataTableUtils, uDataModuleUsuarios, uDialogUtils, uCustomEditor,
uDataModuleBase;
uDataModuleBase, uFactuGES_App;
{
******************************* TfEditorComision *******************************
@ -167,7 +166,7 @@ begin
inherited PonerTitulos(FTitulo);
Self.Caption := FTitulo + ' (' + dmUsuarios.EmpresaActual.NOMBRE + ')';
Self.Caption := FTitulo + ' (' + AppFactuGES.EmpresaActiva.NOMBRE + ')';
end;
procedure TfEditorComision.PrevisualizarInterno;
@ -232,9 +231,11 @@ begin
raise Exception.Create('No hay ningún almacén asignado');
Comision.DataTable.Active := True;
frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := OnFacturasComisionSummaryAfterSummary;
end;
procedure TfEditorComision.frViewFacturasComision1cxGridViewDataControllerSummaryAfterSummary(ASender: TcxDataSummary);
procedure TfEditorComision.OnFacturasComisionSummaryAfterSummary(ASender: TcxDataSummary);
Var
AImporteTotal: Variant;
begin
@ -288,6 +289,7 @@ procedure TfEditorComision.CustomEditorClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
frViewFacturasComision1.cxGridView.DataController.Summary.OnAfterSummary := Nil;
dsDataTable.DataTable := NIL;
FViewComision := NIL;
FComision := NIL;

View File

@ -1,11 +1,10 @@
inherited fEditorComisionesPreview: TfEditorComisionesPreview
Caption = 'Previsualizar la factura'
ExplicitWidth = 803
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
inherited Image1: TImage
Left = 768
ExplicitLeft = 768
end
end
object pnlFiltrar: TTBXDockablePanel [3]
@ -23,6 +22,7 @@ inherited fEditorComisionesPreview: TfEditorComisionesPreview
ShowCaptionWhenDocked = False
SupportedDocks = [dkStandardDock, dkMultiDock]
TabOrder = 3
Visible = False
object Label1: TLabel
Left = 261
Top = 50
@ -149,11 +149,6 @@ inherited fEditorComisionesPreview: TfEditorComisionesPreview
Left = 59
Top = 88
end
inherited frxReport1: TfrxReport
Datasets = <>
Variables = <>
Style = <>
end
object dsAgentes: TDADataSource
Left = 144
Top = 96

View File

@ -13,7 +13,8 @@ uses
JvExComCtrls, JvStatusBar, StdCtrls, Buttons, cxRadioGroup, cxMaskEdit,
cxDropDownEdit, cxCalendar, cxControls, cxContainer, cxEdit, cxTextEdit,
TBXDkPanels, cxGraphics, DB, uDADataTable, cxLookupEdit, cxDBLookupEdit,
cxDBLookupComboBox, uIDataModuleComisionesReport;
cxDBLookupComboBox, uIDataModuleComisionesReport, uDAInterfaces,
frxExportText, frxExportRTF, frxExportMail, frxExportXLS;
type
TfEditorComisionesPreview = class(TfEditorPreview, IEditorComisionesPreview)

View File

@ -1,7 +1,8 @@
inherited frViewComision: TfrViewComision
Width = 451
Height = 130
Height = 304
Align = alClient
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
OnShow = CustomViewShow
ExplicitWidth = 451
@ -10,16 +11,16 @@ inherited frViewComision: TfrViewComision
Left = 0
Top = 0
Width = 451
Height = 130
Height = 304
Align = alClient
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth]
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitHeight = 304
DesignSize = (
451
130)
304)
object eReferencia: TcxDBTextEdit
Left = 85
Top = 30

View File

@ -10,8 +10,9 @@ uses
cxDBEdit, dxLayoutControl, cxCheckBox, PngSpeedButton, cxImage, ActnList,
ImgList, PngImageList, cxGraphics, cxMaskEdit, cxDropDownEdit,
uComisionesController, cxSpinEdit, cxCurrencyEdit,
uBizComisiones, cxCalendar,
dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox;
uBizComisiones, cxCalendar, uAgentesController, uBizContactos,
dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox,
uDAInterfaces;
type
IViewComision = interface(IViewBase)
@ -34,9 +35,13 @@ type
dsAgentes: TDADataSource;
procedure CustomViewShow(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure CustomViewCreate(Sender: TObject);
protected
FComision: IBizComisiones;
FAgentes: IBizContacto;
FAgentesController: IAgentesController;
function GetComision: IBizComisiones;
procedure SetComision(const Value: IBizComisiones); virtual;
public
@ -48,7 +53,7 @@ implementation
{$R *.dfm}
uses
uDataModuleUsuarios, uAgentesController, uBizContactos;
uDataModuleUsuarios;
{ TfrViewComisions }
@ -57,27 +62,28 @@ uses
******************************* TfrViewComisions ********************************
}
procedure TfrViewComision.CustomViewCreate(Sender: TObject);
begin
inherited;
FAgentesController := TAgentesController.Create;
FAgentes := NIL;
// FAgentes := FAgentesController.BuscarTodos;
end;
procedure TfrViewComision.CustomViewDestroy(Sender: TObject);
begin
FAgentesController := NIL;
FAgentes := NIL;
dsAgentes.DataTable := Nil;
inherited;
end;
procedure TfrViewComision.CustomViewShow(Sender: TObject);
Var
AAgentes: IBizContacto;
FAgentesController: IAgentesController;
begin
inherited;
try
FAgentesController := TAgentesController.Create;
AAgentes := FAgentesController.BuscarTodos;
AAgentes.DataTable.Active := True;
dsAgentes.DataTable := AAgentes.DataTable;
finally
AAgentes := Nil;
FAgentesController := Nil;
end;
FAgentes := FAgentesController.BuscarTodos;
dsAgentes.DataTable := FAgentes.DataTable;
dsAgentes.DataTable.Active := True;
end;
function TfrViewComision.GetComision: IBizComisiones;

View File

@ -29,6 +29,11 @@ inherited frViewComisiones: TfrViewComisiones
Column = cxGridViewREFERENCIA
end>
OptionsBehavior.PullFocusing = True
object cxGridViewID: TcxGridDBColumn
DataBinding.FieldName = 'ID'
Visible = False
VisibleForCustomization = False
end
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
@ -80,24 +85,31 @@ inherited frViewComisiones: TfrViewComisiones
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 225
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 225
ExplicitWidth = 121
Width = 121
end
inherited eLista: TcxComboBox
Left = 383
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 383
ExplicitWidth = 215
Width = 215
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
ExplicitWidth = 607
end
inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink
ReportDocument.CreationDate = 38673.842406053240000000

View File

@ -31,6 +31,7 @@ type
cxGridViewDESCRIPCION: TcxGridDBColumn;
cxGridViewAGENTE: TcxGridDBColumn;
cxGridViewIMPORTE_TOTAL: TcxGridDBColumn;
cxGridViewID: TcxGridDBColumn;
procedure cxGridViewIDCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);

View File

@ -88,6 +88,9 @@ inherited frViewFacturasComision: TfrViewFacturasComision
object cxGridViewIMPORTE_COMISIONABLE: TcxGridDBColumn
Caption = 'Importe comisionable'
DataBinding.FieldName = 'IMPORTE_COMISIONABLE'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewCOMISION: TcxGridDBColumn
Caption = 'Porcentaje'
@ -96,10 +99,14 @@ inherited frViewFacturasComision: TfrViewFacturasComision
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = '0.0 %;-0.0 %'
Properties.MaxValue = 100.000000000000000000
HeaderAlignmentHorz = taRightJustify
end
object cxGridViewIMPORTE_COMISION: TcxGridDBColumn
Caption = 'Importe comisi'#243'n'
DataBinding.FieldName = 'IMPORTE_COMISION'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
end
end
@ -120,13 +127,13 @@ inherited frViewFacturasComision: TfrViewFacturasComision
end
object ToolButton3: TToolButton
Left = 336
Top = 2
Top = 0
Action = actExpandir
AutoSize = True
end
object ToolButton8: TToolButton
Left = 434
Top = 2
Top = 0
Action = actContraer
AutoSize = True
end

View File

@ -10,7 +10,7 @@ uses
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
cxGrid, cxImageComboBox, cxCurrencyEdit, uDataModuleComisiones,
uBizComisiones, uComisionesController, Grids, DBGrids, cxSpinEdit,
dxLayoutControl;
dxLayoutControl, uDAInterfaces;
type
IViewFacturasComision = interface

View File

@ -398,6 +398,7 @@ begin
ShowHourglassCursor;
try
Result := BuscarTodos;
with Result.DataTable.DynamicWhere do
begin
//Todas las facturas de un agente determinado

View File

@ -396,15 +396,15 @@ object srvFacturasProveedor: TsrvFacturasProveedor
' FACTURAS_PROVEEDOR_DETALLES.VISIBLE,'#10#10' FACTURAS_PROVEEDOR_DE' +
'TALLES.ID_ARTICULO, FACTURAS_PROVEEDOR_DETALLES.DESCUENTO,'#10' F' +
'ACTURAS_PROVEEDOR_DETALLES.IMPORTE_PORTE,'#10' ARTICULOS.REFERENC' +
'IA, ARTICULOS_PROVEEDORES.REFERENCIA_PROV as REFERENCIA_PROVEEDO' +
'R,'#10' ARTICULOS.REFERENCIA_FABR as REFERENCIA_FABRICANTE'#10#10'FROM ' +
'FACTURAS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_PROV' +
'EEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'LEFT JOIN FACTURAS_PRO' +
'VEEDOR ON (FACTURAS_PROVEEDOR.ID = FACTURAS_PROVEEDOR_DETALLES.I' +
'D_FACTURA)'#10'LEFT JOIN ARTICULOS_PROVEEDORES ON ((ARTICULOS_PROVEE' +
'DORES.ID_ARTICULO = ARTICULOS.ID) AND (ARTICULOS_PROVEEDORES.ID_' +
'PROVEEDOR = FACTURAS_PROVEEDOR.ID_PROVEEDOR))'#10#10'WHERE {where}'#10'ORD' +
'ER BY POSICION;'#10#10#10
'IA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' ARTIC' +
'ULOS.REFERENCIA_FABR as REFERENCIA_FABRICANTE'#10#10'FROM FACTURAS_PRO' +
'VEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_PROVEEDOR_DETALL' +
'ES.ID_ARTICULO = ARTICULOS.ID'#10'LEFT JOIN FACTURAS_PROVEEDOR ON (F' +
'ACTURAS_PROVEEDOR.ID = FACTURAS_PROVEEDOR_DETALLES.ID_FACTURA)'#10'L' +
'EFT JOIN ARTICULOS_PROVEEDORES ON ((ARTICULOS_PROVEEDORES.ID_ART' +
'ICULO = ARTICULOS.ID) AND (ARTICULOS_PROVEEDORES.ID_PROVEEDOR = ' +
'FACTURAS_PROVEEDOR.ID_PROVEEDOR))'#10#10'WHERE {where}'#10'ORDER BY POSICI' +
'ON;'#10#10#10
StatementType = stSQL
ColumnMappings = <
item

View File

@ -77,7 +77,6 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
Left = 427
Visible = True
ExplicitLeft = 427
ExplicitWidth = 179
object TBXItem41: TTBXItem
Action = actDomiciliacion
end
@ -271,11 +270,15 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
object actInformes: TAction
Category = 'Acciones'
Caption = 'Informes'
Enabled = False
Visible = False
OnExecute = actInformesExecute
end
object actDomiciliacion: TAction
Category = 'Acciones'
Caption = 'Asignar domiciliaci'#243'n'
Enabled = False
Visible = False
OnExecute = actDomiciliacionExecute
OnUpdate = actDomiciliacionUpdate
end