diff --git a/Source/ApplicationBase/ApplicationBase.res b/Source/ApplicationBase/ApplicationBase.res index 1641339f..8b251f31 100644 Binary files a/Source/ApplicationBase/ApplicationBase.res and b/Source/ApplicationBase/ApplicationBase.res differ diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 50c04110..763193c9 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,47 +58,47 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Base/Base.res b/Source/Base/Base.res index 1641339f..8b251f31 100644 Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ diff --git a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas index c69c8283..8b9f1b74 100644 --- a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas +++ b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas @@ -33,6 +33,9 @@ uses type IRecibosClienteController = interface(IObservador) ['{CBC8BDB8-FBE0-4D54-B2F1-A9330E8339EB}'] + function GetClienteController: IClientesController; + procedure SetClienteController(const Value: IClientesController); + property ClienteController: IClientesController read GetClienteController write SetClienteController; function GetPagosController: IPagosClienteController; procedure SetPagosController(const Value: IPagosClienteController); @@ -90,6 +93,9 @@ type FPagosController : IPagosClienteController; FClienteController : IClientesController; + function GetClienteController: IClientesController; + procedure SetClienteController(const Value: IClientesController); + function GetPagosController: IPagosClienteController; procedure SetPagosController(const Value: IPagosClienteController); @@ -100,6 +106,7 @@ type function DarNuevaReferencia(ID_FACTURA : Integer; REFERENCIA: String): String; public + property ClienteController: IClientesController read GetClienteController write SetClienteController; property PagosController: IPagosClienteController read GetPagosController write SetPagosController; constructor Create; override; destructor Destroy; override; @@ -654,11 +661,21 @@ begin AReciboCliente._Cliente := (FClienteController.Buscar(AReciboCliente.ID_Cliente) as IBizCliente); end; +function TRecibosClienteController.GetClienteController: IClientesController; +begin + Result := FClienteController; +end; + function TRecibosClienteController.GetPagosController: IPagosClienteController; begin Result := FPagosController; end; +procedure TRecibosClienteController.SetClienteController(const Value: IClientesController); +begin + FClienteController := Value; +end; + procedure TRecibosClienteController.SetPagosController(const Value: IPagosClienteController); begin FPagosController := Value; diff --git a/Source/Modulos/Recibos de cliente/Data/RecibosCliente_data.res b/Source/Modulos/Recibos de cliente/Data/RecibosCliente_data.res index 1641339f..8b251f31 100644 Binary files a/Source/Modulos/Recibos de cliente/Data/RecibosCliente_data.res and b/Source/Modulos/Recibos de cliente/Data/RecibosCliente_data.res differ diff --git a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas index 4c2ab6f7..0e01b47e 100644 --- a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas +++ b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas @@ -3,7 +3,7 @@ unit schRecibosClienteClient_Intf; interface uses - Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; + Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; const { Data table rules ids @@ -365,7 +365,7 @@ type end; { TRecibosClienteDataTableRules } - TRecibosClienteDataTableRules = class(TDADataTableRules, IRecibosCliente) + TRecibosClienteDataTableRules = class(TIntfObjectDADataTableRules, IRecibosCliente) private protected { Property getters and setters } @@ -646,7 +646,7 @@ type end; { TPagosClienteDataTableRules } - TPagosClienteDataTableRules = class(TDADataTableRules, IPagosCliente) + TPagosClienteDataTableRules = class(TIntfObjectDADataTableRules, IPagosCliente) private protected { Property getters and setters } @@ -921,7 +921,7 @@ type end; { TRecibosCompensadosCliDataTableRules } - TRecibosCompensadosCliDataTableRules = class(TDADataTableRules, IRecibosCompensadosCli) + TRecibosCompensadosCliDataTableRules = class(TIntfObjectDADataTableRules, IRecibosCompensadosCli) private protected { Property getters and setters } diff --git a/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas index fe2aef48..a9589f20 100644 --- a/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas @@ -27,7 +27,7 @@ interface uses uDAInterfaces, uDADataTable, uDBSelectionListUtils, schRecibosClienteClient_Intf, - uBizPagosCliente, uBizRecibosCliCompensados, uBizContactos; + uBizContactos, uBizPagosCliente, uBizRecibosCliCompensados; const BIZ_CLIENT_IBIZRECIBOSCLIENTE = 'Client.IBizRecibosCliente'; @@ -41,10 +41,12 @@ type IBizRecibosCliente = interface(IRecibosCliente) ['{93758493-260C-450D-9018-E5339C2E09B2}'] function EsNuevo : Boolean; + function ConFactura : Boolean; - // No se puede cambiar el cliente por que depende de la factura + // En Acana se puede cambiar el cliente por que un recibo puede corresponder o no a una factura + procedure SetCliente(AValue : IBizCliente); function GetCliente : IBizCliente; - property Cliente : IBizCliente read GetCliente; + property Cliente : IBizCliente read GetCliente write SetCliente; // Esta propidad es para que el controlador pueda acceder directamente // a la propiedad Cliente @@ -70,15 +72,14 @@ type FCliente : IBizCliente; FSeleccionableInterface : ISeleccionable; - // No se puede cambiar el cliente por que depende de la factura + // En Acana se puede cambiar el cliente por que un recibo puede corresponder o no a una factura + procedure SetCliente(AValue : IBizCliente); function GetCliente : IBizCliente; - property Cliente : IBizCliente read GetCliente; // Esta propidad es para que el controlador pueda acceder directamente // a la propiedad Cliente procedure _SetCliente(AValue : IBizCliente); function _GetCliente : IBizCliente; - property _Cliente : IBizCliente read _GetCliente write _SetCliente; procedure SetPagos(AValue : IBizPagosCliente); function GetPagos : IBizPagosCliente; @@ -91,6 +92,9 @@ type procedure SetID_REMESAValue(const aValue: Integer); override; public + property Cliente : IBizCliente read GetCliente write SetCliente; + property _Cliente : IBizCliente read _GetCliente write _SetCliente; + property RecibosCompensados: IBizRecibosCompensadosCli read GetRecibosCompensados write SetRecibosCompensados; property Pagos : IBizPagosCliente read GetPagos write SetPagos; property SeleccionableInterface : ISeleccionable read FSeleccionableInterface @@ -99,6 +103,7 @@ type procedure IniciarValoresIBizRecibosClienteNuevo; function EsNuevo : Boolean; + function ConFactura : Boolean; constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; @@ -109,7 +114,7 @@ implementation { TBizRecibosCliente } uses - SysUtils, uDataTableUtils, schContactosClient_Intf, uFactuGES_App, uBizEmpresasTiendas; + SysUtils, DB, uDataTableUtils, schContactosClient_Intf, uFactuGES_App, uBizEmpresasTiendas; function TBizRecibosCliente.GetCliente: IBizCliente; begin @@ -131,6 +136,37 @@ begin result := Trim(DataTable.Fields[idx_RecibosClienteSITUACION].AsString); end; +procedure TBizRecibosCliente.SetCliente(AValue: IBizCliente); +var + bEnEdicion : Boolean; +begin + FCliente := AValue; + + bEnEdicion := (DataTable.State in dsEditModes); + if not bEnEdicion then + Edit; + + if Assigned(FCliente) then + begin + if not FCliente.DataTable.Active then + FCliente.DataTable.Active := True; + + ID_CLIENTE := FCliente.ID; + NOMBRE_CLIENTE := FCliente.NOMBRE; + NIF_CIF_CLIENTE := FCliente.NIF_CIF; + +{ CALLE := FCliente.CALLE; + CODIGO_POSTAL := FCliente.CODIGO_POSTAL; + PROVINCIA := FCliente.PROVINCIA; + POBLACION := FCliente.POBLACION; +} + Post; + + if bEnEdicion then + Edit; + end +end; + procedure TBizRecibosCliente.SetID_REMESAValue(const aValue: Integer); begin if (aValue = 0) then @@ -165,6 +201,11 @@ begin FCliente := AValue; end; +function TBizRecibosCliente.ConFactura: Boolean; +begin + Result := ID_FACTURAIsNull; +end; + constructor TBizRecibosCliente.Create(aDataTable: TDADataTable); begin inherited; diff --git a/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj b/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj index 679e108f..f091d5f5 100644 --- a/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj +++ b/Source/Modulos/Recibos de cliente/RecibosCliente_Group.groupproj @@ -9,8 +9,10 @@ + + @@ -50,6 +52,15 @@ + + + + + + + + + @@ -113,15 +124,6 @@ - - - - - - - - - @@ -131,14 +133,32 @@ + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas index e69ca88a..2df687de 100644 --- a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas +++ b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas @@ -42,7 +42,8 @@ implementation uses Dialogs, {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, - schRecibosClienteClient_Intf, uRestriccionesUsuarioUtils, uBizPagosClienteServer, + schRecibosClienteClient_Intf, uRestriccionesUsuarioUtils, uBizRecibosClienteServer, + uBizPagosClienteServer, uRptRecibosCliente_Server; @@ -69,7 +70,8 @@ end; procedure TsrvRecibosCliente.DARemoteServiceCreate(Sender: TObject); begin SessionManager := dmServer.SessionManager; - bpPagosCliente.BusinessRulesID := BIZ_SERVER_PAGOS_CLIENTE; + bpRecibosCliente.BusinessRulesID := BIZ_SERVER_RECIBOS_CLIENTE; + bpPagosCliente.BusinessRulesID := BIZ_SERVER_PAGOS_CLIENTE; end; procedure TsrvRecibosCliente.DataAbstractServiceBeforeAcquireConnection(aSender: TObject; var aConnectionName: string); diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk index f33b777c..38309315 100644 --- a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk +++ b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk @@ -28,7 +28,8 @@ requires GUIBase, RecibosCliente_model, RecibosCliente_controller, - JvGlobusD11R; + JvGlobusD11R, + Contactos_view; contains uRecibosClienteViewRegister in 'uRecibosClienteViewRegister.pas', diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj index f2a24e19..fd1f8cb0 100644 --- a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj +++ b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj @@ -39,91 +39,60 @@ Delphi.Personality Package - - False - True - False - - - True - False - False - - - True - False - 1 - 0 - 0 - 0 - False - False - False - False - False - 3082 - 1252 - - - - - 1.0.0.0 - - - - - - 1.0.0.0 - - - - RecibosCliente_view.dpk - - +FalseTrueFalseTrueFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0RecibosCliente_view.dpk MainSource - - - - + + + + +
fEditorElegirRecibosCliente
+ TfEditorElegirRecibosCliente
fEditorFechaPago
fEditorReciboCliente
+ TfEditorReciboCliente
fEditorReciboClienteReport
+ TfEditorReciboClienteReport
fEditorRecibosCliente
+ TfEditorRecibosCliente
frViewPagosCliente
+ TFrame
frViewReciboCliente
+ TFrame
frViewReciboCliImportes
+ TFrame
frViewRecibosCliCompensados
+ TFrame
frViewRecibosCliente
+ TFrame
-