diff --git a/Output/Debug/Cliente/AlbaranesProveedor_view.bpl b/Output/Debug/Cliente/AlbaranesProveedor_view.bpl index 9853f053..28ad5ac8 100644 Binary files a/Output/Debug/Cliente/AlbaranesProveedor_view.bpl and b/Output/Debug/Cliente/AlbaranesProveedor_view.bpl differ diff --git a/Output/Debug/Cliente/Articulos_view.bpl b/Output/Debug/Cliente/Articulos_view.bpl index 134be57d..f8fe2c60 100644 Binary files a/Output/Debug/Cliente/Articulos_view.bpl and b/Output/Debug/Cliente/Articulos_view.bpl differ diff --git a/Output/Debug/Cliente/FacturasProveedor_view.bpl b/Output/Debug/Cliente/FacturasProveedor_view.bpl index a1ab5591..121a5c50 100644 Binary files a/Output/Debug/Cliente/FacturasProveedor_view.bpl and b/Output/Debug/Cliente/FacturasProveedor_view.bpl differ diff --git a/Output/Debug/Cliente/GUIBase.bpl b/Output/Debug/Cliente/GUIBase.bpl index 96315dff..dd0b72f3 100644 Binary files a/Output/Debug/Cliente/GUIBase.bpl and b/Output/Debug/Cliente/GUIBase.bpl differ diff --git a/Source/Base/GUIBase/uViewDetallesDTO.dfm b/Source/Base/GUIBase/uViewDetallesDTO.dfm index 3c064d09..618d7d45 100644 --- a/Source/Base/GUIBase/uViewDetallesDTO.dfm +++ b/Source/Base/GUIBase/uViewDetallesDTO.dfm @@ -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 diff --git a/Source/Base/GUIBase/uViewDetallesDTO.pas b/Source/Base/GUIBase/uViewDetallesDTO.pas index 8625ffb3..8467dc7d 100644 --- a/Source/Base/GUIBase/uViewDetallesDTO.pas +++ b/Source/Base/GUIBase/uViewDetallesDTO.pas @@ -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); diff --git a/Source/Lib/GUIBase.dcp b/Source/Lib/GUIBase.dcp index f7dcec1d..6afe6646 100644 Binary files a/Source/Lib/GUIBase.dcp and b/Source/Lib/GUIBase.dcp differ diff --git a/Source/Modulos/Albaranes de proveedor/Views/uEditorAlbaranProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uEditorAlbaranProveedor.dfm index b2d18103..1e8b3825 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uEditorAlbaranProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uEditorAlbaranProveedor.dfm @@ -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] diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm index 8e18230a..a5188ae9 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewDetallesAlbaranProveedor.dfm @@ -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 diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm index fd4801f5..7465fbe0 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm @@ -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 diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm index 937f71c7..15ac118d 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewDetallesFacturaProveedor.dfm @@ -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 diff --git a/Source/Modulos/Lib/AlbaranesProveedor_view.dcp b/Source/Modulos/Lib/AlbaranesProveedor_view.dcp index 224baff7..1d9d32b9 100644 Binary files a/Source/Modulos/Lib/AlbaranesProveedor_view.dcp and b/Source/Modulos/Lib/AlbaranesProveedor_view.dcp differ diff --git a/Source/Modulos/Lib/Articulos_view.dcp b/Source/Modulos/Lib/Articulos_view.dcp index 5444a3d1..8c433582 100644 Binary files a/Source/Modulos/Lib/Articulos_view.dcp and b/Source/Modulos/Lib/Articulos_view.dcp differ diff --git a/Source/Modulos/Lib/FacturasProveedor_view.dcp b/Source/Modulos/Lib/FacturasProveedor_view.dcp index 209b6302..757a2128 100644 Binary files a/Source/Modulos/Lib/FacturasProveedor_view.dcp and b/Source/Modulos/Lib/FacturasProveedor_view.dcp differ