Se adapta la ficha de empresa para poder dejar el iva y la forma de pago por defecto a nulo, en tal caso se cogerán para los documentos los datos comerciales del cliente, en el caso de tener un valor se dará prioridad a los de la empresa

git-svn-id: https://192.168.0.254/svn/Proyectos.Noviseda_FactuGES2/trunk@82 f33bb606-9f5c-448d-9c99-757f00063c96
This commit is contained in:
David Arranz 2010-02-01 18:04:01 +00:00
parent 3f491d885b
commit 60f5e16a38
12 changed files with 441 additions and 271 deletions

View File

@ -109,131 +109,133 @@ inherited fEditorEmpresa: TfEditorEmpresa
inherited dxLayoutControl1: TdxLayoutControl
Width = 660
Height = 425
LookAndFeel = dxLayoutOfficeLookAndFeel1
LayoutLookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 660
ExplicitHeight = 425
inherited PngSpeedButton1: TPngSpeedButton
Left = 615
Left = 598
Top = 295
ExplicitLeft = 615
ExplicitLeft = 598
ExplicitTop = 295
end
inherited PngSpeedButton2: TPngSpeedButton
Left = 615
Left = 598
Top = 267
ExplicitLeft = 615
ExplicitLeft = 598
ExplicitTop = 267
end
inherited eCalle: TcxDBTextEdit
Top = 267
Top = 331
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 267
ExplicitTop = 331
ExplicitWidth = 234
Width = 234
end
inherited eCodigoPostal: TcxDBTextEdit
Top = 294
Left = 283
Top = 358
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 294
ExplicitLeft = 283
ExplicitTop = 358
end
inherited ePaginaWeb: TcxDBTextEdit
Left = 508
Left = 479
Top = 216
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 216
ExplicitWidth = 164
Width = 164
end
inherited eMailParticular: TcxDBTextEdit
Left = 508
Left = 479
Top = 189
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 189
ExplicitWidth = 164
Width = 164
end
inherited eMailTrabajo: TcxDBTextEdit
Left = 508
Left = 479
Top = 162
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 162
ExplicitWidth = 164
Width = 164
end
inherited cxDBMemo1: TcxDBMemo
Top = 372
Top = 436
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 372
ExplicitTop = 436
ExplicitWidth = 329
ExplicitHeight = 64
Height = 64
Width = 329
end
inherited eTlfParticular: TcxDBTextEdit
Left = 508
Left = 479
Top = 57
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 57
ExplicitWidth = 164
Width = 164
end
inherited eTlfTrabajo: TcxDBTextEdit
Left = 508
Left = 479
Top = 30
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 30
ExplicitWidth = 164
Width = 164
end
inherited eTlfMovil: TcxDBTextEdit
Left = 508
Left = 479
Top = 84
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 84
ExplicitWidth = 164
Width = 164
end
inherited eFax: TcxDBTextEdit
Left = 508
Left = 479
Top = 111
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 508
ExplicitLeft = 479
ExplicitTop = 111
ExplicitWidth = 164
Width = 164
@ -269,13 +271,13 @@ inherited fEditorEmpresa: TfEditorEmpresa
Width = 234
end
inherited cxDBImage1: TcxDBImage
Left = 413
Left = 384
Top = 267
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 413
ExplicitLeft = 384
ExplicitTop = 267
ExplicitWidth = 230
ExplicitHeight = 142
@ -283,62 +285,68 @@ inherited fEditorEmpresa: TfEditorEmpresa
Width = 230
end
inherited eParamMargen: TcxDBSpinEdit
Top = 216
Top = 280
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 216
ExplicitTop = 280
end
inherited eParamTiempo: TcxDBCurrencyEdit
Top = 216
Top = 280
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 216
ExplicitTop = 280
end
inherited cbProvincia: TcxDBComboBox
Top = 294
Top = 358
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 294
ExplicitTop = 358
ExplicitWidth = 91
Width = 91
end
inherited cbPoblacion: TcxDBComboBox
Top = 321
Top = 385
Properties.OnInitPopup = nil
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 321
ExplicitTop = 385
ExplicitWidth = 234
Width = 234
end
inherited cbFormaPago: TcxComboBox
Top = 165
Top = 229
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 165
ExplicitWidth = 202
Width = 202
end
inherited cbTipoIVA: TcxComboBox
Top = 138
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 138
ExplicitTop = 229
ExplicitWidth = 202
Width = 202
end
inherited cbTipoIVA: TcxComboBox
Top = 202
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 202
ExplicitWidth = 202
Width = 202
end
inherited cbPrioridad: TcxCheckBox
Top = 162
ExplicitTop = 162
ExplicitWidth = 363
Width = 363
end
end
end
end
@ -370,6 +378,18 @@ inherited fEditorEmpresa: TfEditorEmpresa
inherited ToolBar1: TToolBar
Width = 660
ExplicitWidth = 660
inherited ToolButton1: TToolButton
ExplicitWidth = 113
end
inherited ToolButton4: TToolButton
ExplicitWidth = 113
end
inherited ToolButton2: TToolButton
ExplicitWidth = 113
end
inherited ToolButton7: TToolButton
ExplicitWidth = 113
end
end
end
end

View File

@ -13,7 +13,8 @@ uses
JvAppStorage, JvAppRegistryStorage, JvFormPlacement, JvComponentBase,
uViewEmpresa, uIEditorEmpresa, uEmpresasController, dxLayoutLookAndFeels,
JvExComCtrls, JvStatusBar, uViewDetallesGenerico, uViewDatosBancarios,
uDAInterfaces, cxControls, cxContainer, cxEdit, cxLabel;
uDAInterfaces, cxControls, cxContainer, cxEdit, cxLabel, cxGraphics,
cxLookAndFeels, cxLookAndFeelPainters;
type
TfEditorEmpresa = class(TfEditorDBItem, IEditorEmpresa)

View File

@ -13,7 +13,6 @@ inherited frViewEmpresa: TfrViewEmpresa
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
734
548)
@ -36,8 +35,8 @@ inherited frViewEmpresa: TfrViewEmpresa
PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled]
end
object eCalle: TcxDBTextEdit
Left = 162
Top = 277
Left = 117
Top = 347
DataBinding.DataField = 'CALLE'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@ -54,12 +53,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 7
TabOrder = 8
Width = 223
end
object eCodigoPostal: TcxDBTextEdit
Left = 312
Top = 304
Left = 289
Top = 374
DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@ -76,11 +75,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 9
TabOrder = 10
Width = 73
end
object ePaginaWeb: TcxDBTextEdit
Left = 510
Left = 487
Top = 220
DataBinding.DataField = 'PAGINA_WEB'
DataBinding.DataSource = DADataSource
@ -98,13 +97,35 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 19
Width = 247
end
object eMailParticular: TcxDBTextEdit
Left = 487
Top = 193
DataBinding.DataField = 'EMAIL_2'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 18
Width = 247
end
object eMailParticular: TcxDBTextEdit
Left = 510
Top = 193
DataBinding.DataField = 'EMAIL_2'
object eMailTrabajo: TcxDBTextEdit
Left = 487
Top = 166
DataBinding.DataField = 'EMAIL_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
@ -123,31 +144,9 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 17
Width = 247
end
object eMailTrabajo: TcxDBTextEdit
Left = 510
Top = 166
DataBinding.DataField = 'EMAIL_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 16
Width = 247
end
object cxDBMemo1: TcxDBMemo
Left = 22
Top = 388
Top = 458
DataBinding.DataField = 'NOTAS'
DataBinding.DataSource = DADataSource
Enabled = False
@ -165,12 +164,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 11
TabOrder = 12
Height = 75
Width = 318
end
object eTlfParticular: TcxDBTextEdit
Left = 510
Left = 487
Top = 55
DataBinding.DataField = 'TELEFONO_2'
DataBinding.DataSource = DADataSource
@ -188,57 +187,35 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 13
Width = 247
end
object eTlfTrabajo: TcxDBTextEdit
Left = 510
Top = 28
DataBinding.DataField = 'TELEFONO_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 12
Width = 247
end
object eTlfMovil: TcxDBTextEdit
Left = 510
Top = 82
DataBinding.DataField = 'MOVIL_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 14
Width = 247
end
object eFax: TcxDBTextEdit
Left = 510
Top = 109
DataBinding.DataField = 'FAX'
object eTlfTrabajo: TcxDBTextEdit
Left = 487
Top = 28
DataBinding.DataField = 'TELEFONO_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 13
Width = 247
end
object eTlfMovil: TcxDBTextEdit
Left = 487
Top = 82
DataBinding.DataField = 'MOVIL_1'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
@ -257,8 +234,30 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 15
Width = 247
end
object eFax: TcxDBTextEdit
Left = 487
Top = 109
DataBinding.DataField = 'FAX'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 16
Width = 247
end
object eNombre: TcxDBTextEdit
Left = 162
Left = 117
Top = 28
DataBinding.DataField = 'NOMBRE'
DataBinding.DataSource = DADataSource
@ -281,7 +280,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 223
end
object eNIFCIF: TcxDBTextEdit
Left = 162
Left = 117
Top = 55
DataBinding.DataField = 'NIF_CIF'
DataBinding.DataSource = DADataSource
@ -304,7 +303,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 223
end
object memRegistroMercantil: TcxDBMemo
Left = 162
Left = 117
Top = 82
DataBinding.DataField = 'REGISTRO_MERCANTIL'
DataBinding.DataSource = DADataSource
@ -328,7 +327,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 223
end
object cxDBImage1: TcxDBImage
Left = 415
Left = 392
Top = 277
DataBinding.DataField = 'LOGOTIPO'
DataBinding.DataSource = DADataSource
@ -345,13 +344,13 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 19
TabOrder = 20
Height = 249
Width = 313
end
object eParamMargen: TcxDBSpinEdit
Left = 162
Top = 220
Left = 117
Top = 290
DataBinding.DataField = 'PARAM_MARGEN'
DataBinding.DataSource = DADataSource
Enabled = False
@ -372,12 +371,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 5
TabOrder = 6
Width = 60
end
object eParamTiempo: TcxDBCurrencyEdit
Left = 285
Top = 220
Left = 240
Top = 290
DataBinding.DataField = 'PARAM_TIEMPO'
DataBinding.DataSource = DADataSource
Enabled = False
@ -398,12 +397,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 6
TabOrder = 7
Width = 100
end
object cbProvincia: TcxDBComboBox
Left = 162
Top = 304
Left = 117
Top = 374
DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource
Properties.ImmediatePost = True
@ -427,12 +426,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 8
TabOrder = 9
Width = 80
end
object cbPoblacion: TcxDBComboBox
Left = 162
Top = 331
Left = 117
Top = 401
DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource
Properties.ImmediatePost = True
@ -456,12 +455,39 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 10
TabOrder = 11
Width = 223
end
object cbFormaPago: TcxComboBox
Left = 162
Top = 163
Left = 182
Top = 233
Anchors = [akLeft, akTop, akRight]
Properties.DropDownListStyle = lsEditFixedList
Properties.DropDownRows = 25
Properties.ImmediatePost = True
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 5
Width = 202
end
object cbTipoIVA: TcxComboBox
Left = 182
Top = 206
Anchors = [akLeft, akTop, akRight]
Properties.DropDownListStyle = lsEditFixedList
Properties.DropDownRows = 25
@ -486,233 +512,248 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 4
Width = 202
end
object cbTipoIVA: TcxComboBox
Left = 162
Top = 136
Anchors = [akLeft, akTop, akRight]
Properties.DropDownListStyle = lsEditFixedList
Properties.DropDownRows = 25
Properties.ImmediatePost = True
object cbPrioridad: TcxCheckBox
Left = 22
Top = 166
Caption =
'Dar prioridad de datos comerciales a la empresa respecto a clien' +
'te, con el I.V.A y forma de pago siguiente:'
Properties.MultiLine = True
Properties.NullStyle = nssInactive
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 3
Width = 202
Transparent = True
Width = 363
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
AlignHorz = ahParentManaged
AlignVert = avParentManaged
CaptionOptions.Visible = False
ButtonOptions.Buttons = <>
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControl1Group4: TdxLayoutGroup
AutoAligns = [aaVertical]
AlignHorz = ahClient
ShowCaption = False
CaptionOptions.Visible = False
ButtonOptions.Buttons = <>
Hidden = True
ShowBorder = False
object dxLayoutControl1Group1: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
Caption = 'Datos generales'
AlignVert = avTop
CaptionOptions.Text = 'Datos generales'
ButtonOptions.Buttons = <>
object dxLayoutControl1Item13: TdxLayoutItem
Caption = 'Nombre:'
CaptionOptions.Text = 'Nombre:'
Control = eNombre
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item14: TdxLayoutItem
Caption = 'CIF:'
CaptionOptions.Text = 'CIF:'
Control = eNIFCIF
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item15: TdxLayoutItem
Caption = 'Registro mercantil:'
CaptionOptions.Text = 'Registro mercantil:'
CaptionOptions.AlignVert = tavTop
Control = memRegistroMercantil
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Group14: TdxLayoutGroup
CaptionOptions.Text = 'Datos comerciales'
ButtonOptions.Buttons = <>
object dxLayoutControl1Item24: TdxLayoutItem
CaptionOptions.Text = 'New Item'
CaptionOptions.Visible = False
Control = cbPrioridad
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item16: TdxLayoutItem
Caption = 'IVA por defecto:'
CaptionOptions.Text = 'IVA por defecto:'
Offsets.Left = 20
Control = cbTipoIVA
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item2: TdxLayoutItem
Caption = 'Forma de pago por defecto:'
CaptionOptions.Text = 'Forma de pago por defecto:'
Offsets.Left = 20
Control = cbFormaPago
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Group13: TdxLayoutGroup
Caption = 'Datos cat'#225'logo art'#237'culos'
CaptionOptions.Text = 'Datos cat'#225'logo art'#237'culos'
Enabled = False
Visible = False
ButtonOptions.Buttons = <>
LayoutDirection = ldHorizontal
object dxLayoutControl1Item18: TdxLayoutItem
Caption = 'Margen de venta:'
CaptionOptions.Text = 'Margen de venta:'
Enabled = False
Control = eParamMargen
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item21: TdxLayoutItem
Caption = 'Precio min:'
CaptionOptions.Text = 'Precio min:'
Enabled = False
Control = eParamTiempo
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Group3: TdxLayoutGroup
AutoAligns = [aaHorizontal]
Caption = 'Direcci'#243'n'
AlignVert = avTop
CaptionOptions.Text = 'Direcci'#243'n'
ButtonOptions.Buttons = <>
object dxLayoutControl1Item1: TdxLayoutItem
Caption = 'Calle:'
CaptionOptions.Text = 'Calle:'
Control = eCalle
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Group8: TdxLayoutGroup
ShowCaption = False
CaptionOptions.Visible = False
ButtonOptions.Buttons = <>
Hidden = True
ShowBorder = False
object dxLayoutControl1Group15: TdxLayoutGroup
ShowCaption = False
CaptionOptions.Visible = False
ButtonOptions.Buttons = <>
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControl1Item22: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Provincia:'
CaptionOptions.Text = 'Provincia:'
Control = cbProvincia
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item4: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahRight
Caption = 'C'#243'd. postal:'
CaptionOptions.Text = 'C'#243'd. postal:'
Control = eCodigoPostal
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Item3: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Caption = 'Poblaci'#243'n:'
CaptionOptions.Text = 'Poblaci'#243'n:'
Control = cbPoblacion
ControlOptions.ShowBorder = False
end
end
end
object dxLayoutControl1Group7: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
AlignVert = avClient
Caption = 'Observaciones'
CaptionOptions.Text = 'Observaciones'
Enabled = False
Visible = False
ButtonOptions.Buttons = <>
object dxLayoutControl1Item8: TdxLayoutItem
AutoAligns = [aaHorizontal]
AlignVert = avClient
Caption = 'cxDBMemo1'
ShowCaption = False
CaptionOptions.Text = 'cxDBMemo1'
CaptionOptions.Visible = False
Enabled = False
Control = cxDBMemo1
ControlOptions.ShowBorder = False
end
end
end
object dxLayoutControl1Group6: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
AlignVert = avClient
ShowCaption = False
CaptionOptions.Visible = False
ButtonOptions.Buttons = <>
Hidden = True
ShowBorder = False
object dxLayoutControl1Group2: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
Caption = 'Tel'#233'fonos'
AlignVert = avTop
CaptionOptions.Text = 'Tel'#233'fonos'
ButtonOptions.Buttons = <>
object dxLayoutControl1Item10: TdxLayoutItem
Caption = 'Tlf. trabajo:'
CaptionOptions.Text = 'Tlf. trabajo:'
Control = eTlfTrabajo
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item9: TdxLayoutItem
Caption = 'Tlf. particular:'
CaptionOptions.Text = 'Tlf. particular:'
Control = eTlfParticular
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item11: TdxLayoutItem
Caption = 'M'#243'vil:'
CaptionOptions.Text = 'M'#243'vil:'
Control = eTlfMovil
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item12: TdxLayoutItem
Caption = 'Fax:'
CaptionOptions.Text = 'Fax:'
Control = eFax
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Group5: TdxLayoutGroup
Caption = 'Correo electr'#243'nico e internet'
CaptionOptions.Text = 'Correo electr'#243'nico e internet'
ButtonOptions.Buttons = <>
object dxLayoutControl1Item7: TdxLayoutItem
Caption = 'Correo de trabajo:'
CaptionOptions.Text = 'Correo de trabajo:'
Control = eMailTrabajo
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item6: TdxLayoutItem
Caption = 'Correo particular:'
CaptionOptions.Text = 'Correo particular:'
Control = eMailParticular
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item5: TdxLayoutItem
Caption = 'P'#225'gina web:'
CaptionOptions.Text = 'P'#225'gina web:'
Control = ePaginaWeb
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Group10: TdxLayoutGroup
AutoAligns = []
AlignHorz = ahClient
AlignVert = avClient
Caption = 'Logotipo'
CaptionOptions.Text = 'Logotipo'
Enabled = False
Visible = False
ButtonOptions.Buttons = <>
LayoutDirection = ldHorizontal
object dxLayoutControl1Item17: TdxLayoutItem
AutoAligns = []
AlignHorz = ahClient
AlignVert = avClient
Caption = 'cxDBImage1'
ShowCaption = False
CaptionOptions.Text = 'cxDBImage1'
CaptionOptions.Visible = False
Enabled = False
Control = cxDBImage1
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Group12: TdxLayoutGroup
ShowCaption = False
CaptionOptions.Visible = False
Enabled = False
ButtonOptions.Buttons = <>
Hidden = True
ShowBorder = False
object dxLayoutControl1Item20: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahRight
Caption = 'PngSpeedButton2'
ShowCaption = False
CaptionOptions.Text = 'PngSpeedButton2'
CaptionOptions.Visible = False
Enabled = False
Control = PngSpeedButton2
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item19: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahRight
Caption = 'PngSpeedButton1'
ShowCaption = False
CaptionOptions.Text = 'PngSpeedButton1'
CaptionOptions.Visible = False
Enabled = False
Control = PngSpeedButton1
ControlOptions.ShowBorder = False
end
@ -721,8 +762,10 @@ inherited frViewEmpresa: TfrViewEmpresa
end
end
object dxLayoutControl1Group9: TdxLayoutGroup
ButtonOptions.Buttons = <>
end
object dxLayoutControl1Group11: TdxLayoutGroup
ButtonOptions.Buttons = <>
end
end
object DADataSource: TDADataSource

View File

@ -10,7 +10,8 @@ uses
cxDBEdit, dxLayoutControl, dxLayoutLookAndFeels, cxMemo, cxMaskEdit,
cxSpinEdit, cxImage, JvExControls, JvBitmapButton, ActnList, ImgList,
PngImageList, TB2Item, SpTBXItem, TB2Dock, TB2Toolbar, PngSpeedButton, uDAInterfaces,
cxCurrencyEdit, cxGraphics, cxDropDownEdit, uEmpresasController;
cxCurrencyEdit, cxGraphics, cxDropDownEdit, uEmpresasController,
cxLookAndFeels, cxLookAndFeelPainters, dxLayoutcxEditAdapters, cxCheckBox;
type
IViewEmpresa = interface(IViewBase)
@ -90,6 +91,9 @@ type
cbFormaPago: TcxComboBox;
dxLayoutControl1Item16: TdxLayoutItem;
cbTipoIVA: TcxComboBox;
dxLayoutControl1Group14: TdxLayoutGroup;
cbPrioridad: TcxCheckBox;
dxLayoutControl1Item24: TdxLayoutItem;
procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
@ -103,6 +107,7 @@ type
procedure FormaPagoEditValueChanged(Sender: TObject);
procedure TipoIVAEditValueChanged(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
procedure cbPrioridadPropertiesEditValueChanged(Sender: TObject);
private
FEmpresa: IBizEmpresa;
FController : IEmpresasController;
@ -249,6 +254,23 @@ begin
end;
end;
procedure TfrViewEmpresa.cbPrioridadPropertiesEditValueChanged(Sender: TObject);
begin
inherited;
if cbPrioridad.Checked then
begin
cbTipoIVA.Enabled := True;
cbFormaPago.Enabled := True;
end
else
begin
cbTipoIVA.ItemIndex := 0;
cbFormaPago.ItemIndex := 0;
cbTipoIVA.Enabled := False;
cbFormaPago.Enabled := False;
end;
end;
procedure TfrViewEmpresa.cbProvinciaPropertiesInitPopup(Sender: TObject);
begin
inherited;
@ -279,7 +301,7 @@ begin
cbFormaPago.ItemIndex := 0;
for i := 0 to FFormasPago.Count - 1 do
if IntToStr(FEmpresa.ID_FORMA_PAGO) = FFormasPago.Values[FFormasPago.Names[i]] then
cbFormaPago.ItemIndex := i;
cbFormaPago.ItemIndex := i+1; //Se añade uno porque hemos añadido a la lista la cadena vacia
cbFormaPago.Properties.OnEditValueChanged := FormaPagoEditValueChanged;
@ -287,14 +309,24 @@ begin
cbTipoIVA.ItemIndex := 0;
for i := 0 to FTiposIVA.Count - 1 do
if IntToStr(FEmpresa.ID_TIPO_IVA) = FTiposIVA.Values[FTiposIVA.Names[i]] then
cbTipoIVA.ItemIndex := i;
cbTipoIVA.ItemIndex := i+1; //Se añade uno porque hemos añadido a la lista la cadena vacia
cbTipoIVA.Properties.OnEditValueChanged := TipoIVAEditValueChanged;
cbPrioridad.Checked := (cbTipoIVA.ItemIndex > 0) and (cbFormaPago.ItemIndex > 0);
if not cbPrioridad.Checked then
begin
cbTipoIVA.Enabled := False;
cbFormaPago.Enabled := False;
end;
cbPrioridad.Properties.OnEditValueChanged := cbPrioridadPropertiesEditValueChanged;
end;
destructor TfrViewEmpresa.Destroy;
begin
FController := Nil;
cbPrioridad.Properties.OnEditValueChanged := Nil;
if Assigned(FTiposIVA) then
FreeANDNIL(FTiposIVA);
@ -369,6 +401,7 @@ begin
BeginUpdate;
try
Clear;
Add(''); //Valor nulo
for i := 0 to FFormasPago.Count - 1 do
Add(FFormasPago.Names[i]);
finally
@ -383,6 +416,7 @@ begin
BeginUpdate;
try
Clear;
Add(''); //Valor nulo
for i := 0 to FTiposIVA.Count - 1 do
Add(FTiposIVA.Names[i]);
finally
@ -398,7 +432,7 @@ begin
if Assigned(FEmpresa) then
DADataSource.DataTable := FEmpresa.DataTable
else
DADataSource.DataTable := NIL;
DADataSource.DataTable := NIL;
end;
procedure TfrViewEmpresa.TipoIVAEditValueChanged(Sender: TObject);

File diff suppressed because one or more lines are too long

View File

@ -241,7 +241,7 @@ begin
FCliente.DataTable.Active := True;
ID_CLIENTE := FCliente.ID;
if FCliente.ID_FORMA_PAGO > 0 then
if (ID_FORMA_PAGO = 0) and (FCliente.ID_FORMA_PAGO > 0) then
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
DESCUENTO := FCliente.DESCUENTO;
DESCUENTO2 := FCliente.DESCUENTO2;

View File

@ -75,11 +75,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
'ACION, CONTACTOS.POBLACION) AS POBLACION,'#10' COALESCE(CONTACTOS_D' +
'IRECCIONES.PROVINCIA, CONTACTOS.PROVINCIA) AS PROVINCIA,'#10' COALE' +
'SCE(CONTACTOS_DIRECCIONES.CODIGO_POSTAL, CONTACTOS.CODIGO_POSTAL' +
') AS CODIGO_POSTAL'#10'FROM'#10' V_ALBARANES_CLIENTE'#10' INNER JOIN CONTA' +
'CTOS ON (CONTACTOS.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT O' +
'UTER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_DIRECCIONES.ID = V' +
'_ALBARANES_CLIENTE.ID_DIRECCION)'#10'WHERE V_ALBARANES_CLIENTE.ID = ' +
':ID'#10#10
') AS CODIGO_POSTAL'#10#10'FROM'#10' V_ALBARANES_CLIENTE'#10' INNER JOIN CONT' +
'ACTOS ON (CONTACTOS.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT ' +
'OUTER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_DIRECCIONES.ID = ' +
'V_ALBARANES_CLIENTE.ID_DIRECCION)'#10'WHERE V_ALBARANES_CLIENTE.ID =' +
' :ID'#10#10
StatementType = stSQL
ColumnMappings = <
item

View File

@ -79,6 +79,7 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
Top = 28
DataBinding.DataField = 'REGIMEN_IVA'
DataBinding.DataSource = dsDatosComerciales
Enabled = False
Properties.DropDownListStyle = lsFixedList
Properties.ImmediatePost = True
Properties.ImmediateUpdateText = True
@ -377,6 +378,8 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
object dxLayoutControl1Item3: TdxLayoutItem
AlignHorz = ahClient
CaptionOptions.Text = 'R'#233'gimen de IVA:'
Enabled = False
Visible = False
Control = cbRegimenIVA
ControlOptions.ShowBorder = False
end

View File

@ -313,9 +313,9 @@ begin
CODIGO_POSTAL := FCliente.CODIGO_POSTAL;
PROVINCIA := FCliente.PROVINCIA;
POBLACION := FCliente.POBLACION;
if FCliente.ID_FORMA_PAGO > 0 then
if (ID_FORMA_PAGO = 0) and (FCliente.ID_FORMA_PAGO > 0) then
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
if FCliente.ID_TIPO_IVA > 0 then
if (ID_TIPO_IVA = 0) and (FCliente.ID_TIPO_IVA > 0) then
ID_TIPO_IVA := FCliente.ID_TIPO_IVA;
RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA;
DESCUENTO := FCliente.DESCUENTO;

View File

@ -38,13 +38,19 @@ object RptFacturasCliente: TRptFacturasCliente
'ente.importe_neto,'#10' v_facturas_cliente.importe_porte, formas_p' +
'ago.descripcion as FORMA_PAGO,'#10' v_facturas_cliente.DATOS_BANCA' +
'RIOS, v_facturas_cliente.RETENCION, v_facturas_cliente.IMPORTE_R' +
'ETENCION'#10'from v_facturas_cliente'#10' left outer join contactos on' +
' (contactos.id = v_facturas_cliente.id_cliente)'#10' left outer jo' +
'in formas_pago on (formas_pago.id = v_facturas_cliente.id_forma_' +
'pago)'#10' left outer join clientes_datos on (clientes_datos.id_cl' +
'iente = v_facturas_cliente.id_cliente)'#10' left outer join contac' +
'tos contactos2 on (contactos2.id = clientes_datos.id_agente)'#10'WHE' +
'RE V_FACTURAS_CLIENTE.ID = :ID'#10
'ETENCION,'#10' '#10' empresas.calle as empresa_calle, empresas.codig' +
'o_postal as empresa_codigo_postal,'#10' empresas.poblacion as empr' +
'esa_poblacion, empresas.telefono_1 as empresa_telefono,'#10' empre' +
'sas.fax as empresa_fax, empresas.email_1 as empresa_email, empre' +
'sas.registro_mercantil'#10' '#10'from v_facturas_cliente'#10' left outer' +
' join contactos on (contactos.id = v_facturas_cliente.id_cliente' +
')'#10' left outer join formas_pago on (formas_pago.id = v_facturas' +
'_cliente.id_forma_pago)'#10' left outer join clientes_datos on (cl' +
'ientes_datos.id_cliente = v_facturas_cliente.id_cliente)'#10' left' +
' outer join contactos contactos2 on (contactos2.id = clientes_da' +
'tos.id_agente)'#10' left outer join empresas on (empresas.id = v_f' +
'acturas_cliente.id_empresa)'#10' '#10'WHERE V_FACTURAS_CLIENTE.ID = :I' +
'D'#10
StatementType = stSQL
ColumnMappings = <
item
@ -190,6 +196,34 @@ object RptFacturasCliente: TRptFacturasCliente
item
DatasetField = 'REF_VENDEDOR'
TableField = 'REF_VENDEDOR'
end
item
DatasetField = 'EMPRESA_CALLE'
TableField = 'EMPRESA_CALLE'
end
item
DatasetField = 'EMPRESA_CODIGO_POSTAL'
TableField = 'EMPRESA_CODIGO_POSTAL'
end
item
DatasetField = 'EMPRESA_POBLACION'
TableField = 'EMPRESA_POBLACION'
end
item
DatasetField = 'EMPRESA_TELEFONO'
TableField = 'EMPRESA_TELEFONO'
end
item
DatasetField = 'EMPRESA_FAX'
TableField = 'EMPRESA_FAX'
end
item
DatasetField = 'EMPRESA_EMAIL'
TableField = 'EMPRESA_EMAIL'
end
item
DatasetField = 'REGISTRO_MERCANTIL'
TableField = 'REGISTRO_MERCANTIL'
end>
end>
Name = 'InformeFacturasCliente'
@ -371,6 +405,41 @@ object RptFacturasCliente: TRptFacturasCliente
item
Name = 'IMPORTE_RETENCION'
DataType = datCurrency
end
item
Name = 'EMPRESA_CALLE'
DataType = datString
Size = 255
end
item
Name = 'EMPRESA_CODIGO_POSTAL'
DataType = datString
Size = 10
end
item
Name = 'EMPRESA_POBLACION'
DataType = datString
Size = 255
end
item
Name = 'EMPRESA_TELEFONO'
DataType = datString
Size = 25
end
item
Name = 'EMPRESA_FAX'
DataType = datString
Size = 25
end
item
Name = 'EMPRESA_EMAIL'
DataType = datString
Size = 255
end
item
Name = 'REGISTRO_MERCANTIL'
DataType = datString
Size = 255
end>
ReadOnly = True
end
@ -1601,7 +1670,7 @@ object RptFacturasCliente: TRptFacturasCliente
PrintOptions.Printer = 'Por defecto'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 39065.872423495400000000
ReportOptions.LastChange = 40210.690281921300000000
ReportOptions.LastChange = 40210.707089826390000000
ScriptLanguage = 'PascalScript'
ShowProgress = False
StoreInDFM = False

View File

@ -250,7 +250,7 @@ begin
DataTable.Edit;
ID_CLIENTE := FCliente.ID;
if FCliente.ID_FORMA_PAGO > 0 then
if (ID_FORMA_PAGO = 0) and (FCliente.ID_FORMA_PAGO > 0) then
ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO;
DESCUENTO := FCliente.DESCUENTO;