Arreglo para que cuando añadimos conceptos se ponga el tipo de articulo del capitulo en el que esta
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@430 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
8d0131ca98
commit
10fcd1692a
@ -17,6 +17,7 @@ type
|
||||
|
||||
function DarPropiedades: IBizPropiedades;
|
||||
procedure AnadirCapitulo (const Tipo: String; ADetalles: IDAStronglyTypedDataTable);
|
||||
procedure SetTipoArticulo(ADetalles: IDAStronglyTypedDataTable; ATipo: String);
|
||||
end;
|
||||
|
||||
TDetallesPresupuestoClienteController = class(TControllerDetallesArticulos, IDetallesPresupuestoClienteController)
|
||||
@ -48,6 +49,8 @@ type
|
||||
|
||||
//Se sobre escribe para hacer otro recorrido y rellenar el tipo_articulo a todos los conceptos de los capitulos
|
||||
procedure ValidarDetalles(ADataTable: IDAStronglyTypedDataTable); override;
|
||||
|
||||
procedure SetTipoArticulo(ADetalles: IDAStronglyTypedDataTable; ATipo: String);
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -286,6 +289,17 @@ begin
|
||||
// ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := 0;
|
||||
end;
|
||||
|
||||
procedure TDetallesPresupuestoClienteController.SetTipoArticulo(
|
||||
ADetalles: IDAStronglyTypedDataTable; ATipo: String);
|
||||
begin
|
||||
if assigned(ADetalles) then
|
||||
begin
|
||||
ADetalles.DataTable.Edit;
|
||||
ADetalles.DataTable.FieldByName('TIPO_ARTICULO').AsString := ATipo;
|
||||
ADetalles.DataTable.Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDetallesPresupuestoClienteController.ValidarCampos(DataTable: TDADataTable);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
||||
Width = 667
|
||||
Height = 446
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 667
|
||||
inherited ToolButton4: TToolButton
|
||||
Wrap = False
|
||||
end
|
||||
@ -59,8 +56,6 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
||||
end
|
||||
end
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 667
|
||||
Height = 374
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewID_ARTICULO: TcxGridDBColumn
|
||||
Width = 57
|
||||
@ -113,9 +108,8 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
|
||||
end
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
Width = 667
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
ExplicitWidth = 614
|
||||
ExplicitWidth = 451
|
||||
object TBXSubmenuItem1: TTBXSubmenuItem [0]
|
||||
Caption = 'A'#241'adir ...'
|
||||
object TBXItem14: TTBXItem
|
||||
|
||||
@ -60,6 +60,7 @@ type
|
||||
procedure actCapituloCocinaExecute(Sender: TObject);
|
||||
procedure actCapituloElectrodomesticosExecute(Sender: TObject);
|
||||
procedure actCapituloVariosExecute(Sender: TObject);
|
||||
procedure actAnadirExecute(Sender: TObject);
|
||||
|
||||
private
|
||||
procedure AnadirCapitulo(const Tipo: String);
|
||||
@ -88,6 +89,21 @@ uCalculosUtils;
|
||||
|
||||
{ TfrViewDetallesPresupuestoProveedor }
|
||||
|
||||
procedure TfrViewDetallesPresupuestoCliente.actAnadirExecute(Sender: TObject);
|
||||
var
|
||||
AuxTipo: String;
|
||||
begin
|
||||
AuxTipo := '';
|
||||
//En el caso de estar dentro de un capitulo almacenamos el tipo de articulo del capitulo
|
||||
if FPresupuesto.Detalles.TIPO_DETALLE = TIPO_DETALLE_CONCEPTO then
|
||||
AuxTipo := FPresupuesto.Detalles.TIPO_ARTICULO;
|
||||
|
||||
inherited;
|
||||
|
||||
//Asignamos el tipo de articulo del capitulo
|
||||
(Controller as IDetallesPresupuestoClienteController).SetTipoArticulo(Detalles, AuxTipo);
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesPresupuestoCliente.actAsignarDescuentoExecute(Sender: TObject);
|
||||
var
|
||||
AuxTop, AuxRow:Integer;
|
||||
|
||||
Binary file not shown.
@ -16,7 +16,7 @@ BEGIN
|
||||
VALUE "FileVersion", "2.3.4.0\0"
|
||||
VALUE "ProductName", "FactuGES (Servidor)\0"
|
||||
VALUE "ProductVersion", "2.3.4.0\0"
|
||||
VALUE "CompileDate", "martes, 04 de agosto de 2009 16:48\0"
|
||||
VALUE "CompileDate", "lunes, 10 de agosto de 2009 13:11\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user