From 4ec0f6b8f1f8e04c3121fdd98557fba20581b8a7 Mon Sep 17 00:00:00 2001 From: roberto Date: Mon, 25 Feb 2008 19:11:13 +0000 Subject: [PATCH] =?UTF-8?q?poArreglo=20de=20recibos=20para=20que=20funcion?= =?UTF-8?q?en=20de=20forma=20aut=C3=B3noma=20sin=20necesidad=20de=20Factur?= =?UTF-8?q?as=20de=20(Tercera=20parte=20solo=20queda=20rematarlo)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@145 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/ApplicationBase/ApplicationBase.res | Bin 4748 -> 384 bytes Source/Base/Base.dproj | 82 +++++++-------- Source/Base/Base.res | Bin 4748 -> 384 bytes .../Controller/uRecibosClienteController.pas | 17 ++++ .../Data/RecibosCliente_data.res | Bin 4748 -> 384 bytes .../Model/schRecibosClienteClient_Intf.pas | 8 +- .../Model/uBizRecibosCliente.pas | 55 ++++++++-- .../RecibosCliente_Group.groupproj | 44 +++++--- .../Servidor/srvRecibosCliente_Impl.pas | 6 +- .../Views/RecibosCliente_view.dpk | 3 +- .../Views/RecibosCliente_view.dproj | 61 +++-------- .../Views/RecibosCliente_view.rc | 22 ++++ .../Views/RecibosCliente_view.res | Bin 32 -> 384 bytes .../Views/uEditorReciboCliente.dfm | 95 ++++++++++++++---- .../Views/uEditorReciboCliente.pas | 10 +- .../Views/uViewReciboCliente.dfm | 81 ++++++++++++--- .../Views/uViewReciboCliente.pas | 48 ++++++++- Source/Servidor/FactuGES_Server.RES | Bin 23204 -> 23204 bytes Source/Servidor/FactuGES_Server.dpr | 3 +- Source/Servidor/FactuGES_Server.dproj | 1 + Source/Servidor/FactuGES_Server.rc | 2 +- 21 files changed, 388 insertions(+), 150 deletions(-) diff --git a/Source/ApplicationBase/ApplicationBase.res b/Source/ApplicationBase/ApplicationBase.res index 1641339fcc482e7e3492d1b45813a86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4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP 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 1641339fcc482e7e3492d1b45813a86619622c33..8b251f312bcccec5485024f6fe8d80e1cdf25746 100644 GIT binary patch delta 11 ScmeBCZD5|Duvteife`=|>;pCc literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP 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 1641339fcc482e7e3492d1b45813a86619622c33..8b251f312bcccec5485024f6fe8d80e1cdf25746 100644 GIT binary patch delta 11 ScmeBCZD5|Duvteife`=|>;pCc literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP 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
-