#398 No recupera la fecha del pago de los recibos si la modificamos y no coge bien la fecha cuendo la metemos manualmente
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1004 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
1dd49fb520
commit
63158c42e5
@ -812,26 +812,25 @@ end;
|
|||||||
procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente);
|
procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente);
|
||||||
var
|
var
|
||||||
AEditor : IEditorFechaPago;
|
AEditor : IEditorFechaPago;
|
||||||
FechaPago: String;
|
AFechaPago: String;
|
||||||
begin
|
begin
|
||||||
if not Assigned(ARecibosCliente) then
|
if not Assigned(ARecibosCliente) then
|
||||||
raise Exception.Create ('Recibos de cliente no asignado (ModificarPago)');
|
raise Exception.Create ('Recibos de cliente no asignado (ModificarPago)');
|
||||||
|
|
||||||
|
|
||||||
//Pedimos la fecha del pago
|
//Pedimos la fecha del pago
|
||||||
CreateEditor('EditorFechaPago', IEditorFechaPago, AEditor);
|
CreateEditor('EditorFechaPago', IEditorFechaPago, AEditor);
|
||||||
if Assigned(AEditor) then
|
if Assigned(AEditor) then
|
||||||
try
|
try
|
||||||
FechaPago := '';
|
AEditor.FechaPago := ARecibosCliente.Pagos.FECHA_PAGO;
|
||||||
if (AEditor.ShowModal = mrOk) then
|
if (AEditor.ShowModal = mrOk) then
|
||||||
FechaPago := DateToStr(AEditor.FechaPago);
|
AFechaPago := DateToStr(AEditor.FechaPago);
|
||||||
finally
|
finally
|
||||||
AEditor.Release;
|
AEditor.Release;
|
||||||
AEditor := NIL;
|
AEditor := NIL;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Length(FechaPago) > 0 then
|
if Length(AFechaPago) > 0 then
|
||||||
PagosController.Modificar(ARecibosCliente.Pagos, FechaPago);
|
PagosController.Modificar(ARecibosCliente.Pagos, AFechaPago);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRecibosClienteController.Nuevo: IBizRecibosCliente;
|
function TRecibosClienteController.Nuevo: IBizRecibosCliente;
|
||||||
|
|||||||
@ -37,7 +37,9 @@ object fEditorFechaPago: TfEditorFechaPago
|
|||||||
object eFechaPago: TcxDateEdit
|
object eFechaPago: TcxDateEdit
|
||||||
Left = 77
|
Left = 77
|
||||||
Top = 64
|
Top = 64
|
||||||
Properties.OnChange = eFechaPagoPropertiesChange
|
Properties.ImmediatePost = True
|
||||||
|
Properties.PostPopupValueOnTab = True
|
||||||
|
Properties.OnEditValueChanged = eFechaPagoPropertiesEditValueChanged
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
Style.LookAndFeel.NativeStyle = True
|
Style.LookAndFeel.NativeStyle = True
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
|
|||||||
@ -16,7 +16,7 @@ type
|
|||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure eFechaPagoPropertiesChange(Sender: TObject);
|
procedure eFechaPagoPropertiesEditValueChanged(Sender: TObject);
|
||||||
private
|
private
|
||||||
FFechaPago : TDateTime;
|
FFechaPago : TDateTime;
|
||||||
function GetFechaPago: TDateTime;
|
function GetFechaPago: TDateTime;
|
||||||
@ -29,17 +29,19 @@ var
|
|||||||
fEditorFechaPago: TfEditorFechaPago;
|
fEditorFechaPago: TfEditorFechaPago;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
procedure TfEditorFechaPago.eFechaPagoPropertiesChange(Sender: TObject);
|
uses uStringsUtils;
|
||||||
|
|
||||||
|
procedure TfEditorFechaPago.eFechaPagoPropertiesEditValueChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FechaPago := eFechaPago.Date;
|
FechaPago := eFechaPago.Date;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPago.FormShow(Sender: TObject);
|
procedure TfEditorFechaPago.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
eFechaPago.Date := Date;
|
if (length(eFechaPago.Text) = 0) then
|
||||||
|
eFechaPago.Date := Date;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfEditorFechaPago.GetFechaPago: TDateTime;
|
function TfEditorFechaPago.GetFechaPago: TDateTime;
|
||||||
@ -50,6 +52,7 @@ end;
|
|||||||
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
|
procedure TfEditorFechaPago.SetFechaPago(const Value: TDateTime);
|
||||||
begin
|
begin
|
||||||
FFechaPago := Value;
|
FFechaPago := Value;
|
||||||
|
eFechaPago.EditValue := FFechaPago;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -40,6 +40,8 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
|||||||
inherited lblDesbloquear: TcxLabel
|
inherited lblDesbloquear: TcxLabel
|
||||||
Left = 593
|
Left = 593
|
||||||
ExplicitLeft = 593
|
ExplicitLeft = 593
|
||||||
|
AnchorX = 638
|
||||||
|
AnchorY = 14
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
@ -316,6 +318,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
|||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Width = 677
|
Width = 677
|
||||||
ExplicitWidth = 677
|
ExplicitWidth = 677
|
||||||
|
inherited ToolButton1: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
|
inherited ToolButton4: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
|
inherited ToolButton2: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton
|
||||||
|
ExplicitWidth = 113
|
||||||
|
end
|
||||||
inherited ToolButton3: TToolButton
|
inherited ToolButton3: TToolButton
|
||||||
ExplicitWidth = 98
|
ExplicitWidth = 98
|
||||||
end
|
end
|
||||||
|
|||||||
@ -786,22 +786,22 @@ end;
|
|||||||
procedure TRecibosProveedorController.ModificarPago(ARecibosProveedor: IBizRecibosProveedor);
|
procedure TRecibosProveedorController.ModificarPago(ARecibosProveedor: IBizRecibosProveedor);
|
||||||
var
|
var
|
||||||
AEditor : IEditorFechaPagoProveedor;
|
AEditor : IEditorFechaPagoProveedor;
|
||||||
FechaPago: String;
|
AFechaPago: String;
|
||||||
begin
|
begin
|
||||||
//Pedimos la fecha del pago
|
//Pedimos la fecha del pago
|
||||||
CreateEditor('EditorFechaPagoProveedor', IEditorFechaPagoProveedor, AEditor);
|
CreateEditor('EditorFechaPagoProveedor', IEditorFechaPagoProveedor, AEditor);
|
||||||
if Assigned(AEditor) then
|
if Assigned(AEditor) then
|
||||||
try
|
try
|
||||||
FechaPago:= '';
|
AEditor.FechaPago:= ARecibosProveedor.Pagos.FECHA_PAGO;
|
||||||
if (AEditor.ShowModal = mrOk) then
|
if (AEditor.ShowModal = mrOk) then
|
||||||
FechaPago := DateToStr(AEditor.FechaPago);
|
AFechaPago := DateToStr(AEditor.FechaPago);
|
||||||
finally
|
finally
|
||||||
AEditor.Release;
|
AEditor.Release;
|
||||||
AEditor := NIL;
|
AEditor := NIL;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Length(FechaPago) > 0 then
|
if Length(AFechaPago) > 0 then
|
||||||
PagosController.Modificar(ARecibosProveedor.Pagos, FechaPago);
|
PagosController.Modificar(ARecibosProveedor.Pagos, AFechaPago);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRecibosProveedorController.Nuevo: IBizRecibosProveedor;
|
function TRecibosProveedorController.Nuevo: IBizRecibosProveedor;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ object fEditorFechaPagoProveedor: TfEditorFechaPagoProveedor
|
|||||||
object eFechaPago: TcxDateEdit
|
object eFechaPago: TcxDateEdit
|
||||||
Left = 77
|
Left = 77
|
||||||
Top = 64
|
Top = 64
|
||||||
Properties.OnChange = eFechaPagoPropertiesChange
|
Properties.OnEditValueChanged = eFechaPagoPropertiesEditValueChanged
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
Style.LookAndFeel.NativeStyle = True
|
Style.LookAndFeel.NativeStyle = True
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
|
|||||||
@ -16,7 +16,7 @@ type
|
|||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure eFechaPagoPropertiesChange(Sender: TObject);
|
procedure eFechaPagoPropertiesEditValueChanged(Sender: TObject);
|
||||||
private
|
private
|
||||||
FFechaPago : TDateTime;
|
FFechaPago : TDateTime;
|
||||||
function GetFechaPago: TDateTime;
|
function GetFechaPago: TDateTime;
|
||||||
@ -28,14 +28,16 @@ type
|
|||||||
implementation
|
implementation
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
procedure TfEditorFechaPagoProveedor.eFechaPagoPropertiesChange(Sender: TObject);
|
procedure TfEditorFechaPagoProveedor.eFechaPagoPropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FechaPago := eFechaPago.Date;
|
FechaPago := eFechaPago.Date;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorFechaPagoProveedor.FormShow(Sender: TObject);
|
procedure TfEditorFechaPagoProveedor.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
eFechaPago.Date := Date;
|
if (length(eFechaPago.Text) = 0) then
|
||||||
|
eFechaPago.Date := Date;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfEditorFechaPagoProveedor.GetFechaPago: TDateTime;
|
function TfEditorFechaPagoProveedor.GetFechaPago: TDateTime;
|
||||||
@ -46,6 +48,7 @@ end;
|
|||||||
procedure TfEditorFechaPagoProveedor.SetFechaPago(const Value: TDateTime);
|
procedure TfEditorFechaPagoProveedor.SetFechaPago(const Value: TDateTime);
|
||||||
begin
|
begin
|
||||||
FFechaPago := Value;
|
FFechaPago := Value;
|
||||||
|
eFechaPago.EditValue := FFechaPago;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user