Insercion de BeginUpdate y EndUpdate en todos los tratamientos de detalles de la aplicacion
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@241 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
0f75c669a2
commit
cf52c8800f
@ -262,8 +262,6 @@ SET GENERATOR GEN_UNIDADES_MEDIDA_ID TO 1;
|
||||
CREATE GENERATOR GEN_USUARIOS_ID;
|
||||
SET GENERATOR GEN_USUARIOS_ID TO 1;
|
||||
|
||||
|
||||
|
||||
SET TERM ^ ;
|
||||
|
||||
|
||||
@ -1990,6 +1988,7 @@ SELECT
|
||||
FROM CONT_APUNTES
|
||||
LEFT JOIN CONT_ASIENTOS ON (CONT_ASIENTOS.ID = CONT_APUNTES.ID_ASIENTO)
|
||||
LEFT JOIN CONT_SUBCUENTAS ON (CONT_SUBCUENTAS.ID = CONT_APUNTES.ID_SUBCUENTA)
|
||||
order by CONT_ASIENTOS.FECHA_ASIENTO desc, CONT_ASIENTOS.ORDEN desc
|
||||
;
|
||||
|
||||
|
||||
|
||||
@ -24,6 +24,8 @@ type
|
||||
procedure Add(ADataTable: IDAStronglyTypedDataTable; TipoConcepto: Variant);
|
||||
procedure Delete(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray);
|
||||
procedure Move(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray; Posiciones: Integer);
|
||||
procedure BeginUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
procedure EndUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
|
||||
// procedure Copy(SMExport: TSMExportToClipboard);
|
||||
// procedure Paste;
|
||||
@ -44,8 +46,6 @@ type
|
||||
procedure Renumerar(DataTable: TDADataTable; LocalizaPosicion: Integer);
|
||||
function DesplazarNPosiciones(DataTable: TDADataTable; NumOrdenIni: Variant; NPosiciones: Variant): Integer;
|
||||
procedure Mover(DataTable: TDADataTable; Posicion: Integer; NumPosiciones: Integer);
|
||||
procedure BeginUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
procedure EndUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
|
||||
//Si en los hijos existen campos a tener en cuenta se sobreescribira este metodo
|
||||
procedure validarCampos(DataTable: TDADataTable); virtual;
|
||||
@ -75,6 +75,8 @@ type
|
||||
procedure Add(ADataTable: IDAStronglyTypedDataTable; TipoConcepto: Variant); virtual;
|
||||
procedure Delete(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray); virtual;
|
||||
procedure Move(ADataTable: IDAStronglyTypedDataTable; Posicion: TIntegerArray; Posiciones: Integer); virtual;
|
||||
procedure BeginUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
procedure EndUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
|
||||
// procedure Copy(SMExport: TSMExportToClipboard);
|
||||
// procedure Paste;
|
||||
@ -378,12 +380,14 @@ end;
|
||||
procedure TControllerDetallesBase.EndUpdate(ADataTable: IDAStronglyTypedDataTable);
|
||||
begin
|
||||
Dec(fUpdateCount);
|
||||
CalcularTotales(True, ADataTable.DataTable);
|
||||
ADataTable.DataTable.EnableControls;
|
||||
|
||||
if fUpdateCount = 0 then
|
||||
begin
|
||||
CalcularTotales(True, ADataTable.DataTable);
|
||||
AvisarObservadores(ADataTable);
|
||||
end;
|
||||
|
||||
ADataTable.DataTable.EnableControls;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 2,2,2,0
|
||||
PRODUCTVERSION 2,2,2,0
|
||||
FILEVERSION 2,2,3,0
|
||||
PRODUCTVERSION 2,2,3,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
@ -13,10 +13,10 @@ BEGIN
|
||||
BLOCK "0C0A04E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Rodax Software S.L.\0"
|
||||
VALUE "FileVersion", "2.2.2.0\0"
|
||||
VALUE "FileVersion", "2.2.3.0\0"
|
||||
VALUE "InternalName", "FactuGES\0"
|
||||
VALUE "ProductName", "FactuGES\0"
|
||||
VALUE "ProductVersion", "2.2.2.0\0"
|
||||
VALUE "ProductVersion", "2.2.3.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Binary file not shown.
@ -64,7 +64,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
||||
DroppedDownWidth = 145
|
||||
MaxMRUCount = 0
|
||||
FontName = 'Tahoma'
|
||||
ItemIndex = 34
|
||||
ItemIndex = 35
|
||||
Options = [foTrueTypeOnly, foNoOEMFonts, foScalableOnly, foWysiWyg]
|
||||
Sorted = True
|
||||
TabOrder = 2
|
||||
@ -195,7 +195,6 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.HeaderEndEllipsis = True
|
||||
OptionsView.Indicator = True
|
||||
OptionsView.NewItemRowInfoText = 'Click here to add a new row'
|
||||
Styles.ContentEven = cxStyleEven
|
||||
Styles.ContentOdd = cxStyleOdd
|
||||
Styles.Selection = cxStyleSelection
|
||||
@ -693,6 +692,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
||||
object cxStyleRepository: TcxStyleRepository
|
||||
Left = 8
|
||||
Top = 168
|
||||
PixelsPerInch = 96
|
||||
object cxStyleEven: TcxStyle
|
||||
end
|
||||
object cxStyleOdd: TcxStyle
|
||||
|
||||
@ -156,6 +156,11 @@ begin
|
||||
|
||||
ADetallesController := TDetallesFacturaClienteController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADestino);
|
||||
|
||||
AOrigen.DataTable.First;
|
||||
for i := 0 to AOrigen.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -176,6 +181,7 @@ begin
|
||||
AOrigen.Next;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADestino);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end;}
|
||||
@ -201,6 +207,11 @@ begin
|
||||
|
||||
ADetallesController := TDetallesFacturaClienteController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADestino);
|
||||
|
||||
AOrigen.DataTable.First;
|
||||
for i := 0 to AOrigen.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -221,6 +232,7 @@ begin
|
||||
AOrigen.Next;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADestino);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -102,12 +102,32 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
|
||||
Height = 370
|
||||
ExplicitWidth = 757
|
||||
ExplicitHeight = 370
|
||||
inherited eReferencia: TcxDBTextEdit
|
||||
ExplicitWidth = 159
|
||||
Width = 159
|
||||
end
|
||||
inherited edtFecha: TcxDBDateEdit
|
||||
ExplicitWidth = 159
|
||||
Width = 159
|
||||
end
|
||||
inherited memObservaciones: TcxDBMemo
|
||||
ExplicitWidth = 301
|
||||
ExplicitHeight = 159
|
||||
Height = 159
|
||||
Width = 301
|
||||
end
|
||||
inherited cbFormaPago: TcxDBLookupComboBox
|
||||
ExplicitWidth = 78
|
||||
Width = 78
|
||||
end
|
||||
inherited frViewTienda1: TfrViewTienda
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited cbTienda: TcxComboBox
|
||||
ExplicitWidth = 399
|
||||
Width = 399
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewClienteFactura1: TfrViewClienteFactura
|
||||
Width = 314
|
||||
ExplicitWidth = 314
|
||||
|
||||
@ -150,11 +150,11 @@ end;
|
||||
|
||||
procedure TfEditorFacturaCliente.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
frViewTotales1.cbRecargoEquivalencia.Properties.OnEditValueChanged := nil;
|
||||
frViewTotales1.eIVA.Properties.OnValidate := nil;
|
||||
frViewTotales1.ePorte.Properties.OnValidate := nil;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TfEditorFacturaCliente.FormShow(Sender: TObject);
|
||||
|
||||
@ -155,6 +155,11 @@ begin
|
||||
|
||||
ADetallesController := TDetallesFacturaProveedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADestino);
|
||||
|
||||
AOrigen.DataTable.First;
|
||||
for i := 0 to AOrigen.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -175,6 +180,7 @@ begin
|
||||
AOrigen.Next;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.BeginUpdate(ADestino);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end;
|
||||
@ -199,6 +205,11 @@ begin
|
||||
|
||||
ADetallesController := TDetallesFacturaProveedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADestino);
|
||||
|
||||
AOrigen.DataTable.First;
|
||||
for i := 0 to AOrigen.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -219,6 +230,7 @@ begin
|
||||
AOrigen.Next;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADestino);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -100,6 +100,11 @@ begin
|
||||
ADetalles := AAlbaran.Detalles;
|
||||
ADetallesController := TDetallesFacturaClieedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADetalles);
|
||||
|
||||
AArticulosPendientes.DataTable.First;
|
||||
for i := 0 to AArticulosPendientes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -124,6 +129,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADetalles);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end; }
|
||||
|
||||
@ -100,6 +100,11 @@ begin
|
||||
ADetalles := AAlbaran.Detalles;
|
||||
ADetallesController := TDetallesFacturaProveedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADetalles);
|
||||
|
||||
AArticulosPendientes.DataTable.First;
|
||||
for i := 0 to AArticulosPendientes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -124,6 +129,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADetalles);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end; }
|
||||
|
||||
@ -95,6 +95,11 @@ begin
|
||||
ADetalles := AAlbaran.Detalles;
|
||||
ADetallesController := TDetallesAlbaranClienteController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADetalles);
|
||||
|
||||
AArticulosPendientes.DataTable.First;
|
||||
for i := 0 to AArticulosPendientes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -119,6 +124,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADetalles);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -122,6 +122,11 @@ begin
|
||||
APedidoProv.ID_PEDIDO_CLIENTE := APedidoCli.ID;
|
||||
end;
|
||||
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(APedidoProv.Detalles);
|
||||
|
||||
ADetallesPedidosProvController.Add(APedidoProv.Detalles, TIPO_DETALLE_CONCEPTO);
|
||||
ADetallesPedidosProvController.AnadirArticulo(APedidoProv.Detalles, AArticulosPend.ID_ARTICULO);
|
||||
with APedidoProv.Detalles do
|
||||
@ -130,6 +135,7 @@ begin
|
||||
CANTIDAD := AArticulosPend.CANT_PENDIENTE_PEDIR;
|
||||
Post;
|
||||
end;
|
||||
ADetallesController.EndUpdate(APedidoProv.Detalles);
|
||||
AArticulosPend.DataTable.Next;
|
||||
end;
|
||||
|
||||
|
||||
@ -97,6 +97,11 @@ begin
|
||||
ADetalles := AAlbaran.Detalles;
|
||||
ADetallesController := TDetallesAlbaranProveedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADetalles);
|
||||
|
||||
AArticulosPendientes.DataTable.First;
|
||||
for i := 0 to AArticulosPendientes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -121,6 +126,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADetalles);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -99,6 +99,11 @@ begin
|
||||
ADetalles := APedido.Detalles;
|
||||
ADetallesController := TDetallesFacturaProveedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADetalles);
|
||||
|
||||
AArticulosPendientes.DataTable.First;
|
||||
for i := 0 to AArticulosPendientes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -123,6 +128,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADetalles);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end; }
|
||||
|
||||
@ -99,6 +99,11 @@ begin
|
||||
ADetalles := AAlbaran.Detalles;
|
||||
ADetallesController := TDetallesFacturaProveedorController.Create;
|
||||
try
|
||||
//OJO IMPORTANTE
|
||||
//Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para
|
||||
//obligarle siempre a recalcular los detalles una sola vez
|
||||
ADetallesController.BeginUpdate(ADetalles);
|
||||
|
||||
AArticulosPendientes.DataTable.First;
|
||||
for i := 0 to AArticulosPendientes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
@ -123,6 +128,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADetallesController.EndUpdate(ADetalles);
|
||||
ADetallesController := NIL;
|
||||
end;
|
||||
end; }
|
||||
|
||||
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
|
||||
@ -29,7 +29,6 @@
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">2</VersionInfo><VersionInfo Name="Release">3</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">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.2.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.2.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">viernes, 23 de mayo de 2008 17:19</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Servidor.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 2,2,2,0
|
||||
PRODUCTVERSION 2,2,2,0
|
||||
FILEVERSION 2,2,3,0
|
||||
PRODUCTVERSION 2,2,3,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
@ -13,10 +13,10 @@ BEGIN
|
||||
BLOCK "0C0A04E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Rodax Software S.L.\0"
|
||||
VALUE "FileVersion", "2.2.2.0\0"
|
||||
VALUE "FileVersion", "2.2.3.0\0"
|
||||
VALUE "ProductName", "FactuGES (Servidor)\0"
|
||||
VALUE "ProductVersion", "2.2.2.0\0"
|
||||
VALUE "CompileDate", "viernes, 23 de mayo de 2008 17:19\0"
|
||||
VALUE "ProductVersion", "2.2.3.0\0"
|
||||
VALUE "CompileDate", "lunes, 26 de mayo de 2008 18:35\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user