Se arregla fallo al meter la fecha manualmente y recuperar la caja o banco en la lista de pagos
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@523 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
a0734611ca
commit
f39c3c3642
@ -32,8 +32,8 @@ uses
|
||||
type
|
||||
IPagosClienteController = interface(ISujeto)
|
||||
['{1864471E-74FA-4E96-BA8D-21357DA38B0F}']
|
||||
function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer): Boolean;
|
||||
procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer);
|
||||
function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String): Boolean;
|
||||
procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String);
|
||||
function Eliminar(APagoCliente : IBizPagosCliente): Boolean;
|
||||
function EliminarTodo(APagossCliente : IBizPagosCliente): Boolean;
|
||||
end;
|
||||
@ -47,8 +47,8 @@ type
|
||||
public
|
||||
constructor Create; virtual;
|
||||
destructor Destroy; override;
|
||||
function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer): Boolean;
|
||||
procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer);
|
||||
function Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String): Boolean;
|
||||
procedure Modificar(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String);
|
||||
function Eliminar(APagoCliente : IBizPagosCliente): Boolean;
|
||||
function EliminarTodo(APagosCliente : IBizPagosCliente): Boolean;
|
||||
end;
|
||||
@ -63,7 +63,7 @@ uses
|
||||
|
||||
{ TPagosClienteController }
|
||||
|
||||
function TPagosClienteController.Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer): Boolean;
|
||||
function TPagosClienteController.Anadir(APagosCliente: IBizPagosCliente; Const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String): Boolean;
|
||||
{ Si el pago introducido es un pago y no una devolución devolvemos true en caso de ser
|
||||
una devolución devolvemos false}
|
||||
begin
|
||||
@ -82,6 +82,7 @@ begin
|
||||
|
||||
APagosCliente.IGNORAR_CONTABILIDAD := IgnorarContabilidad;
|
||||
APagosCliente.CUENTA := IntToStr(IdSubCuenta);
|
||||
APagosCliente.SUBCUENTA := SubCuenta;
|
||||
|
||||
APagosCliente.ESTADO_EJERCICIO := AppFactuGES.EjercicioActivo.ESTADO;
|
||||
APagosCliente.ASIENTO_PUNTEADO := -1;
|
||||
@ -152,12 +153,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPagosClienteController.Modificar(APagosCliente: IBizPagosCliente; const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer);
|
||||
procedure TPagosClienteController.Modificar(APagosCliente: IBizPagosCliente; const Fecha: String; Const IgnorarContabilidad: Integer; Const IdSubCuenta: Integer; Const SubCuenta: String);
|
||||
begin
|
||||
APagosCliente.DataTable.Edit;
|
||||
APagosCliente.FECHA_PAGO := StrToDate(Fecha);
|
||||
APagosCliente.IGNORAR_CONTABILIDAD := IgnorarContabilidad;
|
||||
APagosCliente.CUENTA := IntToStr(IdSubCuenta);
|
||||
APagosCliente.CUENTA := IntToStr(IdSubCuenta);
|
||||
APagosCliente.SUBCUENTA := SubCuenta;
|
||||
APagosCliente.DataTable.Post;
|
||||
end;
|
||||
|
||||
|
||||
@ -44,8 +44,8 @@ type
|
||||
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
||||
function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||
|
||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean;
|
||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String);
|
||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean;
|
||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = '');
|
||||
function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
|
||||
@ -120,8 +120,8 @@ type
|
||||
|
||||
procedure RecuperarCliente(AReciboCliente : IBizRecibosCliente);
|
||||
procedure Anadir(ARecibosCliente : IBizRecibosCliente);
|
||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; ASubCuenta: Integer = 0): Boolean;
|
||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String);
|
||||
function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean;
|
||||
procedure ModificarPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = '');
|
||||
function Eliminar(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||
function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean;
|
||||
@ -179,7 +179,7 @@ begin
|
||||
ARecibosCliente.Insert;
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.AnadirPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; ASubCuenta: Integer = 0): Boolean;
|
||||
function TRecibosClienteController.AnadirPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad: Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = ''): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
@ -195,9 +195,9 @@ begin
|
||||
ARecibosCliente.REFERENCIA_REMESA := '';
|
||||
ARecibosCliente.DataTable.Post;
|
||||
|
||||
|
||||
|
||||
//Finalmente añadimos el pago (cobro o devolucion)
|
||||
if PagosController.Anadir(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, ASubCuenta) then
|
||||
if PagosController.Anadir(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, AIdSubcuenta, ASubCuenta) then
|
||||
begin
|
||||
ARecibosCliente.Edit;
|
||||
ARecibosCliente.SITUACION := CTE_COBRADO;
|
||||
@ -866,7 +866,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String);
|
||||
procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente; FechaPago: String =''; AIgnorarContabilidad : Integer = 1; AIdSubCuenta: Integer = 0; ASubCuenta: String = '');
|
||||
begin
|
||||
if Length(FechaPago) > 0 then
|
||||
PagosController.Modificar(ARecibosCliente.Pagos, FechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta);
|
||||
|
||||
@ -95,58 +95,102 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
871
|
||||
303)
|
||||
inherited eReferencia: TcxDBTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 201
|
||||
Width = 201
|
||||
end
|
||||
inherited eSituacion: TcxDBTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 201
|
||||
Width = 201
|
||||
end
|
||||
inherited edtFechaVencimiento: TcxDBDateEdit
|
||||
Left = 326
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 326
|
||||
ExplicitWidth = 67
|
||||
Width = 67
|
||||
end
|
||||
inherited eFechaEmision: TcxDBTextEdit
|
||||
Left = 588
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 588
|
||||
ExplicitWidth = 286
|
||||
Width = 286
|
||||
end
|
||||
inherited eImporteTotal: TcxDBCurrencyEdit
|
||||
Left = 588
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 588
|
||||
ExplicitWidth = 286
|
||||
Width = 286
|
||||
end
|
||||
inherited eNombreCliente: TcxDBTextEdit
|
||||
Left = 588
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 588
|
||||
ExplicitWidth = 286
|
||||
Width = 286
|
||||
end
|
||||
inherited eNifCif: TcxDBTextEdit
|
||||
Left = 588
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 588
|
||||
ExplicitWidth = 286
|
||||
Width = 286
|
||||
end
|
||||
inherited eRemesa: TcxDBTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 201
|
||||
Width = 201
|
||||
end
|
||||
inherited edtFechaEmision: TcxDBDateEdit
|
||||
DataBinding.DataField = 'FECHA_EMISION'
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 62
|
||||
Width = 62
|
||||
end
|
||||
inherited rRefReciboCompensado: TcxDBTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 201
|
||||
Width = 201
|
||||
end
|
||||
inherited eDescripcion: TcxDBTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 201
|
||||
Width = 201
|
||||
end
|
||||
@ -157,6 +201,10 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
Width = 201
|
||||
ExplicitWidth = 201
|
||||
inherited cbTienda: TcxComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 181
|
||||
Width = 181
|
||||
end
|
||||
@ -176,32 +224,56 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
end
|
||||
inherited edtlNombre: TcxDBTextEdit
|
||||
DataBinding.DataSource = frViewReciboCliente1.DADataSource
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 271
|
||||
Width = 271
|
||||
end
|
||||
inherited edtNIFCIF: TcxDBTextEdit
|
||||
DataBinding.DataSource = frViewReciboCliente1.DADataSource
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 271
|
||||
Width = 271
|
||||
end
|
||||
inherited edtCalle: TcxDBTextEdit
|
||||
DataBinding.DataSource = frViewReciboCliente1.DADataSource
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 271
|
||||
Width = 271
|
||||
end
|
||||
inherited edtPoblacion: TcxDBTextEdit
|
||||
DataBinding.DataSource = frViewReciboCliente1.DADataSource
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 153
|
||||
Width = 153
|
||||
end
|
||||
inherited edtProvincia: TcxDBTextEdit
|
||||
DataBinding.DataSource = frViewReciboCliente1.DADataSource
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 271
|
||||
Width = 271
|
||||
end
|
||||
inherited edtCodigoPostal: TcxDBTextEdit
|
||||
Left = 228
|
||||
DataBinding.DataSource = frViewReciboCliente1.DADataSource
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 228
|
||||
end
|
||||
inherited Button3: TBitBtn
|
||||
@ -209,6 +281,10 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
ExplicitLeft = 118
|
||||
end
|
||||
inherited cxDBTextEdit1: TcxDBTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 271
|
||||
Width = 271
|
||||
end
|
||||
@ -329,6 +405,18 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 871
|
||||
ExplicitWidth = 871
|
||||
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
|
||||
ExplicitWidth = 98
|
||||
end
|
||||
@ -361,6 +449,8 @@ inherited fEditorReciboCliente: TfEditorReciboCliente
|
||||
inherited eImporte: TcxDBCurrencyEdit
|
||||
DataBinding.DataSource = dsDataTable
|
||||
Properties.OnEditValueChanged = frViewReciboCliImportes1eImportePropertiesEditValueChanged
|
||||
ExplicitWidth = 150
|
||||
Width = 150
|
||||
end
|
||||
inherited eOtrosGastos: TcxDBCurrencyEdit
|
||||
DataBinding.DataSource = dsDataTable
|
||||
|
||||
@ -152,7 +152,8 @@ procedure TfEditorReciboCliente.frViewPagosCliente1actAnadirExecute(Sender: TObj
|
||||
var
|
||||
AFechaPago: String;
|
||||
AIgnorarContabilidad: Integer;
|
||||
ASubCuenta: Integer;
|
||||
AIdSubCuenta: Integer;
|
||||
ASubCuenta: String;
|
||||
|
||||
begin
|
||||
inherited;
|
||||
@ -173,14 +174,15 @@ begin
|
||||
begin
|
||||
AFechaPago := DateToStr(FechaPago);
|
||||
AIgnorarContabilidad := IgnorarContabilidad;
|
||||
ASubCuenta := IdSubcuenta;
|
||||
AIdSubCuenta := IdSubcuenta;
|
||||
ASubcuenta := frViewListaSubcuentas1.cbSubCuentas.Text;
|
||||
end
|
||||
finally
|
||||
Release;
|
||||
end;
|
||||
end;
|
||||
|
||||
FController.AnadirPago(Recibo, AFechaPago, AIgnorarContabilidad, ASubCuenta);
|
||||
FController.AnadirPago(Recibo, AFechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubCuenta);
|
||||
|
||||
//Solo podremos modificar el recibo si esta pendiente o devuelto
|
||||
if (Recibo.SITUACION = CTE_COBRADO) then
|
||||
@ -278,7 +280,7 @@ begin
|
||||
AIdSubCuenta := IdSubcuenta;
|
||||
ASubcuenta := frViewListaSubcuentas1.cbSubCuentas.Text;
|
||||
if not SoloLectura then
|
||||
FController.ModificarPago(Recibo, AFechaPago, AIgnorarContabilidad, AIdSubCuenta);
|
||||
FController.ModificarPago(Recibo, AFechaPago, AIgnorarContabilidad, AIdSubCuenta, ASubcuenta);
|
||||
end;
|
||||
finally
|
||||
Release;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user