From 85b512934e3c157cd6f9e95df0e96ae3296fb3a4 Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 25 Mar 2008 11:13:15 +0000 Subject: [PATCH] =?UTF-8?q?Repaso=20de=20todas=20las=20referencias=20de=20?= =?UTF-8?q?la=20aplicaci=C3=B3n?= 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@175 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/ApplicationBase/ApplicationBase.dproj | 61 +++++++++++-- Source/ApplicationBase/uFactuGES_App.pas | 62 ++++++++++++- Source/Base/Base.dproj | 82 +++++++++--------- Source/Cliente/FactuGES.dproj | 74 +--------------- Source/Cliente/FactuGES.rc | 6 +- Source/Cliente/FactuGES.res | Bin 171980 -> 171980 bytes .../Model/AlbaranesCliente_model.dproj | 18 +++- .../Model/uBizAlbaranClienteServer.pas | 5 +- .../Model/uBizAlbaranesCliente.pas | 6 +- .../Model/uBizAlbaranesProveedor.pas | 5 +- .../Contactos/Model/uBizClientesServer.pas | 72 ++++++++++++++- .../Modulos/Contactos/Model/uBizContactos.pas | 6 +- .../Contactos/Model/uBizProveedoresServer.pas | 72 ++++++++++++++- .../Contactos/Views/Contactos_view.res | Bin 4748 -> 384 bytes .../Model/uBizFacturasCliente.pas | 6 +- .../Model/uBizFacturasProveedor.pas | 7 +- .../Model/uBizPresupuestosCliente.pas | 8 +- .../Model/uBizPresupuestosClienteServer.pas | 5 +- .../Model/uBizRecibosCliente.pas | 5 +- .../Model/uBizRecibosProveedor.pas | 5 +- Source/Servidor/FactuGES_Server.RES | Bin 23204 -> 23200 bytes Source/Servidor/FactuGES_Server.rc | 2 +- 22 files changed, 357 insertions(+), 150 deletions(-) diff --git a/Source/ApplicationBase/ApplicationBase.dproj b/Source/ApplicationBase/ApplicationBase.dproj index f81fd44d..b5d3676c 100644 --- a/Source/ApplicationBase/ApplicationBase.dproj +++ b/Source/ApplicationBase/ApplicationBase.dproj @@ -46,6 +46,55 @@ Package FalseTrueFalseTrueFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VCL for the Web Design Package for CodeGear RAD Studio CodeGear WebSnap Components CodeGear SOAP Components @@ -60,12 +109,12 @@ MainSource - - - - - - + + + + + + diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas index 7a3b54f6..d65eb7ba 100644 --- a/Source/ApplicationBase/uFactuGES_App.pas +++ b/Source/ApplicationBase/uFactuGES_App.pas @@ -67,12 +67,25 @@ type property DoLoadModulesEvent : TDoLoadModulesEvent read GetLoadModulesEvent write SetLoadModulesEvent; property Terminated : Boolean read GetTerminated; +//TEMPORAL + function getVAR_IDTIENDA : Integer; + procedure setVAR_IDTIENDA (AValue : Integer); + function getVAR_TIENDA : String; + procedure setVAR_TIENDA (AValue : String); + property VAR_IDTIENDA: Integer read getVAR_IDTIENDA write SetVAR_IDTIENDA; + property VAR_TIENDA: String read getVAR_TIENDA write setVAR_TIENDA; + + procedure ShowCapado; end; TAppFactuGES = class(TInterfacedObject, IAppFactuGES) private +//TEMPORAL + FVAR_IDTIENDA: Integer; + FVAR_TIENDA: String; + FAppInfo : TJclFileVersionInfo; FEmpresasController : IEmpresasController; FUsuariosController: IUsuariosController; @@ -116,6 +129,7 @@ type procedure HideSplashForm; procedure UpdateSplashForm; public + constructor Create; virtual; destructor Destroy; override; @@ -140,6 +154,15 @@ type property DoLoadModulesEvent : TDoLoadModulesEvent read GetLoadModulesEvent write SetLoadModulesEvent; property Terminated : Boolean read GetTerminated; +//TEMPORAL + function getVAR_IDTIENDA : Integer; + procedure setVAR_IDTIENDA (AValue : Integer); + function getVAR_TIENDA : String; + procedure setVAR_TIENDA (AValue : String); + + property VAR_IDTIENDA: Integer read getVAR_IDTIENDA write setVAR_IDTIENDA; + property VAR_TIENDA: String read getVAR_TIENDA write setVAR_TIENDA; + procedure ShowCapado; end; @@ -150,7 +173,9 @@ implementation uses Dialogs, uDialogUtils, cxControls, uUsuariosViewRegister, - uEmpresasViewRegister, uEjerciciosController; + uEmpresasViewRegister, uEjerciciosController, +//TEMPORAL + inifiles; procedure TAppFactuGES.CambiarEjercicio(const AIDEmpresa: Integer); var @@ -188,11 +213,26 @@ begin end; procedure TAppFactuGES.CargarModulos; +var + Fichero : String; begin if not Assigned(FDoLoadModulesEvent) then raise Exception.Create('Evento para la carga de los módulos de la aplicación no asignado (CargarModulos)'); FDoLoadModulesEvent(); + +//TEMPORAL + Fichero := ExtractFileDir(ParamStr(0))+ '\' + 'FACTUGES.INI'; + if not FileExists(Fichero) then + raise Exception.Create('No se ha encontrado el fichero de configuración' + #10#13 + Fichero); + + with TIniFile.Create(Fichero) do + begin + VAR_IDTIENDA := ReadInteger ('VARIABLES', 'IdTienda', 0); + VAR_TIENDA := ReadString ('VARIABLES', 'Tienda', ''); + Free; + end; + end; constructor TAppFactuGES.Create; @@ -314,6 +354,16 @@ begin Result := FUsuariosController; end; +function TAppFactuGES.getVAR_IDTIENDA: Integer; +begin + Result := FVAR_IDTIENDA; +end; + +function TAppFactuGES.getVAR_TIENDA: String; +begin + Result := FVAR_TIENDA; +end; + procedure TAppFactuGES.HideSplashForm; begin if not Assigned(FAppSplashForm) then @@ -368,6 +418,16 @@ begin FDoLoadModulesEvent := ALoadModulesEvent; end; +procedure TAppFactuGES.setVAR_IDTIENDA(AValue: Integer); +begin + FVAR_IDTIENDA := Avalue; +end; + +procedure TAppFactuGES.setVAR_TIENDA(AValue: String); +begin + FVAR_TIENDA := Avalue; +end; + procedure TAppFactuGES.ShowCapado; begin ShowInfoMessage('Sin Acceso', 'Funcionalidad en desarrollo, disculpen las molestias'); diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index c7c3b6b4..5df5fbb9 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,48 +58,48 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
TForm diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index 506cc325..d3106ca9 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -53,79 +53,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2140FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.1.4.0FactuGESFactuGES2.1.4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2150FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.1.5.0FactuGESFactuGES2.1.4 diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index b4008703..fbbe1d01 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 2,1,4,0 -PRODUCTVERSION 2,1,4,0 +FILEVERSION 2,1,5,0 +PRODUCTVERSION 2,1,5,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,7 +13,7 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "2.1.4.0\0" + VALUE "FileVersion", "2.1.5.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" VALUE "ProductVersion", "2.1.4\0" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 3b42872e0f637d7930316a4198c78a2534658658..924f51f9bf4a47f084828a6e4ed58de01fe96975 100644 GIT binary patch delta 35 rcmX@JpXPackage FalseTrueFalseTrueFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + + + + + + + + + + + + RemObjects Pascal Script - RemObjects SDK 3.0 Integration EurekaLog 5.1.9 AlbaranesCliente_model.dpk @@ -51,9 +63,9 @@ MainSource - - - + + + diff --git a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas index 105bea7e..c4be2be8 100644 --- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas +++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas @@ -83,7 +83,7 @@ begin with TsrvReferencias.Create(NIL) do try - Result := DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA) + Result := DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, ID_TIENDA) finally Free; end; @@ -101,8 +101,7 @@ begin with TsrvReferencias.Create(NIL) do try - Result := IncrementarValorReferencia(ACodigoReferencia, - Self.REFERENCIA, ID_EMPRESA) + Result := IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA) finally Free; end; diff --git a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas index 53697d6c..3c7afd6a 100644 --- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas @@ -190,11 +190,13 @@ begin SITUACION := SITUACION_ALBARAN_PENDIENTE; REFERENCIA := ''; TIPO := CTE_TIPO_ALBARAN; + // ALMACÉN PUESTO A CAPÓN Y PROVISIONAL ID_ALMACEN := 1; - ID_TIENDA := CTE_ID_TODAS; - TIENDA := CTE_TODAS; + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; end; procedure TBizAlbaranCliente.IVAOnChange(Sender: TDACustomField); diff --git a/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranesProveedor.pas b/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranesProveedor.pas index a9c1db61..2934809f 100644 --- a/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranesProveedor.pas +++ b/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranesProveedor.pas @@ -187,8 +187,9 @@ begin // ALMACÉN PUESTO A CAPÓN Y PROVISIONAL ID_ALMACEN := 1; - ID_TIENDA := CTE_ID_TODAS; - TIENDA := CTE_TODAS; + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; end; procedure TBizAlbaranProveedor.IVAOnChange(Sender: TDACustomField); diff --git a/Source/Modulos/Contactos/Model/uBizClientesServer.pas b/Source/Modulos/Contactos/Model/uBizClientesServer.pas index ff03db04..04e2c1a1 100644 --- a/Source/Modulos/Contactos/Model/uBizClientesServer.pas +++ b/Source/Modulos/Contactos/Model/uBizClientesServer.pas @@ -11,20 +11,76 @@ const type TBizClienteServer = class(TBizContactosServer) + private + FReferenciaAutomatica : Boolean; + function DarReferencia : String; + function IncrementarReferencia : Boolean; protected procedure Insert_Datos_Contacto(aChange: TDADeltaChange); override; procedure Update_Datos_Contacto(aChange: TDADeltaChange); override; procedure Delete_Datos_Contacto(aChange: TDADeltaChange); override; + + procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override; + procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); override; end; implementation uses uDataModuleServer, uDAClasses, srvContabilidad_Impl, - schContactosClient_Intf, uBusinessUtils; + schContactosClient_Intf, uBusinessUtils, srvReferencias_Impl; + +const + REF_CLIENTE = 'REF_CLIENTE'; { TBizClienteServer } +procedure TBizClienteServer.AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); +begin + inherited; + + // Actualizamos el contador de referencias. + case aChange.ChangeType of + ctInsert, ctUpdate: begin + if FReferenciaAutomatica then + begin + IncrementarReferencia; + FReferenciaAutomatica := False; + end; + end; + end; +end; + +procedure TBizClienteServer.BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); +begin + FReferenciaAutomatica := False; + + case Sender.CurrentChange.ChangeType of + ctInsert, ctUpdate: begin + //Si la referencia no ha sido asignada le asignamos una nosotros + if REFERENCIAIsNull or (Length(REFERENCIA) = 0) then + begin + FReferenciaAutomatica := True; + REFERENCIA := DarReferencia; + end; + end; + end; +end; + +function TBizClienteServer.DarReferencia: String; +var + ATipo : String; +begin + ATipo := REF_CLIENTE; + + with TsrvReferencias.Create(NIL) do + try + Result := DarNuevaReferencia(ATipo, ID_EMPRESA, ID_TIENDA) + finally + Free; + end; +end; + procedure TBizClienteServer.Delete_Datos_Contacto(aChange: TDADeltaChange); var ASchema : TDASchema; @@ -48,6 +104,20 @@ begin end; end; +function TBizClienteServer.IncrementarReferencia: Boolean; +var + ATipo : String; +begin + ATipo := REF_CLIENTE; + + with TsrvReferencias.Create(NIL) do + try + Result := IncrementarValorReferencia(ATipo, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA) + finally + Free; + end; +end; + procedure TBizClienteServer.Insert_Datos_Contacto(aChange: TDADeltaChange); var ASchema : TDASchema; diff --git a/Source/Modulos/Contactos/Model/uBizContactos.pas b/Source/Modulos/Contactos/Model/uBizContactos.pas index 11afc399..9605dfc8 100644 --- a/Source/Modulos/Contactos/Model/uBizContactos.pas +++ b/Source/Modulos/Contactos/Model/uBizContactos.pas @@ -450,8 +450,10 @@ end; procedure TBizContacto.IniciarValoresContactoNuevo; begin USUARIO := AppFactuGES.UsuarioActivo.UserName; - ID_TIENDA := CTE_ID_TODAS; - TIENDA := CTE_TODAS; + + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; end; procedure TBizContacto.OnNewRecord(Sender: TDADataTable); diff --git a/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas b/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas index 126e5588..e78f1095 100644 --- a/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas +++ b/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas @@ -11,20 +11,76 @@ const type TBizProveedorServer = class(TBizContactosServer) + private + FReferenciaAutomatica : Boolean; + function DarReferencia : String; + function IncrementarReferencia : Boolean; protected procedure Insert_Datos_Contacto(aChange: TDADeltaChange); override; procedure Update_Datos_Contacto(aChange: TDADeltaChange); override; procedure Delete_Datos_Contacto(aChange: TDADeltaChange); override; + + procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override; + procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); override; end; implementation uses uDataModuleServer, uDAClasses, srvContabilidad_Impl, - schContactosClient_Intf, uBusinessUtils; + schContactosClient_Intf, uBusinessUtils, srvReferencias_Impl; + +const + REF_PROVEEDOR = 'REF_PROVEEDOR'; { TBizProveedorServer } +procedure TBizProveedorServer.AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); +begin + inherited; + + // Actualizamos el contador de referencias. + case aChange.ChangeType of + ctInsert, ctUpdate: begin + if FReferenciaAutomatica then + begin + IncrementarReferencia; + FReferenciaAutomatica := False; + end; + end; + end; +end; + +procedure TBizProveedorServer.BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); +begin + FReferenciaAutomatica := False; + + case Sender.CurrentChange.ChangeType of + ctInsert, ctUpdate: begin + //Si la referencia no ha sido asignada le asignamos una nosotros + if REFERENCIAIsNull or (Length(REFERENCIA) = 0) then + begin + FReferenciaAutomatica := True; + REFERENCIA := DarReferencia; + end; + end; + end; +end; + +function TBizProveedorServer.DarReferencia: String; +var + ATipo : String; +begin + ATipo := REF_PROVEEDOR; + + with TsrvReferencias.Create(NIL) do + try + Result := DarNuevaReferencia(ATipo, ID_EMPRESA, ID_TIENDA) + finally + Free; + end; +end; + procedure TBizProveedorServer.Delete_Datos_Contacto(aChange: TDADeltaChange); var ASchema : TDASchema; @@ -48,6 +104,20 @@ begin end; end; +function TBizProveedorServer.IncrementarReferencia: Boolean; +var + ATipo : String; +begin + ATipo := REF_PROVEEDOR; + + with TsrvReferencias.Create(NIL) do + try + Result := IncrementarValorReferencia(ATipo, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA) + finally + Free; + end; +end; + procedure TBizProveedorServer.Insert_Datos_Contacto(aChange: TDADeltaChange); var ASchema : TDASchema; diff --git a/Source/Modulos/Contactos/Views/Contactos_view.res b/Source/Modulos/Contactos/Views/Contactos_view.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/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas index 57458a74..c761c8dc 100644 --- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas @@ -256,8 +256,10 @@ begin IVA := AppFactuGES.EmpresaActiva.IVA; RE := 0; SITUACION := CTE_PENDIENTE; - ID_TIENDA := CTE_ID_TODAS; - TIENDA := CTE_TODAS; + + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; IGNORAR_CONTABILIDAD := 0; end; diff --git a/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedor.pas index bb67e800..3370ed20 100644 --- a/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedor.pas @@ -246,8 +246,11 @@ begin RE := 0; SITUACION := CTE_PENDIENTE; - ID_TIENDA := CTE_ID_TODAS; - TIENDA := CTE_TODAS; + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; + + IGNORAR_CONTABILIDAD := 0; end; procedure TBizFacturaProveedor.IVAOnChange(Sender: TDACustomField); diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas index fde4bd37..30fbf98b 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas @@ -201,9 +201,13 @@ begin REFERENCIA := ''; SITUACION := SITUACION_PRESUPUESTO_PENDIENTE; - ID_TIENDA := AppFactuGES.UsuarioActivo.ID_TIENDA; +// ID_TIENDA := AppFactuGES.UsuarioActivo.ID_TIENDA; ID_VENDEDOR := AppFactuGES.UsuarioActivo.ID_EMPLEADO; - TIENDA := CTE_TODAS; +// TIENDA := CTE_TODAS; + + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; end; procedure TBizPresupuestoCliente.IVAOnChange(Sender: TDACustomField); diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas index 734b90bc..23d2c224 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas @@ -77,7 +77,7 @@ function TBizPresupuestosClienteServer.DarReferencia: String; begin with TsrvReferencias.Create(NIL) do try - Result := DarNuevaReferencia(REF_PRESUPUESTOS_CLIENTE, ID_EMPRESA) + Result := DarNuevaReferencia(REF_PRESUPUESTOS_CLIENTE, ID_EMPRESA, ID_TIENDA) finally Free; end; @@ -88,8 +88,7 @@ function TBizPresupuestosClienteServer.IncrementarReferencia: Boolean; begin with TsrvReferencias.Create(NIL) do try - Result := IncrementarValorReferencia(REF_PRESUPUESTOS_CLIENTE, - Self.REFERENCIA, ID_EMPRESA) + Result := IncrementarValorReferencia(REF_PRESUPUESTOS_CLIENTE, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA) finally Free; end; diff --git a/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas index c655eb4c..4821162a 100644 --- a/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas @@ -243,7 +243,10 @@ begin OTROS_GASTOS := 0; ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; USUARIO := AppFactuGES.UsuarioActivo.UserName; - ID_TIENDA := CTE_ID_TODAS; + + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; end; procedure TBizRecibosCliente.OnNewRecord(Sender: TDADataTable); diff --git a/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas b/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas index 1e02ba5e..c7095151 100644 --- a/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas +++ b/Source/Modulos/Recibos de proveedor/Model/uBizRecibosProveedor.pas @@ -245,7 +245,10 @@ begin OTROS_GASTOS := 0; ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; USUARIO := AppFactuGES.UsuarioActivo.UserName; - ID_TIENDA := CTE_ID_TODAS; + + //TEMPORAL + ID_TIENDA := AppFactuGES.VAR_IDTIENDA; + TIENDA := AppFactuGES.VAR_TIENDA; end; procedure TBizRecibosProveedor.OnNewRecord(Sender: TDADataTable); diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 8b994917acf955ffc66ca9080257a0cfd6995132..717b09f7b94ac4022468e9dfba67001b4899ab0b 100644 GIT binary patch delta 77 zcmZ3om2tsV#tnBO7?(`G8zB!Q|3*YJGEI(*RA#(4xi+$zIf+4W^6yAl;arA9h9ZU% ghE#@P1|0?k1|tU3$+}Uh?3N5x48{y5lcS?N0Z)+^!~g&Q delta 81 zcmZ3mm2t^d#tnBO7*|Zb8zB!Q|3*YJvQ3VRRAziMxi+$zIgLSi^6yAl(K3cihE#?k ihCCoy%%H=dz+l8+I9WSNmD3Q&vSKh~FrOSA