Se arreglan las ordenes de devolucion para que puedan meter una dirección de salida del material en lugar de un almacen u obra

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@844 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2009-01-16 15:21:51 +00:00
parent 95567d6c28
commit 984971d58f
4 changed files with 125 additions and 44 deletions

View File

@ -639,8 +639,8 @@ begin
raise Exception.Create('Una orden de devolución no puede tener un importe total positivo');
//Una orden de devolución debe tener relleno el almacén de salida de material
if (AAlbaran.ID_ALMACEN < 0) or (AAlbaran.ID_ALMACEN = 0) then
raise Exception.Create('Debe indicar el almacén de salida de esta orden de devolución');
if (Length(AAlbaran.CALLE) = 0) and (AAlbaran.ID_ALMACEN = 0) then
raise Exception.Create('Debe indicar una dirección de salida o almacén para esta orden de devolución');
end;
{ Asegurarse de valores en campos "automáticos" tanto

View File

@ -6,11 +6,21 @@ inherited frViewAlbaranDevProveedor: TfrViewAlbaranDevProveedor
ExplicitHeight = 470
inherited edtFechaAlbaran: TcxDBDateEdit
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 330
Width = 330
end
inherited memObservaciones: TcxDBMemo
Left = 444
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 444
ExplicitWidth = 186
ExplicitHeight = 172
Height = 172
@ -18,37 +28,14 @@ inherited frViewAlbaranDevProveedor: TfrViewAlbaranDevProveedor
end
inherited eReferencia: TcxDBTextEdit
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 330
Width = 330
end
inherited frViewProveedorAlbaran: TfrViewDatosYSeleccionProveedor
Width = 350
ExplicitWidth = 350
inherited dxLayoutControl1: TdxLayoutControl
Width = 350
inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 224
Width = 224
end
inherited edtNIFCIF: TcxDBTextEdit
ExplicitWidth = 562
Width = 562
end
inherited edtCalle: TcxDBTextEdit
ExplicitWidth = 562
Width = 562
end
inherited edtPoblacion: TcxDBTextEdit
ExplicitWidth = 177
Width = 177
end
inherited edtProvincia: TcxDBTextEdit
ExplicitWidth = 327
Width = 327
end
end
end
inherited frViewDireccionEntregaAlbaranProv1: TfrViewDireccionEntregaAlbaranProv
Width = 445
Height = 199
@ -57,16 +44,30 @@ inherited frViewAlbaranDevProveedor: TfrViewAlbaranDevProveedor
inherited dxLayoutControl1: TdxLayoutControl
Width = 445
Height = 199
ExplicitHeight = 78
ExplicitWidth = 445
ExplicitHeight = 199
inherited rdxDestino1: TRadioButton
Width = 402
Caption = 'Salida del albar'#225'n del almac'#233'n:'
ExplicitWidth = 402
end
inherited rdxDestino2: TRadioButton
Width = 287
Caption = 'Salida del albar'#225'n desde esta otra direcci'#243'n:'
ExplicitWidth = 287
end
inherited cbLista: TcxDBLookupComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 402
Width = 402
end
inherited bModificar: TBitBtn
Left = 254
Top = 164
ExplicitLeft = 254
ExplicitTop = 164
end
inherited txtDireccion: TStaticText
@ -75,19 +76,18 @@ inherited frViewAlbaranDevProveedor: TfrViewAlbaranDevProveedor
ExplicitWidth = 765
ExplicitHeight = 25
end
inherited RadioButton1: TRadioButton
Caption = 'Salida del albar'#225'n de la obra:'
inherited cbListaObras: TcxDBLookupComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 402
Width = 402
end
inherited dxLayoutGroup1: TdxLayoutGroup
inherited dxLayoutControl1Item2: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item4: TdxLayoutItem
Visible = False
end
inherited dxLayoutControl1Item1: TdxLayoutItem
Visible = False
end
inherited RadioButton1: TRadioButton
Width = 402
Caption = 'Salida del albar'#225'n de la obra:'
ExplicitWidth = 402
end
end
inherited ActionList1: TActionList
@ -109,34 +109,115 @@ inherited frViewAlbaranDevProveedor: TfrViewAlbaranDevProveedor
end
inherited cbFormaPago: TcxDBLookupComboBox
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 192
Width = 192
end
inherited bFormasPago: TButton
Left = 282
ExplicitLeft = 282
end
inherited eReferenciaPedidoCli: TcxTextEdit
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 192
Width = 192
end
inherited Button1: TButton
Left = 282
ExplicitLeft = 282
end
inherited eRefFactura: TcxDBTextEdit
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 330
Width = 330
end
inherited eReferenciaProveedor: TcxDBTextEdit
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 330
Width = 330
end
inherited eReferenciaFacturaProveedor: TcxDBTextEdit
Left = 114
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 114
ExplicitWidth = 330
Width = 330
end
inherited frViewDatosYSeleccionProveedorAlbaran1: TfrViewDatosYSeleccionProveedorAlbaran
Left = 444
Width = 411
ExplicitLeft = 444
ExplicitWidth = 411
inherited dxLayoutControl1: TdxLayoutControl
Width = 411
inherited edtlNombre: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 224
Width = 224
end
inherited edtNIFCIF: TcxDBTextEdit
Left = 248
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 248
end
inherited edtPersonaContacto: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 283
Width = 283
end
inherited edtDireccion: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
inherited Button4: TButton
Left = 328
ExplicitLeft = 328
end
inherited Button5: TButton
Left = 328
ExplicitLeft = 328
end
inherited Button3: TBitBtn
Left = 153
ExplicitLeft = 153
end
end
end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group6: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup

View File

@ -9,7 +9,7 @@ uses
cxDBLookupEdit, cxDBLookupComboBox, uViewDireccionEntregaAlbaranProv,
uCustomView, uViewBase, uViewDatosYSeleccionProveedor, cxDBEdit, cxMemo,
cxContainer, cxEdit, cxMaskEdit, cxCalendar, cxControls,
uDAInterfaces;
uDAInterfaces, uViewDatosYSeleccionProveedorAlbaran;
type
IViewAlbaranDevProveedor = interface(IViewAlbaranProveedor)

View File

@ -363,7 +363,7 @@ begin
ATabla.Active := True;
showmessage(inttostr(ATabla.RecordCount));
// showmessage(inttostr(ATabla.RecordCount));
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, IntToStr(IdEmpresa));
if VarIsNull(AInforme) then