diff --git a/Source/Base/Utiles/uStringsUtils.pas b/Source/Base/Utiles/uStringsUtils.pas index 5ef88025..68ad7557 100644 --- a/Source/Base/Utiles/uStringsUtils.pas +++ b/Source/Base/Utiles/uStringsUtils.pas @@ -7,6 +7,7 @@ uses const DISPLAY_EUROS2 = '#,0.00 €'; + DISPLAY_PORCENTAJE = '#,0.00%'; procedure StringToStrings(Source:string; Delimiter:char; Target:TStrings); function StringsToString(Source:TStrings; Delimiter:char):string; diff --git a/Source/Informes/InfPresupuestoCliente.fr3 b/Source/Informes/InfPresupuestoCliente.fr3 index 72460705..a0454e78 100644 --- a/Source/Informes/InfPresupuestoCliente.fr3 +++ b/Source/Informes/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -95,10 +95,12 @@ - - + + + + - + @@ -107,7 +109,7 @@ - + diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm index d82756cf..cb440e29 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm +++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm @@ -64,21 +64,19 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor inherited pgPaginas: TPageControl Width = 873 Height = 534 - ActivePage = pagContenido TabOrder = 1 OnChanging = pgPaginasChanging ExplicitWidth = 873 - ExplicitHeight = 486 + ExplicitHeight = 534 inherited pagGeneral: TTabSheet ExplicitLeft = 4 ExplicitTop = 24 ExplicitWidth = 865 - ExplicitHeight = 455 + ExplicitHeight = 506 end object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 - ExplicitHeight = 458 inline frViewDetallesPedidoProveedor1: TfrViewDetallesPedidoProveedor Left = 0 Top = 0 @@ -96,15 +94,28 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor TabOrder = 0 ReadOnly = False ExplicitWidth = 865 - ExplicitHeight = 458 + ExplicitHeight = 506 inherited ToolBar1: TToolBar Width = 865 Height = 51 ExplicitWidth = 865 ExplicitHeight = 51 - inherited ToolButton14: TToolButton + inherited ToolButton3: TToolButton Wrap = False end + inherited ToolButton4: TToolButton + Left = 278 + Top = 0 + ExplicitLeft = 278 + ExplicitTop = 0 + end + inherited ToolButton14: TToolButton + Left = 334 + Top = 0 + Wrap = False + ExplicitLeft = 334 + ExplicitTop = 0 + end inherited FontName: TJvFontComboBox Left = 399 Top = 0 @@ -114,10 +125,10 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor inherited FontSize: TEdit Left = 544 Top = 0 - Width = 150 + Width = 166 ExplicitLeft = 544 ExplicitTop = 0 - ExplicitWidth = 150 + ExplicitWidth = 166 end inherited ToolButton13: TToolButton [7] Left = 0 @@ -154,10 +165,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor inherited ToolButton12: TToolButton Left = 233 Top = 27 - Wrap = False ExplicitLeft = 233 ExplicitTop = 27 - ExplicitHeight = 22 end inherited ToolButton9: TToolButton Left = 241 @@ -184,7 +193,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Height = 429 ExplicitTop = 77 ExplicitWidth = 865 - ExplicitHeight = 381 + ExplicitHeight = 429 end inherited TBXDock1: TTBXDock Top = 51 @@ -209,7 +218,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor object pagInicidencias: TTabSheet Caption = 'Incidencias' ImageIndex = 2 - ExplicitHeight = 458 inline frViewIncidenciasProv: TfrViewIncidencias Left = 0 Top = 0 @@ -225,7 +233,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor TabOrder = 0 ReadOnly = False ExplicitWidth = 865 - ExplicitHeight = 458 + ExplicitHeight = 506 inherited pnlSup: TPanel Width = 865 ExplicitWidth = 865 @@ -237,10 +245,10 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Width = 865 Height = 478 ExplicitWidth = 865 - ExplicitHeight = 430 + ExplicitHeight = 478 inherited eIncidencias: TcxDBMemo ExplicitWidth = 848 - ExplicitHeight = 403 + ExplicitHeight = 451 Height = 451 Width = 848 end @@ -255,7 +263,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor item Width = 200 end> - ExplicitTop = 614 + ExplicitTop = 659 ExplicitWidth = 879 end inline frViewTotales1: TfrViewTotales [4] diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm index 6fad4cd1..12ea195a 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm +++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm @@ -15,8 +15,6 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth, acsHeight] - ExplicitWidth = 787 - ExplicitHeight = 615 DesignSize = ( 965 546) @@ -40,7 +38,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True TabOrder = 1 - Width = 4 + Width = 333 end object edtFechaConfirmacion: TcxDBDateEdit Left = 599 @@ -61,7 +59,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True TabOrder = 10 - Width = 359 + Width = 344 end object edtFechaEntrega: TcxDBDateEdit Left = 599 @@ -80,7 +78,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True TabOrder = 11 - Width = 359 + Width = 344 end object memObservaciones: TcxDBMemo Left = 484 @@ -97,8 +95,8 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True TabOrder = 12 - Height = 380 - Width = 239 + Height = 200 + Width = 459 end object eReferencia: TcxDBTextEdit Left = 121 @@ -120,13 +118,13 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True TabOrder = 0 - Width = 359 + Width = 333 end inline frViewDireccionEntregaPedidoProv1: TfrViewDireccionEntregaPedidoProv Left = 22 Top = 168 Width = 432 - Height = 270 + Height = 248 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 @@ -138,12 +136,12 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor ExplicitLeft = 22 ExplicitTop = 168 ExplicitWidth = 432 - ExplicitHeight = 270 + ExplicitHeight = 248 inherited dxLayoutControl1: TdxLayoutControl Width = 432 - Height = 270 - ExplicitWidth = 355 - ExplicitHeight = 314 + Height = 248 + ExplicitWidth = 432 + ExplicitHeight = 270 inherited Bevel1: TBevel Top = 204 Width = 412 @@ -151,16 +149,16 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor ExplicitWidth = 412 end inherited rdxDestino1: TRadioButton - Width = 414 - ExplicitWidth = 414 + Width = 412 + ExplicitWidth = 412 end inherited rdxDestino2: TRadioButton - Width = 414 - ExplicitWidth = 414 + Width = 412 + ExplicitWidth = 412 end inherited cbListaAlmacenes: TcxDBLookupComboBox - ExplicitWidth = 399 - Width = 399 + ExplicitWidth = 397 + Width = 397 end inherited bModificar: TBitBtn Left = 294 @@ -169,24 +167,24 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor ExplicitTop = 168 end inherited txtDireccion: TStaticText - Width = 399 - Height = 62 - ExplicitWidth = 399 - ExplicitHeight = 62 + Width = 397 + Height = 29 + ExplicitWidth = 397 + ExplicitHeight = 29 end inherited RadioButton1: TRadioButton - Width = 454 - ExplicitWidth = 454 + Width = 412 + ExplicitWidth = 412 end inherited cbListaObras: TcxDBLookupComboBox - ExplicitWidth = 439 - Width = 439 + ExplicitWidth = 397 + Width = 397 end inherited edtEntregarA: TcxDBButtonEdit Top = 217 ExplicitTop = 217 - ExplicitWidth = 394 - Width = 394 + ExplicitWidth = 180 + Width = 180 end end inherited ActionList1: TActionList @@ -228,7 +226,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 2 - Width = 24 + Width = 195 end object bFormasPago: TButton Left = 322 @@ -281,7 +279,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 4 - Width = 221 + Width = 195 end object bVerPedidoCliente: TButton Left = 322 @@ -294,7 +292,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor inline frViewProveedorPedido1: TfrViewProveedorPedido Left = 484 Top = 28 - Width = 486 + Width = 459 Height = 149 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -306,59 +304,65 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor ReadOnly = False ExplicitLeft = 484 ExplicitTop = 28 - ExplicitWidth = 486 + ExplicitWidth = 459 ExplicitHeight = 149 inherited dxLayoutControl1: TdxLayoutControl - Width = 486 + Width = 459 Height = 266 - ExplicitWidth = 358 + ExplicitWidth = 486 ExplicitHeight = 266 inherited edtlNombre: TcxDBTextEdit - ExplicitWidth = 213 - Width = 213 + ExplicitWidth = 331 + Width = 331 end inherited edtNIFCIF: TcxDBTextEdit - ExplicitWidth = 213 - Width = 213 + ExplicitWidth = 331 + Width = 331 end inherited edtCalle: TcxDBTextEdit - ExplicitWidth = 213 - Width = 213 + ExplicitWidth = 331 + Width = 331 end inherited edtPoblacion: TcxDBTextEdit - ExplicitWidth = 95 - Width = 95 - end - inherited edtProvincia: TcxDBTextEdit ExplicitWidth = 213 Width = 213 end + inherited edtProvincia: TcxDBTextEdit + ExplicitWidth = 331 + Width = 331 + end inherited edtCodigoPostal: TcxDBTextEdit Left = 367 ExplicitLeft = 367 end + inherited Button1: TBitBtn + OnClick = frViewProveedorPedidoButton1Click + end + inherited Button2: TBitBtn + OnClick = frViewProveedorPedidoButton2Click + end inherited Button3: TBitBtn Left = 251 ExplicitLeft = 251 end inherited edtPersonaContacto: TcxDBTextEdit - ExplicitWidth = 213 - Width = 213 + ExplicitWidth = 331 + Width = 331 end inherited edtReferenciaAsignada: TcxDBTextEdit Left = 328 ExplicitLeft = 328 end inherited edtFax: TcxDBTextEdit - ExplicitWidth = 82 - Width = 82 + ExplicitWidth = 138 + Width = 138 end end end inline frViewObraReserva1: TfrViewObraReserva Left = 22 Top = 452 - Width = 331 + Width = 432 Height = 72 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -370,19 +374,20 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor ReadOnly = False ExplicitLeft = 22 ExplicitTop = 452 - ExplicitWidth = 331 + ExplicitWidth = 432 inherited dxLayoutControl1: TdxLayoutControl - Width = 331 + Width = 432 + ExplicitWidth = 331 DesignSize = ( - 331 + 432 72) inherited Label1: TLabel Width = 235 ExplicitWidth = 235 end inherited cbListaObrasReserva: TcxDBLookupComboBox - ExplicitWidth = 296 - Width = 296 + ExplicitWidth = 397 + Width = 397 end end end diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas index a972a65c..6645c360 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas @@ -233,10 +233,11 @@ begin with FDocumento, tbl_Cabecera do begin - { ----------------------- PENDIENTE - FDesBonificacion := FieldByName('DESBONIFICACION').AsVariant; - FImpBonificacion := FieldByName('IMPBONIFICACION').AsFloat; - ----------------------- } + if FieldByName('DESCUENTO').AsFloat > 0 then + FDesBonificacion := 'Bonificación ' + FormatFloat(DISPLAY_PORCENTAJE, FieldByName('DESCUENTO').AsFloat) + else + FDesBonificacion := Null; + FImpBonificacion := FieldByName('IMPORTE_DESCUENTO').AsFloat; ReplaceBookmark('CodigoPresupuestoCab', FieldByName('REFERENCIA').AsString); ReplaceBookmark('FechaPresupuestoCab', FieldByName('FECHA_PRESUPUESTO').AsString); diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas de cliente/uGenerarFacturasCliPreCliUtils.pas b/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas de cliente/uGenerarFacturasCliPreCliUtils.pas index 2ae6752a..a763a11a 100644 --- a/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas de cliente/uGenerarFacturasCliPreCliUtils.pas +++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Facturas de cliente/uGenerarFacturasCliPreCliUtils.pas @@ -388,6 +388,20 @@ begin end; end; + //En el caso de tener descuento (bonificación) el presupuesto se añade una fila con el importe + if (AListaPresupuestos.IMPORTE_DESCUENTO > 0) then + begin + AFacturasClienteController.DetallesController.Add(AFacturaActual.Detalles, TIPO_DETALLE_CONCEPTO); + with AFacturaActual.Detalles do + begin + Edit; + CONCEPTO := 'Bonificación ' + FloatToStr(AListaPresupuestos.DESCUENTO) + '%'; + CANTIDAD := -1; + IMPORTE_UNIDAD := AListaPresupuestos.IMPORTE_DESCUENTO; + Post; + end; + end; + // Añado el resumen AFacturasClienteController.DetallesController.Add(AFacturaActual.Detalles, TIPO_DETALLE_SUBTOTAL); with AFacturaActual.Detalles do