Ticket #97 -> Corregido error al editar precios en los detalles de los documentos y desplazarse a otra fila utilizando los cursores.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@569 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
db9ec83967
commit
a5c1752eaf
@ -347,7 +347,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; Const WithPKKey: Boolean = False; Const WithFKKey: Boolean = False);
|
procedure DuplicarRegistro(ASource : TDADataTable; ATarget : TDADataTable; const WithPKKey: Boolean = False; const WithFKKey: Boolean = False);
|
||||||
var
|
var
|
||||||
i, j: Integer;
|
i, j: Integer;
|
||||||
ATargetField: TDAField;
|
ATargetField: TDAField;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 451
|
Width = 451
|
||||||
Height = 68
|
Height = 73
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonWidth = 141
|
ButtonWidth = 141
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
@ -42,24 +42,23 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
Top = 0
|
Top = 0
|
||||||
Action = actSubir
|
Action = actSubir
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Wrap = True
|
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton4: TToolButton
|
||||||
Left = 0
|
Left = 184
|
||||||
Top = 22
|
Top = 0
|
||||||
Action = actBajar
|
Action = actBajar
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
object ToolButton14: TToolButton
|
object ToolButton14: TToolButton
|
||||||
Left = 56
|
Left = 240
|
||||||
Top = 22
|
Top = 0
|
||||||
Action = FontEdit1
|
Action = FontEdit1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Wrap = True
|
Wrap = True
|
||||||
end
|
end
|
||||||
object FontName: TJvFontComboBox
|
object FontName: TJvFontComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 44
|
Top = 22
|
||||||
Width = 145
|
Width = 145
|
||||||
Height = 22
|
Height = 22
|
||||||
DroppedDownWidth = 145
|
DroppedDownWidth = 145
|
||||||
@ -75,7 +74,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
end
|
end
|
||||||
object FontSize: TEdit
|
object FontSize: TEdit
|
||||||
Left = 145
|
Left = 145
|
||||||
Top = 44
|
Top = 22
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Font Size|Select font size'
|
Hint = 'Font Size|Select font size'
|
||||||
@ -86,7 +85,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
end
|
end
|
||||||
object UpDown1: TUpDown
|
object UpDown1: TUpDown
|
||||||
Left = 171
|
Left = 171
|
||||||
Top = 44
|
Top = 22
|
||||||
Width = 16
|
Width = 16
|
||||||
Height = 22
|
Height = 22
|
||||||
Associate = FontSize
|
Associate = FontSize
|
||||||
@ -95,7 +94,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
end
|
end
|
||||||
object ToolButton13: TToolButton
|
object ToolButton13: TToolButton
|
||||||
Left = 187
|
Left = 187
|
||||||
Top = 44
|
Top = 22
|
||||||
Width = 8
|
Width = 8
|
||||||
Caption = 'ToolButton13'
|
Caption = 'ToolButton13'
|
||||||
ImageIndex = 10
|
ImageIndex = 10
|
||||||
@ -103,54 +102,55 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
end
|
end
|
||||||
object ToolButton6: TToolButton
|
object ToolButton6: TToolButton
|
||||||
Left = 195
|
Left = 195
|
||||||
Top = 44
|
Top = 22
|
||||||
Action = RichEditBold1
|
Action = RichEditBold1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
object ToolButton7: TToolButton
|
object ToolButton7: TToolButton
|
||||||
Left = 261
|
Left = 261
|
||||||
Top = 44
|
Top = 22
|
||||||
Action = RichEditItalic1
|
Action = RichEditItalic1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
object ToolButton8: TToolButton
|
object ToolButton8: TToolButton
|
||||||
Left = 328
|
Left = 328
|
||||||
Top = 44
|
Top = 22
|
||||||
Action = RichEditUnderline1
|
Action = RichEditUnderline1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
object ToolButton12: TToolButton
|
object ToolButton12: TToolButton
|
||||||
Left = 411
|
Left = 0
|
||||||
Top = 44
|
Top = 22
|
||||||
Width = 8
|
Width = 8
|
||||||
Caption = 'ToolButton12'
|
Caption = 'ToolButton12'
|
||||||
ImageIndex = 10
|
ImageIndex = 10
|
||||||
|
Wrap = True
|
||||||
Style = tbsSeparator
|
Style = tbsSeparator
|
||||||
end
|
end
|
||||||
object ToolButton9: TToolButton
|
object ToolButton9: TToolButton
|
||||||
Left = 419
|
Left = 0
|
||||||
Top = 44
|
Top = 49
|
||||||
Action = RichEditAlignLeft1
|
Action = RichEditAlignLeft1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
object ToolButton10: TToolButton
|
object ToolButton10: TToolButton
|
||||||
Left = 564
|
Left = 145
|
||||||
Top = 44
|
Top = 49
|
||||||
Action = RichEditAlignCenter1
|
Action = RichEditAlignCenter1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
object ToolButton11: TToolButton
|
object ToolButton11: TToolButton
|
||||||
Left = 689
|
Left = 270
|
||||||
Top = 44
|
Top = 49
|
||||||
Action = RichEditAlignRight1
|
Action = RichEditAlignRight1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGrid: TcxGrid
|
object cxGrid: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 94
|
Top = 99
|
||||||
Width = 451
|
Width = 451
|
||||||
Height = 210
|
Height = 205
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -161,14 +161,14 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
LookAndFeel.Kind = lfStandard
|
LookAndFeel.Kind = lfStandard
|
||||||
LookAndFeel.NativeStyle = True
|
LookAndFeel.NativeStyle = True
|
||||||
ExplicitTop = 99
|
|
||||||
ExplicitHeight = 205
|
|
||||||
object cxGridView: TcxGridDBTableView
|
object cxGridView: TcxGridDBTableView
|
||||||
NavigatorButtons.ConfirmDelete = False
|
NavigatorButtons.ConfirmDelete = False
|
||||||
FilterBox.Visible = fvNever
|
FilterBox.Visible = fvNever
|
||||||
OnEditing = cxGridViewEditing
|
OnEditing = cxGridViewEditing
|
||||||
OnEditKeyDown = cxGridViewEditKeyDown
|
OnEditKeyDown = cxGridViewEditKeyDown
|
||||||
OnEditValueChanged = cxGridViewEditValueChanged
|
OnEditValueChanged = cxGridViewEditValueChanged
|
||||||
|
OnFocusedItemChanged = cxGridViewFocusedItemChanged
|
||||||
|
OnFocusedRecordChanged = cxGridViewFocusedRecordChanged
|
||||||
OnInitEdit = cxGridViewInitEdit
|
OnInitEdit = cxGridViewInitEdit
|
||||||
DataController.DataSource = DADataSource
|
DataController.DataSource = DADataSource
|
||||||
DataController.Filter.Options = [fcoCaseInsensitive]
|
DataController.Filter.Options = [fcoCaseInsensitive]
|
||||||
@ -337,12 +337,11 @@ inherited frViewDetallesBase: TfrViewDetallesBase
|
|||||||
end
|
end
|
||||||
object TBXDock1: TTBXDock
|
object TBXDock1: TTBXDock
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 68
|
Top = 73
|
||||||
Width = 451
|
Width = 451
|
||||||
Height = 26
|
Height = 26
|
||||||
BackgroundOnToolbars = False
|
BackgroundOnToolbars = False
|
||||||
UseParentBackground = True
|
UseParentBackground = True
|
||||||
ExplicitTop = 73
|
|
||||||
object TBXToolbar1: TTBXToolbar
|
object TBXToolbar1: TTBXToolbar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|||||||
@ -192,6 +192,11 @@ type
|
|||||||
procedure actDetallesPegarUpdate(Sender: TObject);
|
procedure actDetallesPegarUpdate(Sender: TObject);
|
||||||
procedure actDetallesCortarExecute(Sender: TObject);
|
procedure actDetallesCortarExecute(Sender: TObject);
|
||||||
procedure actDetallesCortarUpdate(Sender: TObject);
|
procedure actDetallesCortarUpdate(Sender: TObject);
|
||||||
|
procedure cxGridViewFocusedItemChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedItem, AFocusedItem: TcxCustomGridTableItem);
|
||||||
|
procedure cxGridViewFocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
private
|
private
|
||||||
FController : IControllerDetallesBase;
|
FController : IControllerDetallesBase;
|
||||||
FDetalles: IDAStronglyTypedDataTable;
|
FDetalles: IDAStronglyTypedDataTable;
|
||||||
@ -242,6 +247,10 @@ implementation
|
|||||||
uses
|
uses
|
||||||
uDMBase, uCalculosUtils, dxOffice11, uSistemaFunc, uGridClipboardUtils;
|
uDMBase, uCalculosUtils, dxOffice11, uSistemaFunc, uGridClipboardUtils;
|
||||||
|
|
||||||
|
var
|
||||||
|
_FRecalculando : Boolean;
|
||||||
|
_FRecalcular : Boolean;
|
||||||
|
|
||||||
function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric;
|
function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric;
|
||||||
FontType: Integer; Data: Pointer): Integer; stdcall;
|
FontType: Integer; Data: Pointer): Integer; stdcall;
|
||||||
begin
|
begin
|
||||||
@ -588,17 +597,46 @@ end;
|
|||||||
procedure TfrViewDetallesBase.cxGridViewEditValueChanged(Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem);
|
procedure TfrViewDetallesBase.cxGridViewEditValueChanged(Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
cxGridView.BeginUpdate;
|
if not _FRecalcular and HayQueRecalcular(AItem) then
|
||||||
try
|
_FRecalcular := True;
|
||||||
if HayQueRecalcular(AItem) then
|
end;
|
||||||
begin
|
|
||||||
if Sender.Controller.EditingController.IsEditing then
|
|
||||||
Sender.Controller.EditingController.Edit.PostEditValue;
|
|
||||||
|
|
||||||
Controller.ActualizarTotales(Detalles);
|
procedure TfrViewDetallesBase.cxGridViewFocusedItemChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedItem,
|
||||||
|
AFocusedItem: TcxCustomGridTableItem);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if _FRecalcular and not _FRecalculando then //and HayQueRecalcular(APrevFocusedItem) then
|
||||||
|
begin
|
||||||
|
_FRecalculando := True;
|
||||||
|
try
|
||||||
|
if Sender.Controller.EditingController.IsEditing then
|
||||||
|
Sender.Controller.EditingController.Edit.PostEditValue;
|
||||||
|
Controller.ActualizarTotales(Detalles);
|
||||||
|
_FRecalcular := False;
|
||||||
|
finally
|
||||||
|
_FRecalculando := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesBase.cxGridViewFocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if _FRecalcular and not _FRecalculando then //and HayQueRecalcular(cxGridView.Controller.FocusedItem) then
|
||||||
|
begin
|
||||||
|
_FRecalculando := True;
|
||||||
|
try
|
||||||
|
if Sender.Controller.EditingController.IsEditing then
|
||||||
|
Sender.Controller.EditingController.Edit.PostEditValue;
|
||||||
|
Controller.ActualizarTotales(Detalles);
|
||||||
|
_FRecalcular := False;
|
||||||
|
finally
|
||||||
|
_FRecalculando := False;
|
||||||
end;
|
end;
|
||||||
finally
|
|
||||||
cxGridView.EndUpdate;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1079,4 +1117,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
_FRecalculando := False;
|
||||||
|
_FRecalcular := False;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -1,80 +1,101 @@
|
|||||||
inherited frViewDetallesArticulosParaVenta: TfrViewDetallesArticulosParaVenta
|
inherited frViewDetallesArticulosParaVenta: TfrViewDetallesArticulosParaVenta
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Height = 73
|
Height = 95
|
||||||
ExplicitHeight = 73
|
ExplicitHeight = 95
|
||||||
inherited ToolButton3: TToolButton
|
inherited ToolButton14: TToolButton [1]
|
||||||
Wrap = False
|
|
||||||
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
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited FontSize: TEdit
|
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited UpDown1: TUpDown
|
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton13: TToolButton
|
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton6: TToolButton
|
|
||||||
Top = 22
|
|
||||||
ExplicitTop = 22
|
|
||||||
end
|
|
||||||
inherited ToolButton7: TToolButton
|
|
||||||
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 = False
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton12: TToolButton [2]
|
||||||
|
Left = 65
|
||||||
|
Wrap = False
|
||||||
|
ExplicitLeft = 65
|
||||||
|
ExplicitHeight = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton13: TToolButton [3]
|
||||||
|
Left = 0
|
||||||
Wrap = True
|
Wrap = True
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 22
|
|
||||||
ExplicitHeight = 27
|
ExplicitHeight = 27
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton
|
inherited ToolButton2: TToolButton [4]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton3: TToolButton [5]
|
||||||
Left = 145
|
Left = 114
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 145
|
ExplicitLeft = 114
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton11: TToolButton
|
inherited ToolButton4: TToolButton [6]
|
||||||
Left = 270
|
Left = 169
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 270
|
ExplicitLeft = 169
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
|
inherited ToolButton7: TToolButton [7]
|
||||||
|
Left = 225
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 225
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited FontName: TJvFontComboBox [8]
|
||||||
|
Left = 292
|
||||||
|
Top = 49
|
||||||
|
ExplicitLeft = 292
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited ToolButton9: TToolButton [9]
|
||||||
|
Left = 437
|
||||||
|
ExplicitLeft = 437
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton [10]
|
||||||
|
Left = 582
|
||||||
|
Top = 49
|
||||||
|
Wrap = True
|
||||||
|
ExplicitLeft = 582
|
||||||
|
ExplicitTop = 49
|
||||||
|
end
|
||||||
|
inherited FontSize: TEdit [11]
|
||||||
|
Left = 0
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited UpDown1: TUpDown [12]
|
||||||
|
Left = 42
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 42
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited ToolButton6: TToolButton [13]
|
||||||
|
Left = 59
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 59
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited ToolButton10: TToolButton
|
||||||
|
Left = 125
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 125
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
|
inherited ToolButton11: TToolButton
|
||||||
|
Left = 250
|
||||||
|
Top = 71
|
||||||
|
ExplicitLeft = 250
|
||||||
|
ExplicitTop = 71
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Top = 99
|
Top = 121
|
||||||
Height = 205
|
Height = 183
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
|
inherited cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
|
||||||
Visible = False
|
Visible = False
|
||||||
@ -87,7 +108,6 @@ inherited frViewDetallesArticulosParaVenta: TfrViewDetallesArticulosParaVenta
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 73
|
Top = 95
|
||||||
ExplicitTop = 73
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -20,7 +20,6 @@ type
|
|||||||
var AProperties: TcxCustomEditProperties);
|
var AProperties: TcxCustomEditProperties);
|
||||||
procedure CustomViewDestroy(Sender: TObject);
|
procedure CustomViewDestroy(Sender: TObject);
|
||||||
procedure CustomViewShow(Sender: TObject);
|
procedure CustomViewShow(Sender: TObject);
|
||||||
procedure OnIMPORTEUNIDADPropertiesEditValueChanged(Sender: TObject);
|
|
||||||
|
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
@ -38,7 +37,6 @@ uses uControllerDetallesArticulos;
|
|||||||
procedure TfrViewDetallesArticulosParaVenta.CustomViewDestroy(Sender: TObject);
|
procedure TfrViewDetallesArticulosParaVenta.CustomViewDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
cxGridViewIMPORTEUNIDAD.Properties.OnEditValueChanged := Nil;
|
|
||||||
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := Nil;
|
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := Nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -50,33 +48,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
cxGridView.BeginUpdate;
|
cxGridView.BeginUpdate;
|
||||||
try
|
try
|
||||||
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := OnIMPORTEUNIDADGetProperties;
|
cxGridViewIMPORTEUNIDAD.OnGetPropertiesForEdit := OnIMPORTEUNIDADGetProperties;
|
||||||
finally
|
finally
|
||||||
cxGridView.EndUpdate;
|
cxGridView.EndUpdate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewDetallesArticulosParaVenta.OnIMPORTEUNIDADPropertiesEditValueChanged(
|
|
||||||
Sender: TObject);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
cxGridView.BeginUpdate;
|
|
||||||
try
|
|
||||||
// if HayQueRecalcular(AItem) then
|
|
||||||
// begin
|
|
||||||
|
|
||||||
if _FocusedView.Controller.EditingController.IsEditing then
|
|
||||||
_FocusedView.Controller.EditingController.Edit.PostEditValue;
|
|
||||||
|
|
||||||
Controller.ActualizarTotales(Detalles);
|
|
||||||
// end;
|
|
||||||
finally
|
|
||||||
cxGridView.EndUpdate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrViewDetallesArticulosParaVenta.OnIMPORTEUNIDADGetProperties(
|
procedure TfrViewDetallesArticulosParaVenta.OnIMPORTEUNIDADGetProperties(
|
||||||
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
||||||
var AProperties: TcxCustomEditProperties);
|
var AProperties: TcxCustomEditProperties);
|
||||||
@ -104,11 +82,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
AProperties := cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties;
|
AProperties := cxEditRepositoryComboBox_IMPORTEUNIDAD.Properties;
|
||||||
AProperties.OnEditValueChanged := OnIMPORTEUNIDADPropertiesEditValueChanged;
|
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
AProperties := cxEditRepositoryCurrencyItem_IMPORTEUNIDAD.Properties;
|
AProperties := cxEditRepositoryCurrencyItem_IMPORTEUNIDAD.Properties;
|
||||||
AProperties.OnEditValueChanged := OnIMPORTEUNIDADPropertiesEditValueChanged;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user