Se adaptan los detalles para que puedan ser las cantidades decimales
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@640 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
7f1c25b8e8
commit
5f365284b3
@ -15,8 +15,8 @@ type
|
||||
IControllerDetallesArticulos = interface(IControllerDetallesBase)
|
||||
['{6E156796-DB1F-4727-BBFB-FBAEF2E5C098}']
|
||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; const ANuevaFila :Boolean = True);
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; Referencia: String; TipoReferencia: TEnumReferencia; AClienteID: Integer = -1; const ACantidad: Integer = 1): Boolean; overload;
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; IDArticulo: Integer; AClienteID: Integer = -1; const ACantidad: Integer = 1): Boolean; overload;
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; Referencia: String; TipoReferencia: TEnumReferencia; AClienteID: Integer = -1; const ACantidad: Float = 1): Boolean; overload;
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; IDArticulo: Integer; AClienteID: Integer = -1; const ACantidad: Float = 1): Boolean; overload;
|
||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
|
||||
procedure CambiarSignoDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = True);
|
||||
procedure AnadirConceptoInicial(ADetalles: IDAStronglyTypedDataTable; AConcepto: String);
|
||||
@ -32,15 +32,15 @@ type
|
||||
procedure RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); virtual;
|
||||
procedure RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); virtual;
|
||||
procedure RellenarGenerales(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); virtual;
|
||||
procedure RellenarCantidad(ADetalles: IDAStronglyTypedDataTable; const ACantidad: Integer); virtual;
|
||||
procedure RellenarDetalle(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Integer = 1); virtual;
|
||||
procedure Add(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Integer = 1); overload;
|
||||
procedure RellenarCantidad(ADetalles: IDAStronglyTypedDataTable; const ACantidad: Float); virtual;
|
||||
procedure RellenarDetalle(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Float = 1); virtual;
|
||||
procedure Add(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Float = 1); overload;
|
||||
|
||||
procedure AsignarController; virtual;
|
||||
|
||||
public
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; Referencia: String; TipoReferencia: TEnumReferencia; AClienteID: Integer = -1; const ACantidad: Integer = 1): Boolean; overload;
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; IDArticulo: Integer; AClienteID: Integer = -1; const ACantidad: Integer = 1): Boolean; overload;
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; Referencia: String; TipoReferencia: TEnumReferencia; AClienteID: Integer = -1; const ACantidad: Float = 1): Boolean; overload;
|
||||
function AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; IDArticulo: Integer; AClienteID: Integer = -1; const ACantidad: Float = 1): Boolean; overload;
|
||||
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; const ANuevaFila :Boolean = True); virtual;
|
||||
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
|
||||
procedure CambiarSignoDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = True);
|
||||
@ -67,7 +67,7 @@ const
|
||||
|
||||
procedure TControllerDetallesArticulos.ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo);
|
||||
var
|
||||
ACantidad: Integer;
|
||||
ACantidad: Float;
|
||||
begin
|
||||
if (Assigned(ADetalles) and Assigned(AArticulos)) then
|
||||
begin
|
||||
@ -87,7 +87,7 @@ begin
|
||||
if AArticulos.DataTable.Locate(CAMPO_ID, FieldByName(CAMPO_ID_ARTICULOS).AsVariant, []) then
|
||||
begin
|
||||
//Para mantener la cantidad que ya tuviera el detalle se debe guardar y volver a poner
|
||||
ACantidad := ADetalles.DataTable.FieldByName(CAMPO_CANTIDAD).AsInteger;
|
||||
ACantidad := ADetalles.DataTable.FieldByName(CAMPO_CANTIDAD).AsFloat;
|
||||
RellenarDetalle(ADetalles, AArticulos, ACantidad);
|
||||
end;
|
||||
except
|
||||
@ -105,7 +105,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TControllerDetallesArticulos.Add(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Integer);
|
||||
procedure TControllerDetallesArticulos.Add(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Float);
|
||||
begin
|
||||
if Assigned(ADetalles) and Assigned(AArticulos) then
|
||||
begin
|
||||
@ -137,7 +137,7 @@ begin
|
||||
end;
|
||||
|
||||
function TControllerDetallesArticulos.AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; IDArticulo, AClienteID: Integer;
|
||||
const ACantidad: Integer): Boolean;
|
||||
const ACantidad: Float): Boolean;
|
||||
var
|
||||
AArticulo: IBizArticulo;
|
||||
begin
|
||||
@ -243,10 +243,10 @@ begin
|
||||
First;
|
||||
while not EOF do
|
||||
begin
|
||||
if (FieldByName(CAMPO_CANTIDAD).AsInteger <> 0) then
|
||||
if (FieldByName(CAMPO_CANTIDAD).AsFloat <> 0) then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(CAMPO_CANTIDAD).AsInteger := (-1) * FieldByName(CAMPO_CANTIDAD).AsInteger;
|
||||
FieldByName(CAMPO_CANTIDAD).AsFloat := (-1) * FieldByName(CAMPO_CANTIDAD).AsFloat;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
@ -254,10 +254,10 @@ begin
|
||||
//Solo cambia el signo al seleccionado
|
||||
else
|
||||
begin
|
||||
if (FieldByName(CAMPO_CANTIDAD).AsInteger <> 0) then
|
||||
if (FieldByName(CAMPO_CANTIDAD).AsFloat <> 0) then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(CAMPO_CANTIDAD).AsInteger := (-1) * FieldByName(CAMPO_CANTIDAD).AsInteger;
|
||||
FieldByName(CAMPO_CANTIDAD).AsFloat := (-1) * FieldByName(CAMPO_CANTIDAD).AsFloat;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -300,7 +300,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TControllerDetallesArticulos.AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; Referencia: String; TipoReferencia: TEnumReferencia; AClienteID: Integer = -1; const ACantidad: Integer = 1): Boolean;
|
||||
function TControllerDetallesArticulos.AnadirArticulo(ADetalles: IDAStronglyTypedDataTable; Referencia: String; TipoReferencia: TEnumReferencia; AClienteID: Integer = -1; const ACantidad: Float = 1): Boolean;
|
||||
var
|
||||
AArticulo: IBizArticulo;
|
||||
begin
|
||||
@ -337,15 +337,15 @@ begin
|
||||
// Procedimiento que en los hijos se sobreescribirá para rellenar otros campos según necesidades
|
||||
end;
|
||||
|
||||
procedure TControllerDetallesArticulos.RellenarCantidad(ADetalles: IDAStronglyTypedDataTable; const ACantidad: Integer);
|
||||
procedure TControllerDetallesArticulos.RellenarCantidad(ADetalles: IDAStronglyTypedDataTable; const ACantidad: Float);
|
||||
begin
|
||||
if Assigned(ADetalles) then
|
||||
begin
|
||||
ADetalles.DataTable.FieldByName(CAMPO_CANTIDAD).AsInteger := ACantidad;
|
||||
ADetalles.DataTable.FieldByName(CAMPO_CANTIDAD).AsFloat := ACantidad;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TControllerDetallesArticulos.RellenarDetalle(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Integer);
|
||||
procedure TControllerDetallesArticulos.RellenarDetalle(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Float);
|
||||
begin
|
||||
if Assigned(ADetalles)
|
||||
and Assigned(AArticulos) then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user