Facturas de cliente -> limpiar el valor del campo de la fecha de vencimiento cuando esta es nula (mostraba 12/30/1899)

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@71 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
David Arranz 2013-06-03 17:35:26 +00:00
parent 6f39c4ebaa
commit 1d00fb71ce
12 changed files with 469 additions and 368 deletions

View File

@ -21,7 +21,7 @@ inherited fEditorDBItem: TfEditorDBItem
Width = 650
ExplicitWidth = 650
inherited tbxMain: TTBXToolbar
ExplicitWidth = 650
ExplicitWidth = 605
inherited TBXItem26: TTBXItem
Visible = False
end
@ -77,14 +77,12 @@ inherited fEditorDBItem: TfEditorDBItem
object pgPaginas: TPageControl [3]
AlignWithMargins = True
Left = 3
Top = 112
Top = 109
Width = 644
Height = 325
Height = 328
ActivePage = pagGeneral
Align = alClient
TabOrder = 2
ExplicitTop = 109
ExplicitHeight = 328
object pagGeneral: TTabSheet
Caption = 'General'
ExplicitLeft = 0
@ -95,7 +93,7 @@ inherited fEditorDBItem: TfEditorDBItem
end
object PnlComentario: TPanel [4]
Left = 0
Top = 79
Top = 76
Width = 650
Height = 30
Align = alTop
@ -105,7 +103,6 @@ inherited fEditorDBItem: TfEditorDBItem
ParentBackground = False
TabOrder = 4
VerticalAlignment = taAlignTop
ExplicitTop = 76
object lbComentario: TLabel
AlignWithMargins = True
Left = 6

View File

@ -68,7 +68,8 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente
item
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
ServerAutoRefresh = True
DisplayLabel = 'Fecha de vencimiento'
DictionaryEntry = 'FacturasCliente_FECHA_VENCIMIENTO'
end
item
Name = 'SITUACION'

View File

@ -3,7 +3,7 @@ unit schFacturasClienteClient_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
const
{ Data table rules ids
@ -175,7 +175,7 @@ type
end;
{ TListaAnosFacturasDataTableRules }
TListaAnosFacturasDataTableRules = class(TDADataTableRules, IListaAnosFacturas)
TListaAnosFacturasDataTableRules = class(TIntfObjectDADataTableRules, IListaAnosFacturas)
private
protected
{ Property getters and setters }
@ -491,7 +491,7 @@ type
end;
{ TFacturasClienteDataTableRules }
TFacturasClienteDataTableRules = class(TDADataTableRules, IFacturasCliente)
TFacturasClienteDataTableRules = class(TIntfObjectDADataTableRules, IFacturasCliente)
private
f_OBSERVACIONES: IROStrings;
procedure OBSERVACIONES_OnChange(Sender: TObject);
@ -893,7 +893,7 @@ type
end;
{ TFacturasCliente_DetallesDataTableRules }
TFacturasCliente_DetallesDataTableRules = class(TDADataTableRules, IFacturasCliente_Detalles)
TFacturasCliente_DetallesDataTableRules = class(TIntfObjectDADataTableRules, IFacturasCliente_Detalles)
private
protected
{ Property getters and setters }

View File

@ -281,7 +281,7 @@ object srvFacturasCliente: TsrvFacturasCliente
item
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_FECHA_VENCIMIENTO'
end
item
Name = 'SITUACION'
@ -344,12 +344,14 @@ object srvFacturasCliente: TsrvFacturasCliente
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_NOMBRE_CLIENTE'
end
item
Name = 'NOMBRE_COMERCIAL_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_NOMBRE_COMERCIAL_CLIENTE'
end
item
Name = 'NIF_CIF'
@ -366,6 +368,7 @@ object srvFacturasCliente: TsrvFacturasCliente
item
Name = 'ID_DIRECCION'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_DIRECCION'
end
item
Name = 'CALLE'
@ -452,47 +455,57 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'ID_TIENDA'
DataType = datInteger
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_ID_TIENDA'
end
item
Name = 'TIENDA'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_TIENDA'
end
item
Name = 'ID_SUBCUENTA'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_SUBCUENTA'
end
item
Name = 'SUBCUENTA'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_SUBCUENTA'
end
item
Name = 'ID_EJERCICIO'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_EJERCICIO'
end
item
Name = 'ESTADO_EJERCICIO'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_ESTADO_EJERCICIO'
end
item
Name = 'ASIENTO_PUNTEADO'
DataType = datSmallInt
DictionaryEntry = 'FacturasCliente_ASIENTO_PUNTEADO'
end
item
Name = 'ID_CONTRATO'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_CONTRATO'
end
item
Name = 'REF_CONTRATO'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_REF_CONTRATO'
end
item
Name = 'SIN_COMISION'
DataType = datSmallInt
DictionaryEntry = 'FacturasCliente_SIN_COMISION'
end>
end
item
@ -1695,6 +1708,68 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'FacturasCliente_Detalles_VALORADO'
DataType = datSmallInt
DisplayLabel = #191'Valorado?'
end
item
Name = 'FacturasCliente_NOMBRE_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_NOMBRE_COMERCIAL_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_ID_DIRECCION'
DataType = datInteger
end
item
Name = 'FacturasCliente_ID_TIENDA'
DataType = datInteger
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_TIENDA'
DataType = datString
Size = 255
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_ID_SUBCUENTA'
DataType = datInteger
end
item
Name = 'FacturasCliente_SUBCUENTA'
DataType = datString
Size = 255
end
item
Name = 'FacturasCliente_ID_EJERCICIO'
DataType = datInteger
end
item
Name = 'FacturasCliente_ESTADO_EJERCICIO'
DataType = datString
Size = 255
end
item
Name = 'FacturasCliente_ASIENTO_PUNTEADO'
DataType = datSmallInt
end
item
Name = 'FacturasCliente_ID_CONTRATO'
DataType = datInteger
end
item
Name = 'FacturasCliente_REF_CONTRATO'
DataType = datString
Size = 255
end
item
Name = 'FacturasCliente_SIN_COMISION'
DataType = datSmallInt
end>
Left = 150
Top = 22

View File

@ -246,7 +246,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewFacturaCliente1.DADataSource
ExplicitWidth = 785
ExplicitHeight = 20
Height = 228
Width = 521
end
@ -259,6 +258,14 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 158
Width = 158
end
inherited edtSituacion: TcxDBComboBox
ExplicitWidth = 121
Width = 121
end
inherited Button1: TButton
Width = 75
ExplicitWidth = 75
end
end
end
end
@ -379,6 +386,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 846
ExplicitTop = 24
ExplicitWidth = 846
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548
end
end
end
end
@ -467,10 +477,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited Bevel3: TBevel
Left = 457
Top = 30
Height = 122
ExplicitLeft = 457
ExplicitTop = 30
ExplicitHeight = 122
end
inherited Bevel4: TBevel
Left = 569
@ -506,14 +514,14 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
inherited ImporteTotal: TcxDBCurrencyEdit
Left = 570
Top = 131
Top = 158
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 570
ExplicitTop = 131
ExplicitTop = 158
ExplicitWidth = 225
Width = 225
end
@ -553,7 +561,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
inherited edtRE: TcxDBSpinEdit
Left = 569
Top = 104
Top = 131
Properties.AssignedValues.MinValue = True
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
@ -561,21 +569,35 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 569
ExplicitTop = 131
end
inherited edtIRPF: TcxDBSpinEdit
Left = 569
Top = 104
Style.IsFontAssigned = True
ExplicitLeft = 569
ExplicitTop = 104
end
inherited ImporteRE: TcxDBCurrencyEdit
Left = 640
Top = 104
Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 640
ExplicitTop = 104
ExplicitTop = 131
ExplicitWidth = 155
Width = 155
end
inherited ImporteIRPF: TcxDBCurrencyEdit
Left = 640
Top = 104
Style.IsFontAssigned = True
ExplicitLeft = 640
ExplicitTop = 104
end
inherited eImporteNeto: TcxDBCurrencyEdit
Top = 30
Style.LookAndFeel.SkinName = ''

View File

@ -1,5 +1,5 @@
inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 792
Width = 451
Height = 304
Align = alClient
OnCreate = CustomViewCreate
@ -9,7 +9,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
Width = 792
Width = 451
Height = 304
Align = alClient
ParentBackground = True
@ -17,9 +17,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
LookAndFeel = dxLayoutOfficeLookAndFeel1
ExplicitWidth = 451
DesignSize = (
792
451
304)
object eReferencia: TcxDBTextEdit
Left = 135
@ -96,7 +95,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 78
end
object bFormasPago: TButton
Left = 251
Left = 241
Top = 135
Width = 132
Height = 23
@ -106,7 +105,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
end
inline frViewTienda1: TfrViewTienda
Left = 22
Top = 273
Top = 246
Width = 351
Height = 48
Enabled = False
@ -116,10 +115,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 8
TabOrder = 7
ReadOnly = False
ExplicitLeft = 22
ExplicitTop = 273
ExplicitTop = 246
ExplicitWidth = 351
ExplicitHeight = 48
inherited dxLayoutControl1: TdxLayoutControl
@ -134,7 +133,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
end
end
inline frViewClienteFactura1: TfrViewClienteFactura
Left = 411
Left = 401
Top = 30
Width = 398
Height = 265
@ -144,9 +143,9 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 10
TabOrder = 9
ReadOnly = False
ExplicitLeft = 411
ExplicitLeft = 401
ExplicitTop = 30
ExplicitWidth = 398
ExplicitHeight = 265
@ -176,12 +175,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Width = 276
end
inherited edtCodigoPostal: TcxDBTextEdit
Left = 248
ExplicitLeft = 248
Left = 192
ExplicitLeft = 192
end
inherited Button3: TBitBtn
Left = 138
ExplicitLeft = 138
Left = 82
ExplicitLeft = 82
end
end
end
@ -194,6 +193,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Properties.DateButtons = [btnClear, btnToday]
Properties.DateOnError = deNull
Properties.ImmediatePost = True
Properties.OnEditValueChanged = edtFechaVencimientoPropertiesEditValueChanged
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = clInfoBk
@ -211,7 +211,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
end
inline frViewObservaciones1: TfrViewObservaciones
Left = 22
Top = 402
Top = 375
Width = 521
Height = 20
Font.Charset = DEFAULT_CHARSET
@ -220,10 +220,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 11
TabOrder = 10
ReadOnly = False
ExplicitLeft = 22
ExplicitTop = 402
ExplicitTop = 375
ExplicitHeight = 20
inherited memObservaciones: TcxDBMemo
DataBinding.DataField = 'OBSERVACIONES'
@ -234,7 +234,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
end
object cbRecargoEquivalencia: TcxDBCheckBox
Left = 22
Top = 351
Top = 324
Caption = ' No acogida a comisiones'
DataBinding.DataField = 'SIN_COMISION'
DataBinding.DataSource = DADataSource
@ -260,7 +260,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 9
TabOrder = 8
Width = 158
end
object edtSituacion: TcxDBComboBox
@ -277,14 +277,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
TabOrder = 2
Width = 121
end
object cxDBDateEdit1: TcxDBDateEdit
Left = 135
Top = 222
DataBinding.DataField = 'FECHA_VENCIMIENTO'
DataBinding.DataSource = DADataSource
TabOrder = 7
Width = 121
end
object Button1: TButton
Left = 22
Top = 191
@ -360,11 +352,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Control = Button1
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item8: TdxLayoutItem
Caption = 'cxDBDateEdit1'
Control = cxDBDateEdit1
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Group4: TdxLayoutGroup
AutoAligns = [aaVertical]
@ -420,6 +407,15 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
end
end
end
object DBEdit1: TDBEdit
Left = 135
Top = 205
Width = 248
Height = 21
DataField = 'FECHA_VENCIMIENTO'
DataSource = DADataSource
TabOrder = 1
end
object DADataSource: TDADataSource
Left = 16
Top = 56

View File

@ -60,10 +60,9 @@ type
dxLayoutControl1Group9: TdxLayoutGroup;
edtSituacion: TcxDBComboBox;
ledtSituacion: TdxLayoutItem;
cxDBDateEdit1: TcxDBDateEdit;
dxLayoutControl1Item8: TdxLayoutItem;
Button1: TButton;
dxLayoutControl1Item9: TdxLayoutItem;
DBEdit1: TDBEdit;
procedure bFormasPagoClick(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure CustomViewCreate(Sender: TObject);
@ -127,12 +126,22 @@ begin
begin
if (edtFechaVencimiento.EditValue <> null) then
begin
if (edtFechaVencimiento.EditValue = 0) then
begin
Factura.DataTable.DisableEventHandlers;
try
Factura.DataTable.FieldByName(fld_FacturasClienteFECHA_VENCIMIENTO).Clear;
finally
Factura.DataTable.EnableEventHandlers;
end;
end
else begin
Application.MessageBox('Ha elegido una fecha de vencimiento, la situación de la factura vendrá dada por la situación del recibo generado con el vencimiento dado', 'Atención', MB_OK);
edtSituacion.EditValue := CTE_PENDIENTE;
ledtSituacion.Enabled := False;
end;
end
else
begin
else begin
// edtSituacion.EditValue := CTE_PENDIENTE;
ledtSituacion.Enabled := True;
end;

View File

@ -157,6 +157,9 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
Caption = 'Contrato'
DataBinding.FieldName = 'REF_CONTRATO'
end
object cxGridViewColumn1: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_VENCIMIENTO'
end
end
inherited cxGridLevel: TcxGridLevel
Caption = 'Todas'

View File

@ -61,6 +61,7 @@ type
cxGridViewIMPORTE_RE: TcxGridDBColumn;
cxGridViewRE: TcxGridDBColumn;
cxGridViewREF_CONTRATO: TcxGridDBColumn;
cxGridViewColumn1: TcxGridDBColumn;
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
out AStyle: TcxStyle);

Binary file not shown.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
@ -29,9 +29,6 @@
<Borland.ProjectType/>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">5</VersionInfo><VersionInfo Name="Release">8</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.5.8.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.5.8.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">lunes, 20 de mayo de 2013 10:48</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>

Binary file not shown.