diff --git a/Source/Informes/1/InfPedidoCliente.fr3 b/Source/Informes/1/InfPedidoCliente.fr3 index d8f4a1a..1cff273 100644 --- a/Source/Informes/1/InfPedidoCliente.fr3 +++ b/Source/Informes/1/InfPedidoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/Source/Informes/2/InfPedidoCliente.fr3 b/Source/Informes/2/InfPedidoCliente.fr3 index afc60f3..7514e5a 100644 --- a/Source/Informes/2/InfPedidoCliente.fr3 +++ b/Source/Informes/2/InfPedidoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/Source/Informes/4/InfPedidoCliente.fr3 b/Source/Informes/4/InfPedidoCliente.fr3 index bcd6269..edc2dec 100644 --- a/Source/Informes/4/InfPedidoCliente.fr3 +++ b/Source/Informes/4/InfPedidoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/Source/Informes/5/InfPedidoCliente.fr3 b/Source/Informes/5/InfPedidoCliente.fr3 index 5dbcc2f..142a178 100644 --- a/Source/Informes/5/InfPedidoCliente.fr3 +++ b/Source/Informes/5/InfPedidoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/Source/Informes/6/InfPedidoCliente.fr3 b/Source/Informes/6/InfPedidoCliente.fr3 index 90f1a0a..754627e 100644 --- a/Source/Informes/6/InfPedidoCliente.fr3 +++ b/Source/Informes/6/InfPedidoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/Source/Informes/8/InfPedidoCliente.fr3 b/Source/Informes/8/InfPedidoCliente.fr3 index 32cff63..11f41f5 100644 --- a/Source/Informes/8/InfPedidoCliente.fr3 +++ b/Source/Informes/8/InfPedidoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas index 6842b2e..0d15694 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas +++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas @@ -317,7 +317,9 @@ var begin ShowHourglassCursor; try - Result := BuscarAlbaranesNormales; +// Result := BuscarAlbaranesNormales; +// Se requiere poder seleccionar tanto albaranes como ordenes de devolución para generar una factura + Result := BuscarTodos; with Result.DataTable.DynamicWhere do begin diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm index a7b9ad8..facc0d6 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm @@ -231,7 +231,13 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente ExplicitTop = 0 ExplicitWidth = 186 end - inherited ToolButton13: TToolButton [7] + inherited UpDown1: TUpDown + Left = 730 + Top = 0 + ExplicitLeft = 730 + ExplicitTop = 0 + end + inherited ToolButton13: TToolButton Left = 0 Top = 0 Wrap = True @@ -239,52 +245,46 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente ExplicitTop = 0 ExplicitHeight = 27 end - inherited UpDown1: TUpDown [8] + inherited ToolButton6: TToolButton Left = 0 Top = 27 ExplicitLeft = 0 ExplicitTop = 27 end - inherited ToolButton6: TToolButton - Left = 17 - Top = 27 - ExplicitLeft = 17 - ExplicitTop = 27 - end inherited ToolButton7: TToolButton - Left = 83 + Left = 66 Top = 27 - ExplicitLeft = 83 + ExplicitLeft = 66 ExplicitTop = 27 end inherited ToolButton8: TToolButton - Left = 150 + Left = 133 Top = 27 - ExplicitLeft = 150 + ExplicitLeft = 133 ExplicitTop = 27 end inherited ToolButton12: TToolButton - Left = 233 + Left = 216 Top = 27 - ExplicitLeft = 233 + ExplicitLeft = 216 ExplicitTop = 27 end inherited ToolButton9: TToolButton - Left = 241 + Left = 224 Top = 27 - ExplicitLeft = 241 + ExplicitLeft = 224 ExplicitTop = 27 end inherited ToolButton10: TToolButton - Left = 386 + Left = 369 Top = 27 - ExplicitLeft = 386 + ExplicitLeft = 369 ExplicitTop = 27 end inherited ToolButton11: TToolButton - Left = 511 + Left = 494 Top = 27 - ExplicitLeft = 511 + ExplicitLeft = 494 ExplicitTop = 27 end end @@ -392,52 +392,52 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente ExplicitHeight = 78 inherited Bevel3: TBevel Left = 428 - Top = 11 + Top = -129 Width = 7 Height = 54 ExplicitLeft = 428 - ExplicitTop = 11 + ExplicitTop = -129 ExplicitWidth = 7 ExplicitHeight = 54 end inherited Bevel4: TBevel Left = 544 - Top = 53 + Top = -87 Width = 192 ExplicitLeft = 544 - ExplicitTop = 53 + ExplicitTop = -87 ExplicitWidth = 192 end inherited Bevel1: TBevel Left = 544 - Top = 169 + Top = 29 Width = 73 ExplicitLeft = 544 - ExplicitTop = 169 + ExplicitTop = 29 ExplicitWidth = 73 end inherited Bevel2: TBevel Left = 120 - Top = 171 + Top = 31 Width = 368 ExplicitLeft = 120 - ExplicitTop = 171 + ExplicitTop = 31 ExplicitWidth = 368 end inherited ImporteDto: TcxDBCurrencyEdit Left = 191 - Top = 38 + Top = -102 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 191 - ExplicitTop = 38 + ExplicitTop = -102 end inherited ImporteIVA: TcxDBCurrencyEdit Left = 615 - Top = 88 + Top = -52 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True @@ -445,37 +445,37 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 615 - ExplicitTop = 88 + ExplicitTop = -52 ExplicitWidth = 182 Width = 182 end inherited ImporteTotal: TcxDBCurrencyEdit Left = 545 - Top = 142 + Top = 2 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 545 - ExplicitTop = 142 + ExplicitTop = 2 ExplicitWidth = 252 Width = 252 end inherited edtDescuento: TcxDBSpinEdit Left = 120 - Top = 38 + Top = -102 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 120 - ExplicitTop = 38 + ExplicitTop = -102 end inherited edtIVA: TcxDBSpinEdit Left = 544 - Top = 88 + Top = -52 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True @@ -483,24 +483,24 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 544 - ExplicitTop = 88 + ExplicitTop = -52 end inherited ImporteBase: TcxDBCurrencyEdit Left = 544 - Top = 11 + Top = -129 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 544 - ExplicitTop = 11 + ExplicitTop = -129 ExplicitWidth = 253 Width = 253 end inherited edtRE: TcxDBSpinEdit Left = 544 - Top = 115 + Top = -25 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True @@ -508,11 +508,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 544 - ExplicitTop = 115 + ExplicitTop = -25 end inherited ImporteRE: TcxDBCurrencyEdit Left = 615 - Top = 115 + Top = -25 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True @@ -520,13 +520,13 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 615 - ExplicitTop = 115 + ExplicitTop = -25 ExplicitWidth = 182 Width = 182 end inherited eImporteNeto: TcxDBCurrencyEdit Left = 120 - Top = 11 + Top = -129 Enabled = False Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True @@ -534,11 +534,11 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 120 - ExplicitTop = 11 + ExplicitTop = -129 end inherited ePorte: TcxDBCurrencyEdit Left = 120 - Top = 65 + Top = -75 Properties.OnValidate = frViewTotales1ePortePropertiesValidate Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True @@ -546,28 +546,28 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 120 - ExplicitTop = 65 + ExplicitTop = -75 end inherited eIVA: TcxDBLookupComboBox Left = 120 - Top = 92 + Top = -48 DataBinding.DataField = '' Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 120 - ExplicitTop = 92 + ExplicitTop = -48 end inherited bTiposIVA: TButton Left = 280 - Top = 92 + Top = -48 ExplicitLeft = 280 - ExplicitTop = 92 + ExplicitTop = -48 end inherited cbRecargoEquivalencia: TcxDBCheckBox Left = 120 - Top = 119 + Top = -21 DataBinding.DataField = '' DataBinding.DataSource = nil Style.LookAndFeel.SkinName = '' @@ -575,43 +575,43 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 120 - ExplicitTop = 119 + ExplicitTop = -21 ExplicitWidth = 221 Width = 221 end inherited edtRetencion: TcxDBSpinEdit Left = 544 - Top = 189 + Top = 49 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 544 - ExplicitTop = 189 + ExplicitTop = 49 end inherited edtImporteRetencion: TcxDBCurrencyEdit Left = 615 - Top = 189 + Top = 49 Style.LookAndFeel.SkinName = '' Style.IsFontAssigned = True StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 615 - ExplicitTop = 189 + ExplicitTop = 49 ExplicitWidth = 180 Width = 180 end inherited edtFechaRetencion: TcxDBDateEdit Left = 120 - Top = 191 + Top = 51 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 120 - ExplicitTop = 191 + ExplicitTop = 51 ExplicitWidth = 280 Width = 280 end @@ -643,9 +643,6 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente Visible = False end inherited dxLayoutControl1Group3: TdxLayoutGroup - inherited dxLayoutControl1Item12: TdxLayoutItem - Visible = False - end inherited dxLayoutControl1Item14: TdxLayoutItem Visible = False end @@ -655,6 +652,9 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited dxLayoutControl1Group8: TdxLayoutGroup Visible = False end + inherited dxLayoutControl1Item3: TdxLayoutItem + Visible = False + end inherited dxLayoutControl1Item10: TdxLayoutItem Visible = False end diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.dfm index 0b6ebe1..dc43e40 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.dfm @@ -1,6 +1,7 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente - Caption = 'Seleccionar albar'#195#161'n de cliente' + Caption = 'Seleccionar albar'#225'n/orden dev. de cliente' ClientWidth = 790 + OnCreate = CustomEditorCreate ExplicitWidth = 798 ExplicitHeight = 538 PixelsPerInch = 96 @@ -8,6 +9,7 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente inherited JvNavPanelHeader: TJvNavPanelHeader Top = 139 Width = 790 + Caption = 'Lista de albaranes / '#243'rdenes dev. de cliente' Visible = False ExplicitTop = 139 ExplicitWidth = 790 @@ -24,7 +26,7 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente inherited tbxMain: TTBXToolbar Left = 359 ExplicitLeft = 359 - ExplicitWidth = 126 + ExplicitWidth = 263 inherited TBXItem2: TTBXItem Visible = False end @@ -120,14 +122,14 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente Margins.Right = 0 Margins.Bottom = 8 Align = alTop - Caption = 'Seleccione el albar'#225'n de cliente' + Caption = 'Seleccione el albar'#225'n/orden dev. de cliente' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [fsBold] ParentFont = False - ExplicitWidth = 177 + ExplicitWidth = 246 end object lblComments: TLabel AlignWithMargins = True diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.pas index 14b6df7..a5157cb 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorElegirAlbaranesCliente.pas @@ -29,6 +29,7 @@ type procedure FormShow(Sender: TObject); procedure actAnchoAuto2Execute(Sender: TObject); procedure actQuitarFiltro2Execute(Sender: TObject); + procedure CustomEditorCreate(Sender: TObject); protected function GetAlbaranesClienteSeleccionados: IBizAlbaranCliente; @@ -63,6 +64,13 @@ begin actQuitarFiltro.Execute; end; +procedure TfEditorElegirAlbaranesCliente.CustomEditorCreate(Sender: TObject); +begin + inherited; + FHeaderText := 'Seleccionar albarán/orden dev. de cliente'; + FWindowCaption := FHeaderText; +end; + procedure TfEditorElegirAlbaranesCliente.FormShow(Sender: TObject); begin inherited; diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm index b754321..6cd301f 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm @@ -183,8 +183,8 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente Visible = False end object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn - Caption = 'Importe total' - DataBinding.FieldName = 'IMPORTE_TOTAL' + Caption = 'Base Imponible' + DataBinding.FieldName = 'BASE_IMPONIBLE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify FooterAlignmentHorz = taRightJustify @@ -258,6 +258,8 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 638 + ExplicitWidth = 215 + Width = 215 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesDevCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesDevCliente.dfm index 9f818f3..dc4e071 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesDevCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesDevCliente.dfm @@ -42,7 +42,7 @@ inherited frViewAlbaranesDevCliente: TfrViewAlbaranesDevCliente Caption = 'Fecha' end inherited cxGridViewREF_FACTURA: TcxGridDBColumn - Caption = 'Ref. abono' + Caption = 'Ref. fac. de abono' end end end @@ -74,10 +74,12 @@ inherited frViewAlbaranesDevCliente: TfrViewAlbaranesDevCliente Width = 366 end inherited eLista: TcxComboBox + Left = 684 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 684 ExplicitWidth = 140 Width = 140 end diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index 52269ef..f3bbb72 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -579,6 +579,7 @@ begin REFERENCIA := ''; //Para que se asigne una nueva SITUACION := CTE_PENDIENTE; //Al ser una nueva debe de estar pendiente FECHA_FACTURA := DateOf(Now); + FECHA_VENCIMIENTO := DateOf(Now); ID_COMISION_LIQUIDADA := 0; end; diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj index 2cf693f..8694ea0 100644 --- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj +++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj @@ -29,7 +29,6 @@ - @@ -195,15 +194,6 @@ - - - - - - - - - @@ -322,13 +312,13 @@ - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index d52dcf1..e3b3370 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -1910,12 +1910,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Default = True end item - Caption = 'Utilizar uno o m'#225's albaranes de cliente.' + Caption = 'Utilizar uno o m'#225's albaranes/'#243'rdenes dev. de cliente.' Value = 300 Info.Strings = ( - 'Puede utilizar uno o m'#225's albaranes existentes para dar de alta l' + - 'a factura nueva.') + 'Puede utilizar uno o m'#225's albaranes/'#243'rdenes dev. existentes para' + + ' dar de alta la factura/abono nueva.') end> ButtonBar.Buttons = [cbCancel] MainIcon = tdiCustom @@ -2150,7 +2150,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente 0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000 0007C0000007C000000700000007000000070000000700000007C000000FC000 001F8000003F800000FFF8FFFFFF} - Width = 450 + Width = 550 Left = 168 Top = 144 end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index 14fc3df..521d882 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -1,6 +1,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente - Width = 781 - Height = 347 + Width = 876 + Height = 436 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 781 - Height = 347 + Width = 876 + Height = 436 Align = alClient ParentBackground = True TabOrder = 0 @@ -20,10 +20,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ExplicitWidth = 451 ExplicitHeight = 304 DesignSize = ( - 781 - 347) + 876 + 436) object Label1: TLabel - Left = 464 + Left = 529 Top = 225 Width = 311 Height = 26 @@ -142,7 +142,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 269 end object bFormasPago: TButton - Left = 282 + Left = 347 Top = 103 Width = 132 Height = 23 @@ -173,7 +173,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 165 end object cbClienteFinal: TcxDBTextEdit - Left = 464 + Left = 529 Top = 259 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'CLIENTE_FINAL' @@ -201,7 +201,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 339 end object bElegirClienteFinal: TButton - Left = 708 + Left = 820 Top = 257 Width = 23 Height = 25 @@ -209,7 +209,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente TabOrder = 8 end inline frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente - Left = 453 + Left = 518 Top = 30 Width = 346 Height = 170 @@ -221,14 +221,14 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ParentFont = False TabOrder = 6 ReadOnly = False - ExplicitLeft = 453 + ExplicitLeft = 518 ExplicitTop = 30 ExplicitWidth = 346 ExplicitHeight = 170 inherited dxLayoutControl1: TdxLayoutControl Width = 346 Height = 170 - ExplicitWidth = 101 + ExplicitWidth = 346 ExplicitHeight = 170 inherited edtlNombre: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -239,22 +239,22 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 277 end inherited edtNIFCIF: TcxDBTextEdit - Left = 176 + Left = 223 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 176 + ExplicitLeft = 223 end inherited Button3: TBitBtn - Left = 87 + Left = 134 Top = 135 - ExplicitLeft = 87 + ExplicitLeft = 134 ExplicitTop = 135 end inherited Button4: TButton - Left = 256 - ExplicitLeft = 256 + Left = 303 + ExplicitLeft = 303 end inherited edtDireccion: TcxMemo Style.LookAndFeel.SkinName = '' diff --git a/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas b/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas index ba79eaa..d6a5fb1 100644 --- a/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas +++ b/Source/Modulos/Formas de pago/Controller/uFormasPagoController.pas @@ -170,6 +170,15 @@ begin if Length(AFormaPago.DESCRIPCION) = 0 then raise Exception.Create('Debe indicar una descripción para esta forma de pago.'); + //Asignamos el plazo 0 dias - 100 % como plazo por defecto en el caso de dejar los plazos vacios + if AFormaPago.Plazos.RecordCount = 0 then + begin + AFormaPago.Plazos.Insert; + AFormaPago.Plazos.NUM_DIAS := 0; + AFormaPago.Plazos.PORCENTAJE := 100; + AFormaPago.Plazos.Post; + end; + Result := True; end; diff --git a/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas b/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas index 242236f..62c191b 100644 --- a/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas +++ b/Source/Modulos/Formas de pago/Views/uEditorFormaPago.pas @@ -153,9 +153,9 @@ end; procedure TfEditorFormaPago.actAceptarExecute(Sender: TObject); begin - if (ListaFormasPago.ActiveView.DataController.RecordCount = 0) then - if (ShowConfirmMessage('Forma de pago sin plazos', 'No ha indicado plazos de pago para esta forma de pago por lo tanto no se podrán generarar los recibos correspondientes.' + #10#13 + '¿Desea continuar guardando la forma de pago?') = IDNO) then - Exit; +// if (ListaFormasPago.ActiveView.DataController.RecordCount = 0) then +// if (ShowConfirmMessage('Forma de pago sin plazos', 'No ha indicado plazos de pago para esta forma de pago por lo tanto no se podrán generarar los recibos correspondientes.' + #10#13 + '¿Desea continuar guardando la forma de pago?') = IDNO) then +// Exit; if FController.Guardar(FFormaPago) then actCerrar.Execute; diff --git a/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm b/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm index 0961ccc..41cd5dd 100644 --- a/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm +++ b/Source/Modulos/Pedidos de cliente/Views/uEditorPedidoCliente.dfm @@ -80,7 +80,7 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente end inherited pgPaginas: TPageControl Width = 873 - Height = 510 + Height = 504 ActivePage = pagContenido TabOrder = 1 OnChanging = pgPaginasChanging @@ -95,7 +95,7 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Left = 0 Top = 0 Width = 865 - Height = 482 + Height = 476 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -109,7 +109,7 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente ExplicitHeight = 482 inherited dxLayoutControl1: TdxLayoutControl Width = 865 - Height = 482 + Height = 476 ExplicitWidth = 865 ExplicitHeight = 482 inherited edtFechaPedido: TcxDBDateEdit @@ -121,12 +121,12 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Width = 333 end inherited memObservaciones: TcxDBMemo - Left = 427 + Left = 475 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 427 + ExplicitLeft = 475 ExplicitWidth = 459 ExplicitHeight = 200 Height = 200 @@ -149,9 +149,9 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Width = 432 Height = 248 inherited Bevel1: TBevel - Top = 205 + Top = 172 Width = 464 - ExplicitTop = 205 + ExplicitTop = 172 ExplicitWidth = 464 end inherited rdxDestino3: TRadioButton @@ -167,10 +167,10 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Width = 268 end inherited bModificar: TBitBtn - Left = 237 - Top = 169 - ExplicitLeft = 237 - ExplicitTop = 169 + Left = 285 + Top = 136 + ExplicitLeft = 285 + ExplicitTop = 136 end inherited txtDireccion: TStaticText Width = 449 @@ -179,12 +179,12 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente ExplicitHeight = 68 end inherited edtEntregarA: TcxDBTextEdit - Top = 236 + Top = 203 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitTop = 236 + ExplicitTop = 203 ExplicitWidth = 464 Width = 464 end @@ -199,13 +199,13 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Width = 195 end inherited bFormasPago: TButton - Left = 265 - ExplicitLeft = 265 + Left = 313 + ExplicitLeft = 313 end inherited frViewDatosYSeleccionClientePedido1: TfrViewDatosYSeleccionClientePedido - Left = 427 + Left = 475 Width = 480 - ExplicitLeft = 427 + ExplicitLeft = 475 ExplicitWidth = 480 inherited dxLayoutControl1: TdxLayoutControl Width = 480 @@ -218,12 +218,12 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Width = 276 end inherited edtNIF_CIF: TcxDBTextEdit - Left = 303 + Left = 255 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 303 + ExplicitLeft = 255 end inherited edtPersonaContacto: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -242,16 +242,16 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente Width = 121 end inherited Button4: TButton - Left = 383 - ExplicitLeft = 383 + Left = 335 + ExplicitLeft = 335 end inherited Button5: TButton - Left = 383 - ExplicitLeft = 383 + Left = 335 + ExplicitLeft = 335 end inherited Button3: TBitBtn - Left = 208 - ExplicitLeft = 208 + Left = 160 + ExplicitLeft = 160 end end end @@ -271,17 +271,22 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente ExplicitWidth = 323 Width = 323 end + inherited cbTipoPedido: TcxDBComboBox + ExplicitWidth = 461 + Width = 461 + end end end end object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 + ExplicitHeight = 482 inline frViewDetallesPedidoCliente1: TfrViewDetallesPedidoCliente Left = 0 Top = 0 Width = 865 - Height = 482 + Height = 476 Align = alClient BiDiMode = bdLeftToRight Font.Charset = DEFAULT_CHARSET @@ -309,14 +314,14 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente ExplicitLeft = 278 ExplicitTop = 0 end - inherited ToolButton14: TToolButton + inherited ToolButton14: TToolButton [4] Left = 334 Top = 0 Wrap = False ExplicitLeft = 334 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox + inherited FontName: TJvFontComboBox [5] Left = 399 Top = 0 ExplicitLeft = 399 @@ -325,10 +330,10 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente inherited FontSize: TEdit Left = 544 Top = 0 - Width = 122 + Width = 138 ExplicitLeft = 544 ExplicitTop = 0 - ExplicitWidth = 122 + ExplicitWidth = 138 end inherited ToolButton13: TToolButton [7] Left = 0 @@ -344,37 +349,38 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente ExplicitLeft = 0 ExplicitTop = 27 end - inherited ToolButton6: TToolButton + inherited ToolButton6: TToolButton [9] Left = 17 Top = 27 ExplicitLeft = 17 ExplicitTop = 27 end - inherited ToolButton7: TToolButton + inherited ToolButton7: TToolButton [10] Left = 83 Top = 27 ExplicitLeft = 83 ExplicitTop = 27 end - inherited ToolButton8: TToolButton + inherited ToolButton8: TToolButton [11] Left = 150 Top = 27 ExplicitLeft = 150 ExplicitTop = 27 end - inherited ToolButton12: TToolButton + inherited ToolButton12: TToolButton [12] Left = 233 Top = 27 ExplicitLeft = 233 ExplicitTop = 27 + ExplicitHeight = 22 end - inherited ToolButton9: TToolButton + inherited ToolButton9: TToolButton [13] Left = 241 Top = 27 ExplicitLeft = 241 ExplicitTop = 27 end - inherited ToolButton10: TToolButton + inherited ToolButton10: TToolButton [14] Left = 386 Top = 27 ExplicitLeft = 386 @@ -390,7 +396,7 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente inherited cxGrid: TcxGrid Top = 77 Width = 865 - Height = 405 + Height = 399 ExplicitTop = 77 ExplicitWidth = 865 ExplicitHeight = 405 @@ -418,11 +424,12 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente object pagInicidencias: TTabSheet Caption = 'Incidencias' ImageIndex = 2 + ExplicitHeight = 482 inline frViewIncidenciasProv: TfrViewIncidencias Left = 0 Top = 0 Width = 865 - Height = 482 + Height = 476 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -443,13 +450,13 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente end inherited GroupBox1: TGroupBox Width = 865 - Height = 454 + Height = 448 ExplicitWidth = 865 ExplicitHeight = 454 inherited eIncidencias: TcxDBMemo ExplicitWidth = 848 ExplicitHeight = 427 - Height = 427 + Height = 421 Width = 848 end end @@ -468,9 +475,9 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente end inline frViewTotales1: TfrViewTotales [4] Left = 0 - Top = 592 + Top = 586 Width = 879 - Height = 67 + Height = 73 Align = alBottom Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -480,12 +487,12 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente ParentFont = False TabOrder = 4 ReadOnly = False - ExplicitTop = 592 + ExplicitTop = 586 ExplicitWidth = 879 - ExplicitHeight = 67 + ExplicitHeight = 73 inherited dxLayoutControl1: TdxLayoutControl Width = 879 - Height = 67 + Height = 73 LookAndFeel = dxLayoutOfficeLookAndFeel1 ExplicitWidth = 879 ExplicitHeight = 67 @@ -745,9 +752,6 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente end inherited dxLayoutControl1Group5: TdxLayoutGroup inherited dxLayoutControl1Group3: TdxLayoutGroup - inherited dxLayoutControl1Item12: TdxLayoutItem - Visible = False - end inherited dxLayoutControl1Item14: TdxLayoutItem Visible = False end @@ -757,6 +761,9 @@ inherited fEditorPedidoCliente: TfEditorPedidoCliente inherited dxLayoutControl1Group8: TdxLayoutGroup Visible = False end + inherited dxLayoutControl1Item3: TdxLayoutItem + Visible = False + end inherited dxLayoutControl1Item10: TdxLayoutItem Visible = False end diff --git a/Source/Modulos/Pedidos de cliente/Views/uViewPedidosCliente.dfm b/Source/Modulos/Pedidos de cliente/Views/uViewPedidosCliente.dfm index 0e7a352..820f284 100644 --- a/Source/Modulos/Pedidos de cliente/Views/uViewPedidosCliente.dfm +++ b/Source/Modulos/Pedidos de cliente/Views/uViewPedidosCliente.dfm @@ -136,8 +136,8 @@ inherited frViewPedidosCliente: TfrViewPedidosCliente Width = 65 end object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn - Caption = 'Importe total' - DataBinding.FieldName = 'IMPORTE_TOTAL' + Caption = 'Base Imponible' + DataBinding.FieldName = 'BASE_IMPONIBLE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify FooterAlignmentHorz = taRightJustify diff --git a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.dfm b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.dfm index 532b329..7cda61f 100644 --- a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.dfm +++ b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.dfm @@ -32,7 +32,7 @@ object dmGenerarFacturasCliAlbCli: TdmGenerarFacturasCliAlbCli FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} - Instruction.Text = 'Se han generado las facturas...' + Instruction.Text = 'Se han generado las facturas/abonos...' Instruction.Glyph.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 00001C0806000000720DDF940000000970485973000017120000171201679FD2 diff --git a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas index 7c6459a..0b8e41a 100644 --- a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas +++ b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas @@ -297,8 +297,8 @@ begin Inicializar; AAlbaranes := AAlbaranesClienteController.ElegirAlbaranes(AAlbaranesClienteController.BuscarSinFacturar, - 'Elija el albarán o albaranes de cliente que desea utilizar para dar de alta la factura.' - + #10#13 + 'Si elige albaranes de clientes diferentes se dará de alta una factura por cada uno de ellos.' , True); + 'Elija el albarán/orden dev. o albaranes/ordenes de cliente que desea utilizar para dar de alta la factura.' + + #10#13 + 'Si elige albaranes/ordenes de clientes diferentes se dará de alta una factura por cada uno de ellos.' , True); if Assigned(AAlbaranes) then Result := GenerarFacturaCliAlb(AAlbaranes); @@ -433,21 +433,8 @@ begin AListaAlbaranes.Cliente.DataTable.Active := True; AFacturas.Cliente := AListaAlbaranes.Cliente; - //Si el albaran es de tipo devolución hacemos la factura de tipo abono - if (AListaAlbaranes.TIPO = CTE_TIPO_ALBARAN_DEV) then - begin - bEnEdicion := (AFacturas.DataTable.State in dsEditModes); - if not bEnEdicion then - AFacturas.Edit; - AFacturas.TIPO := CTE_TIPO_ABONO; - AFacturas.Post; - if bEnEdicion then - AFacturas.Edit; - end; - AFacturaActual := AFacturas; - // Ya tengo la factura. Le añado los conceptos del albarán AFacturaActual.Detalles.DataTable.Last; @@ -473,11 +460,13 @@ begin with AFacturaActual.Detalles do begin Edit; -// CONCEPTO := 'Albaran ' + AListaAlbaranes.REFERENCIA; - CONCEPTO := 'Albarán ' + AListaAlbaranes.REFERENCIA + ' (Ref.Cliente: ' + AListaAlbaranes.REFERENCIA_CLIENTE + ') del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN); + if (AListaAlbaranes.TIPO = CTE_TIPO_ALBARAN_DEV) then + CONCEPTO := 'Orden Dev. ' + AListaAlbaranes.REFERENCIA + ' (Ref.Cliente: ' + AListaAlbaranes.REFERENCIA_CLIENTE + ') del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN) + else + CONCEPTO := 'Albarán ' + AListaAlbaranes.REFERENCIA + ' (Ref.Cliente: ' + AListaAlbaranes.REFERENCIA_CLIENTE + ') del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN); + CANTIDAD := 1; - IMPORTE_UNIDAD := AListaAlbaranes.IMPORTE_TOTAL; //Tecsitel no utiliza el IVA en los pedidos por lo tanto el - //importe total es lo que queremos (IMPORTE_NETO+IMPORTE_PORTE) + IMPORTE_UNIDAD := AListaAlbaranes.BASE_IMPONIBLE; Post; end; end @@ -489,8 +478,10 @@ begin with AFacturaActual.Detalles do begin Edit; -// CONCEPTO := 'Albarán ' + AListaAlbaranes.REFERENCIA + ' del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN); - CONCEPTO := 'Albarán ' + AListaAlbaranes.REFERENCIA + ' (Ref.Cliente: ' + AListaAlbaranes.REFERENCIA_CLIENTE + ') del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN); + if (AListaAlbaranes.TIPO = CTE_TIPO_ALBARAN_DEV) then + CONCEPTO := 'Orden Dev. ' + AListaAlbaranes.REFERENCIA + ' (Ref.Cliente: ' + AListaAlbaranes.REFERENCIA_CLIENTE + ') del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN) + else + CONCEPTO := 'Albarán ' + AListaAlbaranes.REFERENCIA + ' (Ref.Cliente: ' + AListaAlbaranes.REFERENCIA_CLIENTE + ') del ' + DateToStr(AListaAlbaranes.FECHA_ALBARAN); Post; end; // Añado el contenido del albarán @@ -511,7 +502,10 @@ begin with AFacturaActual.Detalles do begin Edit; - CONCEPTO := 'Total del albarán ' + AListaAlbaranes.REFERENCIA; + if (AListaAlbaranes.TIPO = CTE_TIPO_ALBARAN_DEV) then + CONCEPTO := 'Total de la orden dev. ' + AListaAlbaranes.REFERENCIA + else + CONCEPTO := 'Total del albarán ' + AListaAlbaranes.REFERENCIA; Post; end; end; @@ -527,6 +521,21 @@ begin // Guardo la factura que acabo de generar o editar AFacturaActual.CalcularImporteTotal; + + bEnEdicion := (AFacturas.DataTable.State in dsEditModes); + if not bEnEdicion then + AFacturas.Edit; + + //Si la factura tiene importe negativo establecemos el tipo abono + if (AFacturaActual.IMPORTE_TOTAL < 0) then + AFacturas.TIPO := CTE_TIPO_ABONO + else + AFacturas.TIPO := CTE_TIPO_FACTURA; + + AFacturas.Post; + if bEnEdicion then + AFacturas.Edit; + AFacturasClienteController.Guardar(AFacturaActual); // Asocio la factura con el albarán diff --git a/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu b/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu index c0601bb..e279e13 100644 Binary files a/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu and b/Source/Modulos/TiposDocumento/Controller/TiposDocumento_controller.dcu differ diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 2143ec7..efa1880 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index fd6b7e7..9789637 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -14,7 +14,7 @@ BEGIN BEGIN VALUE "FileVersion", "4.3.8.0\0" VALUE "ProductVersion", "4.3.8.0\0" - VALUE "CompileDate", "viernes, 21 de febrero de 2014 15:16\0" + VALUE "CompileDate", "viernes, 07 de marzo de 2014 13:12\0" END END BLOCK "VarFileInfo"