diff --git a/Build/Build.fbl6 b/Build/Build.fbl6
index 2c78b6a..0050023 100644
Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index f44e3be..e1875bd 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,34 +58,34 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm
index 15294aa..3493aa6 100644
--- a/Source/GUIBase/uEditorDBItem.dfm
+++ b/Source/GUIBase/uEditorDBItem.dfm
@@ -21,7 +21,7 @@ inherited fEditorDBItem: TfEditorDBItem
Width = 650
ExplicitWidth = 650
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 605
+ ExplicitWidth = 650
inherited TBXItem26: TTBXItem
Visible = False
end
@@ -77,12 +77,14 @@ inherited fEditorDBItem: TfEditorDBItem
object pgPaginas: TPageControl [3]
AlignWithMargins = True
Left = 3
- Top = 109
+ Top = 112
Width = 644
- Height = 328
+ Height = 325
ActivePage = pagGeneral
Align = alClient
TabOrder = 2
+ ExplicitTop = 109
+ ExplicitHeight = 328
object pagGeneral: TTabSheet
Caption = 'General'
ExplicitLeft = 0
@@ -93,7 +95,7 @@ inherited fEditorDBItem: TfEditorDBItem
end
object PnlComentario: TPanel [4]
Left = 0
- Top = 76
+ Top = 79
Width = 650
Height = 30
Align = alTop
@@ -103,6 +105,7 @@ inherited fEditorDBItem: TfEditorDBItem
ParentBackground = False
TabOrder = 4
VerticalAlignment = taAlignTop
+ ExplicitTop = 76
object lbComentario: TLabel
AlignWithMargins = True
Left = 6
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
index 19b10a4..23e3a44 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
@@ -842,12 +842,13 @@ begin
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado: EsEliminable');
-{
+
if (AFactura.SITUACION <> CTE_PENDIENTE) then
begin
Result := False;
AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser eliminada';
- end
+ end;
+{
else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
begin
Result := False;
@@ -862,17 +863,37 @@ begin
end;
function TFacturasClienteController.EsModificable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
+var
+ AFormaPago: IBizFormaPago;
+ bFacturaConRecibos: Boolean;
+
begin
+ Result := True;
AComentario := Null;
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado: EsModificable');
-{
- if (AFactura.SITUACION <> CTE_PENDIENTE) then
+
+ bFacturaConRecibos := not AFactura.FECHA_VENCIMIENTOIsNull;
+ if not bFacturaConRecibos then
+ with TFormasPagoController.Create do
+ begin
+ try
+ AFormaPago := Buscar(AFactura.ID_FORMA_PAGO);
+ AFormaPago.DataTable.Active := True;
+ bFacturaConRecibos := (AFormaPago.Plazos.RecordCount > 0) ;
+ finally
+ AFormaPago := NIL;
+ Free;
+ end;
+ end;
+
+ if (bFacturaConRecibos and (AFactura.SITUACION <> CTE_PENDIENTE)) then
begin
Result := False;
AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser modificada';
- end
+ end;
+{
else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
begin
Result := False;
@@ -1202,9 +1223,6 @@ begin
ARecibos := ARecibosClienteController.BuscarRecibosFactura(AFactura.ID);
ARecibosClienteController.EliminarTodo(ARecibos);
- if AFormaPago.Plazos.RecordCount = 0 then
- Exit; //No hay plazos en la forma de pago en la factura y por lo tanto no se generan recibos
-
//Se cambia la lógica a peticion de acana, en el caso de meter una fecha de vencimiento,
//los plazos de la forma de pago no tendrán efecto, se generará un recibo con el 100% y fecha de vencimiento
//de la factura. (Se permitirá para acana poder dar de alta facturas sin recibos asociados)
diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
index 3d9d0f1..c2a77a3 100644
--- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
@@ -254,6 +254,7 @@ begin
ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
USUARIO := AppFactuGES.UsuarioActivo.UserName;
FECHA_FACTURA := DateOf(Now);
+// FECHA_VENCIMIENTO := DateOf(Now);
TIPO := CTE_TIPO_FACTURA;
SITUACION := 'PENDIENTE';
ID_CLIENTE := ID_NULO;
diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm
index 38d9442..0ad46a7 100644
--- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm
@@ -78,7 +78,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Properties.ListOptions.ShowHeader = False
Properties.ListOptions.SyncMode = True
Properties.ListSource = dsFormaPago
- Properties.OnEditValueChanged = edtFechaVencimientoPropertiesEditValueChanged
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
@@ -195,7 +194,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Anchors = [akLeft, akTop, akRight]
DataBinding.DataField = 'FECHA_VENCIMIENTO'
DataBinding.DataSource = DADataSource
- Properties.OnEditValueChanged = edtFechaVencimientoPropertiesEditValueChanged
+ Properties.ImmediatePost = True
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.Color = clInfoBk
@@ -274,6 +273,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Properties.ImmediatePost = True
Properties.Items.Strings = (
'PENDIENTE'
+ 'PARCIALMENTE PAGADA'
'PAGADA')
TabOrder = 2
Width = 121
@@ -307,7 +307,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente
Control = edtFecha
ControlOptions.ShowBorder = False
end
- object dxLayoutControl1Item8: TdxLayoutItem
+ object ledtSituacion: TdxLayoutItem
Caption = 'Situaci'#243'n:'
Control = edtSituacion
ControlOptions.ShowBorder = False
diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas
index a3ac68e..496ffc5 100644
--- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas
@@ -59,10 +59,11 @@ type
cbRecargoEquivalencia: TcxDBCheckBox;
dxLayoutControl1Group9: TdxLayoutGroup;
edtSituacion: TcxDBComboBox;
- dxLayoutControl1Item8: TdxLayoutItem;
+ ledtSituacion: TdxLayoutItem;
procedure bFormasPagoClick(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
procedure CustomViewCreate(Sender: TObject);
+ procedure cbFormaPagoPropertiesEditValueChanged(Sender: TObject);
procedure edtFechaVencimientoPropertiesEditValueChanged(Sender: TObject);
protected
FFactura : IBizFacturaCliente;
@@ -82,7 +83,7 @@ type
implementation
uses
- uDataModuleContactos, schFacturasClienteClient_Intf;
+ DateUtils, uDataModuleContactos, schFacturasClienteClient_Intf;
{$R *.dfm}
@@ -100,22 +101,61 @@ begin
inherited;
FFormasPago := Nil;
FFormasPagoController := TFormasPagoController.Create;
+ cbFormaPago.Properties.OnEditValueChanged := cbFormaPagoPropertiesEditValueChanged;
+ edtFechaVencimiento.Properties.OnEditValueChanged := edtFechaVencimientoPropertiesEditValueChanged;
end;
procedure TfrViewFacturaCliente.CustomViewDestroy(Sender: TObject);
begin
- inherited;
FFormasPago := Nil;
FFormasPagoController := NIL;
+ cbFormaPago.Properties.OnEditValueChanged := Nil;
+ edtFechaVencimiento.Properties.OnEditValueChanged := Nil;
+ inherited;
end;
-procedure TfrViewFacturaCliente.edtFechaVencimientoPropertiesEditValueChanged(Sender: TObject);
+procedure TfrViewFacturaCliente.edtFechaVencimientoPropertiesEditValueChanged(
+ Sender: TObject);
begin
- if Assigned(FFormasPago) then
- if (FFormasPago.Plazos.RecordCount = 0) then
- ledtFechaVencimiento.Enabled := True
- else
- ledtFechaVencimiento.Enabled := False;
+ inherited;
+ if Assigned(Factura) and (Factura.DataTable.State in dsEditModes) then
+ begin
+ if (edtFechaVencimiento.EditingValue <> null) then
+
+ 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
+ else
+ begin
+ // edtSituacion.EditValue := CTE_PENDIENTE;
+ ledtSituacion.Enabled := True;
+ end;
+ end;
+end;
+
+procedure TfrViewFacturaCliente.cbFormaPagoPropertiesEditValueChanged(Sender: TObject);
+begin
+ if Assigned(Factura) and (Factura.DataTable.State in dsEditModes) then
+ begin
+ if Assigned(FFormasPago) then
+ if (FFormasPago.Plazos.RecordCount = 0) then
+ begin
+// edtFechaVencimiento.EditValue := DateOf(Now);
+ ledtFechaVencimiento.Enabled := True;
+ edtSituacion.EditValue := CTE_PENDIENTE;
+ ledtSituacion.Enabled := True;
+ end
+ else
+ begin
+ Application.MessageBox('Ha elegido una forma de pago con plazos asignados, la situación de la factura vendrá dada por la situación de los recibos generados según los plazos', 'Atención', MB_OK);
+ edtFechaVencimiento.EditValue := Null;
+ ledtFechaVencimiento.Enabled := False;
+ edtSituacion.EditValue := CTE_PENDIENTE;
+ ledtSituacion.Enabled := False;
+ end;
+ end;
end;
function TfrViewFacturaCliente.GetController: IFacturasClienteController;
@@ -152,10 +192,21 @@ begin
//Posicionamos la tabla en la forma de pago que tiene la factura ya que no lo hace el componente por si solo
FFormasPago.DataTable.Locate(fld_FacturasClienteID, FFactura.ID_FORMA_PAGO, []);
- if (FFormasPago.Plazos.RecordCount = 0) then
- ledtFechaVencimiento.Enabled := True
+ if ((not FFactura.FECHA_VENCIMIENTOIsNull) or (FFormasPago.Plazos.RecordCount > 0)) then
+ begin
+ if (edtFechaVencimiento.EditingValue <> null) then
+ ledtSituacion.Enabled := False;
+
+ if (FFormasPago.Plazos.RecordCount > 0) then
+ ledtFechaVencimiento.Enabled := False
+ else
+ ledtFechaVencimiento.Enabled := true;
+ end
else
- ledtFechaVencimiento.Enabled := False;
+ begin
+ ledtFechaVencimiento.Enabled := True;
+ ledtSituacion.Enabled := True;
+ end;
//Solo se deshabilita al insertar, luego la referencia será modificable
//eReferencia.Enabled := (FFactura.DataTable.State = dsInsert);
diff --git a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
index 89e3b3e..3e2f306 100644
--- a/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
+++ b/Source/Modulos/Facturas de proveedor/Controller/uFacturasProveedorController.pas
@@ -905,12 +905,13 @@ begin
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado: EsEliminable');
-{
+
if (AFactura.SITUACION <> CTE_PENDIENTE) then
begin
Result := False;
AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser eliminada';
- end
+ end;
+{
else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
begin
Result := False;
@@ -931,12 +932,13 @@ begin
if not Assigned(AFactura) then
raise Exception.Create ('Factura no asignado: EsModificable');
-{
+
if (AFactura.SITUACION <> CTE_PENDIENTE) then
begin
Result := False;
AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser modificada';
- end
+ end;
+{
else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then
begin
Result := False;
diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm
index 2b6740f..b7ba565 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm
@@ -7,12 +7,13 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Position = poScreenCenter
OnClose = CustomEditorClose
ExplicitWidth = 754
- ExplicitHeight = 640
+ ExplicitHeight = 644
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 746
Caption = 'Nueva factura de proveedor'
+ ExplicitTop = 52
ExplicitWidth = 746
inherited Image1: TImage
Left = 719
@@ -42,7 +43,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Width = 746
ExplicitWidth = 746
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 330
+ ExplicitWidth = 370
inherited TBXItem2: TTBXItem
Visible = False
end
@@ -80,21 +81,21 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
end
inherited pgPaginas: TPageControl
Width = 740
- Height = 312
- ActivePage = PagContratos
+ Height = 309
OnChanging = pgPaginasChanging
+ ExplicitTop = 112
ExplicitWidth = 740
- ExplicitHeight = 312
+ ExplicitHeight = 309
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 732
- ExplicitHeight = 284
+ ExplicitHeight = 281
inline frViewFacturaProveedor1: TfrViewFacturaProveedor
Left = 0
Top = 0
Width = 732
- Height = 284
+ Height = 281
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -105,15 +106,15 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 732
- ExplicitHeight = 284
+ ExplicitHeight = 281
inherited dxLayoutControl1: TdxLayoutControl
Width = 732
- Height = 284
+ Height = 281
ExplicitWidth = 732
- ExplicitHeight = 284
+ ExplicitHeight = 281
DesignSize = (
732
- 284)
+ 281)
inherited eReferencia: TcxDBTextEdit
ExplicitWidth = 191
Width = 191
@@ -127,8 +128,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Width = 53
end
inherited bFormasPago: TButton
- Left = 183
- ExplicitLeft = 183
+ Left = 181
+ ExplicitLeft = 181
end
inherited eReferenciaProveedor: TcxDBTextEdit
ExplicitWidth = 191
@@ -151,9 +152,9 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Width = 191
end
inherited frViewProveedorFactura1: TfrViewProveedorFactura
- Left = 343
+ Left = 341
Width = 350
- ExplicitLeft = 343
+ ExplicitLeft = 341
ExplicitWidth = 350
inherited dxLayoutControl1: TdxLayoutControl
Width = 350
@@ -202,7 +203,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
ExplicitWidth = 671
inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewFacturaProveedor1.DADataSource
- ExplicitWidth = 671
+ ExplicitWidth = 669
ExplicitHeight = 20
Width = 671
end
@@ -217,7 +218,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Left = 0
Top = 0
Width = 732
- Height = 284
+ Height = 281
Align = alClient
BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET
@@ -230,7 +231,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 732
- ExplicitHeight = 284
+ ExplicitHeight = 281
inherited ToolBar1: TToolBar
Width = 732
ExplicitWidth = 732
@@ -255,51 +256,54 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
ExplicitWidth = 57
end
inherited UpDown1: TUpDown
- Left = 202
- ExplicitLeft = 202
+ Left = 220
+ ExplicitLeft = 220
end
inherited ToolButton13: TToolButton
- Left = 219
- ExplicitLeft = 219
+ Left = 237
+ ExplicitLeft = 237
end
inherited ToolButton6: TToolButton
- Left = 227
- ExplicitLeft = 227
+ Left = 245
+ ExplicitLeft = 245
end
inherited ToolButton7: TToolButton
- Left = 261
- ExplicitLeft = 261
+ Left = 279
+ ExplicitLeft = 279
end
inherited ToolButton8: TToolButton
- Left = 295
- ExplicitLeft = 295
+ Left = 313
+ ExplicitLeft = 313
end
inherited ToolButton12: TToolButton
- Left = 329
- ExplicitLeft = 329
+ Left = 347
+ ExplicitLeft = 347
end
inherited ToolButton9: TToolButton
- Left = 337
- ExplicitLeft = 337
+ Left = 355
+ ExplicitLeft = 355
end
inherited ToolButton10: TToolButton
- Left = 371
- ExplicitLeft = 371
+ Left = 389
+ ExplicitLeft = 389
end
inherited ToolButton11: TToolButton
- Left = 405
- ExplicitLeft = 405
+ Left = 423
+ ExplicitLeft = 423
end
end
inherited cxGrid: TcxGrid
Width = 732
- Height = 212
+ Height = 209
ExplicitWidth = 732
- ExplicitHeight = 212
+ ExplicitHeight = 209
end
inherited TBXDock1: TTBXDock
Width = 732
ExplicitWidth = 732
+ inherited TBXToolbar1: TTBXToolbar
+ ExplicitWidth = 622
+ end
end
end
end
@@ -310,7 +314,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Left = 0
Top = 0
Width = 732
- Height = 284
+ Height = 281
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -321,12 +325,12 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
TabOrder = 0
ReadOnly = False
ExplicitWidth = 732
- ExplicitHeight = 284
+ ExplicitHeight = 281
inherited cxGrid: TcxGrid
Width = 732
- Height = 259
+ Height = 256
ExplicitWidth = 732
- ExplicitHeight = 259
+ ExplicitHeight = 256
end
inherited ToolBar1: TToolBar
Width = 732
@@ -408,8 +412,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited Bevel3: TBevel
Left = 398
Top = 30
+ Height = 122
ExplicitLeft = 398
ExplicitTop = 30
+ ExplicitHeight = 122
end
inherited Bevel4: TBevel
Left = 510
@@ -531,6 +537,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
Style.IsFontAssigned = True
ExplicitLeft = 581
ExplicitTop = 104
+ ExplicitWidth = 56
+ Width = 56
end
inherited eImporteNeto: TcxDBCurrencyEdit
Top = 30
@@ -622,6 +630,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
end
inherited PnlComentario: TPanel [5]
Width = 746
+ ExplicitTop = 79
ExplicitWidth = 746
inherited lbComentario: TLabel
Width = 736
diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm
index 7981dbe..e104376 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm
@@ -77,7 +77,6 @@ inherited frViewFacturaProveedor: TfrViewFacturaProveedor
Properties.ListOptions.ShowHeader = False
Properties.ListOptions.SyncMode = True
Properties.ListSource = dsFormaPago
- Properties.OnEditValueChanged = cbFormaPagoPropertiesEditValueChanged
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas
index 3398564..303d0f4 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas
+++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas
@@ -91,7 +91,7 @@ type
implementation
uses
- uDataModuleContactos, schFacturasProveedorClient_Intf, uBizDireccionesContacto,
+ DateUtils, uDataModuleContactos, schFacturasProveedorClient_Intf, uBizDireccionesContacto,
uProveedoresController;
{$R *.dfm}
@@ -140,11 +140,21 @@ end;
procedure TfrViewFacturaProveedor.cbFormaPagoPropertiesEditValueChanged(Sender: TObject);
begin
- if Assigned(FFormasPago) then
- if (FFormasPago.Plazos.RecordCount = 0) then
- ledtFechaVencimiento.Enabled := True
- else
- ledtFechaVencimiento.Enabled := False;
+ if Assigned(Factura) and (Factura.DataTable.State in dsEditModes) then
+ begin
+ if Assigned(FFormasPago) then
+ if (FFormasPago.Plazos.RecordCount = 0) then
+ begin
+ edtFechaVencimiento.EditValue := DateOf(Now);
+ ledtFechaVencimiento.Enabled := True
+ end
+ else
+ begin
+ Application.MessageBox('Ha elegido una forma de pago con plazos asignados, los vencimientos se regiran por dichos plazos', 'Atención', MB_OK);
+ edtFechaVencimiento.EditValue := Null;
+ ledtFechaVencimiento.Enabled := False;
+ end;
+ end;
end;
procedure TfrViewFacturaProveedor.CustomViewCreate(Sender: TObject);
@@ -154,14 +164,16 @@ begin
FTiposFacturaProveedor := Nil;
FFormasPagoController := TFormasPagoController.Create;
frViewProveedorFactura1.MsgElegirProveedor := 'Elija el proveedor al que se le realizará la factura.';
+ cbFormaPago.Properties.OnEditValueChanged := cbFormaPagoPropertiesEditValueChanged;
end;
procedure TfrViewFacturaProveedor.CustomViewDestroy(Sender: TObject);
begin
- inherited;
+ cbFormaPago.Properties.OnEditValueChanged := Nil;
FFormasPago := Nil;
FTiposFacturaProveedor := Nil;
FFormasPagoController := NIL;
+ inherited;
end;
procedure TfrViewFacturaProveedor.frViewProveedorFacturaButton1Click(Sender: TObject);
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index b0f0992..c61671c 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -1,301 +1,300 @@
-
+
-
- {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
- FactuGES_Server.dpr
- Debug
- AnyCPU
- DCC32
- ..\..\Output\Debug\Servidor\FactuGES_Server.exe
-
-
- 7.0
- False
- False
- 0
- 3
- ..\..\Output\Release\Servidor
- RELEASE
-
-
- 7.0
- 3
- ..\..\Output\Debug\Servidor
- DEBUG;
- True
-
-
- Delphi.Personality
-
-
-FalseTrueFalseTrueFalse2580FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.5.8.0FactuGES (Servidor)2.5.8.0lunes, 20 de mayo de 2013 10:48
-
- File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
- FactuGES_Server.dpr
-
-
-
-
- MainSource
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
- TRORemoteDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
- TFrame
-
-
-
- TFrame
-
-
-
- TForm
-
-
-
- TFrame
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
+ FactuGES_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Output\Debug\Servidor\FactuGES_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ 3
+ ..\..\Output\Release\Servidor
+ RELEASE
+
+
+ 7.0
+ 3
+ ..\..\Output\Debug\Servidor
+ DEBUG;
+ True
+
+
+ Delphi.Personality
+
+
+ FalseTrueFalseTrueFalse2580FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.5.8.0FactuGES (Servidor)2.5.8.0lunes, 20 de mayo de 2013 10:48
+ File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
+ FactuGES_Server.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+ TRORemoteDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TFrame
+
+
+
+ TFrame
+
+
+
+ TForm
+
+
+
+ TFrame
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+