Arreglo de fallo al coger los descuentos en los detallesview de todos los documentos (Hay que cambiarlo tabien en acana y luis) / Se detecta fallo en el cambiar signo del ordenes de devolucion y abonos
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@248 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
c7203dc48a
commit
e04186b4e4
@ -9,6 +9,7 @@
|
|||||||
<Projects Include="..\..\Cliente\FactuGES.dproj" />
|
<Projects Include="..\..\Cliente\FactuGES.dproj" />
|
||||||
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
|
<Projects Include="..\..\GUIBase\GUIBase.dproj" />
|
||||||
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
|
||||||
|
<Projects Include="..\Articulos\Controller\Articulos_controller.dproj" />
|
||||||
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
<Projects Include="..\Articulos\Views\Articulos_view.dproj" />
|
||||||
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
<Projects Include="..\Contactos\Views\Contactos_view.dproj" />
|
||||||
<Projects Include="Controller\AlbaranesCliente_controller.dproj" />
|
<Projects Include="Controller\AlbaranesCliente_controller.dproj" />
|
||||||
@ -21,7 +22,7 @@
|
|||||||
<Borland.Personality>Default.Personality</Borland.Personality>
|
<Borland.Personality>Default.Personality</Borland.Personality>
|
||||||
<Borland.ProjectType />
|
<Borland.ProjectType />
|
||||||
<BorlandProject>
|
<BorlandProject>
|
||||||
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
|
<BorlandProject xmlns=""><Default.Personality></Default.Personality></BorlandProject></BorlandProject>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Target Name="Base">
|
<Target Name="Base">
|
||||||
<MSBuild Projects="..\..\Base\Base.dproj" Targets="" />
|
<MSBuild Projects="..\..\Base\Base.dproj" Targets="" />
|
||||||
@ -59,6 +60,15 @@
|
|||||||
<Target Name="Contactos_view:Make">
|
<Target Name="Contactos_view:Make">
|
||||||
<MSBuild Projects="..\Contactos\Views\Contactos_view.dproj" Targets="Make" />
|
<MSBuild Projects="..\Contactos\Views\Contactos_view.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<Target Name="Articulos_controller">
|
||||||
|
<MSBuild Projects="..\Articulos\Controller\Articulos_controller.dproj" Targets="" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Articulos_controller:Clean">
|
||||||
|
<MSBuild Projects="..\Articulos\Controller\Articulos_controller.dproj" Targets="Clean" />
|
||||||
|
</Target>
|
||||||
|
<Target Name="Articulos_controller:Make">
|
||||||
|
<MSBuild Projects="..\Articulos\Controller\Articulos_controller.dproj" Targets="Make" />
|
||||||
|
</Target>
|
||||||
<Target Name="Articulos_view">
|
<Target Name="Articulos_view">
|
||||||
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="" />
|
<MSBuild Projects="..\Articulos\Views\Articulos_view.dproj" Targets="" />
|
||||||
</Target>
|
</Target>
|
||||||
@ -132,13 +142,13 @@
|
|||||||
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
<MSBuild Projects="..\..\Servidor\FactuGES_Server.dproj" Targets="Make" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Build">
|
<Target Name="Build">
|
||||||
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;AlbaranesCliente_model;AlbaranesCliente_data;AlbaranesCliente_controller;AlbaranesCliente_view;AlbaranesCliente_plugin;FactuGES;FactuGES_Server" />
|
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_controller;Articulos_view;AlbaranesCliente_model;AlbaranesCliente_data;AlbaranesCliente_controller;AlbaranesCliente_view;AlbaranesCliente_plugin;FactuGES;FactuGES_Server" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Clean">
|
<Target Name="Clean">
|
||||||
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;AlbaranesCliente_model:Clean;AlbaranesCliente_data:Clean;AlbaranesCliente_controller:Clean;AlbaranesCliente_view:Clean;AlbaranesCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean" />
|
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_controller:Clean;Articulos_view:Clean;AlbaranesCliente_model:Clean;AlbaranesCliente_data:Clean;AlbaranesCliente_controller:Clean;AlbaranesCliente_view:Clean;AlbaranesCliente_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Make">
|
<Target Name="Make">
|
||||||
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;AlbaranesCliente_model:Make;AlbaranesCliente_data:Make;AlbaranesCliente_controller:Make;AlbaranesCliente_view:Make;AlbaranesCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make" />
|
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_controller:Make;Articulos_view:Make;AlbaranesCliente_model:Make;AlbaranesCliente_data:Make;AlbaranesCliente_controller:Make;AlbaranesCliente_view:Make;AlbaranesCliente_plugin:Make;FactuGES:Make;FactuGES_Server:Make" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@ -9,7 +9,7 @@ uses
|
|||||||
type
|
type
|
||||||
IDetallesAlbaranClienteController = interface(IControllerDetallesArticulos)
|
IDetallesAlbaranClienteController = interface(IControllerDetallesArticulos)
|
||||||
['{6AD99D47-2856-47B1-9620-DD115726B0E1}']
|
['{6AD99D47-2856-47B1-9620-DD115726B0E1}']
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
@ -31,7 +31,7 @@ type
|
|||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -60,7 +60,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDetallesAlbaranClienteController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
procedure TDetallesAlbaranClienteController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean);
|
||||||
var
|
var
|
||||||
AArticulos: IBizArticulo;
|
AArticulos: IBizArticulo;
|
||||||
begin
|
begin
|
||||||
@ -68,8 +68,19 @@ begin
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
||||||
AArticulos := (FArticulosController as IArticulosAlbaranClienteController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este albarán de cliente', True);
|
|
||||||
Add(ADetalles, AArticulos);
|
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
|
||||||
|
if ANuevaFila then
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosAlbaranClienteController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este albarán de cliente', True);
|
||||||
|
Add(ADetalles, AArticulos)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosAlbaranClienteController).ElegirArticulos(AArticulos, 'Elija el artículo que desea añadir a este albarán de cliente', False);
|
||||||
|
RellenarDetalle(ADetalles, AArticulos);
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,51 +1,43 @@
|
|||||||
inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
|
inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Height = 73
|
Height = 95
|
||||||
ExplicitHeight = 73
|
ExplicitHeight = 95
|
||||||
inherited ToolButton3: TToolButton
|
inherited FontName: TJvFontComboBox [4]
|
||||||
Wrap = False
|
Left = 56
|
||||||
end
|
|
||||||
inherited ToolButton4: TToolButton
|
|
||||||
Left = 278
|
|
||||||
Top = 0
|
|
||||||
ExplicitLeft = 278
|
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
|
||||||
inherited ToolButton14: TToolButton
|
|
||||||
Left = 334
|
|
||||||
Top = 0
|
|
||||||
ExplicitLeft = 334
|
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
|
||||||
inherited FontName: TJvFontComboBox
|
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 56
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
|
inherited ToolButton14: TToolButton [5]
|
||||||
|
Left = 201
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 201
|
||||||
|
end
|
||||||
inherited FontSize: TEdit
|
inherited FontSize: TEdit
|
||||||
|
Left = 266
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 266
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown
|
inherited UpDown1: TUpDown
|
||||||
|
Left = 308
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 308
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 325
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 325
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton11: TToolButton [9]
|
||||||
|
Left = 333
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 333
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
inherited ToolButton12: TToolButton [10]
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton8: TToolButton
|
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton12: TToolButton
|
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 22
|
Top = 22
|
||||||
Wrap = True
|
Wrap = True
|
||||||
@ -53,30 +45,41 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
|
|||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
ExplicitHeight = 27
|
ExplicitHeight = 27
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton
|
inherited ToolButton9: TToolButton [11]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton10: TToolButton [12]
|
||||||
Left = 145
|
Left = 145
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 145
|
ExplicitLeft = 145
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton11: TToolButton
|
inherited ToolButton6: TToolButton [13]
|
||||||
Left = 270
|
Left = 270
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 270
|
ExplicitLeft = 270
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
|
inherited ToolButton7: TToolButton [14]
|
||||||
|
Left = 336
|
||||||
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 336
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [15]
|
||||||
|
Left = 0
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Top = 99
|
Top = 121
|
||||||
Height = 205
|
Height = 183
|
||||||
ExplicitTop = 99
|
|
||||||
ExplicitHeight = 205
|
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewTIPO: TcxGridDBColumn
|
inherited cxGridViewTIPO: TcxGridDBColumn
|
||||||
Visible = False
|
Visible = False
|
||||||
@ -85,8 +88,7 @@ inherited frViewDetallesAlbaranCliente: TfrViewDetallesAlbaranCliente
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 73
|
Top = 95
|
||||||
ExplicitTop = 73
|
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
DockPos = 0
|
DockPos = 0
|
||||||
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
||||||
|
|||||||
@ -30,6 +30,7 @@ type
|
|||||||
procedure SetAlbaran(const Value: IBizAlbaranCliente);
|
procedure SetAlbaran(const Value: IBizAlbaranCliente);
|
||||||
|
|
||||||
procedure AnadirArticulosInterno; override;
|
procedure AnadirArticulosInterno; override;
|
||||||
|
procedure RellenarArticulosInterno; override;
|
||||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -64,6 +65,14 @@ begin
|
|||||||
Result := FAlbaran;
|
Result := FAlbaran;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesAlbaranCliente.RellenarArticulosInterno;
|
||||||
|
begin
|
||||||
|
(Controller as IDetallesAlbaranClienteController).AnadirArticulos(Detalles, Albaran.Cliente, False);
|
||||||
|
|
||||||
|
if (Albaran.TIPO = CTE_TIPO_ALBARAN_DEV) then
|
||||||
|
(Controller as IDetallesAlbaranClienteController).CambiarSignoDetalles(Detalles);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesAlbaranCliente.SetAlbaran(const Value: IBizAlbaranCliente);
|
procedure TfrViewDetallesAlbaranCliente.SetAlbaran(const Value: IBizAlbaranCliente);
|
||||||
begin
|
begin
|
||||||
FAlbaran := Value;
|
FAlbaran := Value;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ uses
|
|||||||
type
|
type
|
||||||
IDetallesAlbaranProveedorController = interface(IControllerDetallesArticulos)
|
IDetallesAlbaranProveedorController = interface(IControllerDetallesArticulos)
|
||||||
['{6E35D49A-C78D-481D-93E9-859CD27EB79F}']
|
['{6E35D49A-C78D-481D-93E9-859CD27EB79F}']
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
||||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
@ -31,7 +31,7 @@ type
|
|||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -61,7 +61,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDetallesAlbaranProveedorController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
procedure TDetallesAlbaranProveedorController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean);
|
||||||
var
|
var
|
||||||
AArticulos: IBizArticulo;
|
AArticulos: IBizArticulo;
|
||||||
begin
|
begin
|
||||||
@ -69,8 +69,19 @@ begin
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
||||||
AArticulos := (FArticulosController as IArticulosAlbaranProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este albarán de proveedor', True, AProveedor);
|
|
||||||
Add(ADetalles, AArticulos);
|
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
|
||||||
|
if ANuevaFila then
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosAlbaranProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este albarán de proveedor', True, AProveedor);
|
||||||
|
Add(ADetalles, AArticulos)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosAlbaranProveedorController).ElegirArticulos(AArticulos, 'Elija el artículo que desea añadir a este albarán de proveedor', False, AProveedor);
|
||||||
|
RellenarDetalle(ADetalles, AArticulos);
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,51 +1,43 @@
|
|||||||
inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor
|
inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Height = 73
|
Height = 95
|
||||||
ExplicitHeight = 73
|
ExplicitHeight = 95
|
||||||
inherited ToolButton3: TToolButton
|
inherited FontName: TJvFontComboBox [4]
|
||||||
Wrap = False
|
Left = 56
|
||||||
end
|
|
||||||
inherited ToolButton4: TToolButton
|
|
||||||
Left = 278
|
|
||||||
Top = 0
|
|
||||||
ExplicitLeft = 278
|
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
|
||||||
inherited ToolButton14: TToolButton
|
|
||||||
Left = 334
|
|
||||||
Top = 0
|
|
||||||
ExplicitLeft = 334
|
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
|
||||||
inherited FontName: TJvFontComboBox
|
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 56
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
|
inherited ToolButton14: TToolButton [5]
|
||||||
|
Left = 201
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 201
|
||||||
|
end
|
||||||
inherited FontSize: TEdit
|
inherited FontSize: TEdit
|
||||||
|
Left = 266
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 266
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown
|
inherited UpDown1: TUpDown
|
||||||
|
Left = 308
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 308
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 325
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 325
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton11: TToolButton [9]
|
||||||
|
Left = 333
|
||||||
Top = 22
|
Top = 22
|
||||||
|
ExplicitLeft = 333
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
inherited ToolButton12: TToolButton [10]
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton8: TToolButton
|
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton12: TToolButton
|
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 22
|
Top = 22
|
||||||
Wrap = True
|
Wrap = True
|
||||||
@ -53,30 +45,42 @@ inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor
|
|||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
ExplicitHeight = 27
|
ExplicitHeight = 27
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton
|
inherited ToolButton9: TToolButton [11]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton10: TToolButton [12]
|
||||||
Left = 145
|
Left = 145
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 145
|
ExplicitLeft = 145
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton11: TToolButton
|
inherited ToolButton6: TToolButton [13]
|
||||||
Left = 270
|
Left = 270
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 270
|
ExplicitLeft = 270
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
|
inherited ToolButton7: TToolButton [14]
|
||||||
|
Left = 336
|
||||||
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 336
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [15]
|
||||||
|
Left = 0
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Top = 99
|
Top = 121
|
||||||
Height = 205
|
Height = 183
|
||||||
ExplicitTop = 99
|
ExplicitTop = 99
|
||||||
ExplicitHeight = 205
|
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
||||||
Properties.ReadOnly = False
|
Properties.ReadOnly = False
|
||||||
@ -84,8 +88,7 @@ inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 73
|
Top = 95
|
||||||
ExplicitTop = 73
|
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
||||||
Visible = False
|
Visible = False
|
||||||
|
|||||||
@ -29,6 +29,7 @@ type
|
|||||||
procedure SetAlbaran(const Value: IBizAlbaranProveedor);
|
procedure SetAlbaran(const Value: IBizAlbaranProveedor);
|
||||||
|
|
||||||
procedure AnadirArticulosInterno; override;
|
procedure AnadirArticulosInterno; override;
|
||||||
|
procedure RellenarArticulosInterno; override;
|
||||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -63,6 +64,14 @@ begin
|
|||||||
Result := FAlbaran;
|
Result := FAlbaran;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesAlbaranProveedor.RellenarArticulosInterno;
|
||||||
|
begin
|
||||||
|
(Controller as IDetallesAlbaranProveedorController).AnadirArticulos(Detalles, Albaran.Proveedor, False);
|
||||||
|
|
||||||
|
if (Albaran.TIPO = CTE_TIPO_ALBARAN_DEV) then
|
||||||
|
(Controller as IDetallesAlbaranProveedorController).CambiarSignoDetalles(Detalles);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesAlbaranProveedor.SetAlbaran(const Value: IBizAlbaranProveedor);
|
procedure TfrViewDetallesAlbaranProveedor.SetAlbaran(const Value: IBizAlbaranProveedor);
|
||||||
begin
|
begin
|
||||||
FAlbaran := Value;
|
FAlbaran := Value;
|
||||||
|
|||||||
@ -9,8 +9,8 @@ const
|
|||||||
{ Data table rules ids
|
{ Data table rules ids
|
||||||
Feel free to change them to something more human readable
|
Feel free to change them to something more human readable
|
||||||
but make sure they are unique in the context of your application }
|
but make sure they are unique in the context of your application }
|
||||||
RID_Articulos = '{79461C02-C303-4849-B89B-1A86EB440B71}';
|
RID_Articulos = '{6930163F-C204-4661-9B8E-E5EB08652E93}';
|
||||||
RID_ArticulosParaCliente = '{79CE72E6-EEE0-4CD7-BF63-178D4CBAD3E7}';
|
RID_ArticulosParaCliente = '{02961EF0-4BAA-4C29-B66E-E1FCD09DBC15}';
|
||||||
|
|
||||||
{ Data table names }
|
{ Data table names }
|
||||||
nme_Articulos = 'Articulos';
|
nme_Articulos = 'Articulos';
|
||||||
@ -107,7 +107,7 @@ const
|
|||||||
type
|
type
|
||||||
{ IArticulos }
|
{ IArticulos }
|
||||||
IArticulos = interface(IDAStronglyTypedDataTable)
|
IArticulos = interface(IDAStronglyTypedDataTable)
|
||||||
['{1F24EC6B-18D1-43B7-B276-6889F602834E}']
|
['{0E1C6D96-6382-45DF-8992-448C25CF4CED}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetIDValue: Integer;
|
function GetIDValue: Integer;
|
||||||
procedure SetIDValue(const aValue: Integer);
|
procedure SetIDValue(const aValue: Integer);
|
||||||
@ -370,7 +370,7 @@ type
|
|||||||
|
|
||||||
{ IArticulosParaCliente }
|
{ IArticulosParaCliente }
|
||||||
IArticulosParaCliente = interface(IDAStronglyTypedDataTable)
|
IArticulosParaCliente = interface(IDAStronglyTypedDataTable)
|
||||||
['{009C7FBB-A768-4BF4-9FB7-5CDB273A163C}']
|
['{82CAF5F9-F5A9-4A0D-9FBB-6229D32300DA}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetIDValue: Integer;
|
function GetIDValue: Integer;
|
||||||
procedure SetIDValue(const aValue: Integer);
|
procedure SetIDValue(const aValue: Integer);
|
||||||
|
|||||||
@ -9,13 +9,13 @@ const
|
|||||||
{ Delta rules ids
|
{ Delta rules ids
|
||||||
Feel free to change them to something more human readable
|
Feel free to change them to something more human readable
|
||||||
but make sure they are unique in the context of your application }
|
but make sure they are unique in the context of your application }
|
||||||
RID_ArticulosDelta = '{C0937769-365F-4948-AE41-A6B3B28A4C51}';
|
RID_ArticulosDelta = '{A56987C7-0587-447A-80F8-44F882CC1326}';
|
||||||
RID_ArticulosParaClienteDelta = '{D132BF20-DB8F-4A41-A479-9F31BABB1922}';
|
RID_ArticulosParaClienteDelta = '{4BF57D32-A849-47E2-9AC3-81691DC7B0CA}';
|
||||||
|
|
||||||
type
|
type
|
||||||
{ IArticulosDelta }
|
{ IArticulosDelta }
|
||||||
IArticulosDelta = interface(IArticulos)
|
IArticulosDelta = interface(IArticulos)
|
||||||
['{C0937769-365F-4948-AE41-A6B3B28A4C51}']
|
['{A56987C7-0587-447A-80F8-44F882CC1326}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldIDValue : Integer;
|
function GetOldIDValue : Integer;
|
||||||
function GetOldID_EMPRESAValue : Integer;
|
function GetOldID_EMPRESAValue : Integer;
|
||||||
@ -278,7 +278,7 @@ type
|
|||||||
|
|
||||||
{ IArticulosParaClienteDelta }
|
{ IArticulosParaClienteDelta }
|
||||||
IArticulosParaClienteDelta = interface(IArticulosParaCliente)
|
IArticulosParaClienteDelta = interface(IArticulosParaCliente)
|
||||||
['{D132BF20-DB8F-4A41-A479-9F31BABB1922}']
|
['{4BF57D32-A849-47E2-9AC3-81691DC7B0CA}']
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
function GetOldIDValue : Integer;
|
function GetOldIDValue : Integer;
|
||||||
function GetOldID_EMPRESAValue : Integer;
|
function GetOldID_EMPRESAValue : Integer;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
object srvArticulos: TsrvArticulos
|
object srvArticulos: TsrvArticulos
|
||||||
OldCreateOrder = True
|
OldCreateOrder = True
|
||||||
OnCreate = DARemoteServiceCreate
|
OnCreate = DARemoteServiceCreate
|
||||||
RequiresSession = True
|
RequiresSession = True
|
||||||
@ -530,6 +530,8 @@ object srvArticulos: TsrvArticulos
|
|||||||
Params = <
|
Params = <
|
||||||
item
|
item
|
||||||
Name = 'ID'
|
Name = 'ID'
|
||||||
|
DataType = datAutoInc
|
||||||
|
GeneratorName = 'GEN_ARTICULOS_ID'
|
||||||
Value = ''
|
Value = ''
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
|
|||||||
@ -9,7 +9,7 @@ uses
|
|||||||
type
|
type
|
||||||
IDetallesFacturaClienteController = interface(IControllerDetallesArticulos)
|
IDetallesFacturaClienteController = interface(IControllerDetallesArticulos)
|
||||||
['{D3942A48-C55B-4A98-AC5B-B5E652ED393E}']
|
['{D3942A48-C55B-4A98-AC5B-B5E652ED393E}']
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
||||||
procedure AnadirDetalleFacturaAsociadaAbono(ADetalles: IBizDetallesFacturaCliente; AReferencia: String; AFecha: String);
|
procedure AnadirDetalleFacturaAsociadaAbono(ADetalles: IBizDetallesFacturaCliente; AReferencia: String; AFecha: String);
|
||||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||||
@ -32,7 +32,7 @@ type
|
|||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||||
|
|
||||||
//ABONOS
|
//ABONOS
|
||||||
@ -65,16 +65,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDetallesFacturaClienteController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
procedure TDetallesFacturaClienteController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean);
|
||||||
var
|
var
|
||||||
AArticulos: IBizArticulo;
|
AArticulos: IBizArticulo;
|
||||||
begin
|
begin
|
||||||
if Assigned(ADetalles) then
|
if Assigned(ADetalles) then
|
||||||
begin
|
begin
|
||||||
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController as IArticulosFacturaClienteController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a esta factura de cliente', True);
|
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
||||||
Add(ADetalles, AArticulos);
|
|
||||||
|
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
|
||||||
|
if ANuevaFila then
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosFacturaClienteController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a esta factura de cliente', True);
|
||||||
|
Add(ADetalles, AArticulos)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosFacturaClienteController).ElegirArticulos(AArticulos, 'Elija el artículo que desea añadir a esta factura de cliente', False);
|
||||||
|
RellenarDetalle(ADetalles, AArticulos);
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,9 +1,87 @@
|
|||||||
inherited frViewDetallesFacturaCliente: TfrViewDetallesFacturaCliente
|
inherited frViewDetallesFacturaCliente: TfrViewDetallesFacturaCliente
|
||||||
inherited cxGrid: TcxGrid
|
inherited ToolBar1: TToolBar
|
||||||
inherited cxGridView: TcxGridDBTableView
|
Height = 95
|
||||||
inherited cxGridViewIMPORTEPORTE: TcxGridDBColumn
|
ExplicitHeight = 95
|
||||||
Visible = False
|
inherited FontName: TJvFontComboBox [4]
|
||||||
end
|
Left = 56
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 56
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton14: TToolButton [5]
|
||||||
|
Left = 201
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 201
|
||||||
|
end
|
||||||
|
inherited FontSize: TEdit
|
||||||
|
Left = 266
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 266
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited UpDown1: TUpDown
|
||||||
|
Left = 308
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 308
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 325
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 325
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton11: TToolButton [9]
|
||||||
|
Left = 333
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 333
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton12: TToolButton [10]
|
||||||
|
Left = 0
|
||||||
|
Top = 22
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 22
|
||||||
|
ExplicitHeight = 27
|
||||||
|
end
|
||||||
|
inherited ToolButton9: TToolButton [11]
|
||||||
|
Left = 0
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton10: TToolButton [12]
|
||||||
|
Left = 145
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 145
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton6: TToolButton [13]
|
||||||
|
Left = 270
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 270
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton [14]
|
||||||
|
Left = 336
|
||||||
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 336
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [15]
|
||||||
|
Left = 0
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited cxGrid: TcxGrid
|
||||||
|
Top = 121
|
||||||
|
Height = 183
|
||||||
|
end
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
Top = 95
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -29,6 +29,7 @@ type
|
|||||||
procedure SetFactura(const Value: IBizFacturaCliente);
|
procedure SetFactura(const Value: IBizFacturaCliente);
|
||||||
|
|
||||||
procedure AnadirArticulosInterno; override;
|
procedure AnadirArticulosInterno; override;
|
||||||
|
procedure RellenarArticulosInterno; override;
|
||||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -63,6 +64,14 @@ begin
|
|||||||
Result := FFactura;
|
Result := FFactura;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesFacturaCliente.RellenarArticulosInterno;
|
||||||
|
begin
|
||||||
|
(Controller as IDetallesFacturaClienteController).AnadirArticulos(Detalles, Factura.Cliente, False);
|
||||||
|
|
||||||
|
if (Factura.TIPO = CTE_TIPO_ABONO) then
|
||||||
|
(Controller as IDetallesFacturaClienteController).CambiarSignoDetalles(Detalles);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesFacturaCliente.SetFactura(const Value: IBizFacturaCliente);
|
procedure TfrViewDetallesFacturaCliente.SetFactura(const Value: IBizFacturaCliente);
|
||||||
begin
|
begin
|
||||||
FFactura := Value;
|
FFactura := Value;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ uses
|
|||||||
type
|
type
|
||||||
IDetallesFacturaProveedorController = interface(IControllerDetallesArticulos)
|
IDetallesFacturaProveedorController = interface(IControllerDetallesArticulos)
|
||||||
['{49F6199E-E031-42F5-AEA5-E70C3E3479A1}']
|
['{49F6199E-E031-42F5-AEA5-E70C3E3479A1}']
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
||||||
procedure AnadirDetalleFacturaAsociadaAbono(ADetalles: IBizDetallesFacturaProveedor; AReferencia: String; AFecha: String);
|
procedure AnadirDetalleFacturaAsociadaAbono(ADetalles: IBizDetallesFacturaProveedor; AReferencia: String; AFecha: String);
|
||||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||||
@ -31,7 +31,7 @@ type
|
|||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
||||||
procedure AnadirDetalleFacturaAsociadaAbono(ADetalles: IBizDetallesFacturaProveedor; AReferencia: String; AFecha: String);
|
procedure AnadirDetalleFacturaAsociadaAbono(ADetalles: IBizDetallesFacturaProveedor; AReferencia: String; AFecha: String);
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
@ -62,16 +62,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDetallesFacturaProveedorController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
procedure TDetallesFacturaProveedorController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean);
|
||||||
var
|
var
|
||||||
AArticulos: IBizArticulo;
|
AArticulos: IBizArticulo;
|
||||||
begin
|
begin
|
||||||
if Assigned(ADetalles) then
|
if Assigned(ADetalles) then
|
||||||
begin
|
begin
|
||||||
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController as IArticulosFacturaProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a esta factura de Proveedor', True, AProveedor);
|
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
||||||
Add(ADetalles, AArticulos);
|
|
||||||
|
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
|
||||||
|
if ANuevaFila then
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosFacturaProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a esta factura de Proveedor', True, AProveedor);
|
||||||
|
Add(ADetalles, AArticulos)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosFacturaProveedorController).ElegirArticulos(AArticulos, 'Elija el artículo que desea añadir a esta factura de Proveedor', False, AProveedor);
|
||||||
|
RellenarDetalle(ADetalles, AArticulos);
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,5 +1,85 @@
|
|||||||
inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
|
inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
|
||||||
|
inherited ToolBar1: TToolBar
|
||||||
|
Height = 95
|
||||||
|
ExplicitHeight = 95
|
||||||
|
inherited FontName: TJvFontComboBox [4]
|
||||||
|
Left = 56
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 56
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton14: TToolButton [5]
|
||||||
|
Left = 201
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 201
|
||||||
|
end
|
||||||
|
inherited FontSize: TEdit
|
||||||
|
Left = 266
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 266
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited UpDown1: TUpDown
|
||||||
|
Left = 308
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 308
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 325
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 325
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton11: TToolButton [9]
|
||||||
|
Left = 333
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 333
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton12: TToolButton [10]
|
||||||
|
Left = 0
|
||||||
|
Top = 22
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 22
|
||||||
|
ExplicitHeight = 27
|
||||||
|
end
|
||||||
|
inherited ToolButton9: TToolButton [11]
|
||||||
|
Left = 0
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton10: TToolButton [12]
|
||||||
|
Left = 145
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 145
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton6: TToolButton [13]
|
||||||
|
Left = 270
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 270
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton [14]
|
||||||
|
Left = 336
|
||||||
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 336
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [15]
|
||||||
|
Left = 0
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
|
Top = 121
|
||||||
|
Height = 183
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
||||||
Properties.ReadOnly = False
|
Properties.ReadOnly = False
|
||||||
@ -7,4 +87,7 @@ inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
Top = 95
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -29,6 +29,7 @@ type
|
|||||||
procedure SetFactura(const Value: IBizFacturaProveedor);
|
procedure SetFactura(const Value: IBizFacturaProveedor);
|
||||||
|
|
||||||
procedure AnadirArticulosInterno; override;
|
procedure AnadirArticulosInterno; override;
|
||||||
|
procedure RellenarArticulosInterno; override;
|
||||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -63,6 +64,14 @@ begin
|
|||||||
Result := FFactura;
|
Result := FFactura;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesFacturaProveedor.RellenarArticulosInterno;
|
||||||
|
begin
|
||||||
|
(Controller as IDetallesFacturaProveedorController).AnadirArticulos(Detalles, Factura.Proveedor, False);
|
||||||
|
|
||||||
|
if (Factura.TIPO = CTE_TIPO_ABONO) then
|
||||||
|
(Controller as IDetallesFacturaProveedorController).CambiarSignoDetalles(Detalles);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesFacturaProveedor.SetFactura(const Value: IBizFacturaProveedor);
|
procedure TfrViewDetallesFacturaProveedor.SetFactura(const Value: IBizFacturaProveedor);
|
||||||
begin
|
begin
|
||||||
FFactura := Value;
|
FFactura := Value;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ uses
|
|||||||
type
|
type
|
||||||
IDetallesPedidoProveedorController = interface(IControllerDetallesArticulos)
|
IDetallesPedidoProveedorController = interface(IControllerDetallesArticulos)
|
||||||
['{942428EC-BCB8-4C56-BFA6-EB9F05D5E0DB}']
|
['{942428EC-BCB8-4C56-BFA6-EB9F05D5E0DB}']
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
||||||
function ArticulosPendientes(const ID : Integer): IBizDetallesPedidoProveedorPend;
|
function ArticulosPendientes(const ID : Integer): IBizDetallesPedidoProveedorPend;
|
||||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||||
@ -32,7 +32,7 @@ type
|
|||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor); overload;
|
||||||
function ArticulosPendientes(const ID : Integer): IBizDetallesPedidoProveedorPend;
|
function ArticulosPendientes(const ID : Integer): IBizDetallesPedidoProveedorPend;
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
@ -62,7 +62,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDetallesPedidoProveedorController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor);
|
procedure TDetallesPedidoProveedorController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; AProveedor: IBizProveedor; const ANuevaFila :Boolean);
|
||||||
var
|
var
|
||||||
AArticulos: IBizArticulo;
|
AArticulos: IBizArticulo;
|
||||||
begin
|
begin
|
||||||
@ -70,8 +70,19 @@ begin
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
|
||||||
AArticulos := (FArticulosController as IArticulosPedidoProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este pedido a proveedor', True, AProveedor);
|
|
||||||
Add(ADetalles, AArticulos);
|
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
|
||||||
|
if ANuevaFila then
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosPedidoProveedorController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este pedido a proveedor', True, AProveedor);
|
||||||
|
Add(ADetalles, AArticulos)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosPedidoProveedorController).ElegirArticulos(AArticulos, 'Elija el artículo que desea añadir a este pedido a proveedor', False, AProveedor);
|
||||||
|
RellenarDetalle(ADetalles, AArticulos);
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,9 +1,92 @@
|
|||||||
inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor
|
inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor
|
||||||
|
inherited ToolBar1: TToolBar
|
||||||
|
Height = 95
|
||||||
|
ExplicitHeight = 95
|
||||||
|
inherited FontName: TJvFontComboBox [4]
|
||||||
|
Left = 56
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 56
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton14: TToolButton [5]
|
||||||
|
Left = 201
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 201
|
||||||
|
end
|
||||||
|
inherited FontSize: TEdit
|
||||||
|
Left = 266
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 266
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited UpDown1: TUpDown
|
||||||
|
Left = 308
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 308
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 325
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 325
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton11: TToolButton [9]
|
||||||
|
Left = 333
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 333
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton12: TToolButton [10]
|
||||||
|
Left = 0
|
||||||
|
Top = 22
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 22
|
||||||
|
ExplicitHeight = 27
|
||||||
|
end
|
||||||
|
inherited ToolButton9: TToolButton [11]
|
||||||
|
Left = 0
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton10: TToolButton [12]
|
||||||
|
Left = 145
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 145
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton6: TToolButton [13]
|
||||||
|
Left = 270
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 270
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton [14]
|
||||||
|
Left = 336
|
||||||
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 336
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [15]
|
||||||
|
Left = 0
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
|
Top = 121
|
||||||
|
Height = 183
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
||||||
Properties.ReadOnly = False
|
Properties.ReadOnly = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
Top = 95
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -30,6 +30,7 @@ type
|
|||||||
procedure SetPedido(const Value: IBizPedidoProveedor);
|
procedure SetPedido(const Value: IBizPedidoProveedor);
|
||||||
|
|
||||||
procedure AnadirArticulosInterno; override;
|
procedure AnadirArticulosInterno; override;
|
||||||
|
procedure RellenarArticulosInterno; override;
|
||||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -45,6 +46,7 @@ uses uDetallesPedidoProveedorController;
|
|||||||
|
|
||||||
procedure TfrViewDetallesPedidoProveedor.AnadirArticulosInterno;
|
procedure TfrViewDetallesPedidoProveedor.AnadirArticulosInterno;
|
||||||
begin
|
begin
|
||||||
|
//No sé porque está en este módulo hecho así, supongo que por seguridad.
|
||||||
if Assigned(Pedido) and Assigned(Pedido.Proveedor)
|
if Assigned(Pedido) and Assigned(Pedido.Proveedor)
|
||||||
then (Controller as IDetallesPedidoProveedorController).AnadirArticulos(Detalles, Pedido.Proveedor)
|
then (Controller as IDetallesPedidoProveedorController).AnadirArticulos(Detalles, Pedido.Proveedor)
|
||||||
else (Controller as IDetallesPedidoProveedorController).AnadirArticulos(Detalles);
|
else (Controller as IDetallesPedidoProveedorController).AnadirArticulos(Detalles);
|
||||||
@ -66,6 +68,14 @@ begin
|
|||||||
Result := FPedido;
|
Result := FPedido;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesPedidoProveedor.RellenarArticulosInterno;
|
||||||
|
begin
|
||||||
|
//No sé porque está en este módulo hecho así, supongo que por seguridad.
|
||||||
|
if Assigned(Pedido) and Assigned(Pedido.Proveedor)
|
||||||
|
then (Controller as IDetallesPedidoProveedorController).AnadirArticulos(Detalles, Pedido.Proveedor, False)
|
||||||
|
else (Controller as IDetallesPedidoProveedorController).AnadirArticulos(Detalles, False);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesPedidoProveedor.SetPedido(const Value: IBizPedidoProveedor);
|
procedure TfrViewDetallesPedidoProveedor.SetPedido(const Value: IBizPedidoProveedor);
|
||||||
begin
|
begin
|
||||||
FPedido := Value;
|
FPedido := Value;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ uses
|
|||||||
type
|
type
|
||||||
IDetallesPresupuestoClienteController = interface(IControllerDetallesArticulos)
|
IDetallesPresupuestoClienteController = interface(IControllerDetallesArticulos)
|
||||||
['{8D1D3559-E695-4962-9999-404B26B50D6C}']
|
['{8D1D3559-E695-4962-9999-404B26B50D6C}']
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||||
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
procedure DesglosarPorteDetalles(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
|
||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
@ -31,7 +31,7 @@ type
|
|||||||
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
function DarTotalPorteTotal(ADetalles: IDAStronglyTypedDataTable): Double;
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); reintroduce; overload;
|
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean = True); reintroduce; overload;
|
||||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente); overload;
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -60,7 +60,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDetallesPresupuestoClienteController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente);
|
procedure TDetallesPresupuestoClienteController.AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; ACliente: IBizCliente; const ANuevaFila :Boolean);
|
||||||
var
|
var
|
||||||
AArticulos: IBizArticulo;
|
AArticulos: IBizArticulo;
|
||||||
begin
|
begin
|
||||||
@ -68,8 +68,19 @@ begin
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
AArticulos := (FArticulosController.BuscarTodos(ACliente) as IBizArticulo);
|
||||||
AArticulos := (FArticulosController as IArticulosPresupuestoClienteController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este pedido de cliente', True);
|
|
||||||
Add(ADetalles, AArticulos);
|
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
|
||||||
|
if ANuevaFila then
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosPresupuestoClienteController).ElegirArticulos(AArticulos, 'Elija los artículos que desea añadir a este presupuesto de cliente', True);
|
||||||
|
Add(ADetalles, AArticulos)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AArticulos := (FArticulosController as IArticulosPresupuestoClienteController).ElegirArticulos(AArticulos, 'Elija el artículo que desea añadir a este presupuesto de cliente', False);
|
||||||
|
RellenarDetalle(ADetalles, AArticulos);
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AArticulos := Nil;
|
AArticulos := Nil;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1,49 +1,94 @@
|
|||||||
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
inherited FontSize: TEdit
|
Height = 95
|
||||||
ExplicitLeft = 278
|
inherited ToolButton3: TToolButton [1]
|
||||||
|
Left = 109
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 109
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown [4]
|
inherited ToolButton2: TToolButton [2]
|
||||||
Left = 320
|
Left = 164
|
||||||
Top = 0
|
ExplicitLeft = 164
|
||||||
ExplicitLeft = 320
|
|
||||||
ExplicitTop = 0
|
|
||||||
end
|
end
|
||||||
inherited ToolButton4: TToolButton [5]
|
inherited ToolButton12: TToolButton [3]
|
||||||
Left = 337
|
|
||||||
Wrap = True
|
|
||||||
ExplicitLeft = 337
|
|
||||||
end
|
|
||||||
inherited ToolButton14: TToolButton [6]
|
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 22
|
Top = 0
|
||||||
|
Wrap = True
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 22
|
ExplicitTop = 0
|
||||||
|
ExplicitHeight = 27
|
||||||
|
end
|
||||||
|
inherited ToolButton4: TToolButton [4]
|
||||||
|
Top = 27
|
||||||
|
ExplicitTop = 27
|
||||||
|
end
|
||||||
|
inherited ToolButton14: TToolButton [5]
|
||||||
|
Top = 27
|
||||||
|
Wrap = False
|
||||||
|
ExplicitTop = 27
|
||||||
|
end
|
||||||
|
inherited ToolButton10: TToolButton [6]
|
||||||
|
Left = 121
|
||||||
|
Top = 27
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 121
|
||||||
|
ExplicitTop = 27
|
||||||
end
|
end
|
||||||
inherited FontName: TJvFontComboBox [7]
|
inherited FontName: TJvFontComboBox [7]
|
||||||
Left = 65
|
Top = 49
|
||||||
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton
|
inherited UpDown1: TUpDown [8]
|
||||||
Left = 210
|
Left = 145
|
||||||
Wrap = False
|
Top = 49
|
||||||
ExplicitLeft = 210
|
ExplicitLeft = 145
|
||||||
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton6: TToolButton
|
||||||
Left = 218
|
Left = 162
|
||||||
ExplicitLeft = 218
|
Top = 49
|
||||||
|
ExplicitLeft = 162
|
||||||
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
inherited ToolButton11: TToolButton [10]
|
||||||
Left = 284
|
Left = 228
|
||||||
ExplicitLeft = 284
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 228
|
||||||
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton8: TToolButton
|
inherited ToolButton9: TToolButton [11]
|
||||||
Left = 351
|
Left = 0
|
||||||
Wrap = False
|
Top = 71
|
||||||
ExplicitLeft = 351
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited FontSize: TEdit [12]
|
||||||
|
Top = 71
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [13]
|
||||||
|
Left = 187
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 187
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited ToolButton13: TToolButton [14]
|
||||||
|
Left = 270
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 270
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton [15]
|
||||||
|
Top = 71
|
||||||
|
ExplicitTop = 71
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
ExplicitTop = 99
|
Top = 121
|
||||||
ExplicitHeight = 205
|
Height = 183
|
||||||
|
end
|
||||||
|
inherited TBXDock1: TTBXDock
|
||||||
|
Top = 95
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -30,6 +30,7 @@ type
|
|||||||
procedure SetPresupuesto(const Value: IBizPresupuestoCliente);
|
procedure SetPresupuesto(const Value: IBizPresupuestoCliente);
|
||||||
|
|
||||||
procedure AnadirArticulosInterno; override;
|
procedure AnadirArticulosInterno; override;
|
||||||
|
procedure RellenarArticulosInterno; override;
|
||||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -64,6 +65,11 @@ begin
|
|||||||
Result := FPresupuesto;
|
Result := FPresupuesto;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesPresupuestoCliente.RellenarArticulosInterno;
|
||||||
|
begin
|
||||||
|
(Controller as IDetallesPresupuestoClienteController).AnadirArticulos(Detalles, Presupuesto.Cliente, False);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesPresupuestoCliente.SetPresupuesto(const Value: IBizPresupuestoCliente);
|
procedure TfrViewDetallesPresupuestoCliente.SetPresupuesto(const Value: IBizPresupuestoCliente);
|
||||||
begin
|
begin
|
||||||
FPresupuesto := Value;
|
FPresupuesto := Value;
|
||||||
|
|||||||
Binary file not shown.
@ -95,8 +95,6 @@ uses
|
|||||||
srvUnidadesMedida_Impl in '..\Modulos\Unidades de medida\Servidor\srvUnidadesMedida_Impl.pas' {srvUnidadesMedida: TDataAbstractService},
|
srvUnidadesMedida_Impl in '..\Modulos\Unidades de medida\Servidor\srvUnidadesMedida_Impl.pas' {srvUnidadesMedida: TDataAbstractService},
|
||||||
schUnidadesMedidaClient_Intf in '..\Modulos\Unidades de medida\Model\schUnidadesMedidaClient_Intf.pas',
|
schUnidadesMedidaClient_Intf in '..\Modulos\Unidades de medida\Model\schUnidadesMedidaClient_Intf.pas',
|
||||||
schUnidadesMedidaServer_Intf in '..\Modulos\Unidades de medida\Model\schUnidadesMedidaServer_Intf.pas',
|
schUnidadesMedidaServer_Intf in '..\Modulos\Unidades de medida\Model\schUnidadesMedidaServer_Intf.pas',
|
||||||
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
|
|
||||||
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
|
|
||||||
schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas',
|
schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas',
|
||||||
schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas',
|
schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas',
|
||||||
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
|
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
|
||||||
@ -104,7 +102,9 @@ uses
|
|||||||
uRptAlbaranesCliente_Server in '..\Modulos\Albaranes de cliente\Reports\uRptAlbaranesCliente_Server.pas' {RptAlbaranesCliente: TDataModule},
|
uRptAlbaranesCliente_Server in '..\Modulos\Albaranes de cliente\Reports\uRptAlbaranesCliente_Server.pas' {RptAlbaranesCliente: TDataModule},
|
||||||
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
|
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
|
||||||
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
|
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
|
||||||
uStringsUtils in '..\Base\Utiles\uStringsUtils.pas';
|
uStringsUtils in '..\Base\Utiles\uStringsUtils.pas',
|
||||||
|
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
|
||||||
|
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas';
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
{$R ..\Servicios\RODLFile.res}
|
{$R ..\Servicios\RODLFile.res}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "1.0.0.0\0"
|
VALUE "FileVersion", "1.0.0.0\0"
|
||||||
VALUE "ProductVersion", "1.0.0.0\0"
|
VALUE "ProductVersion", "1.0.0.0\0"
|
||||||
VALUE "CompileDate", "martes, 05 de febrero de 2008 16:13\0"
|
VALUE "CompileDate", "martes, 05 de febrero de 2008 21:13\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user