Modificación de viewDetallesDTO en la base para poder introducir un valor en importe neto y a partir de el calcular el dto, solo se habilita la funcionalidad en albaranes de proveedor y facturas de proveedor
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@138 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
6bfc50d3c6
commit
7be510cf2f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -29,15 +29,18 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO
|
||||
DataBinding.FieldName = 'DESCUENTO'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
|
||||
Properties.EditFormat = ',0.00;-,0.00'
|
||||
Properties.MaxValue = 100.000000000000000000
|
||||
end
|
||||
object cxGridViewIMPORTENETO: TcxGridDBColumn [7]
|
||||
Caption = 'Importe neto'
|
||||
DataBinding.ValueType = 'Currency'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364
|
||||
Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnValidate = cxGridViewIMPORTENETOPropertiesValidate
|
||||
OnGetDisplayText = cxGridViewIMPORTENETOGetDisplayText
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
Options.Editing = False
|
||||
@ -53,7 +56,6 @@ inherited frViewDetallesDTO: TfrViewDetallesDTO
|
||||
end
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
ExplicitTop = 72
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
ExplicitWidth = 447
|
||||
end
|
||||
|
||||
@ -23,6 +23,8 @@ type
|
||||
cxGridViewIMPORTENETO: TcxGridDBColumn;
|
||||
procedure cxGridViewIMPORTENETOGetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
||||
var AText: string);
|
||||
procedure cxGridViewIMPORTENETOPropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
protected
|
||||
function HayQueRecalcular(AItem: TcxCustomGridTableItem): Boolean; override;
|
||||
end;
|
||||
@ -32,8 +34,7 @@ implementation
|
||||
|
||||
{ TfrViewDetallesDTO }
|
||||
|
||||
procedure TfrViewDetallesDTO.cxGridViewIMPORTENETOGetDisplayText(
|
||||
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
||||
procedure TfrViewDetallesDTO.cxGridViewIMPORTENETOGetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
|
||||
var AText: string);
|
||||
var
|
||||
ImporteNeto : Double;
|
||||
@ -53,6 +54,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesDTO.cxGridViewIMPORTENETOPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||
var Error: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
if not VarIsNull(DisplayValue) then
|
||||
begin
|
||||
cxGridViewDESCUENTO.DataBinding.Field.Value := ((cxGridViewIMPORTEUNIDAD.DataBinding.Field.Value - DisplayValue) * 100) / cxGridViewIMPORTEUNIDAD.DataBinding.Field.Value;
|
||||
Controller.ActualizarTotales(Detalles);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrViewDetallesDTO.HayQueRecalcular(AItem: TcxCustomGridTableItem): Boolean;
|
||||
begin
|
||||
Result := inherited HayQueRecalcular(AItem);
|
||||
|
||||
Binary file not shown.
@ -147,20 +147,20 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
inherited pgPaginas: TPageControl
|
||||
Width = 765
|
||||
Height = 460
|
||||
ActivePage = pagContenido
|
||||
TabOrder = 1
|
||||
OnChanging = pgPaginasChanging
|
||||
ExplicitWidth = 765
|
||||
ExplicitHeight = 425
|
||||
ExplicitHeight = 460
|
||||
inherited pagGeneral: TTabSheet
|
||||
ExplicitLeft = 4
|
||||
ExplicitTop = 24
|
||||
ExplicitWidth = 757
|
||||
ExplicitHeight = 397
|
||||
ExplicitHeight = 432
|
||||
end
|
||||
object pagContenido: TTabSheet
|
||||
Caption = 'Contenido'
|
||||
ImageIndex = 1
|
||||
ExplicitHeight = 397
|
||||
inline frViewDetallesAlbaranProveedor1: TfrViewDetallesAlbaranProveedor
|
||||
Left = 0
|
||||
Top = 0
|
||||
@ -178,7 +178,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
TabOrder = 0
|
||||
ReadOnly = False
|
||||
ExplicitWidth = 757
|
||||
ExplicitHeight = 397
|
||||
ExplicitHeight = 432
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 757
|
||||
ExplicitWidth = 757
|
||||
@ -187,7 +187,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
Width = 757
|
||||
Height = 360
|
||||
ExplicitWidth = 757
|
||||
ExplicitHeight = 325
|
||||
ExplicitHeight = 360
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
Width = 757
|
||||
@ -201,7 +201,6 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
object pagInicidencias: TTabSheet
|
||||
Caption = 'Incidencias'
|
||||
ImageIndex = 2
|
||||
ExplicitHeight = 397
|
||||
inline frViewIncidenciasCli: TfrViewIncidencias
|
||||
Left = 0
|
||||
Top = 0
|
||||
@ -217,7 +216,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
TabOrder = 0
|
||||
ReadOnly = False
|
||||
ExplicitWidth = 757
|
||||
ExplicitHeight = 397
|
||||
ExplicitHeight = 432
|
||||
inherited pnlSup: TPanel
|
||||
Width = 757
|
||||
ExplicitWidth = 757
|
||||
@ -229,10 +228,10 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
Width = 757
|
||||
Height = 404
|
||||
ExplicitWidth = 757
|
||||
ExplicitHeight = 423
|
||||
ExplicitHeight = 404
|
||||
inherited eIncidencias: TcxDBMemo
|
||||
ExplicitWidth = 734
|
||||
ExplicitHeight = 390
|
||||
ExplicitHeight = 371
|
||||
Height = 371
|
||||
Width = 734
|
||||
end
|
||||
@ -247,7 +246,7 @@ inherited fEditorAlbaranProveedor: TfEditorAlbaranProveedor
|
||||
item
|
||||
Width = 200
|
||||
end>
|
||||
ExplicitTop = 546
|
||||
ExplicitTop = 600
|
||||
ExplicitWidth = 765
|
||||
end
|
||||
inline frViewTotales1: TfrViewTotales [4]
|
||||
|
||||
@ -1,2 +1,10 @@
|
||||
inherited frViewDetallesAlbaranProveedor: TfrViewDetallesAlbaranProveedor
|
||||
inherited cxGrid: TcxGrid
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
||||
Properties.ReadOnly = False
|
||||
Options.Editing = True
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -71,6 +71,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
||||
inherited pgPaginas: TPageControl
|
||||
Width = 788
|
||||
Height = 317
|
||||
ActivePage = pagContenido
|
||||
OnChanging = pgPaginasChanging
|
||||
ExplicitWidth = 788
|
||||
ExplicitHeight = 317
|
||||
@ -196,49 +197,49 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
|
||||
ExplicitLeft = 334
|
||||
ExplicitTop = 2
|
||||
end
|
||||
inherited FontName: TJvFontComboBox
|
||||
inherited FontSize: TEdit [5]
|
||||
Left = 0
|
||||
ExplicitLeft = 0
|
||||
end
|
||||
inherited FontSize: TEdit
|
||||
Left = 145
|
||||
ExplicitLeft = 145
|
||||
inherited UpDown1: TUpDown [6]
|
||||
Left = 42
|
||||
ExplicitLeft = 42
|
||||
end
|
||||
inherited UpDown1: TUpDown
|
||||
Left = 203
|
||||
ExplicitLeft = 203
|
||||
inherited FontName: TJvFontComboBox [7]
|
||||
Left = 59
|
||||
ExplicitLeft = 59
|
||||
end
|
||||
inherited ToolButton13: TToolButton
|
||||
Left = 220
|
||||
ExplicitLeft = 220
|
||||
Left = 204
|
||||
ExplicitLeft = 204
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
Left = 228
|
||||
ExplicitLeft = 228
|
||||
Left = 212
|
||||
ExplicitLeft = 212
|
||||
end
|
||||
inherited ToolButton7: TToolButton
|
||||
Left = 262
|
||||
ExplicitLeft = 262
|
||||
Left = 246
|
||||
ExplicitLeft = 246
|
||||
end
|
||||
inherited ToolButton8: TToolButton
|
||||
Left = 296
|
||||
ExplicitLeft = 296
|
||||
Left = 280
|
||||
ExplicitLeft = 280
|
||||
end
|
||||
inherited ToolButton12: TToolButton
|
||||
Left = 330
|
||||
ExplicitLeft = 330
|
||||
Left = 314
|
||||
ExplicitLeft = 314
|
||||
end
|
||||
inherited ToolButton9: TToolButton
|
||||
Left = 338
|
||||
ExplicitLeft = 338
|
||||
Left = 322
|
||||
ExplicitLeft = 322
|
||||
end
|
||||
inherited ToolButton10: TToolButton
|
||||
Left = 372
|
||||
ExplicitLeft = 372
|
||||
Left = 356
|
||||
ExplicitLeft = 356
|
||||
end
|
||||
inherited ToolButton11: TToolButton
|
||||
Left = 406
|
||||
ExplicitLeft = 406
|
||||
Left = 390
|
||||
ExplicitLeft = 390
|
||||
end
|
||||
end
|
||||
inherited cxGrid: TcxGrid
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
inherited frViewDetallesFacturaProveedor: TfrViewDetallesFacturaProveedor
|
||||
inherited TBXDock1: TTBXDock
|
||||
ExplicitTop = 46
|
||||
ExplicitWidth = 451
|
||||
inherited cxGrid: TcxGrid
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
|
||||
Properties.ReadOnly = False
|
||||
Options.Editing = True
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user